blob: 25e351be57a35ab1455f31b8e15f5c49b283f478 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301#! /bin/sh
Steve Kondikae271bc2015-11-15 02:50:53 +01002# From configure.in Revision: 1.618 .
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05303# Guess values for system-dependent variables and create Makefiles.
Steve Kondikae271bc2015-11-15 02:50:53 +01004# Generated by Autoconf 2.52.20141204.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05305#
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.
10
11# Avoid depending upon Character Ranges.
12as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15as_cr_digits='0123456789'
16as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18# Sed expression to map a string onto a valid variable name.
19as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21# Sed expression to map a string onto a valid CPP name.
22as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24# Be Bourne compatible
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26 emulate sh
27 NULLCMD=:
28elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29 set -o posix
30fi
31
32# Name of the executable.
33as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35if expr a : '\(a\)' >/dev/null 2>&1; then
36 as_expr=expr
37else
38 as_expr=false
39fi
40
41rm -f conf$$ conf$$.exe conf$$.file
42echo >conf$$.file
43if 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'
51 fi
52elif ln conf$$.file conf$$ 2>/dev/null; then
53 as_ln_s=ln
54else
55 as_ln_s='cp -p'
56fi
57rm -f conf$$ conf$$.exe conf$$.file
58
59as_executable_p="test -f"
60
61# Support unset when possible.
62if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63 as_unset=unset
64else
65 as_unset=false
66fi
67
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; }
77
78# IFS
79# We need space, tab and new line, in precisely that order.
80as_nl='
81'
82IFS=" $as_nl"
83
84# CDPATH.
85$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87# Name of the host.
88# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89# so uname gets run too.
90ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92exec 6>&1
93
94#
95# Initializations.
96#
97ac_default_prefix=/usr/local
98cross_compiling=no
99subdirs=
100MFLAGS= MAKEFLAGS=
101SHELL=${CONFIG_SHELL-/bin/sh}
102
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}
107
108ac_unique_file="ncurses/base/lib_initscr.c"
109# Factoring default headers for most tests.
110ac_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"
145
146# Initialize some variables set by options.
147ac_init_help=
148ac_init_version=false
149# The variables have the same names as the options, with
150# dashes changed to underlines.
151cache_file=/dev/null
152exec_prefix=NONE
153no_create=
154no_recursion=
155prefix=NONE
156program_prefix=NONE
157program_suffix=NONE
158program_transform_name=s,x,x,
159silent=
160site=
161srcdir=
162verbose=
163x_includes=NONE
164x_libraries=NONE
165
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.
171bindir='${exec_prefix}/bin'
172sbindir='${exec_prefix}/sbin'
173libexecdir='${exec_prefix}/libexec'
Steve Kondikae271bc2015-11-15 02:50:53 +0100174datarootdir='${prefix}/share'
175datadir='${datarootdir}'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530176sysconfdir='${prefix}/etc'
177sharedstatedir='${prefix}/com'
178localstatedir='${prefix}/var'
179libdir='${exec_prefix}/lib'
180includedir='${prefix}/include'
181oldincludedir='/usr/include'
Steve Kondikae271bc2015-11-15 02:50:53 +0100182infodir='${datarootdir}/info'
183mandir='${datarootdir}/man'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530184
185# Identity of this package.
186PACKAGE_NAME=
187PACKAGE_TARNAME=
188PACKAGE_VERSION=
189PACKAGE_STRING=
190PACKAGE_BUGREPORT=
191
192ac_prev=
193for ac_option
194do
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
200 fi
201
202 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204 # Accept the important Cygnus configure options, so we can diagnose typos.
205
206 case $ac_option in
207
208 -bindir | --bindir | --bindi | --bind | --bin | --bi)
209 ac_prev=bindir ;;
210 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211 bindir=$ac_optarg ;;
212
213 -build | --build | --buil | --bui | --bu)
214 ac_prev=build_alias ;;
215 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216 build_alias=$ac_optarg ;;
217
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 ;;
224
225 --config-cache | -C)
226 cache_file=config.cache ;;
227
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 ;;
233
Steve Kondikae271bc2015-11-15 02:50:53 +0100234 -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 ;;
240
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530241 -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" ;;
249
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'" ;;
262
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 ;;
271
272 -gas | --gas | --ga | --g)
273 # Obsolete; use --with-gas.
274 with_gas=yes ;;
275
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 ;;
282
283 -host | --host | --hos | --ho)
284 ac_prev=host_alias ;;
285 -host=* | --host=* | --hos=* | --ho=*)
286 host_alias=$ac_optarg ;;
287
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 ;;
294
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
296 ac_prev=infodir ;;
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir=$ac_optarg ;;
299
300 -libdir | --libdir | --libdi | --libd)
301 ac_prev=libdir ;;
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
303 libdir=$ac_optarg ;;
304
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 ;;
311
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 ;;
320
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322 ac_prev=mandir ;;
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324 mandir=$ac_optarg ;;
325
326 -nfp | --nfp | --nf)
327 # Obsolete; use --without-fp.
328 with_fp=no ;;
329
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331 | --no-cr | --no-c)
332 no_create=yes ;;
333
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 ;;
337
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 ;;
346
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348 ac_prev=prefix ;;
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350 prefix=$ac_optarg ;;
351
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 ;;
358
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 ;;
365
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 ;;
382
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
385 silent=yes ;;
386
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 ;;
392
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 ;;
403
404 -site | --site | --sit)
405 ac_prev=site ;;
406 -site=* | --site=* | --sit=*)
407 site=$ac_optarg ;;
408
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410 ac_prev=srcdir ;;
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412 srcdir=$ac_optarg ;;
413
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 ;;
420
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 ;;
425
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
427 verbose=yes ;;
428
429 -version | --version | --versio | --versi | --vers | -V)
430 ac_init_version=: ;;
431
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'" ;;
444
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" ;;
453
454 --x)
455 # Obsolete; use --with-x.
456 with_x=yes ;;
457
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 ;;
464
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 ;;
471
472 -*) { echo "$as_me: error: unrecognized option: $ac_option
473Try \`$0 --help' for more information." >&2
474 { (exit 1); exit 1; }; }
475 ;;
476
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 ;;
486
487 *)
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}
493 ;;
494
495 esac
496done
497
498if 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; }; }
502fi
503
504# Be sure to have absolute paths.
505for ac_var in exec_prefix prefix
506do
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
513done
514
515# Be sure to have absolute paths.
Steve Kondikae271bc2015-11-15 02:50:53 +0100516for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530517 localstatedir libdir includedir oldincludedir infodir mandir
518do
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
525done
526
527# There might be people who depend on the old broken behavior: `$host'
528# used to hold the argument of --host etc.
529build=$build_alias
530host=$host_alias
531target=$target_alias
532
533# FIXME: should be removed in autoconf 3.0.
534if 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
541 fi
542fi
543
544ac_tool_prefix=
545test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547test "$silent" = yes && exec 6>/dev/null
548
549# Find the source files, if location was not specified.
550if 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=..
559 fi
560else
561 ac_srcdir_defaulted=no
562fi
563if 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; }; }
570 fi
571fi
572srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573ac_env_build_alias_set=${build_alias+set}
574ac_env_build_alias_value=$build_alias
575ac_cv_env_build_alias_set=${build_alias+set}
576ac_cv_env_build_alias_value=$build_alias
577ac_env_host_alias_set=${host_alias+set}
578ac_env_host_alias_value=$host_alias
579ac_cv_env_host_alias_set=${host_alias+set}
580ac_cv_env_host_alias_value=$host_alias
581ac_env_target_alias_set=${target_alias+set}
582ac_env_target_alias_value=$target_alias
583ac_cv_env_target_alias_set=${target_alias+set}
584ac_cv_env_target_alias_value=$target_alias
585ac_env_CC_set=${CC+set}
586ac_env_CC_value=$CC
587ac_cv_env_CC_set=${CC+set}
588ac_cv_env_CC_value=$CC
589ac_env_CFLAGS_set=${CFLAGS+set}
590ac_env_CFLAGS_value=$CFLAGS
591ac_cv_env_CFLAGS_set=${CFLAGS+set}
592ac_cv_env_CFLAGS_value=$CFLAGS
593ac_env_LDFLAGS_set=${LDFLAGS+set}
594ac_env_LDFLAGS_value=$LDFLAGS
595ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596ac_cv_env_LDFLAGS_value=$LDFLAGS
597ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598ac_env_CPPFLAGS_value=$CPPFLAGS
599ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601ac_env_CPP_set=${CPP+set}
602ac_env_CPP_value=$CPP
603ac_cv_env_CPP_set=${CPP+set}
604ac_cv_env_CPP_value=$CPP
605ac_env_CXX_set=${CXX+set}
606ac_env_CXX_value=$CXX
607ac_cv_env_CXX_set=${CXX+set}
608ac_cv_env_CXX_value=$CXX
609ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610ac_env_CXXFLAGS_value=$CXXFLAGS
611ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613ac_env_CXXCPP_set=${CXXCPP+set}
614ac_env_CXXCPP_value=$CXXCPP
615ac_cv_env_CXXCPP_set=${CXXCPP+set}
616ac_cv_env_CXXCPP_value=$CXXCPP
617
618#
619# Report the --help message.
620#
621if 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.
626
627Usage: $0 [OPTION]... [VAR=VALUE]...
628
629To assign environment variables (e.g., CC, CFLAGS...), specify them as
630VAR=VALUE. See below for descriptions of some of the useful variables.
631
632Defaults for the options are specified in brackets.
633
634Configuration:
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 \`..']
644
645EOF
646
647 cat <<EOF
648Installation 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]
653
654By default, \`make install' will install all the files in
655\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657for instance \`--prefix=\$HOME'.
658
659For better control, use the options below.
660
661Fine 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]
Steve Kondikae271bc2015-11-15 02:50:53 +0100665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530667 --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]
Steve Kondikae271bc2015-11-15 02:50:53 +0100673 --infodir=DIR info documentation [DATAROOTDIR/info]
674 --mandir=DIR man documentation [DATAROOTDIR/man]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530675EOF
676
677 cat <<\EOF
678
679Program 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
683
684System 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]
688EOF
689fi
690
691if test -n "$ac_init_help"; then
692
693 cat <<\EOF
694
695Optional Packages:
696 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
697 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
698
699Optional Features:
700 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
701 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
702
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
Steve Kondikae271bc2015-11-15 02:50:53 +0100706 --without-ada suppress check for Ada95, don't build demo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530707 --without-cxx do not adjust ncurses bool to match C++
708 --without-cxx-binding do not build C++ binding and demo
Steve Kondikae271bc2015-11-15 02:50:53 +0100709 --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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530713 --without-curses-h install curses.h as ncurses.h only
Steve Kondikae271bc2015-11-15 02:50:53 +0100714 --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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530718 --enable-mixed-case tic should assume mixed-case filenames
719 --with-install-prefix prefixes actual install-location ($DESTDIR)
720Build-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})
727Options to Specify the Libraries Built/Used:
Steve Kondikae271bc2015-11-15 02:50:53 +0100728 --disable-libtool-version enable to use libtool's incompatible naming scheme
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530729 --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
Steve Kondikae271bc2015-11-15 02:50:53 +0100734 --with-cxx-shared generate C++ shared-libraries
735 --with-lib-prefix override library-prefix
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530736 --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
Steve Kondikae271bc2015-11-15 02:50:53 +0100744 --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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530749Fine-Tuning Your Configuration:
Steve Kondikae271bc2015-11-15 02:50:53 +0100750 --with-extra-suffix=X append extra suffix to header/library paths
751 --disable-overwrite put headers in subdir, omit link to -lcurses
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530752 --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
Steve Kondikae271bc2015-11-15 02:50:53 +0100757 --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530758 --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
Steve Kondikae271bc2015-11-15 02:50:53 +0100781 --with-ccharw-max=XXX override size CCHARW_MAX
782 --with-tparm-arg=TYPE override parameter type of tparm
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530783 --with-rcs-ids compile-in RCS identifiers
784Options 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
791Extensions:
792 --disable-ext-funcs disable function-extensions
Steve Kondikae271bc2015-11-15 02:50:53 +0100793 --enable-sp-funcs enable SCREEN-extensions
794 --enable-term-driver enable terminal-driver
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530795 --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
Steve Kondikae271bc2015-11-15 02:50:53 +0100798 --enable-ext-putwin compile with extended putwin/screendump
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530799 --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
803Development 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)
807Experimental Code:
808 --disable-assumed-color do not assume anything about default-colors
809 --disable-hashmap compile without hashmap scrolling-optimization
Steve Kondikae271bc2015-11-15 02:50:53 +0100810 --enable-colorfgbg compile-in experimental $COLORFGBG code
811 --enable-interop compile-in interop bindings
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530812 --with-pthread use POSIX thread library
Steve Kondikae271bc2015-11-15 02:50:53 +0100813 --enable-pthreads-eintr enable EINTR in wgetch with pthreads
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530814 --enable-weak-symbols enable weak-symbols for pthreads
Steve Kondikae271bc2015-11-15 02:50:53 +0100815 --enable-reentrant compile with reentrant code
816 --with-wrap-prefix=XXX override prefix used for public variables
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530817 --enable-safe-sprintf compile with experimental safe-sprintf code
818 --disable-scroll-hints compile without scroll-hints code
Steve Kondikae271bc2015-11-15 02:50:53 +0100819 --enable-wgetch-events compile with wgetch-events code
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530820Testing/development Options:
Steve Kondikae271bc2015-11-15 02:50:53 +0100821 --disable-echo do not display "compiling" commands
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530822 --enable-warnings build: turn on GCC compiler warnings
Steve Kondikae271bc2015-11-15 02:50:53 +0100823 --enable-string-hacks work around bogus compiler/loader warnings
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530824 --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
Steve Kondikae271bc2015-11-15 02:50:53 +0100832 --disable-gnat-projects test: disable GNAT projects even if usable
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530833Ada95 Binding Options:
834 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
Steve Kondikae271bc2015-11-15 02:50:53 +0100835 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530836 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
Steve Kondikae271bc2015-11-15 02:50:53 +0100837 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530838
839Some 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
850
851Use these variables to override the choices made by `configure' or to help
852it to find libraries and programs with nonstandard names/locations.
853
854EOF
855fi
856
857if 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'`
865
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
874
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
888 fi
889 cd $ac_popdir
890 done
891fi
892
893test -n "$ac_init_help" && exit 0
894if $ac_init_version; then
895 cat <<\EOF
896
897Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898Free Software Foundation, Inc.
899This configure script is free software; the Free Software Foundation
900gives unlimited permission to copy, distribute and modify it.
901EOF
902 exit 0
903fi
904exec 5>config.log
905cat >&5 <<EOF
906This file contains any messages produced by compilers while
907running configure, to aid debugging if configure makes a mistake.
908
909It was created by $as_me, which was
Steve Kondikae271bc2015-11-15 02:50:53 +0100910generated by GNU Autoconf 2.52.20141204. Invocation command line was
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530911
912 $ $0 $@
913
914EOF
915{
916cat <<_ASUNAME
917## ---------- ##
918## Platform. ##
919## ---------- ##
920
921hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922uname -m = `(uname -m) 2>/dev/null || echo unknown`
923uname -r = `(uname -r) 2>/dev/null || echo unknown`
924uname -s = `(uname -s) 2>/dev/null || echo unknown`
925uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
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`
929
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`
933hostinfo = `(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`
937
938PATH = $PATH
939
940_ASUNAME
941} >&5
942
943cat >&5 <<EOF
944## ------------ ##
945## Core tests. ##
946## ------------ ##
947
948EOF
949
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.
953ac_configure_args=
954ac_sep=
955for ac_arg
956do
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.
970done
971
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.
975trap '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,
983{
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"
990 ;;
991 *)
992 sed -n \
993 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994 ;;
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
1005 fi
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
1012 ' 0
1013for ac_signal in 1 2 13 15; do
1014 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015done
1016ac_signal=0
1017
1018# confdefs.h avoids OS command line length limits that DEFS can exceed.
1019rm -rf conftest* confdefs.h
1020# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021echo >confdefs.h
1022
1023# Let the site file select an alternate cache file if it wants to.
1024# Prefer explicitly selected file to automatically selected ones.
1025if 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"
1030 fi
1031fi
1032for ac_site_file in $CONFIG_SITE; do
1033 if test -r "$ac_site_file"; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001034 { echo "$as_me:1034: loading site script $ac_site_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301035echo "$as_me: loading site script $ac_site_file" >&6;}
1036 cat "$ac_site_file" >&5
1037 . "$ac_site_file"
1038 fi
1039done
1040
1041if 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
Steve Kondikae271bc2015-11-15 02:50:53 +01001045 { echo "$as_me:1045: loading cache $cache_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301046echo "$as_me: loading cache $cache_file" >&6;}
1047 case $cache_file in
1048 [\\/]* | ?:[\\/]* ) . $cache_file;;
1049 *) . ./$cache_file;;
1050 esac
1051 fi
1052else
Steve Kondikae271bc2015-11-15 02:50:53 +01001053 { echo "$as_me:1053: creating cache $cache_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301054echo "$as_me: creating cache $cache_file" >&6;}
1055 >$cache_file
1056fi
1057
1058# Check that the precious variables saved in the cache have kept the same
1059# value.
1060ac_cache_corrupted=false
1061for 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,)
Steve Kondikae271bc2015-11-15 02:50:53 +01001069 { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301070echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071 ac_cache_corrupted=: ;;
1072 ,set)
Steve Kondikae271bc2015-11-15 02:50:53 +01001073 { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301074echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075 ac_cache_corrupted=: ;;
1076 ,);;
1077 *)
1078 if test "x$ac_old_val" != "x$ac_new_val"; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001079 { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301080echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01001081 { echo "$as_me:1081: former value: $ac_old_val" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301082echo "$as_me: former value: $ac_old_val" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01001083 { echo "$as_me:1083: current value: $ac_new_val" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301084echo "$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'"
1095 ;;
1096 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097 ;;
1098 esac
1099 fi
1100done
1101if $ac_cache_corrupted; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001102 { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301103echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01001104 { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301105echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106 { (exit 1); exit 1; }; }
1107fi
1108
1109ac_ext=c
1110ac_cpp='$CPP $CPPFLAGS'
1111ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114ac_main_return=return
1115
Steve Kondikae271bc2015-11-15 02:50:53 +01001116case `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=' ' ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301119 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121esac
1122echo "#! $SHELL" >conftest.sh
1123echo "exit 0" >>conftest.sh
1124chmod +x conftest.sh
Steve Kondikae271bc2015-11-15 02:50:53 +01001125if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301126 (PATH=".;."; conftest.sh) 2>&5
1127 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001128 echo "$as_me:1128: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301129 (exit $ac_status); }; then
1130 ac_path_separator=';'
1131else
1132 ac_path_separator=:
1133fi
1134PATH_SEPARATOR="$ac_path_separator"
1135rm -f conftest.sh
1136
1137ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139top_builddir=`pwd`
1140
Steve Kondikae271bc2015-11-15 02:50:53 +01001141echo "$as_me:1141: checking for egrep" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301142echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143if test "${ac_cv_prog_egrep+set}" = set; then
1144 echo $ECHO_N "(cached) $ECHO_C" >&6
1145else
1146 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
Steve Kondikae271bc2015-11-15 02:50:53 +01001147 then ac_cv_prog_egrep='grep -E'
1148 else ac_cv_prog_egrep='egrep'
1149 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301150fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001151echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301152echo "${ECHO_T}$ac_cv_prog_egrep" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01001153 EGREP=$ac_cv_prog_egrep
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301154
Steve Kondikae271bc2015-11-15 02:50:53 +01001155 test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301156echo "$as_me: error: No egrep program found" >&2;}
1157 { (exit 1); exit 1; }; }
1158
1159NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162cf_cv_abi_version=${NCURSES_MAJOR}
1163cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164cf_cv_timestamp=`date`
Steve Kondikae271bc2015-11-15 02:50:53 +01001165echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301166echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
Steve Kondikae271bc2015-11-15 02:50:53 +01001168if test -f $srcdir/VERSION ; then
1169 echo "$as_me:1169: checking for package version" >&5
1170echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
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`
1176
1177 # this is how CF_BUNDLED_INTL uses $VERSION:
1178 VERSION="$cf_field1"
1179
1180 VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181 test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182echo "$as_me: error: missing major-version" >&2;}
1183 { (exit 1); exit 1; }; }
1184
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
1187echo "$as_me: error: missing minor-version" >&2;}
1188 { (exit 1); exit 1; }; }
1189
1190 echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193 echo "$as_me:1193: checking for package patch date" >&5
1194echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196 case .$VERSION_PATCH in
1197 (.)
1198 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200 { (exit 1); exit 1; }; }
1201 ;;
1202 (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203 ;;
1204 (*)
1205 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207 { (exit 1); exit 1; }; }
1208 ;;
1209 esac
1210 echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211echo "${ECHO_T}$VERSION_PATCH" >&6
1212else
1213 { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215 { (exit 1); exit 1; }; }
1216fi
1217
1218# show the actual data that we have for versions:
1219test -n "$verbose" && echo " ABI VERSION $VERSION" 1>&6
1220
1221echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235 cf_PACKAGE=NCURSES
1236 PACKAGE=ncurses
1237
1238cat >>confdefs.h <<EOF
1239#define PACKAGE "$PACKAGE"
1240EOF
1241
1242cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244 cat >>confdefs.h <<EOF
1245#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246EOF
1247
1248 cat >>confdefs.h <<EOF
1249#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250EOF
1251
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301252test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254# Check whether --with-rel-version or --without-rel-version was given.
1255if test "${with_rel_version+set}" = set; then
1256 withval="$with_rel_version"
Steve Kondikae271bc2015-11-15 02:50:53 +01001257 { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301258echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259 cf_cv_rel_version=$withval
1260fi;
1261
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/\..*//'`
1264
1265if test -n "$NCURSES_MAJOR" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001266 case $NCURSES_MAJOR in
1267 ([0-9]*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301268 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001269 (*)
1270 { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301271echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272 { (exit 1); exit 1; }; }
1273 ;;
1274 esac
1275else
Steve Kondikae271bc2015-11-15 02:50:53 +01001276 { { echo "$as_me:1276: error: Release major-version value is empty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301277echo "$as_me: error: Release major-version value is empty" >&2;}
1278 { (exit 1); exit 1; }; }
1279fi
1280
1281if test -n "$NCURSES_MINOR" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001282 case $NCURSES_MINOR in
1283 ([0-9]*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301284 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001285 (*)
1286 { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301287echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288 { (exit 1); exit 1; }; }
1289 ;;
1290 esac
1291else
Steve Kondikae271bc2015-11-15 02:50:53 +01001292 { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301293echo "$as_me: error: Release minor-version value is empty" >&2;}
1294 { (exit 1); exit 1; }; }
1295fi
1296
1297test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299# Check whether --with-abi-version or --without-abi-version was given.
1300if test "${with_abi_version+set}" = set; then
1301 withval="$with_abi_version"
Steve Kondikae271bc2015-11-15 02:50:53 +01001302
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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301306echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01001307 case $cf_cv_rel_version in
1308 (5.*)
1309 cf_cv_rel_version=$withval.0
1310 ;;
1311 (6.*)
1312 cf_cv_rel_version=$withval.9 # FIXME: should be 10 as of 6.0 release
1313 ;;
1314 esac
1315 fi
1316 cf_cv_abi_version=$withval
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301317fi;
1318
1319if test -n "$cf_cv_abi_version" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001320 case $cf_cv_abi_version in
1321 ([0-9]*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301322 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001323 (*)
1324 { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301325echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326 { (exit 1); exit 1; }; }
1327 ;;
1328 esac
1329else
Steve Kondikae271bc2015-11-15 02:50:53 +01001330 { { echo "$as_me:1330: error: ABI version value is empty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301331echo "$as_me: error: ABI version value is empty" >&2;}
1332 { (exit 1); exit 1; }; }
1333fi
1334
Steve Kondikae271bc2015-11-15 02:50:53 +01001335if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336then
1337 case $cf_cv_rel_version in
1338 (5.*)
1339 cf_cv_rel_version=$with_abi_version.0
1340 ;;
1341 esac
1342fi
1343
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301344ac_aux_dir=
1345for 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
1358 fi
1359done
1360if test -z "$ac_aux_dir"; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001361 { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301362echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363 { (exit 1); exit 1; }; }
1364fi
1365ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1368
1369# Make sure we can run config.sub.
1370$ac_config_sub sun4 >/dev/null 2>&1 ||
Steve Kondikae271bc2015-11-15 02:50:53 +01001371 { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301372echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373 { (exit 1); exit 1; }; }
1374
Steve Kondikae271bc2015-11-15 02:50:53 +01001375echo "$as_me:1375: checking build system type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301376echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377if test "${ac_cv_build+set}" = set; then
1378 echo $ECHO_N "(cached) $ECHO_C" >&6
1379else
1380 ac_cv_build_alias=$build_alias
1381test -z "$ac_cv_build_alias" &&
1382 ac_cv_build_alias=`$ac_config_guess`
1383test -z "$ac_cv_build_alias" &&
Steve Kondikae271bc2015-11-15 02:50:53 +01001384 { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301385echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386 { (exit 1); exit 1; }; }
1387ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
Steve Kondikae271bc2015-11-15 02:50:53 +01001388 { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301389echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390 { (exit 1); exit 1; }; }
1391
1392fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001393echo "$as_me:1393: result: $ac_cv_build" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301394echo "${ECHO_T}$ac_cv_build" >&6
1395build=$ac_cv_build
1396build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
Steve Kondikae271bc2015-11-15 02:50:53 +01001400echo "$as_me:1400: checking host system type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301401echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402if test "${ac_cv_host+set}" = set; then
1403 echo $ECHO_N "(cached) $ECHO_C" >&6
1404else
1405 ac_cv_host_alias=$host_alias
1406test -z "$ac_cv_host_alias" &&
1407 ac_cv_host_alias=$ac_cv_build_alias
1408ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
Steve Kondikae271bc2015-11-15 02:50:53 +01001409 { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301410echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411 { (exit 1); exit 1; }; }
1412
1413fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001414echo "$as_me:1414: result: $ac_cv_host" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301415echo "${ECHO_T}$ac_cv_host" >&6
1416host=$ac_cv_host
1417host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001422 echo "$as_me:1422: checking target system type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301423echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424if test "${ac_cv_target+set}" = set; then
1425 echo $ECHO_N "(cached) $ECHO_C" >&6
1426else
1427 ac_cv_target_alias=$target_alias
1428test "x$ac_cv_target_alias" = "x" &&
1429 ac_cv_target_alias=$ac_cv_host_alias
1430ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
Steve Kondikae271bc2015-11-15 02:50:53 +01001431 { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301432echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433 { (exit 1); exit 1; }; }
1434
1435fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001436echo "$as_me:1436: result: $ac_cv_target" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301437echo "${ECHO_T}$ac_cv_target" >&6
1438target=$ac_cv_target
1439target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443# The aliases save the names the user supplied, while $host etc.
1444# will get canonicalized.
1445test -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"
1450else
1451 system_name="`(uname -s -r) 2>/dev/null`"
1452 if test -z "$system_name" ; then
1453 system_name="`(hostname) 2>/dev/null`"
1454 fi
1455fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001456test -n "$system_name" &&
1457cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301458#define SYSTEM_NAME "$system_name"
1459EOF
1460
1461if test "${cf_cv_system_name+set}" = set; then
1462 echo $ECHO_N "(cached) $ECHO_C" >&6
1463else
1464 cf_cv_system_name="$system_name"
1465fi
1466
1467test -z "$system_name" && system_name="$cf_cv_system_name"
Steve Kondikae271bc2015-11-15 02:50:53 +01001468test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301469echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1470
1471if test ".$system_name" != ".$cf_cv_system_name" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001472 echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301473echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01001474 { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301475echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476 { (exit 1); exit 1; }; }
1477fi
1478
1479# Check whether --with-system-type or --without-system-type was given.
1480if test "${with_system_type+set}" = set; then
1481 withval="$with_system_type"
Steve Kondikae271bc2015-11-15 02:50:53 +01001482 { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301483echo "$as_me: WARNING: overriding system type to $withval" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01001484 cf_cv_system_name=$withval
1485 host_os=$withval
1486
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301487fi;
1488
1489### Save the given $CFLAGS to allow user-override.
1490cf_user_CFLAGS="$CFLAGS"
1491
1492### Default install-location
1493
Steve Kondikae271bc2015-11-15 02:50:53 +01001494echo "$as_me:1494: checking for prefix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301495echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496if test "x$prefix" = "xNONE" ; then
1497 case "$cf_cv_system_name" in
1498 # non-vendor systems don't have a conflict
Steve Kondikae271bc2015-11-15 02:50:53 +01001499 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301500 prefix=/usr
1501 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001502 (*) prefix=$ac_default_prefix
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301503 ;;
1504 esac
1505fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001506echo "$as_me:1506: result: $prefix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301507echo "${ECHO_T}$prefix" >&6
1508
1509if test "x$prefix" = "xNONE" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001510echo "$as_me:1510: checking for default include-directory" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301511echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512test -n "$verbose" && echo 1>&6
1513for 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
1522do
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
1529 fi
1530 fi
1531 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1532done
Steve Kondikae271bc2015-11-15 02:50:53 +01001533echo "$as_me:1533: result: $includedir" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301534echo "${ECHO_T}$includedir" >&6
1535fi
1536
Steve Kondikae271bc2015-11-15 02:50:53 +01001537### Defaults for ncurses ABI
1538
1539case 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
1552 ;;
1553(*)
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
1565 ;;
1566esac
1567
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301568### Checks for programs.
Steve Kondikae271bc2015-11-15 02:50:53 +01001569
1570# Check whether --with-ada or --without-ada was given.
1571if test "${with_ada+set}" = set; then
1572 withval="$with_ada"
1573 cf_with_ada=$withval
1574else
1575 cf_with_ada=yes
1576fi;
1577if test "x$cf_with_ada" = xyes
1578then
1579 cf_PROG_CC="gnatgcc gcc cc"
1580else
1581 cf_PROG_CC="gcc cc"
1582fi
1583
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301584ac_ext=c
1585ac_cpp='$CPP $CPPFLAGS'
1586ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589ac_main_return=return
1590if test -n "$ac_tool_prefix"; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001591 for ac_prog in $cf_PROG_CC
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301592 do
1593 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Steve Kondikae271bc2015-11-15 02:50:53 +01001595echo "$as_me:1595: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301596echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597if test "${ac_cv_prog_CC+set}" = set; then
1598 echo $ECHO_N "(cached) $ECHO_C" >&6
1599else
1600 if test -n "$CC"; then
1601 ac_cv_prog_CC="$CC" # Let the user override the test.
1602else
1603 ac_save_IFS=$IFS; IFS=$ac_path_separator
1604ac_dummy="$PATH"
1605for 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
1609ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Steve Kondikae271bc2015-11-15 02:50:53 +01001610echo "$as_me:1610: found $ac_dir/$ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301611break
1612done
1613
1614fi
1615fi
1616CC=$ac_cv_prog_CC
1617if test -n "$CC"; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001618 echo "$as_me:1618: result: $CC" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301619echo "${ECHO_T}$CC" >&6
1620else
Steve Kondikae271bc2015-11-15 02:50:53 +01001621 echo "$as_me:1621: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301622echo "${ECHO_T}no" >&6
1623fi
1624
1625 test -n "$CC" && break
1626 done
1627fi
1628if test -z "$CC"; then
1629 ac_ct_CC=$CC
Steve Kondikae271bc2015-11-15 02:50:53 +01001630 for ac_prog in $cf_PROG_CC
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301631do
1632 # Extract the first word of "$ac_prog", so it can be a program name with args.
1633set dummy $ac_prog; ac_word=$2
Steve Kondikae271bc2015-11-15 02:50:53 +01001634echo "$as_me:1634: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301635echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637 echo $ECHO_N "(cached) $ECHO_C" >&6
1638else
1639 if test -n "$ac_ct_CC"; then
1640 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641else
1642 ac_save_IFS=$IFS; IFS=$ac_path_separator
1643ac_dummy="$PATH"
1644for 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
1648ac_cv_prog_ac_ct_CC="$ac_prog"
Steve Kondikae271bc2015-11-15 02:50:53 +01001649echo "$as_me:1649: found $ac_dir/$ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301650break
1651done
1652
1653fi
1654fi
1655ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656if test -n "$ac_ct_CC"; then
Steve Kondikae271bc2015-11-15 02:50:53 +01001657 echo "$as_me:1657: result: $ac_ct_CC" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301658echo "${ECHO_T}$ac_ct_CC" >&6
1659else
Steve Kondikae271bc2015-11-15 02:50:53 +01001660 echo "$as_me:1660: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301661echo "${ECHO_T}no" >&6
1662fi
1663
1664 test -n "$ac_ct_CC" && break
1665done
1666
1667 CC=$ac_ct_CC
1668fi
1669
Steve Kondikae271bc2015-11-15 02:50:53 +01001670test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301671echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672 { (exit 1); exit 1; }; }
1673
1674# Provide some information about the compiler.
Steve Kondikae271bc2015-11-15 02:50:53 +01001675echo "$as_me:1675:" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301676 "checking for C compiler version" >&5
1677ac_compiler=`set X $ac_compile; echo $2`
Steve Kondikae271bc2015-11-15 02:50:53 +01001678{ (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301679 (eval $ac_compiler --version </dev/null >&5) 2>&5
1680 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001681 echo "$as_me:1681: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301682 (exit $ac_status); }
Steve Kondikae271bc2015-11-15 02:50:53 +01001683{ (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301684 (eval $ac_compiler -v </dev/null >&5) 2>&5
1685 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001686 echo "$as_me:1686: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301687 (exit $ac_status); }
Steve Kondikae271bc2015-11-15 02:50:53 +01001688{ (eval echo "$as_me:1688: \"$ac_compiler -V </dev/null >&5\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301689 (eval $ac_compiler -V </dev/null >&5) 2>&5
1690 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001691 echo "$as_me:1691: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301692 (exit $ac_status); }
1693
1694cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +01001695#line 1695 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301696#include "confdefs.h"
1697
1698int
1699main ()
1700{
1701
1702 ;
1703 return 0;
1704}
1705_ACEOF
1706ac_clean_files_save=$ac_clean_files
1707ac_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.
Steve Kondikae271bc2015-11-15 02:50:53 +01001711echo "$as_me:1711: checking for C compiler default output" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301712echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +01001714if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301715 (eval $ac_link_default) 2>&5
1716 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001717 echo "$as_me:1717: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301718 (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.
1722for 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
Steve Kondikae271bc2015-11-15 02:50:53 +01001726 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301727 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
1736done
1737else
1738 echo "$as_me: failed program was:" >&5
1739cat conftest.$ac_ext >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001740{ { echo "$as_me:1740: error: C compiler cannot create executables" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301741echo "$as_me: error: C compiler cannot create executables" >&2;}
1742 { (exit 77); exit 77; }; }
1743fi
1744
1745ac_exeext=$ac_cv_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +01001746echo "$as_me:1746: result: $ac_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301747echo "${ECHO_T}$ac_file" >&6
1748
1749# Check the compiler produces executables we can run. If not, either
1750# the compiler is broken, or we cross compile.
Steve Kondikae271bc2015-11-15 02:50:53 +01001751echo "$as_me:1751: checking whether the C compiler works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301752echo $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.
1755if test "$cross_compiling" != yes; then
1756 if { ac_try='./$ac_file'
Steve Kondikae271bc2015-11-15 02:50:53 +01001757 { (eval echo "$as_me:1757: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301758 (eval $ac_try) 2>&5
1759 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001760 echo "$as_me:1760: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301761 (exit $ac_status); }; }; then
1762 cross_compiling=no
1763 else
1764 if test "$cross_compiling" = maybe; then
1765 cross_compiling=yes
1766 else
Steve Kondikae271bc2015-11-15 02:50:53 +01001767 { { echo "$as_me:1767: error: cannot run C compiled programs.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301768If you meant to cross compile, use \`--host'." >&5
1769echo "$as_me: error: cannot run C compiled programs.
1770If you meant to cross compile, use \`--host'." >&2;}
1771 { (exit 1); exit 1; }; }
1772 fi
1773 fi
1774fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001775echo "$as_me:1775: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301776echo "${ECHO_T}yes" >&6
1777
1778rm -f a.out a.exe conftest$ac_cv_exeext
1779ac_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.
Steve Kondikae271bc2015-11-15 02:50:53 +01001782echo "$as_me:1782: checking whether we are cross compiling" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301783echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01001784echo "$as_me:1784: result: $cross_compiling" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301785echo "${ECHO_T}$cross_compiling" >&6
1786
Steve Kondikae271bc2015-11-15 02:50:53 +01001787echo "$as_me:1787: checking for executable suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301788echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01001789if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301790 (eval $ac_link) 2>&5
1791 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001792 echo "$as_me:1792: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301793 (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'.
1798for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799 case $ac_file in
Steve Kondikae271bc2015-11-15 02:50:53 +01001800 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301801 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802 export ac_cv_exeext
1803 break;;
1804 * ) break;;
1805 esac
1806done
1807else
Steve Kondikae271bc2015-11-15 02:50:53 +01001808 { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301809echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810 { (exit 1); exit 1; }; }
1811fi
1812
1813rm -f conftest$ac_cv_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +01001814echo "$as_me:1814: result: $ac_cv_exeext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301815echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817rm -f conftest.$ac_ext
1818EXEEXT=$ac_cv_exeext
1819ac_exeext=$EXEEXT
Steve Kondikae271bc2015-11-15 02:50:53 +01001820echo "$as_me:1820: checking for object suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301821echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822if test "${ac_cv_objext+set}" = set; then
1823 echo $ECHO_N "(cached) $ECHO_C" >&6
1824else
1825 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +01001826#line 1826 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301827#include "confdefs.h"
1828
1829int
1830main ()
1831{
1832
1833 ;
1834 return 0;
1835}
1836_ACEOF
1837rm -f conftest.o conftest.obj
Steve Kondikae271bc2015-11-15 02:50:53 +01001838if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301839 (eval $ac_compile) 2>&5
1840 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001841 echo "$as_me:1841: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301842 (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
Steve Kondikae271bc2015-11-15 02:50:53 +01001845 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301846 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847 break;;
1848 esac
1849done
1850else
1851 echo "$as_me: failed program was:" >&5
1852cat conftest.$ac_ext >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001853{ { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301854echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855 { (exit 1); exit 1; }; }
1856fi
1857
1858rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001860echo "$as_me:1860: result: $ac_cv_objext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301861echo "${ECHO_T}$ac_cv_objext" >&6
1862OBJEXT=$ac_cv_objext
1863ac_objext=$OBJEXT
Steve Kondikae271bc2015-11-15 02:50:53 +01001864echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301865echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867 echo $ECHO_N "(cached) $ECHO_C" >&6
1868else
1869 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +01001870#line 1870 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301871#include "confdefs.h"
1872
1873int
1874main ()
1875{
1876#ifndef __GNUC__
1877 choke me
1878#endif
1879
1880 ;
1881 return 0;
1882}
1883_ACEOF
1884rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +01001885if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301886 (eval $ac_compile) 2>&5
1887 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001888 echo "$as_me:1888: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301889 (exit $ac_status); } &&
1890 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +01001891 { (eval echo "$as_me:1891: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301892 (eval $ac_try) 2>&5
1893 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001894 echo "$as_me:1894: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301895 (exit $ac_status); }; }; then
1896 ac_compiler_gnu=yes
1897else
1898 echo "$as_me: failed program was:" >&5
1899cat conftest.$ac_ext >&5
1900ac_compiler_gnu=no
1901fi
1902rm -f conftest.$ac_objext conftest.$ac_ext
1903ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001906echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301907echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908GCC=`test $ac_compiler_gnu = yes && echo yes`
1909ac_test_CFLAGS=${CFLAGS+set}
1910ac_save_CFLAGS=$CFLAGS
1911CFLAGS="-g"
Steve Kondikae271bc2015-11-15 02:50:53 +01001912echo "$as_me:1912: checking whether $CC accepts -g" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301913echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914if test "${ac_cv_prog_cc_g+set}" = set; then
1915 echo $ECHO_N "(cached) $ECHO_C" >&6
1916else
1917 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +01001918#line 1918 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301919#include "confdefs.h"
1920
1921int
1922main ()
1923{
1924
1925 ;
1926 return 0;
1927}
1928_ACEOF
1929rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +01001930if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301931 (eval $ac_compile) 2>&5
1932 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001933 echo "$as_me:1933: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301934 (exit $ac_status); } &&
1935 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +01001936 { (eval echo "$as_me:1936: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301937 (eval $ac_try) 2>&5
1938 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001939 echo "$as_me:1939: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301940 (exit $ac_status); }; }; then
1941 ac_cv_prog_cc_g=yes
1942else
1943 echo "$as_me: failed program was:" >&5
1944cat conftest.$ac_ext >&5
1945ac_cv_prog_cc_g=no
1946fi
1947rm -f conftest.$ac_objext conftest.$ac_ext
1948fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001949echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301950echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951if test "$ac_test_CFLAGS" = set; then
1952 CFLAGS=$ac_save_CFLAGS
1953elif test $ac_cv_prog_cc_g = yes; then
1954 if test "$GCC" = yes; then
1955 CFLAGS="-g -O2"
1956 else
1957 CFLAGS="-g"
1958 fi
1959else
1960 if test "$GCC" = yes; then
1961 CFLAGS="-O2"
1962 else
1963 CFLAGS=
1964 fi
1965fi
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.
1970cat >conftest.$ac_ext <<_ACEOF
1971#ifndef __cplusplus
1972 choke me
1973#endif
1974_ACEOF
1975rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +01001976if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301977 (eval $ac_compile) 2>&5
1978 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001979 echo "$as_me:1979: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301980 (exit $ac_status); } &&
1981 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +01001982 { (eval echo "$as_me:1982: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301983 (eval $ac_try) 2>&5
1984 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01001985 echo "$as_me:1985: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301986 (exit $ac_status); }; }; then
1987 for ac_declaration in \
1988 ''\
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);'
1995do
1996 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +01001997#line 1997 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301998#include "confdefs.h"
1999#include <stdlib.h>
2000$ac_declaration
2001int
2002main ()
2003{
2004exit (42);
2005 ;
2006 return 0;
2007}
2008_ACEOF
2009rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +01002010if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302011 (eval $ac_compile) 2>&5
2012 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01002013 echo "$as_me:2013: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302014 (exit $ac_status); } &&
2015 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +01002016 { (eval echo "$as_me:2016: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302017 (eval $ac_try) 2>&5
2018 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01002019 echo "$as_me:2019: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302020 (exit $ac_status); }; }; then
2021 :
2022else
2023 echo "$as_me: failed program was:" >&5
2024cat conftest.$ac_ext >&5
2025continue
2026fi
2027rm -f conftest.$ac_objext conftest.$ac_ext
2028 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +01002029#line 2029 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302030#include "confdefs.h"
2031$ac_declaration
2032int
2033main ()
2034{
2035exit (42);
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +01002041if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302042 (eval $ac_compile) 2>&5
2043 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01002044 echo "$as_me:2044: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302045 (exit $ac_status); } &&
2046 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +01002047 { (eval echo "$as_me:2047: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302048 (eval $ac_try) 2>&5
2049 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01002050 echo "$as_me:2050: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302051 (exit $ac_status); }; }; then
2052 break
2053else
2054 echo "$as_me: failed program was:" >&5
2055cat conftest.$ac_ext >&5
2056fi
2057rm -f conftest.$ac_objext conftest.$ac_ext
2058done
Steve Kondikae271bc2015-11-15 02:50:53 +01002059rm -rf conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302060if test -n "$ac_declaration"; then
2061 echo '#ifdef __cplusplus' >>confdefs.h
2062 echo $ac_declaration >>confdefs.h
2063 echo '#endif' >>confdefs.h
2064fi
2065
2066else
2067 echo "$as_me: failed program was:" >&5
2068cat conftest.$ac_ext >&5
2069fi
2070rm -f conftest.$ac_objext conftest.$ac_ext
2071ac_ext=c
2072ac_cpp='$CPP $CPPFLAGS'
2073ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076ac_main_return=return
2077
2078GCC_VERSION=none
2079if test "$GCC" = yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01002080 echo "$as_me:2080: checking version of $CC" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302081echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01002082 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.].*//'`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302083 test -z "$GCC_VERSION" && GCC_VERSION=unknown
Steve Kondikae271bc2015-11-15 02:50:53 +01002084 echo "$as_me:2084: result: $GCC_VERSION" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302085echo "${ECHO_T}$GCC_VERSION" >&6
2086fi
2087
Steve Kondikae271bc2015-11-15 02:50:53 +01002088echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302089echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091 echo $ECHO_N "(cached) $ECHO_C" >&6
2092else
2093 ac_cv_prog_cc_stdc=no
2094ac_save_CC=$CC
2095cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +01002096#line 2096 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302097#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. */
2103struct buf { int x; };
2104FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105static char *e (p, i)
2106 char **p;
2107 int i;
2108{
2109 return p[i];
2110}
2111static char *f (char * (*g) (char **, int), char **p, ...)
2112{
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;
2119}
2120int test (int i, double x);
2121struct s1 {int (*f) (int a);};
2122struct s2 {int (*f) (double a);};
2123int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124int argc;
2125char **argv;
2126int
2127main ()
2128{
2129return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2130 ;
2131 return 0;
2132}
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__
2141for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2142do
2143 CC="$ac_save_CC $ac_arg"
2144 rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +01002145if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302146 (eval $ac_compile) 2>&5
2147 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01002148 echo "$as_me:2148: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302149 (exit $ac_status); } &&
2150 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +01002151 { (eval echo "$as_me:2151: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302152 (eval $ac_try) 2>&5
2153 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +01002154 echo "$as_me:2154: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302155 (exit $ac_status); }; }; then
2156 ac_cv_prog_cc_stdc=$ac_arg
2157break
2158else
2159 echo "$as_me: failed program was:" >&5
2160cat conftest.$ac_ext >&5
2161fi
2162rm -f conftest.$ac_objext
2163done
2164rm -f conftest.$ac_ext conftest.$ac_objext
2165CC=$ac_save_CC
2166
2167fi
2168
2169case "x$ac_cv_prog_cc_stdc" in
2170 x|xno)
Steve Kondikae271bc2015-11-15 02:50:53 +01002171 echo "$as_me:2171: result: none needed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302172echo "${ECHO_T}none needed" >&6 ;;
2173 *)
Steve Kondikae271bc2015-11-15 02:50:53 +01002174 echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302175echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176 CC="$CC $ac_cv_prog_cc_stdc" ;;
2177esac
2178
Steve Kondikae271bc2015-11-15 02:50:53 +01002179# This should have been defined by AC_PROG_CC
2180: ${CC:=cc}
2181
2182echo "$as_me:2182: checking \$CC variable" >&5
2183echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184case "$CC" in
2185(*[\ \ ]-[IUD]*)
2186 echo "$as_me:2186: result: broken" >&5
2187echo "${ECHO_T}broken" >&6
2188 { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189echo "$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/[ ].*//'`
2193
2194cf_fix_cppflags=no
2195cf_new_cflags=
2196cf_new_cppflags=
2197cf_new_extra_cppflags=
2198
2199for cf_add_cflags in $cf_flags
2200do
2201case $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[^=]*='\''\"[^"]*//'`
2208
2209 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2210 && test -z "${cf_tst_cflags}" \
2211 && cf_fix_cppflags=yes
2212
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
2219 fi
2220 ;;
2221 esac
2222 case "$CPPFLAGS" in
2223 (*$cf_add_cflags)
2224 ;;
2225 (*)
2226 case $cf_add_cflags in
2227 (-D*)
2228 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2229
2230CPPFLAGS=`echo "$CPPFLAGS" | \
2231 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2232 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2233
2234 ;;
2235 esac
2236 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2237 ;;
2238 esac
2239 ;;
2240 (*)
2241 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2242 ;;
2243 esac
2244 ;;
2245(yes)
2246 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247
2248 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2249
2250 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2251 && test -z "${cf_tst_cflags}" \
2252 && cf_fix_cppflags=no
2253 ;;
2254esac
2255done
2256
2257if test -n "$cf_new_cflags" ; then
2258
2259 CFLAGS="$CFLAGS $cf_new_cflags"
2260fi
2261
2262if test -n "$cf_new_cppflags" ; then
2263
2264 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2265fi
2266
2267if test -n "$cf_new_extra_cppflags" ; then
2268
2269 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2270fi
2271
2272 ;;
2273(*)
2274 echo "$as_me:2274: result: ok" >&5
2275echo "${ECHO_T}ok" >&6
2276 ;;
2277esac
2278
2279ac_ext=c
2280ac_cpp='$CPP $CPPFLAGS'
2281ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284ac_main_return=return
2285echo "$as_me:2285: checking how to run the C preprocessor" >&5
2286echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2287# On Suns, sometimes $CPP names a directory.
2288if test -n "$CPP" && test -d "$CPP"; then
2289 CPP=
2290fi
2291if test -z "$CPP"; then
2292 if test "${ac_cv_prog_CPP+set}" = set; then
2293 echo $ECHO_N "(cached) $ECHO_C" >&6
2294else
2295 # Double quotes because CPP needs to be expanded
2296 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2297 do
2298 ac_preproc_ok=false
2299for ac_c_preproc_warn_flag in '' yes
2300do
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
2311if { (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=
2323 fi
2324else
2325 ac_cpp_err=yes
2326fi
2327if test -z "$ac_cpp_err"; then
2328 :
2329else
2330 echo "$as_me: failed program was:" >&5
2331 cat conftest.$ac_ext >&5
2332 # Broken: fails on valid input.
2333continue
2334fi
2335rm -f conftest.err conftest.$ac_ext
2336
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
2344if { (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=
2356 fi
2357else
2358 ac_cpp_err=yes
2359fi
2360if test -z "$ac_cpp_err"; then
2361 # Broken: success on invalid input.
2362continue
2363else
2364 echo "$as_me: failed program was:" >&5
2365 cat conftest.$ac_ext >&5
2366 # Passes both tests.
2367ac_preproc_ok=:
2368break
2369fi
2370rm -f conftest.err conftest.$ac_ext
2371
2372done
2373# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2374rm -f conftest.err conftest.$ac_ext
2375if $ac_preproc_ok; then
2376 break
2377fi
2378
2379 done
2380 ac_cv_prog_CPP=$CPP
2381
2382fi
2383 CPP=$ac_cv_prog_CPP
2384else
2385 ac_cv_prog_CPP=$CPP
2386fi
2387echo "$as_me:2387: result: $CPP" >&5
2388echo "${ECHO_T}$CPP" >&6
2389ac_preproc_ok=false
2390for ac_c_preproc_warn_flag in '' yes
2391do
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
2402if { (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=
2414 fi
2415else
2416 ac_cpp_err=yes
2417fi
2418if test -z "$ac_cpp_err"; then
2419 :
2420else
2421 echo "$as_me: failed program was:" >&5
2422 cat conftest.$ac_ext >&5
2423 # Broken: fails on valid input.
2424continue
2425fi
2426rm -f conftest.err conftest.$ac_ext
2427
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
2435if { (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=
2447 fi
2448else
2449 ac_cpp_err=yes
2450fi
2451if test -z "$ac_cpp_err"; then
2452 # Broken: success on invalid input.
2453continue
2454else
2455 echo "$as_me: failed program was:" >&5
2456 cat conftest.$ac_ext >&5
2457 # Passes both tests.
2458ac_preproc_ok=:
2459break
2460fi
2461rm -f conftest.err conftest.$ac_ext
2462
2463done
2464# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2465rm -f conftest.err conftest.$ac_ext
2466if $ac_preproc_ok; then
2467 :
2468else
2469 { { echo "$as_me:2469: error: C preprocessor \"$CPP\" fails sanity check" >&5
2470echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2471 { (exit 1); exit 1; }; }
2472fi
2473
2474ac_ext=c
2475ac_cpp='$CPP $CPPFLAGS'
2476ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2477ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2478ac_compiler_gnu=$ac_cv_c_compiler_gnu
2479ac_main_return=return
2480
2481if test $ac_cv_c_compiler_gnu = yes; then
2482 echo "$as_me:2482: checking whether $CC needs -traditional" >&5
2483echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2484if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2485 echo $ECHO_N "(cached) $ECHO_C" >&6
2486else
2487 ac_pattern="Autoconf.*'x'"
2488 cat >conftest.$ac_ext <<_ACEOF
2489#line 2489 "configure"
2490#include "confdefs.h"
2491#include <sgtty.h>
2492int Autoconf = TIOCGETP;
2493_ACEOF
2494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2495 egrep "$ac_pattern" >/dev/null 2>&1; then
2496 ac_cv_prog_gcc_traditional=yes
2497else
2498 ac_cv_prog_gcc_traditional=no
2499fi
2500rm -rf conftest*
2501
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>
2507int Autoconf = TCGETA;
2508_ACEOF
2509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2510 egrep "$ac_pattern" >/dev/null 2>&1; then
2511 ac_cv_prog_gcc_traditional=yes
2512fi
2513rm -rf conftest*
2514
2515 fi
2516fi
2517echo "$as_me:2517: result: $ac_cv_prog_gcc_traditional" >&5
2518echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2519 if test $ac_cv_prog_gcc_traditional = yes; then
2520 CC="$CC -traditional"
2521 fi
2522fi
2523
2524echo "$as_me:2524: checking whether $CC understands -c and -o together" >&5
2525echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2526if test "${cf_cv_prog_CC_c_o+set}" = set; then
2527 echo $ECHO_N "(cached) $ECHO_C" >&6
2528else
2529
2530cat > conftest.$ac_ext <<CF_EOF
2531#include <stdio.h>
2532int main()
2533{
2534 ${cf_cv_main_return:-return}(0);
2535}
2536CF_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.
2539ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2540if { (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); };
2550then
2551 eval cf_cv_prog_CC_c_o=yes
2552else
2553 eval cf_cv_prog_CC_c_o=no
2554fi
2555rm -rf conftest*
2556
2557fi
2558if test $cf_cv_prog_CC_c_o = yes; then
2559 echo "$as_me:2559: result: yes" >&5
2560echo "${ECHO_T}yes" >&6
2561else
2562 echo "$as_me:2562: result: no" >&5
2563echo "${ECHO_T}no" >&6
2564fi
2565
2566if test "$cross_compiling" = yes ; then
2567 LDCONFIG=:
2568else
2569 case "$cf_cv_system_name" in
2570 (dragonfly*|mirbsd*|freebsd*)
2571 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2572 ;;
2573 (*) LDPATH=$PATH:/sbin:/usr/sbin
2574 # Extract the first word of "ldconfig", so it can be a program name with args.
2575set dummy ldconfig; ac_word=$2
2576echo "$as_me:2576: checking for $ac_word" >&5
2577echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2578if test "${ac_cv_path_LDCONFIG+set}" = set; then
2579 echo $ECHO_N "(cached) $ECHO_C" >&6
2580else
2581 case $LDCONFIG in
2582 [\\/]* | ?:[\\/]*)
2583 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2584 ;;
2585 *)
2586 ac_save_IFS=$IFS; IFS=$ac_path_separator
2587ac_dummy="$LDPATH"
2588for 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
2595fi
2596done
2597
2598 ;;
2599esac
2600fi
2601LDCONFIG=$ac_cv_path_LDCONFIG
2602
2603if test -n "$LDCONFIG"; then
2604 echo "$as_me:2604: result: $LDCONFIG" >&5
2605echo "${ECHO_T}$LDCONFIG" >&6
2606else
2607 echo "$as_me:2607: result: no" >&5
2608echo "${ECHO_T}no" >&6
2609fi
2610
2611 ;;
2612 esac
2613fi
2614
2615echo "$as_me:2615: checking if you want to ensure bool is consistent with C++" >&5
2616echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2617
2618# Check whether --with-cxx or --without-cxx was given.
2619if test "${with_cxx+set}" = set; then
2620 withval="$with_cxx"
2621 cf_with_cxx=$withval
2622else
2623 cf_with_cxx=yes
2624fi;
2625echo "$as_me:2625: result: $cf_with_cxx" >&5
2626echo "${ECHO_T}$cf_with_cxx" >&6
2627if test "X$cf_with_cxx" = Xno ; then
2628 CXX=""
2629 GXX=""
2630else
2631 # with autoconf 2.13, we can change the error to a warning:
2632 ac_ext=cc
2633ac_cpp='$CXXCPP $CPPFLAGS'
2634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2637ac_main_return=return
2638if 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
2640 do
2641 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2643echo "$as_me:2643: checking for $ac_word" >&5
2644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2645if test "${ac_cv_prog_CXX+set}" = set; then
2646 echo $ECHO_N "(cached) $ECHO_C" >&6
2647else
2648 if test -n "$CXX"; then
2649 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2650else
2651 ac_save_IFS=$IFS; IFS=$ac_path_separator
2652ac_dummy="$PATH"
2653for 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
2657ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2658echo "$as_me:2658: found $ac_dir/$ac_word" >&5
2659break
2660done
2661
2662fi
2663fi
2664CXX=$ac_cv_prog_CXX
2665if test -n "$CXX"; then
2666 echo "$as_me:2666: result: $CXX" >&5
2667echo "${ECHO_T}$CXX" >&6
2668else
2669 echo "$as_me:2669: result: no" >&5
2670echo "${ECHO_T}no" >&6
2671fi
2672
2673 test -n "$CXX" && break
2674 done
2675fi
2676if 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
2679do
2680 # Extract the first word of "$ac_prog", so it can be a program name with args.
2681set dummy $ac_prog; ac_word=$2
2682echo "$as_me:2682: checking for $ac_word" >&5
2683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2684if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2685 echo $ECHO_N "(cached) $ECHO_C" >&6
2686else
2687 if test -n "$ac_ct_CXX"; then
2688 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2689else
2690 ac_save_IFS=$IFS; IFS=$ac_path_separator
2691ac_dummy="$PATH"
2692for 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
2696ac_cv_prog_ac_ct_CXX="$ac_prog"
2697echo "$as_me:2697: found $ac_dir/$ac_word" >&5
2698break
2699done
2700
2701fi
2702fi
2703ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2704if test -n "$ac_ct_CXX"; then
2705 echo "$as_me:2705: result: $ac_ct_CXX" >&5
2706echo "${ECHO_T}$ac_ct_CXX" >&6
2707else
2708 echo "$as_me:2708: result: no" >&5
2709echo "${ECHO_T}no" >&6
2710fi
2711
2712 test -n "$ac_ct_CXX" && break
2713done
2714test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2715
2716 CXX=$ac_ct_CXX
2717fi
2718
2719# Provide some information about the compiler.
2720echo "$as_me:2720:" \
2721 "checking for C++ compiler version" >&5
2722ac_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); }
2738
2739echo "$as_me:2739: checking whether we are using the GNU C++ compiler" >&5
2740echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2741if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2742 echo $ECHO_N "(cached) $ECHO_C" >&6
2743else
2744 cat >conftest.$ac_ext <<_ACEOF
2745#line 2745 "configure"
2746#include "confdefs.h"
2747
2748int
2749main ()
2750{
2751#ifndef __GNUC__
2752 choke me
2753#endif
2754
2755 ;
2756 return 0;
2757}
2758_ACEOF
2759rm -f conftest.$ac_objext
2760if { (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
2772else
2773 echo "$as_me: failed program was:" >&5
2774cat conftest.$ac_ext >&5
2775ac_compiler_gnu=no
2776fi
2777rm -f conftest.$ac_objext conftest.$ac_ext
2778ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2779
2780fi
2781echo "$as_me:2781: result: $ac_cv_cxx_compiler_gnu" >&5
2782echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2783GXX=`test $ac_compiler_gnu = yes && echo yes`
2784ac_test_CXXFLAGS=${CXXFLAGS+set}
2785ac_save_CXXFLAGS=$CXXFLAGS
2786CXXFLAGS="-g"
2787echo "$as_me:2787: checking whether $CXX accepts -g" >&5
2788echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2789if test "${ac_cv_prog_cxx_g+set}" = set; then
2790 echo $ECHO_N "(cached) $ECHO_C" >&6
2791else
2792 cat >conftest.$ac_ext <<_ACEOF
2793#line 2793 "configure"
2794#include "confdefs.h"
2795
2796int
2797main ()
2798{
2799
2800 ;
2801 return 0;
2802}
2803_ACEOF
2804rm -f conftest.$ac_objext
2805if { (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
2817else
2818 echo "$as_me: failed program was:" >&5
2819cat conftest.$ac_ext >&5
2820ac_cv_prog_cxx_g=no
2821fi
2822rm -f conftest.$ac_objext conftest.$ac_ext
2823fi
2824echo "$as_me:2824: result: $ac_cv_prog_cxx_g" >&5
2825echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2826if test "$ac_test_CXXFLAGS" = set; then
2827 CXXFLAGS=$ac_save_CXXFLAGS
2828elif test $ac_cv_prog_cxx_g = yes; then
2829 if test "$GXX" = yes; then
2830 CXXFLAGS="-g -O2"
2831 else
2832 CXXFLAGS="-g"
2833 fi
2834else
2835 if test "$GXX" = yes; then
2836 CXXFLAGS="-O2"
2837 else
2838 CXXFLAGS=
2839 fi
2840fi
2841for ac_declaration in \
2842 ''\
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);'
2849do
2850 cat >conftest.$ac_ext <<_ACEOF
2851#line 2851 "configure"
2852#include "confdefs.h"
2853#include <stdlib.h>
2854$ac_declaration
2855int
2856main ()
2857{
2858exit (42);
2859 ;
2860 return 0;
2861}
2862_ACEOF
2863rm -f conftest.$ac_objext
2864if { (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
2875 :
2876else
2877 echo "$as_me: failed program was:" >&5
2878cat conftest.$ac_ext >&5
2879continue
2880fi
2881rm -f conftest.$ac_objext conftest.$ac_ext
2882 cat >conftest.$ac_ext <<_ACEOF
2883#line 2883 "configure"
2884#include "confdefs.h"
2885$ac_declaration
2886int
2887main ()
2888{
2889exit (42);
2890 ;
2891 return 0;
2892}
2893_ACEOF
2894rm -f conftest.$ac_objext
2895if { (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
2907else
2908 echo "$as_me: failed program was:" >&5
2909cat conftest.$ac_ext >&5
2910fi
2911rm -f conftest.$ac_objext conftest.$ac_ext
2912done
2913rm -rf conftest*
2914if test -n "$ac_declaration"; then
2915 echo '#ifdef __cplusplus' >>confdefs.h
2916 echo $ac_declaration >>confdefs.h
2917 echo '#endif' >>confdefs.h
2918fi
2919
2920ac_ext=c
2921ac_cpp='$CPP $CPPFLAGS'
2922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2924ac_compiler_gnu=$ac_cv_c_compiler_gnu
2925ac_main_return=return
2926
2927 ac_ext=cc
2928ac_cpp='$CXXCPP $CPPFLAGS'
2929ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932ac_main_return=return
2933
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
2939echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2940
2941 save_CPPFLAGS="$CPPFLAGS"
2942 eval cf_includedir=${includedir}
2943 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2944
2945cat >conftest.$ac_ext <<_ACEOF
2946#line 2946 "configure"
2947#include "confdefs.h"
2948
2949#include <stdlib.h>
2950#include <stdio.h>
2951
2952int
2953main ()
2954{
2955
2956 printf("Hello world!\n")
2957
2958 ;
2959 return 0;
2960}
2961_ACEOF
2962rm -f conftest.$ac_objext
2963if { (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
2975else
2976 echo "$as_me: failed program was:" >&5
2977cat conftest.$ac_ext >&5
2978cf_cxx_works=no
2979fi
2980rm -f conftest.$ac_objext conftest.$ac_ext
2981 CPPFLAGS="$save_CPPFLAGS"
2982
2983 echo "$as_me:2983: result: $cf_cxx_works" >&5
2984echo "${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
2988echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2989 cf_with_cxx=no; CXX=""; GXX="";
2990 fi
2991 fi
2992 ac_ext=c
2993ac_cpp='$CPP $CPPFLAGS'
2994ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997ac_main_return=return
2998
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.
3002set dummy g++; ac_word=$2
3003echo "$as_me:3003: checking for $ac_word" >&5
3004echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005if test "${ac_cv_path_CXX+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3007else
3008 case $CXX in
3009 [\\/]* | ?:[\\/]*)
3010 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3011 ;;
3012 *)
3013 ac_save_IFS=$IFS; IFS=$ac_path_separator
3014ac_dummy="$PATH"
3015for 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
3022fi
3023done
3024
3025 ;;
3026esac
3027fi
3028CXX=$ac_cv_path_CXX
3029
3030if test -n "$CXX"; then
3031 echo "$as_me:3031: result: $CXX" >&5
3032echo "${ECHO_T}$CXX" >&6
3033else
3034 echo "$as_me:3034: result: no" >&5
3035echo "${ECHO_T}no" >&6
3036fi
3037
3038 fi
3039 case "x$CXX" in
3040 (x|xg++)
3041 { echo "$as_me:3041: WARNING: You don't have any C++ compiler, too bad" >&5
3042echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3043 cf_with_cxx=no; CXX=""; GXX="";
3044 ;;
3045 esac
3046fi
3047
3048GXX_VERSION=none
3049if test "$GXX" = yes; then
3050 echo "$as_me:3050: checking version of ${CXX:-g++}" >&5
3051echo $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
3055echo "${ECHO_T}$GXX_VERSION" >&6
3056fi
3057
3058case $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
3063echo "$as_me: WARNING: templates do not work" >&2;}
3064 ;;
3065esac
3066
3067echo "$as_me:3067: checking if you want to build C++ binding and demo" >&5
3068echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3069
3070# Check whether --with-cxx-binding or --without-cxx-binding was given.
3071if test "${with_cxx_binding+set}" = set; then
3072 withval="$with_cxx_binding"
3073 cf_with_cxx_binding=$withval
3074else
3075 cf_with_cxx_binding=$cf_with_cxx
3076fi;
3077echo "$as_me:3077: result: $cf_with_cxx_binding" >&5
3078echo "${ECHO_T}$cf_with_cxx_binding" >&6
3079
3080echo "$as_me:3080: checking if you want to build with Ada95" >&5
3081echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3082echo "$as_me:3082: result: $cf_with_ada" >&5
3083echo "${ECHO_T}$cf_with_ada" >&6
3084
3085echo "$as_me:3085: checking if you want to install terminal database" >&5
3086echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3087
3088# Check whether --enable-db-install or --disable-db-install was given.
3089if test "${enable_db_install+set}" = set; then
3090 enableval="$enable_db_install"
3091 cf_with_db_install=$enableval
3092else
3093 cf_with_db_install=yes
3094fi;
3095echo "$as_me:3095: result: $cf_with_db_install" >&5
3096echo "${ECHO_T}$cf_with_db_install" >&6
3097
3098echo "$as_me:3098: checking if you want to install manpages" >&5
3099echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3100
3101# Check whether --with-manpages or --without-manpages was given.
3102if test "${with_manpages+set}" = set; then
3103 withval="$with_manpages"
3104 cf_with_manpages=$withval
3105else
3106 cf_with_manpages=yes
3107fi;
3108echo "$as_me:3108: result: $cf_with_manpages" >&5
3109echo "${ECHO_T}$cf_with_manpages" >&6
3110
3111echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3113
3114# Check whether --with-progs or --without-progs was given.
3115if test "${with_progs+set}" = set; then
3116 withval="$with_progs"
3117 cf_with_progs=$withval
3118else
3119 cf_with_progs=yes
3120fi;
3121echo "$as_me:3121: result: $cf_with_progs" >&5
3122echo "${ECHO_T}$cf_with_progs" >&6
3123
3124echo "$as_me:3124: checking if you want to build test-programs" >&5
3125echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3126
3127# Check whether --with-tests or --without-tests was given.
3128if test "${with_tests+set}" = set; then
3129 withval="$with_tests"
3130 cf_with_tests=$withval
3131else
3132 cf_with_tests=yes
3133fi;
3134echo "$as_me:3134: result: $cf_with_tests" >&5
3135echo "${ECHO_T}$cf_with_tests" >&6
3136
3137echo "$as_me:3137: checking if you wish to install curses.h" >&5
3138echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3139
3140# Check whether --with-curses-h or --without-curses-h was given.
3141if test "${with_curses_h+set}" = set; then
3142 withval="$with_curses_h"
3143 with_curses_h=$withval
3144else
3145 with_curses_h=yes
3146fi;
3147echo "$as_me:3147: result: $with_curses_h" >&5
3148echo "${ECHO_T}$with_curses_h" >&6
3149
3150modules_to_build="ncurses"
3151if test "X$cf_with_progs" != Xno ; then
3152modules_to_build="$modules_to_build progs tack"
3153fi
3154modules_to_build="$modules_to_build panel menu form"
3155
3156test "$program_prefix" != NONE &&
3157 program_transform_name="s,^,$program_prefix,;$program_transform_name"
3158# Use a double $ so make ignores it.
3159test "$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.
3163cat <<\_ACEOF >conftest.sed
3164s/[\\$]/&&/g;s/;s,x,x,$//
3165_ACEOF
3166program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3167rm conftest.sed
3168
3169for ac_prog in mawk gawk nawk awk
3170do
3171 # Extract the first word of "$ac_prog", so it can be a program name with args.
3172set dummy $ac_prog; ac_word=$2
3173echo "$as_me:3173: checking for $ac_word" >&5
3174echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3175if test "${ac_cv_prog_AWK+set}" = set; then
3176 echo $ECHO_N "(cached) $ECHO_C" >&6
3177else
3178 if test -n "$AWK"; then
3179 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3180else
3181 ac_save_IFS=$IFS; IFS=$ac_path_separator
3182ac_dummy="$PATH"
3183for 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
3187ac_cv_prog_AWK="$ac_prog"
3188echo "$as_me:3188: found $ac_dir/$ac_word" >&5
3189break
3190done
3191
3192fi
3193fi
3194AWK=$ac_cv_prog_AWK
3195if test -n "$AWK"; then
3196 echo "$as_me:3196: result: $AWK" >&5
3197echo "${ECHO_T}$AWK" >&6
3198else
3199 echo "$as_me:3199: result: no" >&5
3200echo "${ECHO_T}no" >&6
3201fi
3202
3203 test -n "$AWK" && break
3204done
3205
3206test -z "$AWK" && { { echo "$as_me:3206: error: No awk program found" >&5
3207echo "$as_me: error: No awk program found" >&2;}
3208 { (exit 1); exit 1; }; }
3209
3210echo "$as_me:3210: checking for egrep" >&5
3211echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3212if test "${ac_cv_prog_egrep+set}" = set; then
3213 echo $ECHO_N "(cached) $ECHO_C" >&6
3214else
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'
3218 fi
3219fi
3220echo "$as_me:3220: result: $ac_cv_prog_egrep" >&5
3221echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3222 EGREP=$ac_cv_prog_egrep
3223
3224 test -z "$EGREP" && { { echo "$as_me:3224: error: No egrep program found" >&5
3225echo "$as_me: error: No egrep program found" >&2;}
3226 { (exit 1); exit 1; }; }
3227
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.
3240echo "$as_me:3240: checking for a BSD compatible install" >&5
3241echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3242if test -z "$INSTALL"; then
3243if test "${ac_cv_path_install+set}" = set; then
3244 echo $ECHO_N "(cached) $ECHO_C" >&6
3245else
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/* ) ;;
3254 *)
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.
3263 :
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.
3267 :
3268 else
3269 ac_cv_path_install="$ac_dir/$ac_prog -c"
3270 break 2
3271 fi
3272 fi
3273 done
3274 ;;
3275 esac
3276 done
3277
3278fi
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
3287 fi
3288fi
3289echo "$as_me:3289: result: $INSTALL" >&5
3290echo "${ECHO_T}$INSTALL" >&6
3291
3292# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3293# It thinks the first close brace ends the variable substitution.
3294test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3295
3296test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3297
3298test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3299
3300case $INSTALL in
3301(/*)
3302 ;;
3303(*)
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%^.*/%%'`
3307 ;;
3308esac
3309
3310for ac_prog in tdlint lint alint splint lclint
3311do
3312 # Extract the first word of "$ac_prog", so it can be a program name with args.
3313set dummy $ac_prog; ac_word=$2
3314echo "$as_me:3314: checking for $ac_word" >&5
3315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316if test "${ac_cv_prog_LINT+set}" = set; then
3317 echo $ECHO_N "(cached) $ECHO_C" >&6
3318else
3319 if test -n "$LINT"; then
3320 ac_cv_prog_LINT="$LINT" # Let the user override the test.
3321else
3322 ac_save_IFS=$IFS; IFS=$ac_path_separator
3323ac_dummy="$PATH"
3324for 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
3328ac_cv_prog_LINT="$ac_prog"
3329echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3330break
3331done
3332
3333fi
3334fi
3335LINT=$ac_cv_prog_LINT
3336if test -n "$LINT"; then
3337 echo "$as_me:3337: result: $LINT" >&5
3338echo "${ECHO_T}$LINT" >&6
3339else
3340 echo "$as_me:3340: result: no" >&5
3341echo "${ECHO_T}no" >&6
3342fi
3343
3344 test -n "$LINT" && break
3345done
3346
3347echo "$as_me:3347: checking whether ln -s works" >&5
3348echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3349LN_S=$as_ln_s
3350if test "$LN_S" = "ln -s"; then
3351 echo "$as_me:3351: result: yes" >&5
3352echo "${ECHO_T}yes" >&6
3353else
3354 echo "$as_me:3354: result: no, using $LN_S" >&5
3355echo "${ECHO_T}no, using $LN_S" >&6
3356fi
3357
3358echo "$as_me:3358: checking if $LN_S -f options work" >&5
3359echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3360
3361rm -f conf$$.src conf$$dst
3362echo >conf$$.dst
3363echo first >conf$$.src
3364if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3365 cf_prog_ln_sf=yes
3366else
3367 cf_prog_ln_sf=no
3368fi
3369rm -f conf$$.dst conf$$src
3370echo "$as_me:3370: result: $cf_prog_ln_sf" >&5
3371echo "${ECHO_T}$cf_prog_ln_sf" >&6
3372
3373test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3374
3375echo "$as_me:3375: checking for long file names" >&5
3376echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3377if test "${ac_cv_sys_long_file_names+set}" = set; then
3378 echo $ECHO_N "(cached) $ECHO_C" >&6
3379else
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
3391if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3392 ac_tmpdirs=$TMPDIR
3393else
3394 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3395fi
3396for 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
3410 fi
3411 rm -rf $ac_xdir 2>/dev/null
3412done
3413fi
3414echo "$as_me:3414: result: $ac_cv_sys_long_file_names" >&5
3415echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3416if test $ac_cv_sys_long_file_names = yes; then
3417
3418cat >>confdefs.h <<\EOF
3419#define HAVE_LONG_FILE_NAMES 1
3420EOF
3421
3422fi
3423
3424# if we find pkg-config, check if we should install the ".pc" files.
3425
3426echo "$as_me:3426: checking if you want to use pkg-config" >&5
3427echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3428
3429# Check whether --with-pkg-config or --without-pkg-config was given.
3430if test "${with_pkg_config+set}" = set; then
3431 withval="$with_pkg_config"
3432 cf_pkg_config=$withval
3433else
3434 cf_pkg_config=yes
3435fi;
3436echo "$as_me:3436: result: $cf_pkg_config" >&5
3437echo "${ECHO_T}$cf_pkg_config" >&6
3438
3439case $cf_pkg_config in
3440(no)
3441 PKG_CONFIG=none
3442 ;;
3443(yes)
3444
3445if 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.
3447set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3448echo "$as_me:3448: checking for $ac_word" >&5
3449echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3451 echo $ECHO_N "(cached) $ECHO_C" >&6
3452else
3453 case $PKG_CONFIG in
3454 [\\/]* | ?:[\\/]*)
3455 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3456 ;;
3457 *)
3458 ac_save_IFS=$IFS; IFS=$ac_path_separator
3459ac_dummy="$PATH"
3460for 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
3467fi
3468done
3469
3470 ;;
3471esac
3472fi
3473PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3474
3475if test -n "$PKG_CONFIG"; then
3476 echo "$as_me:3476: result: $PKG_CONFIG" >&5
3477echo "${ECHO_T}$PKG_CONFIG" >&6
3478else
3479 echo "$as_me:3479: result: no" >&5
3480echo "${ECHO_T}no" >&6
3481fi
3482
3483fi
3484if 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.
3487set dummy pkg-config; ac_word=$2
3488echo "$as_me:3488: checking for $ac_word" >&5
3489echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3491 echo $ECHO_N "(cached) $ECHO_C" >&6
3492else
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.
3496 ;;
3497 *)
3498 ac_save_IFS=$IFS; IFS=$ac_path_separator
3499ac_dummy="$PATH"
3500for 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
3507fi
3508done
3509
3510 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3511 ;;
3512esac
3513fi
3514ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3515
3516if test -n "$ac_pt_PKG_CONFIG"; then
3517 echo "$as_me:3517: result: $ac_pt_PKG_CONFIG" >&5
3518echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3519else
3520 echo "$as_me:3520: result: no" >&5
3521echo "${ECHO_T}no" >&6
3522fi
3523
3524 PKG_CONFIG=$ac_pt_PKG_CONFIG
3525else
3526 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3527fi
3528
3529 ;;
3530(*)
3531 PKG_CONFIG=$withval
3532 ;;
3533esac
3534
3535test -z "$PKG_CONFIG" && PKG_CONFIG=none
3536if test "$PKG_CONFIG" != none ; then
3537
3538if test "x$prefix" != xNONE; then
3539 cf_path_syntax="$prefix"
3540else
3541 cf_path_syntax="$ac_default_prefix"
3542fi
3543
3544case ".$PKG_CONFIG" in
3545(.\$\(*\)*|.\'*\'*)
3546 ;;
3547(..|./*|.\\*)
3548 ;;
3549(.[a-zA-Z]:[\\/]*) # OS/2 EMX
3550 ;;
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%`
3556 ;;
3557 esac
3558 ;;
3559(.no|.NONE/*)
3560 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3561 ;;
3562(*)
3563 { { echo "$as_me:3563: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3564echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3565 { (exit 1); exit 1; }; }
3566 ;;
3567esac
3568
3569elif test "x$cf_pkg_config" != xno ; then
3570 { echo "$as_me:3570: WARNING: pkg-config is not installed" >&5
3571echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3572fi
3573
3574if test "x$PKG_CONFIG" = xnone ; then
3575 PKG_CONFIG_LIBDIR=no
3576else
3577 echo "$as_me:3577: checking for $PKG_CONFIG library directory" >&5
3578echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3579
3580# Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3581if test "${with_pkg_config_libdir+set}" = set; then
3582 withval="$with_pkg_config_libdir"
3583 PKG_CONFIG_LIBDIR=$withval
3584else
3585 PKG_CONFIG_LIBDIR=yes
3586fi;
3587fi
3588
3589case x$PKG_CONFIG_LIBDIR in
3590(x/*)
3591 ;;
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,/[^/]*/[^/]*$,,'`
3599 fi
3600
3601 # If you don't like using the default architecture, you have to specify the
3602 # intended library directory and corresponding compiler/linker options.
3603 #
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"
3616 ;;
3617 (*)
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"
3624 ;;
3625 esac
3626
3627 test -n "$verbose" && echo " list..." 1>&6
3628
3629echo "${as_me:-configure}:3629: testing list... ..." 1>&5
3630
3631 for cf_config in $cf_search_path
3632 do
3633 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3634
3635echo "${as_me:-configure}:3635: testing checking $cf_config/pkgconfig ..." 1>&5
3636
3637 if test -d $cf_config/pkgconfig
3638 then
3639 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3640 echo "$as_me:3640: checking done" >&5
3641echo $ECHO_N "checking done... $ECHO_C" >&6
3642 break
3643 fi
3644 done
3645 ;;
3646(*)
3647 ;;
3648esac
3649
3650if test "x$PKG_CONFIG" != xnone ; then
3651 echo "$as_me:3651: result: $PKG_CONFIG_LIBDIR" >&5
3652echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3653fi
3654
3655if test "x$PKG_CONFIG" != xnone
3656then
3657 echo "$as_me:3657: checking if we should install .pc files for $PKG_CONFIG" >&5
3658echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3659else
3660 echo "$as_me:3660: checking if we should install .pc files" >&5
3661echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3662fi
3663
3664# Check whether --enable-pc-files or --disable-pc-files was given.
3665if test "${enable_pc_files+set}" = set; then
3666 enableval="$enable_pc_files"
3667 enable_pc_files=$enableval
3668else
3669 enable_pc_files=no
3670fi;
3671echo "$as_me:3671: result: $enable_pc_files" >&5
3672echo "${ECHO_T}$enable_pc_files" >&6
3673
3674if test "x$enable_pc_files" != xno
3675then
3676 case "x$PKG_CONFIG_LIBDIR" in
3677 (xno|xyes)
3678 { echo "$as_me:3678: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3679echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3680 MAKE_PC_FILES="#"
3681 ;;
3682 (*)
3683
3684if test "x$prefix" != xNONE; then
3685 cf_path_syntax="$prefix"
3686else
3687 cf_path_syntax="$ac_default_prefix"
3688fi
3689
3690case ".$PKG_CONFIG_LIBDIR" in
3691(.\$\(*\)*|.\'*\'*)
3692 ;;
3693(..|./*|.\\*)
3694 ;;
3695(.[a-zA-Z]:[\\/]*) # OS/2 EMX
3696 ;;
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%`
3702 ;;
3703 esac
3704 ;;
3705(.no|.NONE/*)
3706 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3707 ;;
3708(*)
3709 { { echo "$as_me:3709: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3710echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3711 { (exit 1); exit 1; }; }
3712 ;;
3713esac
3714
3715 MAKE_PC_FILES=
3716 ;;
3717 esac
3718else
3719 MAKE_PC_FILES="#"
3720fi
3721
3722if test -z "$MAKE_PC_FILES"
3723then
3724 echo "$as_me:3724: checking for suffix to add to pc-files" >&5
3725echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3726
3727# Check whether --with-pc-suffix or --without-pc-suffix was given.
3728if test "${with_pc_suffix+set}" = set; then
3729 withval="$with_pc_suffix"
3730 case "x$withval" in
3731 (xyes|xno)
3732 PC_MODULE_SUFFIX=
3733 ;;
3734 (*) PC_MODULE_SUFFIX="$withval"
3735 ;;
3736 esac
3737fi;
3738 test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3739 echo "$as_me:3739: result: $PC_MODULE_SUFFIX" >&5
3740echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3741 test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3742
3743fi
3744
3745echo "$as_me:3745: checking if we should assume mixed-case filenames" >&5
3746echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3747
3748# Check whether --enable-mixed-case or --disable-mixed-case was given.
3749if test "${enable_mixed_case+set}" = set; then
3750 enableval="$enable_mixed_case"
3751 enable_mixedcase=$enableval
3752else
3753 enable_mixedcase=auto
3754fi;
3755echo "$as_me:3755: result: $enable_mixedcase" >&5
3756echo "${ECHO_T}$enable_mixedcase" >&6
3757if test "$enable_mixedcase" = "auto" ; then
3758
3759echo "$as_me:3759: checking if filesystem supports mixed-case filenames" >&5
3760echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3761if test "${cf_cv_mixedcase+set}" = set; then
3762 echo $ECHO_N "(cached) $ECHO_C" >&6
3763else
3764
3765if test "$cross_compiling" = yes ; then
3766 case $target_alias in
3767 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3768 cf_cv_mixedcase=no
3769 ;;
3770 (*)
3771 cf_cv_mixedcase=yes
3772 ;;
3773 esac
3774else
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
3781 fi
3782 rm -f conftest CONFTEST
3783fi
3784
3785fi
3786echo "$as_me:3786: result: $cf_cv_mixedcase" >&5
3787echo "${ECHO_T}$cf_cv_mixedcase" >&6
3788test "$cf_cv_mixedcase" = yes &&
3789cat >>confdefs.h <<\EOF
3790#define MIXEDCASE_FILENAMES 1
3791EOF
3792
3793else
3794 cf_cv_mixedcase=$enable_mixedcase
3795 if test "x$enable_mixedcase" = "xyes" ; then
3796
3797cat >>confdefs.h <<\EOF
3798#define MIXEDCASE_FILENAMES 1
3799EOF
3800
3801 fi
3802fi
3803
3804# do this after mixed-case option (tags/TAGS is not as important as tic).
3805echo "$as_me:3805: checking whether ${MAKE-make} sets \${MAKE}" >&5
3806echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3807set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3808if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3809 echo $ECHO_N "(cached) $ECHO_C" >&6
3810else
3811 cat >conftest.make <<\EOF
3812all:
3813 @echo 'ac_maketemp="${MAKE}"'
3814EOF
3815# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3816eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3817if test -n "$ac_maketemp"; then
3818 eval ac_cv_prog_make_${ac_make}_set=yes
3819else
3820 eval ac_cv_prog_make_${ac_make}_set=no
3821fi
3822rm -f conftest.make
3823fi
3824if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3825 echo "$as_me:3825: result: yes" >&5
3826echo "${ECHO_T}yes" >&6
3827 SET_MAKE=
3828else
3829 echo "$as_me:3829: result: no" >&5
3830echo "${ECHO_T}no" >&6
3831 SET_MAKE="MAKE=${MAKE-make}"
3832fi
3833
3834for ac_prog in exctags ctags
3835do
3836 # Extract the first word of "$ac_prog", so it can be a program name with args.
3837set dummy $ac_prog; ac_word=$2
3838echo "$as_me:3838: checking for $ac_word" >&5
3839echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3840if test "${ac_cv_prog_CTAGS+set}" = set; then
3841 echo $ECHO_N "(cached) $ECHO_C" >&6
3842else
3843 if test -n "$CTAGS"; then
3844 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3845else
3846 ac_save_IFS=$IFS; IFS=$ac_path_separator
3847ac_dummy="$PATH"
3848for 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
3852ac_cv_prog_CTAGS="$ac_prog"
3853echo "$as_me:3853: found $ac_dir/$ac_word" >&5
3854break
3855done
3856
3857fi
3858fi
3859CTAGS=$ac_cv_prog_CTAGS
3860if test -n "$CTAGS"; then
3861 echo "$as_me:3861: result: $CTAGS" >&5
3862echo "${ECHO_T}$CTAGS" >&6
3863else
3864 echo "$as_me:3864: result: no" >&5
3865echo "${ECHO_T}no" >&6
3866fi
3867
3868 test -n "$CTAGS" && break
3869done
3870
3871for ac_prog in exetags etags
3872do
3873 # Extract the first word of "$ac_prog", so it can be a program name with args.
3874set dummy $ac_prog; ac_word=$2
3875echo "$as_me:3875: checking for $ac_word" >&5
3876echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3877if test "${ac_cv_prog_ETAGS+set}" = set; then
3878 echo $ECHO_N "(cached) $ECHO_C" >&6
3879else
3880 if test -n "$ETAGS"; then
3881 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3882else
3883 ac_save_IFS=$IFS; IFS=$ac_path_separator
3884ac_dummy="$PATH"
3885for 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
3889ac_cv_prog_ETAGS="$ac_prog"
3890echo "$as_me:3890: found $ac_dir/$ac_word" >&5
3891break
3892done
3893
3894fi
3895fi
3896ETAGS=$ac_cv_prog_ETAGS
3897if test -n "$ETAGS"; then
3898 echo "$as_me:3898: result: $ETAGS" >&5
3899echo "${ECHO_T}$ETAGS" >&6
3900else
3901 echo "$as_me:3901: result: no" >&5
3902echo "${ECHO_T}no" >&6
3903fi
3904
3905 test -n "$ETAGS" && break
3906done
3907
3908# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3909set dummy ${CTAGS:-ctags}; ac_word=$2
3910echo "$as_me:3910: checking for $ac_word" >&5
3911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3912if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3913 echo $ECHO_N "(cached) $ECHO_C" >&6
3914else
3915 if test -n "$MAKE_LOWER_TAGS"; then
3916 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3917else
3918 ac_save_IFS=$IFS; IFS=$ac_path_separator
3919ac_dummy="$PATH"
3920for 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
3924ac_cv_prog_MAKE_LOWER_TAGS="yes"
3925echo "$as_me:3925: found $ac_dir/$ac_word" >&5
3926break
3927done
3928
3929 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3930fi
3931fi
3932MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3933if test -n "$MAKE_LOWER_TAGS"; then
3934 echo "$as_me:3934: result: $MAKE_LOWER_TAGS" >&5
3935echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3936else
3937 echo "$as_me:3937: result: no" >&5
3938echo "${ECHO_T}no" >&6
3939fi
3940
3941if test "$cf_cv_mixedcase" = yes ; then
3942 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3943set dummy ${ETAGS:-etags}; ac_word=$2
3944echo "$as_me:3944: checking for $ac_word" >&5
3945echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3946if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3947 echo $ECHO_N "(cached) $ECHO_C" >&6
3948else
3949 if test -n "$MAKE_UPPER_TAGS"; then
3950 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3951else
3952 ac_save_IFS=$IFS; IFS=$ac_path_separator
3953ac_dummy="$PATH"
3954for 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
3958ac_cv_prog_MAKE_UPPER_TAGS="yes"
3959echo "$as_me:3959: found $ac_dir/$ac_word" >&5
3960break
3961done
3962
3963 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3964fi
3965fi
3966MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3967if test -n "$MAKE_UPPER_TAGS"; then
3968 echo "$as_me:3968: result: $MAKE_UPPER_TAGS" >&5
3969echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3970else
3971 echo "$as_me:3971: result: no" >&5
3972echo "${ECHO_T}no" >&6
3973fi
3974
3975else
3976 MAKE_UPPER_TAGS=no
3977fi
3978
3979if test "$MAKE_UPPER_TAGS" = yes ; then
3980 MAKE_UPPER_TAGS=
3981else
3982 MAKE_UPPER_TAGS="#"
3983fi
3984
3985if test "$MAKE_LOWER_TAGS" = yes ; then
3986 MAKE_LOWER_TAGS=
3987else
3988 MAKE_LOWER_TAGS="#"
3989fi
3990
3991echo "$as_me:3991: checking for makeflags variable" >&5
3992echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3993if test "${cf_cv_makeflags+set}" = set; then
3994 echo $ECHO_N "(cached) $ECHO_C" >&6
3995else
3996
3997 cf_cv_makeflags=''
3998 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3999 do
4000 cat >cf_makeflags.tmp <<CF_EOF
4001SHELL = $SHELL
4002all :
4003 @ echo '.$cf_option'
4004CF_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=
4011 ;;
4012 (*) cf_cv_makeflags=$cf_option
4013 ;;
4014 esac
4015 break
4016 ;;
4017 (.-) ;;
4018 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
4019 ;;
4020 esac
4021 done
4022 rm -f cf_makeflags.tmp
4023
4024fi
4025echo "$as_me:4025: result: $cf_cv_makeflags" >&5
4026echo "${ECHO_T}$cf_cv_makeflags" >&6
4027
4028if 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.
4030set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4031echo "$as_me:4031: checking for $ac_word" >&5
4032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033if test "${ac_cv_prog_RANLIB+set}" = set; then
4034 echo $ECHO_N "(cached) $ECHO_C" >&6
4035else
4036 if test -n "$RANLIB"; then
4037 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4038else
4039 ac_save_IFS=$IFS; IFS=$ac_path_separator
4040ac_dummy="$PATH"
4041for 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
4045ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4046echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047break
4048done
4049
4050fi
4051fi
4052RANLIB=$ac_cv_prog_RANLIB
4053if test -n "$RANLIB"; then
4054 echo "$as_me:4054: result: $RANLIB" >&5
4055echo "${ECHO_T}$RANLIB" >&6
4056else
4057 echo "$as_me:4057: result: no" >&5
4058echo "${ECHO_T}no" >&6
4059fi
4060
4061fi
4062if 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.
4065set dummy ranlib; ac_word=$2
4066echo "$as_me:4066: checking for $ac_word" >&5
4067echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4069 echo $ECHO_N "(cached) $ECHO_C" >&6
4070else
4071 if test -n "$ac_ct_RANLIB"; then
4072 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4073else
4074 ac_save_IFS=$IFS; IFS=$ac_path_separator
4075ac_dummy="$PATH"
4076for 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
4080ac_cv_prog_ac_ct_RANLIB="ranlib"
4081echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082break
4083done
4084
4085 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4086fi
4087fi
4088ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4089if test -n "$ac_ct_RANLIB"; then
4090 echo "$as_me:4090: result: $ac_ct_RANLIB" >&5
4091echo "${ECHO_T}$ac_ct_RANLIB" >&6
4092else
4093 echo "$as_me:4093: result: no" >&5
4094echo "${ECHO_T}no" >&6
4095fi
4096
4097 RANLIB=$ac_ct_RANLIB
4098else
4099 RANLIB="$ac_cv_prog_RANLIB"
4100fi
4101
4102if 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.
4104set dummy ${ac_tool_prefix}ld; ac_word=$2
4105echo "$as_me:4105: checking for $ac_word" >&5
4106echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4107if test "${ac_cv_prog_LD+set}" = set; then
4108 echo $ECHO_N "(cached) $ECHO_C" >&6
4109else
4110 if test -n "$LD"; then
4111 ac_cv_prog_LD="$LD" # Let the user override the test.
4112else
4113 ac_save_IFS=$IFS; IFS=$ac_path_separator
4114ac_dummy="$PATH"
4115for 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
4119ac_cv_prog_LD="${ac_tool_prefix}ld"
4120echo "$as_me:4120: found $ac_dir/$ac_word" >&5
4121break
4122done
4123
4124fi
4125fi
4126LD=$ac_cv_prog_LD
4127if test -n "$LD"; then
4128 echo "$as_me:4128: result: $LD" >&5
4129echo "${ECHO_T}$LD" >&6
4130else
4131 echo "$as_me:4131: result: no" >&5
4132echo "${ECHO_T}no" >&6
4133fi
4134
4135fi
4136if 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.
4139set dummy ld; ac_word=$2
4140echo "$as_me:4140: checking for $ac_word" >&5
4141echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4142if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4143 echo $ECHO_N "(cached) $ECHO_C" >&6
4144else
4145 if test -n "$ac_ct_LD"; then
4146 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4147else
4148 ac_save_IFS=$IFS; IFS=$ac_path_separator
4149ac_dummy="$PATH"
4150for 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
4154ac_cv_prog_ac_ct_LD="ld"
4155echo "$as_me:4155: found $ac_dir/$ac_word" >&5
4156break
4157done
4158
4159 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4160fi
4161fi
4162ac_ct_LD=$ac_cv_prog_ac_ct_LD
4163if test -n "$ac_ct_LD"; then
4164 echo "$as_me:4164: result: $ac_ct_LD" >&5
4165echo "${ECHO_T}$ac_ct_LD" >&6
4166else
4167 echo "$as_me:4167: result: no" >&5
4168echo "${ECHO_T}no" >&6
4169fi
4170
4171 LD=$ac_ct_LD
4172else
4173 LD="$ac_cv_prog_LD"
4174fi
4175
4176if 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.
4178set dummy ${ac_tool_prefix}ar; ac_word=$2
4179echo "$as_me:4179: checking for $ac_word" >&5
4180echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4181if test "${ac_cv_prog_AR+set}" = set; then
4182 echo $ECHO_N "(cached) $ECHO_C" >&6
4183else
4184 if test -n "$AR"; then
4185 ac_cv_prog_AR="$AR" # Let the user override the test.
4186else
4187 ac_save_IFS=$IFS; IFS=$ac_path_separator
4188ac_dummy="$PATH"
4189for 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
4193ac_cv_prog_AR="${ac_tool_prefix}ar"
4194echo "$as_me:4194: found $ac_dir/$ac_word" >&5
4195break
4196done
4197
4198fi
4199fi
4200AR=$ac_cv_prog_AR
4201if test -n "$AR"; then
4202 echo "$as_me:4202: result: $AR" >&5
4203echo "${ECHO_T}$AR" >&6
4204else
4205 echo "$as_me:4205: result: no" >&5
4206echo "${ECHO_T}no" >&6
4207fi
4208
4209fi
4210if 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.
4213set dummy ar; ac_word=$2
4214echo "$as_me:4214: checking for $ac_word" >&5
4215echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4216if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4217 echo $ECHO_N "(cached) $ECHO_C" >&6
4218else
4219 if test -n "$ac_ct_AR"; then
4220 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4221else
4222 ac_save_IFS=$IFS; IFS=$ac_path_separator
4223ac_dummy="$PATH"
4224for 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
4228ac_cv_prog_ac_ct_AR="ar"
4229echo "$as_me:4229: found $ac_dir/$ac_word" >&5
4230break
4231done
4232
4233 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4234fi
4235fi
4236ac_ct_AR=$ac_cv_prog_ac_ct_AR
4237if test -n "$ac_ct_AR"; then
4238 echo "$as_me:4238: result: $ac_ct_AR" >&5
4239echo "${ECHO_T}$ac_ct_AR" >&6
4240else
4241 echo "$as_me:4241: result: no" >&5
4242echo "${ECHO_T}no" >&6
4243fi
4244
4245 AR=$ac_ct_AR
4246else
4247 AR="$ac_cv_prog_AR"
4248fi
4249
4250if 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.
4252set dummy ${ac_tool_prefix}nm; ac_word=$2
4253echo "$as_me:4253: checking for $ac_word" >&5
4254echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4255if test "${ac_cv_prog_NM+set}" = set; then
4256 echo $ECHO_N "(cached) $ECHO_C" >&6
4257else
4258 if test -n "$NM"; then
4259 ac_cv_prog_NM="$NM" # Let the user override the test.
4260else
4261 ac_save_IFS=$IFS; IFS=$ac_path_separator
4262ac_dummy="$PATH"
4263for 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
4267ac_cv_prog_NM="${ac_tool_prefix}nm"
4268echo "$as_me:4268: found $ac_dir/$ac_word" >&5
4269break
4270done
4271
4272fi
4273fi
4274NM=$ac_cv_prog_NM
4275if test -n "$NM"; then
4276 echo "$as_me:4276: result: $NM" >&5
4277echo "${ECHO_T}$NM" >&6
4278else
4279 echo "$as_me:4279: result: no" >&5
4280echo "${ECHO_T}no" >&6
4281fi
4282
4283fi
4284if 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.
4287set dummy nm; ac_word=$2
4288echo "$as_me:4288: checking for $ac_word" >&5
4289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4290if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4291 echo $ECHO_N "(cached) $ECHO_C" >&6
4292else
4293 if test -n "$ac_ct_NM"; then
4294 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4295else
4296 ac_save_IFS=$IFS; IFS=$ac_path_separator
4297ac_dummy="$PATH"
4298for 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
4302ac_cv_prog_ac_ct_NM="nm"
4303echo "$as_me:4303: found $ac_dir/$ac_word" >&5
4304break
4305done
4306
4307 test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4308fi
4309fi
4310ac_ct_NM=$ac_cv_prog_ac_ct_NM
4311if test -n "$ac_ct_NM"; then
4312 echo "$as_me:4312: result: $ac_ct_NM" >&5
4313echo "${ECHO_T}$ac_ct_NM" >&6
4314else
4315 echo "$as_me:4315: result: no" >&5
4316echo "${ECHO_T}no" >&6
4317fi
4318
4319 NM=$ac_ct_NM
4320else
4321 NM="$ac_cv_prog_NM"
4322fi
4323
4324if 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.
4326set dummy ${ac_tool_prefix}ar; ac_word=$2
4327echo "$as_me:4327: checking for $ac_word" >&5
4328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4329if test "${ac_cv_prog_AR+set}" = set; then
4330 echo $ECHO_N "(cached) $ECHO_C" >&6
4331else
4332 if test -n "$AR"; then
4333 ac_cv_prog_AR="$AR" # Let the user override the test.
4334else
4335 ac_save_IFS=$IFS; IFS=$ac_path_separator
4336ac_dummy="$PATH"
4337for 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
4341ac_cv_prog_AR="${ac_tool_prefix}ar"
4342echo "$as_me:4342: found $ac_dir/$ac_word" >&5
4343break
4344done
4345
4346fi
4347fi
4348AR=$ac_cv_prog_AR
4349if test -n "$AR"; then
4350 echo "$as_me:4350: result: $AR" >&5
4351echo "${ECHO_T}$AR" >&6
4352else
4353 echo "$as_me:4353: result: no" >&5
4354echo "${ECHO_T}no" >&6
4355fi
4356
4357fi
4358if 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.
4361set dummy ar; ac_word=$2
4362echo "$as_me:4362: checking for $ac_word" >&5
4363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4364if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4365 echo $ECHO_N "(cached) $ECHO_C" >&6
4366else
4367 if test -n "$ac_ct_AR"; then
4368 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4369else
4370 ac_save_IFS=$IFS; IFS=$ac_path_separator
4371ac_dummy="$PATH"
4372for 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
4376ac_cv_prog_ac_ct_AR="ar"
4377echo "$as_me:4377: found $ac_dir/$ac_word" >&5
4378break
4379done
4380
4381 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4382fi
4383fi
4384ac_ct_AR=$ac_cv_prog_ac_ct_AR
4385if test -n "$ac_ct_AR"; then
4386 echo "$as_me:4386: result: $ac_ct_AR" >&5
4387echo "${ECHO_T}$ac_ct_AR" >&6
4388else
4389 echo "$as_me:4389: result: no" >&5
4390echo "${ECHO_T}no" >&6
4391fi
4392
4393 AR=$ac_ct_AR
4394else
4395 AR="$ac_cv_prog_AR"
4396fi
4397
4398echo "$as_me:4398: checking for options to update archives" >&5
4399echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4400if test "${cf_cv_ar_flags+set}" = set; then
4401 echo $ECHO_N "(cached) $ECHO_C" >&6
4402else
4403
4404 cf_cv_ar_flags=unknown
4405 for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4406 do
4407
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
4414 fi
4415 fi
4416
4417 rm -f conftest.$ac_cv_objext
4418 rm -f conftest.a
4419
4420 cat >conftest.$ac_ext <<EOF
4421#line 4421 "configure"
4422int testdata[3] = { 123, 456, 789 };
4423EOF
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
4434 fi
4435 else
4436 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4437
4438echo "${as_me:-configure}:4438: testing cannot compile test-program ..." 1>&5
4439
4440 break
4441 fi
4442 done
4443 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4444
4445fi
4446echo "$as_me:4446: result: $cf_cv_ar_flags" >&5
4447echo "${ECHO_T}$cf_cv_ar_flags" >&6
4448
4449if test -n "$ARFLAGS" ; then
4450 if test -n "$cf_cv_ar_flags" ; then
4451 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4452 fi
4453else
4454 ARFLAGS=$cf_cv_ar_flags
4455fi
4456
4457echo "$as_me:4457: checking if you have specified an install-prefix" >&5
4458echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4459
4460# Check whether --with-install-prefix or --without-install-prefix was given.
4461if test "${with_install_prefix+set}" = set; then
4462 withval="$with_install_prefix"
4463 case "x$withval" in
4464 (xyes|xno)
4465 ;;
4466 (*) DESTDIR="$withval"
4467 ;;
4468 esac
4469fi;
4470echo "$as_me:4470: result: $DESTDIR" >&5
4471echo "${ECHO_T}$DESTDIR" >&6
4472
4473###############################################################################
4474
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.
4478
4479if test "$cross_compiling" = yes ; then
4480
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'}
4488
4489# Check whether --with-build-cc or --without-build-cc was given.
4490if test "${with_build_cc+set}" = set; then
4491 withval="$with_build_cc"
4492 BUILD_CC="$withval"
4493else
4494 for ac_prog in gcc cc cl
4495do
4496 # Extract the first word of "$ac_prog", so it can be a program name with args.
4497set dummy $ac_prog; ac_word=$2
4498echo "$as_me:4498: checking for $ac_word" >&5
4499echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4500if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4501 echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503 if test -n "$BUILD_CC"; then
4504 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4505else
4506 ac_save_IFS=$IFS; IFS=$ac_path_separator
4507ac_dummy="$PATH"
4508for 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
4512ac_cv_prog_BUILD_CC="$ac_prog"
4513echo "$as_me:4513: found $ac_dir/$ac_word" >&5
4514break
4515done
4516
4517fi
4518fi
4519BUILD_CC=$ac_cv_prog_BUILD_CC
4520if test -n "$BUILD_CC"; then
4521 echo "$as_me:4521: result: $BUILD_CC" >&5
4522echo "${ECHO_T}$BUILD_CC" >&6
4523else
4524 echo "$as_me:4524: result: no" >&5
4525echo "${ECHO_T}no" >&6
4526fi
4527
4528 test -n "$BUILD_CC" && break
4529done
4530
4531fi;
4532 echo "$as_me:4532: checking for native build C compiler" >&5
4533echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4534 echo "$as_me:4534: result: $BUILD_CC" >&5
4535echo "${ECHO_T}$BUILD_CC" >&6
4536
4537 echo "$as_me:4537: checking for native build C preprocessor" >&5
4538echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4539
4540# Check whether --with-build-cpp or --without-build-cpp was given.
4541if test "${with_build_cpp+set}" = set; then
4542 withval="$with_build_cpp"
4543 BUILD_CPP="$withval"
4544else
4545 BUILD_CPP='${BUILD_CC} -E'
4546fi;
4547 echo "$as_me:4547: result: $BUILD_CPP" >&5
4548echo "${ECHO_T}$BUILD_CPP" >&6
4549
4550 echo "$as_me:4550: checking for native build C flags" >&5
4551echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4552
4553# Check whether --with-build-cflags or --without-build-cflags was given.
4554if test "${with_build_cflags+set}" = set; then
4555 withval="$with_build_cflags"
4556 BUILD_CFLAGS="$withval"
4557fi;
4558 echo "$as_me:4558: result: $BUILD_CFLAGS" >&5
4559echo "${ECHO_T}$BUILD_CFLAGS" >&6
4560
4561 echo "$as_me:4561: checking for native build C preprocessor-flags" >&5
4562echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4563
4564# Check whether --with-build-cppflags or --without-build-cppflags was given.
4565if test "${with_build_cppflags+set}" = set; then
4566 withval="$with_build_cppflags"
4567 BUILD_CPPFLAGS="$withval"
4568fi;
4569 echo "$as_me:4569: result: $BUILD_CPPFLAGS" >&5
4570echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4571
4572 echo "$as_me:4572: checking for native build linker-flags" >&5
4573echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4574
4575# Check whether --with-build-ldflags or --without-build-ldflags was given.
4576if test "${with_build_ldflags+set}" = set; then
4577 withval="$with_build_ldflags"
4578 BUILD_LDFLAGS="$withval"
4579fi;
4580 echo "$as_me:4580: result: $BUILD_LDFLAGS" >&5
4581echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4582
4583 echo "$as_me:4583: checking for native build linker-libraries" >&5
4584echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4585
4586# Check whether --with-build-libs or --without-build-libs was given.
4587if test "${with_build_libs+set}" = set; then
4588 withval="$with_build_libs"
4589 BUILD_LIBS="$withval"
4590fi;
4591 echo "$as_me:4591: result: $BUILD_LIBS" >&5
4592echo "${ECHO_T}$BUILD_LIBS" >&6
4593
4594 # this assumes we're on Unix.
4595 BUILD_EXEEXT=
4596 BUILD_OBJEXT=o
4597
4598 : ${BUILD_CC:='${CC}'}
4599
4600 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4601 { { echo "$as_me:4601: error: Cross-build requires two compilers.
4602Use --with-build-cc to specify the native compiler." >&5
4603echo "$as_me: error: Cross-build requires two compilers.
4604Use --with-build-cc to specify the native compiler." >&2;}
4605 { (exit 1); exit 1; }; }
4606 fi
4607
4608else
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'}
4617fi
4618
4619###############################################################################
4620
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.
4624cf_list_models=""
4625
4626echo "$as_me:4626: checking if libtool -version-number should be used" >&5
4627echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4628
4629# Check whether --enable-libtool-version or --disable-libtool-version was given.
4630if 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
4637 fi
4638else
4639 enableval=yes
4640 cf_libtool_version=yes
4641
4642fi;
4643echo "$as_me:4643: result: $cf_libtool_version" >&5
4644echo "${ECHO_T}$cf_libtool_version" >&6
4645
4646if test "$cf_libtool_version" = yes ; then
4647 LIBTOOL_VERSION="-version-number"
4648else
4649 LIBTOOL_VERSION="-version-info"
4650 case "x$VERSION" in
4651 (x)
4652 { echo "$as_me:4652: WARNING: VERSION was not set" >&5
4653echo "$as_me: WARNING: VERSION was not set" >&2;}
4654 ;;
4655 (x*.*.*)
4656 ABI_VERSION="$VERSION"
4657 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
4658
4659echo "${as_me:-configure}:4659: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4660
4661 ;;
4662 (x*:*:*)
4663 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4664 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
4665
4666echo "${as_me:-configure}:4666: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4667
4668 ;;
4669 (*)
4670 { echo "$as_me:4670: WARNING: unexpected VERSION value: $VERSION" >&5
4671echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4672 ;;
4673 esac
4674fi
4675
4676LIBTOOL=
4677
4678# common library maintenance symbols that are convenient for libtool scripts:
4679LIB_CREATE='${AR} -cr'
4680LIB_OBJECT='${OBJECTS}'
4681LIB_SUFFIX=.a
4682LIB_PREP="$RANLIB"
4683
4684# symbols used to prop libtool up to enable it to determine what it should be
4685# doing:
4686LIB_CLEAN=
4687LIB_COMPILE=
4688LIB_LINK='${CC}'
4689LIB_INSTALL=
4690LIB_UNINSTALL=
4691
4692echo "$as_me:4692: checking if you want to build libraries with libtool" >&5
4693echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4694
4695# Check whether --with-libtool or --without-libtool was given.
4696if test "${with_libtool+set}" = set; then
4697 withval="$with_libtool"
4698 with_libtool=$withval
4699else
4700 with_libtool=no
4701fi;
4702echo "$as_me:4702: result: $with_libtool" >&5
4703echo "${ECHO_T}$with_libtool" >&6
4704if test "$with_libtool" != "no"; then
4705
4706 if test "$with_libtool" != "yes" ; then
4707
4708if test "x$prefix" != xNONE; then
4709 cf_path_syntax="$prefix"
4710else
4711 cf_path_syntax="$ac_default_prefix"
4712fi
4713
4714case ".$with_libtool" in
4715(.\$\(*\)*|.\'*\'*)
4716 ;;
4717(..|./*|.\\*)
4718 ;;
4719(.[a-zA-Z]:[\\/]*) # OS/2 EMX
4720 ;;
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%`
4726 ;;
4727 esac
4728 ;;
4729(.no|.NONE/*)
4730 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4731 ;;
4732(*)
4733 { { echo "$as_me:4733: error: expected a pathname, not \"$with_libtool\"" >&5
4734echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4735 { (exit 1); exit 1; }; }
4736 ;;
4737esac
4738
4739 LIBTOOL=$with_libtool
4740 else
4741 if test -n "$ac_tool_prefix"; then
4742 for ac_prog in libtool glibtool
4743 do
4744 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4746echo "$as_me:4746: checking for $ac_word" >&5
4747echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4748if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4749 echo $ECHO_N "(cached) $ECHO_C" >&6
4750else
4751 if test -n "$LIBTOOL"; then
4752 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4753else
4754 ac_save_IFS=$IFS; IFS=$ac_path_separator
4755ac_dummy="$PATH"
4756for 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
4760ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4761echo "$as_me:4761: found $ac_dir/$ac_word" >&5
4762break
4763done
4764
4765fi
4766fi
4767LIBTOOL=$ac_cv_prog_LIBTOOL
4768if test -n "$LIBTOOL"; then
4769 echo "$as_me:4769: result: $LIBTOOL" >&5
4770echo "${ECHO_T}$LIBTOOL" >&6
4771else
4772 echo "$as_me:4772: result: no" >&5
4773echo "${ECHO_T}no" >&6
4774fi
4775
4776 test -n "$LIBTOOL" && break
4777 done
4778fi
4779if test -z "$LIBTOOL"; then
4780 ac_ct_LIBTOOL=$LIBTOOL
4781 for ac_prog in libtool glibtool
4782do
4783 # Extract the first word of "$ac_prog", so it can be a program name with args.
4784set dummy $ac_prog; ac_word=$2
4785echo "$as_me:4785: checking for $ac_word" >&5
4786echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4787if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4788 echo $ECHO_N "(cached) $ECHO_C" >&6
4789else
4790 if test -n "$ac_ct_LIBTOOL"; then
4791 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4792else
4793 ac_save_IFS=$IFS; IFS=$ac_path_separator
4794ac_dummy="$PATH"
4795for 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
4799ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4800echo "$as_me:4800: found $ac_dir/$ac_word" >&5
4801break
4802done
4803
4804fi
4805fi
4806ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4807if test -n "$ac_ct_LIBTOOL"; then
4808 echo "$as_me:4808: result: $ac_ct_LIBTOOL" >&5
4809echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4810else
4811 echo "$as_me:4811: result: no" >&5
4812echo "${ECHO_T}no" >&6
4813fi
4814
4815 test -n "$ac_ct_LIBTOOL" && break
4816done
4817test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4818
4819 LIBTOOL=$ac_ct_LIBTOOL
4820fi
4821
4822if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4823then
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.].*//'`
4825else
4826 cf_cv_libtool_version=
4827fi
4828test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4829
4830 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4831 then
4832
4833unset ac_cv_prog_ac_ct_LIBTOOL
4834unset ac_ct_LIBTOOL
4835unset LIBTOOL
4836
4837 if test -n "$ac_tool_prefix"; then
4838 for ac_prog in glibtool
4839 do
4840 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4841set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4842echo "$as_me:4842: checking for $ac_word" >&5
4843echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4844if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4845 echo $ECHO_N "(cached) $ECHO_C" >&6
4846else
4847 if test -n "$LIBTOOL"; then
4848 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4849else
4850 ac_save_IFS=$IFS; IFS=$ac_path_separator
4851ac_dummy="$PATH"
4852for 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
4856ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4857echo "$as_me:4857: found $ac_dir/$ac_word" >&5
4858break
4859done
4860
4861fi
4862fi
4863LIBTOOL=$ac_cv_prog_LIBTOOL
4864if test -n "$LIBTOOL"; then
4865 echo "$as_me:4865: result: $LIBTOOL" >&5
4866echo "${ECHO_T}$LIBTOOL" >&6
4867else
4868 echo "$as_me:4868: result: no" >&5
4869echo "${ECHO_T}no" >&6
4870fi
4871
4872 test -n "$LIBTOOL" && break
4873 done
4874fi
4875if test -z "$LIBTOOL"; then
4876 ac_ct_LIBTOOL=$LIBTOOL
4877 for ac_prog in glibtool
4878do
4879 # Extract the first word of "$ac_prog", so it can be a program name with args.
4880set dummy $ac_prog; ac_word=$2
4881echo "$as_me:4881: checking for $ac_word" >&5
4882echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4883if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4884 echo $ECHO_N "(cached) $ECHO_C" >&6
4885else
4886 if test -n "$ac_ct_LIBTOOL"; then
4887 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4888else
4889 ac_save_IFS=$IFS; IFS=$ac_path_separator
4890ac_dummy="$PATH"
4891for 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
4895ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4896echo "$as_me:4896: found $ac_dir/$ac_word" >&5
4897break
4898done
4899
4900fi
4901fi
4902ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4903if test -n "$ac_ct_LIBTOOL"; then
4904 echo "$as_me:4904: result: $ac_ct_LIBTOOL" >&5
4905echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4906else
4907 echo "$as_me:4907: result: no" >&5
4908echo "${ECHO_T}no" >&6
4909fi
4910
4911 test -n "$ac_ct_LIBTOOL" && break
4912done
4913test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4914
4915 LIBTOOL=$ac_ct_LIBTOOL
4916fi
4917
4918if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4919then
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.].*//'`
4921else
4922 cf_cv_libtool_version=
4923fi
4924test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4925
4926 fi
4927 fi
4928 if test -z "$LIBTOOL" ; then
4929 { { echo "$as_me:4929: error: Cannot find libtool" >&5
4930echo "$as_me: error: Cannot find libtool" >&2;}
4931 { (exit 1); exit 1; }; }
4932 fi
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=:
4942
4943if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4944then
4945 echo "$as_me:4945: checking version of $LIBTOOL" >&5
4946echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4947
4948if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4949then
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.].*//'`
4951else
4952 cf_cv_libtool_version=
4953fi
4954test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4955
4956 echo "$as_me:4956: result: $cf_cv_libtool_version" >&5
4957echo "${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
4960echo "$as_me: error: This is not GNU libtool" >&2;}
4961 { (exit 1); exit 1; }; }
4962 fi
4963else
4964 { { echo "$as_me:4964: error: GNU libtool has not been found" >&5
4965echo "$as_me: error: GNU libtool has not been found" >&2;}
4966 { (exit 1); exit 1; }; }
4967fi
4968
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
4974 ;;
4975 esac
4976
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"
4982 ;;
4983 (*)
4984 LIBTOOL_CXX="$LIBTOOL"
4985 ;;
4986 esac
4987else
4988 LIBTOOL=""
4989 LIBTOOL_CXX=""
4990fi
4991
4992test -z "$LIBTOOL" && ECHO_LT=
4993
4994if test "$with_libtool" != "no" ; then
4995
4996cf_list_models="$cf_list_models libtool"
4997
4998else
4999
5000echo "$as_me:5000: checking if you want to build shared libraries" >&5
5001echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5002
5003# Check whether --with-shared or --without-shared was given.
5004if test "${with_shared+set}" = set; then
5005 withval="$with_shared"
5006 with_shared=$withval
5007else
5008 with_shared=no
5009fi;
5010echo "$as_me:5010: result: $with_shared" >&5
5011echo "${ECHO_T}$with_shared" >&6
5012test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5013
5014echo "$as_me:5014: checking if you want to build static libraries" >&5
5015echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5016
5017# Check whether --with-normal or --without-normal was given.
5018if test "${with_normal+set}" = set; then
5019 withval="$with_normal"
5020 with_normal=$withval
5021else
5022 with_normal=yes
5023fi;
5024echo "$as_me:5024: result: $with_normal" >&5
5025echo "${ECHO_T}$with_normal" >&6
5026test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5027
5028echo "$as_me:5028: checking if you want to build debug libraries" >&5
5029echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5030
5031# Check whether --with-debug or --without-debug was given.
5032if test "${with_debug+set}" = set; then
5033 withval="$with_debug"
5034 with_debug=$withval
5035else
5036 with_debug=yes
5037fi;
5038echo "$as_me:5038: result: $with_debug" >&5
5039echo "${ECHO_T}$with_debug" >&6
5040test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5041
5042echo "$as_me:5042: checking if you want to build profiling libraries" >&5
5043echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5044
5045# Check whether --with-profile or --without-profile was given.
5046if test "${with_profile+set}" = set; then
5047 withval="$with_profile"
5048 with_profile=$withval
5049else
5050 with_profile=no
5051fi;
5052echo "$as_me:5052: result: $with_profile" >&5
5053echo "${ECHO_T}$with_profile" >&6
5054test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5055
5056fi
5057
5058if test "X$cf_with_cxx_binding" != Xno; then
5059if test "x$with_shared" = "xyes"; then
5060echo "$as_me:5060: checking if you want to build C++ shared libraries" >&5
5061echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5062
5063# Check whether --with-cxx-shared or --without-cxx-shared was given.
5064if test "${with_cxx_shared+set}" = set; then
5065 withval="$with_cxx_shared"
5066 with_shared_cxx=$withval
5067else
5068 with_shared_cxx=no
5069fi;
5070echo "$as_me:5070: result: $with_shared_cxx" >&5
5071echo "${ECHO_T}$with_shared_cxx" >&6
5072fi
5073fi
5074
5075###############################################################################
5076
5077echo "$as_me:5077: checking for specified models" >&5
5078echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5079test -z "$cf_list_models" && cf_list_models=normal
5080test "$with_libtool" != "no" && cf_list_models=libtool
5081echo "$as_me:5081: result: $cf_list_models" >&5
5082echo "${ECHO_T}$cf_list_models" >&6
5083
5084### Use the first model as the default, and save its suffix for use in building
5085### up test-applications.
5086echo "$as_me:5086: checking for default model" >&5
5087echo $ECHO_N "checking for default model... $ECHO_C" >&6
5088DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5089echo "$as_me:5089: result: $DFT_LWR_MODEL" >&5
5090echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5091
5092DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5093
5094TICS_NAME=tic
5095
5096TINFO_NAME=tinfo
5097
5098LIB_NAME=ncurses
5099
5100LIB_DIR=../lib
5101LIB_2ND=../../lib
5102
5103echo "$as_me:5103: checking if you want to have a library-prefix" >&5
5104echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5105
5106# Check whether --with-lib-prefix or --without-lib-prefix was given.
5107if test "${with_lib_prefix+set}" = set; then
5108 withval="$with_lib_prefix"
5109 with_lib_prefix=$withval
5110else
5111 with_lib_prefix=auto
5112fi;
5113echo "$as_me:5113: result: $with_lib_prefix" >&5
5114echo "${ECHO_T}$with_lib_prefix" >&6
5115
5116if test $with_lib_prefix = auto
5117then
5118
5119 case $cf_cv_system_name in
5120 (OS/2*|os2*)
5121 LIB_PREFIX=''
5122 ;;
5123 (*) LIB_PREFIX='lib'
5124 ;;
5125 esac
5126cf_prefix=$LIB_PREFIX
5127
5128elif test $with_lib_prefix = no
5129then
5130 LIB_PREFIX=
5131else
5132 LIB_PREFIX=$with_lib_prefix
5133fi
5134
5135LIB_SUFFIX=
5136
5137 echo "$as_me:5137: checking for PATH separator" >&5
5138echo $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
5143
5144 echo "$as_me:5144: result: $PATH_SEPARATOR" >&5
5145echo "${ECHO_T}$PATH_SEPARATOR" >&6
5146
5147###############################################################################
5148
5149echo "$as_me:5149: checking if you want to build a separate terminfo library" >&5
5150echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5151
5152# Check whether --with-termlib or --without-termlib was given.
5153if test "${with_termlib+set}" = set; then
5154 withval="$with_termlib"
5155 with_termlib=$withval
5156else
5157 with_termlib=no
5158fi;
5159echo "$as_me:5159: result: $with_termlib" >&5
5160echo "${ECHO_T}$with_termlib" >&6
5161
5162echo "$as_me:5162: checking if you want to build a separate tic library" >&5
5163echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5164
5165# Check whether --with-ticlib or --without-ticlib was given.
5166if test "${with_ticlib+set}" = set; then
5167 withval="$with_ticlib"
5168 with_ticlib=$withval
5169else
5170 with_ticlib=no
5171fi;
5172echo "$as_me:5172: result: $with_ticlib" >&5
5173echo "${ECHO_T}$with_ticlib" >&6
5174
5175### Checks for special libraries, must be done up-front.
5176SHLIB_LIST=""
5177
5178echo "$as_me:5178: checking if you want to link with the GPM mouse library" >&5
5179echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5180
5181# Check whether --with-gpm or --without-gpm was given.
5182if test "${with_gpm+set}" = set; then
5183 withval="$with_gpm"
5184 with_gpm=$withval
5185else
5186 with_gpm=maybe
5187fi;
5188echo "$as_me:5188: result: $with_gpm" >&5
5189echo "${ECHO_T}$with_gpm" >&6
5190
5191if test "$with_gpm" != no ; then
5192 echo "$as_me:5192: checking for gpm.h" >&5
5193echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5194if test "${ac_cv_header_gpm_h+set}" = set; then
5195 echo $ECHO_N "(cached) $ECHO_C" >&6
5196else
5197 cat >conftest.$ac_ext <<_ACEOF
5198#line 5198 "configure"
5199#include "confdefs.h"
5200#include <gpm.h>
5201_ACEOF
5202if { (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=
5214 fi
5215else
5216 ac_cpp_err=yes
5217fi
5218if test -z "$ac_cpp_err"; then
5219 ac_cv_header_gpm_h=yes
5220else
5221 echo "$as_me: failed program was:" >&5
5222 cat conftest.$ac_ext >&5
5223 ac_cv_header_gpm_h=no
5224fi
5225rm -f conftest.err conftest.$ac_ext
5226fi
5227echo "$as_me:5227: result: $ac_cv_header_gpm_h" >&5
5228echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5229if test $ac_cv_header_gpm_h = yes; then
5230
5231cat >>confdefs.h <<\EOF
5232#define HAVE_GPM_H 1
5233EOF
5234
5235 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5236 test -n "$verbose" && echo " assuming we really have GPM library" 1>&6
5237
5238echo "${as_me:-configure}:5238: testing assuming we really have GPM library ..." 1>&5
5239
5240cat >>confdefs.h <<\EOF
5241#define HAVE_LIBGPM 1
5242EOF
5243
5244 else
5245 echo "$as_me:5245: checking for Gpm_Open in -lgpm" >&5
5246echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5247if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5248 echo $ECHO_N "(cached) $ECHO_C" >&6
5249else
5250 ac_check_lib_save_LIBS=$LIBS
5251LIBS="-lgpm $LIBS"
5252cat >conftest.$ac_ext <<_ACEOF
5253#line 5253 "configure"
5254#include "confdefs.h"
5255
5256/* Override any gcc2 internal prototype to avoid an error. */
5257#ifdef __cplusplus
5258extern "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. */
5262char Gpm_Open ();
5263int
5264main ()
5265{
5266Gpm_Open ();
5267 ;
5268 return 0;
5269}
5270_ACEOF
5271rm -f conftest.$ac_objext conftest$ac_exeext
5272if { (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
5284else
5285 echo "$as_me: failed program was:" >&5
5286cat conftest.$ac_ext >&5
5287ac_cv_lib_gpm_Gpm_Open=no
5288fi
5289rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5290LIBS=$ac_check_lib_save_LIBS
5291fi
5292echo "$as_me:5292: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5293echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5294if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5295 :
5296else
5297
5298 { { echo "$as_me:5298: error: Cannot link with GPM library" >&5
5299echo "$as_me: error: Cannot link with GPM library" >&2;}
5300 { (exit 1); exit 1; }; }
5301 fi
5302 with_gpm=yes
5303
5304fi
5305
5306else
5307
5308 test "$with_gpm" != maybe && { echo "$as_me:5308: WARNING: Cannot find GPM header" >&5
5309echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5310 with_gpm=no
5311
5312fi
5313
5314fi
5315
5316if test "$with_gpm" != no ; then
5317 echo "$as_me:5317: checking if you want to load GPM dynamically" >&5
5318echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5319
5320# Check whether --with-dlsym or --without-dlsym was given.
5321if test "${with_dlsym+set}" = set; then
5322 withval="$with_dlsym"
5323 with_dlsym=$withval
5324else
5325 with_dlsym=yes
5326fi;
5327 echo "$as_me:5327: result: $with_dlsym" >&5
5328echo "${ECHO_T}$with_dlsym" >&6
5329 if test "x$with_dlsym" = xyes ; then
5330
5331cf_have_dlsym=no
5332echo "$as_me:5332: checking for dlsym" >&5
5333echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5334if test "${ac_cv_func_dlsym+set}" = set; then
5335 echo $ECHO_N "(cached) $ECHO_C" >&6
5336else
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
5345extern "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. */
5349char dlsym ();
5350char (*f) ();
5351
5352int
5353main ()
5354{
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)
5359choke me
5360#else
5361f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5362#endif
5363
5364 ;
5365 return 0;
5366}
5367_ACEOF
5368rm -f conftest.$ac_objext conftest$ac_exeext
5369if { (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
5381else
5382 echo "$as_me: failed program was:" >&5
5383cat conftest.$ac_ext >&5
5384ac_cv_func_dlsym=no
5385fi
5386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5387fi
5388echo "$as_me:5388: result: $ac_cv_func_dlsym" >&5
5389echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5390if test $ac_cv_func_dlsym = yes; then
5391 cf_have_dlsym=yes
5392else
5393
5394cf_have_libdl=no
5395echo "$as_me:5395: checking for dlsym in -ldl" >&5
5396echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5397if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5398 echo $ECHO_N "(cached) $ECHO_C" >&6
5399else
5400 ac_check_lib_save_LIBS=$LIBS
5401LIBS="-ldl $LIBS"
5402cat >conftest.$ac_ext <<_ACEOF
5403#line 5403 "configure"
5404#include "confdefs.h"
5405
5406/* Override any gcc2 internal prototype to avoid an error. */
5407#ifdef __cplusplus
5408extern "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. */
5412char dlsym ();
5413int
5414main ()
5415{
5416dlsym ();
5417 ;
5418 return 0;
5419}
5420_ACEOF
5421rm -f conftest.$ac_objext conftest$ac_exeext
5422if { (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
5434else
5435 echo "$as_me: failed program was:" >&5
5436cat conftest.$ac_ext >&5
5437ac_cv_lib_dl_dlsym=no
5438fi
5439rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5440LIBS=$ac_check_lib_save_LIBS
5441fi
5442echo "$as_me:5442: result: $ac_cv_lib_dl_dlsym" >&5
5443echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5444if test $ac_cv_lib_dl_dlsym = yes; then
5445
5446 cf_have_dlsym=yes
5447 cf_have_libdl=yes
5448fi
5449
5450fi
5451
5452if test "$cf_have_dlsym" = yes ; then
5453 test "$cf_have_libdl" = yes &&
5454cf_add_libs="-ldl"
5455# Filter out duplicates - this happens with badly-designed ".pc" files...
5456for cf_add_1lib in $LIBS
5457do
5458 for cf_add_2lib in $cf_add_libs
5459 do
5460 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5461 then
5462 cf_add_1lib=
5463 break
5464 fi
5465 done
5466 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5467done
5468LIBS="$cf_add_libs"
5469
5470 echo "$as_me:5470: checking whether able to link to dl*() functions" >&5
5471echo $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>
5476int
5477main ()
5478{
5479
5480 void *obj;
5481 if ((obj = dlopen("filename", 0)) != 0) {
5482 if (dlsym(obj, "symbolname") == 0) {
5483 dlclose(obj);
5484 }
5485 }
5486 ;
5487 return 0;
5488}
5489_ACEOF
5490rm -f conftest.$ac_objext conftest$ac_exeext
5491if { (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
5502
5503cat >>confdefs.h <<\EOF
5504#define HAVE_LIBDL 1
5505EOF
5506
5507else
5508 echo "$as_me: failed program was:" >&5
5509cat conftest.$ac_ext >&5
5510
5511 { { echo "$as_me:5511: error: Cannot link test program for libdl" >&5
5512echo "$as_me: error: Cannot link test program for libdl" >&2;}
5513 { (exit 1); exit 1; }; }
5514fi
5515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5516 echo "$as_me:5516: result: ok" >&5
5517echo "${ECHO_T}ok" >&6
5518else
5519 { { echo "$as_me:5519: error: Cannot find dlsym function" >&5
5520echo "$as_me: error: Cannot find dlsym function" >&2;}
5521 { (exit 1); exit 1; }; }
5522fi
5523
5524 if test "x$with_gpm" != xyes ; then
5525 test -n "$verbose" && echo " assuming soname for gpm is $with_gpm" 1>&6
5526
5527echo "${as_me:-configure}:5527: testing assuming soname for gpm is $with_gpm ..." 1>&5
5528
5529 cf_cv_gpm_soname="$with_gpm"
5530 else
5531
5532echo "$as_me:5532: checking for soname of gpm library" >&5
5533echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5534if test "${cf_cv_gpm_soname+set}" = set; then
5535 echo $ECHO_N "(cached) $ECHO_C" >&6
5536else
5537
5538cf_cv_gpm_soname=unknown
5539if test "$cross_compiling" != yes ; then
5540cat >conftest.$ac_ext <<CF_EOF
5541#include <gpm.h>
5542int main()
5543{
5544if (Gpm_Open(0,0)) Gpm_Close();
5545 ${cf_cv_main_return:-return}(0);
5546}
5547CF_EOF
5548cf_save_LIBS="$LIBS"
5549
5550cf_add_libs="-lgpm"
5551# Filter out duplicates - this happens with badly-designed ".pc" files...
5552for cf_add_1lib in $LIBS
5553do
5554 for cf_add_2lib in $cf_add_libs
5555 do
5556 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5557 then
5558 cf_add_1lib=
5559 break
5560 fi
5561 done
5562 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5563done
5564LIBS="$cf_add_libs"
5565
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
5578 fi
5579 fi
5580rm -rf conftest*
5581LIBS="$cf_save_LIBS"
5582fi
5583
5584fi
5585echo "$as_me:5585: result: $cf_cv_gpm_soname" >&5
5586echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5587
5588 fi
5589 test "$cf_cv_gpm_soname" != "unknown" &&
5590cat >>confdefs.h <<EOF
5591#define LIBGPM_SONAME "$cf_cv_gpm_soname"
5592EOF
5593
5594 SHLIB_LIST="-ldl $SHLIB_LIST"
5595 else
5596 SHLIB_LIST="-lgpm $SHLIB_LIST"
5597
5598cf_add_libs="-lgpm"
5599# Filter out duplicates - this happens with badly-designed ".pc" files...
5600for cf_add_1lib in $TEST_LIBS
5601do
5602 for cf_add_2lib in $cf_add_libs
5603 do
5604 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5605 then
5606 cf_add_1lib=
5607 break
5608 fi
5609 done
5610 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5611done
5612TEST_LIBS="$cf_add_libs"
5613
5614 fi
5615
5616cat >>confdefs.h <<\EOF
5617#define HAVE_LIBGPM 1
5618EOF
5619
5620echo "$as_me:5620: checking for Gpm_Wgetch in -lgpm" >&5
5621echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5622if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5623 echo $ECHO_N "(cached) $ECHO_C" >&6
5624else
5625 ac_check_lib_save_LIBS=$LIBS
5626LIBS="-lgpm $LIBS"
5627cat >conftest.$ac_ext <<_ACEOF
5628#line 5628 "configure"
5629#include "confdefs.h"
5630
5631/* Override any gcc2 internal prototype to avoid an error. */
5632#ifdef __cplusplus
5633extern "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. */
5637char Gpm_Wgetch ();
5638int
5639main ()
5640{
5641Gpm_Wgetch ();
5642 ;
5643 return 0;
5644}
5645_ACEOF
5646rm -f conftest.$ac_objext conftest$ac_exeext
5647if { (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
5659else
5660 echo "$as_me: failed program was:" >&5
5661cat conftest.$ac_ext >&5
5662ac_cv_lib_gpm_Gpm_Wgetch=no
5663fi
5664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5665LIBS=$ac_check_lib_save_LIBS
5666fi
5667echo "$as_me:5667: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5668echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5669if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5670
5671echo "$as_me:5671: checking if GPM is weakly bound to curses library" >&5
5672echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5673if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5674 echo $ECHO_N "(cached) $ECHO_C" >&6
5675else
5676
5677cf_cv_check_gpm_wgetch=unknown
5678if test "$cross_compiling" != yes ; then
5679
5680cat >conftest.$ac_ext <<CF_EOF
5681#include <gpm.h>
5682int main()
5683{
5684 Gpm_Wgetch();
5685 ${cf_cv_main_return:-return}(0);
5686}
5687CF_EOF
5688
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
5708 fi
5709 fi
5710 rm -rf conftest*
5711 LIBS="$cf_save_LIBS"
5712fi
5713
5714fi
5715echo "$as_me:5715: result: $cf_cv_check_gpm_wgetch" >&5
5716echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5717
5718if 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
5720echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5721fi
5722
5723fi
5724
5725fi
5726
5727# not everyone has "test -c"
5728if test -c /dev/sysmouse 2>/dev/null ; then
5729echo "$as_me:5729: checking if you want to use sysmouse" >&5
5730echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5731
5732# Check whether --with-sysmouse or --without-sysmouse was given.
5733if test "${with_sysmouse+set}" = set; then
5734 withval="$with_sysmouse"
5735 cf_with_sysmouse=$withval
5736else
5737 cf_with_sysmouse=maybe
5738fi;
5739 if test "$cf_with_sysmouse" != no ; then
5740 cat >conftest.$ac_ext <<_ACEOF
5741#line 5741 "configure"
5742#include "confdefs.h"
5743
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
5751
5752int
5753main ()
5754{
5755
5756 struct mouse_info the_mouse;
5757 ioctl(0, CONS_MOUSECTL, &the_mouse);
5758
5759 ;
5760 return 0;
5761}
5762_ACEOF
5763rm -f conftest.$ac_objext
5764if { (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
5776else
5777 echo "$as_me: failed program was:" >&5
5778cat conftest.$ac_ext >&5
5779cf_with_sysmouse=no
5780fi
5781rm -f conftest.$ac_objext conftest.$ac_ext
5782 fi
5783echo "$as_me:5783: result: $cf_with_sysmouse" >&5
5784echo "${ECHO_T}$cf_with_sysmouse" >&6
5785test "$cf_with_sysmouse" = yes &&
5786cat >>confdefs.h <<\EOF
5787#define USE_SYSMOUSE 1
5788EOF
5789
5790fi
5791
5792if 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=''
5795fi
5796
5797if 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=''
5800fi
5801
5802echo "$as_me:5802: checking for default loader flags" >&5
5803echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5804case $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='' ;;
5810esac
5811echo "$as_me:5811: result: $LD_MODEL" >&5
5812echo "${ECHO_T}$LD_MODEL" >&6
5813
5814case $DFT_LWR_MODEL in
5815(shared)
5816
5817echo "$as_me:5817: checking if rpath option should be used" >&5
5818echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5819
5820# Check whether --enable-rpath or --disable-rpath was given.
5821if test "${enable_rpath+set}" = set; then
5822 enableval="$enable_rpath"
5823 cf_cv_enable_rpath=$enableval
5824else
5825 cf_cv_enable_rpath=no
5826fi;
5827echo "$as_me:5827: result: $cf_cv_enable_rpath" >&5
5828echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5829
5830echo "$as_me:5830: checking if shared libraries should be relinked during install" >&5
5831echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5832
5833# Check whether --enable-relink or --disable-relink was given.
5834if test "${enable_relink+set}" = set; then
5835 enableval="$enable_relink"
5836 cf_cv_do_relink=$enableval
5837else
5838 cf_cv_do_relink=yes
5839fi;
5840echo "$as_me:5840: result: $cf_cv_do_relink" >&5
5841echo "${ECHO_T}$cf_cv_do_relink" >&6
5842 ;;
5843esac
5844
5845# we will build libraries one-level down.
5846rel_builddir=..
5847
5848LD_RPATH_OPT=
5849echo "$as_me:5849: checking for an rpath option" >&5
5850echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5851case $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 "
5857 fi
5858 ;;
5859(linux*|gnu*|k*bsd*-gnu)
5860 LD_RPATH_OPT="-Wl,-rpath,"
5861 ;;
5862(openbsd[2-9].*|mirbsd*)
5863 LD_RPATH_OPT="-Wl,-rpath,"
5864 ;;
5865(dragonfly*|freebsd*)
5866 LD_RPATH_OPT="-rpath "
5867 ;;
5868(netbsd*)
5869 LD_RPATH_OPT="-Wl,-rpath,"
5870 ;;
5871(osf*|mls+*)
5872 LD_RPATH_OPT="-rpath "
5873 ;;
5874(solaris2*)
5875 LD_RPATH_OPT="-R"
5876 ;;
5877(*)
5878 ;;
5879esac
5880echo "$as_me:5880: result: $LD_RPATH_OPT" >&5
5881echo "${ECHO_T}$LD_RPATH_OPT" >&6
5882
5883case "x$LD_RPATH_OPT" in
5884(x-R*)
5885 echo "$as_me:5885: checking if we need a space after rpath option" >&5
5886echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5887 cf_save_LIBS="$LIBS"
5888
5889cf_add_libs="${LD_RPATH_OPT}$libdir"
5890# Filter out duplicates - this happens with badly-designed ".pc" files...
5891for cf_add_1lib in $LIBS
5892do
5893 for cf_add_2lib in $cf_add_libs
5894 do
5895 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5896 then
5897 cf_add_1lib=
5898 break
5899 fi
5900 done
5901 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5902done
5903LIBS="$cf_add_libs"
5904
5905 cat >conftest.$ac_ext <<_ACEOF
5906#line 5906 "configure"
5907#include "confdefs.h"
5908
5909int
5910main ()
5911{
5912
5913 ;
5914 return 0;
5915}
5916_ACEOF
5917rm -f conftest.$ac_objext conftest$ac_exeext
5918if { (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
5930else
5931 echo "$as_me: failed program was:" >&5
5932cat conftest.$ac_ext >&5
5933cf_rpath_space=yes
5934fi
5935rm -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
5938echo "${ECHO_T}$cf_rpath_space" >&6
5939 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5940 ;;
5941esac
5942
5943 RM_SHARED_OPTS=
5944 LOCAL_LDFLAGS=
5945 LOCAL_LDFLAGS2=
5946 LD_SHARED_OPTS=
5947 INSTALL_LIB="-m 644"
5948 : ${rel_builddir:=.}
5949
5950 shlibdir=$libdir
5951
5952 MAKE_DLLS="#"
5953
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"
5957
5958 echo "$as_me:5958: checking if release/abi version should be used for shared libs" >&5
5959echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5960
5961# Check whether --with-shlib-version or --without-shlib-version was given.
5962if 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
5968 ;;
5969 (rel|abi|auto|no)
5970 cf_cv_shlib_version=$withval
5971 ;;
5972 (*)
5973 { { echo "$as_me:5973: error: option value must be one of: rel, abi, auto or no" >&5
5974echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5975 { (exit 1); exit 1; }; }
5976 ;;
5977 esac
5978
5979else
5980 cf_cv_shlib_version=auto
5981fi;
5982 echo "$as_me:5982: result: $cf_cv_shlib_version" >&5
5983echo "${ECHO_T}$cf_cv_shlib_version" >&6
5984
5985 cf_cv_rm_so_locs=no
5986 cf_try_cflags=
5987
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
5993echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5994 cf_save_CFLAGS="$CFLAGS"
5995 for CC_SHARED_OPTS in -fPIC -fpic ''
5996 do
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>
6002int
6003main ()
6004{
6005int x = 1
6006 ;
6007 return 0;
6008}
6009_ACEOF
6010rm -f conftest.$ac_objext
6011if { (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
6023else
6024 echo "$as_me: failed program was:" >&5
6025cat conftest.$ac_ext >&5
6026fi
6027rm -f conftest.$ac_objext conftest.$ac_ext
6028 done
6029 echo "$as_me:6029: result: $CC_SHARED_OPTS" >&5
6030echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6031 CFLAGS="$cf_save_CFLAGS"
6032 fi
6033
6034 cf_cv_shlib_version_infix=no
6035
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 $@'
6045 fi
6046 ;;
6047 (beos*)
6048 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6049 ;;
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
6067EOF
6068 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6069CF_EOF
6070 chmod +x mk_shared_lib.sh
6071 ;;
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
6089EOF
6090 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6091CF_EOF
6092 chmod +x mk_shared_lib.sh
6093 ;;
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
6101echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6102if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6103 echo $ECHO_N "(cached) $ECHO_C" >&6
6104else
6105
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"
6111
6112int
6113main ()
6114{
6115int i;
6116 ;
6117 return 0;
6118}
6119_ACEOF
6120rm -f conftest.$ac_objext conftest$ac_exeext
6121if { (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
6133else
6134 echo "$as_me: failed program was:" >&5
6135cat conftest.$ac_ext >&5
6136cf_cv_ldflags_search_paths_first=no
6137fi
6138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6139 LDFLAGS=$cf_save_LDFLAGS
6140fi
6141echo "$as_me:6141: result: $cf_cv_ldflags_search_paths_first" >&5
6142echo "${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"
6145 fi
6146 ;;
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'
6151 fi
6152 MK_SHARED_LIB='${LD} -b -o $@'
6153 INSTALL_LIB="-m 555"
6154 ;;
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}'
6162 fi
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"
6167 ;;
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 `'
6174 fi
6175 CC_SHARED_OPTS=
6176 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6177 ;;
6178 (irix*)
6179 if test "$cf_cv_enable_rpath" = yes ; then
6180 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6181 fi
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 $@'
6188 fi
6189 cf_cv_rm_so_locs=yes
6190 ;;
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"
6195 fi
6196 if test "$cf_cv_enable_rpath" = yes ; then
6197 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6198 fi
6199
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 $@`'
6205 fi
6206
6207 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6208 ;;
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"
6218 fi
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
6231EOF
6232 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6233CF_EOF
6234 chmod +x mk_shared_lib.sh
6235 ;;
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"
6240 fi
6241 if test "$cf_cv_enable_rpath" = yes ; then
6242 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6243 fi
6244 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6245
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 $@`'
6251 fi
6252
6253 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6254 ;;
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
6259 ;;
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"
6266 fi
6267
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 $@`'
6273 fi
6274
6275 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6276 ;;
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
6288 fi
6289 fi
6290
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 $@`'
6296 fi
6297
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 $@'
6301 fi
6302 ;;
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"
6311 ;;
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"
6317 fi
6318 cf_cv_rm_so_locs=yes
6319 ;;
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'
6324 fi
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
6329 fi
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'
6333 ;;
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'
6338 fi
6339 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6340 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6341 ;;
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"
6348 fi
6349 if test "$cf_cv_enable_rpath" = yes ; then
6350 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6351 fi
6352
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 $@`'
6358 fi
6359
6360 if test "$GCC" != yes; then
6361 cf_save_CFLAGS="$CFLAGS"
6362 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6363 do
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>
6369int
6370main ()
6371{
6372printf("Hello\n");
6373 ;
6374 return 0;
6375}
6376_ACEOF
6377rm -f conftest.$ac_objext
6378if { (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
6390else
6391 echo "$as_me: failed program was:" >&5
6392cat conftest.$ac_ext >&5
6393fi
6394rm -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 $@'
6401 fi
6402 ;;
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'
6407 fi
6408 MK_SHARED_LIB='${LD} -d y -G -o $@'
6409 ;;
6410 (*)
6411 CC_SHARED_OPTS='unknown'
6412 MK_SHARED_LIB='echo unknown'
6413 ;;
6414 esac
6415
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
6422 ;;
6423 (*)
6424 { echo "$as_me:6424: WARNING: ignored --with-shlib-version" >&5
6425echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6426 ;;
6427 esac
6428 ;;
6429 esac
6430
6431 if test -n "$cf_try_cflags"
6432 then
6433cat > conftest.$ac_ext <<EOF
6434#line 6434 "${as_me:-configure}"
6435#include <stdio.h>
6436int main(int argc, char *argv[])
6437{
6438 printf("hello\n");
6439 return (argv[argc-1] == 0) ;
6440}
6441EOF
6442 cf_save_CFLAGS="$CFLAGS"
6443 for cf_opt in $cf_try_cflags
6444 do
6445 CFLAGS="$cf_save_CFLAGS -$cf_opt"
6446 echo "$as_me:6446: checking if CFLAGS option -$cf_opt works" >&5
6447echo $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
6454echo "${ECHO_T}yes" >&6
6455 cf_save_CFLAGS="$CFLAGS"
6456 else
6457 echo "$as_me:6457: result: no" >&5
6458echo "${ECHO_T}no" >&6
6459 fi
6460 done
6461 CFLAGS="$cf_save_CFLAGS"
6462 fi
6463
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}"
6467
6468 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6469
6470 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6471
6472echo "${as_me:-configure}:6472: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6473
6474 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
6475
6476echo "${as_me:-configure}:6476: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
6477
6478for model in $cf_list_models; do
6479 case $model in
6480 (libtool)
6481
6482echo "$as_me:6482: checking for additional libtool options" >&5
6483echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6484
6485# Check whether --with-libtool-opts or --without-libtool-opts was given.
6486if test "${with_libtool_opts+set}" = set; then
6487 withval="$with_libtool_opts"
6488 with_libtool_opts=$withval
6489else
6490 with_libtool_opts=no
6491fi;
6492echo "$as_me:6492: result: $with_libtool_opts" >&5
6493echo "${ECHO_T}$with_libtool_opts" >&6
6494
6495case .$with_libtool_opts in
6496(.yes|.no|.)
6497 ;;
6498(*)
6499 LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6500 ;;
6501esac
6502
6503echo "$as_me:6503: checking if exported-symbols file should be used" >&5
6504echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6505
6506# Check whether --with-export-syms or --without-export-syms was given.
6507if test "${with_export_syms+set}" = set; then
6508 withval="$with_export_syms"
6509 with_export_syms=$withval
6510else
6511 with_export_syms=no
6512fi;
6513if test "x$with_export_syms" = xyes
6514then
6515 with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6516
6517fi
6518echo "$as_me:6518: result: $with_export_syms" >&5
6519echo "${ECHO_T}$with_export_syms" >&6
6520if test "x$with_export_syms" != xno
6521then
6522 EXPORT_SYMS="-export-symbols $with_export_syms"
6523
6524fi
6525
6526 ;;
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
6530echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6531 { (exit 1); exit 1; }; }
6532 fi
6533
6534echo "$as_me:6534: checking if versioned-symbols file should be used" >&5
6535echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6536
6537# Check whether --with-versioned-syms or --without-versioned-syms was given.
6538if test "${with_versioned_syms+set}" = set; then
6539 withval="$with_versioned_syms"
6540 with_versioned_syms=$withval
6541else
6542 with_versioned_syms=no
6543fi;
6544if test "x$with_versioned_syms" = xyes
6545then
6546 with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6547
6548fi
6549echo "$as_me:6549: result: $with_versioned_syms" >&5
6550echo "${ECHO_T}$with_versioned_syms" >&6
6551
6552RESULTING_SYMS=
6553VERSIONED_SYMS=
6554WILDCARD_SYMS=
6555
6556if test "x$with_versioned_syms" != xno
6557then
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
6564
6565echo "${as_me:-configure}:6565: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
6566
6567 ;;
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
6572
6573echo "${as_me:-configure}:6573: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
6574
6575 ;;
6576 (*)
6577 { echo "$as_me:6577: WARNING: this system does not support versioned-symbols" >&5
6578echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6579 ;;
6580 esac
6581
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
6590echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6591 WILDCARD_SYMS=no
6592
6593 # make sources
6594 rm -f conftest.*
6595
6596 cat >conftest.ver <<EOF
6597module_1.0 {
6598global:
6599 globalf1;
6600local:
6601 localf1;
6602};
6603module_2.0 {
6604global:
6605 globalf2;
6606local:
6607 localf2;
6608 _*;
6609} module_1.0;
6610submodule_1.0 {
6611global:
6612 subglobalf1;
6613 _ismissing;
6614local:
6615 sublocalf1;
6616};
6617submodule_2.0 {
6618global:
6619 subglobalf2;
6620local:
6621 sublocalf2;
6622 _*;
6623} submodule_1.0;
6624EOF
6625 cat >conftest.$ac_ext <<EOF
6626#line 6626 "configure"
6627int _ismissing(void) { return 1; }
6628int _localf1(void) { return 1; }
6629int _localf2(void) { return 2; }
6630int globalf1(void) { return 1; }
6631int globalf2(void) { return 2; }
6632int _sublocalf1(void) { return 1; }
6633int _sublocalf2(void) { return 2; }
6634int subglobalf1(void) { return 1; }
6635int subglobalf2(void) { return 2; }
6636EOF
6637 cat >conftest.mk <<EOF
6638CC=${CC}
6639CFLAGS=${CFLAGS}
6640CPPFLAGS=${CPPFLAGS}
6641LDFLAGS=${LDFLAGS}
6642LIBS=${LIBS}
6643VERSIONED_SYMS=${VERSIONED_SYMS}
6644RESULTING_SYMS=conftest.ver
6645MK_SHARED_LIB=${MK_SHARED_LIB}
6646conftest.so: conftest.$ac_cv_objext
6647 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6648EOF
6649
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
6656 fi
6657 echo "$as_me:6657: result: $WILDCARD_SYMS" >&5
6658echo "${ECHO_T}$WILDCARD_SYMS" >&6
6659 rm -f conftest.*
6660 fi
6661fi
6662
6663 ;;
6664 esac
6665done
6666
6667# pretend that ncurses==ncursesw==ncursest
6668echo "$as_me:6668: checking if you want to disable library suffixes" >&5
6669echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6670
6671# Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6672if 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
6679 fi
6680else
6681 enableval=yes
6682 disable_lib_suffixes=no
6683
6684fi;
6685echo "$as_me:6685: result: $disable_lib_suffixes" >&5
6686echo "${ECHO_T}$disable_lib_suffixes" >&6
6687
6688### If we're building with rpath, try to link non-standard libs that way too.
6689if test "$DFT_LWR_MODEL" = "shared"; then
6690
6691echo "$as_me:6691: checking if rpath-hack should be disabled" >&5
6692echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6693
6694# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6695if 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
6702 fi
6703else
6704 enableval=yes
6705 cf_disable_rpath_hack=no
6706
6707fi;
6708echo "$as_me:6708: result: $cf_disable_rpath_hack" >&5
6709echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6710if test "$cf_disable_rpath_hack" = no ; then
6711
6712echo "$as_me:6712: checking for updated LDFLAGS" >&5
6713echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6714if test -n "$LD_RPATH_OPT" ; then
6715 echo "$as_me:6715: result: maybe" >&5
6716echo "${ECHO_T}maybe" >&6
6717
6718 for ac_prog in ldd
6719do
6720 # Extract the first word of "$ac_prog", so it can be a program name with args.
6721set dummy $ac_prog; ac_word=$2
6722echo "$as_me:6722: checking for $ac_word" >&5
6723echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6724if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6725 echo $ECHO_N "(cached) $ECHO_C" >&6
6726else
6727 if test -n "$cf_ldd_prog"; then
6728 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6729else
6730 ac_save_IFS=$IFS; IFS=$ac_path_separator
6731ac_dummy="$PATH"
6732for 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
6736ac_cv_prog_cf_ldd_prog="$ac_prog"
6737echo "$as_me:6737: found $ac_dir/$ac_word" >&5
6738break
6739done
6740
6741fi
6742fi
6743cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6744if test -n "$cf_ldd_prog"; then
6745 echo "$as_me:6745: result: $cf_ldd_prog" >&5
6746echo "${ECHO_T}$cf_ldd_prog" >&6
6747else
6748 echo "$as_me:6748: result: no" >&5
6749echo "${ECHO_T}no" >&6
6750fi
6751
6752 test -n "$cf_ldd_prog" && break
6753done
6754test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6755
6756 cf_rpath_list="/usr/lib /lib"
6757 if test "$cf_ldd_prog" != no
6758 then
6759 cf_rpath_oops=
6760
6761cat >conftest.$ac_ext <<_ACEOF
6762#line 6762 "configure"
6763#include "confdefs.h"
6764#include <stdio.h>
6765int
6766main ()
6767{
6768printf("Hello");
6769 ;
6770 return 0;
6771}
6772_ACEOF
6773rm -f conftest.$ac_objext conftest$ac_exeext
6774if { (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`
6787else
6788 echo "$as_me: failed program was:" >&5
6789cat conftest.$ac_ext >&5
6790fi
6791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6792
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
6801 do
6802 for cf_rpath_dir in \
6803 /usr/local \
6804 /usr/pkg \
6805 /opt/sfw
6806 do
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
6810
6811echo "${as_me:-configure}:6811: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6812
6813 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6814 break
6815 fi
6816 done
6817 done
6818 fi
6819 fi
6820
6821 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6822
6823echo "${as_me:-configure}:6823: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6824
6825test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
6826
6827echo "${as_me:-configure}:6827: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6828
6829cf_rpath_dst=
6830for cf_rpath_src in $LDFLAGS
6831do
6832 case $cf_rpath_src in
6833 (-L*)
6834
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
6840 do
6841 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6842 then
6843 cf_rpath_skip=yes
6844 break
6845 fi
6846 done
6847 fi
6848
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%"`
6856 fi
6857
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
6863
6864echo "${as_me:-configure}:6864: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6865
6866 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6867 fi
6868 fi
6869 ;;
6870 esac
6871 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6872done
6873LDFLAGS=$cf_rpath_dst
6874
6875test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
6876
6877echo "${as_me:-configure}:6877: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6878
6879test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
6880
6881echo "${as_me:-configure}:6881: testing ...checking LIBS $LIBS ..." 1>&5
6882
6883cf_rpath_dst=
6884for cf_rpath_src in $LIBS
6885do
6886 case $cf_rpath_src in
6887 (-L*)
6888
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
6894 do
6895 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6896 then
6897 cf_rpath_skip=yes
6898 break
6899 fi
6900 done
6901 fi
6902
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%"`
6910 fi
6911
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
6917
6918echo "${as_me:-configure}:6918: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6919
6920 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6921 fi
6922 fi
6923 ;;
6924 esac
6925 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6926done
6927LIBS=$cf_rpath_dst
6928
6929test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
6930
6931echo "${as_me:-configure}:6931: testing ...checked LIBS $LIBS ..." 1>&5
6932
6933 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6934
6935echo "${as_me:-configure}:6935: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6936
6937else
6938 echo "$as_me:6938: result: no" >&5
6939echo "${ECHO_T}no" >&6
6940fi
6941
6942fi
6943
6944fi
6945
6946###############################################################################
6947
6948### use option --with-extra-suffix to append suffix to headers and libraries
6949echo "$as_me:6949: checking if you wish to append extra suffix to header/library paths" >&5
6950echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6951EXTRA_SUFFIX=
6952
6953# Check whether --with-extra-suffix or --without-extra-suffix was given.
6954if test "${with_extra_suffix+set}" = set; then
6955 withval="$with_extra_suffix"
6956 case x$withval in
6957 (no)
6958 ;;
6959 (xyes|x)
6960 EXTRA_SUFFIX=$cf_cv_abi_version
6961 ;;
6962 (*)
6963 EXTRA_SUFFIX=$withval
6964 ;;
6965 esac
6966
6967fi;
6968echo "$as_me:6968: result: $EXTRA_SUFFIX" >&5
6969echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6970
6971### use option --disable-overwrite to leave out the link to -lcurses
6972echo "$as_me:6972: checking if you wish to install ncurses overwriting curses" >&5
6973echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6974
6975# Check whether --enable-overwrite or --disable-overwrite was given.
6976if test "${enable_overwrite+set}" = set; then
6977 enableval="$enable_overwrite"
6978 with_overwrite=$enableval
6979else
6980 if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6981fi;
6982echo "$as_me:6982: result: $with_overwrite" >&5
6983echo "${ECHO_T}$with_overwrite" >&6
6984
6985echo "$as_me:6985: checking if external terminfo-database is used" >&5
6986echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6987
6988# Check whether --enable-database or --disable-database was given.
6989if test "${enable_database+set}" = set; then
6990 enableval="$enable_database"
6991 use_database=$enableval
6992else
6993 use_database=yes
6994fi;
6995echo "$as_me:6995: result: $use_database" >&5
6996echo "${ECHO_T}$use_database" >&6
6997
6998case $host_os in
6999(os2*)
7000 TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7001 ;;
7002(*)
7003 TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7004 ;;
7005esac
7006
7007NCURSES_USE_DATABASE=0
7008if test "$use_database" != no ; then
7009 NCURSES_USE_DATABASE=1
7010
7011 echo "$as_me:7011: checking which terminfo source-file will be installed" >&5
7012echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7013
7014# Check whether --with-database or --without-database was given.
7015if test "${with_database+set}" = set; then
7016 withval="$with_database"
7017 TERMINFO_SRC=$withval
7018fi;
7019 echo "$as_me:7019: result: $TERMINFO_SRC" >&5
7020echo "${ECHO_T}$TERMINFO_SRC" >&6
7021
7022 echo "$as_me:7022: checking whether to use hashed database instead of directory/tree" >&5
7023echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7024
7025# Check whether --with-hashed-db or --without-hashed-db was given.
7026if test "${with_hashed_db+set}" = set; then
7027 withval="$with_hashed_db"
7028
7029else
7030 with_hashed_db=no
7031fi;
7032 echo "$as_me:7032: result: $with_hashed_db" >&5
7033echo "${ECHO_T}$with_hashed_db" >&6
7034else
7035 with_hashed_db=no
7036fi
7037
7038echo "$as_me:7038: checking for list of fallback descriptions" >&5
7039echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7040
7041# Check whether --with-fallbacks or --without-fallbacks was given.
7042if test "${with_fallbacks+set}" = set; then
7043 withval="$with_fallbacks"
7044 with_fallback=$withval
7045else
7046 with_fallback=
7047fi;
7048echo "$as_me:7048: result: $with_fallback" >&5
7049echo "${ECHO_T}$with_fallback" >&6
7050FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7051
7052echo "$as_me:7052: checking if you want modern xterm or antique" >&5
7053echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7054
7055# Check whether --with-xterm-new or --without-xterm-new was given.
7056if test "${with_xterm_new+set}" = set; then
7057 withval="$with_xterm_new"
7058 with_xterm_new=$withval
7059else
7060 with_xterm_new=yes
7061fi;
7062case $with_xterm_new in
7063(no) with_xterm_new=xterm-old;;
7064(*) with_xterm_new=xterm-new;;
7065esac
7066echo "$as_me:7066: result: $with_xterm_new" >&5
7067echo "${ECHO_T}$with_xterm_new" >&6
7068WHICH_XTERM=$with_xterm_new
7069
7070echo "$as_me:7070: checking if xterm backspace sends BS or DEL" >&5
7071echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7072
7073# Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7074if test "${with_xterm_kbs+set}" = set; then
7075 withval="$with_xterm_kbs"
7076 with_xterm_kbs=$withval
7077else
7078 with_xterm_kbs=BS
7079fi;
7080case x$with_xterm_kbs in
7081(xyes|xno|xBS|xbs|x8)
7082 with_xterm_kbs=BS
7083 ;;
7084(xDEL|xdel|x127)
7085 with_xterm_kbs=DEL
7086 ;;
7087(*)
7088 with_xterm_kbs=$withval
7089 ;;
7090esac
7091echo "$as_me:7091: result: $with_xterm_kbs" >&5
7092echo "${ECHO_T}$with_xterm_kbs" >&6
7093XTERM_KBS=$with_xterm_kbs
7094
7095MAKE_TERMINFO=
7096if test "$use_database" = no ; then
7097 TERMINFO="${datadir}/terminfo"
7098 MAKE_TERMINFO="#"
7099else
7100
7101echo "$as_me:7101: checking for list of terminfo directories" >&5
7102echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7103
7104# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7105if test "${with_terminfo_dirs+set}" = set; then
7106 withval="$with_terminfo_dirs"
7107
7108else
7109 withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7110fi;
7111IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7112cf_dst_path=
7113for cf_src_path in $withval
7114do
7115
7116if test "x$prefix" != xNONE; then
7117 cf_path_syntax="$prefix"
7118else
7119 cf_path_syntax="$ac_default_prefix"
7120fi
7121
7122case ".$cf_src_path" in
7123(.\$\(*\)*|.\'*\'*)
7124 ;;
7125(..|./*|.\\*)
7126 ;;
7127(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7128 ;;
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%`
7134 ;;
7135 esac
7136 ;;
7137(.no|.NONE/*)
7138 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7139 ;;
7140(*)
7141 { { echo "$as_me:7141: error: expected a pathname, not \"$cf_src_path\"" >&5
7142echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7143 { (exit 1); exit 1; }; }
7144 ;;
7145esac
7146
7147 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7148 cf_dst_path="${cf_dst_path}${cf_src_path}"
7149done
7150IFS="$ac_save_ifs"
7151
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"...
7154eval cf_dst_eval="$cf_dst_path"
7155case "x$cf_dst_eval" in
7156(xNONE*)
7157 TERMINFO_DIRS=$cf_dst_path
7158 ;;
7159(*)
7160 TERMINFO_DIRS="$cf_dst_eval"
7161 ;;
7162esac
7163
7164echo "$as_me:7164: result: $TERMINFO_DIRS" >&5
7165echo "${ECHO_T}$TERMINFO_DIRS" >&6
7166test -n "$TERMINFO_DIRS" &&
7167cat >>confdefs.h <<EOF
7168#define TERMINFO_DIRS "$TERMINFO_DIRS"
7169EOF
7170
7171echo "$as_me:7171: checking for default terminfo directory" >&5
7172echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7173
7174# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7175if test "${with_default_terminfo_dir+set}" = set; then
7176 withval="$with_default_terminfo_dir"
7177
7178else
7179 withval="${TERMINFO:-${datadir}/terminfo}"
7180fi; if test -n "${datadir}/terminfo" ; then
7181
7182if test "x$prefix" != xNONE; then
7183 cf_path_syntax="$prefix"
7184else
7185 cf_path_syntax="$ac_default_prefix"
7186fi
7187
7188case ".$withval" in
7189(.\$\(*\)*|.\'*\'*)
7190 ;;
7191(..|./*|.\\*)
7192 ;;
7193(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7194 ;;
7195(.\${*prefix}*|.\${*dir}*)
7196 eval withval="$withval"
7197 case ".$withval" in
7198 (.NONE/*)
7199 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7200 ;;
7201 esac
7202 ;;
7203(.no|.NONE/*)
7204 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7205 ;;
7206(*)
7207 { { echo "$as_me:7207: error: expected a pathname, not \"$withval\"" >&5
7208echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7209 { (exit 1); exit 1; }; }
7210 ;;
7211esac
7212
7213fi
7214eval TERMINFO="$withval"
7215
7216echo "$as_me:7216: result: $TERMINFO" >&5
7217echo "${ECHO_T}$TERMINFO" >&6
7218
7219cat >>confdefs.h <<EOF
7220#define TERMINFO "$TERMINFO"
7221EOF
7222
7223fi
7224
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.
7227echo "$as_me:7227: checking if big-core option selected" >&5
7228echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7229
7230# Check whether --enable-big-core or --disable-big-core was given.
7231if test "${enable_big_core+set}" = set; then
7232 enableval="$enable_big_core"
7233 with_big_core=$enableval
7234else
7235 if test "$cross_compiling" = yes; then
7236 with_big_core=no
7237else
7238 cat >conftest.$ac_ext <<_ACEOF
7239#line 7239 "configure"
7240#include "confdefs.h"
7241
7242#include <stdlib.h>
7243#include <string.h>
7244int 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);
7250}
7251_ACEOF
7252rm -f conftest$ac_exeext
7253if { (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
7264else
7265 echo "$as_me: program exited with status $ac_status" >&5
7266echo "$as_me: failed program was:" >&5
7267cat conftest.$ac_ext >&5
7268with_big_core=no
7269fi
7270rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7271fi
7272fi;
7273echo "$as_me:7273: result: $with_big_core" >&5
7274echo "${ECHO_T}$with_big_core" >&6
7275test "x$with_big_core" = "xyes" &&
7276cat >>confdefs.h <<\EOF
7277#define HAVE_BIG_CORE 1
7278EOF
7279
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.
7283echo "$as_me:7283: checking if big-strings option selected" >&5
7284echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7285
7286# Check whether --enable-big-strings or --disable-big-strings was given.
7287if test "${enable_big_strings+set}" = set; then
7288 enableval="$enable_big_strings"
7289 with_big_strings=$enableval
7290else
7291
7292 case x$AWK in
7293 (x)
7294 eval with_big_strings=no
7295 ;;
7296 (*)
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
7302 fi
7303 ;;
7304 esac
7305
7306fi;
7307echo "$as_me:7307: result: $with_big_strings" >&5
7308echo "${ECHO_T}$with_big_strings" >&6
7309
7310USE_BIG_STRINGS=0
7311test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7312
7313### use option --enable-termcap to compile in the termcap fallback support
7314echo "$as_me:7314: checking if you want termcap-fallback support" >&5
7315echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7316
7317# Check whether --enable-termcap or --disable-termcap was given.
7318if test "${enable_termcap+set}" = set; then
7319 enableval="$enable_termcap"
7320 with_termcap=$enableval
7321else
7322 with_termcap=no
7323fi;
7324echo "$as_me:7324: result: $with_termcap" >&5
7325echo "${ECHO_T}$with_termcap" >&6
7326
7327NCURSES_USE_TERMCAP=0
7328if 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
7332echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7333 { (exit 1); exit 1; }; }
7334 fi
7335 fi
7336
7337cat >>confdefs.h <<\EOF
7338#define PURE_TERMINFO 1
7339EOF
7340
7341else
7342
7343 if test "$with_ticlib" != no ; then
7344 { { echo "$as_me:7344: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7345echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7346 { (exit 1); exit 1; }; }
7347 fi
7348
7349 NCURSES_USE_TERMCAP=1
7350 echo "$as_me:7350: checking for list of termcap files" >&5
7351echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7352
7353# Check whether --with-termpath or --without-termpath was given.
7354if test "${with_termpath+set}" = set; then
7355 withval="$with_termpath"
7356
7357else
7358 withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7359fi;
7360IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7361cf_dst_path=
7362for cf_src_path in $withval
7363do
7364
7365if test "x$prefix" != xNONE; then
7366 cf_path_syntax="$prefix"
7367else
7368 cf_path_syntax="$ac_default_prefix"
7369fi
7370
7371case ".$cf_src_path" in
7372(.\$\(*\)*|.\'*\'*)
7373 ;;
7374(..|./*|.\\*)
7375 ;;
7376(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7377 ;;
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%`
7383 ;;
7384 esac
7385 ;;
7386(.no|.NONE/*)
7387 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7388 ;;
7389(*)
7390 { { echo "$as_me:7390: error: expected a pathname, not \"$cf_src_path\"" >&5
7391echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7392 { (exit 1); exit 1; }; }
7393 ;;
7394esac
7395
7396 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7397 cf_dst_path="${cf_dst_path}${cf_src_path}"
7398done
7399IFS="$ac_save_ifs"
7400
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"...
7403eval cf_dst_eval="$cf_dst_path"
7404case "x$cf_dst_eval" in
7405(xNONE*)
7406 TERMPATH=$cf_dst_path
7407 ;;
7408(*)
7409 TERMPATH="$cf_dst_eval"
7410 ;;
7411esac
7412
7413 echo "$as_me:7413: result: $TERMPATH" >&5
7414echo "${ECHO_T}$TERMPATH" >&6
7415 test -n "$TERMPATH" &&
7416cat >>confdefs.h <<EOF
7417#define TERMPATH "$TERMPATH"
7418EOF
7419
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
7422echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7423
7424# Check whether --enable-getcap or --disable-getcap was given.
7425if test "${enable_getcap+set}" = set; then
7426 enableval="$enable_getcap"
7427 with_getcap=$enableval
7428else
7429 with_getcap=no
7430fi;
7431 echo "$as_me:7431: result: $with_getcap" >&5
7432echo "${ECHO_T}$with_getcap" >&6
7433 test "x$with_getcap" = "xyes" &&
7434cat >>confdefs.h <<\EOF
7435#define USE_GETCAP 1
7436EOF
7437
7438 echo "$as_me:7438: checking if translated termcaps will be cached in ~/.terminfo" >&5
7439echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7440
7441# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7442if test "${enable_getcap_cache+set}" = set; then
7443 enableval="$enable_getcap_cache"
7444 with_getcap_cache=$enableval
7445else
7446 with_getcap_cache=no
7447fi;
7448 echo "$as_me:7448: result: $with_getcap_cache" >&5
7449echo "${ECHO_T}$with_getcap_cache" >&6
7450 test "x$with_getcap_cache" = "xyes" &&
7451cat >>confdefs.h <<\EOF
7452#define USE_GETCAP_CACHE 1
7453EOF
7454
7455fi
7456
7457### Use option --disable-home-terminfo to completely remove ~/.terminfo
7458echo "$as_me:7458: checking if ~/.terminfo is wanted" >&5
7459echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7460
7461# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7462if test "${enable_home_terminfo+set}" = set; then
7463 enableval="$enable_home_terminfo"
7464 with_home_terminfo=$enableval
7465else
7466 with_home_terminfo=yes
7467fi;
7468echo "$as_me:7468: result: $with_home_terminfo" >&5
7469echo "${ECHO_T}$with_home_terminfo" >&6
7470test "x$with_home_terminfo" = "xyes" &&
7471cat >>confdefs.h <<\EOF
7472#define USE_HOME_TERMINFO 1
7473EOF
7474
7475echo "$as_me:7475: checking if you want to use restricted environment when running as root" >&5
7476echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7477
7478# Check whether --enable-root-environ or --disable-root-environ was given.
7479if test "${enable_root_environ+set}" = set; then
7480 enableval="$enable_root_environ"
7481 with_root_environ=$enableval
7482else
7483 with_root_environ=yes
7484fi;
7485echo "$as_me:7485: result: $with_root_environ" >&5
7486echo "${ECHO_T}$with_root_environ" >&6
7487test "x$with_root_environ" = xyes &&
7488cat >>confdefs.h <<\EOF
7489#define USE_ROOT_ENVIRON 1
7490EOF
7491
7492### Use option --enable-symlinks to make tic use symlinks, not hard links
7493### to reduce storage requirements for the terminfo database.
7494
7495for ac_func in \
7496 remove \
7497 unlink
7498do
7499as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7500echo "$as_me:7500: checking for $ac_func" >&5
7501echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7502if eval "test \"\${$as_ac_var+set}\" = set"; then
7503 echo $ECHO_N "(cached) $ECHO_C" >&6
7504else
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
7513extern "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. */
7517char $ac_func ();
7518char (*f) ();
7519
7520int
7521main ()
7522{
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)
7527choke me
7528#else
7529f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7530#endif
7531
7532 ;
7533 return 0;
7534}
7535_ACEOF
7536rm -f conftest.$ac_objext conftest$ac_exeext
7537if { (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"
7549else
7550 echo "$as_me: failed program was:" >&5
7551cat conftest.$ac_ext >&5
7552eval "$as_ac_var=no"
7553fi
7554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7555fi
7556echo "$as_me:7556: result: `eval echo '${'$as_ac_var'}'`" >&5
7557echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7558if test `eval echo '${'$as_ac_var'}'` = yes; then
7559 cat >>confdefs.h <<EOF
7560#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7561EOF
7562
7563fi
7564done
7565
7566if test "$cross_compiling" = yes ; then
7567
7568for ac_func in \
7569 link \
7570 symlink
7571do
7572as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7573echo "$as_me:7573: checking for $ac_func" >&5
7574echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7575if eval "test \"\${$as_ac_var+set}\" = set"; then
7576 echo $ECHO_N "(cached) $ECHO_C" >&6
7577else
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
7586extern "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. */
7590char $ac_func ();
7591char (*f) ();
7592
7593int
7594main ()
7595{
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)
7600choke me
7601#else
7602f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7603#endif
7604
7605 ;
7606 return 0;
7607}
7608_ACEOF
7609rm -f conftest.$ac_objext conftest$ac_exeext
7610if { (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"
7622else
7623 echo "$as_me: failed program was:" >&5
7624cat conftest.$ac_ext >&5
7625eval "$as_ac_var=no"
7626fi
7627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7628fi
7629echo "$as_me:7629: result: `eval echo '${'$as_ac_var'}'`" >&5
7630echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7631if test `eval echo '${'$as_ac_var'}'` = yes; then
7632 cat >>confdefs.h <<EOF
7633#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7634EOF
7635
7636fi
7637done
7638
7639else
7640 echo "$as_me:7640: checking if link/symlink functions work" >&5
7641echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7642if test "${cf_cv_link_funcs+set}" = set; then
7643 echo $ECHO_N "(cached) $ECHO_C" >&6
7644else
7645
7646 cf_cv_link_funcs=
7647 for cf_func in link symlink ; do
7648 if test "$cross_compiling" = yes; then
7649
7650 eval 'ac_cv_func_'$cf_func'=error'
7651else
7652 cat >conftest.$ac_ext <<_ACEOF
7653#line 7653 "configure"
7654#include "confdefs.h"
7655
7656#include <sys/types.h>
7657#include <sys/stat.h>
7658#ifdef HAVE_UNISTD_H
7659#include <unistd.h>
7660#endif
7661int main()
7662{
7663 int fail = 0;
7664 char *src = "config.log";
7665 char *dst = "conftest.chk";
7666 struct stat src_sb;
7667 struct stat dst_sb;
7668
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);
7679}
7680
7681_ACEOF
7682rm -f conftest$ac_exeext
7683if { (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
7693
7694 cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7695 eval 'ac_cv_func_'$cf_func'=yes'
7696else
7697 echo "$as_me: program exited with status $ac_status" >&5
7698echo "$as_me: failed program was:" >&5
7699cat conftest.$ac_ext >&5
7700
7701 eval 'ac_cv_func_'$cf_func'=no'
7702fi
7703rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7704fi
7705 done
7706 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7707
7708fi
7709echo "$as_me:7709: result: $cf_cv_link_funcs" >&5
7710echo "${ECHO_T}$cf_cv_link_funcs" >&6
7711 test "$ac_cv_func_link" = yes &&
7712cat >>confdefs.h <<\EOF
7713#define HAVE_LINK 1
7714EOF
7715
7716 test "$ac_cv_func_symlink" = yes &&
7717cat >>confdefs.h <<\EOF
7718#define HAVE_SYMLINK 1
7719EOF
7720
7721fi
7722
7723with_links=no
7724with_symlinks=no
7725
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.
7728if test "x$ac_cv_func_symlink" = xyes ; then
7729 echo "$as_me:7729: checking if tic should use symbolic links" >&5
7730echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7731
7732# Check whether --enable-symlinks or --disable-symlinks was given.
7733if test "${enable_symlinks+set}" = set; then
7734 enableval="$enable_symlinks"
7735 with_symlinks=$enableval
7736else
7737 with_symlinks=no
7738fi;
7739 echo "$as_me:7739: result: $with_symlinks" >&5
7740echo "${ECHO_T}$with_symlinks" >&6
7741fi
7742
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.
7745if test "$with_symlinks" = no ; then
7746 echo "$as_me:7746: checking if tic should use hard links" >&5
7747echo $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
7752 fi
7753 echo "$as_me:7753: result: $with_links" >&5
7754echo "${ECHO_T}$with_links" >&6
7755fi
7756
7757test "x$with_links" = xyes &&
7758cat >>confdefs.h <<\EOF
7759#define USE_LINKS 1
7760EOF
7761
7762test "x$with_symlinks" = xyes &&
7763cat >>confdefs.h <<\EOF
7764#define USE_SYMLINKS 1
7765EOF
7766
7767### use option --enable-broken-linker to force on use of broken-linker support
7768echo "$as_me:7768: checking if you want broken-linker support code" >&5
7769echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7770
7771# Check whether --enable-broken_linker or --disable-broken_linker was given.
7772if test "${enable_broken_linker+set}" = set; then
7773 enableval="$enable_broken_linker"
7774 with_broken_linker=$enableval
7775else
7776 with_broken_linker=${BROKEN_LINKER:-no}
7777fi;
7778echo "$as_me:7778: result: $with_broken_linker" >&5
7779echo "${ECHO_T}$with_broken_linker" >&6
7780
7781BROKEN_LINKER=0
7782if test "x$with_broken_linker" = xyes ; then
7783
7784cat >>confdefs.h <<\EOF
7785#define BROKEN_LINKER 1
7786EOF
7787
7788 BROKEN_LINKER=1
7789elif test "$DFT_LWR_MODEL" = shared ; then
7790 case $cf_cv_system_name in
7791 (cygwin*)
7792
7793cat >>confdefs.h <<\EOF
7794#define BROKEN_LINKER 1
7795EOF
7796
7797 BROKEN_LINKER=1
7798 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
7799
7800echo "${as_me:-configure}:7800: testing cygwin linker is broken anyway ..." 1>&5
7801
7802 ;;
7803 esac
7804fi
7805
7806### use option --enable-bsdpad to have tputs process BSD-style prefix padding
7807echo "$as_me:7807: checking if tputs should process BSD-style prefix padding" >&5
7808echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7809
7810# Check whether --enable-bsdpad or --disable-bsdpad was given.
7811if test "${enable_bsdpad+set}" = set; then
7812 enableval="$enable_bsdpad"
7813 with_bsdpad=$enableval
7814else
7815 with_bsdpad=no
7816fi;
7817echo "$as_me:7817: result: $with_bsdpad" >&5
7818echo "${ECHO_T}$with_bsdpad" >&6
7819test "x$with_bsdpad" = xyes &&
7820cat >>confdefs.h <<\EOF
7821#define BSD_TPUTS 1
7822EOF
7823
7824### use option --enable-widec to turn on use of wide-character support
7825NCURSES_CH_T=chtype
7826NCURSES_LIBUTF8=0
7827
7828NEED_WCHAR_H=0
7829NCURSES_MBSTATE_T=0
7830NCURSES_WCHAR_T=0
7831NCURSES_WINT_T=0
7832
7833# Check to define _XOPEN_SOURCE "automatically"
7834CPPFLAGS_before_XOPEN="$CPPFLAGS"
7835
7836cf_XOPEN_SOURCE=500
7837cf_POSIX_C_SOURCE=199506L
7838cf_xopen_source=
7839
7840case $host_os in
7841(aix[4-7]*)
7842 cf_xopen_source="-D_ALL_SOURCE"
7843 ;;
7844(cygwin|msys)
7845 cf_XOPEN_SOURCE=600
7846 ;;
7847(darwin[0-8].*)
7848 cf_xopen_source="-D_APPLE_C_SOURCE"
7849 ;;
7850(darwin*)
7851 cf_xopen_source="-D_DARWIN_C_SOURCE"
7852 cf_XOPEN_SOURCE=
7853 ;;
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"
7861 ;;
7862(hpux11*)
7863 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7864 ;;
7865(hpux*)
7866 cf_xopen_source="-D_HPUX_SOURCE"
7867 ;;
7868(irix[56].*)
7869 cf_xopen_source="-D_SGI_SOURCE"
7870 cf_XOPEN_SOURCE=
7871 ;;
7872(linux*|gnu*|mint*|k*bsd*-gnu)
7873
7874echo "$as_me:7874: checking if we must define _GNU_SOURCE" >&5
7875echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7876if test "${cf_cv_gnu_source+set}" = set; then
7877 echo $ECHO_N "(cached) $ECHO_C" >&6
7878else
7879
7880cat >conftest.$ac_ext <<_ACEOF
7881#line 7881 "configure"
7882#include "confdefs.h"
7883#include <sys/types.h>
7884int
7885main ()
7886{
7887
7888#ifndef _XOPEN_SOURCE
7889make an error
7890#endif
7891 ;
7892 return 0;
7893}
7894_ACEOF
7895rm -f conftest.$ac_objext
7896if { (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
7908else
7909 echo "$as_me: failed program was:" >&5
7910cat conftest.$ac_ext >&5
7911cf_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>
7917int
7918main ()
7919{
7920
7921#ifdef _XOPEN_SOURCE
7922make an error
7923#endif
7924 ;
7925 return 0;
7926}
7927_ACEOF
7928rm -f conftest.$ac_objext
7929if { (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
7941else
7942 echo "$as_me: failed program was:" >&5
7943cat conftest.$ac_ext >&5
7944cf_cv_gnu_source=yes
7945fi
7946rm -f conftest.$ac_objext conftest.$ac_ext
7947 CPPFLAGS="$cf_save"
7948
7949fi
7950rm -f conftest.$ac_objext conftest.$ac_ext
7951
7952fi
7953echo "$as_me:7953: result: $cf_cv_gnu_source" >&5
7954echo "${ECHO_T}$cf_cv_gnu_source" >&6
7955test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7956
7957 ;;
7958(minix*)
7959 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7960 ;;
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=
7964
7965cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7966
7967cf_save_CFLAGS="$CFLAGS"
7968cf_save_CPPFLAGS="$CPPFLAGS"
7969
7970cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7971 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7972 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
7973
7974cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7975 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7976 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
7977
7978echo "$as_me:7978: checking if we should define _POSIX_C_SOURCE" >&5
7979echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7980if test "${cf_cv_posix_c_source+set}" = set; then
7981 echo $ECHO_N "(cached) $ECHO_C" >&6
7982else
7983
7984echo "${as_me:-configure}:7984: testing if the symbol is already defined go no further ..." 1>&5
7985
7986 cat >conftest.$ac_ext <<_ACEOF
7987#line 7987 "configure"
7988#include "confdefs.h"
7989#include <sys/types.h>
7990int
7991main ()
7992{
7993
7994#ifndef _POSIX_C_SOURCE
7995make an error
7996#endif
7997 ;
7998 return 0;
7999}
8000_ACEOF
8001rm -f conftest.$ac_objext
8002if { (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
8014else
8015 echo "$as_me: failed program was:" >&5
8016cat conftest.$ac_ext >&5
8017cf_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"
8021 ;;
8022 (.2)
8023 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8024 cf_want_posix_source=yes
8025 ;;
8026 (.*)
8027 cf_want_posix_source=yes
8028 ;;
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>
8035int
8036main ()
8037{
8038
8039#ifdef _POSIX_SOURCE
8040make an error
8041#endif
8042 ;
8043 return 0;
8044}
8045_ACEOF
8046rm -f conftest.$ac_objext
8047if { (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
8058 :
8059else
8060 echo "$as_me: failed program was:" >&5
8061cat conftest.$ac_ext >&5
8062cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8063fi
8064rm -f conftest.$ac_objext conftest.$ac_ext
8065 fi
8066
8067echo "${as_me:-configure}:8067: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8068
8069 CFLAGS="$cf_trim_CFLAGS"
8070 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8071
8072echo "${as_me:-configure}:8072: testing if the second compile does not leave our definition intact error ..." 1>&5
8073
8074 cat >conftest.$ac_ext <<_ACEOF
8075#line 8075 "configure"
8076#include "confdefs.h"
8077#include <sys/types.h>
8078int
8079main ()
8080{
8081
8082#ifndef _POSIX_C_SOURCE
8083make an error
8084#endif
8085 ;
8086 return 0;
8087}
8088_ACEOF
8089rm -f conftest.$ac_objext
8090if { (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
8101 :
8102else
8103 echo "$as_me: failed program was:" >&5
8104cat conftest.$ac_ext >&5
8105cf_cv_posix_c_source=no
8106fi
8107rm -f conftest.$ac_objext conftest.$ac_ext
8108 CFLAGS="$cf_save_CFLAGS"
8109 CPPFLAGS="$cf_save_CPPFLAGS"
8110
8111fi
8112rm -f conftest.$ac_objext conftest.$ac_ext
8113
8114fi
8115echo "$as_me:8115: result: $cf_cv_posix_c_source" >&5
8116echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8117
8118if test "$cf_cv_posix_c_source" != no ; then
8119 CFLAGS="$cf_trim_CFLAGS"
8120 CPPFLAGS="$cf_trim_CPPFLAGS"
8121
8122cf_fix_cppflags=no
8123cf_new_cflags=
8124cf_new_cppflags=
8125cf_new_extra_cppflags=
8126
8127for cf_add_cflags in $cf_cv_posix_c_source
8128do
8129case $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[^=]*='\''\"[^"]*//'`
8136
8137 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8138 && test -z "${cf_tst_cflags}" \
8139 && cf_fix_cppflags=yes
8140
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
8147 fi
8148 ;;
8149 esac
8150 case "$CPPFLAGS" in
8151 (*$cf_add_cflags)
8152 ;;
8153 (*)
8154 case $cf_add_cflags in
8155 (-D*)
8156 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8157
8158CPPFLAGS=`echo "$CPPFLAGS" | \
8159 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8160 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8161
8162 ;;
8163 esac
8164 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8165 ;;
8166 esac
8167 ;;
8168 (*)
8169 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8170 ;;
8171 esac
8172 ;;
8173(yes)
8174 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8175
8176 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8177
8178 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8179 && test -z "${cf_tst_cflags}" \
8180 && cf_fix_cppflags=no
8181 ;;
8182esac
8183done
8184
8185if test -n "$cf_new_cflags" ; then
8186
8187 CFLAGS="$CFLAGS $cf_new_cflags"
8188fi
8189
8190if test -n "$cf_new_cppflags" ; then
8191
8192 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8193fi
8194
8195if test -n "$cf_new_extra_cppflags" ; then
8196
8197 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8198fi
8199
8200fi
8201
8202 ;;
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
8205 ;;
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
8210 ;;
8211(openbsd*)
8212 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8213 ;;
8214(osf[45]*)
8215 cf_xopen_source="-D_OSF_SOURCE"
8216 ;;
8217(nto-qnx*)
8218 cf_xopen_source="-D_QNX_SOURCE"
8219 ;;
8220(sco*)
8221 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8222 ;;
8223(solaris2.*)
8224 cf_xopen_source="-D__EXTENSIONS__"
8225 cf_cv_xopen_source=broken
8226 ;;
8227(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8228 cf_XOPEN_SOURCE=
8229 cf_POSIX_C_SOURCE=
8230 ;;
8231(*)
8232
8233echo "$as_me:8233: checking if we should define _XOPEN_SOURCE" >&5
8234echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8235if test "${cf_cv_xopen_source+set}" = set; then
8236 echo $ECHO_N "(cached) $ECHO_C" >&6
8237else
8238
8239 cat >conftest.$ac_ext <<_ACEOF
8240#line 8240 "configure"
8241#include "confdefs.h"
8242
8243#include <stdlib.h>
8244#include <string.h>
8245#include <sys/types.h>
8246
8247int
8248main ()
8249{
8250
8251#ifndef _XOPEN_SOURCE
8252make an error
8253#endif
8254 ;
8255 return 0;
8256}
8257_ACEOF
8258rm -f conftest.$ac_objext
8259if { (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
8271else
8272 echo "$as_me: failed program was:" >&5
8273cat conftest.$ac_ext >&5
8274cf_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"
8279
8280#include <stdlib.h>
8281#include <string.h>
8282#include <sys/types.h>
8283
8284int
8285main ()
8286{
8287
8288#ifdef _XOPEN_SOURCE
8289make an error
8290#endif
8291 ;
8292 return 0;
8293}
8294_ACEOF
8295rm -f conftest.$ac_objext
8296if { (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
8308else
8309 echo "$as_me: failed program was:" >&5
8310cat conftest.$ac_ext >&5
8311cf_cv_xopen_source=$cf_XOPEN_SOURCE
8312fi
8313rm -f conftest.$ac_objext conftest.$ac_ext
8314 CPPFLAGS="$cf_save"
8315
8316fi
8317rm -f conftest.$ac_objext conftest.$ac_ext
8318
8319fi
8320echo "$as_me:8320: result: $cf_cv_xopen_source" >&5
8321echo "${ECHO_T}$cf_cv_xopen_source" >&6
8322
8323if test "$cf_cv_xopen_source" != no ; then
8324
8325CFLAGS=`echo "$CFLAGS" | \
8326 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8327 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8328
8329CPPFLAGS=`echo "$CPPFLAGS" | \
8330 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8331 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8332
8333 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8334
8335cf_fix_cppflags=no
8336cf_new_cflags=
8337cf_new_cppflags=
8338cf_new_extra_cppflags=
8339
8340for cf_add_cflags in $cf_temp_xopen_source
8341do
8342case $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[^=]*='\''\"[^"]*//'`
8349
8350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8351 && test -z "${cf_tst_cflags}" \
8352 && cf_fix_cppflags=yes
8353
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
8360 fi
8361 ;;
8362 esac
8363 case "$CPPFLAGS" in
8364 (*$cf_add_cflags)
8365 ;;
8366 (*)
8367 case $cf_add_cflags in
8368 (-D*)
8369 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8370
8371CPPFLAGS=`echo "$CPPFLAGS" | \
8372 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8373 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8374
8375 ;;
8376 esac
8377 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8378 ;;
8379 esac
8380 ;;
8381 (*)
8382 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8383 ;;
8384 esac
8385 ;;
8386(yes)
8387 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8388
8389 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8390
8391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8392 && test -z "${cf_tst_cflags}" \
8393 && cf_fix_cppflags=no
8394 ;;
8395esac
8396done
8397
8398if test -n "$cf_new_cflags" ; then
8399
8400 CFLAGS="$CFLAGS $cf_new_cflags"
8401fi
8402
8403if test -n "$cf_new_cppflags" ; then
8404
8405 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8406fi
8407
8408if test -n "$cf_new_extra_cppflags" ; then
8409
8410 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8411fi
8412
8413fi
8414
8415cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8416
8417cf_save_CFLAGS="$CFLAGS"
8418cf_save_CPPFLAGS="$CPPFLAGS"
8419
8420cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8421 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8422 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
8423
8424cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8425 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8426 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
8427
8428echo "$as_me:8428: checking if we should define _POSIX_C_SOURCE" >&5
8429echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8430if test "${cf_cv_posix_c_source+set}" = set; then
8431 echo $ECHO_N "(cached) $ECHO_C" >&6
8432else
8433
8434echo "${as_me:-configure}:8434: testing if the symbol is already defined go no further ..." 1>&5
8435
8436 cat >conftest.$ac_ext <<_ACEOF
8437#line 8437 "configure"
8438#include "confdefs.h"
8439#include <sys/types.h>
8440int
8441main ()
8442{
8443
8444#ifndef _POSIX_C_SOURCE
8445make an error
8446#endif
8447 ;
8448 return 0;
8449}
8450_ACEOF
8451rm -f conftest.$ac_objext
8452if { (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
8464else
8465 echo "$as_me: failed program was:" >&5
8466cat conftest.$ac_ext >&5
8467cf_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"
8471 ;;
8472 (.2)
8473 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8474 cf_want_posix_source=yes
8475 ;;
8476 (.*)
8477 cf_want_posix_source=yes
8478 ;;
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>
8485int
8486main ()
8487{
8488
8489#ifdef _POSIX_SOURCE
8490make an error
8491#endif
8492 ;
8493 return 0;
8494}
8495_ACEOF
8496rm -f conftest.$ac_objext
8497if { (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
8508 :
8509else
8510 echo "$as_me: failed program was:" >&5
8511cat conftest.$ac_ext >&5
8512cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8513fi
8514rm -f conftest.$ac_objext conftest.$ac_ext
8515 fi
8516
8517echo "${as_me:-configure}:8517: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8518
8519 CFLAGS="$cf_trim_CFLAGS"
8520 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8521
8522echo "${as_me:-configure}:8522: testing if the second compile does not leave our definition intact error ..." 1>&5
8523
8524 cat >conftest.$ac_ext <<_ACEOF
8525#line 8525 "configure"
8526#include "confdefs.h"
8527#include <sys/types.h>
8528int
8529main ()
8530{
8531
8532#ifndef _POSIX_C_SOURCE
8533make an error
8534#endif
8535 ;
8536 return 0;
8537}
8538_ACEOF
8539rm -f conftest.$ac_objext
8540if { (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
8551 :
8552else
8553 echo "$as_me: failed program was:" >&5
8554cat conftest.$ac_ext >&5
8555cf_cv_posix_c_source=no
8556fi
8557rm -f conftest.$ac_objext conftest.$ac_ext
8558 CFLAGS="$cf_save_CFLAGS"
8559 CPPFLAGS="$cf_save_CPPFLAGS"
8560
8561fi
8562rm -f conftest.$ac_objext conftest.$ac_ext
8563
8564fi
8565echo "$as_me:8565: result: $cf_cv_posix_c_source" >&5
8566echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8567
8568if test "$cf_cv_posix_c_source" != no ; then
8569 CFLAGS="$cf_trim_CFLAGS"
8570 CPPFLAGS="$cf_trim_CPPFLAGS"
8571
8572cf_fix_cppflags=no
8573cf_new_cflags=
8574cf_new_cppflags=
8575cf_new_extra_cppflags=
8576
8577for cf_add_cflags in $cf_cv_posix_c_source
8578do
8579case $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[^=]*='\''\"[^"]*//'`
8586
8587 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8588 && test -z "${cf_tst_cflags}" \
8589 && cf_fix_cppflags=yes
8590
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
8597 fi
8598 ;;
8599 esac
8600 case "$CPPFLAGS" in
8601 (*$cf_add_cflags)
8602 ;;
8603 (*)
8604 case $cf_add_cflags in
8605 (-D*)
8606 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8607
8608CPPFLAGS=`echo "$CPPFLAGS" | \
8609 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8610 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8611
8612 ;;
8613 esac
8614 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8615 ;;
8616 esac
8617 ;;
8618 (*)
8619 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8620 ;;
8621 esac
8622 ;;
8623(yes)
8624 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8625
8626 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8627
8628 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8629 && test -z "${cf_tst_cflags}" \
8630 && cf_fix_cppflags=no
8631 ;;
8632esac
8633done
8634
8635if test -n "$cf_new_cflags" ; then
8636
8637 CFLAGS="$CFLAGS $cf_new_cflags"
8638fi
8639
8640if test -n "$cf_new_cppflags" ; then
8641
8642 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8643fi
8644
8645if test -n "$cf_new_extra_cppflags" ; then
8646
8647 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8648fi
8649
8650fi
8651
8652 ;;
8653esac
8654
8655if test -n "$cf_xopen_source" ; then
8656
8657cf_fix_cppflags=no
8658cf_new_cflags=
8659cf_new_cppflags=
8660cf_new_extra_cppflags=
8661
8662for cf_add_cflags in $cf_xopen_source
8663do
8664case $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[^=]*='\''\"[^"]*//'`
8671
8672 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8673 && test -z "${cf_tst_cflags}" \
8674 && cf_fix_cppflags=yes
8675
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
8682 fi
8683 ;;
8684 esac
8685 case "$CPPFLAGS" in
8686 (*$cf_add_cflags)
8687 ;;
8688 (*)
8689 case $cf_add_cflags in
8690 (-D*)
8691 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8692
8693CPPFLAGS=`echo "$CPPFLAGS" | \
8694 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8695 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8696
8697 ;;
8698 esac
8699 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8700 ;;
8701 esac
8702 ;;
8703 (*)
8704 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8705 ;;
8706 esac
8707 ;;
8708(yes)
8709 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8710
8711 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8712
8713 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8714 && test -z "${cf_tst_cflags}" \
8715 && cf_fix_cppflags=no
8716 ;;
8717esac
8718done
8719
8720if test -n "$cf_new_cflags" ; then
8721 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
8722
8723echo "${as_me:-configure}:8723: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8724
8725 CFLAGS="$CFLAGS $cf_new_cflags"
8726fi
8727
8728if test -n "$cf_new_cppflags" ; then
8729 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8730
8731echo "${as_me:-configure}:8731: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8732
8733 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8734fi
8735
8736if test -n "$cf_new_extra_cppflags" ; then
8737 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8738
8739echo "${as_me:-configure}:8739: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8740
8741 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8742fi
8743
8744fi
8745
8746if 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
8748echo $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>
8753int
8754main ()
8755{
8756
8757#ifndef _XOPEN_SOURCE
8758make an error
8759#endif
8760 ;
8761 return 0;
8762}
8763_ACEOF
8764rm -f conftest.$ac_objext
8765if { (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
8777else
8778 echo "$as_me: failed program was:" >&5
8779cat conftest.$ac_ext >&5
8780cf_XOPEN_SOURCE_set=no
8781fi
8782rm -f conftest.$ac_objext conftest.$ac_ext
8783 echo "$as_me:8783: result: $cf_XOPEN_SOURCE_set" >&5
8784echo "${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>
8791int
8792main ()
8793{
8794
8795#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8796make an error
8797#endif
8798 ;
8799 return 0;
8800}
8801_ACEOF
8802rm -f conftest.$ac_objext
8803if { (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
8815else
8816 echo "$as_me: failed program was:" >&5
8817cat conftest.$ac_ext >&5
8818cf_XOPEN_SOURCE_set_ok=no
8819fi
8820rm -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
8824echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8825 fi
8826 else
8827
8828echo "$as_me:8828: checking if we should define _XOPEN_SOURCE" >&5
8829echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8830if test "${cf_cv_xopen_source+set}" = set; then
8831 echo $ECHO_N "(cached) $ECHO_C" >&6
8832else
8833
8834 cat >conftest.$ac_ext <<_ACEOF
8835#line 8835 "configure"
8836#include "confdefs.h"
8837
8838#include <stdlib.h>
8839#include <string.h>
8840#include <sys/types.h>
8841
8842int
8843main ()
8844{
8845
8846#ifndef _XOPEN_SOURCE
8847make an error
8848#endif
8849 ;
8850 return 0;
8851}
8852_ACEOF
8853rm -f conftest.$ac_objext
8854if { (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
8866else
8867 echo "$as_me: failed program was:" >&5
8868cat conftest.$ac_ext >&5
8869cf_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"
8874
8875#include <stdlib.h>
8876#include <string.h>
8877#include <sys/types.h>
8878
8879int
8880main ()
8881{
8882
8883#ifdef _XOPEN_SOURCE
8884make an error
8885#endif
8886 ;
8887 return 0;
8888}
8889_ACEOF
8890rm -f conftest.$ac_objext
8891if { (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
8903else
8904 echo "$as_me: failed program was:" >&5
8905cat conftest.$ac_ext >&5
8906cf_cv_xopen_source=$cf_XOPEN_SOURCE
8907fi
8908rm -f conftest.$ac_objext conftest.$ac_ext
8909 CPPFLAGS="$cf_save"
8910
8911fi
8912rm -f conftest.$ac_objext conftest.$ac_ext
8913
8914fi
8915echo "$as_me:8915: result: $cf_cv_xopen_source" >&5
8916echo "${ECHO_T}$cf_cv_xopen_source" >&6
8917
8918if test "$cf_cv_xopen_source" != no ; then
8919
8920CFLAGS=`echo "$CFLAGS" | \
8921 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8922 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8923
8924CPPFLAGS=`echo "$CPPFLAGS" | \
8925 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8926 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8927
8928 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8929
8930cf_fix_cppflags=no
8931cf_new_cflags=
8932cf_new_cppflags=
8933cf_new_extra_cppflags=
8934
8935for cf_add_cflags in $cf_temp_xopen_source
8936do
8937case $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[^=]*='\''\"[^"]*//'`
8944
8945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8946 && test -z "${cf_tst_cflags}" \
8947 && cf_fix_cppflags=yes
8948
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
8955 fi
8956 ;;
8957 esac
8958 case "$CPPFLAGS" in
8959 (*$cf_add_cflags)
8960 ;;
8961 (*)
8962 case $cf_add_cflags in
8963 (-D*)
8964 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8965
8966CPPFLAGS=`echo "$CPPFLAGS" | \
8967 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8968 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8969
8970 ;;
8971 esac
8972 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8973 ;;
8974 esac
8975 ;;
8976 (*)
8977 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8978 ;;
8979 esac
8980 ;;
8981(yes)
8982 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8983
8984 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8985
8986 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8987 && test -z "${cf_tst_cflags}" \
8988 && cf_fix_cppflags=no
8989 ;;
8990esac
8991done
8992
8993if test -n "$cf_new_cflags" ; then
8994
8995 CFLAGS="$CFLAGS $cf_new_cflags"
8996fi
8997
8998if test -n "$cf_new_cppflags" ; then
8999
9000 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9001fi
9002
9003if test -n "$cf_new_extra_cppflags" ; then
9004
9005 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9006fi
9007
9008fi
9009
9010 fi
9011fi
9012
9013CPPFLAGS_after_XOPEN="$CPPFLAGS"
9014
9015# Work around breakage on OS X
9016
9017echo "$as_me:9017: checking if SIGWINCH is defined" >&5
9018echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9019if test "${cf_cv_define_sigwinch+set}" = set; then
9020 echo $ECHO_N "(cached) $ECHO_C" >&6
9021else
9022
9023 cat >conftest.$ac_ext <<_ACEOF
9024#line 9024 "configure"
9025#include "confdefs.h"
9026
9027#include <sys/types.h>
9028#include <sys/signal.h>
9029
9030int
9031main ()
9032{
9033int x = SIGWINCH
9034 ;
9035 return 0;
9036}
9037_ACEOF
9038rm -f conftest.$ac_objext
9039if { (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
9051else
9052 echo "$as_me: failed program was:" >&5
9053cat conftest.$ac_ext >&5
9054cat >conftest.$ac_ext <<_ACEOF
9055#line 9055 "configure"
9056#include "confdefs.h"
9057
9058#undef _XOPEN_SOURCE
9059#undef _POSIX_SOURCE
9060#undef _POSIX_C_SOURCE
9061#include <sys/types.h>
9062#include <sys/signal.h>
9063
9064int
9065main ()
9066{
9067int x = SIGWINCH
9068 ;
9069 return 0;
9070}
9071_ACEOF
9072rm -f conftest.$ac_objext
9073if { (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
9085else
9086 echo "$as_me: failed program was:" >&5
9087cat conftest.$ac_ext >&5
9088cf_cv_define_sigwinch=no
9089fi
9090rm -f conftest.$ac_objext conftest.$ac_ext
9091
9092fi
9093rm -f conftest.$ac_objext conftest.$ac_ext
9094
9095fi
9096echo "$as_me:9096: result: $cf_cv_define_sigwinch" >&5
9097echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9098
9099if test "$cf_cv_define_sigwinch" = maybe ; then
9100echo "$as_me:9100: checking for actual SIGWINCH definition" >&5
9101echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9102if test "${cf_cv_fixup_sigwinch+set}" = set; then
9103 echo $ECHO_N "(cached) $ECHO_C" >&6
9104else
9105
9106cf_cv_fixup_sigwinch=unknown
9107cf_sigwinch=32
9108while test $cf_sigwinch != 1
9109do
9110 cat >conftest.$ac_ext <<_ACEOF
9111#line 9111 "configure"
9112#include "confdefs.h"
9113
9114#undef _XOPEN_SOURCE
9115#undef _POSIX_SOURCE
9116#undef _POSIX_C_SOURCE
9117#include <sys/types.h>
9118#include <sys/signal.h>
9119
9120int
9121main ()
9122{
9123
9124#if SIGWINCH != $cf_sigwinch
9125make an error
9126#endif
9127int x = SIGWINCH
9128 ;
9129 return 0;
9130}
9131_ACEOF
9132rm -f conftest.$ac_objext
9133if { (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
9146else
9147 echo "$as_me: failed program was:" >&5
9148cat conftest.$ac_ext >&5
9149fi
9150rm -f conftest.$ac_objext conftest.$ac_ext
9151
9152cf_sigwinch=`expr $cf_sigwinch - 1`
9153done
9154
9155fi
9156echo "$as_me:9156: result: $cf_cv_fixup_sigwinch" >&5
9157echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9158
9159 if test "$cf_cv_fixup_sigwinch" != unknown ; then
9160 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9161 fi
9162fi
9163
9164# Checks for CODESET support.
9165
9166echo "$as_me:9166: checking for nl_langinfo and CODESET" >&5
9167echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9168if test "${am_cv_langinfo_codeset+set}" = set; then
9169 echo $ECHO_N "(cached) $ECHO_C" >&6
9170else
9171 cat >conftest.$ac_ext <<_ACEOF
9172#line 9172 "configure"
9173#include "confdefs.h"
9174#include <langinfo.h>
9175int
9176main ()
9177{
9178char* cs = nl_langinfo(CODESET);
9179 ;
9180 return 0;
9181}
9182_ACEOF
9183rm -f conftest.$ac_objext conftest$ac_exeext
9184if { (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
9196else
9197 echo "$as_me: failed program was:" >&5
9198cat conftest.$ac_ext >&5
9199am_cv_langinfo_codeset=no
9200fi
9201rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9202
9203fi
9204echo "$as_me:9204: result: $am_cv_langinfo_codeset" >&5
9205echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9206 if test $am_cv_langinfo_codeset = yes; then
9207
9208cat >>confdefs.h <<\EOF
9209#define HAVE_LANGINFO_CODESET 1
9210EOF
9211
9212 fi
9213
9214# use these variables to work around a defect in gcc's fixincludes.
9215NCURSES_OK_WCHAR_T=
9216NCURSES_OK_WINT_T=
9217
9218echo "$as_me:9218: checking if you want wide-character code" >&5
9219echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9220
9221# Check whether --enable-widec or --disable-widec was given.
9222if test "${enable_widec+set}" = set; then
9223 enableval="$enable_widec"
9224 with_widec=$enableval
9225else
9226 with_widec=no
9227fi;
9228echo "$as_me:9228: result: $with_widec" >&5
9229echo "${ECHO_T}$with_widec" >&6
9230if test "x$with_widec" = xyes ; then
9231 if test "x$disable_lib_suffixes" = xno ; then
9232 LIB_SUFFIX="w${LIB_SUFFIX}"
9233 fi
9234
9235cat >>confdefs.h <<\EOF
9236#define USE_WIDEC_SUPPORT 1
9237EOF
9238
9239cat >>confdefs.h <<\EOF
9240#define NCURSES_WIDECHAR 1
9241EOF
9242
9243echo "$as_me:9243: checking if wchar.h can be used as is" >&5
9244echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9245if test "${cf_cv_wchar_h_okay+set}" = set; then
9246 echo $ECHO_N "(cached) $ECHO_C" >&6
9247else
9248
9249cat >conftest.$ac_ext <<_ACEOF
9250#line 9250 "configure"
9251#include "confdefs.h"
9252
9253#include <stdlib.h>
9254#include <wchar.h>
9255
9256int
9257main ()
9258{
9259
9260 wint_t foo = 0;
9261 int bar = iswpunct(foo)
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266rm -f conftest.$ac_objext
9267if { (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
9279else
9280 echo "$as_me: failed program was:" >&5
9281cat conftest.$ac_ext >&5
9282cf_cv_wchar_h_okay=no
9283fi
9284rm -f conftest.$ac_objext conftest.$ac_ext
9285fi
9286echo "$as_me:9286: result: $cf_cv_wchar_h_okay" >&5
9287echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9288
9289if test $cf_cv_wchar_h_okay = no
9290then
9291
9292echo "$as_me:9292: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9293echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9294cat >conftest.$ac_ext <<_ACEOF
9295#line 9295 "configure"
9296#include "confdefs.h"
9297#include <sys/types.h>
9298
9299int
9300main ()
9301{
9302
9303#ifndef _XOPEN_SOURCE_EXTENDED
9304make an error
9305#endif
9306 ;
9307 return 0;
9308}
9309_ACEOF
9310rm -f conftest.$ac_objext
9311if { (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
9323else
9324 echo "$as_me: failed program was:" >&5
9325cat conftest.$ac_ext >&5
9326cf_result=yes
9327fi
9328rm -f conftest.$ac_objext conftest.$ac_ext
9329echo "$as_me:9329: result: $cf_result" >&5
9330echo "${ECHO_T}$cf_result" >&6
9331
9332if test "$cf_result" = yes ; then
9333 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9334elif test "x" != "x" ; then
9335 echo "$as_me:9335: checking checking for compatible value versus " >&5
9336echo $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>
9341
9342int
9343main ()
9344{
9345
9346#if _XOPEN_SOURCE_EXTENDED- < 0
9347make an error
9348#endif
9349 ;
9350 return 0;
9351}
9352_ACEOF
9353rm -f conftest.$ac_objext
9354if { (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
9366else
9367 echo "$as_me: failed program was:" >&5
9368cat conftest.$ac_ext >&5
9369cf_result=no
9370fi
9371rm -f conftest.$ac_objext conftest.$ac_ext
9372 echo "$as_me:9372: result: $cf_result" >&5
9373echo "${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="
9377 fi
9378fi
9379
9380fi
9381
9382 # with_overwrite=no
9383 NCURSES_CH_T=cchar_t
9384
9385for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9386do
9387as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9388echo "$as_me:9388: checking for $ac_func" >&5
9389echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9390if eval "test \"\${$as_ac_var+set}\" = set"; then
9391 echo $ECHO_N "(cached) $ECHO_C" >&6
9392else
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
9401extern "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. */
9405char $ac_func ();
9406char (*f) ();
9407
9408int
9409main ()
9410{
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)
9415choke me
9416#else
9417f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9418#endif
9419
9420 ;
9421 return 0;
9422}
9423_ACEOF
9424rm -f conftest.$ac_objext conftest$ac_exeext
9425if { (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"
9437else
9438 echo "$as_me: failed program was:" >&5
9439cat conftest.$ac_ext >&5
9440eval "$as_ac_var=no"
9441fi
9442rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9443fi
9444echo "$as_me:9444: result: `eval echo '${'$as_ac_var'}'`" >&5
9445echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9446if test `eval echo '${'$as_ac_var'}'` = yes; then
9447 cat >>confdefs.h <<EOF
9448#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9449EOF
9450
9451fi
9452done
9453
9454 if test "x$ac_cv_func_putwc" != xyes ; then
9455
9456echo "$as_me:9456: checking for multibyte character support" >&5
9457echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9458if test "${cf_cv_utf8_lib+set}" = set; then
9459 echo $ECHO_N "(cached) $ECHO_C" >&6
9460else
9461
9462 cf_save_LIBS="$LIBS"
9463 cat >conftest.$ac_ext <<_ACEOF
9464#line 9464 "configure"
9465#include "confdefs.h"
9466
9467#include <stdlib.h>
9468int
9469main ()
9470{
9471putwc(0,0);
9472 ;
9473 return 0;
9474}
9475_ACEOF
9476rm -f conftest.$ac_objext conftest$ac_exeext
9477if { (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
9489else
9490 echo "$as_me: failed program was:" >&5
9491cat conftest.$ac_ext >&5
9492
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.
9495cf_cv_header_path_utf8=
9496cf_cv_library_path_utf8=
9497
9498echo "${as_me:-configure}:9498: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9499
9500cf_save_LIBS="$LIBS"
9501
9502cat >conftest.$ac_ext <<_ACEOF
9503#line 9503 "configure"
9504#include "confdefs.h"
9505
9506#include <libutf8.h>
9507int
9508main ()
9509{
9510putwc(0,0);
9511 ;
9512 return 0;
9513}
9514_ACEOF
9515rm -f conftest.$ac_objext conftest$ac_exeext
9516if { (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
9527
9528 cf_cv_find_linkage_utf8=yes
9529 cf_cv_header_path_utf8=/usr/include
9530 cf_cv_library_path_utf8=/usr/lib
9531
9532else
9533 echo "$as_me: failed program was:" >&5
9534cat conftest.$ac_ext >&5
9535
9536LIBS="-lutf8 $cf_save_LIBS"
9537
9538cat >conftest.$ac_ext <<_ACEOF
9539#line 9539 "configure"
9540#include "confdefs.h"
9541
9542#include <libutf8.h>
9543int
9544main ()
9545{
9546putwc(0,0);
9547 ;
9548 return 0;
9549}
9550_ACEOF
9551rm -f conftest.$ac_objext conftest$ac_exeext
9552if { (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
9563
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"
9568
9569else
9570 echo "$as_me: failed program was:" >&5
9571cat conftest.$ac_ext >&5
9572
9573 cf_cv_find_linkage_utf8=no
9574 LIBS="$cf_save_LIBS"
9575
9576 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
9577
9578echo "${as_me:-configure}:9578: testing find linkage for utf8 library ..." 1>&5
9579
9580echo "${as_me:-configure}:9580: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9581
9582 cf_save_CPPFLAGS="$CPPFLAGS"
9583 cf_test_CPPFLAGS="$CPPFLAGS"
9584
9585cf_search=
9586
9587# collect the current set of include-directories from compiler flags
9588cf_header_path_list=""
9589if test -n "${CFLAGS}${CPPFLAGS}" ; then
9590 for cf_header_path in $CPPFLAGS $CFLAGS
9591 do
9592 case $cf_header_path in
9593 (-I*)
9594 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9595
9596test "x$cf_header_path" != "xNONE" && \
9597test -d "$cf_header_path" && \
9598 {
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"
9605}
9606
9607 cf_header_path_list="$cf_header_path_list $cf_search"
9608 ;;
9609 esac
9610 done
9611fi
9612
9613# add the variations for the package we are looking for
9614
9615cf_search=
9616
9617test "x$prefix" != "xNONE" && \
9618test -d "$prefix" && \
9619 {
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"
9626}
9627
9628for cf_subdir_prefix in \
9629 /usr \
9630 /usr/local \
9631 /usr/pkg \
9632 /opt \
9633 /opt/local \
9634 $HOME
9635do
9636
9637test "x$cf_subdir_prefix" != "x$prefix" && \
9638test -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"
9646}
9647
9648done
9649
9650test "$includedir" != NONE && \
9651test "$includedir" != "/usr/include" && \
9652test -d "$includedir" && {
9653 test -d $includedir && cf_search="$cf_search $includedir"
9654 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9655}
9656
9657test "$oldincludedir" != NONE && \
9658test "$oldincludedir" != "/usr/include" && \
9659test -d "$oldincludedir" && {
9660 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9661 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9662}
9663
9664cf_search="$cf_search $cf_header_path_list"
9665
9666 for cf_cv_header_path_utf8 in $cf_search
9667 do
9668 if test -d $cf_cv_header_path_utf8 ; then
9669 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
9670
9671echo "${as_me:-configure}:9671: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9672
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"
9677
9678#include <libutf8.h>
9679int
9680main ()
9681{
9682putwc(0,0);
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext
9688if { (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
9699
9700 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9701
9702echo "${as_me:-configure}:9702: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9703
9704 cf_cv_find_linkage_utf8=maybe
9705 cf_test_CPPFLAGS="$CPPFLAGS"
9706 break
9707else
9708 echo "$as_me: failed program was:" >&5
9709cat conftest.$ac_ext >&5
9710
9711 CPPFLAGS="$cf_save_CPPFLAGS"
9712
9713fi
9714rm -f conftest.$ac_objext conftest.$ac_ext
9715 fi
9716 done
9717
9718 if test "$cf_cv_find_linkage_utf8" = maybe ; then
9719
9720echo "${as_me:-configure}:9720: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9721
9722 cf_save_LIBS="$LIBS"
9723 cf_save_LDFLAGS="$LDFLAGS"
9724
9725 if test "$cf_cv_find_linkage_utf8" != yes ; then
9726
9727cf_search=
9728cf_library_path_list=""
9729if test -n "${LDFLAGS}${LIBS}" ; then
9730 for cf_library_path in $LDFLAGS $LIBS
9731 do
9732 case $cf_library_path in
9733 (-L*)
9734 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9735
9736test "x$cf_library_path" != "xNONE" && \
9737test -d "$cf_library_path" && \
9738 {
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"
9745}
9746
9747 cf_library_path_list="$cf_library_path_list $cf_search"
9748 ;;
9749 esac
9750 done
9751fi
9752
9753cf_search=
9754
9755test "x$prefix" != "xNONE" && \
9756test -d "$prefix" && \
9757 {
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"
9764}
9765
9766for cf_subdir_prefix in \
9767 /usr \
9768 /usr/local \
9769 /usr/pkg \
9770 /opt \
9771 /opt/local \
9772 $HOME
9773do
9774
9775test "x$cf_subdir_prefix" != "x$prefix" && \
9776test -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"
9784}
9785
9786done
9787
9788cf_search="$cf_library_path_list $cf_search"
9789
9790 for cf_cv_library_path_utf8 in $cf_search
9791 do
9792 if test -d $cf_cv_library_path_utf8 ; then
9793 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
9794
9795echo "${as_me:-configure}:9795: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9796
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"
9803
9804#include <libutf8.h>
9805int
9806main ()
9807{
9808putwc(0,0);
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813rm -f conftest.$ac_objext conftest$ac_exeext
9814if { (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
9825
9826 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9827
9828echo "${as_me:-configure}:9828: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9829
9830 cf_cv_find_linkage_utf8=yes
9831 cf_cv_library_file_utf8="-lutf8"
9832 break
9833else
9834 echo "$as_me: failed program was:" >&5
9835cat conftest.$ac_ext >&5
9836
9837 CPPFLAGS="$cf_save_CPPFLAGS"
9838 LIBS="$cf_save_LIBS"
9839 LDFLAGS="$cf_save_LDFLAGS"
9840
9841fi
9842rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9843 fi
9844 done
9845 CPPFLAGS="$cf_save_CPPFLAGS"
9846 LDFLAGS="$cf_save_LDFLAGS"
9847 fi
9848
9849 else
9850 cf_cv_find_linkage_utf8=no
9851 fi
9852
9853fi
9854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9855
9856fi
9857rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9858
9859LIBS="$cf_save_LIBS"
9860
9861if test "$cf_cv_find_linkage_utf8" = yes ; then
9862cf_cv_utf8_lib=add-on
9863else
9864cf_cv_utf8_lib=no
9865fi
9866
9867fi
9868rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9869fi
9870echo "$as_me:9870: result: $cf_cv_utf8_lib" >&5
9871echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9872
9873# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9874# ncurses/ncursesw:
9875if test "$cf_cv_utf8_lib" = "add-on" ; then
9876
9877cat >>confdefs.h <<\EOF
9878#define HAVE_LIBUTF8_H 1
9879EOF
9880
9881if test -n "$cf_cv_header_path_utf8" ; then
9882 for cf_add_incdir in $cf_cv_header_path_utf8
9883 do
9884 while test $cf_add_incdir != /usr/include
9885 do
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
9894 fi
9895 done
9896 fi
9897
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>
9908int
9909main ()
9910{
9911printf("Hello")
9912 ;
9913 return 0;
9914}
9915_ACEOF
9916rm -f conftest.$ac_objext
9917if { (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
9928 :
9929else
9930 echo "$as_me: failed program was:" >&5
9931cat conftest.$ac_ext >&5
9932cf_have_incdir=yes
9933fi
9934rm -f conftest.$ac_objext conftest.$ac_ext
9935 CPPFLAGS=$cf_save_CPPFLAGS
9936 fi
9937 fi
9938 fi
9939
9940 if test "$cf_have_incdir" = no ; then
9941 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9942
9943echo "${as_me:-configure}:9943: testing adding $cf_add_incdir to include-path ..." 1>&5
9944
9945 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9946
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
9952 fi
9953 else
9954 break
9955 fi
9956 done
9957 done
9958fi
9959
9960if test -n "$cf_cv_library_path_utf8" ; then
9961 for cf_add_libdir in $cf_cv_library_path_utf8
9962 do
9963 if test $cf_add_libdir = /usr/lib ; then
9964 :
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
9973 fi
9974 done
9975 fi
9976 if test "$cf_have_libdir" = no ; then
9977 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9978
9979echo "${as_me:-configure}:9979: testing adding $cf_add_libdir to library-path ..." 1>&5
9980
9981 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9982 fi
9983 fi
9984 done
9985fi
9986
9987cf_add_libs="$cf_cv_library_file_utf8"
9988# Filter out duplicates - this happens with badly-designed ".pc" files...
9989for cf_add_1lib in $LIBS
9990do
9991 for cf_add_2lib in $cf_add_libs
9992 do
9993 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9994 then
9995 cf_add_1lib=
9996 break
9997 fi
9998 done
9999 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10000done
10001LIBS="$cf_add_libs"
10002
10003fi
10004
10005 if test "$cf_cv_utf8_lib" != no ; then
10006 NCURSES_LIBUTF8=1
10007 fi
10008 fi
10009
10010# This is needed on Tru64 5.0 to declare mbstate_t
10011echo "$as_me:10011: checking if we must include wchar.h to declare mbstate_t" >&5
10012echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10013if test "${cf_cv_mbstate_t+set}" = set; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10015else
10016
10017cat >conftest.$ac_ext <<_ACEOF
10018#line 10018 "configure"
10019#include "confdefs.h"
10020
10021#include <stdlib.h>
10022#include <stdarg.h>
10023#include <stdio.h>
10024#ifdef HAVE_LIBUTF8_H
10025#include <libutf8.h>
10026#endif
10027int
10028main ()
10029{
10030mbstate_t state
10031 ;
10032 return 0;
10033}
10034_ACEOF
10035rm -f conftest.$ac_objext
10036if { (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
10048else
10049 echo "$as_me: failed program was:" >&5
10050cat conftest.$ac_ext >&5
10051cat >conftest.$ac_ext <<_ACEOF
10052#line 10052 "configure"
10053#include "confdefs.h"
10054
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
10062int
10063main ()
10064{
10065mbstate_t value
10066 ;
10067 return 0;
10068}
10069_ACEOF
10070rm -f conftest.$ac_objext
10071if { (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
10083else
10084 echo "$as_me: failed program was:" >&5
10085cat conftest.$ac_ext >&5
10086cf_cv_mbstate_t=unknown
10087fi
10088rm -f conftest.$ac_objext conftest.$ac_ext
10089fi
10090rm -f conftest.$ac_objext conftest.$ac_ext
10091fi
10092echo "$as_me:10092: result: $cf_cv_mbstate_t" >&5
10093echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10094
10095if test "$cf_cv_mbstate_t" = yes ; then
10096
10097cat >>confdefs.h <<\EOF
10098#define NEED_WCHAR_H 1
10099EOF
10100
10101 NEED_WCHAR_H=1
10102fi
10103
10104# if we do not find mbstate_t in either place, use substitution to provide a fallback.
10105if test "$cf_cv_mbstate_t" = unknown ; then
10106 NCURSES_MBSTATE_T=1
10107fi
10108
10109# This is needed on Tru64 5.0 to declare wchar_t
10110echo "$as_me:10110: checking if we must include wchar.h to declare wchar_t" >&5
10111echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10112if test "${cf_cv_wchar_t+set}" = set; then
10113 echo $ECHO_N "(cached) $ECHO_C" >&6
10114else
10115
10116cat >conftest.$ac_ext <<_ACEOF
10117#line 10117 "configure"
10118#include "confdefs.h"
10119
10120#include <stdlib.h>
10121#include <stdarg.h>
10122#include <stdio.h>
10123#ifdef HAVE_LIBUTF8_H
10124#include <libutf8.h>
10125#endif
10126int
10127main ()
10128{
10129wchar_t state
10130 ;
10131 return 0;
10132}
10133_ACEOF
10134rm -f conftest.$ac_objext
10135if { (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
10147else
10148 echo "$as_me: failed program was:" >&5
10149cat conftest.$ac_ext >&5
10150cat >conftest.$ac_ext <<_ACEOF
10151#line 10151 "configure"
10152#include "confdefs.h"
10153
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
10161int
10162main ()
10163{
10164wchar_t value
10165 ;
10166 return 0;
10167}
10168_ACEOF
10169rm -f conftest.$ac_objext
10170if { (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
10182else
10183 echo "$as_me: failed program was:" >&5
10184cat conftest.$ac_ext >&5
10185cf_cv_wchar_t=unknown
10186fi
10187rm -f conftest.$ac_objext conftest.$ac_ext
10188fi
10189rm -f conftest.$ac_objext conftest.$ac_ext
10190fi
10191echo "$as_me:10191: result: $cf_cv_wchar_t" >&5
10192echo "${ECHO_T}$cf_cv_wchar_t" >&6
10193
10194if test "$cf_cv_wchar_t" = yes ; then
10195
10196cat >>confdefs.h <<\EOF
10197#define NEED_WCHAR_H 1
10198EOF
10199
10200 NEED_WCHAR_H=1
10201fi
10202
10203# if we do not find wchar_t in either place, use substitution to provide a fallback.
10204if test "$cf_cv_wchar_t" = unknown ; then
10205 NCURSES_WCHAR_T=1
10206fi
10207
10208# if we find wchar_t in either place, use substitution to provide a fallback.
10209if test "$cf_cv_wchar_t" != unknown ; then
10210 NCURSES_OK_WCHAR_T=1
10211fi
10212
10213# This is needed on Tru64 5.0 to declare wint_t
10214echo "$as_me:10214: checking if we must include wchar.h to declare wint_t" >&5
10215echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10216if test "${cf_cv_wint_t+set}" = set; then
10217 echo $ECHO_N "(cached) $ECHO_C" >&6
10218else
10219
10220cat >conftest.$ac_ext <<_ACEOF
10221#line 10221 "configure"
10222#include "confdefs.h"
10223
10224#include <stdlib.h>
10225#include <stdarg.h>
10226#include <stdio.h>
10227#ifdef HAVE_LIBUTF8_H
10228#include <libutf8.h>
10229#endif
10230int
10231main ()
10232{
10233wint_t state
10234 ;
10235 return 0;
10236}
10237_ACEOF
10238rm -f conftest.$ac_objext
10239if { (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
10251else
10252 echo "$as_me: failed program was:" >&5
10253cat conftest.$ac_ext >&5
10254cat >conftest.$ac_ext <<_ACEOF
10255#line 10255 "configure"
10256#include "confdefs.h"
10257
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
10265int
10266main ()
10267{
10268wint_t value
10269 ;
10270 return 0;
10271}
10272_ACEOF
10273rm -f conftest.$ac_objext
10274if { (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
10286else
10287 echo "$as_me: failed program was:" >&5
10288cat conftest.$ac_ext >&5
10289cf_cv_wint_t=unknown
10290fi
10291rm -f conftest.$ac_objext conftest.$ac_ext
10292fi
10293rm -f conftest.$ac_objext conftest.$ac_ext
10294fi
10295echo "$as_me:10295: result: $cf_cv_wint_t" >&5
10296echo "${ECHO_T}$cf_cv_wint_t" >&6
10297
10298if test "$cf_cv_wint_t" = yes ; then
10299
10300cat >>confdefs.h <<\EOF
10301#define NEED_WCHAR_H 1
10302EOF
10303
10304 NEED_WCHAR_H=1
10305fi
10306
10307# if we do not find wint_t in either place, use substitution to provide a fallback.
10308if test "$cf_cv_wint_t" = unknown ; then
10309 NCURSES_WINT_T=1
10310fi
10311
10312# if we find wint_t in either place, use substitution to provide a fallback.
10313if test "$cf_cv_wint_t" != unknown ; then
10314 NCURSES_OK_WINT_T=1
10315fi
10316
10317 if test "$NCURSES_MBSTATE_T" != 0; then
10318
10319cat >>confdefs.h <<\EOF
10320#define NEED_MBSTATE_T_DEF 1
10321EOF
10322
10323 fi
10324fi
10325
10326### use option --disable-lp64 to allow long chtype
10327echo "$as_me:10327: checking whether to enable _LP64 definition in curses.h" >&5
10328echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10329
10330# Check whether --enable-lp64 or --disable-lp64 was given.
10331if test "${enable_lp64+set}" = set; then
10332 enableval="$enable_lp64"
10333 with_lp64=$enableval
10334else
10335 with_lp64=$cf_dft_with_lp64
10336fi;
10337echo "$as_me:10337: result: $with_lp64" >&5
10338echo "${ECHO_T}$with_lp64" >&6
10339
10340if test "x$with_lp64" = xyes ; then
10341 cf_cv_enable_lp64=1
10342else
10343 cf_cv_enable_lp64=0
10344fi
10345
10346# Check whether --enable-largefile or --disable-largefile was given.
10347if test "${enable_largefile+set}" = set; then
10348 enableval="$enable_largefile"
10349
10350fi;
10351if test "$enable_largefile" != no; then
10352
10353 echo "$as_me:10353: checking for special C compiler options needed for large files" >&5
10354echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10355if test "${ac_cv_sys_largefile_CC+set}" = set; then
10356 echo $ECHO_N "(cached) $ECHO_C" >&6
10357else
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];
10376int
10377main ()
10378{
10379
10380 ;
10381 return 0;
10382}
10383_ACEOF
10384 rm -f conftest.$ac_objext
10385if { (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
10397else
10398 echo "$as_me: failed program was:" >&5
10399cat conftest.$ac_ext >&5
10400fi
10401rm -f conftest.$ac_objext
10402 CC="$CC -n32"
10403 rm -f conftest.$ac_objext
10404if { (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
10416else
10417 echo "$as_me: failed program was:" >&5
10418cat conftest.$ac_ext >&5
10419fi
10420rm -f conftest.$ac_objext
10421 break
10422 done
10423 CC=$ac_save_CC
10424 rm -f conftest.$ac_ext
10425 fi
10426fi
10427echo "$as_me:10427: result: $ac_cv_sys_largefile_CC" >&5
10428echo "${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
10431 fi
10432
10433 echo "$as_me:10433: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10434echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10435if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10436 echo $ECHO_N "(cached) $ECHO_C" >&6
10437else
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];
10452int
10453main ()
10454{
10455
10456 ;
10457 return 0;
10458}
10459_ACEOF
10460rm -f conftest.$ac_objext
10461if { (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
10473else
10474 echo "$as_me: failed program was:" >&5
10475cat conftest.$ac_ext >&5
10476fi
10477rm -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];
10491int
10492main ()
10493{
10494
10495 ;
10496 return 0;
10497}
10498_ACEOF
10499rm -f conftest.$ac_objext
10500if { (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
10512else
10513 echo "$as_me: failed program was:" >&5
10514cat conftest.$ac_ext >&5
10515fi
10516rm -f conftest.$ac_objext conftest.$ac_ext
10517 break
10518done
10519fi
10520echo "$as_me:10520: result: $ac_cv_sys_file_offset_bits" >&5
10521echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10522if test "$ac_cv_sys_file_offset_bits" != no; then
10523
10524cat >>confdefs.h <<EOF
10525#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10526EOF
10527
10528fi
10529rm -rf conftest*
10530 echo "$as_me:10530: checking for _LARGE_FILES value needed for large files" >&5
10531echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10532if test "${ac_cv_sys_large_files+set}" = set; then
10533 echo $ECHO_N "(cached) $ECHO_C" >&6
10534else
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];
10549int
10550main ()
10551{
10552
10553 ;
10554 return 0;
10555}
10556_ACEOF
10557rm -f conftest.$ac_objext
10558if { (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
10570else
10571 echo "$as_me: failed program was:" >&5
10572cat conftest.$ac_ext >&5
10573fi
10574rm -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];
10588int
10589main ()
10590{
10591
10592 ;
10593 return 0;
10594}
10595_ACEOF
10596rm -f conftest.$ac_objext
10597if { (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
10609else
10610 echo "$as_me: failed program was:" >&5
10611cat conftest.$ac_ext >&5
10612fi
10613rm -f conftest.$ac_objext conftest.$ac_ext
10614 break
10615done
10616fi
10617echo "$as_me:10617: result: $ac_cv_sys_large_files" >&5
10618echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10619if test "$ac_cv_sys_large_files" != no; then
10620
10621cat >>confdefs.h <<EOF
10622#define _LARGE_FILES $ac_cv_sys_large_files
10623EOF
10624
10625fi
10626rm -rf conftest*
10627fi
10628
10629 if test "$enable_largefile" != no ; then
10630 echo "$as_me:10630: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10631echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10632if test "${ac_cv_sys_largefile_source+set}" = set; then
10633 echo $ECHO_N "(cached) $ECHO_C" >&6
10634else
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>
10641int
10642main ()
10643{
10644return !fseeko;
10645 ;
10646 return 0;
10647}
10648_ACEOF
10649rm -f conftest.$ac_objext
10650if { (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
10662else
10663 echo "$as_me: failed program was:" >&5
10664cat conftest.$ac_ext >&5
10665fi
10666rm -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>
10672int
10673main ()
10674{
10675return !fseeko;
10676 ;
10677 return 0;
10678}
10679_ACEOF
10680rm -f conftest.$ac_objext
10681if { (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
10693else
10694 echo "$as_me: failed program was:" >&5
10695cat conftest.$ac_ext >&5
10696fi
10697rm -f conftest.$ac_objext conftest.$ac_ext
10698 break
10699done
10700fi
10701echo "$as_me:10701: result: $ac_cv_sys_largefile_source" >&5
10702echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10703if test "$ac_cv_sys_largefile_source" != no; then
10704
10705cat >>confdefs.h <<EOF
10706#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10707EOF
10708
10709fi
10710rm -rf conftest*
10711
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.
10715echo "$as_me:10715: checking for fseeko" >&5
10716echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10717if test "${ac_cv_func_fseeko+set}" = set; then
10718 echo $ECHO_N "(cached) $ECHO_C" >&6
10719else
10720 cat >conftest.$ac_ext <<_ACEOF
10721#line 10721 "configure"
10722#include "confdefs.h"
10723#include <stdio.h>
10724int
10725main ()
10726{
10727return fseeko && fseeko (stdin, 0, 0);
10728 ;
10729 return 0;
10730}
10731_ACEOF
10732rm -f conftest.$ac_objext conftest$ac_exeext
10733if { (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
10745else
10746 echo "$as_me: failed program was:" >&5
10747cat conftest.$ac_ext >&5
10748ac_cv_func_fseeko=no
10749fi
10750rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10751fi
10752echo "$as_me:10752: result: $ac_cv_func_fseeko" >&5
10753echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10754if test $ac_cv_func_fseeko = yes; then
10755
10756cat >>confdefs.h <<\EOF
10757#define HAVE_FSEEKO 1
10758EOF
10759
10760fi
10761
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 "
10772
10773 echo "$as_me:10773: checking whether to use struct dirent64" >&5
10774echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10775if test "${cf_cv_struct_dirent64+set}" = set; then
10776 echo $ECHO_N "(cached) $ECHO_C" >&6
10777else
10778
10779 cat >conftest.$ac_ext <<_ACEOF
10780#line 10780 "configure"
10781#include "confdefs.h"
10782
10783#include <sys/types.h>
10784#include <dirent.h>
10785
10786int
10787main ()
10788{
10789
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;
10795
10796 ;
10797 return 0;
10798}
10799_ACEOF
10800rm -f conftest.$ac_objext
10801if { (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
10813else
10814 echo "$as_me: failed program was:" >&5
10815cat conftest.$ac_ext >&5
10816cf_cv_struct_dirent64=no
10817fi
10818rm -f conftest.$ac_objext conftest.$ac_ext
10819
10820fi
10821echo "$as_me:10821: result: $cf_cv_struct_dirent64" >&5
10822echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10823 test "$cf_cv_struct_dirent64" = yes &&
10824cat >>confdefs.h <<\EOF
10825#define HAVE_STRUCT_DIRENT64 1
10826EOF
10827
10828 fi
10829
10830### use option --disable-tparm-varargs to make tparm() conform to X/Open
10831echo "$as_me:10831: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10832echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10833
10834# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10835if test "${enable_tparm_varargs+set}" = set; then
10836 enableval="$enable_tparm_varargs"
10837 with_tparm_varargs=$enableval
10838else
10839 with_tparm_varargs=yes
10840fi;
10841echo "$as_me:10841: result: $with_tparm_varargs" >&5
10842echo "${ECHO_T}$with_tparm_varargs" >&6
10843NCURSES_TPARM_VARARGS=0
10844test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10845
10846### use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10847if test "$with_ticlib" != no ; then
10848echo "$as_me:10848: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10849echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10850
10851# Check whether --enable-tic-depends or --disable-tic-depends was given.
10852if test "${enable_tic_depends+set}" = set; then
10853 enableval="$enable_tic_depends"
10854 with_tic_depends=$enableval
10855else
10856 with_tic_depends=yes
10857fi;
10858echo "$as_me:10858: result: $with_tic_depends" >&5
10859echo "${ECHO_T}$with_tic_depends" >&6
10860else
10861 with_tic_depends=no
10862fi
10863
10864### use option --with-bool to override bool's type
10865echo "$as_me:10865: checking for type of bool" >&5
10866echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10867
10868# Check whether --with-bool or --without-bool was given.
10869if test "${with_bool+set}" = set; then
10870 withval="$with_bool"
10871 NCURSES_BOOL="$withval"
10872else
10873 NCURSES_BOOL=auto
10874fi;
10875echo "$as_me:10875: result: $NCURSES_BOOL" >&5
10876echo "${ECHO_T}$NCURSES_BOOL" >&6
10877
10878echo "$as_me:10878: checking for alternate terminal capabilities file" >&5
10879echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10880
10881# Check whether --with-caps or --without-caps was given.
10882if test "${with_caps+set}" = set; then
10883 withval="$with_caps"
10884 TERMINFO_CAPS=Caps.$withval
10885else
10886 TERMINFO_CAPS=Caps
10887fi;
10888test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10889echo "$as_me:10889: result: $TERMINFO_CAPS" >&5
10890echo "${ECHO_T}$TERMINFO_CAPS" >&6
10891
10892### use option --with-chtype to override chtype's type
10893echo "$as_me:10893: checking for type of chtype" >&5
10894echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10895
10896# Check whether --with-chtype or --without-chtype was given.
10897if test "${with_chtype+set}" = set; then
10898 withval="$with_chtype"
10899 NCURSES_CHTYPE="$withval"
10900else
10901 NCURSES_CHTYPE=$cf_dft_chtype
10902fi;
10903echo "$as_me:10903: result: $NCURSES_CHTYPE" >&5
10904echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10905
10906### use option --with-ospeed to override ospeed's type
10907echo "$as_me:10907: checking for type of ospeed" >&5
10908echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10909
10910# Check whether --with-ospeed or --without-ospeed was given.
10911if test "${with_ospeed+set}" = set; then
10912 withval="$with_ospeed"
10913 NCURSES_OSPEED="$withval"
10914else
10915 NCURSES_OSPEED=short
10916fi;
10917echo "$as_me:10917: result: $NCURSES_OSPEED" >&5
10918echo "${ECHO_T}$NCURSES_OSPEED" >&6
10919
10920### use option --with-mmask-t to override mmask_t's type
10921echo "$as_me:10921: checking for type of mmask_t" >&5
10922echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10923
10924# Check whether --with-mmask-t or --without-mmask-t was given.
10925if test "${with_mmask_t+set}" = set; then
10926 withval="$with_mmask_t"
10927 NCURSES_MMASK_T="$withval"
10928else
10929 NCURSES_MMASK_T=$cf_dft_mmask_t
10930fi;
10931echo "$as_me:10931: result: $NCURSES_MMASK_T" >&5
10932echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10933
10934### use option --with-ccharw-max to override CCHARW_MAX size
10935echo "$as_me:10935: checking for size CCHARW_MAX" >&5
10936echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10937
10938# Check whether --with-ccharw-max or --without-ccharw-max was given.
10939if test "${with_ccharw_max+set}" = set; then
10940 withval="$with_ccharw_max"
10941 NCURSES_CCHARW_MAX="$withval"
10942else
10943 NCURSES_CCHARW_MAX=5
10944fi;
10945echo "$as_me:10945: result: $NCURSES_CCHARW_MAX" >&5
10946echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10947
10948### use option --with-tparm-arg to override tparm's argument type
10949echo "$as_me:10949: checking for type of tparm args" >&5
10950echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10951
10952# Check whether --with-tparm-arg or --without-tparm-arg was given.
10953if test "${with_tparm_arg+set}" = set; then
10954 withval="$with_tparm_arg"
10955 NCURSES_TPARM_ARG="$withval"
10956else
10957 NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10958fi;
10959echo "$as_me:10959: result: $NCURSES_TPARM_ARG" >&5
10960echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10961
10962### Enable compiling-in rcs id's
10963echo "$as_me:10963: checking if RCS identifiers should be compiled-in" >&5
10964echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10965
10966# Check whether --with-rcs-ids or --without-rcs-ids was given.
10967if test "${with_rcs_ids+set}" = set; then
10968 withval="$with_rcs_ids"
10969 with_rcs_ids=$withval
10970else
10971 with_rcs_ids=no
10972fi;
10973echo "$as_me:10973: result: $with_rcs_ids" >&5
10974echo "${ECHO_T}$with_rcs_ids" >&6
10975test "x$with_rcs_ids" = xyes &&
10976cat >>confdefs.h <<\EOF
10977#define USE_RCS_IDS 1
10978EOF
10979
10980###############################################################################
10981
10982echo "$as_me:10982: checking format of man-pages" >&5
10983echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10984
10985# Check whether --with-manpage-format or --without-manpage-format was given.
10986if test "${with_manpage_format+set}" = set; then
10987 withval="$with_manpage_format"
10988 MANPAGE_FORMAT=$withval
10989else
10990 MANPAGE_FORMAT=unknown
10991fi;
10992
10993test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10994MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10995
10996cf_unknown=
10997
10998case $MANPAGE_FORMAT in
10999(unknown)
11000 if test -z "$MANPATH" ; then
11001 MANPATH="/usr/man:/usr/share/man"
11002 fi
11003
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
11009
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
11014 do
11015 cf_test=`echo $cf_name | sed -e 's/*//'`
11016 if test "x$cf_test" = "x$cf_name" ; then
11017
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
11024
11025 case "$cf_name" in
11026 ($cf_dir/man*)
11027 cf_catonly=no
11028 ;;
11029 ($cf_dir/cat*)
11030 cf_preform=yes
11031 ;;
11032 esac
11033 break
11034 fi
11035
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
11044 ;;
11045 esac
11046 test $cf_found=yes && break
11047 fi
11048 done
11049 # only check the first directory in $MANPATH where we find manpages
11050 if test -n "$MANPAGE_FORMAT" ; then
11051 break
11052 fi
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"
11057 ;;
11058(*)
11059 for cf_option in $MANPAGE_FORMAT; do
11060 case $cf_option in
11061 (gzip|compress|BSDI|normal|formatted|catonly)
11062 ;;
11063 (*)
11064 cf_unknown="$cf_unknown $cf_option"
11065 ;;
11066 esac
11067 done
11068 ;;
11069esac
11070
11071echo "$as_me:11071: result: $MANPAGE_FORMAT" >&5
11072echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11073if test -n "$cf_unknown" ; then
11074 { echo "$as_me:11074: WARNING: Unexpected manpage-format $cf_unknown" >&5
11075echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11076fi
11077
11078echo "$as_me:11078: checking for manpage renaming" >&5
11079echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11080
11081# Check whether --with-manpage-renames or --without-manpage-renames was given.
11082if test "${with_manpage_renames+set}" = set; then
11083 withval="$with_manpage_renames"
11084 MANPAGE_RENAMES=$withval
11085else
11086 MANPAGE_RENAMES=yes
11087fi;
11088
11089case ".$MANPAGE_RENAMES" in
11090(.no)
11091 ;;
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
11098 fi
11099 ;;
11100esac
11101
11102if 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
11107echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11108 { (exit 1); exit 1; }; }
11109 fi
11110
11111 test ! -d man && mkdir man
11112
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
11117 fi
11118fi
11119
11120echo "$as_me:11120: result: $MANPAGE_RENAMES" >&5
11121echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11122
11123echo "$as_me:11123: checking if manpage aliases will be installed" >&5
11124echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11125
11126# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11127if test "${with_manpage_aliases+set}" = set; then
11128 withval="$with_manpage_aliases"
11129 MANPAGE_ALIASES=$withval
11130else
11131 MANPAGE_ALIASES=yes
11132fi;
11133
11134echo "$as_me:11134: result: $MANPAGE_ALIASES" >&5
11135echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11136
11137case "x$LN_S" in
11138(xln*)
11139 cf_use_symlinks=yes
11140 ;;
11141(*)
11142 cf_use_symlinks=no
11143 ;;
11144esac
11145
11146MANPAGE_SYMLINKS=no
11147if test "$MANPAGE_ALIASES" = yes ; then
11148echo "$as_me:11148: checking if manpage symlinks should be used" >&5
11149echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11150
11151# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11152if test "${with_manpage_symlinks+set}" = set; then
11153 withval="$with_manpage_symlinks"
11154 MANPAGE_SYMLINKS=$withval
11155else
11156 MANPAGE_SYMLINKS=$cf_use_symlinks
11157fi;
11158
11159if test "$$cf_use_symlinks" = no; then
11160if test "$MANPAGE_SYMLINKS" = yes ; then
11161 { echo "$as_me:11161: WARNING: cannot make symlinks" >&5
11162echo "$as_me: WARNING: cannot make symlinks" >&2;}
11163 MANPAGE_SYMLINKS=no
11164fi
11165fi
11166
11167echo "$as_me:11167: result: $MANPAGE_SYMLINKS" >&5
11168echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11169fi
11170
11171echo "$as_me:11171: checking for manpage tbl" >&5
11172echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11173
11174# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11175if test "${with_manpage_tbl+set}" = set; then
11176 withval="$with_manpage_tbl"
11177 MANPAGE_TBL=$withval
11178else
11179 MANPAGE_TBL=no
11180fi;
11181
11182echo "$as_me:11182: result: $MANPAGE_TBL" >&5
11183echo "${ECHO_T}$MANPAGE_TBL" >&6
11184
11185if test "$prefix" = "NONE" ; then
11186 cf_prefix="$ac_default_prefix"
11187else
11188 cf_prefix="$prefix"
11189fi
11190
11191case "$MANPAGE_FORMAT" in
11192(*catonly*)
11193 cf_format=yes
11194 cf_inboth=no
11195 ;;
11196(*formatted*)
11197 cf_format=yes
11198 cf_inboth=yes
11199 ;;
11200(*)
11201 cf_format=no
11202 cf_inboth=no
11203 ;;
11204esac
11205
11206test ! -d man && mkdir man
11207
11208cf_so_strip=
11209cf_compress=
11210case "$MANPAGE_FORMAT" in
11211(*compress*)
11212 cf_so_strip="Z"
11213 cf_compress=compress
11214 ;;
11215(*gzip*)
11216 cf_so_strip="gz"
11217 cf_compress=gzip
11218 ;;
11219esac
11220
11221cf_edit_man=./edit_man.sh
11222cf_man_alias=`pwd`/man_alias.sed
11223
11224cat >$cf_edit_man <<CF_EOF
11225#! $SHELL
11226# this script is generated by the configure-script CF_MAN_PAGES macro.
11227
11228prefix="$cf_prefix"
11229datarootdir="$datarootdir"
11230datadir="$datadir"
11231
11232NCURSES_MAJOR="$NCURSES_MAJOR"
11233NCURSES_MINOR="$NCURSES_MINOR"
11234NCURSES_PATCH="$NCURSES_PATCH"
11235
11236NCURSES_OSPEED="$NCURSES_OSPEED"
11237TERMINFO="$TERMINFO"
11238
11239INSTALL="$INSTALL"
11240INSTALL_DATA="$INSTALL_DATA"
11241
11242transform="$program_transform_name"
11243
11244TMP=\${TMPDIR:=/tmp}/man\$\$
11245trap "rm -f \$TMP" 0 1 2 5 15
11246
11247form=\$1
11248shift || exit 1
11249
11250verb=\$1
11251shift || exit 1
11252
11253mandir=\$1
11254shift || exit 1
11255
11256srcdir=\$1
11257top_srcdir=\$srcdir/..
11258shift || exit 1
11259
11260if 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 $?
11265 fi
11266 fi
11267 cf_subdir=\$mandir/man
11268 cf_tables=$MANPAGE_TBL
11269else
11270 cf_subdir=\$mandir/cat
11271 cf_tables=yes
11272fi
11273
11274# process the list of source-files
11275for i in \$* ; do
11276case \$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
11283 fi
11284 fi
11285
11286 # replace variables in man page
11287 if test ! -f $cf_man_alias ; then
11288cat >>$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
11296CF_EOF
11297
11298 for cf_name in captoinfo clear infocmp infotocap tabs tic toe tput tset
11299 do
11300 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11301 cf_name=`echo $cf_name|sed "$program_transform_name"`
11302cat >>$cf_edit_man <<-CF_EOF
11303 s,@$cf_NAME@,$cf_name,g
11304CF_EOF
11305 done
11306
11307cat >>$cf_edit_man <<CF_EOF
11308CF_EOF2
11309 echo "...made $cf_man_alias"
11310 fi
11311
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
11319 fi
11320CF_EOF
11321
11322if test "$MANPAGE_ALIASES" != no ; then
11323cat >>$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\`
11327CF_EOF
11328fi
11329
11330if test "$MANPAGE_RENAMES" = no ; then
11331cat >>$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
11337 fi
11338CF_EOF
11339else
11340cat >>$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"
11345 fi
11346 cf_target="\$cf_subdir\${section}/\${cf_target}"
11347
11348CF_EOF
11349fi
11350
11351cat >>$cf_edit_man <<CF_EOF
11352 sed -f $cf_man_alias \\
11353CF_EOF
11354
11355if test -f $MANPAGE_RENAMES ; then
11356cat >>$cf_edit_man <<CF_EOF
11357 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11358CF_EOF
11359else
11360cat >>$cf_edit_man <<CF_EOF
11361 < \$i >\$TMP
11362CF_EOF
11363fi
11364
11365cat >>$cf_edit_man <<CF_EOF
11366if test \$cf_tables = yes ; then
11367 tbl \$TMP >\$TMP.out
11368 mv \$TMP.out \$TMP
11369fi
11370CF_EOF
11371
11372if test $with_overwrite != yes ; then
11373cat >>$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
11376CF_EOF
11377fi
11378
11379if test $with_curses_h != yes ; then
11380cat >>$cf_edit_man <<CF_EOF
11381 sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11382 mv \$TMP.out \$TMP
11383CF_EOF
11384fi
11385
11386cat >>$cf_edit_man <<CF_EOF
11387 if test \$form = format ; then
11388 nroff -man \$TMP >\$TMP.out
11389 mv \$TMP.out \$TMP
11390 fi
11391CF_EOF
11392
11393if test -n "$cf_compress" ; then
11394cat >>$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
11399 fi
11400 fi
11401 cf_target="\$cf_target.$cf_so_strip"
11402CF_EOF
11403fi
11404
11405case "$MANPAGE_FORMAT" in
11406(*BSDI*)
11407cat >>$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/'\`"
11411 fi
11412CF_EOF
11413 ;;
11414esac
11415
11416cat >>$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
11428 do
11429 if test \$section = 1 ; then
11430 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11431 fi
11432
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
11438 fi
11439 fi
11440 echo .. \$verb alias \$cf_alias\${suffix}
11441CF_EOF
11442case "x$LN_S" in
11443(*-f)
11444cat >>$cf_edit_man <<CF_EOF
11445 $LN_S \$cf_target \$cf_alias\${suffix}
11446CF_EOF
11447 ;;
11448(*)
11449cat >>$cf_edit_man <<CF_EOF
11450 rm -f \$cf_alias\${suffix}
11451 $LN_S \$cf_target \$cf_alias\${suffix}
11452CF_EOF
11453 ;;
11454esac
11455cat >>$cf_edit_man <<CF_EOF
11456 elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11457 echo ".so \$cf_source" >\$TMP
11458CF_EOF
11459if test -n "$cf_compress" ; then
11460cat >>$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
11464 fi
11465CF_EOF
11466fi
11467cat >>$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}
11471 fi
11472 done
11473 )
11474 )
11475 elif test \$verb = removing ; then
11476 test -f \$cf_target && (
11477 echo \$verb \$cf_target
11478 rm -f \$cf_target
11479 )
11480 test -d \$cf_subdir\${section} &&
11481 test -n "\$aliases" && (
11482 cd \$cf_subdir\${section} && (
11483 for cf_alias in \$aliases
11484 do
11485 if test \$section = 1 ; then
11486 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11487 fi
11488
11489 echo .. \$verb alias \$cf_alias\${suffix}
11490 rm -f \$cf_alias\${suffix}
11491 done
11492 )
11493 )
11494 else
11495# echo ".hy 0"
11496 cat \$TMP
11497 fi
11498 ;;
11499esac
11500done
11501
11502if test $cf_inboth = yes ; then
11503if test \$form != format ; then
11504 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11505fi
11506fi
11507
11508exit 0
11509CF_EOF
11510chmod 755 $cf_edit_man
11511
11512###############################################################################
11513
11514### Note that some functions (such as const) are normally disabled anyway.
11515echo "$as_me:11515: checking if you want to build with function extensions" >&5
11516echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11517
11518# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11519if test "${enable_ext_funcs+set}" = set; then
11520 enableval="$enable_ext_funcs"
11521 with_ext_funcs=$enableval
11522else
11523 with_ext_funcs=yes
11524fi;
11525echo "$as_me:11525: result: $with_ext_funcs" >&5
11526echo "${ECHO_T}$with_ext_funcs" >&6
11527if test "x$with_ext_funcs" = xyes ; then
11528 NCURSES_EXT_FUNCS=1
11529
11530cat >>confdefs.h <<\EOF
11531#define HAVE_ASSUME_DEFAULT_COLORS 1
11532EOF
11533
11534cat >>confdefs.h <<\EOF
11535#define HAVE_CURSES_VERSION 1
11536EOF
11537
11538cat >>confdefs.h <<\EOF
11539#define HAVE_HAS_KEY 1
11540EOF
11541
11542cat >>confdefs.h <<\EOF
11543#define HAVE_RESIZETERM 1
11544EOF
11545
11546cat >>confdefs.h <<\EOF
11547#define HAVE_RESIZE_TERM 1
11548EOF
11549
11550cat >>confdefs.h <<\EOF
11551#define HAVE_TERM_ENTRY_H 1
11552EOF
11553
11554cat >>confdefs.h <<\EOF
11555#define HAVE_USE_DEFAULT_COLORS 1
11556EOF
11557
11558cat >>confdefs.h <<\EOF
11559#define HAVE_USE_SCREEN 1
11560EOF
11561
11562cat >>confdefs.h <<\EOF
11563#define HAVE_USE_WINDOW 1
11564EOF
11565
11566cat >>confdefs.h <<\EOF
11567#define HAVE_WRESIZE 1
11568EOF
11569
11570cat >>confdefs.h <<\EOF
11571#define NCURSES_EXT_FUNCS 1
11572EOF
11573
11574 GENERATED_EXT_FUNCS=generated
11575else
11576 NCURSES_EXT_FUNCS=0
11577 GENERATED_EXT_FUNCS=
11578fi
11579
11580echo "$as_me:11580: checking if you want to build with SCREEN extensions" >&5
11581echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11582
11583# Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11584if test "${enable_sp_funcs+set}" = set; then
11585 enableval="$enable_sp_funcs"
11586 with_sp_funcs=$enableval
11587else
11588 with_sp_funcs=$cf_dft_ext_spfuncs
11589fi;
11590echo "$as_me:11590: result: $with_sp_funcs" >&5
11591echo "${ECHO_T}$with_sp_funcs" >&6
11592if test "x$with_sp_funcs" = xyes ; then
11593 NCURSES_SP_FUNCS=1
11594
11595cat >>confdefs.h <<\EOF
11596#define NCURSES_SP_FUNCS 1
11597EOF
11598
11599 GENERATED_SP_FUNCS=generated
11600else
11601 NCURSES_SP_FUNCS=0
11602 GENERATED_SP_FUNCS=
11603fi
11604
11605echo "$as_me:11605: checking if you want to build with terminal-driver" >&5
11606echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11607
11608# Check whether --enable-term-driver or --disable-term-driver was given.
11609if test "${enable_term_driver+set}" = set; then
11610 enableval="$enable_term_driver"
11611 with_term_driver=$enableval
11612else
11613 with_term_driver=no
11614fi;
11615echo "$as_me:11615: result: $with_term_driver" >&5
11616echo "${ECHO_T}$with_term_driver" >&6
11617if test "x$with_term_driver" = xyes ; then
11618
11619cat >>confdefs.h <<\EOF
11620#define USE_TERM_DRIVER 1
11621EOF
11622
11623 if test "x$with_termlib" != xno ; then
11624 { { echo "$as_me:11624: error: The term-driver option conflicts with the termlib option" >&5
11625echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11626 { (exit 1); exit 1; }; }
11627 fi
11628 if test "x$with_sp_funcs" != xyes ; then
11629 { { echo "$as_me:11629: error: The term-driver option relies upon sp-funcs" >&5
11630echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11631 { (exit 1); exit 1; }; }
11632 fi
11633fi
11634
11635### use option --enable-const to turn on use of const beyond that in XSI.
11636echo "$as_me:11636: checking for extended use of const keyword" >&5
11637echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11638
11639# Check whether --enable-const or --disable-const was given.
11640if test "${enable_const+set}" = set; then
11641 enableval="$enable_const"
11642 with_ext_const=$enableval
11643else
11644 with_ext_const=$cf_dft_ext_const
11645fi;
11646echo "$as_me:11646: result: $with_ext_const" >&5
11647echo "${ECHO_T}$with_ext_const" >&6
11648NCURSES_CONST='/*nothing*/'
11649if test "x$with_ext_const" = xyes ; then
11650 NCURSES_CONST=const
11651fi
11652
11653### use option --enable-ext-colors to turn on use of colors beyond 16.
11654echo "$as_me:11654: checking if you want to use extended colors" >&5
11655echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11656
11657# Check whether --enable-ext-colors or --disable-ext-colors was given.
11658if test "${enable_ext_colors+set}" = set; then
11659 enableval="$enable_ext_colors"
11660 with_ext_colors=$enableval
11661else
11662 with_ext_colors=$cf_dft_ext_colors
11663fi;
11664echo "$as_me:11664: result: $with_ext_colors" >&5
11665echo "${ECHO_T}$with_ext_colors" >&6
11666NCURSES_EXT_COLORS=0
11667if 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
11670echo "$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)
11673
11674if 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
11680echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11681 ;;
11682 esac
11683fi
11684
11685 NCURSES_EXT_COLORS=1
11686
11687cat >>confdefs.h <<\EOF
11688#define NCURSES_EXT_COLORS 1
11689EOF
11690
11691 fi
11692fi
11693
11694### use option --enable-ext-mouse to modify coding to support 5-button mice
11695echo "$as_me:11695: checking if you want to use extended mouse encoding" >&5
11696echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11697
11698# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11699if test "${enable_ext_mouse+set}" = set; then
11700 enableval="$enable_ext_mouse"
11701 with_ext_mouse=$enableval
11702else
11703 with_ext_mouse=$cf_dft_ext_mouse
11704fi;
11705echo "$as_me:11705: result: $with_ext_mouse" >&5
11706echo "${ECHO_T}$with_ext_mouse" >&6
11707NCURSES_MOUSE_VERSION=1
11708if test "x$with_ext_mouse" = xyes ; then
11709 NCURSES_MOUSE_VERSION=2
11710
11711if 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
11717echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11718 ;;
11719 esac
11720fi
11721
11722fi
11723
11724### use option --enable-ext-putwin to turn on extended screendumps
11725echo "$as_me:11725: checking if you want to use extended putwin/screendump" >&5
11726echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11727
11728# Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11729if test "${enable_ext_putwin+set}" = set; then
11730 enableval="$enable_ext_putwin"
11731 with_ext_putwin=$enableval
11732else
11733 with_ext_putwin=$cf_dft_ext_putwin
11734fi;
11735echo "$as_me:11735: result: $with_ext_putwin" >&5
11736echo "${ECHO_T}$with_ext_putwin" >&6
11737if test "x$with_ext_putwin" = xyes ; then
11738
11739cat >>confdefs.h <<\EOF
11740#define NCURSES_EXT_PUTWIN 1
11741EOF
11742
11743fi
11744
11745echo "$as_me:11745: checking if you want \$NCURSES_NO_PADDING code" >&5
11746echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11747
11748# Check whether --enable-no-padding or --disable-no-padding was given.
11749if test "${enable_no_padding+set}" = set; then
11750 enableval="$enable_no_padding"
11751 with_no_padding=$enableval
11752else
11753 with_no_padding=$with_ext_funcs
11754fi;
11755echo "$as_me:11755: result: $with_no_padding" >&5
11756echo "${ECHO_T}$with_no_padding" >&6
11757test "x$with_no_padding" = xyes &&
11758cat >>confdefs.h <<\EOF
11759#define NCURSES_NO_PADDING 1
11760EOF
11761
11762echo "$as_me:11762: checking for ANSI C header files" >&5
11763echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11764if test "${ac_cv_header_stdc+set}" = set; then
11765 echo $ECHO_N "(cached) $ECHO_C" >&6
11766else
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>
11774
11775_ACEOF
11776if { (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=
11788 fi
11789else
11790 ac_cpp_err=yes
11791fi
11792if test -z "$ac_cpp_err"; then
11793 ac_cv_header_stdc=yes
11794else
11795 echo "$as_me: failed program was:" >&5
11796 cat conftest.$ac_ext >&5
11797 ac_cv_header_stdc=no
11798fi
11799rm -f conftest.err conftest.$ac_ext
11800
11801if 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>
11807
11808_ACEOF
11809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11810 egrep "memchr" >/dev/null 2>&1; then
11811 :
11812else
11813 ac_cv_header_stdc=no
11814fi
11815rm -rf conftest*
11816
11817fi
11818
11819if 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>
11825
11826_ACEOF
11827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11828 egrep "free" >/dev/null 2>&1; then
11829 :
11830else
11831 ac_cv_header_stdc=no
11832fi
11833rm -rf conftest*
11834
11835fi
11836
11837if 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
11840 :
11841else
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
11855
11856#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11857int
11858main ()
11859{
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);
11866}
11867_ACEOF
11868rm -f conftest$ac_exeext
11869if { (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
11879 :
11880else
11881 echo "$as_me: program exited with status $ac_status" >&5
11882echo "$as_me: failed program was:" >&5
11883cat conftest.$ac_ext >&5
11884ac_cv_header_stdc=no
11885fi
11886rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11887fi
11888fi
11889fi
11890echo "$as_me:11890: result: $ac_cv_header_stdc" >&5
11891echo "${ECHO_T}$ac_cv_header_stdc" >&6
11892if test $ac_cv_header_stdc = yes; then
11893
11894cat >>confdefs.h <<\EOF
11895#define STDC_HEADERS 1
11896EOF
11897
11898fi
11899
11900# On IRIX 5.3, sys/types and inttypes.h are conflicting.
11901
11902for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11903 inttypes.h stdint.h unistd.h
11904do
11905as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11906echo "$as_me:11906: checking for $ac_header" >&5
11907echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11908if eval "test \"\${$as_ac_Header+set}\" = set"; then
11909 echo $ECHO_N "(cached) $ECHO_C" >&6
11910else
11911 cat >conftest.$ac_ext <<_ACEOF
11912#line 11912 "configure"
11913#include "confdefs.h"
11914$ac_includes_default
11915#include <$ac_header>
11916_ACEOF
11917rm -f conftest.$ac_objext
11918if { (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"
11930else
11931 echo "$as_me: failed program was:" >&5
11932cat conftest.$ac_ext >&5
11933eval "$as_ac_Header=no"
11934fi
11935rm -f conftest.$ac_objext conftest.$ac_ext
11936fi
11937echo "$as_me:11937: result: `eval echo '${'$as_ac_Header'}'`" >&5
11938echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11939if test `eval echo '${'$as_ac_Header'}'` = yes; then
11940 cat >>confdefs.h <<EOF
11941#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11942EOF
11943
11944fi
11945done
11946
11947echo "$as_me:11947: checking for signed char" >&5
11948echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11949if test "${ac_cv_type_signed_char+set}" = set; then
11950 echo $ECHO_N "(cached) $ECHO_C" >&6
11951else
11952 cat >conftest.$ac_ext <<_ACEOF
11953#line 11953 "configure"
11954#include "confdefs.h"
11955$ac_includes_default
11956int
11957main ()
11958{
11959if ((signed char *) 0)
11960 return 0;
11961if (sizeof (signed char))
11962 return 0;
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967rm -f conftest.$ac_objext
11968if { (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
11980else
11981 echo "$as_me: failed program was:" >&5
11982cat conftest.$ac_ext >&5
11983ac_cv_type_signed_char=no
11984fi
11985rm -f conftest.$ac_objext conftest.$ac_ext
11986fi
11987echo "$as_me:11987: result: $ac_cv_type_signed_char" >&5
11988echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11989
11990echo "$as_me:11990: checking size of signed char" >&5
11991echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11992if test "${ac_cv_sizeof_signed_char+set}" = set; then
11993 echo $ECHO_N "(cached) $ECHO_C" >&6
11994else
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.
11998cat >conftest.$ac_ext <<_ACEOF
11999#line 11999 "configure"
12000#include "confdefs.h"
12001$ac_includes_default
12002int
12003main ()
12004{
12005int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12006 ;
12007 return 0;
12008}
12009_ACEOF
12010rm -f conftest.$ac_objext
12011if { (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
12028int
12029main ()
12030{
12031int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12032 ;
12033 return 0;
12034}
12035_ACEOF
12036rm -f conftest.$ac_objext
12037if { (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
12049else
12050 echo "$as_me: failed program was:" >&5
12051cat conftest.$ac_ext >&5
12052ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12053fi
12054rm -f conftest.$ac_objext conftest.$ac_ext
12055 done
12056else
12057 echo "$as_me: failed program was:" >&5
12058cat conftest.$ac_ext >&5
12059ac_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
12065int
12066main ()
12067{
12068int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12069 ;
12070 return 0;
12071}
12072_ACEOF
12073rm -f conftest.$ac_objext
12074if { (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
12086else
12087 echo "$as_me: failed program was:" >&5
12088cat conftest.$ac_ext >&5
12089ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12090fi
12091rm -f conftest.$ac_objext conftest.$ac_ext
12092 done
12093fi
12094rm -f conftest.$ac_objext conftest.$ac_ext
12095# Binary search between lo and hi bounds.
12096while 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
12102int
12103main ()
12104{
12105int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12106 ;
12107 return 0;
12108}
12109_ACEOF
12110rm -f conftest.$ac_objext
12111if { (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
12123else
12124 echo "$as_me: failed program was:" >&5
12125cat conftest.$ac_ext >&5
12126ac_lo=`expr $ac_mid + 1`
12127fi
12128rm -f conftest.$ac_objext conftest.$ac_ext
12129done
12130ac_cv_sizeof_signed_char=$ac_lo
12131else
12132 if test "$cross_compiling" = yes; then
12133 { { echo "$as_me:12133: error: cannot run test program while cross compiling" >&5
12134echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12135 { (exit 1); exit 1; }; }
12136else
12137 cat >conftest.$ac_ext <<_ACEOF
12138#line 12138 "configure"
12139#include "confdefs.h"
12140$ac_includes_default
12141int
12142main ()
12143{
12144FILE *f = fopen ("conftest.val", "w");
12145if (!f)
12146 $ac_main_return (1);
12147fprintf (f, "%d", (sizeof (signed char)));
12148fclose (f);
12149 ;
12150 return 0;
12151}
12152_ACEOF
12153rm -f conftest$ac_exeext
12154if { (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`
12165else
12166 echo "$as_me: program exited with status $ac_status" >&5
12167echo "$as_me: failed program was:" >&5
12168cat conftest.$ac_ext >&5
12169fi
12170rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12171fi
12172fi
12173rm -f conftest.val
12174else
12175 ac_cv_sizeof_signed_char=0
12176fi
12177fi
12178echo "$as_me:12178: result: $ac_cv_sizeof_signed_char" >&5
12179echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12180cat >>confdefs.h <<EOF
12181#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12182EOF
12183
12184if test "$ac_cv_sizeof_signed_char" = 1 ; then
12185 NCURSES_SBOOL="signed char"
12186else
12187 NCURSES_SBOOL="char"
12188fi
12189echo "$as_me:12189: checking if you want to use signed Boolean array in term.h" >&5
12190echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12191
12192# Check whether --enable-signed-char or --disable-signed-char was given.
12193if test "${enable_signed_char+set}" = set; then
12194 enableval="$enable_signed_char"
12195 with_signed_char=$enableval
12196else
12197 with_signed_char=no
12198fi;
12199echo "$as_me:12199: result: $with_signed_char" >&5
12200echo "${ECHO_T}$with_signed_char" >&6
12201test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12202
12203### use option --enable-sigwinch to turn on use of SIGWINCH logic
12204echo "$as_me:12204: checking if you want SIGWINCH handler" >&5
12205echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12206
12207# Check whether --enable-sigwinch or --disable-sigwinch was given.
12208if test "${enable_sigwinch+set}" = set; then
12209 enableval="$enable_sigwinch"
12210 with_sigwinch=$enableval
12211else
12212 with_sigwinch=$with_ext_funcs
12213fi;
12214echo "$as_me:12214: result: $with_sigwinch" >&5
12215echo "${ECHO_T}$with_sigwinch" >&6
12216test "x$with_sigwinch" = xyes &&
12217cat >>confdefs.h <<\EOF
12218#define USE_SIGWINCH 1
12219EOF
12220
12221### use option --enable-tcap-names to allow user to define new capabilities
12222echo "$as_me:12222: checking if you want user-definable terminal capabilities like termcap" >&5
12223echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12224
12225# Check whether --enable-tcap-names or --disable-tcap-names was given.
12226if test "${enable_tcap_names+set}" = set; then
12227 enableval="$enable_tcap_names"
12228 with_tcap_names=$enableval
12229else
12230 with_tcap_names=$with_ext_funcs
12231fi;
12232echo "$as_me:12232: result: $with_tcap_names" >&5
12233echo "${ECHO_T}$with_tcap_names" >&6
12234NCURSES_XNAMES=0
12235test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12236
12237###############################################################################
12238# These options are relatively safe to experiment with.
12239
12240echo "$as_me:12240: checking if you want all development code" >&5
12241echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12242
12243# Check whether --with-develop or --without-develop was given.
12244if test "${with_develop+set}" = set; then
12245 withval="$with_develop"
12246 with_develop=$withval
12247else
12248 with_develop=no
12249fi;
12250echo "$as_me:12250: result: $with_develop" >&5
12251echo "${ECHO_T}$with_develop" >&6
12252
12253### use option --enable-hard-tabs to turn on use of hard-tabs optimize
12254echo "$as_me:12254: checking if you want hard-tabs code" >&5
12255echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12256
12257# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12258if test "${enable_hard_tabs+set}" = set; then
12259 enableval="$enable_hard_tabs"
12260
12261else
12262 enable_hard_tabs=$with_develop
12263fi;
12264echo "$as_me:12264: result: $enable_hard_tabs" >&5
12265echo "${ECHO_T}$enable_hard_tabs" >&6
12266test "x$enable_hard_tabs" = xyes &&
12267cat >>confdefs.h <<\EOF
12268#define USE_HARD_TABS 1
12269EOF
12270
12271### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12272echo "$as_me:12272: checking if you want limited support for xmc" >&5
12273echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12274
12275# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12276if test "${enable_xmc_glitch+set}" = set; then
12277 enableval="$enable_xmc_glitch"
12278
12279else
12280 enable_xmc_glitch=$with_develop
12281fi;
12282echo "$as_me:12282: result: $enable_xmc_glitch" >&5
12283echo "${ECHO_T}$enable_xmc_glitch" >&6
12284test "x$enable_xmc_glitch" = xyes &&
12285cat >>confdefs.h <<\EOF
12286#define USE_XMC_SUPPORT 1
12287EOF
12288
12289###############################################################################
12290# These are just experimental, probably should not be in a package:
12291
12292echo "$as_me:12292: checking if you do not want to assume colors are white-on-black" >&5
12293echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12294
12295# Check whether --enable-assumed-color or --disable-assumed-color was given.
12296if test "${enable_assumed_color+set}" = set; then
12297 enableval="$enable_assumed_color"
12298 with_assumed_color=$enableval
12299else
12300 with_assumed_color=yes
12301fi;
12302echo "$as_me:12302: result: $with_assumed_color" >&5
12303echo "${ECHO_T}$with_assumed_color" >&6
12304test "x$with_assumed_color" = xyes &&
12305cat >>confdefs.h <<\EOF
12306#define USE_ASSUMED_COLOR 1
12307EOF
12308
12309### use option --enable-hashmap to turn on use of hashmap scrolling logic
12310echo "$as_me:12310: checking if you want hashmap scrolling-optimization code" >&5
12311echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12312
12313# Check whether --enable-hashmap or --disable-hashmap was given.
12314if test "${enable_hashmap+set}" = set; then
12315 enableval="$enable_hashmap"
12316 with_hashmap=$enableval
12317else
12318 with_hashmap=yes
12319fi;
12320echo "$as_me:12320: result: $with_hashmap" >&5
12321echo "${ECHO_T}$with_hashmap" >&6
12322test "x$with_hashmap" = xyes &&
12323cat >>confdefs.h <<\EOF
12324#define USE_HASHMAP 1
12325EOF
12326
12327### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12328echo "$as_me:12328: checking if you want colorfgbg code" >&5
12329echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12330
12331# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12332if test "${enable_colorfgbg+set}" = set; then
12333 enableval="$enable_colorfgbg"
12334 with_colorfgbg=$enableval
12335else
12336 with_colorfgbg=no
12337fi;
12338echo "$as_me:12338: result: $with_colorfgbg" >&5
12339echo "${ECHO_T}$with_colorfgbg" >&6
12340test "x$with_colorfgbg" = xyes &&
12341cat >>confdefs.h <<\EOF
12342#define USE_COLORFGBG 1
12343EOF
12344
12345### use option --enable-interop to turn on use of bindings used for interop
12346echo "$as_me:12346: checking if you want interop bindings" >&5
12347echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12348
12349# Check whether --enable-interop or --disable-interop was given.
12350if test "${enable_interop+set}" = set; then
12351 enableval="$enable_interop"
12352 with_exp_interop=$enableval
12353else
12354 with_exp_interop=$cf_dft_interop
12355fi;
12356echo "$as_me:12356: result: $with_exp_interop" >&5
12357echo "${ECHO_T}$with_exp_interop" >&6
12358
12359NCURSES_INTEROP_FUNCS=0
12360test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12361
12362# This is still experimental (20080329), but should ultimately be moved to
12363# the script-block --with-normal, etc.
12364
12365echo "$as_me:12365: checking if you want to link with the pthread library" >&5
12366echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12367
12368# Check whether --with-pthread or --without-pthread was given.
12369if test "${with_pthread+set}" = set; then
12370 withval="$with_pthread"
12371 with_pthread=$withval
12372else
12373 with_pthread=no
12374fi;
12375echo "$as_me:12375: result: $with_pthread" >&5
12376echo "${ECHO_T}$with_pthread" >&6
12377
12378if test "$with_pthread" != no ; then
12379 echo "$as_me:12379: checking for pthread.h" >&5
12380echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12381if test "${ac_cv_header_pthread_h+set}" = set; then
12382 echo $ECHO_N "(cached) $ECHO_C" >&6
12383else
12384 cat >conftest.$ac_ext <<_ACEOF
12385#line 12385 "configure"
12386#include "confdefs.h"
12387#include <pthread.h>
12388_ACEOF
12389if { (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=
12401 fi
12402else
12403 ac_cpp_err=yes
12404fi
12405if test -z "$ac_cpp_err"; then
12406 ac_cv_header_pthread_h=yes
12407else
12408 echo "$as_me: failed program was:" >&5
12409 cat conftest.$ac_ext >&5
12410 ac_cv_header_pthread_h=no
12411fi
12412rm -f conftest.err conftest.$ac_ext
12413fi
12414echo "$as_me:12414: result: $ac_cv_header_pthread_h" >&5
12415echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12416if test $ac_cv_header_pthread_h = yes; then
12417
12418cat >>confdefs.h <<\EOF
12419#define HAVE_PTHREADS_H 1
12420EOF
12421
12422 for cf_lib_pthread in pthread c_r
12423 do
12424 echo "$as_me:12424: checking if we can link with the $cf_lib_pthread library" >&5
12425echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12426 cf_save_LIBS="$LIBS"
12427
12428cf_add_libs="-l$cf_lib_pthread"
12429# Filter out duplicates - this happens with badly-designed ".pc" files...
12430for cf_add_1lib in $LIBS
12431do
12432 for cf_add_2lib in $cf_add_libs
12433 do
12434 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12435 then
12436 cf_add_1lib=
12437 break
12438 fi
12439 done
12440 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12441done
12442LIBS="$cf_add_libs"
12443
12444 cat >conftest.$ac_ext <<_ACEOF
12445#line 12445 "configure"
12446#include "confdefs.h"
12447
12448#include <pthread.h>
12449
12450int
12451main ()
12452{
12453
12454 int rc = pthread_create(0,0,0,0);
12455 int r2 = pthread_mutexattr_settype(0, 0);
12456
12457 ;
12458 return 0;
12459}
12460_ACEOF
12461rm -f conftest.$ac_objext conftest$ac_exeext
12462if { (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
12474else
12475 echo "$as_me: failed program was:" >&5
12476cat conftest.$ac_ext >&5
12477with_pthread=no
12478fi
12479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12480 LIBS="$cf_save_LIBS"
12481 echo "$as_me:12481: result: $with_pthread" >&5
12482echo "${ECHO_T}$with_pthread" >&6
12483 test "$with_pthread" = yes && break
12484 done
12485
12486 if test "$with_pthread" = yes ; then
12487
12488cf_add_libs="-l$cf_lib_pthread"
12489# Filter out duplicates - this happens with badly-designed ".pc" files...
12490for cf_add_1lib in $LIBS
12491do
12492 for cf_add_2lib in $cf_add_libs
12493 do
12494 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12495 then
12496 cf_add_1lib=
12497 break
12498 fi
12499 done
12500 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12501done
12502LIBS="$cf_add_libs"
12503
12504cat >>confdefs.h <<\EOF
12505#define HAVE_LIBPTHREADS 1
12506EOF
12507
12508 else
12509 { { echo "$as_me:12509: error: Cannot link with pthread library" >&5
12510echo "$as_me: error: Cannot link with pthread library" >&2;}
12511 { (exit 1); exit 1; }; }
12512 fi
12513
12514fi
12515
12516fi
12517
12518if test "x$with_pthread" != xno; then
12519 echo "$as_me:12519: checking for pthread_kill" >&5
12520echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12521if test "${ac_cv_func_pthread_kill+set}" = set; then
12522 echo $ECHO_N "(cached) $ECHO_C" >&6
12523else
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
12532extern "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. */
12536char pthread_kill ();
12537char (*f) ();
12538
12539int
12540main ()
12541{
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)
12546choke me
12547#else
12548f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12549#endif
12550
12551 ;
12552 return 0;
12553}
12554_ACEOF
12555rm -f conftest.$ac_objext conftest$ac_exeext
12556if { (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
12568else
12569 echo "$as_me: failed program was:" >&5
12570cat conftest.$ac_ext >&5
12571ac_cv_func_pthread_kill=no
12572fi
12573rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12574fi
12575echo "$as_me:12575: result: $ac_cv_func_pthread_kill" >&5
12576echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12577if test $ac_cv_func_pthread_kill = yes; then
12578
12579 echo "$as_me:12579: checking if you want to allow EINTR in wgetch with pthreads" >&5
12580echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12581
12582# Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12583if test "${enable_pthreads_eintr+set}" = set; then
12584 enableval="$enable_pthreads_eintr"
12585 use_pthreads_eintr=$enableval
12586else
12587 use_pthreads_eintr=no
12588fi;
12589 echo "$as_me:12589: result: $use_pthreads_eintr" >&5
12590echo "${ECHO_T}$use_pthreads_eintr" >&6
12591 if test "x$use_pthreads_eintr" = xyes ; then
12592
12593cat >>confdefs.h <<\EOF
12594#define USE_PTHREADS_EINTR 1
12595EOF
12596
12597 fi
12598fi
12599
12600 echo "$as_me:12600: checking if you want to use weak-symbols for pthreads" >&5
12601echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12602
12603# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12604if test "${enable_weak_symbols+set}" = set; then
12605 enableval="$enable_weak_symbols"
12606 use_weak_symbols=$enableval
12607else
12608 use_weak_symbols=no
12609fi;
12610 echo "$as_me:12610: result: $use_weak_symbols" >&5
12611echo "${ECHO_T}$use_weak_symbols" >&6
12612 if test "x$use_weak_symbols" = xyes ; then
12613
12614echo "$as_me:12614: checking if $CC supports weak symbols" >&5
12615echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12616if test "${cf_cv_weak_symbols+set}" = set; then
12617 echo $ECHO_N "(cached) $ECHO_C" >&6
12618else
12619
12620cat >conftest.$ac_ext <<_ACEOF
12621#line 12621 "configure"
12622#include "confdefs.h"
12623
12624#include <stdio.h>
12625int
12626main ()
12627{
12628
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
12639
12640weak_symbol(fopen);
12641
12642 ;
12643 return 0;
12644}
12645_ACEOF
12646rm -f conftest.$ac_objext
12647if { (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
12659else
12660 echo "$as_me: failed program was:" >&5
12661cat conftest.$ac_ext >&5
12662cf_cv_weak_symbols=no
12663fi
12664rm -f conftest.$ac_objext conftest.$ac_ext
12665
12666fi
12667echo "$as_me:12667: result: $cf_cv_weak_symbols" >&5
12668echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12669
12670 else
12671 cf_cv_weak_symbols=no
12672 fi
12673
12674 if test "x$cf_cv_weak_symbols" = xyes ; then
12675
12676cat >>confdefs.h <<\EOF
12677#define USE_WEAK_SYMBOLS 1
12678EOF
12679
12680 fi
12681fi
12682
12683PTHREAD=
12684if test "x$with_pthread" = "xyes" ; then
12685
12686cat >>confdefs.h <<\EOF
12687#define USE_PTHREADS 1
12688EOF
12689
12690 enable_reentrant=yes
12691 if test "x$cf_cv_weak_symbols" = xyes ; then
12692 PTHREAD=-lpthread
12693 fi
12694fi
12695
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.
12700echo "$as_me:12700: checking if you want reentrant code" >&5
12701echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12702
12703# Check whether --enable-reentrant or --disable-reentrant was given.
12704if test "${enable_reentrant+set}" = set; then
12705 enableval="$enable_reentrant"
12706 with_reentrant=$enableval
12707else
12708 with_reentrant=no
12709fi;
12710echo "$as_me:12710: result: $with_reentrant" >&5
12711echo "${ECHO_T}$with_reentrant" >&6
12712if 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
12718
12719# remove pthread library from $LIBS
12720LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
12721
12722cf_add_libs="-lpthread"
12723# Filter out duplicates - this happens with badly-designed ".pc" files...
12724for cf_add_1lib in $TEST_LIBS
12725do
12726 for cf_add_2lib in $cf_add_libs
12727 do
12728 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12729 then
12730 cf_add_1lib=
12731 break
12732 fi
12733 done
12734 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12735done
12736TEST_LIBS="$cf_add_libs"
12737
12738cf_add_libs="-lpthread"
12739# Filter out duplicates - this happens with badly-designed ".pc" files...
12740for cf_add_1lib in $TEST_LIBS2
12741do
12742 for cf_add_2lib in $cf_add_libs
12743 do
12744 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12745 then
12746 cf_add_1lib=
12747 break
12748 fi
12749 done
12750 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12751done
12752TEST_LIBS2="$cf_add_libs"
12753
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}"
12764 fi
12765 fi ;;
12766 (*)
12767 if test "x$disable_lib_suffixes" = "xno" ; then
12768 LIB_SUFFIX="t${LIB_SUFFIX}"
12769 fi
12770 ;;
12771 esac
12772 fi
12773
12774cat >>confdefs.h <<\EOF
12775#define USE_REENTRANT 1
12776EOF
12777
12778if 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
12784echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12785 ;;
12786 esac
12787fi
12788
12789else
12790 cf_cv_enable_reentrant=0
12791 cf_cv_enable_opaque="NCURSES_OPAQUE"
12792 NCURSES_OPAQUE=0
12793 NCURSES_SIZE_T=short
12794fi
12795
12796### Allow using a different wrap-prefix
12797if 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
12799echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12800
12801# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12802if test "${with_wrap_prefix+set}" = set; then
12803 withval="$with_wrap_prefix"
12804 NCURSES_WRAP_PREFIX=$withval
12805else
12806 NCURSES_WRAP_PREFIX=_nc_
12807fi;
12808 echo "$as_me:12808: result: $NCURSES_WRAP_PREFIX" >&5
12809echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12810else
12811 NCURSES_WRAP_PREFIX=_nc_
12812fi
12813
12814cat >>confdefs.h <<EOF
12815#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12816EOF
12817
12818echo "$as_me:12818: checking if you want experimental safe-sprintf code" >&5
12819echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12820
12821# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12822if test "${enable_safe_sprintf+set}" = set; then
12823 enableval="$enable_safe_sprintf"
12824 with_safe_sprintf=$enableval
12825else
12826 with_safe_sprintf=no
12827fi;
12828echo "$as_me:12828: result: $with_safe_sprintf" >&5
12829echo "${ECHO_T}$with_safe_sprintf" >&6
12830test "x$with_safe_sprintf" = xyes &&
12831cat >>confdefs.h <<\EOF
12832#define USE_SAFE_SPRINTF 1
12833EOF
12834
12835### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12836# when hashmap is used scroll hints are useless
12837if test "$with_hashmap" = no ; then
12838echo "$as_me:12838: checking if you want to experiment without scrolling-hints code" >&5
12839echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12840
12841# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12842if test "${enable_scroll_hints+set}" = set; then
12843 enableval="$enable_scroll_hints"
12844 with_scroll_hints=$enableval
12845else
12846 with_scroll_hints=yes
12847fi;
12848echo "$as_me:12848: result: $with_scroll_hints" >&5
12849echo "${ECHO_T}$with_scroll_hints" >&6
12850test "x$with_scroll_hints" = xyes &&
12851cat >>confdefs.h <<\EOF
12852#define USE_SCROLL_HINTS 1
12853EOF
12854
12855fi
12856
12857echo "$as_me:12857: checking if you want wgetch-events code" >&5
12858echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12859
12860# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12861if test "${enable_wgetch_events+set}" = set; then
12862 enableval="$enable_wgetch_events"
12863 with_wgetch_events=$enableval
12864else
12865 with_wgetch_events=no
12866fi;
12867echo "$as_me:12867: result: $with_wgetch_events" >&5
12868echo "${ECHO_T}$with_wgetch_events" >&6
12869test "x$with_wgetch_events" = xyes &&
12870cat >>confdefs.h <<\EOF
12871#define NCURSES_WGETCH_EVENTS 1
12872EOF
12873
12874###############################################################################
12875
12876### use option --disable-echo to suppress full display compiling commands
12877
12878echo "$as_me:12878: checking if you want to see long compiling messages" >&5
12879echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12880
12881# Check whether --enable-echo or --disable-echo was given.
12882if test "${enable_echo+set}" = set; then
12883 enableval="$enable_echo"
12884 test "$enableval" != no && enableval=yes
12885 if test "$enableval" != "yes" ; then
12886
12887 ECHO_LT='--silent'
12888 ECHO_LD='@echo linking $@;'
12889 RULE_CC='@echo compiling $<'
12890 SHOW_CC='@echo compiling $@'
12891 ECHO_CC='@'
12892
12893 else
12894
12895 ECHO_LT=''
12896 ECHO_LD=''
12897 RULE_CC=''
12898 SHOW_CC=''
12899 ECHO_CC=''
12900
12901 fi
12902else
12903 enableval=yes
12904
12905 ECHO_LT=''
12906 ECHO_LD=''
12907 RULE_CC=''
12908 SHOW_CC=''
12909 ECHO_CC=''
12910
12911fi;
12912echo "$as_me:12912: result: $enableval" >&5
12913echo "${ECHO_T}$enableval" >&6
12914
12915if test "x$enable_echo" = xyes; then
12916 ECHO_LINK=
12917else
12918 ECHO_LINK='@ echo linking $@ ... ;'
12919 test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12920 test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12921fi
12922
12923### use option --enable-warnings to turn on all gcc warnings
12924echo "$as_me:12924: checking if you want to see compiler warnings" >&5
12925echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12926
12927# Check whether --enable-warnings or --disable-warnings was given.
12928if test "${enable_warnings+set}" = set; then
12929 enableval="$enable_warnings"
12930 with_warnings=$enableval
12931fi;
12932echo "$as_me:12932: result: $with_warnings" >&5
12933echo "${ECHO_T}$with_warnings" >&6
12934
12935if test "x$with_warnings" = "xyes"; then
12936
12937 ADAFLAGS="$ADAFLAGS -gnatg"
12938
12939INTEL_COMPILER=no
12940
12941if 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
12945echo $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"
12951
12952int
12953main ()
12954{
12955
12956#ifdef __INTEL_COMPILER
12957#else
12958make an error
12959#endif
12960
12961 ;
12962 return 0;
12963}
12964_ACEOF
12965rm -f conftest.$ac_objext
12966if { (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
12978cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12979
12980else
12981 echo "$as_me: failed program was:" >&5
12982cat conftest.$ac_ext >&5
12983fi
12984rm -f conftest.$ac_objext conftest.$ac_ext
12985 CFLAGS="$cf_save_CFLAGS"
12986 echo "$as_me:12986: result: $INTEL_COMPILER" >&5
12987echo "${ECHO_T}$INTEL_COMPILER" >&6
12988 ;;
12989 esac
12990fi
12991
12992CLANG_COMPILER=no
12993
12994if test "$GCC" = yes ; then
12995 echo "$as_me:12995: checking if this is really Clang C compiler" >&5
12996echo $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"
13002
13003int
13004main ()
13005{
13006
13007#ifdef __clang__
13008#else
13009make an error
13010#endif
13011
13012 ;
13013 return 0;
13014}
13015_ACEOF
13016rm -f conftest.$ac_objext
13017if { (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
13029cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13030
13031else
13032 echo "$as_me: failed program was:" >&5
13033cat conftest.$ac_ext >&5
13034fi
13035rm -f conftest.$ac_objext conftest.$ac_ext
13036 CFLAGS="$cf_save_CFLAGS"
13037 echo "$as_me:13037: result: $CLANG_COMPILER" >&5
13038echo "${ECHO_T}$CLANG_COMPILER" >&6
13039fi
13040
13041cat > conftest.$ac_ext <<EOF
13042#line 13042 "${as_me:-configure}"
13043int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13044EOF
13045
13046if test "$INTEL_COMPILER" = yes
13047then
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
13058
13059 { echo "$as_me:13059: checking for $CC warning options..." >&5
13060echo "$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
13073 do
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
13081echo "${ECHO_T}... -$cf_opt" >&6
13082 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13083 fi
13084 done
13085 CFLAGS="$cf_save_CFLAGS"
13086
13087elif test "$GCC" = yes
13088then
13089 { echo "$as_me:13089: checking for $CC warning options..." >&5
13090echo "$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
13111 do
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
13119echo "${ECHO_T}... -$cf_opt" >&6
13120 case $cf_opt in
13121 (Wcast-qual)
13122 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13123 ;;
13124 (Winline)
13125 case $GCC_VERSION in
13126 ([34].*)
13127 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13128
13129echo "${as_me:-configure}:13129: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13130
13131 continue;;
13132 esac
13133 ;;
13134 (Wpointer-arith)
13135 case $GCC_VERSION in
13136 ([12].*)
13137 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13138
13139echo "${as_me:-configure}:13139: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13140
13141 continue;;
13142 esac
13143 ;;
13144 esac
13145 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13146 fi
13147 done
13148 CFLAGS="$cf_save_CFLAGS"
13149fi
13150rm -rf conftest*
13151
13152 if test "x$cf_with_cxx" = xyes ; then
13153
13154INTEL_CPLUSPLUS=no
13155
13156if 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
13160echo $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"
13166
13167int
13168main ()
13169{
13170
13171#ifdef __INTEL_COMPILER
13172#else
13173make an error
13174#endif
13175
13176 ;
13177 return 0;
13178}
13179_ACEOF
13180rm -f conftest.$ac_objext
13181if { (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
13193cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13194
13195else
13196 echo "$as_me: failed program was:" >&5
13197cat conftest.$ac_ext >&5
13198fi
13199rm -f conftest.$ac_objext conftest.$ac_ext
13200 CXXFLAGS="$cf_save_CFLAGS"
13201 echo "$as_me:13201: result: $INTEL_CPLUSPLUS" >&5
13202echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13203 ;;
13204 esac
13205fi
13206
13207CLANG_CPLUSPLUS=no
13208
13209if test "$GCC" = yes ; then
13210 echo "$as_me:13210: checking if this is really Clang C++ compiler" >&5
13211echo $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"
13217
13218int
13219main ()
13220{
13221
13222#ifdef __clang__
13223#else
13224make an error
13225#endif
13226
13227 ;
13228 return 0;
13229}
13230_ACEOF
13231rm -f conftest.$ac_objext
13232if { (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
13244cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13245
13246else
13247 echo "$as_me: failed program was:" >&5
13248cat conftest.$ac_ext >&5
13249fi
13250rm -f conftest.$ac_objext conftest.$ac_ext
13251 CXXFLAGS="$cf_save_CFLAGS"
13252 echo "$as_me:13252: result: $CLANG_CPLUSPLUS" >&5
13253echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13254fi
13255
13256ac_ext=cc
13257ac_cpp='$CXXCPP $CPPFLAGS'
13258ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13259ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13260ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13261ac_main_return=return
13262
13263cat > conftest.$ac_ext <<EOF
13264#line 13264 "configure"
13265int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13266EOF
13267
13268if test "$INTEL_CPLUSPLUS" = yes
13269then
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
13281
13282 { echo "$as_me:13282: checking for $CC warning options..." >&5
13283echo "$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
13297 do
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
13305echo "${ECHO_T}... -$cf_opt" >&6
13306 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13307 fi
13308 done
13309 CXXFLAGS="$cf_save_CXXFLAGS"
13310
13311elif test "$GXX" = yes
13312then
13313 { echo "$as_me:13313: checking for $CXX warning options..." >&5
13314echo "$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].*)
13321 ;;
13322 (*)
13323 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13324 ;;
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
13341 do
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
13349echo "${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
13353echo "${ECHO_T}... no -$cf_opt" >&6
13354 fi
13355 done
13356 CXXFLAGS="$cf_save_CXXFLAGS"
13357fi
13358
13359rm -rf conftest*
13360ac_ext=c
13361ac_cpp='$CPP $CPPFLAGS'
13362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13364ac_compiler_gnu=$ac_cv_c_compiler_gnu
13365ac_main_return=return
13366
13367 fi
13368fi
13369
13370if test "$GCC" = yes
13371then
13372cat > 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
13385EOF
13386if test "$GCC" = yes
13387then
13388 { echo "$as_me:13388: checking for $CC __attribute__ directives..." >&5
13389echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13390cat > 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
13405extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13406extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13407extern void foo(void) GCC_NORETURN;
13408int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13409EOF
13410 cf_printf_attribute=no
13411 cf_scanf_attribute=no
13412 for cf_attribute in scanf printf unused noreturn
13413 do
13414
13415cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13416
13417 cf_directive="__attribute__(($cf_attribute))"
13418 echo "checking for $CC $cf_directive" 1>&5
13419
13420 case $cf_attribute in
13421 (printf)
13422 cf_printf_attribute=yes
13423 cat >conftest.h <<EOF
13424#define GCC_$cf_ATTRIBUTE 1
13425EOF
13426 ;;
13427 (scanf)
13428 cf_scanf_attribute=yes
13429 cat >conftest.h <<EOF
13430#define GCC_$cf_ATTRIBUTE 1
13431EOF
13432 ;;
13433 (*)
13434 cat >conftest.h <<EOF
13435#define GCC_$cf_ATTRIBUTE $cf_directive
13436EOF
13437 ;;
13438 esac
13439
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
13446echo "${ECHO_T}... $cf_attribute" >&6
13447 cat conftest.h >>confdefs.h
13448 case $cf_attribute in
13449 (noreturn)
13450
13451cat >>confdefs.h <<EOF
13452#define GCC_NORETURN $cf_directive
13453EOF
13454
13455 ;;
13456 (printf)
13457 cf_value='/* nothing */'
13458 if test "$cf_printf_attribute" != no ; then
13459 cf_value='__attribute__((format(printf,fmt,var)))'
13460
13461cat >>confdefs.h <<\EOF
13462#define GCC_PRINTF 1
13463EOF
13464
13465 fi
13466
13467cat >>confdefs.h <<EOF
13468#define GCC_PRINTFLIKE(fmt,var) $cf_value
13469EOF
13470
13471 ;;
13472 (scanf)
13473 cf_value='/* nothing */'
13474 if test "$cf_scanf_attribute" != no ; then
13475 cf_value='__attribute__((format(scanf,fmt,var)))'
13476
13477cat >>confdefs.h <<\EOF
13478#define GCC_SCANF 1
13479EOF
13480
13481 fi
13482
13483cat >>confdefs.h <<EOF
13484#define GCC_SCANFLIKE(fmt,var) $cf_value
13485EOF
13486
13487 ;;
13488 (unused)
13489
13490cat >>confdefs.h <<EOF
13491#define GCC_UNUSED $cf_directive
13492EOF
13493
13494 ;;
13495 esac
13496 fi
13497 done
13498else
13499 fgrep define conftest.i >>confdefs.h
13500fi
13501rm -rf conftest*
13502fi
13503
13504echo "$as_me:13504: checking if you want to work around bogus compiler/loader warnings" >&5
13505echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13506
13507# Check whether --enable-string-hacks or --disable-string-hacks was given.
13508if test "${enable_string_hacks+set}" = set; then
13509 enableval="$enable_string_hacks"
13510 with_string_hacks=$enableval
13511else
13512 with_string_hacks=no
13513fi;
13514echo "$as_me:13514: result: $with_string_hacks" >&5
13515echo "${ECHO_T}$with_string_hacks" >&6
13516
13517if test "x$with_string_hacks" = "xyes"; then
13518
13519cat >>confdefs.h <<\EOF
13520#define USE_STRING_HACKS 1
13521EOF
13522
13523 { echo "$as_me:13523: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13524echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13525
13526for ac_func in strlcat strlcpy snprintf
13527do
13528as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13529echo "$as_me:13529: checking for $ac_func" >&5
13530echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13531if eval "test \"\${$as_ac_var+set}\" = set"; then
13532 echo $ECHO_N "(cached) $ECHO_C" >&6
13533else
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
13542extern "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. */
13546char $ac_func ();
13547char (*f) ();
13548
13549int
13550main ()
13551{
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)
13556choke me
13557#else
13558f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13559#endif
13560
13561 ;
13562 return 0;
13563}
13564_ACEOF
13565rm -f conftest.$ac_objext conftest$ac_exeext
13566if { (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"
13578else
13579 echo "$as_me: failed program was:" >&5
13580cat conftest.$ac_ext >&5
13581eval "$as_ac_var=no"
13582fi
13583rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13584fi
13585echo "$as_me:13585: result: `eval echo '${'$as_ac_var'}'`" >&5
13586echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13587if test `eval echo '${'$as_ac_var'}'` = yes; then
13588 cat >>confdefs.h <<EOF
13589#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13590EOF
13591
13592fi
13593done
13594
13595fi
13596
13597### use option --enable-assertions to turn on generation of assertion code
13598echo "$as_me:13598: checking if you want to enable runtime assertions" >&5
13599echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13600
13601# Check whether --enable-assertions or --disable-assertions was given.
13602if test "${enable_assertions+set}" = set; then
13603 enableval="$enable_assertions"
13604 with_assertions=$enableval
13605else
13606 with_assertions=no
13607fi;
13608echo "$as_me:13608: result: $with_assertions" >&5
13609echo "${ECHO_T}$with_assertions" >&6
13610if test -n "$GCC"
13611then
13612 if test "$with_assertions" = no
13613 then
13614 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13615 else
13616
13617 ADAFLAGS="$ADAFLAGS -gnata"
13618
13619 fi
13620fi
13621
13622### use option --disable-leaks to suppress "permanent" leaks, for testing
13623
13624echo "$as_me:13624: checking if you want to use dmalloc for testing" >&5
13625echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13626
13627# Check whether --with-dmalloc or --without-dmalloc was given.
13628if test "${with_dmalloc+set}" = set; then
13629 withval="$with_dmalloc"
13630
13631cat >>confdefs.h <<EOF
13632#define USE_DMALLOC 1
13633EOF
13634
13635 : ${with_cflags:=-g}
13636 : ${with_no_leaks:=yes}
13637 with_dmalloc=yes
13638else
13639 with_dmalloc=
13640fi;
13641echo "$as_me:13641: result: ${with_dmalloc:-no}" >&5
13642echo "${ECHO_T}${with_dmalloc:-no}" >&6
13643
13644case .$with_cflags in
13645(.*-g*)
13646 case .$CFLAGS in
13647 (.*-g*)
13648 ;;
13649 (*)
13650
13651cf_fix_cppflags=no
13652cf_new_cflags=
13653cf_new_cppflags=
13654cf_new_extra_cppflags=
13655
13656for cf_add_cflags in -g
13657do
13658case $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[^=]*='\''\"[^"]*//'`
13665
13666 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13667 && test -z "${cf_tst_cflags}" \
13668 && cf_fix_cppflags=yes
13669
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
13676 fi
13677 ;;
13678 esac
13679 case "$CPPFLAGS" in
13680 (*$cf_add_cflags)
13681 ;;
13682 (*)
13683 case $cf_add_cflags in
13684 (-D*)
13685 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13686
13687CPPFLAGS=`echo "$CPPFLAGS" | \
13688 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13689 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13690
13691 ;;
13692 esac
13693 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13694 ;;
13695 esac
13696 ;;
13697 (*)
13698 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13699 ;;
13700 esac
13701 ;;
13702(yes)
13703 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13704
13705 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13706
13707 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13708 && test -z "${cf_tst_cflags}" \
13709 && cf_fix_cppflags=no
13710 ;;
13711esac
13712done
13713
13714if test -n "$cf_new_cflags" ; then
13715
13716 CFLAGS="$CFLAGS $cf_new_cflags"
13717fi
13718
13719if test -n "$cf_new_cppflags" ; then
13720
13721 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13722fi
13723
13724if test -n "$cf_new_extra_cppflags" ; then
13725
13726 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13727fi
13728
13729 ;;
13730 esac
13731 ;;
13732esac
13733
13734if test "$with_dmalloc" = yes ; then
13735 echo "$as_me:13735: checking for dmalloc.h" >&5
13736echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13737if test "${ac_cv_header_dmalloc_h+set}" = set; then
13738 echo $ECHO_N "(cached) $ECHO_C" >&6
13739else
13740 cat >conftest.$ac_ext <<_ACEOF
13741#line 13741 "configure"
13742#include "confdefs.h"
13743#include <dmalloc.h>
13744_ACEOF
13745if { (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=
13757 fi
13758else
13759 ac_cpp_err=yes
13760fi
13761if test -z "$ac_cpp_err"; then
13762 ac_cv_header_dmalloc_h=yes
13763else
13764 echo "$as_me: failed program was:" >&5
13765 cat conftest.$ac_ext >&5
13766 ac_cv_header_dmalloc_h=no
13767fi
13768rm -f conftest.err conftest.$ac_ext
13769fi
13770echo "$as_me:13770: result: $ac_cv_header_dmalloc_h" >&5
13771echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13772if test $ac_cv_header_dmalloc_h = yes; then
13773
13774echo "$as_me:13774: checking for dmalloc_debug in -ldmalloc" >&5
13775echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13776if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13777 echo $ECHO_N "(cached) $ECHO_C" >&6
13778else
13779 ac_check_lib_save_LIBS=$LIBS
13780LIBS="-ldmalloc $LIBS"
13781cat >conftest.$ac_ext <<_ACEOF
13782#line 13782 "configure"
13783#include "confdefs.h"
13784
13785/* Override any gcc2 internal prototype to avoid an error. */
13786#ifdef __cplusplus
13787extern "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. */
13791char dmalloc_debug ();
13792int
13793main ()
13794{
13795dmalloc_debug ();
13796 ;
13797 return 0;
13798}
13799_ACEOF
13800rm -f conftest.$ac_objext conftest$ac_exeext
13801if { (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
13813else
13814 echo "$as_me: failed program was:" >&5
13815cat conftest.$ac_ext >&5
13816ac_cv_lib_dmalloc_dmalloc_debug=no
13817fi
13818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13819LIBS=$ac_check_lib_save_LIBS
13820fi
13821echo "$as_me:13821: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13822echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13823if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13824 cat >>confdefs.h <<EOF
13825#define HAVE_LIBDMALLOC 1
13826EOF
13827
13828 LIBS="-ldmalloc $LIBS"
13829
13830fi
13831
13832fi
13833
13834fi
13835
13836echo "$as_me:13836: checking if you want to use dbmalloc for testing" >&5
13837echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13838
13839# Check whether --with-dbmalloc or --without-dbmalloc was given.
13840if test "${with_dbmalloc+set}" = set; then
13841 withval="$with_dbmalloc"
13842
13843cat >>confdefs.h <<EOF
13844#define USE_DBMALLOC 1
13845EOF
13846
13847 : ${with_cflags:=-g}
13848 : ${with_no_leaks:=yes}
13849 with_dbmalloc=yes
13850else
13851 with_dbmalloc=
13852fi;
13853echo "$as_me:13853: result: ${with_dbmalloc:-no}" >&5
13854echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13855
13856case .$with_cflags in
13857(.*-g*)
13858 case .$CFLAGS in
13859 (.*-g*)
13860 ;;
13861 (*)
13862
13863cf_fix_cppflags=no
13864cf_new_cflags=
13865cf_new_cppflags=
13866cf_new_extra_cppflags=
13867
13868for cf_add_cflags in -g
13869do
13870case $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[^=]*='\''\"[^"]*//'`
13877
13878 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13879 && test -z "${cf_tst_cflags}" \
13880 && cf_fix_cppflags=yes
13881
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
13888 fi
13889 ;;
13890 esac
13891 case "$CPPFLAGS" in
13892 (*$cf_add_cflags)
13893 ;;
13894 (*)
13895 case $cf_add_cflags in
13896 (-D*)
13897 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13898
13899CPPFLAGS=`echo "$CPPFLAGS" | \
13900 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13901 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13902
13903 ;;
13904 esac
13905 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13906 ;;
13907 esac
13908 ;;
13909 (*)
13910 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13911 ;;
13912 esac
13913 ;;
13914(yes)
13915 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13916
13917 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13918
13919 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13920 && test -z "${cf_tst_cflags}" \
13921 && cf_fix_cppflags=no
13922 ;;
13923esac
13924done
13925
13926if test -n "$cf_new_cflags" ; then
13927
13928 CFLAGS="$CFLAGS $cf_new_cflags"
13929fi
13930
13931if test -n "$cf_new_cppflags" ; then
13932
13933 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13934fi
13935
13936if test -n "$cf_new_extra_cppflags" ; then
13937
13938 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13939fi
13940
13941 ;;
13942 esac
13943 ;;
13944esac
13945
13946if test "$with_dbmalloc" = yes ; then
13947 echo "$as_me:13947: checking for dbmalloc.h" >&5
13948echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13949if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13950 echo $ECHO_N "(cached) $ECHO_C" >&6
13951else
13952 cat >conftest.$ac_ext <<_ACEOF
13953#line 13953 "configure"
13954#include "confdefs.h"
13955#include <dbmalloc.h>
13956_ACEOF
13957if { (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=
13969 fi
13970else
13971 ac_cpp_err=yes
13972fi
13973if test -z "$ac_cpp_err"; then
13974 ac_cv_header_dbmalloc_h=yes
13975else
13976 echo "$as_me: failed program was:" >&5
13977 cat conftest.$ac_ext >&5
13978 ac_cv_header_dbmalloc_h=no
13979fi
13980rm -f conftest.err conftest.$ac_ext
13981fi
13982echo "$as_me:13982: result: $ac_cv_header_dbmalloc_h" >&5
13983echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13984if test $ac_cv_header_dbmalloc_h = yes; then
13985
13986echo "$as_me:13986: checking for debug_malloc in -ldbmalloc" >&5
13987echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13988if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13989 echo $ECHO_N "(cached) $ECHO_C" >&6
13990else
13991 ac_check_lib_save_LIBS=$LIBS
13992LIBS="-ldbmalloc $LIBS"
13993cat >conftest.$ac_ext <<_ACEOF
13994#line 13994 "configure"
13995#include "confdefs.h"
13996
13997/* Override any gcc2 internal prototype to avoid an error. */
13998#ifdef __cplusplus
13999extern "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. */
14003char debug_malloc ();
14004int
14005main ()
14006{
14007debug_malloc ();
14008 ;
14009 return 0;
14010}
14011_ACEOF
14012rm -f conftest.$ac_objext conftest$ac_exeext
14013if { (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
14025else
14026 echo "$as_me: failed program was:" >&5
14027cat conftest.$ac_ext >&5
14028ac_cv_lib_dbmalloc_debug_malloc=no
14029fi
14030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14031LIBS=$ac_check_lib_save_LIBS
14032fi
14033echo "$as_me:14033: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14034echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14035if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14036 cat >>confdefs.h <<EOF
14037#define HAVE_LIBDBMALLOC 1
14038EOF
14039
14040 LIBS="-ldbmalloc $LIBS"
14041
14042fi
14043
14044fi
14045
14046fi
14047
14048echo "$as_me:14048: checking if you want to use valgrind for testing" >&5
14049echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14050
14051# Check whether --with-valgrind or --without-valgrind was given.
14052if test "${with_valgrind+set}" = set; then
14053 withval="$with_valgrind"
14054
14055cat >>confdefs.h <<EOF
14056#define USE_VALGRIND 1
14057EOF
14058
14059 : ${with_cflags:=-g}
14060 : ${with_no_leaks:=yes}
14061 with_valgrind=yes
14062else
14063 with_valgrind=
14064fi;
14065echo "$as_me:14065: result: ${with_valgrind:-no}" >&5
14066echo "${ECHO_T}${with_valgrind:-no}" >&6
14067
14068case .$with_cflags in
14069(.*-g*)
14070 case .$CFLAGS in
14071 (.*-g*)
14072 ;;
14073 (*)
14074
14075cf_fix_cppflags=no
14076cf_new_cflags=
14077cf_new_cppflags=
14078cf_new_extra_cppflags=
14079
14080for cf_add_cflags in -g
14081do
14082case $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[^=]*='\''\"[^"]*//'`
14089
14090 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14091 && test -z "${cf_tst_cflags}" \
14092 && cf_fix_cppflags=yes
14093
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
14100 fi
14101 ;;
14102 esac
14103 case "$CPPFLAGS" in
14104 (*$cf_add_cflags)
14105 ;;
14106 (*)
14107 case $cf_add_cflags in
14108 (-D*)
14109 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14110
14111CPPFLAGS=`echo "$CPPFLAGS" | \
14112 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14113 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14114
14115 ;;
14116 esac
14117 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14118 ;;
14119 esac
14120 ;;
14121 (*)
14122 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14123 ;;
14124 esac
14125 ;;
14126(yes)
14127 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14128
14129 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14130
14131 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14132 && test -z "${cf_tst_cflags}" \
14133 && cf_fix_cppflags=no
14134 ;;
14135esac
14136done
14137
14138if test -n "$cf_new_cflags" ; then
14139
14140 CFLAGS="$CFLAGS $cf_new_cflags"
14141fi
14142
14143if test -n "$cf_new_cppflags" ; then
14144
14145 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14146fi
14147
14148if test -n "$cf_new_extra_cppflags" ; then
14149
14150 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14151fi
14152
14153 ;;
14154 esac
14155 ;;
14156esac
14157
14158echo "$as_me:14158: checking if you want to perform memory-leak testing" >&5
14159echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14160
14161# Check whether --enable-leaks or --disable-leaks was given.
14162if 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
14165else
14166 : ${with_no_leaks:=no}
14167fi;
14168echo "$as_me:14168: result: $with_no_leaks" >&5
14169echo "${ECHO_T}$with_no_leaks" >&6
14170
14171if test "$with_no_leaks" = yes ; then
14172
14173cat >>confdefs.h <<\EOF
14174#define NO_LEAKS 1
14175EOF
14176
14177cat >>confdefs.h <<\EOF
14178#define YY_NO_LEAKS 1
14179EOF
14180
14181fi
14182
14183cat >>confdefs.h <<\EOF
14184#define HAVE_NC_ALLOC_H 1
14185EOF
14186
14187### use option --enable-expanded to generate certain macros as functions
14188
14189# Check whether --enable-expanded or --disable-expanded was given.
14190if test "${enable_expanded+set}" = set; then
14191 enableval="$enable_expanded"
14192 test "x$enableval" = xyes &&
14193cat >>confdefs.h <<\EOF
14194#define NCURSES_EXPANDED 1
14195EOF
14196
14197fi;
14198
14199### use option --disable-macros to suppress macros in favor of functions
14200
14201# Check whether --enable-macros or --disable-macros was given.
14202if test "${enable_macros+set}" = set; then
14203 enableval="$enable_macros"
14204 test "$enableval" = no &&
14205cat >>confdefs.h <<\EOF
14206#define NCURSES_NOMACROS 1
14207EOF
14208
14209fi;
14210
14211# Normally we only add trace() to the debug-library. Allow this to be
14212# extended to all models of the ncurses library:
14213cf_all_traces=no
14214case "$CFLAGS $CPPFLAGS" in
14215(*-DTRACE*)
14216 cf_all_traces=yes
14217 ;;
14218esac
14219
14220echo "$as_me:14220: checking whether to add trace feature to all models" >&5
14221echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14222
14223# Check whether --with-trace or --without-trace was given.
14224if test "${with_trace+set}" = set; then
14225 withval="$with_trace"
14226 cf_with_trace=$withval
14227else
14228 cf_with_trace=$cf_all_traces
14229fi;
14230echo "$as_me:14230: result: $cf_with_trace" >&5
14231echo "${ECHO_T}$cf_with_trace" >&6
14232
14233if test "x$cf_with_trace" = xyes ; then
14234 LIB_TRACING=all
14235 ADA_TRACE=TRUE
14236
14237cf_fix_cppflags=no
14238cf_new_cflags=
14239cf_new_cppflags=
14240cf_new_extra_cppflags=
14241
14242for cf_add_cflags in -DTRACE
14243do
14244case $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[^=]*='\''\"[^"]*//'`
14251
14252 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14253 && test -z "${cf_tst_cflags}" \
14254 && cf_fix_cppflags=yes
14255
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
14262 fi
14263 ;;
14264 esac
14265 case "$CPPFLAGS" in
14266 (*$cf_add_cflags)
14267 ;;
14268 (*)
14269 case $cf_add_cflags in
14270 (-D*)
14271 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14272
14273CPPFLAGS=`echo "$CPPFLAGS" | \
14274 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14275 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14276
14277 ;;
14278 esac
14279 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14280 ;;
14281 esac
14282 ;;
14283 (*)
14284 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14285 ;;
14286 esac
14287 ;;
14288(yes)
14289 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14290
14291 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14292
14293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14294 && test -z "${cf_tst_cflags}" \
14295 && cf_fix_cppflags=no
14296 ;;
14297esac
14298done
14299
14300if test -n "$cf_new_cflags" ; then
14301
14302 CFLAGS="$CFLAGS $cf_new_cflags"
14303fi
14304
14305if test -n "$cf_new_cppflags" ; then
14306
14307 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14308fi
14309
14310if test -n "$cf_new_extra_cppflags" ; then
14311
14312 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14313fi
14314
14315else
14316 LIB_TRACING=DEBUG
14317 ADA_TRACE=FALSE
14318fi
14319
14320echo "$as_me:14320: checking if we want to use GNAT projects" >&5
14321echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14322
14323# Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14324if 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
14331 fi
14332else
14333 enableval=yes
14334 enable_gnat_projects=yes
14335
14336fi;
14337echo "$as_me:14337: result: $enable_gnat_projects" >&5
14338echo "${ECHO_T}$enable_gnat_projects" >&6
14339
14340### Checks for libraries.
14341case $cf_cv_system_name in
14342(*mingw32*|*mingw64*)
14343 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14344 LIBS=" -lpsapi $LIBS"
14345 ;;
14346(*)
14347echo "$as_me:14347: checking for gettimeofday" >&5
14348echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14349if test "${ac_cv_func_gettimeofday+set}" = set; then
14350 echo $ECHO_N "(cached) $ECHO_C" >&6
14351else
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
14360extern "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. */
14364char gettimeofday ();
14365char (*f) ();
14366
14367int
14368main ()
14369{
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)
14374choke me
14375#else
14376f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14377#endif
14378
14379 ;
14380 return 0;
14381}
14382_ACEOF
14383rm -f conftest.$ac_objext conftest$ac_exeext
14384if { (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
14396else
14397 echo "$as_me: failed program was:" >&5
14398cat conftest.$ac_ext >&5
14399ac_cv_func_gettimeofday=no
14400fi
14401rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14402fi
14403echo "$as_me:14403: result: $ac_cv_func_gettimeofday" >&5
14404echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14405if test $ac_cv_func_gettimeofday = yes; then
14406
14407cat >>confdefs.h <<\EOF
14408#define HAVE_GETTIMEOFDAY 1
14409EOF
14410
14411else
14412
14413echo "$as_me:14413: checking for gettimeofday in -lbsd" >&5
14414echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14415if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14416 echo $ECHO_N "(cached) $ECHO_C" >&6
14417else
14418 ac_check_lib_save_LIBS=$LIBS
14419LIBS="-lbsd $LIBS"
14420cat >conftest.$ac_ext <<_ACEOF
14421#line 14421 "configure"
14422#include "confdefs.h"
14423
14424/* Override any gcc2 internal prototype to avoid an error. */
14425#ifdef __cplusplus
14426extern "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. */
14430char gettimeofday ();
14431int
14432main ()
14433{
14434gettimeofday ();
14435 ;
14436 return 0;
14437}
14438_ACEOF
14439rm -f conftest.$ac_objext conftest$ac_exeext
14440if { (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
14452else
14453 echo "$as_me: failed program was:" >&5
14454cat conftest.$ac_ext >&5
14455ac_cv_lib_bsd_gettimeofday=no
14456fi
14457rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14458LIBS=$ac_check_lib_save_LIBS
14459fi
14460echo "$as_me:14460: result: $ac_cv_lib_bsd_gettimeofday" >&5
14461echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14462if test $ac_cv_lib_bsd_gettimeofday = yes; then
14463
14464cat >>confdefs.h <<\EOF
14465#define HAVE_GETTIMEOFDAY 1
14466EOF
14467
14468cf_add_libs="-lbsd"
14469# Filter out duplicates - this happens with badly-designed ".pc" files...
14470for cf_add_1lib in $LIBS
14471do
14472 for cf_add_2lib in $cf_add_libs
14473 do
14474 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14475 then
14476 cf_add_1lib=
14477 break
14478 fi
14479 done
14480 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14481done
14482LIBS="$cf_add_libs"
14483
14484fi
14485
14486fi
14487 ;;
14488esac
14489
14490echo "$as_me:14490: checking if -lm needed for math functions" >&5
14491echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14492if test "${cf_cv_need_libm+set}" = set; then
14493 echo $ECHO_N "(cached) $ECHO_C" >&6
14494else
14495
14496 cat >conftest.$ac_ext <<_ACEOF
14497#line 14497 "configure"
14498#include "confdefs.h"
14499
14500 #include <stdio.h>
14501 #include <math.h>
14502
14503int
14504main ()
14505{
14506double x = rand(); printf("result = %g\n", pow(sin(x),x))
14507 ;
14508 return 0;
14509}
14510_ACEOF
14511rm -f conftest.$ac_objext conftest$ac_exeext
14512if { (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
14524else
14525 echo "$as_me: failed program was:" >&5
14526cat conftest.$ac_ext >&5
14527cf_cv_need_libm=yes
14528fi
14529rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14530fi
14531echo "$as_me:14531: result: $cf_cv_need_libm" >&5
14532echo "${ECHO_T}$cf_cv_need_libm" >&6
14533if test "$cf_cv_need_libm" = yes
14534then
14535MATH_LIB=-lm
14536fi
14537
14538### Checks for header files.
14539echo "$as_me:14539: checking for ANSI C header files" >&5
14540echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14541if test "${ac_cv_header_stdc+set}" = set; then
14542 echo $ECHO_N "(cached) $ECHO_C" >&6
14543else
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>
14551
14552_ACEOF
14553if { (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=
14565 fi
14566else
14567 ac_cpp_err=yes
14568fi
14569if test -z "$ac_cpp_err"; then
14570 ac_cv_header_stdc=yes
14571else
14572 echo "$as_me: failed program was:" >&5
14573 cat conftest.$ac_ext >&5
14574 ac_cv_header_stdc=no
14575fi
14576rm -f conftest.err conftest.$ac_ext
14577
14578if 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>
14584
14585_ACEOF
14586if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14587 egrep "memchr" >/dev/null 2>&1; then
14588 :
14589else
14590 ac_cv_header_stdc=no
14591fi
14592rm -rf conftest*
14593
14594fi
14595
14596if 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>
14602
14603_ACEOF
14604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14605 egrep "free" >/dev/null 2>&1; then
14606 :
14607else
14608 ac_cv_header_stdc=no
14609fi
14610rm -rf conftest*
14611
14612fi
14613
14614if 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
14617 :
14618else
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
14632
14633#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14634int
14635main ()
14636{
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);
14643}
14644_ACEOF
14645rm -f conftest$ac_exeext
14646if { (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
14656 :
14657else
14658 echo "$as_me: program exited with status $ac_status" >&5
14659echo "$as_me: failed program was:" >&5
14660cat conftest.$ac_ext >&5
14661ac_cv_header_stdc=no
14662fi
14663rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14664fi
14665fi
14666fi
14667echo "$as_me:14667: result: $ac_cv_header_stdc" >&5
14668echo "${ECHO_T}$ac_cv_header_stdc" >&6
14669if test $ac_cv_header_stdc = yes; then
14670
14671cat >>confdefs.h <<\EOF
14672#define STDC_HEADERS 1
14673EOF
14674
14675fi
14676
14677ac_header_dirent=no
14678for 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`
14680echo "$as_me:14680: checking for $ac_hdr that defines DIR" >&5
14681echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14682if eval "test \"\${$as_ac_Header+set}\" = set"; then
14683 echo $ECHO_N "(cached) $ECHO_C" >&6
14684else
14685 cat >conftest.$ac_ext <<_ACEOF
14686#line 14686 "configure"
14687#include "confdefs.h"
14688#include <sys/types.h>
14689#include <$ac_hdr>
14690
14691int
14692main ()
14693{
14694if ((DIR *) 0)
14695return 0;
14696 ;
14697 return 0;
14698}
14699_ACEOF
14700rm -f conftest.$ac_objext
14701if { (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"
14713else
14714 echo "$as_me: failed program was:" >&5
14715cat conftest.$ac_ext >&5
14716eval "$as_ac_Header=no"
14717fi
14718rm -f conftest.$ac_objext conftest.$ac_ext
14719fi
14720echo "$as_me:14720: result: `eval echo '${'$as_ac_Header'}'`" >&5
14721echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14722if test `eval echo '${'$as_ac_Header'}'` = yes; then
14723 cat >>confdefs.h <<EOF
14724#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14725EOF
14726
14727ac_header_dirent=$ac_hdr; break
14728fi
14729
14730done
14731# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14732if test $ac_header_dirent = dirent.h; then
14733 echo "$as_me:14733: checking for opendir in -ldir" >&5
14734echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14735if test "${ac_cv_lib_dir_opendir+set}" = set; then
14736 echo $ECHO_N "(cached) $ECHO_C" >&6
14737else
14738 ac_check_lib_save_LIBS=$LIBS
14739LIBS="-ldir $LIBS"
14740cat >conftest.$ac_ext <<_ACEOF
14741#line 14741 "configure"
14742#include "confdefs.h"
14743
14744/* Override any gcc2 internal prototype to avoid an error. */
14745#ifdef __cplusplus
14746extern "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. */
14750char opendir ();
14751int
14752main ()
14753{
14754opendir ();
14755 ;
14756 return 0;
14757}
14758_ACEOF
14759rm -f conftest.$ac_objext conftest$ac_exeext
14760if { (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
14772else
14773 echo "$as_me: failed program was:" >&5
14774cat conftest.$ac_ext >&5
14775ac_cv_lib_dir_opendir=no
14776fi
14777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14778LIBS=$ac_check_lib_save_LIBS
14779fi
14780echo "$as_me:14780: result: $ac_cv_lib_dir_opendir" >&5
14781echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14782if test $ac_cv_lib_dir_opendir = yes; then
14783 LIBS="$LIBS -ldir"
14784fi
14785
14786else
14787 echo "$as_me:14787: checking for opendir in -lx" >&5
14788echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14789if test "${ac_cv_lib_x_opendir+set}" = set; then
14790 echo $ECHO_N "(cached) $ECHO_C" >&6
14791else
14792 ac_check_lib_save_LIBS=$LIBS
14793LIBS="-lx $LIBS"
14794cat >conftest.$ac_ext <<_ACEOF
14795#line 14795 "configure"
14796#include "confdefs.h"
14797
14798/* Override any gcc2 internal prototype to avoid an error. */
14799#ifdef __cplusplus
14800extern "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. */
14804char opendir ();
14805int
14806main ()
14807{
14808opendir ();
14809 ;
14810 return 0;
14811}
14812_ACEOF
14813rm -f conftest.$ac_objext conftest$ac_exeext
14814if { (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
14826else
14827 echo "$as_me: failed program was:" >&5
14828cat conftest.$ac_ext >&5
14829ac_cv_lib_x_opendir=no
14830fi
14831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14832LIBS=$ac_check_lib_save_LIBS
14833fi
14834echo "$as_me:14834: result: $ac_cv_lib_x_opendir" >&5
14835echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14836if test $ac_cv_lib_x_opendir = yes; then
14837 LIBS="$LIBS -lx"
14838fi
14839
14840fi
14841
14842echo "$as_me:14842: checking whether time.h and sys/time.h may both be included" >&5
14843echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14844if test "${ac_cv_header_time+set}" = set; then
14845 echo $ECHO_N "(cached) $ECHO_C" >&6
14846else
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>
14853
14854int
14855main ()
14856{
14857if ((struct tm *) 0)
14858return 0;
14859 ;
14860 return 0;
14861}
14862_ACEOF
14863rm -f conftest.$ac_objext
14864if { (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
14876else
14877 echo "$as_me: failed program was:" >&5
14878cat conftest.$ac_ext >&5
14879ac_cv_header_time=no
14880fi
14881rm -f conftest.$ac_objext conftest.$ac_ext
14882fi
14883echo "$as_me:14883: result: $ac_cv_header_time" >&5
14884echo "${ECHO_T}$ac_cv_header_time" >&6
14885if test $ac_cv_header_time = yes; then
14886
14887cat >>confdefs.h <<\EOF
14888#define TIME_WITH_SYS_TIME 1
14889EOF
14890
14891fi
14892
14893cf_regex_func=no
14894
14895cf_regex_libs="regex re"
14896case $host_os in
14897(mingw*)
14898 cf_regex_libs="gnurx $cf_regex_libs"
14899 ;;
14900esac
14901
14902echo "$as_me:14902: checking for regcomp" >&5
14903echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14904if test "${ac_cv_func_regcomp+set}" = set; then
14905 echo $ECHO_N "(cached) $ECHO_C" >&6
14906else
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
14915extern "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. */
14919char regcomp ();
14920char (*f) ();
14921
14922int
14923main ()
14924{
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)
14929choke me
14930#else
14931f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14932#endif
14933
14934 ;
14935 return 0;
14936}
14937_ACEOF
14938rm -f conftest.$ac_objext conftest$ac_exeext
14939if { (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
14951else
14952 echo "$as_me: failed program was:" >&5
14953cat conftest.$ac_ext >&5
14954ac_cv_func_regcomp=no
14955fi
14956rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14957fi
14958echo "$as_me:14958: result: $ac_cv_func_regcomp" >&5
14959echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14960if test $ac_cv_func_regcomp = yes; then
14961 cf_regex_func=regcomp
14962else
14963
14964 for cf_regex_lib in $cf_regex_libs
14965 do
14966 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14967echo "$as_me:14967: checking for regcomp in -l$cf_regex_lib" >&5
14968echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14969if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14970 echo $ECHO_N "(cached) $ECHO_C" >&6
14971else
14972 ac_check_lib_save_LIBS=$LIBS
14973LIBS="-l$cf_regex_lib $LIBS"
14974cat >conftest.$ac_ext <<_ACEOF
14975#line 14975 "configure"
14976#include "confdefs.h"
14977
14978/* Override any gcc2 internal prototype to avoid an error. */
14979#ifdef __cplusplus
14980extern "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. */
14984char regcomp ();
14985int
14986main ()
14987{
14988regcomp ();
14989 ;
14990 return 0;
14991}
14992_ACEOF
14993rm -f conftest.$ac_objext conftest$ac_exeext
14994if { (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"
15006else
15007 echo "$as_me: failed program was:" >&5
15008cat conftest.$ac_ext >&5
15009eval "$as_ac_Lib=no"
15010fi
15011rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15012LIBS=$ac_check_lib_save_LIBS
15013fi
15014echo "$as_me:15014: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15015echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15016if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15017
15018cf_add_libs="-l$cf_regex_lib"
15019# Filter out duplicates - this happens with badly-designed ".pc" files...
15020for cf_add_1lib in $LIBS
15021do
15022 for cf_add_2lib in $cf_add_libs
15023 do
15024 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15025 then
15026 cf_add_1lib=
15027 break
15028 fi
15029 done
15030 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15031done
15032LIBS="$cf_add_libs"
15033
15034 cf_regex_func=regcomp
15035 break
15036fi
15037
15038 done
15039
15040fi
15041
15042if test "$cf_regex_func" = no ; then
15043 echo "$as_me:15043: checking for compile" >&5
15044echo $ECHO_N "checking for compile... $ECHO_C" >&6
15045if test "${ac_cv_func_compile+set}" = set; then
15046 echo $ECHO_N "(cached) $ECHO_C" >&6
15047else
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
15056extern "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. */
15060char compile ();
15061char (*f) ();
15062
15063int
15064main ()
15065{
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)
15070choke me
15071#else
15072f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15073#endif
15074
15075 ;
15076 return 0;
15077}
15078_ACEOF
15079rm -f conftest.$ac_objext conftest$ac_exeext
15080if { (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
15092else
15093 echo "$as_me: failed program was:" >&5
15094cat conftest.$ac_ext >&5
15095ac_cv_func_compile=no
15096fi
15097rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15098fi
15099echo "$as_me:15099: result: $ac_cv_func_compile" >&5
15100echo "${ECHO_T}$ac_cv_func_compile" >&6
15101if test $ac_cv_func_compile = yes; then
15102 cf_regex_func=compile
15103else
15104
15105 echo "$as_me:15105: checking for compile in -lgen" >&5
15106echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15107if test "${ac_cv_lib_gen_compile+set}" = set; then
15108 echo $ECHO_N "(cached) $ECHO_C" >&6
15109else
15110 ac_check_lib_save_LIBS=$LIBS
15111LIBS="-lgen $LIBS"
15112cat >conftest.$ac_ext <<_ACEOF
15113#line 15113 "configure"
15114#include "confdefs.h"
15115
15116/* Override any gcc2 internal prototype to avoid an error. */
15117#ifdef __cplusplus
15118extern "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. */
15122char compile ();
15123int
15124main ()
15125{
15126compile ();
15127 ;
15128 return 0;
15129}
15130_ACEOF
15131rm -f conftest.$ac_objext conftest$ac_exeext
15132if { (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
15144else
15145 echo "$as_me: failed program was:" >&5
15146cat conftest.$ac_ext >&5
15147ac_cv_lib_gen_compile=no
15148fi
15149rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15150LIBS=$ac_check_lib_save_LIBS
15151fi
15152echo "$as_me:15152: result: $ac_cv_lib_gen_compile" >&5
15153echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15154if test $ac_cv_lib_gen_compile = yes; then
15155
15156cf_add_libs="-lgen"
15157# Filter out duplicates - this happens with badly-designed ".pc" files...
15158for cf_add_1lib in $LIBS
15159do
15160 for cf_add_2lib in $cf_add_libs
15161 do
15162 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15163 then
15164 cf_add_1lib=
15165 break
15166 fi
15167 done
15168 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15169done
15170LIBS="$cf_add_libs"
15171
15172 cf_regex_func=compile
15173fi
15174
15175fi
15176
15177fi
15178
15179if test "$cf_regex_func" = no ; then
15180 { echo "$as_me:15180: WARNING: cannot find regular expression library" >&5
15181echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15182fi
15183
15184echo "$as_me:15184: checking for regular-expression headers" >&5
15185echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15186if test "${cf_cv_regex_hdrs+set}" = set; then
15187 echo $ECHO_N "(cached) $ECHO_C" >&6
15188else
15189
15190cf_cv_regex_hdrs=no
15191case $cf_regex_func in
15192(compile)
15193 for cf_regex_hdr in regexp.h regexpr.h
15194 do
15195 cat >conftest.$ac_ext <<_ACEOF
15196#line 15196 "configure"
15197#include "confdefs.h"
15198#include <$cf_regex_hdr>
15199int
15200main ()
15201{
15202
15203 char *p = compile("", "", "", 0);
15204 int x = step("", "");
15205
15206 ;
15207 return 0;
15208}
15209_ACEOF
15210rm -f conftest.$ac_objext conftest$ac_exeext
15211if { (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
15222
15223 cf_cv_regex_hdrs=$cf_regex_hdr
15224 break
15225
15226else
15227 echo "$as_me: failed program was:" >&5
15228cat conftest.$ac_ext >&5
15229fi
15230rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15231 done
15232 ;;
15233(*)
15234 for cf_regex_hdr in regex.h
15235 do
15236 cat >conftest.$ac_ext <<_ACEOF
15237#line 15237 "configure"
15238#include "confdefs.h"
15239#include <sys/types.h>
15240#include <$cf_regex_hdr>
15241int
15242main ()
15243{
15244
15245 regex_t *p;
15246 int x = regcomp(p, "", 0);
15247 int y = regexec(p, "", 0, 0, 0);
15248 regfree(p);
15249
15250 ;
15251 return 0;
15252}
15253_ACEOF
15254rm -f conftest.$ac_objext conftest$ac_exeext
15255if { (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
15266
15267 cf_cv_regex_hdrs=$cf_regex_hdr
15268 break
15269
15270else
15271 echo "$as_me: failed program was:" >&5
15272cat conftest.$ac_ext >&5
15273fi
15274rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15275 done
15276 ;;
15277esac
15278
15279fi
15280echo "$as_me:15280: result: $cf_cv_regex_hdrs" >&5
15281echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15282
15283case $cf_cv_regex_hdrs in
15284 (no) { echo "$as_me:15284: WARNING: no regular expression header found" >&5
15285echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15286 (regex.h)
15287cat >>confdefs.h <<\EOF
15288#define HAVE_REGEX_H_FUNCS 1
15289EOF
15290 ;;
15291 (regexp.h)
15292cat >>confdefs.h <<\EOF
15293#define HAVE_REGEXP_H_FUNCS 1
15294EOF
15295 ;;
15296 (regexpr.h)
15297cat >>confdefs.h <<\EOF
15298#define HAVE_REGEXPR_H_FUNCS 1
15299EOF
15300 ;;
15301esac
15302
15303for ac_header in \
15304fcntl.h \
15305getopt.h \
15306limits.h \
15307locale.h \
15308math.h \
15309poll.h \
15310sys/bsdtypes.h \
15311sys/ioctl.h \
15312sys/param.h \
15313sys/poll.h \
15314sys/select.h \
15315sys/time.h \
15316sys/times.h \
15317ttyent.h \
15318unistd.h \
15319wctype.h \
15320
15321do
15322as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15323echo "$as_me:15323: checking for $ac_header" >&5
15324echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15325if eval "test \"\${$as_ac_Header+set}\" = set"; then
15326 echo $ECHO_N "(cached) $ECHO_C" >&6
15327else
15328 cat >conftest.$ac_ext <<_ACEOF
15329#line 15329 "configure"
15330#include "confdefs.h"
15331#include <$ac_header>
15332_ACEOF
15333if { (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=
15345 fi
15346else
15347 ac_cpp_err=yes
15348fi
15349if test -z "$ac_cpp_err"; then
15350 eval "$as_ac_Header=yes"
15351else
15352 echo "$as_me: failed program was:" >&5
15353 cat conftest.$ac_ext >&5
15354 eval "$as_ac_Header=no"
15355fi
15356rm -f conftest.err conftest.$ac_ext
15357fi
15358echo "$as_me:15358: result: `eval echo '${'$as_ac_Header'}'`" >&5
15359echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15360if test `eval echo '${'$as_ac_Header'}'` = yes; then
15361 cat >>confdefs.h <<EOF
15362#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15363EOF
15364
15365fi
15366done
15367
15368for ac_header in unistd.h getopt.h
15369do
15370as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15371echo "$as_me:15371: checking for $ac_header" >&5
15372echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15373if eval "test \"\${$as_ac_Header+set}\" = set"; then
15374 echo $ECHO_N "(cached) $ECHO_C" >&6
15375else
15376 cat >conftest.$ac_ext <<_ACEOF
15377#line 15377 "configure"
15378#include "confdefs.h"
15379#include <$ac_header>
15380_ACEOF
15381if { (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=
15393 fi
15394else
15395 ac_cpp_err=yes
15396fi
15397if test -z "$ac_cpp_err"; then
15398 eval "$as_ac_Header=yes"
15399else
15400 echo "$as_me: failed program was:" >&5
15401 cat conftest.$ac_ext >&5
15402 eval "$as_ac_Header=no"
15403fi
15404rm -f conftest.err conftest.$ac_ext
15405fi
15406echo "$as_me:15406: result: `eval echo '${'$as_ac_Header'}'`" >&5
15407echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15408if test `eval echo '${'$as_ac_Header'}'` = yes; then
15409 cat >>confdefs.h <<EOF
15410#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15411EOF
15412
15413fi
15414done
15415
15416echo "$as_me:15416: checking for header declaring getopt variables" >&5
15417echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15418if test "${cf_cv_getopt_header+set}" = set; then
15419 echo $ECHO_N "(cached) $ECHO_C" >&6
15420else
15421
15422cf_cv_getopt_header=none
15423for cf_header in stdio.h stdlib.h unistd.h getopt.h
15424do
15425cat >conftest.$ac_ext <<_ACEOF
15426#line 15426 "configure"
15427#include "confdefs.h"
15428
15429#include <$cf_header>
15430int
15431main ()
15432{
15433int x = optind; char *y = optarg
15434 ;
15435 return 0;
15436}
15437_ACEOF
15438rm -f conftest.$ac_objext
15439if { (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
15452else
15453 echo "$as_me: failed program was:" >&5
15454cat conftest.$ac_ext >&5
15455fi
15456rm -f conftest.$ac_objext conftest.$ac_ext
15457done
15458
15459fi
15460echo "$as_me:15460: result: $cf_cv_getopt_header" >&5
15461echo "${ECHO_T}$cf_cv_getopt_header" >&6
15462if test $cf_cv_getopt_header != none ; then
15463
15464cat >>confdefs.h <<\EOF
15465#define HAVE_GETOPT_HEADER 1
15466EOF
15467
15468fi
15469if test $cf_cv_getopt_header = getopt.h ; then
15470
15471cat >>confdefs.h <<\EOF
15472#define NEED_GETOPT_H 1
15473EOF
15474
15475fi
15476
15477# check for ISC (this may also define _POSIX_SOURCE)
15478# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15479if test "x$ISC" = xyes ; then
15480
15481echo "$as_me:15481: checking for main in -lcposix" >&5
15482echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15483if test "${ac_cv_lib_cposix_main+set}" = set; then
15484 echo $ECHO_N "(cached) $ECHO_C" >&6
15485else
15486 ac_check_lib_save_LIBS=$LIBS
15487LIBS="-lcposix $LIBS"
15488cat >conftest.$ac_ext <<_ACEOF
15489#line 15489 "configure"
15490#include "confdefs.h"
15491
15492int
15493main ()
15494{
15495main ();
15496 ;
15497 return 0;
15498}
15499_ACEOF
15500rm -f conftest.$ac_objext conftest$ac_exeext
15501if { (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
15513else
15514 echo "$as_me: failed program was:" >&5
15515cat conftest.$ac_ext >&5
15516ac_cv_lib_cposix_main=no
15517fi
15518rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15519LIBS=$ac_check_lib_save_LIBS
15520fi
15521echo "$as_me:15521: result: $ac_cv_lib_cposix_main" >&5
15522echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15523if test $ac_cv_lib_cposix_main = yes; then
15524 cat >>confdefs.h <<EOF
15525#define HAVE_LIBCPOSIX 1
15526EOF
15527
15528 LIBS="-lcposix $LIBS"
15529
15530fi
15531
15532 echo "$as_me:15532: checking for bzero in -linet" >&5
15533echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15534if test "${ac_cv_lib_inet_bzero+set}" = set; then
15535 echo $ECHO_N "(cached) $ECHO_C" >&6
15536else
15537 ac_check_lib_save_LIBS=$LIBS
15538LIBS="-linet $LIBS"
15539cat >conftest.$ac_ext <<_ACEOF
15540#line 15540 "configure"
15541#include "confdefs.h"
15542
15543/* Override any gcc2 internal prototype to avoid an error. */
15544#ifdef __cplusplus
15545extern "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. */
15549char bzero ();
15550int
15551main ()
15552{
15553bzero ();
15554 ;
15555 return 0;
15556}
15557_ACEOF
15558rm -f conftest.$ac_objext conftest$ac_exeext
15559if { (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
15571else
15572 echo "$as_me: failed program was:" >&5
15573cat conftest.$ac_ext >&5
15574ac_cv_lib_inet_bzero=no
15575fi
15576rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15577LIBS=$ac_check_lib_save_LIBS
15578fi
15579echo "$as_me:15579: result: $ac_cv_lib_inet_bzero" >&5
15580echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15581if test $ac_cv_lib_inet_bzero = yes; then
15582
15583cf_add_libs="-linet"
15584# Filter out duplicates - this happens with badly-designed ".pc" files...
15585for cf_add_1lib in $LIBS
15586do
15587 for cf_add_2lib in $cf_add_libs
15588 do
15589 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15590 then
15591 cf_add_1lib=
15592 break
15593 fi
15594 done
15595 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15596done
15597LIBS="$cf_add_libs"
15598
15599fi
15600fi
15601
15602echo "$as_me:15602: checking if sys/time.h works with sys/select.h" >&5
15603echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15604if test "${cf_cv_sys_time_select+set}" = set; then
15605 echo $ECHO_N "(cached) $ECHO_C" >&6
15606else
15607
15608cat >conftest.$ac_ext <<_ACEOF
15609#line 15609 "configure"
15610#include "confdefs.h"
15611
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
15619
15620int
15621main ()
15622{
15623
15624 ;
15625 return 0;
15626}
15627_ACEOF
15628rm -f conftest.$ac_objext
15629if { (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
15641else
15642 echo "$as_me: failed program was:" >&5
15643cat conftest.$ac_ext >&5
15644cf_cv_sys_time_select=no
15645fi
15646rm -f conftest.$ac_objext conftest.$ac_ext
15647
15648fi
15649
15650echo "$as_me:15650: result: $cf_cv_sys_time_select" >&5
15651echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15652test "$cf_cv_sys_time_select" = yes &&
15653cat >>confdefs.h <<\EOF
15654#define HAVE_SYS_TIME_SELECT 1
15655EOF
15656
15657### checks for compiler characteristics
15658ac_ext=c
15659ac_cpp='$CPP $CPPFLAGS'
15660ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15661ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15662ac_compiler_gnu=$ac_cv_c_compiler_gnu
15663ac_main_return=return
15664
15665echo "$as_me:15665: checking for an ANSI C-conforming const" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015666echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15667if test "${ac_cv_c_const+set}" = set; then
15668 echo $ECHO_N "(cached) $ECHO_C" >&6
15669else
15670 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010015671#line 15671 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015672#include "confdefs.h"
15673
15674int
15675main ()
15676{
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;
15701
15702 *t++ = 0;
15703 }
15704 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15705 int x[] = {25, 17};
15706 const int *foo = &x[0];
15707 ++foo;
15708 }
15709 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15710 typedef const int *iptr;
15711 iptr p = 0;
15712 ++p;
15713 }
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;
15718 }
15719 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15720 const int foo = 10;
15721 }
15722#endif
15723
15724 ;
15725 return 0;
15726}
15727_ACEOF
15728rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010015729if { (eval echo "$as_me:15729: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015730 (eval $ac_compile) 2>&5
15731 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015732 echo "$as_me:15732: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015733 (exit $ac_status); } &&
15734 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010015735 { (eval echo "$as_me:15735: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015736 (eval $ac_try) 2>&5
15737 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015738 echo "$as_me:15738: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015739 (exit $ac_status); }; }; then
15740 ac_cv_c_const=yes
15741else
15742 echo "$as_me: failed program was:" >&5
15743cat conftest.$ac_ext >&5
15744ac_cv_c_const=no
15745fi
15746rm -f conftest.$ac_objext conftest.$ac_ext
15747fi
Steve Kondikae271bc2015-11-15 02:50:53 +010015748echo "$as_me:15748: result: $ac_cv_c_const" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015749echo "${ECHO_T}$ac_cv_c_const" >&6
15750if test $ac_cv_c_const = no; then
15751
15752cat >>confdefs.h <<\EOF
15753#define const
15754EOF
15755
15756fi
15757
Steve Kondikae271bc2015-11-15 02:50:53 +010015758echo "$as_me:15758: checking for inline" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015759echo $ECHO_N "checking for inline... $ECHO_C" >&6
15760if test "${ac_cv_c_inline+set}" = set; then
15761 echo $ECHO_N "(cached) $ECHO_C" >&6
15762else
15763 ac_cv_c_inline=no
15764for ac_kw in inline __inline__ __inline; do
15765 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010015766#line 15766 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015767#include "confdefs.h"
15768#ifndef __cplusplus
15769static $ac_kw int static_foo () {return 0; }
15770$ac_kw int foo () {return 0; }
15771#endif
15772
15773_ACEOF
15774rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010015775if { (eval echo "$as_me:15775: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015776 (eval $ac_compile) 2>&5
15777 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015778 echo "$as_me:15778: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015779 (exit $ac_status); } &&
15780 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010015781 { (eval echo "$as_me:15781: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015782 (eval $ac_try) 2>&5
15783 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015784 echo "$as_me:15784: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015785 (exit $ac_status); }; }; then
15786 ac_cv_c_inline=$ac_kw; break
15787else
15788 echo "$as_me: failed program was:" >&5
15789cat conftest.$ac_ext >&5
15790fi
15791rm -f conftest.$ac_objext conftest.$ac_ext
15792done
15793
15794fi
Steve Kondikae271bc2015-11-15 02:50:53 +010015795echo "$as_me:15795: result: $ac_cv_c_inline" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015796echo "${ECHO_T}$ac_cv_c_inline" >&6
15797case $ac_cv_c_inline in
15798 inline | yes) ;;
15799 no)
15800cat >>confdefs.h <<\EOF
15801#define inline
15802EOF
15803 ;;
15804 *) cat >>confdefs.h <<EOF
15805#define inline $ac_cv_c_inline
15806EOF
15807 ;;
15808esac
15809
15810NCURSES_INLINE=
15811if test "$ac_cv_c_inline" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015812 NCURSES_INLINE=inline
15813 if test "$INTEL_COMPILER" = yes
15814 then
15815 :
15816 elif test "$CLANG_COMPILER" = yes
15817 then
15818 :
15819 elif test "$GCC" = yes
15820 then
15821 echo "$as_me:15821: checking if $CC supports options to tune inlining" >&5
15822echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015823if test "${cf_cv_gcc_inline+set}" = set; then
15824 echo $ECHO_N "(cached) $ECHO_C" >&6
15825else
15826
Steve Kondikae271bc2015-11-15 02:50:53 +010015827 cf_save_CFLAGS=$CFLAGS
15828 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15829 cat >conftest.$ac_ext <<_ACEOF
15830#line 15830 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015831#include "confdefs.h"
15832inline int foo(void) { return 1; }
15833int
15834main ()
15835{
15836${cf_cv_main_return:-return} foo()
15837 ;
15838 return 0;
15839}
15840_ACEOF
15841rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010015842if { (eval echo "$as_me:15842: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015843 (eval $ac_compile) 2>&5
15844 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015845 echo "$as_me:15845: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015846 (exit $ac_status); } &&
15847 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010015848 { (eval echo "$as_me:15848: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015849 (eval $ac_try) 2>&5
15850 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015851 echo "$as_me:15851: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015852 (exit $ac_status); }; }; then
15853 cf_cv_gcc_inline=yes
15854else
15855 echo "$as_me: failed program was:" >&5
15856cat conftest.$ac_ext >&5
15857cf_cv_gcc_inline=no
15858fi
15859rm -f conftest.$ac_objext conftest.$ac_ext
Steve Kondikae271bc2015-11-15 02:50:53 +010015860 CFLAGS=$cf_save_CFLAGS
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015861
15862fi
Steve Kondikae271bc2015-11-15 02:50:53 +010015863echo "$as_me:15863: result: $cf_cv_gcc_inline" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015864echo "${ECHO_T}$cf_cv_gcc_inline" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010015865 if test "$cf_cv_gcc_inline" = yes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015866
15867cf_fix_cppflags=no
15868cf_new_cflags=
15869cf_new_cppflags=
15870cf_new_extra_cppflags=
15871
15872for cf_add_cflags in --param max-inline-insns-single=1200
15873do
15874case $cf_fix_cppflags in
Steve Kondikae271bc2015-11-15 02:50:53 +010015875(no)
15876 case $cf_add_cflags in
15877 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015878 case $cf_add_cflags in
Steve Kondikae271bc2015-11-15 02:50:53 +010015879 (-D*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015880 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15881
Steve Kondikae271bc2015-11-15 02:50:53 +010015882 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15883 && test -z "${cf_tst_cflags}" \
15884 && cf_fix_cppflags=yes
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015885
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
15892 fi
15893 ;;
15894 esac
15895 case "$CPPFLAGS" in
Steve Kondikae271bc2015-11-15 02:50:53 +010015896 (*$cf_add_cflags)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015897 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010015898 (*)
15899 case $cf_add_cflags in
15900 (-D*)
15901 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15902
15903CPPFLAGS=`echo "$CPPFLAGS" | \
15904 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15905 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15906
15907 ;;
15908 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015909 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15910 ;;
15911 esac
15912 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010015913 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015914 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15915 ;;
15916 esac
15917 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010015918(yes)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015919 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15920
15921 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15922
Steve Kondikae271bc2015-11-15 02:50:53 +010015923 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15924 && test -z "${cf_tst_cflags}" \
15925 && cf_fix_cppflags=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015926 ;;
15927esac
15928done
15929
15930if test -n "$cf_new_cflags" ; then
15931
15932 CFLAGS="$CFLAGS $cf_new_cflags"
15933fi
15934
15935if test -n "$cf_new_cppflags" ; then
15936
Steve Kondikae271bc2015-11-15 02:50:53 +010015937 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015938fi
15939
15940if test -n "$cf_new_extra_cppflags" ; then
15941
15942 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15943fi
15944
Steve Kondikae271bc2015-11-15 02:50:53 +010015945 fi
15946 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015947fi
15948
Steve Kondikae271bc2015-11-15 02:50:53 +010015949echo "$as_me:15949: checking for signal global datatype" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015950echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15951if test "${cf_cv_sig_atomic_t+set}" = set; then
15952 echo $ECHO_N "(cached) $ECHO_C" >&6
15953else
15954
15955 for cf_type in \
15956 "volatile sig_atomic_t" \
15957 "sig_atomic_t" \
15958 "int"
15959 do
15960 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010015961#line 15961 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015962#include "confdefs.h"
15963
15964#include <sys/types.h>
15965#include <signal.h>
15966#include <stdio.h>
15967
15968extern $cf_type x;
15969$cf_type x;
15970static void handler(int sig)
15971{
15972 x = 5;
15973}
15974int
15975main ()
15976{
15977signal(SIGINT, handler);
15978 x = 1
15979 ;
15980 return 0;
15981}
15982_ACEOF
15983rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010015984if { (eval echo "$as_me:15984: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015985 (eval $ac_compile) 2>&5
15986 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015987 echo "$as_me:15987: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015988 (exit $ac_status); } &&
15989 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010015990 { (eval echo "$as_me:15990: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015991 (eval $ac_try) 2>&5
15992 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010015993 echo "$as_me:15993: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053015994 (exit $ac_status); }; }; then
15995 cf_cv_sig_atomic_t=$cf_type
15996else
15997 echo "$as_me: failed program was:" >&5
15998cat conftest.$ac_ext >&5
15999cf_cv_sig_atomic_t=no
16000fi
16001rm -f conftest.$ac_objext conftest.$ac_ext
16002 test "$cf_cv_sig_atomic_t" != no && break
16003 done
16004
16005fi
16006
Steve Kondikae271bc2015-11-15 02:50:53 +010016007echo "$as_me:16007: result: $cf_cv_sig_atomic_t" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016008echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010016009test "$cf_cv_sig_atomic_t" != no &&
16010cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016011#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16012EOF
16013
16014if test $NCURSES_CHTYPE = auto ; then
16015
Steve Kondikae271bc2015-11-15 02:50:53 +010016016echo "$as_me:16016: checking for type of chtype" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016017echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16018if test "${cf_cv_typeof_chtype+set}" = set; then
16019 echo $ECHO_N "(cached) $ECHO_C" >&6
16020else
16021
16022 if test "$cross_compiling" = yes; then
16023 cf_cv_typeof_chtype=long
16024else
16025 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016026#line 16026 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016027#include "confdefs.h"
16028
16029#define WANT_BITS 31
16030#include <stdio.h>
16031int main()
16032{
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;
16045 }
16046 }
16047 /*
16048 * If x is nonzero, an int is big enough for the bits
16049 * that we want.
16050 */
16051 result = (x != 0) ? "int" : "long";
16052 }
16053 fputs(result, fp);
16054 fclose(fp);
16055 }
16056 ${cf_cv_main_return:-return}(0);
16057}
16058
16059_ACEOF
16060rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016061if { (eval echo "$as_me:16061: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016062 (eval $ac_link) 2>&5
16063 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016064 echo "$as_me:16064: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016066 { (eval echo "$as_me:16066: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016067 (eval $ac_try) 2>&5
16068 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016069 echo "$as_me:16069: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016070 (exit $ac_status); }; }; then
16071 cf_cv_typeof_chtype=`cat cf_test.out`
16072else
16073 echo "$as_me: program exited with status $ac_status" >&5
16074echo "$as_me: failed program was:" >&5
16075cat conftest.$ac_ext >&5
16076cf_cv_typeof_chtype=long
16077fi
16078rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16079fi
16080 rm -f cf_test.out
16081
16082fi
16083
Steve Kondikae271bc2015-11-15 02:50:53 +010016084echo "$as_me:16084: result: $cf_cv_typeof_chtype" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016085echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16086
16087cat >>confdefs.h <<EOF
16088#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16089EOF
16090
16091else
16092 cf_cv_typeof_chtype=$NCURSES_CHTYPE
16093fi
16094test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16095
Steve Kondikae271bc2015-11-15 02:50:53 +010016096echo "$as_me:16096: checking if unsigned literals are legal" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016097echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16098if test "${cf_cv_unsigned_literals+set}" = set; then
16099 echo $ECHO_N "(cached) $ECHO_C" >&6
16100else
16101
16102 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016103#line 16103 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016104#include "confdefs.h"
16105
16106int
16107main ()
16108{
16109long x = 1L + 1UL + 1U + 1
16110 ;
16111 return 0;
16112}
16113_ACEOF
16114rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010016115if { (eval echo "$as_me:16115: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016116 (eval $ac_compile) 2>&5
16117 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016118 echo "$as_me:16118: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016119 (exit $ac_status); } &&
16120 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016121 { (eval echo "$as_me:16121: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016122 (eval $ac_try) 2>&5
16123 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016124 echo "$as_me:16124: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016125 (exit $ac_status); }; }; then
16126 cf_cv_unsigned_literals=yes
16127else
16128 echo "$as_me: failed program was:" >&5
16129cat conftest.$ac_ext >&5
16130cf_cv_unsigned_literals=no
16131fi
16132rm -f conftest.$ac_objext conftest.$ac_ext
16133
16134fi
16135
Steve Kondikae271bc2015-11-15 02:50:53 +010016136echo "$as_me:16136: result: $cf_cv_unsigned_literals" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016137echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16138
16139cf_cv_1UL="1"
16140test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16141test ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L"
16142
16143if test $NCURSES_MMASK_T = auto ; then
16144 cf_cv_typeof_mmask_t=long
16145else
16146 cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16147fi
16148test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16149
16150### Checks for external-data
16151
Steve Kondikae271bc2015-11-15 02:50:53 +010016152echo "$as_me:16152: checking if external errno is declared" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016153echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16154if test "${cf_cv_dcl_errno+set}" = set; then
16155 echo $ECHO_N "(cached) $ECHO_C" >&6
16156else
16157
Steve Kondikae271bc2015-11-15 02:50:53 +010016158 cat >conftest.$ac_ext <<_ACEOF
16159#line 16159 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016160#include "confdefs.h"
16161
16162#ifdef HAVE_STDLIB_H
16163#include <stdlib.h>
16164#endif
16165#include <stdio.h>
16166#include <sys/types.h>
16167#include <errno.h>
16168int
16169main ()
16170{
16171int x = (int) errno
16172 ;
16173 return 0;
16174}
16175_ACEOF
16176rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010016177if { (eval echo "$as_me:16177: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016178 (eval $ac_compile) 2>&5
16179 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016180 echo "$as_me:16180: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016181 (exit $ac_status); } &&
16182 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016183 { (eval echo "$as_me:16183: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016184 (eval $ac_try) 2>&5
16185 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016186 echo "$as_me:16186: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016187 (exit $ac_status); }; }; then
16188 cf_cv_dcl_errno=yes
16189else
16190 echo "$as_me: failed program was:" >&5
16191cat conftest.$ac_ext >&5
16192cf_cv_dcl_errno=no
16193fi
16194rm -f conftest.$ac_objext conftest.$ac_ext
16195
16196fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016197echo "$as_me:16197: result: $cf_cv_dcl_errno" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016198echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16199
16200if test "$cf_cv_dcl_errno" = no ; then
16201
16202cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16203
Steve Kondikae271bc2015-11-15 02:50:53 +010016204 cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016205#define $cf_result 1
16206EOF
16207
16208fi
16209
16210# It's possible (for near-UNIX clones) that the data doesn't exist
16211
Steve Kondikae271bc2015-11-15 02:50:53 +010016212echo "$as_me:16212: checking if external errno exists" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016213echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16214if test "${cf_cv_have_errno+set}" = set; then
16215 echo $ECHO_N "(cached) $ECHO_C" >&6
16216else
16217
Steve Kondikae271bc2015-11-15 02:50:53 +010016218 cat >conftest.$ac_ext <<_ACEOF
16219#line 16219 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016220#include "confdefs.h"
16221
16222#undef errno
16223extern int errno;
16224
16225int
16226main ()
16227{
16228errno = 2
16229 ;
16230 return 0;
16231}
16232_ACEOF
16233rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016234if { (eval echo "$as_me:16234: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016235 (eval $ac_link) 2>&5
16236 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016237 echo "$as_me:16237: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016238 (exit $ac_status); } &&
16239 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016240 { (eval echo "$as_me:16240: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016241 (eval $ac_try) 2>&5
16242 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016243 echo "$as_me:16243: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016244 (exit $ac_status); }; }; then
16245 cf_cv_have_errno=yes
16246else
16247 echo "$as_me: failed program was:" >&5
16248cat conftest.$ac_ext >&5
16249cf_cv_have_errno=no
16250fi
16251rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16252
16253fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016254echo "$as_me:16254: result: $cf_cv_have_errno" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016255echo "${ECHO_T}$cf_cv_have_errno" >&6
16256
16257if test "$cf_cv_have_errno" = yes ; then
16258
16259cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16260
Steve Kondikae271bc2015-11-15 02:50:53 +010016261 cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016262#define $cf_result 1
16263EOF
16264
16265fi
16266
Steve Kondikae271bc2015-11-15 02:50:53 +010016267echo "$as_me:16267: checking if data-only library module links" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016268echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16269if test "${cf_cv_link_dataonly+set}" = set; then
16270 echo $ECHO_N "(cached) $ECHO_C" >&6
16271else
16272
16273 rm -f conftest.a
16274 cat >conftest.$ac_ext <<EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016275#line 16275 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016276int testdata[3] = { 123, 456, 789 };
16277EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016278 if { (eval echo "$as_me:16278: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016279 (eval $ac_compile) 2>&5
16280 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016281 echo "$as_me:16281: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016282 (exit $ac_status); } ; then
16283 mv conftest.o data.o && \
Steve Kondikae271bc2015-11-15 02:50:53 +010016284 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016285 fi
16286 rm -f conftest.$ac_ext data.o
16287 cat >conftest.$ac_ext <<EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016288#line 16288 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016289int testfunc()
16290{
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
16299}
16300EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016301 if { (eval echo "$as_me:16301: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016302 (eval $ac_compile) 2>&5
16303 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016304 echo "$as_me:16304: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016305 (exit $ac_status); }; then
16306 mv conftest.o func.o && \
Steve Kondikae271bc2015-11-15 02:50:53 +010016307 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016308 fi
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
16315else
16316 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016317#line 16317 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016318#include "confdefs.h"
16319
16320 int main()
16321 {
16322 extern int testfunc();
16323 ${cf_cv_main_return:-return} (!testfunc());
16324 }
16325
16326_ACEOF
16327rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016328if { (eval echo "$as_me:16328: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016329 (eval $ac_link) 2>&5
16330 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016331 echo "$as_me:16331: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016333 { (eval echo "$as_me:16333: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016334 (eval $ac_try) 2>&5
16335 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016336 echo "$as_me:16336: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016337 (exit $ac_status); }; }; then
16338 cf_cv_link_dataonly=yes
16339else
16340 echo "$as_me: program exited with status $ac_status" >&5
16341echo "$as_me: failed program was:" >&5
16342cat conftest.$ac_ext >&5
16343cf_cv_link_dataonly=no
16344fi
16345rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16346fi
16347 LIBS="$cf_saveLIBS"
16348
16349fi
16350
Steve Kondikae271bc2015-11-15 02:50:53 +010016351echo "$as_me:16351: result: $cf_cv_link_dataonly" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016352echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16353
16354if test "$cf_cv_link_dataonly" = no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016355
16356cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016357#define BROKEN_LINKER 1
16358EOF
16359
16360 BROKEN_LINKER=1
16361fi
16362
16363### Checks for library functions.
16364
16365for ac_func in \
16366getcwd \
16367getegid \
16368geteuid \
Steve Kondikae271bc2015-11-15 02:50:53 +010016369getopt \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016370getttynam \
16371issetugid \
16372poll \
Steve Kondikae271bc2015-11-15 02:50:53 +010016373putenv \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016374remove \
16375select \
16376setbuf \
16377setbuffer \
Steve Kondikae271bc2015-11-15 02:50:53 +010016378setenv \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016379setvbuf \
16380sigaction \
16381sigvec \
16382strdup \
16383strstr \
16384tcgetpgrp \
16385times \
16386vsnprintf \
16387
16388do
16389as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Steve Kondikae271bc2015-11-15 02:50:53 +010016390echo "$as_me:16390: checking for $ac_func" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016391echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16392if eval "test \"\${$as_ac_var+set}\" = set"; then
16393 echo $ECHO_N "(cached) $ECHO_C" >&6
16394else
16395 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016396#line 16396 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016397#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
16403extern "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. */
16407char $ac_func ();
16408char (*f) ();
16409
16410int
16411main ()
16412{
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)
16417choke me
16418#else
Steve Kondikae271bc2015-11-15 02:50:53 +010016419f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016420#endif
16421
16422 ;
16423 return 0;
16424}
16425_ACEOF
16426rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016427if { (eval echo "$as_me:16427: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016428 (eval $ac_link) 2>&5
16429 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016430 echo "$as_me:16430: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016431 (exit $ac_status); } &&
16432 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016433 { (eval echo "$as_me:16433: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016434 (eval $ac_try) 2>&5
16435 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016436 echo "$as_me:16436: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016437 (exit $ac_status); }; }; then
16438 eval "$as_ac_var=yes"
16439else
16440 echo "$as_me: failed program was:" >&5
16441cat conftest.$ac_ext >&5
16442eval "$as_ac_var=no"
16443fi
16444rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16445fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016446echo "$as_me:16446: result: `eval echo '${'$as_ac_var'}'`" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016447echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16448if test `eval echo '${'$as_ac_var'}'` = yes; then
16449 cat >>confdefs.h <<EOF
16450#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16451EOF
16452
16453fi
16454done
16455
Steve Kondikae271bc2015-11-15 02:50:53 +010016456if 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
16459echo "$as_me: error: getopt is required for building programs" >&2;}
16460 { (exit 1); exit 1; }; }
16461fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016462
Steve Kondikae271bc2015-11-15 02:50:53 +010016463if test "x$with_getcap" = "xyes" ; then
16464
16465echo "$as_me:16465: checking for terminal-capability database functions" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016466echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16467if test "${cf_cv_cgetent+set}" = set; then
16468 echo $ECHO_N "(cached) $ECHO_C" >&6
16469else
16470
16471cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016472#line 16472 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016473#include "confdefs.h"
16474
16475#include <stdlib.h>
16476int
16477main ()
16478{
16479
16480 char temp[128];
16481 char *buf = temp;
16482 char *db_array = temp;
Steve Kondikae271bc2015-11-15 02:50:53 +010016483 cgetent(&buf, &db_array, "vt100");
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016484 cgetcap(buf, "tc", '=');
16485 cgetmatch(buf, "tc");
16486
16487 ;
16488 return 0;
16489}
16490_ACEOF
16491rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016492if { (eval echo "$as_me:16492: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016493 (eval $ac_link) 2>&5
16494 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016495 echo "$as_me:16495: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016496 (exit $ac_status); } &&
16497 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016498 { (eval echo "$as_me:16498: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016499 (eval $ac_try) 2>&5
16500 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016501 echo "$as_me:16501: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016502 (exit $ac_status); }; }; then
16503 cf_cv_cgetent=yes
16504else
16505 echo "$as_me: failed program was:" >&5
16506cat conftest.$ac_ext >&5
16507cf_cv_cgetent=no
16508fi
16509rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16510
16511fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016512echo "$as_me:16512: result: $cf_cv_cgetent" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016513echo "${ECHO_T}$cf_cv_cgetent" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010016514
16515if test "$cf_cv_cgetent" = yes
16516then
16517
16518cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016519#define HAVE_BSD_CGETENT 1
16520EOF
16521
Steve Kondikae271bc2015-11-15 02:50:53 +010016522echo "$as_me:16522: checking if cgetent uses const parameter" >&5
16523echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16524if test "${cf_cv_cgetent_const+set}" = set; then
16525 echo $ECHO_N "(cached) $ECHO_C" >&6
16526else
16527
16528cat >conftest.$ac_ext <<_ACEOF
16529#line 16529 "configure"
16530#include "confdefs.h"
16531
16532#include <stdlib.h>
16533int
16534main ()
16535{
16536
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");
16545
16546 ;
16547 return 0;
16548}
16549_ACEOF
16550rm -f conftest.$ac_objext conftest$ac_exeext
16551if { (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
16563else
16564 echo "$as_me: failed program was:" >&5
16565cat conftest.$ac_ext >&5
16566cf_cv_cgetent_const=no
16567fi
16568rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16569
16570fi
16571echo "$as_me:16571: result: $cf_cv_cgetent_const" >&5
16572echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16573 if test "$cf_cv_cgetent_const" = yes
16574 then
16575
16576cat >>confdefs.h <<EOF
16577#define CGETENT_CONST const
16578EOF
16579
16580 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016581fi
16582
Steve Kondikae271bc2015-11-15 02:50:53 +010016583fi
16584
16585echo "$as_me:16585: checking for isascii" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016586echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16587if test "${cf_cv_have_isascii+set}" = set; then
16588 echo $ECHO_N "(cached) $ECHO_C" >&6
16589else
16590
16591 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016592#line 16592 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016593#include "confdefs.h"
16594#include <ctype.h>
16595int
16596main ()
16597{
16598int x = isascii(' ')
16599 ;
16600 return 0;
16601}
16602_ACEOF
16603rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016604if { (eval echo "$as_me:16604: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016605 (eval $ac_link) 2>&5
16606 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016607 echo "$as_me:16607: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016608 (exit $ac_status); } &&
16609 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016610 { (eval echo "$as_me:16610: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016611 (eval $ac_try) 2>&5
16612 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016613 echo "$as_me:16613: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016614 (exit $ac_status); }; }; then
16615 cf_cv_have_isascii=yes
16616else
16617 echo "$as_me: failed program was:" >&5
16618cat conftest.$ac_ext >&5
16619cf_cv_have_isascii=no
16620fi
16621rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16622
16623fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016624echo "$as_me:16624: result: $cf_cv_have_isascii" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016625echo "${ECHO_T}$cf_cv_have_isascii" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010016626test "$cf_cv_have_isascii" = yes &&
16627cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016628#define HAVE_ISASCII 1
16629EOF
16630
16631if test "$ac_cv_func_sigaction" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016632echo "$as_me:16632: checking whether sigaction needs _POSIX_SOURCE" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016633echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16634cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016635#line 16635 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016636#include "confdefs.h"
16637
16638#include <sys/types.h>
16639#include <signal.h>
16640int
16641main ()
16642{
16643struct sigaction act
16644 ;
16645 return 0;
16646}
16647_ACEOF
16648rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010016649if { (eval echo "$as_me:16649: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016650 (eval $ac_compile) 2>&5
16651 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016652 echo "$as_me:16652: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016653 (exit $ac_status); } &&
16654 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016655 { (eval echo "$as_me:16655: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016656 (eval $ac_try) 2>&5
16657 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016658 echo "$as_me:16658: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016659 (exit $ac_status); }; }; then
16660 sigact_bad=no
16661else
16662 echo "$as_me: failed program was:" >&5
16663cat conftest.$ac_ext >&5
16664
16665cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016666#line 16666 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016667#include "confdefs.h"
16668
16669#define _POSIX_SOURCE
16670#include <sys/types.h>
16671#include <signal.h>
16672int
16673main ()
16674{
16675struct sigaction act
16676 ;
16677 return 0;
16678}
16679_ACEOF
16680rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010016681if { (eval echo "$as_me:16681: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016682 (eval $ac_compile) 2>&5
16683 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016684 echo "$as_me:16684: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016685 (exit $ac_status); } &&
16686 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016687 { (eval echo "$as_me:16687: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016688 (eval $ac_try) 2>&5
16689 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016690 echo "$as_me:16690: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016691 (exit $ac_status); }; }; then
16692 sigact_bad=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010016693
16694cat >>confdefs.h <<\EOF
16695#define _POSIX_SOURCE 1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016696EOF
16697
16698else
16699 echo "$as_me: failed program was:" >&5
16700cat conftest.$ac_ext >&5
16701sigact_bad=unknown
16702fi
16703rm -f conftest.$ac_objext conftest.$ac_ext
16704fi
16705rm -f conftest.$ac_objext conftest.$ac_ext
Steve Kondikae271bc2015-11-15 02:50:53 +010016706echo "$as_me:16706: result: $sigact_bad" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016707echo "${ECHO_T}$sigact_bad" >&6
16708fi
16709
Steve Kondikae271bc2015-11-15 02:50:53 +010016710echo "$as_me:16710: checking if nanosleep really works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016711echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16712if test "${cf_cv_func_nanosleep+set}" = set; then
16713 echo $ECHO_N "(cached) $ECHO_C" >&6
16714else
16715
16716if test "$cross_compiling" = yes; then
16717 cf_cv_func_nanosleep=unknown
16718else
16719 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016720#line 16720 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016721#include "confdefs.h"
16722
16723#include <stdio.h>
16724#include <errno.h>
16725#include <time.h>
16726
16727#ifdef HAVE_SYS_TIME_H
16728#include <sys/time.h>
16729#endif
16730
16731int 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);
16741}
16742
16743_ACEOF
16744rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016745if { (eval echo "$as_me:16745: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016746 (eval $ac_link) 2>&5
16747 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016748 echo "$as_me:16748: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016750 { (eval echo "$as_me:16750: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016751 (eval $ac_try) 2>&5
16752 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016753 echo "$as_me:16753: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016754 (exit $ac_status); }; }; then
16755 cf_cv_func_nanosleep=yes
16756else
16757 echo "$as_me: program exited with status $ac_status" >&5
16758echo "$as_me: failed program was:" >&5
16759cat conftest.$ac_ext >&5
16760cf_cv_func_nanosleep=no
16761fi
16762rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16763fi
16764fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016765echo "$as_me:16765: result: $cf_cv_func_nanosleep" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016766echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16767
Steve Kondikae271bc2015-11-15 02:50:53 +010016768test "$cf_cv_func_nanosleep" = "yes" &&
16769cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016770#define HAVE_NANOSLEEP 1
16771EOF
16772
16773for ac_header in \
16774termio.h \
16775termios.h \
16776unistd.h \
16777
16778do
16779as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Steve Kondikae271bc2015-11-15 02:50:53 +010016780echo "$as_me:16780: checking for $ac_header" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16782if eval "test \"\${$as_ac_Header+set}\" = set"; then
16783 echo $ECHO_N "(cached) $ECHO_C" >&6
16784else
16785 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016786#line 16786 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016787#include "confdefs.h"
16788#include <$ac_header>
16789_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016790if { (eval echo "$as_me:16790: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016791 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010016796 echo "$as_me:16796: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016797 (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=
16802 fi
16803else
16804 ac_cpp_err=yes
16805fi
16806if test -z "$ac_cpp_err"; then
16807 eval "$as_ac_Header=yes"
16808else
16809 echo "$as_me: failed program was:" >&5
16810 cat conftest.$ac_ext >&5
16811 eval "$as_ac_Header=no"
16812fi
16813rm -f conftest.err conftest.$ac_ext
16814fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016815echo "$as_me:16815: result: `eval echo '${'$as_ac_Header'}'`" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016816echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16817if test `eval echo '${'$as_ac_Header'}'` = yes; then
16818 cat >>confdefs.h <<EOF
16819#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16820EOF
16821
16822fi
16823done
16824
16825if test "$ISC" = yes ; then
16826
16827for ac_header in sys/termio.h
16828do
16829as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Steve Kondikae271bc2015-11-15 02:50:53 +010016830echo "$as_me:16830: checking for $ac_header" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016831echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16832if eval "test \"\${$as_ac_Header+set}\" = set"; then
16833 echo $ECHO_N "(cached) $ECHO_C" >&6
16834else
16835 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016836#line 16836 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016837#include "confdefs.h"
16838#include <$ac_header>
16839_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016840if { (eval echo "$as_me:16840: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016841 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010016846 echo "$as_me:16846: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016847 (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=
16852 fi
16853else
16854 ac_cpp_err=yes
16855fi
16856if test -z "$ac_cpp_err"; then
16857 eval "$as_ac_Header=yes"
16858else
16859 echo "$as_me: failed program was:" >&5
16860 cat conftest.$ac_ext >&5
16861 eval "$as_ac_Header=no"
16862fi
16863rm -f conftest.err conftest.$ac_ext
16864fi
Steve Kondikae271bc2015-11-15 02:50:53 +010016865echo "$as_me:16865: result: `eval echo '${'$as_ac_Header'}'`" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016866echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16867if test `eval echo '${'$as_ac_Header'}'` = yes; then
16868 cat >>confdefs.h <<EOF
16869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16870EOF
16871
16872fi
16873done
16874
16875fi
16876if test "$ac_cv_header_termios_h" = yes ; then
16877 case "$CFLAGS $CPPFLAGS" in
Steve Kondikae271bc2015-11-15 02:50:53 +010016878 (*-D_POSIX_SOURCE*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016879 termios_bad=dunno ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010016880 (*) termios_bad=maybe ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016881 esac
16882 if test "$termios_bad" = maybe ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016883 echo "$as_me:16883: checking whether termios.h needs _POSIX_SOURCE" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016884echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16885 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016886#line 16886 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016887#include "confdefs.h"
16888#include <termios.h>
16889int
16890main ()
16891{
16892struct termios foo; int x = foo.c_iflag
16893 ;
16894 return 0;
16895}
16896_ACEOF
16897rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010016898if { (eval echo "$as_me:16898: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016899 (eval $ac_compile) 2>&5
16900 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016901 echo "$as_me:16901: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016902 (exit $ac_status); } &&
16903 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016904 { (eval echo "$as_me:16904: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016905 (eval $ac_try) 2>&5
16906 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016907 echo "$as_me:16907: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016908 (exit $ac_status); }; }; then
16909 termios_bad=no
16910else
16911 echo "$as_me: failed program was:" >&5
16912cat conftest.$ac_ext >&5
16913
16914 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016915#line 16915 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016916#include "confdefs.h"
16917
16918#define _POSIX_SOURCE
16919#include <termios.h>
16920int
16921main ()
16922{
16923struct termios foo; int x = foo.c_iflag
16924 ;
16925 return 0;
16926}
16927_ACEOF
16928rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010016929if { (eval echo "$as_me:16929: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016930 (eval $ac_compile) 2>&5
16931 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016932 echo "$as_me:16932: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016933 (exit $ac_status); } &&
16934 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010016935 { (eval echo "$as_me:16935: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016936 (eval $ac_try) 2>&5
16937 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016938 echo "$as_me:16938: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016939 (exit $ac_status); }; }; then
16940 termios_bad=unknown
16941else
16942 echo "$as_me: failed program was:" >&5
16943cat conftest.$ac_ext >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016944termios_bad=yes
16945cat >>confdefs.h <<\EOF
16946#define _POSIX_SOURCE 1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016947EOF
16948
16949fi
16950rm -f conftest.$ac_objext conftest.$ac_ext
16951
16952fi
16953rm -f conftest.$ac_objext conftest.$ac_ext
Steve Kondikae271bc2015-11-15 02:50:53 +010016954 echo "$as_me:16954: result: $termios_bad" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016955echo "${ECHO_T}$termios_bad" >&6
16956 fi
16957fi
16958
Steve Kondikae271bc2015-11-15 02:50:53 +010016959echo "$as_me:16959: checking for tcgetattr" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016960echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16961if test "${cf_cv_have_tcgetattr+set}" = set; then
16962 echo $ECHO_N "(cached) $ECHO_C" >&6
16963else
16964
16965cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010016966#line 16966 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016967#include "confdefs.h"
16968
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
16982
16983int
16984main ()
16985{
16986
16987TTY foo;
16988tcgetattr(1, &foo);
16989 ;
16990 return 0;
16991}
16992_ACEOF
16993rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010016994if { (eval echo "$as_me:16994: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016995 (eval $ac_link) 2>&5
16996 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010016997 echo "$as_me:16997: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053016998 (exit $ac_status); } &&
16999 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017000 { (eval echo "$as_me:17000: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017001 (eval $ac_try) 2>&5
17002 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017003 echo "$as_me:17003: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017004 (exit $ac_status); }; }; then
17005 cf_cv_have_tcgetattr=yes
17006else
17007 echo "$as_me: failed program was:" >&5
17008cat conftest.$ac_ext >&5
17009cf_cv_have_tcgetattr=no
17010fi
17011rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17012fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017013echo "$as_me:17013: result: $cf_cv_have_tcgetattr" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017014echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010017015test "$cf_cv_have_tcgetattr" = yes &&
17016cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017017#define HAVE_TCGETATTR 1
17018EOF
17019
Steve Kondikae271bc2015-11-15 02:50:53 +010017020echo "$as_me:17020: checking for vsscanf function or workaround" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017021echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17022if test "${cf_cv_func_vsscanf+set}" = set; then
17023 echo $ECHO_N "(cached) $ECHO_C" >&6
17024else
17025
17026cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017027#line 17027 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017028#include "confdefs.h"
17029
17030#include <stdarg.h>
17031#include <stdio.h>
17032int
17033main ()
17034{
17035
17036 va_list ap;
17037 vsscanf("from", "%d", ap)
17038 ;
17039 return 0;
17040}
17041_ACEOF
17042rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017043if { (eval echo "$as_me:17043: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017044 (eval $ac_link) 2>&5
17045 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017046 echo "$as_me:17046: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017047 (exit $ac_status); } &&
17048 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017049 { (eval echo "$as_me:17049: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017050 (eval $ac_try) 2>&5
17051 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017052 echo "$as_me:17052: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017053 (exit $ac_status); }; }; then
17054 cf_cv_func_vsscanf=vsscanf
17055else
17056 echo "$as_me: failed program was:" >&5
17057cat conftest.$ac_ext >&5
17058
17059cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017060#line 17060 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017061#include "confdefs.h"
17062
17063#include <stdarg.h>
17064#include <stdio.h>
17065int
17066main ()
17067{
17068
Steve Kondikae271bc2015-11-15 02:50:53 +010017069 FILE strbuf;
17070 char *str = "from";
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017071
Steve Kondikae271bc2015-11-15 02:50:53 +010017072 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))
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017077 ;
17078 return 0;
17079}
17080_ACEOF
17081rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017082if { (eval echo "$as_me:17082: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017083 (eval $ac_link) 2>&5
17084 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017085 echo "$as_me:17085: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017086 (exit $ac_status); } &&
17087 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017088 { (eval echo "$as_me:17088: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017089 (eval $ac_try) 2>&5
17090 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017091 echo "$as_me:17091: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017092 (exit $ac_status); }; }; then
17093 cf_cv_func_vsscanf=vfscanf
17094else
17095 echo "$as_me: failed program was:" >&5
17096cat conftest.$ac_ext >&5
17097
17098cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017099#line 17099 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017100#include "confdefs.h"
17101
17102#include <stdarg.h>
17103#include <stdio.h>
17104int
17105main ()
17106{
17107
Steve Kondikae271bc2015-11-15 02:50:53 +010017108 FILE strbuf;
17109 char *str = "from";
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017110
Steve Kondikae271bc2015-11-15 02:50:53 +010017111 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))
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017116 ;
17117 return 0;
17118}
17119_ACEOF
17120rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017121if { (eval echo "$as_me:17121: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017122 (eval $ac_link) 2>&5
17123 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017124 echo "$as_me:17124: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017125 (exit $ac_status); } &&
17126 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017127 { (eval echo "$as_me:17127: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017128 (eval $ac_try) 2>&5
17129 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017130 echo "$as_me:17130: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017131 (exit $ac_status); }; }; then
17132 cf_cv_func_vsscanf=_doscan
17133else
17134 echo "$as_me: failed program was:" >&5
17135cat conftest.$ac_ext >&5
17136
17137cf_cv_func_vsscanf=no
17138fi
17139rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17140fi
17141rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17142fi
17143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17144fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017145echo "$as_me:17145: result: $cf_cv_func_vsscanf" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017146echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17147
Steve Kondikae271bc2015-11-15 02:50:53 +010017148case $cf_cv_func_vsscanf in
17149(vsscanf)
17150cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017151#define HAVE_VSSCANF 1
17152EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017153;;
17154(vfscanf)
17155cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017156#define HAVE_VFSCANF 1
17157EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017158;;
17159(_doscan)
17160cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017161#define HAVE__DOSCAN 1
17162EOF
17163;;
17164esac
17165
Steve Kondikae271bc2015-11-15 02:50:53 +010017166echo "$as_me:17166: checking for working mkstemp" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017167echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17168if test "${cf_cv_func_mkstemp+set}" = set; then
17169 echo $ECHO_N "(cached) $ECHO_C" >&6
17170else
17171
Steve Kondikae271bc2015-11-15 02:50:53 +010017172rm -rf conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017173if test "$cross_compiling" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010017174 cf_cv_func_mkstemp=maybe
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017175else
17176 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017177#line 17177 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017178#include "confdefs.h"
17179
17180#include <sys/types.h>
17181#include <stdlib.h>
17182#include <stdio.h>
17183#include <string.h>
17184#include <sys/stat.h>
17185int main()
17186{
17187 char *tmpl = "conftestXXXXXX";
17188 char name[2][80];
17189 int n;
17190 int result = 0;
17191 int fd;
17192 struct stat sb;
17193
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;
17203 }
17204 close(fd);
17205 }
17206 }
17207 if (result == 0
17208 && !strcmp(name[0], name[1]))
17209 result = 1;
17210 ${cf_cv_main_return:-return}(result);
17211}
17212
17213_ACEOF
17214rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017215if { (eval echo "$as_me:17215: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017216 (eval $ac_link) 2>&5
17217 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017218 echo "$as_me:17218: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017219 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017220 { (eval echo "$as_me:17220: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017221 (eval $ac_try) 2>&5
17222 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017223 echo "$as_me:17223: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017224 (exit $ac_status); }; }; then
17225 cf_cv_func_mkstemp=yes
17226
17227else
17228 echo "$as_me: program exited with status $ac_status" >&5
17229echo "$as_me: failed program was:" >&5
17230cat conftest.$ac_ext >&5
17231cf_cv_func_mkstemp=no
17232
17233fi
17234rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17235fi
17236
17237fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017238echo "$as_me:17238: result: $cf_cv_func_mkstemp" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017239echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010017240if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17241 echo "$as_me:17241: checking for mkstemp" >&5
17242echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17243if test "${ac_cv_func_mkstemp+set}" = set; then
17244 echo $ECHO_N "(cached) $ECHO_C" >&6
17245else
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
17254extern "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. */
17258char mkstemp ();
17259char (*f) ();
17260
17261int
17262main ()
17263{
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)
17268choke me
17269#else
17270f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17271#endif
17272
17273 ;
17274 return 0;
17275}
17276_ACEOF
17277rm -f conftest.$ac_objext conftest$ac_exeext
17278if { (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
17290else
17291 echo "$as_me: failed program was:" >&5
17292cat conftest.$ac_ext >&5
17293ac_cv_func_mkstemp=no
17294fi
17295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17296fi
17297echo "$as_me:17297: result: $ac_cv_func_mkstemp" >&5
17298echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17299
17300fi
17301if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17302
17303cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017304#define HAVE_MKSTEMP 1
17305EOF
17306
17307fi
17308
17309# setup for prototype of fallback for vsscanf()
17310
17311if test "$cf_cv_func_vsscanf" = vsscanf ; then
17312 HAVE_VSSCANF=1
17313else
17314 HAVE_VSSCANF=0
17315fi
17316
Steve Kondikae271bc2015-11-15 02:50:53 +010017317if test "x$cross_compiling" = xyes ; then
17318 { echo "$as_me:17318: WARNING: cross compiling: assume setvbuf params not reversed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017319echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17320else
Steve Kondikae271bc2015-11-15 02:50:53 +010017321 echo "$as_me:17321: checking whether setvbuf arguments are reversed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017322echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17323if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17324 echo $ECHO_N "(cached) $ECHO_C" >&6
17325else
17326 if test "$cross_compiling" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010017327 { { echo "$as_me:17327: error: cannot run test program while cross compiling" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017328echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17329 { (exit 1); exit 1; }; }
17330else
17331 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017332#line 17332 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017333#include "confdefs.h"
17334#include <stdio.h>
17335/* If setvbuf has the reversed format, exit 0. */
17336int
17337main ()
17338{
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. */
17346}
17347_ACEOF
17348rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017349if { (eval echo "$as_me:17349: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017350 (eval $ac_link) 2>&5
17351 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017352 echo "$as_me:17352: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017353 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017354 { (eval echo "$as_me:17354: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017355 (eval $ac_try) 2>&5
17356 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017357 echo "$as_me:17357: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017358 (exit $ac_status); }; }; then
17359 ac_cv_func_setvbuf_reversed=yes
17360else
17361 echo "$as_me: program exited with status $ac_status" >&5
17362echo "$as_me: failed program was:" >&5
17363cat conftest.$ac_ext >&5
17364ac_cv_func_setvbuf_reversed=no
17365fi
17366rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17367fi
17368rm -f core core.* *.core
17369fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017370echo "$as_me:17370: result: $ac_cv_func_setvbuf_reversed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017371echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17372if test $ac_cv_func_setvbuf_reversed = yes; then
17373
17374cat >>confdefs.h <<\EOF
17375#define SETVBUF_REVERSED 1
17376EOF
17377
17378fi
17379
17380fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017381echo "$as_me:17381: checking for intptr_t" >&5
17382echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17383if test "${ac_cv_type_intptr_t+set}" = set; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017384 echo $ECHO_N "(cached) $ECHO_C" >&6
17385else
17386 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017387#line 17387 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017388#include "confdefs.h"
Steve Kondikae271bc2015-11-15 02:50:53 +010017389$ac_includes_default
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017390int
17391main ()
17392{
Steve Kondikae271bc2015-11-15 02:50:53 +010017393if ((intptr_t *) 0)
17394 return 0;
17395if (sizeof (intptr_t))
17396 return 0;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017397 ;
17398 return 0;
17399}
17400_ACEOF
17401rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010017402if { (eval echo "$as_me:17402: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017403 (eval $ac_compile) 2>&5
17404 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017405 echo "$as_me:17405: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017406 (exit $ac_status); } &&
17407 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017408 { (eval echo "$as_me:17408: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017409 (eval $ac_try) 2>&5
17410 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017411 echo "$as_me:17411: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017412 (exit $ac_status); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010017413 ac_cv_type_intptr_t=yes
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017414else
17415 echo "$as_me: failed program was:" >&5
17416cat conftest.$ac_ext >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017417ac_cv_type_intptr_t=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017418fi
17419rm -f conftest.$ac_objext conftest.$ac_ext
17420fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017421echo "$as_me:17421: result: $ac_cv_type_intptr_t" >&5
17422echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17423if test $ac_cv_type_intptr_t = yes; then
17424 :
17425else
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017426
17427cat >>confdefs.h <<EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017428#define intptr_t long
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017429EOF
17430
Steve Kondikae271bc2015-11-15 02:50:53 +010017431fi
17432
17433echo "$as_me:17433: checking for ssize_t" >&5
17434echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17435if test "${ac_cv_type_ssize_t+set}" = set; then
17436 echo $ECHO_N "(cached) $ECHO_C" >&6
17437else
17438 cat >conftest.$ac_ext <<_ACEOF
17439#line 17439 "configure"
17440#include "confdefs.h"
17441$ac_includes_default
17442int
17443main ()
17444{
17445if ((ssize_t *) 0)
17446 return 0;
17447if (sizeof (ssize_t))
17448 return 0;
17449 ;
17450 return 0;
17451}
17452_ACEOF
17453rm -f conftest.$ac_objext
17454if { (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
17466else
17467 echo "$as_me: failed program was:" >&5
17468cat conftest.$ac_ext >&5
17469ac_cv_type_ssize_t=no
17470fi
17471rm -f conftest.$ac_objext conftest.$ac_ext
17472fi
17473echo "$as_me:17473: result: $ac_cv_type_ssize_t" >&5
17474echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17475if test $ac_cv_type_ssize_t = yes; then
17476 :
17477else
17478
17479cat >>confdefs.h <<EOF
17480#define ssize_t int
17481EOF
17482
17483fi
17484
17485echo "$as_me:17485: checking for type sigaction_t" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017486echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17487if test "${cf_cv_type_sigaction+set}" = set; then
17488 echo $ECHO_N "(cached) $ECHO_C" >&6
17489else
17490
17491 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017492#line 17492 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017493#include "confdefs.h"
17494
17495#include <signal.h>
17496int
17497main ()
17498{
17499sigaction_t x
17500 ;
17501 return 0;
17502}
17503_ACEOF
17504rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010017505if { (eval echo "$as_me:17505: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017506 (eval $ac_compile) 2>&5
17507 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017508 echo "$as_me:17508: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017509 (exit $ac_status); } &&
17510 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017511 { (eval echo "$as_me:17511: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017512 (eval $ac_try) 2>&5
17513 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017514 echo "$as_me:17514: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017515 (exit $ac_status); }; }; then
17516 cf_cv_type_sigaction=yes
17517else
17518 echo "$as_me: failed program was:" >&5
17519cat conftest.$ac_ext >&5
17520cf_cv_type_sigaction=no
17521fi
17522rm -f conftest.$ac_objext conftest.$ac_ext
17523fi
17524
Steve Kondikae271bc2015-11-15 02:50:53 +010017525echo "$as_me:17525: result: $cf_cv_type_sigaction" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017526echo "${ECHO_T}$cf_cv_type_sigaction" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010017527test "$cf_cv_type_sigaction" = yes &&
17528cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017529#define HAVE_TYPE_SIGACTION 1
17530EOF
17531
Steve Kondikae271bc2015-11-15 02:50:53 +010017532echo "$as_me:17532: checking declaration of size-change" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017533echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17534if test "${cf_cv_sizechange+set}" = set; then
17535 echo $ECHO_N "(cached) $ECHO_C" >&6
17536else
17537
Steve Kondikae271bc2015-11-15 02:50:53 +010017538 cf_cv_sizechange=unknown
17539 cf_save_CPPFLAGS="$CPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017540
17541for cf_opts in "" "NEED_PTEM_H"
17542do
17543
Steve Kondikae271bc2015-11-15 02:50:53 +010017544 CPPFLAGS="$cf_save_CPPFLAGS"
17545 test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17546 cat >conftest.$ac_ext <<_ACEOF
17547#line 17547 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017548#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
17560 */
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
17567
17568int
17569main ()
17570{
17571
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 */
17585
17586 ;
17587 return 0;
17588}
17589_ACEOF
17590rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010017591if { (eval echo "$as_me:17591: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017592 (eval $ac_compile) 2>&5
17593 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017594 echo "$as_me:17594: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017595 (exit $ac_status); } &&
17596 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017597 { (eval echo "$as_me:17597: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017598 (eval $ac_try) 2>&5
17599 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017600 echo "$as_me:17600: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017601 (exit $ac_status); }; }; then
17602 cf_cv_sizechange=yes
17603else
17604 echo "$as_me: failed program was:" >&5
17605cat conftest.$ac_ext >&5
17606cf_cv_sizechange=no
17607fi
17608rm -f conftest.$ac_objext conftest.$ac_ext
17609
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
17615 fi
17616done
17617
17618fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017619echo "$as_me:17619: result: $cf_cv_sizechange" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017620echo "${ECHO_T}$cf_cv_sizechange" >&6
17621if test "$cf_cv_sizechange" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010017622
17623cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017624#define HAVE_SIZECHANGE 1
17625EOF
17626
Steve Kondikae271bc2015-11-15 02:50:53 +010017627 case $cf_cv_sizechange in
17628 (NEED*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017629 cat >>confdefs.h <<EOF
17630#define $cf_cv_sizechange 1
17631EOF
17632
17633 ;;
17634 esac
17635fi
17636
Steve Kondikae271bc2015-11-15 02:50:53 +010017637echo "$as_me:17637: checking for memmove" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017638echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17639if test "${ac_cv_func_memmove+set}" = set; then
17640 echo $ECHO_N "(cached) $ECHO_C" >&6
17641else
17642 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017643#line 17643 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017644#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
17650extern "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. */
17654char memmove ();
17655char (*f) ();
17656
17657int
17658main ()
17659{
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)
17664choke me
17665#else
Steve Kondikae271bc2015-11-15 02:50:53 +010017666f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017667#endif
17668
17669 ;
17670 return 0;
17671}
17672_ACEOF
17673rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017674if { (eval echo "$as_me:17674: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017675 (eval $ac_link) 2>&5
17676 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017677 echo "$as_me:17677: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017678 (exit $ac_status); } &&
17679 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017680 { (eval echo "$as_me:17680: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017681 (eval $ac_try) 2>&5
17682 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017683 echo "$as_me:17683: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017684 (exit $ac_status); }; }; then
17685 ac_cv_func_memmove=yes
17686else
17687 echo "$as_me: failed program was:" >&5
17688cat conftest.$ac_ext >&5
17689ac_cv_func_memmove=no
17690fi
17691rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17692fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017693echo "$as_me:17693: result: $ac_cv_func_memmove" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017694echo "${ECHO_T}$ac_cv_func_memmove" >&6
17695if test $ac_cv_func_memmove = yes; then
17696 :
17697else
17698
Steve Kondikae271bc2015-11-15 02:50:53 +010017699echo "$as_me:17699: checking for bcopy" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017700echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17701if test "${ac_cv_func_bcopy+set}" = set; then
17702 echo $ECHO_N "(cached) $ECHO_C" >&6
17703else
17704 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017705#line 17705 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017706#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
17712extern "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. */
17716char bcopy ();
17717char (*f) ();
17718
17719int
17720main ()
17721{
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)
17726choke me
17727#else
Steve Kondikae271bc2015-11-15 02:50:53 +010017728f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017729#endif
17730
17731 ;
17732 return 0;
17733}
17734_ACEOF
17735rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017736if { (eval echo "$as_me:17736: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017737 (eval $ac_link) 2>&5
17738 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017739 echo "$as_me:17739: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017740 (exit $ac_status); } &&
17741 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017742 { (eval echo "$as_me:17742: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017743 (eval $ac_try) 2>&5
17744 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017745 echo "$as_me:17745: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017746 (exit $ac_status); }; }; then
17747 ac_cv_func_bcopy=yes
17748else
17749 echo "$as_me: failed program was:" >&5
17750cat conftest.$ac_ext >&5
17751ac_cv_func_bcopy=no
17752fi
17753rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17754fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017755echo "$as_me:17755: result: $ac_cv_func_bcopy" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017756echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17757if test $ac_cv_func_bcopy = yes; then
17758
Steve Kondikae271bc2015-11-15 02:50:53 +010017759 echo "$as_me:17759: checking if bcopy does overlapping moves" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017760echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17761if test "${cf_cv_good_bcopy+set}" = set; then
17762 echo $ECHO_N "(cached) $ECHO_C" >&6
17763else
17764
17765 if test "$cross_compiling" = yes; then
17766 cf_cv_good_bcopy=unknown
17767else
17768 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017769#line 17769 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017770#include "confdefs.h"
17771
17772int 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"));
17779}
17780
17781_ACEOF
17782rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017783if { (eval echo "$as_me:17783: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017784 (eval $ac_link) 2>&5
17785 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017786 echo "$as_me:17786: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017787 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017788 { (eval echo "$as_me:17788: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017789 (eval $ac_try) 2>&5
17790 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017791 echo "$as_me:17791: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017792 (exit $ac_status); }; }; then
17793 cf_cv_good_bcopy=yes
17794else
17795 echo "$as_me: program exited with status $ac_status" >&5
17796echo "$as_me: failed program was:" >&5
17797cat conftest.$ac_ext >&5
17798cf_cv_good_bcopy=no
17799fi
17800rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17801fi
17802
17803fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017804echo "$as_me:17804: result: $cf_cv_good_bcopy" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017805echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17806
17807else
17808 cf_cv_good_bcopy=no
17809fi
17810
17811 if test "$cf_cv_good_bcopy" = yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010017812
17813cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017814#define USE_OK_BCOPY 1
17815EOF
17816
17817 else
Steve Kondikae271bc2015-11-15 02:50:53 +010017818
17819cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017820#define USE_MY_MEMMOVE 1
17821EOF
17822
17823 fi
17824
17825fi
17826
Steve Kondikae271bc2015-11-15 02:50:53 +010017827echo "$as_me:17827: checking if poll really works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017828echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17829if test "${cf_cv_working_poll+set}" = set; then
17830 echo $ECHO_N "(cached) $ECHO_C" >&6
17831else
17832
17833if test "$cross_compiling" = yes; then
17834 cf_cv_working_poll=unknown
17835else
17836 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017837#line 17837 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017838#include "confdefs.h"
17839
Steve Kondikae271bc2015-11-15 02:50:53 +010017840#include <stdlib.h>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017841#include <stdio.h>
Steve Kondikae271bc2015-11-15 02:50:53 +010017842#include <unistd.h>
17843#include <fcntl.h>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017844#ifdef HAVE_POLL_H
17845#include <poll.h>
17846#else
17847#include <sys/poll.h>
17848#endif
17849int main() {
17850 struct pollfd myfds;
17851 int ret;
17852
Steve Kondikae271bc2015-11-15 02:50:53 +010017853 /* 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;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017857 myfds.events = POLLIN;
Steve Kondikae271bc2015-11-15 02:50:53 +010017858 myfds.revents = 0;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017859
17860 ret = poll(&myfds, 1, 100);
Steve Kondikae271bc2015-11-15 02:50:53 +010017861
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 */
17868 }
17869
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;
17878 }
17879 }
17880 ${cf_cv_main_return:-return}(ret < 0);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017881}
17882_ACEOF
17883rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010017884if { (eval echo "$as_me:17884: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017885 (eval $ac_link) 2>&5
17886 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017887 echo "$as_me:17887: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010017889 { (eval echo "$as_me:17889: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017890 (eval $ac_try) 2>&5
17891 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010017892 echo "$as_me:17892: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017893 (exit $ac_status); }; }; then
17894 cf_cv_working_poll=yes
17895else
17896 echo "$as_me: program exited with status $ac_status" >&5
17897echo "$as_me: failed program was:" >&5
17898cat conftest.$ac_ext >&5
17899cf_cv_working_poll=no
17900fi
17901rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17902fi
17903fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017904echo "$as_me:17904: result: $cf_cv_working_poll" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017905echo "${ECHO_T}$cf_cv_working_poll" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010017906test "$cf_cv_working_poll" = "yes" &&
17907cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053017908#define HAVE_WORKING_POLL 1
17909EOF
17910
Steve Kondikae271bc2015-11-15 02:50:53 +010017911echo "$as_me:17911: checking for va_copy" >&5
17912echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17913if test "${cf_cv_have_va_copy+set}" = set; then
17914 echo $ECHO_N "(cached) $ECHO_C" >&6
17915else
17916
17917cat >conftest.$ac_ext <<_ACEOF
17918#line 17918 "configure"
17919#include "confdefs.h"
17920
17921#include <stdarg.h>
17922
17923int
17924main ()
17925{
17926
17927 static va_list dst;
17928 static va_list src;
17929 va_copy(dst, src)
17930 ;
17931 return 0;
17932}
17933_ACEOF
17934rm -f conftest.$ac_objext conftest$ac_exeext
17935if { (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
17947else
17948 echo "$as_me: failed program was:" >&5
17949cat conftest.$ac_ext >&5
17950cf_cv_have_va_copy=no
17951fi
17952rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17953fi
17954echo "$as_me:17954: result: $cf_cv_have_va_copy" >&5
17955echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17956
17957test "$cf_cv_have_va_copy" = yes &&
17958cat >>confdefs.h <<\EOF
17959#define HAVE_VA_COPY 1
17960EOF
17961
17962echo "$as_me:17962: checking for __va_copy" >&5
17963echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17964if test "${cf_cv_have___va_copy+set}" = set; then
17965 echo $ECHO_N "(cached) $ECHO_C" >&6
17966else
17967
17968cat >conftest.$ac_ext <<_ACEOF
17969#line 17969 "configure"
17970#include "confdefs.h"
17971
17972#include <stdarg.h>
17973
17974int
17975main ()
17976{
17977
17978 static va_list dst;
17979 static va_list src;
17980 __va_copy(dst, src)
17981 ;
17982 return 0;
17983}
17984_ACEOF
17985rm -f conftest.$ac_objext conftest$ac_exeext
17986if { (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
17998else
17999 echo "$as_me: failed program was:" >&5
18000cat conftest.$ac_ext >&5
18001cf_cv_have___va_copy=no
18002fi
18003rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18004fi
18005echo "$as_me:18005: result: $cf_cv_have___va_copy" >&5
18006echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18007
18008test "$cf_cv_have___va_copy" = yes &&
18009cat >>confdefs.h <<\EOF
18010#define HAVE___VA_COPY 1
18011EOF
18012
18013echo "$as_me:18013: checking for pid_t" >&5
18014echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18015if test "${ac_cv_type_pid_t+set}" = set; then
18016 echo $ECHO_N "(cached) $ECHO_C" >&6
18017else
18018 cat >conftest.$ac_ext <<_ACEOF
18019#line 18019 "configure"
18020#include "confdefs.h"
18021$ac_includes_default
18022int
18023main ()
18024{
18025if ((pid_t *) 0)
18026 return 0;
18027if (sizeof (pid_t))
18028 return 0;
18029 ;
18030 return 0;
18031}
18032_ACEOF
18033rm -f conftest.$ac_objext
18034if { (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
18046else
18047 echo "$as_me: failed program was:" >&5
18048cat conftest.$ac_ext >&5
18049ac_cv_type_pid_t=no
18050fi
18051rm -f conftest.$ac_objext conftest.$ac_ext
18052fi
18053echo "$as_me:18053: result: $ac_cv_type_pid_t" >&5
18054echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18055if test $ac_cv_type_pid_t = yes; then
18056 :
18057else
18058
18059cat >>confdefs.h <<EOF
18060#define pid_t int
18061EOF
18062
18063fi
18064
18065for ac_header in unistd.h vfork.h
18066do
18067as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18068echo "$as_me:18068: checking for $ac_header" >&5
18069echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18070if eval "test \"\${$as_ac_Header+set}\" = set"; then
18071 echo $ECHO_N "(cached) $ECHO_C" >&6
18072else
18073 cat >conftest.$ac_ext <<_ACEOF
18074#line 18074 "configure"
18075#include "confdefs.h"
18076#include <$ac_header>
18077_ACEOF
18078if { (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=
18090 fi
18091else
18092 ac_cpp_err=yes
18093fi
18094if test -z "$ac_cpp_err"; then
18095 eval "$as_ac_Header=yes"
18096else
18097 echo "$as_me: failed program was:" >&5
18098 cat conftest.$ac_ext >&5
18099 eval "$as_ac_Header=no"
18100fi
18101rm -f conftest.err conftest.$ac_ext
18102fi
18103echo "$as_me:18103: result: `eval echo '${'$as_ac_Header'}'`" >&5
18104echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18105if test `eval echo '${'$as_ac_Header'}'` = yes; then
18106 cat >>confdefs.h <<EOF
18107#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18108EOF
18109
18110fi
18111done
18112
18113for ac_func in fork vfork
18114do
18115as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18116echo "$as_me:18116: checking for $ac_func" >&5
18117echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18118if eval "test \"\${$as_ac_var+set}\" = set"; then
18119 echo $ECHO_N "(cached) $ECHO_C" >&6
18120else
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
18129extern "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. */
18133char $ac_func ();
18134char (*f) ();
18135
18136int
18137main ()
18138{
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)
18143choke me
18144#else
18145f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18146#endif
18147
18148 ;
18149 return 0;
18150}
18151_ACEOF
18152rm -f conftest.$ac_objext conftest$ac_exeext
18153if { (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"
18165else
18166 echo "$as_me: failed program was:" >&5
18167cat conftest.$ac_ext >&5
18168eval "$as_ac_var=no"
18169fi
18170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18171fi
18172echo "$as_me:18172: result: `eval echo '${'$as_ac_var'}'`" >&5
18173echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18174if test `eval echo '${'$as_ac_var'}'` = yes; then
18175 cat >>confdefs.h <<EOF
18176#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18177EOF
18178
18179fi
18180done
18181
18182ac_cv_func_fork_works=$ac_cv_func_fork
18183if test "x$ac_cv_func_fork" = xyes; then
18184 echo "$as_me:18184: checking for working fork" >&5
18185echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18186if test "${ac_cv_func_fork_works+set}" = set; then
18187 echo $ECHO_N "(cached) $ECHO_C" >&6
18188else
18189 if test "$cross_compiling" = yes; then
18190 ac_cv_func_fork_works=cross
18191else
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 ()
18200 {
18201 if (fork() < 0)
18202 $ac_main_return (1);
18203 $ac_main_return (0);
18204 }
18205_ACEOF
18206rm -f conftest$ac_exeext
18207if { (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
18218else
18219 echo "$as_me: program exited with status $ac_status" >&5
18220echo "$as_me: failed program was:" >&5
18221cat conftest.$ac_ext >&5
18222ac_cv_func_fork_works=no
18223fi
18224rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18225fi
18226fi
18227echo "$as_me:18227: result: $ac_cv_func_fork_works" >&5
18228echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18229
18230fi
18231if 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
18236 ;;
18237 *)
18238 ac_cv_func_fork_works=yes
18239 ;;
18240 esac
18241 { echo "$as_me:18241: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18242echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18243fi
18244ac_cv_func_vfork_works=$ac_cv_func_vfork
18245if test "x$ac_cv_func_vfork" = xyes; then
18246 echo "$as_me:18246: checking for working vfork" >&5
18247echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18248if test "${ac_cv_func_vfork_works+set}" = set; then
18249 echo $ECHO_N "(cached) $ECHO_C" >&6
18250else
18251 if test "$cross_compiling" = yes; then
18252 ac_cv_func_vfork_works=cross
18253else
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. */
18273static
18274#ifdef __cplusplus
18275sparc_address_test (int arg)
18276# else
18277sparc_address_test (arg) int arg;
18278#endif
18279{
18280 static pid_t child;
18281 if (!child) {
18282 child = vfork ();
18283 if (child < 0) {
18284 perror ("vfork");
18285 _exit(2);
18286 }
18287 if (!child) {
18288 arg = getpid();
18289 write(-1, "", 0);
18290 _exit (arg);
18291 }
18292 }
18293}
18294
18295int
18296main ()
18297{
18298 pid_t parent = getpid ();
18299 pid_t child;
18300
18301 sparc_address_test ();
18302
18303 child = vfork ();
18304
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);
18323
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;
18332
18333 while (wait(&status) != child)
18334 ;
18335 $ac_main_return(
18336 /* Was there some problem with vforking? */
18337 child < 0
18338
18339 /* Did the child fail? (This shouldn't happen.) */
18340 || status
18341
18342 /* Did the vfork/compiler bug occur? */
18343 || parent != getpid()
18344
18345 /* Did the file descriptor bug occur? */
18346 || fstat(fileno(stdout), &st) != 0
18347 );
18348 }
18349}
18350_ACEOF
18351rm -f conftest$ac_exeext
18352if { (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
18363else
18364 echo "$as_me: program exited with status $ac_status" >&5
18365echo "$as_me: failed program was:" >&5
18366cat conftest.$ac_ext >&5
18367ac_cv_func_vfork_works=no
18368fi
18369rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18370fi
18371fi
18372echo "$as_me:18372: result: $ac_cv_func_vfork_works" >&5
18373echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18374
18375fi;
18376if 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
18379echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18380fi
18381
18382if test "x$ac_cv_func_vfork_works" = xyes; then
18383
18384cat >>confdefs.h <<\EOF
18385#define HAVE_WORKING_VFORK 1
18386EOF
18387
18388else
18389
18390cat >>confdefs.h <<\EOF
18391#define vfork fork
18392EOF
18393
18394fi
18395if test "x$ac_cv_func_fork_works" = xyes; then
18396
18397cat >>confdefs.h <<\EOF
18398#define HAVE_WORKING_FORK 1
18399EOF
18400
18401fi
18402
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018403# special check for test/ditto.c
18404
Steve Kondikae271bc2015-11-15 02:50:53 +010018405echo "$as_me:18405: checking for openpty in -lutil" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018406echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18407if test "${ac_cv_lib_util_openpty+set}" = set; then
18408 echo $ECHO_N "(cached) $ECHO_C" >&6
18409else
18410 ac_check_lib_save_LIBS=$LIBS
18411LIBS="-lutil $LIBS"
18412cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010018413#line 18413 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018414#include "confdefs.h"
18415
18416/* Override any gcc2 internal prototype to avoid an error. */
18417#ifdef __cplusplus
18418extern "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. */
18422char openpty ();
18423int
18424main ()
18425{
18426openpty ();
18427 ;
18428 return 0;
18429}
18430_ACEOF
18431rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010018432if { (eval echo "$as_me:18432: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018433 (eval $ac_link) 2>&5
18434 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018435 echo "$as_me:18435: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018436 (exit $ac_status); } &&
18437 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010018438 { (eval echo "$as_me:18438: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018439 (eval $ac_try) 2>&5
18440 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018441 echo "$as_me:18441: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018442 (exit $ac_status); }; }; then
18443 ac_cv_lib_util_openpty=yes
18444else
18445 echo "$as_me: failed program was:" >&5
18446cat conftest.$ac_ext >&5
18447ac_cv_lib_util_openpty=no
18448fi
18449rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18450LIBS=$ac_check_lib_save_LIBS
18451fi
Steve Kondikae271bc2015-11-15 02:50:53 +010018452echo "$as_me:18452: result: $ac_cv_lib_util_openpty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018453echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18454if test $ac_cv_lib_util_openpty = yes; then
18455 cf_cv_lib_util=yes
18456else
18457 cf_cv_lib_util=no
18458fi
18459
Steve Kondikae271bc2015-11-15 02:50:53 +010018460echo "$as_me:18460: checking for openpty header" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018461echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18462if test "${cf_cv_func_openpty+set}" = set; then
18463 echo $ECHO_N "(cached) $ECHO_C" >&6
18464else
18465
Steve Kondikae271bc2015-11-15 02:50:53 +010018466 cf_save_LIBS="$LIBS"
18467 test $cf_cv_lib_util = yes &&
18468cf_add_libs="-lutil"
18469# Filter out duplicates - this happens with badly-designed ".pc" files...
18470for cf_add_1lib in $LIBS
18471do
18472 for cf_add_2lib in $cf_add_libs
18473 do
18474 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18475 then
18476 cf_add_1lib=
18477 break
18478 fi
18479 done
18480 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18481done
18482LIBS="$cf_add_libs"
18483
18484 for cf_header in pty.h libutil.h util.h
18485 do
18486 cat >conftest.$ac_ext <<_ACEOF
18487#line 18487 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018488#include "confdefs.h"
18489
18490#include <$cf_header>
18491
18492int
18493main ()
18494{
18495
Steve Kondikae271bc2015-11-15 02:50:53 +010018496 int x = openpty((int *)0, (int *)0, (char *)0,
18497 (struct termios *)0, (struct winsize *)0);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018498
18499 ;
18500 return 0;
18501}
18502_ACEOF
18503rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010018504if { (eval echo "$as_me:18504: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018505 (eval $ac_link) 2>&5
18506 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018507 echo "$as_me:18507: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018508 (exit $ac_status); } &&
18509 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010018510 { (eval echo "$as_me:18510: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018511 (eval $ac_try) 2>&5
18512 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018513 echo "$as_me:18513: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018514 (exit $ac_status); }; }; then
18515
Steve Kondikae271bc2015-11-15 02:50:53 +010018516 cf_cv_func_openpty=$cf_header
18517 break
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018518
18519else
18520 echo "$as_me: failed program was:" >&5
18521cat conftest.$ac_ext >&5
18522
Steve Kondikae271bc2015-11-15 02:50:53 +010018523 cf_cv_func_openpty=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018524
18525fi
18526rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Steve Kondikae271bc2015-11-15 02:50:53 +010018527 done
18528 LIBS="$cf_save_LIBS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018529
18530fi
Steve Kondikae271bc2015-11-15 02:50:53 +010018531echo "$as_me:18531: result: $cf_cv_func_openpty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018532echo "${ECHO_T}$cf_cv_func_openpty" >&6
18533
18534if test "$cf_cv_func_openpty" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018535
18536cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018537#define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18538EOF
18539
Steve Kondikae271bc2015-11-15 02:50:53 +010018540cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018541#define USE_XTERM_PTY 1
18542EOF
18543
Steve Kondikae271bc2015-11-15 02:50:53 +010018544 if test "x$cf_cv_lib_util" = xyes ; then
18545
18546cf_add_libs="-lutil"
18547# Filter out duplicates - this happens with badly-designed ".pc" files...
18548for cf_add_1lib in $TEST_LIBS
18549do
18550 for cf_add_2lib in $cf_add_libs
18551 do
18552 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18553 then
18554 cf_add_1lib=
18555 break
18556 fi
18557 done
18558 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18559done
18560TEST_LIBS="$cf_add_libs"
18561
18562 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018563fi
18564
18565if test "$with_hashed_db" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018566
18567cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018568#define USE_HASHED_DB 1
18569EOF
18570
Steve Kondikae271bc2015-11-15 02:50:53 +010018571case $with_hashed_db in
18572(yes|*able*)
18573 ;;
18574(*)
18575 if test -d "$with_hashed_db" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018576
18577if test -n "$with_hashed_db/include" ; then
18578 for cf_add_incdir in $with_hashed_db/include
18579 do
18580 while test $cf_add_incdir != /usr/include
18581 do
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
18590 fi
18591 done
18592 fi
18593
18594 if test "$cf_have_incdir" = no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018595 if test "$cf_add_incdir" = /usr/local/include ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018596 if test "$GCC" = yes
18597 then
18598 cf_save_CPPFLAGS=$CPPFLAGS
18599 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18600 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010018601#line 18601 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018602#include "confdefs.h"
18603#include <stdio.h>
18604int
18605main ()
18606{
18607printf("Hello")
18608 ;
18609 return 0;
18610}
18611_ACEOF
18612rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010018613if { (eval echo "$as_me:18613: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018614 (eval $ac_compile) 2>&5
18615 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018616 echo "$as_me:18616: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018617 (exit $ac_status); } &&
18618 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010018619 { (eval echo "$as_me:18619: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018620 (eval $ac_try) 2>&5
18621 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018622 echo "$as_me:18622: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018623 (exit $ac_status); }; }; then
18624 :
18625else
18626 echo "$as_me: failed program was:" >&5
18627cat conftest.$ac_ext >&5
18628cf_have_incdir=yes
18629fi
18630rm -f conftest.$ac_objext conftest.$ac_ext
18631 CPPFLAGS=$cf_save_CPPFLAGS
18632 fi
18633 fi
18634 fi
18635
18636 if test "$cf_have_incdir" = no ; then
18637 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18638
Steve Kondikae271bc2015-11-15 02:50:53 +010018639echo "${as_me:-configure}:18639: testing adding $cf_add_incdir to include-path ..." 1>&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018640
Steve Kondikae271bc2015-11-15 02:50:53 +010018641 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018642
Steve Kondikae271bc2015-11-15 02:50:53 +010018643 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"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018646 else
18647 break
18648 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010018649 else
18650 break
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018651 fi
18652 done
18653 done
18654fi
18655
18656if test -n "$with_hashed_db/lib" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018657 for cf_add_libdir in $with_hashed_db/lib
18658 do
18659 if test $cf_add_libdir = /usr/lib ; then
18660 :
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
18669 fi
18670 done
18671 fi
18672 if test "$cf_have_libdir" = no ; then
18673 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
18674
18675echo "${as_me:-configure}:18675: testing adding $cf_add_libdir to library-path ..." 1>&5
18676
18677 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18678 fi
18679 fi
18680 done
18681fi
18682
18683 else
18684 case "$with_hashed_db" in
18685 (./*|../*|/*)
18686 { echo "$as_me:18686: WARNING: no such directory $with_hashed_db" >&5
18687echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18688 ;;
18689 (*)
18690
18691cf_search=
18692
18693test "x$prefix" != "xNONE" && \
18694test -d "$prefix" && \
18695 {
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"
18702}
18703
18704for cf_subdir_prefix in \
18705 /usr \
18706 /usr/local \
18707 /usr/pkg \
18708 /opt \
18709 /opt/local \
18710 $HOME
18711do
18712
18713test "x$cf_subdir_prefix" != "x$prefix" && \
18714test -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"
18722}
18723
18724done
18725
18726 for cf_item in $cf_search
18727 do
18728 case $cf_item in
18729 (*/$with_hashed_db)
18730
18731if test -n "$cf_item" ; then
18732 for cf_add_incdir in $cf_item
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018733 do
Steve Kondikae271bc2015-11-15 02:50:53 +010018734 while test $cf_add_incdir != /usr/include
18735 do
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
18744 fi
18745 done
18746 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018747
Steve Kondikae271bc2015-11-15 02:50:53 +010018748 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>
18758int
18759main ()
18760{
18761printf("Hello")
18762 ;
18763 return 0;
18764}
18765_ACEOF
18766rm -f conftest.$ac_objext
18767if { (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
18778 :
18779else
18780 echo "$as_me: failed program was:" >&5
18781cat conftest.$ac_ext >&5
18782cf_have_incdir=yes
18783fi
18784rm -f conftest.$ac_objext conftest.$ac_ext
18785 CPPFLAGS=$cf_save_CPPFLAGS
18786 fi
18787 fi
18788 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018789
Steve Kondikae271bc2015-11-15 02:50:53 +010018790 if test "$cf_have_incdir" = no ; then
18791 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18792
18793echo "${as_me:-configure}:18793: testing adding $cf_add_incdir to include-path ..." 1>&5
18794
18795 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18796
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
18802 fi
18803 else
18804 break
18805 fi
18806 done
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018807 done
18808fi
18809
Steve Kondikae271bc2015-11-15 02:50:53 +010018810 ;;
18811 esac
18812 done
18813
18814cf_search=
18815
18816test "x$prefix" != "xNONE" && \
18817test -d "$prefix" && \
18818 {
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"
18825}
18826
18827for cf_subdir_prefix in \
18828 /usr \
18829 /usr/local \
18830 /usr/pkg \
18831 /opt \
18832 /opt/local \
18833 $HOME
18834do
18835
18836test "x$cf_subdir_prefix" != "x$prefix" && \
18837test -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"
18845}
18846
18847done
18848
18849 for cf_item in $cf_search
18850 do
18851 case $cf_item in
18852 (*/$with_hashed_db)
18853
18854if test -n "$cf_item" ; then
18855 for cf_add_libdir in $cf_item
18856 do
18857 if test $cf_add_libdir = /usr/lib ; then
18858 :
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
18867 fi
18868 done
18869 fi
18870 if test "$cf_have_libdir" = no ; then
18871 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
18872
18873echo "${as_me:-configure}:18873: testing adding $cf_add_libdir to library-path ..." 1>&5
18874
18875 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18876 fi
18877 fi
18878 done
18879fi
18880
18881 ;;
18882 esac
18883 done
18884
18885 ;;
18886 esac
18887 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018888esac
18889
Steve Kondikae271bc2015-11-15 02:50:53 +010018890echo "$as_me:18890: checking for db.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018891echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18892if test "${ac_cv_header_db_h+set}" = set; then
18893 echo $ECHO_N "(cached) $ECHO_C" >&6
18894else
18895 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010018896#line 18896 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018897#include "confdefs.h"
18898#include <db.h>
18899_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010018900if { (eval echo "$as_me:18900: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018901 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010018906 echo "$as_me:18906: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018907 (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=
18912 fi
18913else
18914 ac_cpp_err=yes
18915fi
18916if test -z "$ac_cpp_err"; then
18917 ac_cv_header_db_h=yes
18918else
18919 echo "$as_me: failed program was:" >&5
18920 cat conftest.$ac_ext >&5
18921 ac_cv_header_db_h=no
18922fi
18923rm -f conftest.err conftest.$ac_ext
18924fi
Steve Kondikae271bc2015-11-15 02:50:53 +010018925echo "$as_me:18925: result: $ac_cv_header_db_h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018926echo "${ECHO_T}$ac_cv_header_db_h" >&6
18927if test $ac_cv_header_db_h = yes; then
18928
Steve Kondikae271bc2015-11-15 02:50:53 +010018929echo "$as_me:18929: checking for version of db" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018930echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18931if test "${cf_cv_hashed_db_version+set}" = set; then
18932 echo $ECHO_N "(cached) $ECHO_C" >&6
18933else
18934
18935cf_cv_hashed_db_version=unknown
18936
Steve Kondikae271bc2015-11-15 02:50:53 +010018937for cf_db_version in 1 2 3 4 5 6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018938do
18939
Steve Kondikae271bc2015-11-15 02:50:53 +010018940echo "${as_me:-configure}:18940: testing checking for db version $cf_db_version ..." 1>&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018941
18942 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010018943#line 18943 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018944#include "confdefs.h"
18945
18946$ac_includes_default
18947#include <db.h>
18948
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
18963
18964int
18965main ()
18966{
18967DBT *foo = 0
18968 ;
18969 return 0;
18970}
18971_ACEOF
18972rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010018973if { (eval echo "$as_me:18973: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018974 (eval $ac_compile) 2>&5
18975 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018976 echo "$as_me:18976: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018977 (exit $ac_status); } &&
18978 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010018979 { (eval echo "$as_me:18979: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018980 (eval $ac_try) 2>&5
18981 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010018982 echo "$as_me:18982: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018983 (exit $ac_status); }; }; then
18984
18985 cf_cv_hashed_db_version=$cf_db_version
18986 break
18987
18988else
18989 echo "$as_me: failed program was:" >&5
18990cat conftest.$ac_ext >&5
18991fi
18992rm -f conftest.$ac_objext conftest.$ac_ext
18993done
18994
18995fi
Steve Kondikae271bc2015-11-15 02:50:53 +010018996echo "$as_me:18996: result: $cf_cv_hashed_db_version" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053018997echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18998
18999if test "$cf_cv_hashed_db_version" = unknown ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019000 { { echo "$as_me:19000: error: Cannot determine version of db" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019001echo "$as_me: error: Cannot determine version of db" >&2;}
19002 { (exit 1); exit 1; }; }
19003else
19004
Steve Kondikae271bc2015-11-15 02:50:53 +010019005echo "$as_me:19005: checking for db libraries" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019006echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19007if test "${cf_cv_hashed_db_libs+set}" = set; then
19008 echo $ECHO_N "(cached) $ECHO_C" >&6
19009else
19010
19011cf_cv_hashed_db_libs=unknown
19012for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19013do
19014 cf_save_libs="$LIBS"
19015 if test -n "$cf_db_libs"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019016
19017cf_add_libs="-l$cf_db_libs"
19018# Filter out duplicates - this happens with badly-designed ".pc" files...
19019for cf_add_1lib in $LIBS
19020do
19021 for cf_add_2lib in $cf_add_libs
19022 do
19023 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19024 then
19025 cf_add_1lib=
19026 break
19027 fi
19028 done
19029 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19030done
19031LIBS="$cf_add_libs"
19032
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019033 fi
19034
Steve Kondikae271bc2015-11-15 02:50:53 +010019035echo "${as_me:-configure}:19035: testing checking for library "$cf_db_libs" ..." 1>&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019036
19037 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019038#line 19038 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019039#include "confdefs.h"
19040
19041$ac_includes_default
19042#include <db.h>
19043
19044int
19045main ()
19046{
19047
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,
19081 2,
19082 0644,
19083 DB_HASH,
19084 0);
19085#endif
19086 ${cf_cv_main_return:-return}(result != 0)
19087
19088 ;
19089 return 0;
19090}
19091_ACEOF
19092rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010019093if { (eval echo "$as_me:19093: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019094 (eval $ac_link) 2>&5
19095 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019096 echo "$as_me:19096: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019097 (exit $ac_status); } &&
19098 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019099 { (eval echo "$as_me:19099: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019100 (eval $ac_try) 2>&5
19101 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019102 echo "$as_me:19102: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019103 (exit $ac_status); }; }; then
19104
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
19109 fi
19110 LIBS="$cf_save_libs"
19111 break
19112
19113else
19114 echo "$as_me: failed program was:" >&5
19115cat conftest.$ac_ext >&5
19116fi
19117rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19118 LIBS="$cf_save_libs"
19119done
19120
19121fi
Steve Kondikae271bc2015-11-15 02:50:53 +010019122echo "$as_me:19122: result: $cf_cv_hashed_db_libs" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019123echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19124
19125 if test "$cf_cv_hashed_db_libs" = unknown ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019126 { { echo "$as_me:19126: error: Cannot determine library for db" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019127echo "$as_me: error: Cannot determine library for db" >&2;}
19128 { (exit 1); exit 1; }; }
19129 elif test "$cf_cv_hashed_db_libs" != default ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019130
19131cf_add_libs="-l$cf_cv_hashed_db_libs"
19132# Filter out duplicates - this happens with badly-designed ".pc" files...
19133for cf_add_1lib in $LIBS
19134do
19135 for cf_add_2lib in $cf_add_libs
19136 do
19137 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19138 then
19139 cf_add_1lib=
19140 break
19141 fi
19142 done
19143 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19144done
19145LIBS="$cf_add_libs"
19146
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019147 fi
19148fi
19149
19150else
19151
Steve Kondikae271bc2015-11-15 02:50:53 +010019152 { { echo "$as_me:19152: error: Cannot find db.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019153echo "$as_me: error: Cannot find db.h" >&2;}
19154 { (exit 1); exit 1; }; }
19155
19156fi
19157
19158fi
19159
19160if 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$%%'`
19163fi
19164
19165# Just in case, check if the C compiler has a bool type.
19166
Steve Kondikae271bc2015-11-15 02:50:53 +010019167echo "$as_me:19167: checking if we should include stdbool.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019168echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19169
19170if test "${cf_cv_header_stdbool_h+set}" = set; then
19171 echo $ECHO_N "(cached) $ECHO_C" >&6
19172else
19173
19174 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019175#line 19175 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019176#include "confdefs.h"
19177
19178int
19179main ()
19180{
19181bool foo = false
19182 ;
19183 return 0;
19184}
19185_ACEOF
19186rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010019187if { (eval echo "$as_me:19187: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019188 (eval $ac_compile) 2>&5
19189 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019190 echo "$as_me:19190: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019191 (exit $ac_status); } &&
19192 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019193 { (eval echo "$as_me:19193: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019194 (eval $ac_try) 2>&5
19195 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019196 echo "$as_me:19196: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019197 (exit $ac_status); }; }; then
19198 cf_cv_header_stdbool_h=0
19199else
19200 echo "$as_me: failed program was:" >&5
19201cat conftest.$ac_ext >&5
19202cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019203#line 19203 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019204#include "confdefs.h"
19205
19206#ifndef __BEOS__
19207#include <stdbool.h>
19208#endif
19209
19210int
19211main ()
19212{
19213bool foo = false
19214 ;
19215 return 0;
19216}
19217_ACEOF
19218rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010019219if { (eval echo "$as_me:19219: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019220 (eval $ac_compile) 2>&5
19221 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019222 echo "$as_me:19222: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019223 (exit $ac_status); } &&
19224 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019225 { (eval echo "$as_me:19225: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019226 (eval $ac_try) 2>&5
19227 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019228 echo "$as_me:19228: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019229 (exit $ac_status); }; }; then
19230 cf_cv_header_stdbool_h=1
19231else
19232 echo "$as_me: failed program was:" >&5
19233cat conftest.$ac_ext >&5
19234cf_cv_header_stdbool_h=0
19235fi
19236rm -f conftest.$ac_objext conftest.$ac_ext
19237fi
19238rm -f conftest.$ac_objext conftest.$ac_ext
19239fi
19240
19241if test "$cf_cv_header_stdbool_h" = 1
Steve Kondikae271bc2015-11-15 02:50:53 +010019242then echo "$as_me:19242: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019243echo "${ECHO_T}yes" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010019244else echo "$as_me:19244: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019245echo "${ECHO_T}no" >&6
19246fi
19247
Steve Kondikae271bc2015-11-15 02:50:53 +010019248echo "$as_me:19248: checking for builtin bool type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019249echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19250
19251if test "${cf_cv_cc_bool_type+set}" = set; then
19252 echo $ECHO_N "(cached) $ECHO_C" >&6
19253else
19254
19255 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019256#line 19256 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019257#include "confdefs.h"
19258
19259#include <stdio.h>
19260#include <sys/types.h>
19261
19262int
19263main ()
19264{
19265bool x = false
19266 ;
19267 return 0;
19268}
19269_ACEOF
19270rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010019271if { (eval echo "$as_me:19271: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019272 (eval $ac_compile) 2>&5
19273 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019274 echo "$as_me:19274: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019275 (exit $ac_status); } &&
19276 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019277 { (eval echo "$as_me:19277: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019278 (eval $ac_try) 2>&5
19279 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019280 echo "$as_me:19280: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019281 (exit $ac_status); }; }; then
19282 cf_cv_cc_bool_type=1
19283else
19284 echo "$as_me: failed program was:" >&5
19285cat conftest.$ac_ext >&5
19286cf_cv_cc_bool_type=0
19287fi
19288rm -f conftest.$ac_objext conftest.$ac_ext
19289
19290fi
19291
19292if test "$cf_cv_cc_bool_type" = 1
Steve Kondikae271bc2015-11-15 02:50:53 +010019293then echo "$as_me:19293: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019294echo "${ECHO_T}yes" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010019295else echo "$as_me:19295: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019296echo "${ECHO_T}no" >&6
19297fi
19298
19299# Check for C++ compiler characteristics (and ensure that it's there!)
19300if test -n "$CXX" ; then
19301 ac_ext=cc
19302ac_cpp='$CXXCPP $CPPFLAGS'
19303ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19304ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19305ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19306ac_main_return=return
19307
19308if test -n "$GXX" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019309case $cf_cv_system_name in
19310(os2*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019311 cf_stdcpp_libname=stdcpp
19312 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010019313(*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019314 cf_stdcpp_libname=stdc++
19315 ;;
19316esac
Steve Kondikae271bc2015-11-15 02:50:53 +010019317echo "$as_me:19317: checking for library $cf_stdcpp_libname" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019318echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19319if test "${cf_cv_libstdcpp+set}" = set; then
19320 echo $ECHO_N "(cached) $ECHO_C" >&6
19321else
19322
19323 cf_save="$LIBS"
Steve Kondikae271bc2015-11-15 02:50:53 +010019324
19325cf_add_libs="-l$cf_stdcpp_libname"
19326# Filter out duplicates - this happens with badly-designed ".pc" files...
19327for cf_add_1lib in $LIBS
19328do
19329 for cf_add_2lib in $cf_add_libs
19330 do
19331 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19332 then
19333 cf_add_1lib=
19334 break
19335 fi
19336 done
19337 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19338done
19339LIBS="$cf_add_libs"
19340
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019341cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019342#line 19342 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019343#include "confdefs.h"
19344
19345#include <strstream.h>
19346int
19347main ()
19348{
19349
19350char buf[80];
19351strstreambuf foo(buf, sizeof(buf))
19352
19353 ;
19354 return 0;
19355}
19356_ACEOF
19357rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010019358if { (eval echo "$as_me:19358: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019359 (eval $ac_link) 2>&5
19360 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019361 echo "$as_me:19361: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019362 (exit $ac_status); } &&
19363 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019364 { (eval echo "$as_me:19364: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019365 (eval $ac_try) 2>&5
19366 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019367 echo "$as_me:19367: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019368 (exit $ac_status); }; }; then
19369 cf_cv_libstdcpp=yes
19370else
19371 echo "$as_me: failed program was:" >&5
19372cat conftest.$ac_ext >&5
19373cf_cv_libstdcpp=no
19374fi
19375rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19376 LIBS="$cf_save"
19377
19378fi
Steve Kondikae271bc2015-11-15 02:50:53 +010019379echo "$as_me:19379: result: $cf_cv_libstdcpp" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019380echo "${ECHO_T}$cf_cv_libstdcpp" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010019381test "$cf_cv_libstdcpp" = yes &&
19382cf_add_libs="-l$cf_stdcpp_libname"
19383# Filter out duplicates - this happens with badly-designed ".pc" files...
19384for cf_add_1lib in $CXXLIBS
19385do
19386 for cf_add_2lib in $cf_add_libs
19387 do
19388 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19389 then
19390 cf_add_1lib=
19391 break
19392 fi
19393 done
19394 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19395done
19396CXXLIBS="$cf_add_libs"
19397
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019398fi
19399
Steve Kondikae271bc2015-11-15 02:50:53 +010019400 echo "$as_me:19400: checking whether $CXX understands -c and -o together" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019401echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19402if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19403 echo $ECHO_N "(cached) $ECHO_C" >&6
19404else
19405
19406cat > conftest.$ac_ext <<CF_EOF
19407#include <stdio.h>
19408int main()
19409{
19410 ${cf_cv_main_return:-return}(0);
19411}
19412CF_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.
19415ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +010019416if { (eval echo "$as_me:19416: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019417 (eval $ac_try) 2>&5
19418 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019419 echo "$as_me:19419: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019420 (exit $ac_status); } &&
Steve Kondikae271bc2015-11-15 02:50:53 +010019421 test -f conftest2.$ac_objext && { (eval echo "$as_me:19421: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019422 (eval $ac_try) 2>&5
19423 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019424 echo "$as_me:19424: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019425 (exit $ac_status); };
19426then
19427 eval cf_cv_prog_CXX_c_o=yes
19428else
19429 eval cf_cv_prog_CXX_c_o=no
19430fi
Steve Kondikae271bc2015-11-15 02:50:53 +010019431rm -rf conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019432
19433fi
19434if test $cf_cv_prog_CXX_c_o = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019435 echo "$as_me:19435: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019436echo "${ECHO_T}yes" >&6
19437else
Steve Kondikae271bc2015-11-15 02:50:53 +010019438 echo "$as_me:19438: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019439echo "${ECHO_T}no" >&6
19440fi
19441
19442 case $GXX_VERSION in
Steve Kondikae271bc2015-11-15 02:50:53 +010019443 (1*|2.0-6*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019444 cf_cxx_library=yes
19445 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010019446 (*-2.7*|2.7*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019447
19448cf_cxx_library=unknown
Steve Kondikae271bc2015-11-15 02:50:53 +010019449case $cf_cv_system_name in
19450(os2*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019451 cf_gpp_libname=gpp
19452 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010019453(*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019454 cf_gpp_libname=g++
19455 ;;
19456esac
19457if test "$GXX" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019458 echo "$as_me:19458: checking for lib$cf_gpp_libname" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019459echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19460 cf_save="$LIBS"
Steve Kondikae271bc2015-11-15 02:50:53 +010019461
19462cf_add_libs="-l$cf_gpp_libname"
19463# Filter out duplicates - this happens with badly-designed ".pc" files...
19464for cf_add_1lib in $LIBS
19465do
19466 for cf_add_2lib in $cf_add_libs
19467 do
19468 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19469 then
19470 cf_add_1lib=
19471 break
19472 fi
19473 done
19474 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19475done
19476LIBS="$cf_add_libs"
19477
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019478 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019479#line 19479 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019480#include "confdefs.h"
19481
19482#include <$cf_gpp_libname/builtin.h>
19483
19484int
19485main ()
19486{
19487two_arg_error_handler_t foo2 = lib_error_handler
19488 ;
19489 return 0;
19490}
19491_ACEOF
19492rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010019493if { (eval echo "$as_me:19493: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019494 (eval $ac_link) 2>&5
19495 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019496 echo "$as_me:19496: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019497 (exit $ac_status); } &&
19498 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019499 { (eval echo "$as_me:19499: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019500 (eval $ac_try) 2>&5
19501 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019502 echo "$as_me:19502: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019503 (exit $ac_status); }; }; then
19504 cf_cxx_library=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010019505
19506cf_add_libs="-l$cf_gpp_libname"
19507# Filter out duplicates - this happens with badly-designed ".pc" files...
19508for cf_add_1lib in $CXXLIBS
19509do
19510 for cf_add_2lib in $cf_add_libs
19511 do
19512 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19513 then
19514 cf_add_1lib=
19515 break
19516 fi
19517 done
19518 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19519done
19520CXXLIBS="$cf_add_libs"
19521
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019522 if test "$cf_gpp_libname" = cpp ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019523
19524cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019525#define HAVE_GPP_BUILTIN_H 1
19526EOF
19527
19528 else
Steve Kondikae271bc2015-11-15 02:50:53 +010019529
19530cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019531#define HAVE_GXX_BUILTIN_H 1
19532EOF
19533
19534 fi
19535else
19536 echo "$as_me: failed program was:" >&5
19537cat conftest.$ac_ext >&5
19538cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019539#line 19539 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019540#include "confdefs.h"
19541
19542#include <builtin.h>
19543
19544int
19545main ()
19546{
19547two_arg_error_handler_t foo2 = lib_error_handler
19548 ;
19549 return 0;
19550}
19551_ACEOF
19552rm -f conftest.$ac_objext conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010019553if { (eval echo "$as_me:19553: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019554 (eval $ac_link) 2>&5
19555 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019556 echo "$as_me:19556: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019557 (exit $ac_status); } &&
19558 { ac_try='test -s conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019559 { (eval echo "$as_me:19559: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019560 (eval $ac_try) 2>&5
19561 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019562 echo "$as_me:19562: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019563 (exit $ac_status); }; }; then
19564 cf_cxx_library=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010019565
19566cf_add_libs="-l$cf_gpp_libname"
19567# Filter out duplicates - this happens with badly-designed ".pc" files...
19568for cf_add_1lib in $CXXLIBS
19569do
19570 for cf_add_2lib in $cf_add_libs
19571 do
19572 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19573 then
19574 cf_add_1lib=
19575 break
19576 fi
19577 done
19578 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19579done
19580CXXLIBS="$cf_add_libs"
19581
19582cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019583#define HAVE_BUILTIN_H 1
19584EOF
19585
19586else
19587 echo "$as_me: failed program was:" >&5
19588cat conftest.$ac_ext >&5
19589cf_cxx_library=no
19590fi
19591rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19592fi
19593rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19594 LIBS="$cf_save"
Steve Kondikae271bc2015-11-15 02:50:53 +010019595 echo "$as_me:19595: result: $cf_cxx_library" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019596echo "${ECHO_T}$cf_cxx_library" >&6
19597fi
19598
19599 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010019600 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019601 cf_cxx_library=no
19602 ;;
19603 esac
19604
19605 ac_ext=cc
19606ac_cpp='$CXXCPP $CPPFLAGS'
19607ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19608ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19609ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19610ac_main_return=return
Steve Kondikae271bc2015-11-15 02:50:53 +010019611echo "$as_me:19611: checking how to run the C++ preprocessor" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019612echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19613if test -z "$CXXCPP"; then
19614 if test "${ac_cv_prog_CXXCPP+set}" = set; then
19615 echo $ECHO_N "(cached) $ECHO_C" >&6
19616else
19617 # Double quotes because CXXCPP needs to be expanded
19618 for CXXCPP in "$CXX -E" "/lib/cpp"
19619 do
19620 ac_preproc_ok=false
19621for ac_cxx_preproc_warn_flag in '' yes
19622do
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
Steve Kondikae271bc2015-11-15 02:50:53 +010019628#line 19628 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019629#include "confdefs.h"
19630#include <assert.h>
19631 Syntax error
19632_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019633if { (eval echo "$as_me:19633: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019634 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010019639 echo "$as_me:19639: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019640 (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=
19645 fi
19646else
19647 ac_cpp_err=yes
19648fi
19649if test -z "$ac_cpp_err"; then
19650 :
19651else
19652 echo "$as_me: failed program was:" >&5
19653 cat conftest.$ac_ext >&5
19654 # Broken: fails on valid input.
19655continue
19656fi
19657rm -f conftest.err conftest.$ac_ext
19658
19659 # OK, works on sane cases. Now check whether non-existent headers
19660 # can be detected and how.
19661 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019662#line 19662 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019663#include "confdefs.h"
19664#include <ac_nonexistent.h>
19665_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019666if { (eval echo "$as_me:19666: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019667 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010019672 echo "$as_me:19672: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019673 (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=
19678 fi
19679else
19680 ac_cpp_err=yes
19681fi
19682if test -z "$ac_cpp_err"; then
19683 # Broken: success on invalid input.
19684continue
19685else
19686 echo "$as_me: failed program was:" >&5
19687 cat conftest.$ac_ext >&5
19688 # Passes both tests.
19689ac_preproc_ok=:
19690break
19691fi
19692rm -f conftest.err conftest.$ac_ext
19693
19694done
19695# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19696rm -f conftest.err conftest.$ac_ext
19697if $ac_preproc_ok; then
19698 break
19699fi
19700
19701 done
19702 ac_cv_prog_CXXCPP=$CXXCPP
19703
19704fi
19705 CXXCPP=$ac_cv_prog_CXXCPP
19706else
19707 ac_cv_prog_CXXCPP=$CXXCPP
19708fi
Steve Kondikae271bc2015-11-15 02:50:53 +010019709echo "$as_me:19709: result: $CXXCPP" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019710echo "${ECHO_T}$CXXCPP" >&6
19711ac_preproc_ok=false
19712for ac_cxx_preproc_warn_flag in '' yes
19713do
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
Steve Kondikae271bc2015-11-15 02:50:53 +010019719#line 19719 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019720#include "confdefs.h"
19721#include <assert.h>
19722 Syntax error
19723_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019724if { (eval echo "$as_me:19724: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019725 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010019730 echo "$as_me:19730: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019731 (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=
19736 fi
19737else
19738 ac_cpp_err=yes
19739fi
19740if test -z "$ac_cpp_err"; then
19741 :
19742else
19743 echo "$as_me: failed program was:" >&5
19744 cat conftest.$ac_ext >&5
19745 # Broken: fails on valid input.
19746continue
19747fi
19748rm -f conftest.err conftest.$ac_ext
19749
19750 # OK, works on sane cases. Now check whether non-existent headers
19751 # can be detected and how.
19752 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019753#line 19753 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019754#include "confdefs.h"
19755#include <ac_nonexistent.h>
19756_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019757if { (eval echo "$as_me:19757: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019758 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010019763 echo "$as_me:19763: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019764 (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=
19769 fi
19770else
19771 ac_cpp_err=yes
19772fi
19773if test -z "$ac_cpp_err"; then
19774 # Broken: success on invalid input.
19775continue
19776else
19777 echo "$as_me: failed program was:" >&5
19778 cat conftest.$ac_ext >&5
19779 # Passes both tests.
19780ac_preproc_ok=:
19781break
19782fi
19783rm -f conftest.err conftest.$ac_ext
19784
19785done
19786# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19787rm -f conftest.err conftest.$ac_ext
19788if $ac_preproc_ok; then
19789 :
19790else
Steve Kondikae271bc2015-11-15 02:50:53 +010019791 { { echo "$as_me:19791: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019792echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19793 { (exit 1); exit 1; }; }
19794fi
19795
19796ac_ext=cc
19797ac_cpp='$CXXCPP $CPPFLAGS'
19798ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19799ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19800ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19801ac_main_return=return
19802
Steve Kondikae271bc2015-11-15 02:50:53 +010019803for ac_header in typeinfo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019804do
19805as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Steve Kondikae271bc2015-11-15 02:50:53 +010019806echo "$as_me:19806: checking for $ac_header" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019807echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19808if eval "test \"\${$as_ac_Header+set}\" = set"; then
19809 echo $ECHO_N "(cached) $ECHO_C" >&6
19810else
19811 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019812#line 19812 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019813#include "confdefs.h"
19814#include <$ac_header>
19815_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019816if { (eval echo "$as_me:19816: \"$ac_cpp conftest.$ac_ext\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019817 (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
Steve Kondikae271bc2015-11-15 02:50:53 +010019822 echo "$as_me:19822: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019823 (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=
19828 fi
19829else
19830 ac_cpp_err=yes
19831fi
19832if test -z "$ac_cpp_err"; then
19833 eval "$as_ac_Header=yes"
19834else
19835 echo "$as_me: failed program was:" >&5
19836 cat conftest.$ac_ext >&5
19837 eval "$as_ac_Header=no"
19838fi
19839rm -f conftest.err conftest.$ac_ext
19840fi
Steve Kondikae271bc2015-11-15 02:50:53 +010019841echo "$as_me:19841: result: `eval echo '${'$as_ac_Header'}'`" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019842echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19843if test `eval echo '${'$as_ac_Header'}'` = yes; then
19844 cat >>confdefs.h <<EOF
19845#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19846EOF
19847
19848fi
19849done
19850
Steve Kondikae271bc2015-11-15 02:50:53 +010019851for ac_header in iostream
19852do
19853as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19854echo "$as_me:19854: checking for $ac_header" >&5
19855echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19856if eval "test \"\${$as_ac_Header+set}\" = set"; then
19857 echo $ECHO_N "(cached) $ECHO_C" >&6
19858else
19859 cat >conftest.$ac_ext <<_ACEOF
19860#line 19860 "configure"
19861#include "confdefs.h"
19862#include <$ac_header>
19863_ACEOF
19864if { (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=
19876 fi
19877else
19878 ac_cpp_err=yes
19879fi
19880if test -z "$ac_cpp_err"; then
19881 eval "$as_ac_Header=yes"
19882else
19883 echo "$as_me: failed program was:" >&5
19884 cat conftest.$ac_ext >&5
19885 eval "$as_ac_Header=no"
19886fi
19887rm -f conftest.err conftest.$ac_ext
19888fi
19889echo "$as_me:19889: result: `eval echo '${'$as_ac_Header'}'`" >&5
19890echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19891if test `eval echo '${'$as_ac_Header'}'` = yes; then
19892 cat >>confdefs.h <<EOF
19893#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19894EOF
19895
19896fi
19897done
19898
19899if test x"$ac_cv_header_iostream" = xyes ; then
19900 echo "$as_me:19900: checking if iostream uses std-namespace" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019901echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010019902 cat >conftest.$ac_ext <<_ACEOF
19903#line 19903 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019904#include "confdefs.h"
19905
19906#include <iostream>
19907using std::endl;
19908using std::cerr;
19909int
19910main ()
19911{
19912
19913cerr << "testing" << endl;
19914
19915 ;
19916 return 0;
19917}
19918_ACEOF
19919rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010019920if { (eval echo "$as_me:19920: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019921 (eval $ac_compile) 2>&5
19922 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019923 echo "$as_me:19923: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019924 (exit $ac_status); } &&
19925 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019926 { (eval echo "$as_me:19926: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019927 (eval $ac_try) 2>&5
19928 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019929 echo "$as_me:19929: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019930 (exit $ac_status); }; }; then
19931 cf_iostream_namespace=yes
19932else
19933 echo "$as_me: failed program was:" >&5
19934cat conftest.$ac_ext >&5
19935cf_iostream_namespace=no
19936fi
19937rm -f conftest.$ac_objext conftest.$ac_ext
Steve Kondikae271bc2015-11-15 02:50:53 +010019938 echo "$as_me:19938: result: $cf_iostream_namespace" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019939echo "${ECHO_T}$cf_iostream_namespace" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010019940 if test "$cf_iostream_namespace" = yes ; then
19941
19942cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019943#define IOSTREAM_NAMESPACE 1
19944EOF
19945
Steve Kondikae271bc2015-11-15 02:50:53 +010019946 fi
19947fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019948
Steve Kondikae271bc2015-11-15 02:50:53 +010019949echo "$as_me:19949: checking if we should include stdbool.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019950echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19951
19952if test "${cf_cv_header_stdbool_h+set}" = set; then
19953 echo $ECHO_N "(cached) $ECHO_C" >&6
19954else
19955
19956 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019957#line 19957 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019958#include "confdefs.h"
19959
19960int
19961main ()
19962{
19963bool foo = false
19964 ;
19965 return 0;
19966}
19967_ACEOF
19968rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010019969if { (eval echo "$as_me:19969: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019970 (eval $ac_compile) 2>&5
19971 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019972 echo "$as_me:19972: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019973 (exit $ac_status); } &&
19974 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010019975 { (eval echo "$as_me:19975: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019976 (eval $ac_try) 2>&5
19977 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010019978 echo "$as_me:19978: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019979 (exit $ac_status); }; }; then
19980 cf_cv_header_stdbool_h=0
19981else
19982 echo "$as_me: failed program was:" >&5
19983cat conftest.$ac_ext >&5
19984cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010019985#line 19985 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053019986#include "confdefs.h"
19987
19988#ifndef __BEOS__
19989#include <stdbool.h>
19990#endif
19991
19992int
19993main ()
19994{
19995bool foo = false
19996 ;
19997 return 0;
19998}
19999_ACEOF
20000rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010020001if { (eval echo "$as_me:20001: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020002 (eval $ac_compile) 2>&5
20003 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020004 echo "$as_me:20004: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020005 (exit $ac_status); } &&
20006 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010020007 { (eval echo "$as_me:20007: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020008 (eval $ac_try) 2>&5
20009 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020010 echo "$as_me:20010: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020011 (exit $ac_status); }; }; then
20012 cf_cv_header_stdbool_h=1
20013else
20014 echo "$as_me: failed program was:" >&5
20015cat conftest.$ac_ext >&5
20016cf_cv_header_stdbool_h=0
20017fi
20018rm -f conftest.$ac_objext conftest.$ac_ext
20019fi
20020rm -f conftest.$ac_objext conftest.$ac_ext
20021fi
20022
20023if test "$cf_cv_header_stdbool_h" = 1
Steve Kondikae271bc2015-11-15 02:50:53 +010020024then echo "$as_me:20024: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020025echo "${ECHO_T}yes" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010020026else echo "$as_me:20026: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020027echo "${ECHO_T}no" >&6
20028fi
20029
Steve Kondikae271bc2015-11-15 02:50:53 +010020030echo "$as_me:20030: checking for builtin bool type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020031echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20032
20033if test "${cf_cv_builtin_bool+set}" = set; then
20034 echo $ECHO_N "(cached) $ECHO_C" >&6
20035else
20036
20037 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020038#line 20038 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020039#include "confdefs.h"
20040
20041#include <stdio.h>
20042#include <sys/types.h>
20043
20044int
20045main ()
20046{
20047bool x = false
20048 ;
20049 return 0;
20050}
20051_ACEOF
20052rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010020053if { (eval echo "$as_me:20053: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020054 (eval $ac_compile) 2>&5
20055 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020056 echo "$as_me:20056: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020057 (exit $ac_status); } &&
20058 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010020059 { (eval echo "$as_me:20059: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020060 (eval $ac_try) 2>&5
20061 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020062 echo "$as_me:20062: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020063 (exit $ac_status); }; }; then
20064 cf_cv_builtin_bool=1
20065else
20066 echo "$as_me: failed program was:" >&5
20067cat conftest.$ac_ext >&5
20068cf_cv_builtin_bool=0
20069fi
20070rm -f conftest.$ac_objext conftest.$ac_ext
20071
20072fi
20073
20074if test "$cf_cv_builtin_bool" = 1
Steve Kondikae271bc2015-11-15 02:50:53 +010020075then echo "$as_me:20075: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020076echo "${ECHO_T}yes" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010020077else echo "$as_me:20077: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020078echo "${ECHO_T}no" >&6
20079fi
20080
Steve Kondikae271bc2015-11-15 02:50:53 +010020081echo "$as_me:20081: checking for size of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020082echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20083if test "${cf_cv_type_of_bool+set}" = set; then
20084 echo $ECHO_N "(cached) $ECHO_C" >&6
20085else
20086
20087 rm -f cf_test.out
20088 if test "$cross_compiling" = yes; then
20089 cf_cv_type_of_bool=unknown
20090else
20091 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020092#line 20092 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020093#include "confdefs.h"
20094
20095#include <stdlib.h>
20096#include <stdio.h>
20097
20098#if defined(__cplusplus)
20099
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
20107
20108#else
20109
20110#if $cf_cv_header_stdbool_h
20111#include <stdbool.h>
20112#endif
20113
20114#endif
20115
Steve Kondikae271bc2015-11-15 02:50:53 +010020116int main()
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020117{
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);
20128 }
20129 ${cf_cv_main_return:-return}(0);
20130}
20131
20132_ACEOF
20133rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010020134if { (eval echo "$as_me:20134: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020135 (eval $ac_link) 2>&5
20136 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020137 echo "$as_me:20137: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020138 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010020139 { (eval echo "$as_me:20139: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020140 (eval $ac_try) 2>&5
20141 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020142 echo "$as_me:20142: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020143 (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
20147 fi
20148else
20149 echo "$as_me: program exited with status $ac_status" >&5
20150echo "$as_me: failed program was:" >&5
20151cat conftest.$ac_ext >&5
20152cf_cv_type_of_bool=unknown
20153fi
20154rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20155fi
20156
20157fi
20158
20159 rm -f cf_test.out
Steve Kondikae271bc2015-11-15 02:50:53 +010020160echo "$as_me:20160: result: $cf_cv_type_of_bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020161echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20162if test "$cf_cv_type_of_bool" = unknown ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020163 case .$NCURSES_BOOL in
20164 (.auto|.) NCURSES_BOOL=unsigned;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020165 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010020166 { echo "$as_me:20166: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020167echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20168 cf_cv_type_of_bool=$NCURSES_BOOL
20169fi
20170
Steve Kondikae271bc2015-11-15 02:50:53 +010020171echo "$as_me:20171: checking for special defines needed for etip.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020172echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20173cf_save_CXXFLAGS="$CXXFLAGS"
20174cf_result="none"
Steve Kondikae271bc2015-11-15 02:50:53 +010020175
20176# etip.h includes ncurses.h which includes ncurses_dll.h
20177# But ncurses_dll.h is generated - fix here.
20178test -d include || mkdir include
20179test -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
20180
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020181for cf_math in "" MATH_H
20182do
20183for cf_excp in "" MATH_EXCEPTION
20184do
Steve Kondikae271bc2015-11-15 02:50:53 +010020185 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020186 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20187 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20188cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020189#line 20189 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020190#include "confdefs.h"
20191
20192#include <etip.h.in>
20193
20194int
20195main ()
20196{
20197
20198 ;
20199 return 0;
20200}
20201_ACEOF
20202rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010020203if { (eval echo "$as_me:20203: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020204 (eval $ac_compile) 2>&5
20205 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020206 echo "$as_me:20206: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020207 (exit $ac_status); } &&
20208 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010020209 { (eval echo "$as_me:20209: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020210 (eval $ac_try) 2>&5
20211 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020212 echo "$as_me:20212: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020213 (exit $ac_status); }; }; then
20214
20215 test -n "$cf_math" && cat >>confdefs.h <<EOF
20216#define ETIP_NEEDS_${cf_math} 1
20217EOF
20218
20219 test -n "$cf_excp" && cat >>confdefs.h <<EOF
20220#define ETIP_NEEDS_${cf_excp} 1
20221EOF
20222
20223 cf_result="$cf_math $cf_excp"
Steve Kondikae271bc2015-11-15 02:50:53 +010020224 break 2
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020225
20226else
20227 echo "$as_me: failed program was:" >&5
20228cat conftest.$ac_ext >&5
20229fi
20230rm -f conftest.$ac_objext conftest.$ac_ext
20231done
20232done
Steve Kondikae271bc2015-11-15 02:50:53 +010020233echo "$as_me:20233: result: $cf_result" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020234echo "${ECHO_T}$cf_result" >&6
20235CXXFLAGS="$cf_save_CXXFLAGS"
20236
20237if test -n "$CXX"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020238echo "$as_me:20238: checking if $CXX accepts parameter initialization" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020239echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20240if test "${cf_cv_cpp_param_init+set}" = set; then
20241 echo $ECHO_N "(cached) $ECHO_C" >&6
20242else
20243
20244 ac_ext=cc
20245ac_cpp='$CXXCPP $CPPFLAGS'
20246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20249ac_main_return=return
20250
20251 if test "$cross_compiling" = yes; then
20252 cf_cv_cpp_param_init=unknown
20253else
20254 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020255#line 20255 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020256#include "confdefs.h"
20257
20258class TEST {
20259private:
20260 int value;
20261public:
20262 TEST(int x = 1);
20263 ~TEST();
20264};
20265
20266TEST::TEST(int x = 1) // some compilers do not like second initializer
20267{
20268 value = x;
20269}
Steve Kondikae271bc2015-11-15 02:50:53 +010020270int main() { }
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020271
20272_ACEOF
20273rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010020274if { (eval echo "$as_me:20274: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020275 (eval $ac_link) 2>&5
20276 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020277 echo "$as_me:20277: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020278 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010020279 { (eval echo "$as_me:20279: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020280 (eval $ac_try) 2>&5
20281 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020282 echo "$as_me:20282: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020283 (exit $ac_status); }; }; then
20284 cf_cv_cpp_param_init=yes
20285else
20286 echo "$as_me: program exited with status $ac_status" >&5
20287echo "$as_me: failed program was:" >&5
20288cat conftest.$ac_ext >&5
20289cf_cv_cpp_param_init=no
20290fi
20291rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20292fi
20293 ac_ext=cc
20294ac_cpp='$CXXCPP $CPPFLAGS'
20295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20298ac_main_return=return
20299
20300fi
Steve Kondikae271bc2015-11-15 02:50:53 +010020301echo "$as_me:20301: result: $cf_cv_cpp_param_init" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020302echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20303fi
Steve Kondikae271bc2015-11-15 02:50:53 +010020304test "$cf_cv_cpp_param_init" = yes &&
20305cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020306#define CPP_HAS_PARAM_INIT 1
20307EOF
20308
20309if test -n "$CXX"; then
20310
Steve Kondikae271bc2015-11-15 02:50:53 +010020311echo "$as_me:20311: checking if $CXX accepts static_cast" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020312echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20313if test "${cf_cv_cpp_static_cast+set}" = set; then
20314 echo $ECHO_N "(cached) $ECHO_C" >&6
20315else
20316
20317 ac_ext=cc
20318ac_cpp='$CXXCPP $CPPFLAGS'
20319ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20320ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20321ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20322ac_main_return=return
20323
20324 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020325#line 20325 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020326#include "confdefs.h"
20327
20328class NCursesPanel
20329{
20330public:
20331 NCursesPanel(int nlines,
20332 int ncols,
20333 int begin_y = 0,
20334 int begin_x = 0)
20335 {
20336 }
Steve Kondikae271bc2015-11-15 02:50:53 +010020337 NCursesPanel();
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020338 ~NCursesPanel();
20339};
20340
20341template<class T> class NCursesUserPanel : public NCursesPanel
20342{
20343public:
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)
20350 {
20351 };
20352 NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20353 {
20354 };
20355
20356 virtual ~NCursesUserPanel() {};
20357};
20358
20359int
20360main ()
20361{
20362
20363 const char* p_UserData = static_cast<char*>(0)
20364 ;
20365 return 0;
20366}
20367_ACEOF
20368rm -f conftest.$ac_objext
Steve Kondikae271bc2015-11-15 02:50:53 +010020369if { (eval echo "$as_me:20369: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020370 (eval $ac_compile) 2>&5
20371 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020372 echo "$as_me:20372: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020373 (exit $ac_status); } &&
20374 { ac_try='test -s conftest.$ac_objext'
Steve Kondikae271bc2015-11-15 02:50:53 +010020375 { (eval echo "$as_me:20375: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020376 (eval $ac_try) 2>&5
20377 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020378 echo "$as_me:20378: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020379 (exit $ac_status); }; }; then
20380 cf_cv_cpp_static_cast=yes
20381else
20382 echo "$as_me: failed program was:" >&5
20383cat conftest.$ac_ext >&5
20384cf_cv_cpp_static_cast=no
20385fi
20386rm -f conftest.$ac_objext conftest.$ac_ext
20387
20388 ac_ext=cc
20389ac_cpp='$CXXCPP $CPPFLAGS'
20390ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20391ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20392ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20393ac_main_return=return
20394
20395fi
Steve Kondikae271bc2015-11-15 02:50:53 +010020396echo "$as_me:20396: result: $cf_cv_cpp_static_cast" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020397echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20398
20399fi
20400
Steve Kondikae271bc2015-11-15 02:50:53 +010020401test "$cf_cv_cpp_static_cast" = yes &&
20402cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020403#define CPP_HAS_STATIC_CAST 1
20404EOF
20405
20406 CXX_AR='$(AR)'
Steve Kondikae271bc2015-11-15 02:50:53 +010020407 CXX_ARFLAGS='$(ARFLAGS)'
20408 case $cf_cv_system_name in
20409 (irix*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020410 if test "$GXX" != yes ; then
20411 CXX_AR='$(CXX)'
Steve Kondikae271bc2015-11-15 02:50:53 +010020412 CXX_ARFLAGS='-ar -o'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020413 fi
20414 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010020415 (sco3.2v5*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020416 CXXLDFLAGS="-u main"
20417 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010020418 (solaris2*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020419 if test "$GXX" != yes ; then
20420 CXX_AR='$(CXX)'
Steve Kondikae271bc2015-11-15 02:50:53 +010020421 CXX_ARFLAGS='-xar -o'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020422 fi
20423 ;;
20424 esac
20425
20426else
20427 cf_cxx_library=no
20428 cf_cv_builtin_bool=1
20429
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.
20435 #
20436 # Caveat: since the storage of the bool type is not standardized, it
20437 # may change.
20438
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
20444
Steve Kondikae271bc2015-11-15 02:50:53 +010020445echo "$as_me:20445: checking for size of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020446echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20447if test "${cf_cv_type_of_bool+set}" = set; then
20448 echo $ECHO_N "(cached) $ECHO_C" >&6
20449else
20450
20451 rm -f cf_test.out
20452 if test "$cross_compiling" = yes; then
20453 cf_cv_type_of_bool=unknown
20454else
20455 cat >conftest.$ac_ext <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020456#line 20456 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020457#include "confdefs.h"
20458
20459#include <stdlib.h>
20460#include <stdio.h>
20461
20462#if defined(__cplusplus)
20463
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
20471
20472#else
20473
20474#if $cf_cv_header_stdbool_h
20475#include <stdbool.h>
20476#endif
20477
20478#endif
20479
Steve Kondikae271bc2015-11-15 02:50:53 +010020480int main()
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020481{
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);
20492 }
20493 ${cf_cv_main_return:-return}(0);
20494}
20495
20496_ACEOF
20497rm -f conftest$ac_exeext
Steve Kondikae271bc2015-11-15 02:50:53 +010020498if { (eval echo "$as_me:20498: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020499 (eval $ac_link) 2>&5
20500 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020501 echo "$as_me:20501: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020502 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Steve Kondikae271bc2015-11-15 02:50:53 +010020503 { (eval echo "$as_me:20503: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020504 (eval $ac_try) 2>&5
20505 ac_status=$?
Steve Kondikae271bc2015-11-15 02:50:53 +010020506 echo "$as_me:20506: \$? = $ac_status" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020507 (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
20511 fi
20512else
20513 echo "$as_me: program exited with status $ac_status" >&5
20514echo "$as_me: failed program was:" >&5
20515cat conftest.$ac_ext >&5
20516cf_cv_type_of_bool=unknown
20517fi
20518rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20519fi
20520
20521fi
20522
20523 rm -f cf_test.out
Steve Kondikae271bc2015-11-15 02:50:53 +010020524echo "$as_me:20524: result: $cf_cv_type_of_bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020525echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20526if test "$cf_cv_type_of_bool" = unknown ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020527 case .$NCURSES_BOOL in
20528 (.auto|.) NCURSES_BOOL=unsigned;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020529 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010020530 { echo "$as_me:20530: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020531echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20532 cf_cv_type_of_bool=$NCURSES_BOOL
20533fi
20534
20535 else
Steve Kondikae271bc2015-11-15 02:50:53 +010020536 echo "$as_me:20536: checking for fallback type of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020537echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010020538 case "$host_cpu" in
20539 (i?86) cf_cv_type_of_bool=char ;;
20540 (*) cf_cv_type_of_bool=int ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020541 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010020542 echo "$as_me:20542: result: $cf_cv_type_of_bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020543echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20544 fi
20545 fi
20546fi
20547
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.
20553USE_CXX_BOOL=1
20554if test $cf_cv_cc_bool_type = 1
20555then
20556 # oops: C has a bool. Unlikely, but C++ could differ.
20557 USE_CXX_BOOL=0
20558elif test $cf_cv_builtin_bool = 0
20559then
20560 # C++ has no bool
20561 USE_CXX_BOOL=0
20562else
20563 # this is the normal case
20564 USE_CXX_BOOL='defined(__cplusplus)'
20565fi
20566
20567if test -f "${srcdir}/Ada95/Makefile.in" ; then
20568
Steve Kondikae271bc2015-11-15 02:50:53 +010020569 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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020572echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +010020573 cf_with_ada=no
20574 fi
20575 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020576
Steve Kondikae271bc2015-11-15 02:50:53 +010020577 if test "$cf_with_ada" != "no" ; then
20578
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020579cf_ada_make=gnatmake
20580# Extract the first word of "$cf_ada_make", so it can be a program name with args.
20581set dummy $cf_ada_make; ac_word=$2
Steve Kondikae271bc2015-11-15 02:50:53 +010020582echo "$as_me:20582: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020583echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20584if test "${ac_cv_prog_gnat_exists+set}" = set; then
20585 echo $ECHO_N "(cached) $ECHO_C" >&6
20586else
20587 if test -n "$gnat_exists"; then
20588 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20589else
20590 ac_save_IFS=$IFS; IFS=$ac_path_separator
20591ac_dummy="$PATH"
20592for 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
20596ac_cv_prog_gnat_exists="yes"
Steve Kondikae271bc2015-11-15 02:50:53 +010020597echo "$as_me:20597: found $ac_dir/$ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020598break
20599done
20600
20601 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20602fi
20603fi
20604gnat_exists=$ac_cv_prog_gnat_exists
20605if test -n "$gnat_exists"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020606 echo "$as_me:20606: result: $gnat_exists" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020607echo "${ECHO_T}$gnat_exists" >&6
20608else
Steve Kondikae271bc2015-11-15 02:50:53 +010020609 echo "$as_me:20609: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020610echo "${ECHO_T}no" >&6
20611fi
20612
20613if test "$ac_cv_prog_gnat_exists" = no; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020614 cf_ada_make=
20615 cf_cv_prog_gnat_correct=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020616else
20617
Steve Kondikae271bc2015-11-15 02:50:53 +010020618echo "$as_me:20618: checking for gnat version" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020619echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010020620cf_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/ .*//'`
20623echo "$as_me:20623: result: $cf_gnat_version" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020624echo "${ECHO_T}$cf_gnat_version" >&6
20625
20626case $cf_gnat_version in
Steve Kondikae271bc2015-11-15 02:50:53 +010020627(3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20628 cf_cv_prog_gnat_correct=yes
20629 ;;
20630(*)
20631 { echo "$as_me:20631: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20632echo "$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
20634 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020635esac
20636
Steve Kondikae271bc2015-11-15 02:50:53 +010020637 # Extract the first word of "m4", so it can be a program name with args.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020638set dummy m4; ac_word=$2
Steve Kondikae271bc2015-11-15 02:50:53 +010020639echo "$as_me:20639: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20641if test "${ac_cv_prog_M4_exists+set}" = set; then
20642 echo $ECHO_N "(cached) $ECHO_C" >&6
20643else
20644 if test -n "$M4_exists"; then
20645 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20646else
20647 ac_save_IFS=$IFS; IFS=$ac_path_separator
20648ac_dummy="$PATH"
20649for 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
20653ac_cv_prog_M4_exists="yes"
Steve Kondikae271bc2015-11-15 02:50:53 +010020654echo "$as_me:20654: found $ac_dir/$ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020655break
20656done
20657
20658 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20659fi
20660fi
20661M4_exists=$ac_cv_prog_M4_exists
20662if test -n "$M4_exists"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020663 echo "$as_me:20663: result: $M4_exists" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020664echo "${ECHO_T}$M4_exists" >&6
20665else
Steve Kondikae271bc2015-11-15 02:50:53 +010020666 echo "$as_me:20666: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020667echo "${ECHO_T}no" >&6
20668fi
20669
Steve Kondikae271bc2015-11-15 02:50:53 +010020670 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.
20673 fi
20674 if test "$cf_cv_prog_gnat_correct" = yes; then
20675 echo "$as_me:20675: checking if GNAT works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020676echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20677
Steve Kondikae271bc2015-11-15 02:50:53 +010020678rm -rf conftest* *~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020679cat >>conftest.ads <<CF_EOF
20680procedure conftest;
20681CF_EOF
20682cat >>conftest.adb <<CF_EOF
20683with Text_IO;
20684with GNAT.OS_Lib;
20685procedure conftest is
20686begin
20687 Text_IO.Put ("Hello World");
20688 Text_IO.New_Line;
20689 GNAT.OS_Lib.OS_Exit (0);
20690end conftest;
20691CF_EOF
20692if ( $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
20697 fi
20698else
20699 cf_cv_prog_gnat_correct=no
20700fi
Steve Kondikae271bc2015-11-15 02:50:53 +010020701rm -rf conftest* *~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020702
Steve Kondikae271bc2015-11-15 02:50:53 +010020703 echo "$as_me:20703: result: $cf_cv_prog_gnat_correct" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020704echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010020705 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020706fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020707
Steve Kondikae271bc2015-11-15 02:50:53 +010020708 if test "x$cf_cv_prog_gnat_correct" = xyes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020709
Steve Kondikae271bc2015-11-15 02:50:53 +010020710 ADAFLAGS="$ADAFLAGS -gnatpn"
20711
20712 echo "$as_me:20712: checking optimization options for ADAFLAGS" >&5
20713echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20714 case "$CFLAGS" in
20715 (*-g*)
20716
20717 ADAFLAGS="$ADAFLAGS -g"
20718
20719 ;;
20720 esac
20721 case "$CFLAGS" in
20722 (*-O*)
20723 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
20724
20725 ADAFLAGS="$ADAFLAGS $cf_O_flag"
20726
20727 ;;
20728 esac
20729 echo "$as_me:20729: result: $ADAFLAGS" >&5
20730echo "${ECHO_T}$ADAFLAGS" >&6
20731
20732echo "$as_me:20732: checking if GNATPREP supports -T option" >&5
20733echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20734if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20735 echo $ECHO_N "(cached) $ECHO_C" >&6
20736else
20737
20738cf_cv_gnatprep_opt_t=no
20739gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20740
20741fi
20742echo "$as_me:20742: result: $cf_cv_gnatprep_opt_t" >&5
20743echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20744test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20745
20746echo "$as_me:20746: checking if GNAT supports generics" >&5
20747echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20748case $cf_gnat_version in
20749(3.[1-9]*|[4-9].*)
20750 cf_gnat_generics=yes
20751 ;;
20752(*)
20753 cf_gnat_generics=no
20754 ;;
20755esac
20756echo "$as_me:20756: result: $cf_gnat_generics" >&5
20757echo "${ECHO_T}$cf_gnat_generics" >&6
20758
20759if test "$cf_gnat_generics" = yes
20760then
20761 cf_compile_generics=generics
20762 cf_generic_objects="\${GENOBJS}"
20763else
20764 cf_compile_generics=
20765 cf_generic_objects=
20766fi
20767
20768echo "$as_me:20768: checking if GNAT supports SIGINT" >&5
20769echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20770if test "${cf_cv_gnat_sigint+set}" = set; then
20771 echo $ECHO_N "(cached) $ECHO_C" >&6
20772else
20773
20774rm -rf conftest* *~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020775cat >>conftest.ads <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020776with Ada.Interrupts.Names;
20777
20778package ConfTest is
20779
20780 pragma Warnings (Off); -- the next pragma exists since 3.11p
20781 pragma Unreserve_All_Interrupts;
20782 pragma Warnings (On);
20783
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;
20791
20792end ConfTest;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020793CF_EOF
20794cat >>conftest.adb <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020795package 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;
20806end ConfTest;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020807CF_EOF
20808if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020809 cf_cv_gnat_sigint=yes
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020810else
Steve Kondikae271bc2015-11-15 02:50:53 +010020811 cf_cv_gnat_sigint=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020812fi
Steve Kondikae271bc2015-11-15 02:50:53 +010020813rm -rf conftest* *~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020814
Steve Kondikae271bc2015-11-15 02:50:53 +010020815fi
20816echo "$as_me:20816: result: $cf_cv_gnat_sigint" >&5
20817echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020818
Steve Kondikae271bc2015-11-15 02:50:53 +010020819if test $cf_cv_gnat_sigint = yes ; then
20820 USE_GNAT_SIGINT=""
20821else
20822 USE_GNAT_SIGINT="#"
20823fi
20824
20825cf_gnat_libraries=no
20826cf_gnat_projects=no
20827
20828if test "$enable_gnat_projects" != no ; then
20829echo "$as_me:20829: checking if GNAT supports project files" >&5
20830echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20831case $cf_gnat_version in
20832(3.[0-9]*)
20833 ;;
20834(*)
20835 case $cf_cv_system_name in
20836 (cygwin*|msys*)
20837 ;;
20838 (*)
20839 mkdir conftest.src conftest.bin conftest.lib
20840 cd conftest.src
20841 rm -rf conftest* *~conftest*
20842 cat >>library.gpr <<CF_EOF
20843project 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);
20853end Library;
20854CF_EOF
20855 cat >>confpackage.ads <<CF_EOF
20856package ConfPackage is
20857 procedure conftest;
20858end ConfPackage;
20859CF_EOF
20860 cat >>confpackage.adb <<CF_EOF
20861with Text_IO;
20862package body ConfPackage is
20863 procedure conftest is
20864 begin
20865 Text_IO.Put ("Hello World");
20866 Text_IO.New_Line;
20867 end conftest;
20868end ConfPackage;
20869CF_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
20878 fi
20879 cd ..
20880 if test -f conftest.lib/confpackage.ali
20881 then
20882 cf_gnat_libraries=yes
20883 fi
20884 rm -rf conftest* *~conftest*
20885 ;;
20886 esac
20887 ;;
20888esac
20889echo "$as_me:20889: result: $cf_gnat_projects" >&5
20890echo "${ECHO_T}$cf_gnat_projects" >&6
20891fi # enable_gnat_projects
20892
20893if test $cf_gnat_projects = yes
20894then
20895 echo "$as_me:20895: checking if GNAT supports libraries" >&5
20896echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20897 echo "$as_me:20897: result: $cf_gnat_libraries" >&5
20898echo "${ECHO_T}$cf_gnat_libraries" >&6
20899fi
20900
20901if test "$cf_gnat_projects" = yes
20902then
20903 USE_OLD_MAKERULES="#"
20904 USE_GNAT_PROJECTS=""
20905else
20906 USE_OLD_MAKERULES=""
20907 USE_GNAT_PROJECTS="#"
20908fi
20909
20910if test "$cf_gnat_libraries" = yes
20911then
20912 USE_GNAT_LIBRARIES=""
20913else
20914 USE_GNAT_LIBRARIES="#"
20915fi
20916
20917echo "$as_me:20917: checking for ada-compiler" >&5
20918echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020919
20920# Check whether --with-ada-compiler or --without-ada-compiler was given.
20921if test "${with_ada_compiler+set}" = set; then
20922 withval="$with_ada_compiler"
20923 cf_ada_compiler=$withval
20924else
20925 cf_ada_compiler=gnatmake
20926fi;
20927
Steve Kondikae271bc2015-11-15 02:50:53 +010020928echo "$as_me:20928: result: $cf_ada_compiler" >&5
20929echo "${ECHO_T}$cf_ada_compiler" >&6
20930
20931 cf_ada_package=terminal_interface
20932
20933echo "$as_me:20933: checking for ada-include" >&5
20934echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020935
20936# Check whether --with-ada-include or --without-ada-include was given.
20937if test "${with_ada_include+set}" = set; then
20938 withval="$with_ada_include"
20939
20940else
Steve Kondikae271bc2015-11-15 02:50:53 +010020941 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20942fi; if test -n "$prefix/share/ada/adainclude" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020943
20944if test "x$prefix" != xNONE; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020945 cf_path_syntax="$prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020946else
Steve Kondikae271bc2015-11-15 02:50:53 +010020947 cf_path_syntax="$ac_default_prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020948fi
20949
Steve Kondikae271bc2015-11-15 02:50:53 +010020950case ".$withval" in
20951(.\$\(*\)*|.\'*\'*)
20952 ;;
20953(..|./*|.\\*)
20954 ;;
20955(.[a-zA-Z]:[\\/]*) # OS/2 EMX
20956 ;;
20957(.\${*prefix}*|.\${*dir}*)
20958 eval withval="$withval"
20959 case ".$withval" in
20960 (.NONE/*)
20961 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20962 ;;
20963 esac
20964 ;;
20965(.no|.NONE/*)
20966 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20967 ;;
20968(*)
20969 { { echo "$as_me:20969: error: expected a pathname, not \"$withval\"" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020970echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20971 { (exit 1); exit 1; }; }
Steve Kondikae271bc2015-11-15 02:50:53 +010020972 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020973esac
20974
20975fi
Steve Kondikae271bc2015-11-15 02:50:53 +010020976eval ADA_INCLUDE="$withval"
20977
20978echo "$as_me:20978: result: $ADA_INCLUDE" >&5
20979echo "${ECHO_T}$ADA_INCLUDE" >&6
20980
20981echo "$as_me:20981: checking for ada-objects" >&5
20982echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020983
20984# Check whether --with-ada-objects or --without-ada-objects was given.
20985if test "${with_ada_objects+set}" = set; then
20986 withval="$with_ada_objects"
20987
20988else
Steve Kondikae271bc2015-11-15 02:50:53 +010020989 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020990fi; if test -n "$prefix/lib/ada/adalib" ; then
20991
20992if test "x$prefix" != xNONE; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020993 cf_path_syntax="$prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020994else
Steve Kondikae271bc2015-11-15 02:50:53 +010020995 cf_path_syntax="$ac_default_prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020996fi
20997
Steve Kondikae271bc2015-11-15 02:50:53 +010020998case ".$withval" in
20999(.\$\(*\)*|.\'*\'*)
21000 ;;
21001(..|./*|.\\*)
21002 ;;
21003(.[a-zA-Z]:[\\/]*) # OS/2 EMX
21004 ;;
21005(.\${*prefix}*|.\${*dir}*)
21006 eval withval="$withval"
21007 case ".$withval" in
21008 (.NONE/*)
21009 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21010 ;;
21011 esac
21012 ;;
21013(.no|.NONE/*)
21014 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21015 ;;
21016(*)
21017 { { echo "$as_me:21017: error: expected a pathname, not \"$withval\"" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021018echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21019 { (exit 1); exit 1; }; }
Steve Kondikae271bc2015-11-15 02:50:53 +010021020 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021021esac
21022
21023fi
Steve Kondikae271bc2015-11-15 02:50:53 +010021024eval ADA_OBJECTS="$withval"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021025
Steve Kondikae271bc2015-11-15 02:50:53 +010021026echo "$as_me:21026: result: $ADA_OBJECTS" >&5
21027echo "${ECHO_T}$ADA_OBJECTS" >&6
21028
21029echo "$as_me:21029: checking if an Ada95 shared-library should be built" >&5
21030echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21031
21032# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21033if test "${with_ada_sharedlib+set}" = set; then
21034 withval="$with_ada_sharedlib"
21035 with_ada_sharedlib=$withval
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021036else
Steve Kondikae271bc2015-11-15 02:50:53 +010021037 with_ada_sharedlib=no
21038fi;
21039echo "$as_me:21039: result: $with_ada_sharedlib" >&5
21040echo "${ECHO_T}$with_ada_sharedlib" >&6
21041
21042ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21043MAKE_ADA_SHAREDLIB="#"
21044
21045if test "x$with_ada_sharedlib" != xno
21046then
21047 MAKE_ADA_SHAREDLIB=
21048 if test "x$with_ada_sharedlib" != xyes
21049 then
21050 ADA_SHAREDLIB="$with_ada_sharedlib"
21051 fi
21052fi
21053
21054 fi
21055 fi
21056else
21057 cf_with_ada=no
21058fi
21059
21060# do this "late" to avoid conflict with header-checks
21061if test "x$with_widec" = xyes ; then
21062 echo "$as_me:21062: checking for wchar_t" >&5
21063echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21064if test "${ac_cv_type_wchar_t+set}" = set; then
21065 echo $ECHO_N "(cached) $ECHO_C" >&6
21066else
21067 cat >conftest.$ac_ext <<_ACEOF
21068#line 21068 "configure"
21069#include "confdefs.h"
21070$ac_includes_default
21071int
21072main ()
21073{
21074if ((wchar_t *) 0)
21075 return 0;
21076if (sizeof (wchar_t))
21077 return 0;
21078 ;
21079 return 0;
21080}
21081_ACEOF
21082rm -f conftest.$ac_objext
21083if { (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
21095else
21096 echo "$as_me: failed program was:" >&5
21097cat conftest.$ac_ext >&5
21098ac_cv_type_wchar_t=no
21099fi
21100rm -f conftest.$ac_objext conftest.$ac_ext
21101fi
21102echo "$as_me:21102: result: $ac_cv_type_wchar_t" >&5
21103echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21104
21105echo "$as_me:21105: checking size of wchar_t" >&5
21106echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21107if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21108 echo $ECHO_N "(cached) $ECHO_C" >&6
21109else
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.
21113cat >conftest.$ac_ext <<_ACEOF
21114#line 21114 "configure"
21115#include "confdefs.h"
21116$ac_includes_default
21117int
21118main ()
21119{
21120int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21121 ;
21122 return 0;
21123}
21124_ACEOF
21125rm -f conftest.$ac_objext
21126if { (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
21143int
21144main ()
21145{
21146int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21147 ;
21148 return 0;
21149}
21150_ACEOF
21151rm -f conftest.$ac_objext
21152if { (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
21164else
21165 echo "$as_me: failed program was:" >&5
21166cat conftest.$ac_ext >&5
21167ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21168fi
21169rm -f conftest.$ac_objext conftest.$ac_ext
21170 done
21171else
21172 echo "$as_me: failed program was:" >&5
21173cat conftest.$ac_ext >&5
21174ac_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
21180int
21181main ()
21182{
21183int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21184 ;
21185 return 0;
21186}
21187_ACEOF
21188rm -f conftest.$ac_objext
21189if { (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
21201else
21202 echo "$as_me: failed program was:" >&5
21203cat conftest.$ac_ext >&5
21204ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21205fi
21206rm -f conftest.$ac_objext conftest.$ac_ext
21207 done
21208fi
21209rm -f conftest.$ac_objext conftest.$ac_ext
21210# Binary search between lo and hi bounds.
21211while 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
21217int
21218main ()
21219{
21220int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21221 ;
21222 return 0;
21223}
21224_ACEOF
21225rm -f conftest.$ac_objext
21226if { (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
21238else
21239 echo "$as_me: failed program was:" >&5
21240cat conftest.$ac_ext >&5
21241ac_lo=`expr $ac_mid + 1`
21242fi
21243rm -f conftest.$ac_objext conftest.$ac_ext
21244done
21245ac_cv_sizeof_wchar_t=$ac_lo
21246else
21247 if test "$cross_compiling" = yes; then
21248 { { echo "$as_me:21248: error: cannot run test program while cross compiling" >&5
21249echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21250 { (exit 1); exit 1; }; }
21251else
21252 cat >conftest.$ac_ext <<_ACEOF
21253#line 21253 "configure"
21254#include "confdefs.h"
21255$ac_includes_default
21256int
21257main ()
21258{
21259FILE *f = fopen ("conftest.val", "w");
21260if (!f)
21261 $ac_main_return (1);
21262fprintf (f, "%d", (sizeof (wchar_t)));
21263fclose (f);
21264 ;
21265 return 0;
21266}
21267_ACEOF
21268rm -f conftest$ac_exeext
21269if { (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`
21280else
21281 echo "$as_me: program exited with status $ac_status" >&5
21282echo "$as_me: failed program was:" >&5
21283cat conftest.$ac_ext >&5
21284fi
21285rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21286fi
21287fi
21288rm -f conftest.val
21289else
21290 ac_cv_sizeof_wchar_t=0
21291fi
21292fi
21293echo "$as_me:21293: result: $ac_cv_sizeof_wchar_t" >&5
21294echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21295cat >>confdefs.h <<EOF
21296#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21297EOF
21298
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021299fi
21300
21301### Construct the ncurses library-subsets, if any, from this set of keywords:
21302### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21303###
21304### ticlib modules may be a separate library, otherwise contained in termlib.
21305### termlib modules may be a separate library, otherwise contained in ncurses.
21306###
21307### The of "+" or " " between the tokens controls the way the script
21308### chooses to split module lists into libraries.
21309###
21310### (see CF_LIB_RULES).
Steve Kondikae271bc2015-11-15 02:50:53 +010021311echo "$as_me:21311: checking for library subsets" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021312echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21313LIB_SUBSETS=
21314
Steve Kondikae271bc2015-11-15 02:50:53 +010021315if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021316 LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21317 if test "$with_ticlib" != no ; then
21318 LIB_SUBSETS="${LIB_SUBSETS} "
21319 else
21320 LIB_SUBSETS="${LIB_SUBSETS}+"
21321 fi
21322fi
21323
21324LIB_SUBSETS="${LIB_SUBSETS}termlib"
Steve Kondikae271bc2015-11-15 02:50:53 +010021325test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21326
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021327if test "$with_termlib" != no ; then
21328 LIB_SUBSETS="${LIB_SUBSETS} "
21329else
21330 LIB_SUBSETS="${LIB_SUBSETS}+"
21331fi
21332
21333LIB_SUBSETS="${LIB_SUBSETS}base"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021334
Steve Kondikae271bc2015-11-15 02:50:53 +010021335# Most term-driver calls are to tinfo, but some like init_pair are to the
21336# base library (so it resides in base).
21337if 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"
21343 ;;
21344 (*)
21345 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21346 ;;
21347 esac
21348fi
21349
21350test "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21351test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21352
21353echo "$as_me:21353: result: $LIB_SUBSETS" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021354echo "${ECHO_T}$LIB_SUBSETS" >&6
21355
21356### Construct the list of include-directories to be generated
21357
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021358if test "$srcdir" != "."; then
21359 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21360fi
Steve Kondikae271bc2015-11-15 02:50:53 +010021361CPPFLAGS="-I../include $CPPFLAGS"
21362if test "$srcdir" != "."; then
21363 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021364fi
Steve Kondikae271bc2015-11-15 02:50:53 +010021365CPPFLAGS="-I. $CPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021366
Steve Kondikae271bc2015-11-15 02:50:53 +010021367ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021368if test "$srcdir" != "."; then
21369 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21370fi
21371if test "$GCC" != yes; then
21372 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21373elif test "$includedir" != "/usr/include"; then
21374 if test "$includedir" = '${prefix}/include' ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021375 if test x$prefix != x/usr ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021376 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21377 fi
21378 else
21379 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21380 fi
21381fi
21382
21383### Build up pieces for makefile rules
Steve Kondikae271bc2015-11-15 02:50:53 +010021384echo "$as_me:21384: checking default library suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021385echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21386
21387 case $DFT_LWR_MODEL in
Steve Kondikae271bc2015-11-15 02:50:53 +010021388 (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='' ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021393 esac
21394 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
Steve Kondikae271bc2015-11-15 02:50:53 +010021395echo "$as_me:21395: result: $DFT_ARG_SUFFIX" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021396echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21397
Steve Kondikae271bc2015-11-15 02:50:53 +010021398echo "$as_me:21398: checking default library-dependency suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021399echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21400
Steve Kondikae271bc2015-11-15 02:50:53 +010021401 case X$DFT_LWR_MODEL in
21402 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021403 DFT_LIB_SUFFIX='.la'
21404 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21405 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021406 (Xdebug)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021407 DFT_LIB_SUFFIX='_g.a'
21408 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21409 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021410 (Xprofile)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021411 DFT_LIB_SUFFIX='_p.a'
21412 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21413 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021414 (Xshared)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021415 case $cf_cv_system_name in
Steve Kondikae271bc2015-11-15 02:50:53 +010021416 (aix[5-7]*)
21417 DFT_LIB_SUFFIX='.so'
21418 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21419 ;;
21420 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021421 DFT_LIB_SUFFIX='.dll'
21422 DFT_DEP_SUFFIX='.dll.a'
21423 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021424 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021425 DFT_LIB_SUFFIX='.dylib'
21426 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21427 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021428 (hpux*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021429 case $target in
Steve Kondikae271bc2015-11-15 02:50:53 +010021430 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021431 DFT_LIB_SUFFIX='.so'
21432 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21433 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021434 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021435 DFT_LIB_SUFFIX='.sl'
21436 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21437 ;;
21438 esac
21439 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021440 (*)
21441 DFT_LIB_SUFFIX='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021442 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21443 ;;
21444 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010021445 ;;
21446 (*)
21447 DFT_LIB_SUFFIX='.a'
21448 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21449 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021450 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010021451 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}"
21455 fi
21456echo "$as_me:21456: result: $DFT_DEP_SUFFIX" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021457echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21458
Steve Kondikae271bc2015-11-15 02:50:53 +010021459echo "$as_me:21459: checking default object directory" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021460echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21461
21462 case $DFT_LWR_MODEL in
Steve Kondikae271bc2015-11-15 02:50:53 +010021463 (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)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021470 DFT_OBJ_SUBDIR='objects' ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021471 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021472 DFT_OBJ_SUBDIR='obj_s' ;;
21473 esac
21474 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010021475echo "$as_me:21475: result: $DFT_OBJ_SUBDIR" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021476echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21477
Steve Kondikae271bc2015-11-15 02:50:53 +010021478if test "x$cf_with_cxx" = xyes ; then
21479echo "$as_me:21479: checking c++ library-dependency suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021480echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21481if test "$with_libtool" != "no"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021482 # libtool thinks it can make c++ shared libraries (perhaps only g++)
21483 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21484elif test "$with_shared_cxx" != "no"; then
21485 # also for g++ users...
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021486 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21487else
Steve Kondikae271bc2015-11-15 02:50:53 +010021488 # we normally make a static library because C/C++ library rules differ
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021489
Steve Kondikae271bc2015-11-15 02:50:53 +010021490 case Xnormal in
21491 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021492 CXX_LIB_SUFFIX='.la'
21493 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21494 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021495 (Xdebug)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021496 CXX_LIB_SUFFIX='_g.a'
21497 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21498 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021499 (Xprofile)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021500 CXX_LIB_SUFFIX='_p.a'
21501 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21502 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021503 (Xshared)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021504 case $cf_cv_system_name in
Steve Kondikae271bc2015-11-15 02:50:53 +010021505 (aix[5-7]*)
21506 CXX_LIB_SUFFIX='.so'
21507 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21508 ;;
21509 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021510 CXX_LIB_SUFFIX='.dll'
21511 CXX_DEP_SUFFIX='.dll.a'
21512 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021513 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021514 CXX_LIB_SUFFIX='.dylib'
21515 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21516 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021517 (hpux*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021518 case $target in
Steve Kondikae271bc2015-11-15 02:50:53 +010021519 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021520 CXX_LIB_SUFFIX='.so'
21521 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21522 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021523 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021524 CXX_LIB_SUFFIX='.sl'
21525 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21526 ;;
21527 esac
21528 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021529 (*)
21530 CXX_LIB_SUFFIX='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021531 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21532 ;;
21533 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010021534 ;;
21535 (*)
21536 CXX_LIB_SUFFIX='.a'
21537 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21538 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021539 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010021540 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}"
21544 fi
21545
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021546fi
Steve Kondikae271bc2015-11-15 02:50:53 +010021547echo "$as_me:21547: result: $CXX_LIB_SUFFIX" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021548echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21549
21550fi
21551
21552# do not want -ldl in build except as needed for -lncurses dependency
Steve Kondikae271bc2015-11-15 02:50:53 +010021553if test "x$with_dlsym" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021554if test $DFT_LWR_MODEL = shared || \
21555 test $DFT_LWR_MODEL = libtool ; then
21556
21557# remove dl library from $LIBS
21558LIBS=`echo "$LIBS" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
21559
21560fi
21561fi
21562### Set up low-level terminfo dependencies for makefiles.
21563
21564# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21565# do not need libdl
21566TICS_LIST=
Steve Kondikae271bc2015-11-15 02:50:53 +010021567if test "x$with_dlsym" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021568
21569# remove dl library from $SHLIB_LIST
21570TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
21571
21572fi
21573
Steve Kondikae271bc2015-11-15 02:50:53 +010021574USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21575USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21576USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21577if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21578then
21579 USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21580fi
21581
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021582if test "$with_ticlib" != no ; then
21583
Steve Kondikae271bc2015-11-15 02:50:53 +010021584 if test "x$with_ticlib" != xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021585 TICS_NAME=$with_ticlib
Steve Kondikae271bc2015-11-15 02:50:53 +010021586 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021587 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21588 TICS_LIB_SUFFIX="${with_ticlib}"
21589 else
Steve Kondikae271bc2015-11-15 02:50:53 +010021590 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021591 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
Steve Kondikae271bc2015-11-15 02:50:53 +010021592 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021593 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010021594 TICS_LDFLAGS="-L${LIB_DIR}"
21595 TICS_LIBS="-l${TICS_LIB_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021596else
Steve Kondikae271bc2015-11-15 02:50:53 +010021597 TICS_LDFLAGS="-L${LIB_DIR}"
21598 TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021599fi
21600
21601if test "$with_termlib" != no ; then
21602
Steve Kondikae271bc2015-11-15 02:50:53 +010021603 if test "x$with_termlib" != xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021604 TINFO_NAME=$with_termlib
Steve Kondikae271bc2015-11-15 02:50:53 +010021605 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}//"`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021607 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}
Steve Kondikae271bc2015-11-15 02:50:53 +010021611 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021612 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
Steve Kondikae271bc2015-11-15 02:50:53 +010021613 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021614 fi
21615
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}"
Steve Kondikae271bc2015-11-15 02:50:53 +010021621 TINFO_LDFLAGS="-L${LIB_DIR}"
21622 TINFO_LIBS="$TEST_ARGS"
21623 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21624 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021625 else
21626 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21627 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
Steve Kondikae271bc2015-11-15 02:50:53 +010021628 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"
21635 fi
21636 TINFO_LDFLAGS="-L${LIB_DIR}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021637 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21638 fi
21639else
21640 # the next lines are needed for linking libtic over libncurses
21641 TINFO_NAME=${LIB_NAME}
21642 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
Steve Kondikae271bc2015-11-15 02:50:53 +010021643 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}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021646 else
21647 TICS_LIST="$SHLIB_LIST"
21648 fi
21649
Steve Kondikae271bc2015-11-15 02:50:53 +010021650 TINFO_LDFLAGS="-L${LIB_DIR}"
21651 TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021652fi
21653
21654if test "$DFT_LWR_MODEL" = shared ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021655 case $cf_cv_system_name in
21656 (cygwin*|msys*)
21657 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021658 TINFO_SUFFIX=.dll
21659 ;;
21660 esac
21661fi
21662
Steve Kondikae271bc2015-11-15 02:50:53 +010021663if test "x$with_dlsym" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021664
21665# remove dl library from $TICS_LIST
21666TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
21667
21668fi
21669
21670if test "$DFT_LWR_MODEL" = "libtool"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021671 OBJEXT=lo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021672fi
21673
21674# needed for Ada95
Steve Kondikae271bc2015-11-15 02:50:53 +010021675TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021676
21677case $DFT_LWR_MODEL in
Steve Kondikae271bc2015-11-15 02:50:53 +010021678(normal|debug|profile)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021679
21680if test "$GCC" = yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021681 case $cf_cv_system_name in
21682 (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021683 LDFLAGS_STATIC=
21684 LDFLAGS_SHARED=
21685 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021686 (*) # normally, except when broken
21687 LDFLAGS_STATIC=-static
21688 LDFLAGS_SHARED=-dynamic
21689 ;;
21690 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021691else
Steve Kondikae271bc2015-11-15 02:50:53 +010021692 case $cf_cv_system_name in
21693 (aix[4-7]*) # from ld manpage
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021694 LDFLAGS_STATIC=-bstatic
21695 LDFLAGS_SHARED=-bdynamic
21696 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021697 (hpux*) # from ld manpage for hpux10.20, hpux11.11
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021698 # We could also use just "archive" and "shared".
21699 LDFLAGS_STATIC=-Wl,-a,archive_shared
21700 LDFLAGS_SHARED=-Wl,-a,shared_archive
21701 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021702 (irix*) # from ld manpage IRIX64
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021703 LDFLAGS_STATIC=-Bstatic
21704 LDFLAGS_SHARED=-Bdynamic
21705 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021706 (osf[45]*) # from ld manpage osf4.0d, osf5.1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021707 # alternative "-oldstyle_liblookup" (not in cc manpage)
21708 LDFLAGS_STATIC=-noso
21709 LDFLAGS_SHARED=-so_archive
21710 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021711 (solaris2*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021712 LDFLAGS_STATIC=-Bstatic
21713 LDFLAGS_SHARED=-Bdynamic
21714 ;;
21715 esac
21716fi
21717
Steve Kondikae271bc2015-11-15 02:50:53 +010021718if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21719then
21720 echo "$as_me:21720: checking if linker supports switching between static/dynamic" >&5
21721echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21722
21723 rm -f libconftest.a
21724 cat >conftest.$ac_ext <<EOF
21725#line 21725 "configure"
21726#include <stdio.h>
21727int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21728EOF
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
21736 fi
21737 rm -f conftest.*
21738
21739 cf_save_LIBS="$LIBS"
21740
21741 LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21742 cat >conftest.$ac_ext <<_ACEOF
21743#line 21743 "configure"
21744#include "confdefs.h"
21745
21746#line 21746 "configure"
21747#include <stdio.h>
21748int cf_ldflags_static(FILE *fp);
21749
21750int
21751main ()
21752{
21753
21754 return cf_ldflags_static(stdin);
21755
21756 ;
21757 return 0;
21758}
21759_ACEOF
21760rm -f conftest.$ac_objext conftest$ac_exeext
21761if { (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
21772
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
21777 ;;
21778 (*)
21779 cf_ldflags_static=yes
21780 ;;
21781 esac
21782
21783else
21784 echo "$as_me: failed program was:" >&5
21785cat conftest.$ac_ext >&5
21786cf_ldflags_static=no
21787fi
21788rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21789
21790 rm -f libconftest.*
21791 LIBS="$cf_save_LIBS"
21792
21793 echo "$as_me:21793: result: $cf_ldflags_static" >&5
21794echo "${ECHO_T}$cf_ldflags_static" >&6
21795
21796 if test $cf_ldflags_static != yes
21797 then
21798 LDFLAGS_STATIC=
21799 LDFLAGS_SHARED=
21800 fi
21801else
21802 LDFLAGS_STATIC=
21803 LDFLAGS_SHARED=
21804fi
21805
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021806 ;;
21807esac
21808
Steve Kondikae271bc2015-11-15 02:50:53 +010021809echo "$as_me:21809: checking where we will install curses.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021810echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010021811
21812includesubdir=
21813if test "$with_overwrite" = no && \
21814 ( test "x$includedir" = 'x${prefix}/include' || \
21815 test "x$includedir" = "x${prefix}/include" )
21816then
21817 includesubdir="/ncurses${USE_LIB_SUFFIX}"
21818fi
21819echo "$as_me:21819: result: ${includedir}${includesubdir}" >&5
21820echo "${ECHO_T}${includedir}${includesubdir}" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021821
21822### Resolve a conflict between normal and wide-curses by forcing applications
21823### that will need libutf8 to add it to their configure script.
21824if test "$with_overwrite" != no ; then
21825if test "$NCURSES_LIBUTF8" = 1 ; then
21826 NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
Steve Kondikae271bc2015-11-15 02:50:53 +010021827 { echo "$as_me:21827: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021828echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21829fi
21830fi
Steve Kondikae271bc2015-11-15 02:50:53 +010021831WITH_OVERWRITE=$with_overwrite
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021832
21833# used to separate tack out of the tree
21834NCURSES_TREE=
21835
21836### predefined stuff for the test programs
Steve Kondikae271bc2015-11-15 02:50:53 +010021837
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021838cat >>confdefs.h <<\EOF
21839#define HAVE_SLK_COLOR 1
21840EOF
21841
21842### Construct the list of subdirectories for which we'll customize makefiles
21843### with the appropriate compile-rules.
21844
Steve Kondikae271bc2015-11-15 02:50:53 +010021845echo "$as_me:21845: checking for src modules" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021846echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21847
21848# dependencies and linker-arguments for test-programs
21849TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21850TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21851if test "$DFT_LWR_MODEL" = "libtool"; then
21852 TEST_ARGS="${TEST_DEPS}"
21853 TEST_ARG2="${TEST_DEP2}"
21854else
Steve Kondikae271bc2015-11-15 02:50:53 +010021855 TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21856 TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021857fi
21858
Steve Kondikae271bc2015-11-15 02:50:53 +010021859PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021860cf_cv_src_modules=
21861for cf_dir in $modules_to_build
21862do
21863 if test -f $srcdir/$cf_dir/modules; then
21864
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
21870 fi
21871 fi
21872
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"
21877 fi
21878
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
21886
21887cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21888
21889 cat >>confdefs.h <<EOF
21890#define HAVE_${cf_have_include}_H 1
21891EOF
21892
21893 cat >>confdefs.h <<EOF
21894#define HAVE_LIB${cf_have_include} 1
21895EOF
21896
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
Steve Kondikae271bc2015-11-15 02:50:53 +010021903 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21904 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021905 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010021906 PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021907 fi
21908 fi
21909done
Steve Kondikae271bc2015-11-15 02:50:53 +010021910echo "$as_me:21910: result: $cf_cv_src_modules" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021911echo "${ECHO_T}$cf_cv_src_modules" >&6
21912
21913TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21914TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21915
Steve Kondikae271bc2015-11-15 02:50:53 +010021916SRC_SUBDIRS=
21917if test "x$cf_with_manpages" != xno ; then
21918 SRC_SUBDIRS="$SRC_SUBDIRS man"
21919fi
21920SRC_SUBDIRS="$SRC_SUBDIRS include"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021921for cf_dir in $cf_cv_src_modules
21922do
21923 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21924done
Steve Kondikae271bc2015-11-15 02:50:53 +010021925if test "x$cf_with_tests" != "xno" ; then
21926 SRC_SUBDIRS="$SRC_SUBDIRS test"
21927fi
21928# always make this, to install the ncurses-config script
21929SRC_SUBDIRS="$SRC_SUBDIRS misc"
21930if 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++"
21933fi
21934
21935test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21936test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021937
21938ADA_SUBDIRS=
Steve Kondikae271bc2015-11-15 02:50:53 +010021939if 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"
21944 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021945fi
21946
21947SUB_MAKEFILES=
21948for cf_dir in $SRC_SUBDIRS
21949do
21950 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21951done
21952
21953if test -n "$ADA_SUBDIRS"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021954 for cf_dir in $ADA_SUBDIRS
21955 do
21956 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21957 done
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021958
21959fi
21960
Steve Kondikae271bc2015-11-15 02:50:53 +010021961if 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"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021964fi
21965
21966DIRS_TO_MAKE="lib"
21967for cf_item in $cf_list_models
21968do
21969
21970 case $cf_item in
Steve Kondikae271bc2015-11-15 02:50:53 +010021971 (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)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021978 cf_subdir='objects' ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021979 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021980 cf_subdir='obj_s' ;;
21981 esac
21982 esac
21983
21984 for cf_item2 in $DIRS_TO_MAKE
21985 do
21986 test $cf_item2 = $cf_subdir && break
21987 done
21988 test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21989done
21990for cf_dir in $DIRS_TO_MAKE
21991do
21992 test ! -d $cf_dir && mkdir $cf_dir
21993done
21994
Steve Kondikae271bc2015-11-15 02:50:53 +010021995# symbols that differ when compiling Ada95 by itself.
21996NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
21997
21998# values to use as strings
21999
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022000cat >>confdefs.h <<EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010022001#define NCURSES_PATHSEP '$PATH_SEPARATOR'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022002EOF
22003
22004cat >>confdefs.h <<EOF
22005#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22006EOF
22007
22008### Now that we're done running tests, add the compiler-warnings, if any
22009
22010cf_fix_cppflags=no
22011cf_new_cflags=
22012cf_new_cppflags=
22013cf_new_extra_cppflags=
22014
22015for cf_add_cflags in $EXTRA_CFLAGS
22016do
22017case $cf_fix_cppflags in
Steve Kondikae271bc2015-11-15 02:50:53 +010022018(no)
22019 case $cf_add_cflags in
22020 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022021 case $cf_add_cflags in
Steve Kondikae271bc2015-11-15 02:50:53 +010022022 (-D*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022023 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22024
Steve Kondikae271bc2015-11-15 02:50:53 +010022025 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22026 && test -z "${cf_tst_cflags}" \
22027 && cf_fix_cppflags=yes
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022028
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
22035 fi
22036 ;;
22037 esac
22038 case "$CPPFLAGS" in
Steve Kondikae271bc2015-11-15 02:50:53 +010022039 (*$cf_add_cflags)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022040 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010022041 (*)
22042 case $cf_add_cflags in
22043 (-D*)
22044 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22045
22046CPPFLAGS=`echo "$CPPFLAGS" | \
22047 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22048 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22049
22050 ;;
22051 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022052 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22053 ;;
22054 esac
22055 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010022056 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022057 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22058 ;;
22059 esac
22060 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010022061(yes)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022062 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22063
22064 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22065
Steve Kondikae271bc2015-11-15 02:50:53 +010022066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22067 && test -z "${cf_tst_cflags}" \
22068 && cf_fix_cppflags=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022069 ;;
22070esac
22071done
22072
22073if test -n "$cf_new_cflags" ; then
22074
22075 CFLAGS="$CFLAGS $cf_new_cflags"
22076fi
22077
22078if test -n "$cf_new_cppflags" ; then
22079
Steve Kondikae271bc2015-11-15 02:50:53 +010022080 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022081fi
22082
22083if test -n "$cf_new_extra_cppflags" ; then
22084
22085 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22086fi
22087
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022088### Define substitutions for header files to avoid name-pollution
22089
Steve Kondikae271bc2015-11-15 02:50:53 +010022090if test "x$cf_cv_have_tcgetattr" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022091 HAVE_TCGETATTR=1
22092else
22093 HAVE_TCGETATTR=0
22094fi
22095
Steve Kondikae271bc2015-11-15 02:50:53 +010022096if test "x$ac_cv_header_stdint_h" = xyes ; then
22097 HAVE_STDINT_H=1
22098else
22099 HAVE_STDINT_H=0
22100fi
22101
22102if test "x$ac_cv_header_termio_h" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022103 HAVE_TERMIO_H=1
22104else
22105 HAVE_TERMIO_H=0
22106fi
22107
Steve Kondikae271bc2015-11-15 02:50:53 +010022108if test "x$ac_cv_header_termios_h" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022109 HAVE_TERMIOS_H=1
22110else
22111 HAVE_TERMIOS_H=0
22112fi
22113
22114################################################################################
Steve Kondikae271bc2015-11-15 02:50:53 +010022115test "x$use_database" = xyes && \
22116SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22117
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022118SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
Steve Kondikae271bc2015-11-15 02:50:53 +010022119SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22120
22121if test "x$enable_pc_files" = xyes ; then \
22122SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22123MAKE_PC_FILES=
22124else
22125MAKE_PC_FILES="#"
22126fi
22127
22128# Extract the first word of "tic", so it can be a program name with args.
22129set dummy tic; ac_word=$2
22130echo "$as_me:22130: checking for $ac_word" >&5
22131echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22132if test "${ac_cv_path_TIC_PATH+set}" = set; then
22133 echo $ECHO_N "(cached) $ECHO_C" >&6
22134else
22135 case $TIC_PATH in
22136 [\\/]* | ?:[\\/]*)
22137 ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22138 ;;
22139 *)
22140 ac_save_IFS=$IFS; IFS=$ac_path_separator
22141ac_dummy="$PATH:/usr/local/ncurses/bin"
22142for 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
22149fi
22150done
22151
22152 test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22153 ;;
22154esac
22155fi
22156TIC_PATH=$ac_cv_path_TIC_PATH
22157
22158if test -n "$TIC_PATH"; then
22159 echo "$as_me:22159: result: $TIC_PATH" >&5
22160echo "${ECHO_T}$TIC_PATH" >&6
22161else
22162 echo "$as_me:22162: result: no" >&5
22163echo "${ECHO_T}no" >&6
22164fi
22165
22166if test -n "$FALLBACK_LIST"
22167then
22168 if test "$TIC_PATH" = unknown
22169 then
22170 { echo "$as_me:22170: WARNING: no tic program found for fallbacks" >&5
22171echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22172 fi
22173fi
22174
22175if test "x$cf_with_tests" != xno ; then
22176 MAKE_TESTS=
22177else
22178 MAKE_TESTS="#"
22179fi
22180
22181ADAHTML_DIR=../../doc/html/ada
22182
22183# these could be configurable, but are not currently
22184PANEL_NAME=panel
22185MENU_NAME=menu
22186FORM_NAME=form
22187CXX_NAME=ncurses++
22188
22189# workaround for g++ versus Solaris (20131116)
22190case $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
22195
22196echo "${as_me:-configure}:22196: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22197
22198 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22199 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22200 ;;
22201 esac
22202 ;;
22203esac
22204
22205# Help to automatically enable the extended curses features when using either
22206# the *-config or the ".pc" files by adding defines.
22207echo "$as_me:22207: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22208echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22209PKG_CFLAGS=
22210for cf_loop1 in $CPPFLAGS_after_XOPEN
22211do
22212 cf_found=no
22213 for cf_loop2 in $CPPFLAGS_before_XOPEN
22214 do
22215 if test "x$cf_loop1" = "x$cf_loop2"
22216 then
22217 cf_found=yes
22218 break
22219 fi
22220 done
22221 test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22222done
22223echo "$as_me:22223: result: $PKG_CFLAGS" >&5
22224echo "${ECHO_T}$PKG_CFLAGS" >&6
22225
22226# AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this.
22227case "x$NCURSES_OSPEED" in
22228(*short*)
22229 cf_compatible=1
22230 ;;
22231(*)
22232 cf_compatible=0
22233 ;;
22234esac
22235
22236cat >>confdefs.h <<EOF
22237#define NCURSES_OSPEED_COMPAT $cf_compatible
22238EOF
22239
22240case "x$cf_cv_typeof_chtype" in
22241(xshort|xint|xlong)
22242 cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22243 ;;
22244esac
22245
22246case "x$cf_cv_typeof_mmask_t" in
22247(xshort|xint|xlong)
22248 cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22249 ;;
22250esac
22251
22252# substitute into misc/Makefile to suppress
22253# (un)install.data from the
22254# (un)install rules.
22255if test "x$cf_with_db_install" = "xno"; then
22256 MISC_INSTALL_DATA=
22257 MISC_UNINSTALL_DATA=
22258else
22259 MISC_INSTALL_DATA=install.data
22260 MISC_UNINSTALL_DATA=uninstall.data
22261fi
22262
22263SUB_SCRIPTS=
22264
22265if test -n "$PACKAGE"
22266then
22267 PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22268 export PACKAGE
22269 echo "package: $PACKAGE"
22270fi
22271
22272UNALTERED_SYMS=
22273cf_filter_syms=no
22274
22275if test -n "$RESULTING_SYMS"
22276then
22277 cf_filter_syms=$cf_dft_filter_syms
22278 test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_version" 1>&6
22279
22280echo "${as_me:-configure}:22280: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22281
22282fi
22283
22284if test "x$WILDCARD_SYMS" = xno
22285then
22286 cf_filter_syms=yes
22287fi
22288
22289UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22290if test $cf_filter_syms = yes
22291then
22292 RESULTING_SYMS=resulting.map
22293fi
22294
22295if test "x$cross_compiling" = xyes ; then
22296 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22297else
22298 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22299fi
22300
22301ac_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"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022302ac_config_commands="$ac_config_commands default"
22303cat >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.
22309#
22310# config.status only pays attention to the cache file if you give it
22311# the --recheck option to rerun configure.
22312#
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.
22316
22317_ACEOF
22318
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.
22324{
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"
22333 ;;
22334 *)
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"
22338 ;;
22339 esac;
22340} |
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
22348if 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"
22354 fi
22355fi
22356rm -f confcache
22357
22358test "x$prefix" = xNONE && prefix=$ac_default_prefix
22359# Let make expand exec_prefix.
22360test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22361
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).
22366if test "x$srcdir" = x.; then
22367 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22368s/:*\$(srcdir):*/:/;
22369s/:*\${srcdir}:*/:/;
22370s/:*@srcdir@:*/:/;
22371s/^\([^=]*=[ ]*\):*/\1/;
22372s/:*$//;
22373s/^[^=]*=[ ]*$//;
22374}'
22375fi
22376
22377DEFS=-DHAVE_CONFIG_H
22378
22379: ${CONFIG_STATUS=./config.status}
22380ac_clean_files_save=$ac_clean_files
22381ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Steve Kondikae271bc2015-11-15 02:50:53 +010022382{ echo "$as_me:22382: creating $CONFIG_STATUS" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022383echo "$as_me: creating $CONFIG_STATUS" >&6;}
22384cat >$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.
22390
22391debug=false
22392SHELL=\${CONFIG_SHELL-$SHELL}
22393ac_cs_invocation="\$0 \$@"
22394
22395_ACEOF
22396
22397cat >>$CONFIG_STATUS <<\_ACEOF
22398# Be Bourne compatible
22399if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22400 emulate sh
22401 NULLCMD=:
22402elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22403 set -o posix
22404fi
22405
22406# Name of the executable.
22407as_me=`echo "$0" |sed 's,.*[\\/],,'`
22408
22409if expr a : '\(a\)' >/dev/null 2>&1; then
22410 as_expr=expr
22411else
22412 as_expr=false
22413fi
22414
22415rm -f conf$$ conf$$.exe conf$$.file
22416echo >conf$$.file
22417if 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'
22425 fi
22426elif ln conf$$.file conf$$ 2>/dev/null; then
22427 as_ln_s=ln
22428else
22429 as_ln_s='cp -p'
22430fi
22431rm -f conf$$ conf$$.exe conf$$.file
22432
22433as_executable_p="test -f"
22434
22435# Support unset when possible.
22436if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22437 as_unset=unset
22438else
22439 as_unset=false
22440fi
22441
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; }
22451
22452# IFS
22453# We need space, tab and new line, in precisely that order.
22454as_nl='
22455'
22456IFS=" $as_nl"
22457
22458# CDPATH.
22459$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22460
22461exec 6>&1
22462
22463_ACEOF
22464
22465# Files that config.status was made for.
22466if test -n "$ac_config_files"; then
22467 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22468fi
22469
22470if test -n "$ac_config_headers"; then
22471 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22472fi
22473
22474if test -n "$ac_config_links"; then
22475 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22476fi
22477
22478if test -n "$ac_config_commands"; then
22479 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22480fi
22481
22482cat >>$CONFIG_STATUS <<\EOF
22483
22484ac_cs_usage="\
22485\`$as_me' instantiates files from templates according to the
22486current configuration.
22487
22488Usage: $0 [OPTIONS] [FILE]...
22489
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
22498
22499Configuration files:
22500$config_files
22501
22502Configuration headers:
22503$config_headers
22504
22505Configuration commands:
22506$config_commands
22507
Steve Kondikae271bc2015-11-15 02:50:53 +010022508Report bugs to <dickey@invisible-island.net>."
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022509EOF
22510
22511cat >>$CONFIG_STATUS <<EOF
22512ac_cs_version="\\
22513config.status
Steve Kondikae271bc2015-11-15 02:50:53 +010022514configured by $0, generated by GNU Autoconf 2.52.20141204,
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022515 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22516
22517Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22518Free Software Foundation, Inc.
22519This config.status script is free software; the Free Software Foundation
22520gives unlimited permission to copy, distribute and modify it."
22521srcdir=$srcdir
22522INSTALL="$INSTALL"
22523EOF
22524
22525cat >>$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.
22528ac_need_defaults=:
22529while test $# != 0
22530do
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
22538 ;;
22539 -*);;
22540 *) # This is not an option, so the user has probably given explicit
22541 # arguments.
22542 ac_need_defaults=false;;
22543 esac
22544
22545 case $1 in
22546 # Handling of the options.
22547EOF
22548cat >>$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 ;;
22552EOF
22553cat >>$CONFIG_STATUS <<\EOF
22554 --version | --vers* | -V )
22555 echo "$ac_cs_version"; exit 0 ;;
22556 --he | --h)
22557 # Conflict between --help and --header
Steve Kondikae271bc2015-11-15 02:50:53 +010022558 { { echo "$as_me:22558: error: ambiguous option: $1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022559Try \`$0 --help' for more information." >&5
22560echo "$as_me: error: ambiguous option: $1
22561Try \`$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;;
22575
22576 # This is an error.
Steve Kondikae271bc2015-11-15 02:50:53 +010022577 -*) { { echo "$as_me:22577: error: unrecognized option: $1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022578Try \`$0 --help' for more information." >&5
22579echo "$as_me: error: unrecognized option: $1
22580Try \`$0 --help' for more information." >&2;}
22581 { (exit 1); exit 1; }; } ;;
22582
22583 *) ac_config_targets="$ac_config_targets $1" ;;
22584
22585 esac
22586 shift
22587done
22588
22589exec 5>>config.log
22590cat >&5 << _ACEOF
22591
22592## ----------------------- ##
22593## Running config.status. ##
22594## ----------------------- ##
22595
Steve Kondikae271bc2015-11-15 02:50:53 +010022596This file was extended by $as_me 2.52.20141204, executed with
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022597 CONFIG_FILES = $CONFIG_FILES
22598 CONFIG_HEADERS = $CONFIG_HEADERS
22599 CONFIG_LINKS = $CONFIG_LINKS
22600 CONFIG_COMMANDS = $CONFIG_COMMANDS
22601 > $ac_cs_invocation
22602on `(hostname || uname -n) 2>/dev/null | sed 1q`
22603
22604_ACEOF
22605EOF
22606
22607cat >>$CONFIG_STATUS <<EOF
22608#
22609# INIT-COMMANDS section.
22610#
22611
22612### Special initialization commands, used to pass information from the
22613### configuration-run into config.status
22614
22615AWK="$AWK"
Steve Kondikae271bc2015-11-15 02:50:53 +010022616ALTERNATE_SYMS="$ALTERNATE_SYMS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022617DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22618DFT_LWR_MODEL="$DFT_LWR_MODEL"
Steve Kondikae271bc2015-11-15 02:50:53 +010022619ECHO_LD="$ECHO_LD"
22620EXTRA_SUFFIX="$EXTRA_SUFFIX"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022621LDCONFIG="$LDCONFIG"
Steve Kondikae271bc2015-11-15 02:50:53 +010022622LIBTOOL_VERSION="$LIBTOOL_VERSION"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022623LIB_NAME="$LIB_NAME"
Steve Kondikae271bc2015-11-15 02:50:53 +010022624LIB_PREFIX="$LIB_PREFIX"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022625LIB_SUBSETS="$LIB_SUBSETS"
22626LIB_SUFFIX="$LIB_SUFFIX"
22627LIB_TRACING="$LIB_TRACING"
Steve Kondikae271bc2015-11-15 02:50:53 +010022628LN_S="$LN_S"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022629MAKE_TERMINFO="$MAKE_TERMINFO"
22630NCURSES_MAJOR="$NCURSES_MAJOR"
22631NCURSES_MINOR="$NCURSES_MINOR"
22632NCURSES_OSPEED="$NCURSES_OSPEED"
22633NCURSES_PATCH="$NCURSES_PATCH"
22634SRC_SUBDIRS="$SRC_SUBDIRS"
22635TERMINFO="$TERMINFO"
Steve Kondikae271bc2015-11-15 02:50:53 +010022636TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22637TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22638TICS_NAME="$TICS_NAME"
22639TIC_PATH="$TIC_PATH"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022640TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22641TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22642TINFO_NAME="$TINFO_NAME"
22643TINFO_SUFFIX="$TINFO_SUFFIX"
Steve Kondikae271bc2015-11-15 02:50:53 +010022644UNALTERED_SYMS="$UNALTERED_SYMS"
22645USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22646USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22647USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22648USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22649WILDCARD_SYMS="$WILDCARD_SYMS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022650WITH_CURSES_H="$with_curses_h"
Steve Kondikae271bc2015-11-15 02:50:53 +010022651WITH_ECHO="${enable_echo:=yes}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022652WITH_OVERWRITE="$with_overwrite"
22653cf_LIST_MODELS="$cf_list_models"
22654cf_cv_abi_version="$cf_cv_abi_version"
22655cf_cv_do_relink="$cf_cv_do_relink"
22656cf_cv_do_symlinks="$cf_cv_do_symlinks"
22657cf_cv_enable_lp64="$cf_cv_enable_lp64"
22658cf_cv_enable_opaque="$cf_cv_enable_opaque"
22659cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22660cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
Steve Kondikae271bc2015-11-15 02:50:53 +010022661cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022662cf_cv_rel_version="$cf_cv_rel_version"
22663cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22664cf_cv_shared_soname='$cf_cv_shared_soname'
22665cf_cv_shlib_version="$cf_cv_shlib_version"
22666cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22667cf_cv_system_name="$cf_cv_system_name"
Steve Kondikae271bc2015-11-15 02:50:53 +010022668cf_cv_term_driver="$with_term_driver"
22669cf_with_ada="$cf_with_ada"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022670cf_with_cxx_binding="$cf_with_cxx_binding"
Steve Kondikae271bc2015-11-15 02:50:53 +010022671cf_with_db_install="$cf_with_db_install"
22672cf_with_manpages="$cf_with_manpages"
22673cf_with_tests="$cf_with_tests"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022674host="$host"
22675target="$target"
Steve Kondikae271bc2015-11-15 02:50:53 +010022676with_shared_cxx="$with_shared_cxx"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022677
22678EOF
22679
22680cat >>$CONFIG_STATUS <<\EOF
22681for ac_config_target in $ac_config_targets
22682do
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" ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010022687 "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022688 "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22689 "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010022690 "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022691 "$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" ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010022695 *) { { echo "$as_me:22695: error: invalid argument: $ac_config_target" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022696echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22697 { (exit 1); exit 1; }; };;
22698 esac
22699done
22700
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.
22705if $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
22709fi
22710
22711# Create a temporary directory, and hook for its removal unless debugging.
22712$debug ||
22713{
22714 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22715 trap '{ (exit 1); exit 1; }' 1 2 13 15
22716}
22717
22718# Create a (secure) tmp directory for tmp files.
22719: ${TMPDIR=/tmp}
22720{
22721 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22722 test -n "$tmp" && test -d "$tmp"
22723} ||
22724{
22725 tmp=$TMPDIR/cs$$-$RANDOM
22726 (umask 077 && mkdir $tmp)
22727} ||
22728{
22729 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22730 { (exit 1); exit 1; }
22731}
22732
22733EOF
22734
22735cat >>$CONFIG_STATUS <<EOF
22736
22737#
22738# CONFIG_FILES section.
22739#
22740
22741# No need to generate the scripts if there are no CONFIG_FILES.
22742# This happens for instance when ./config.status config.h
22743if 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
22747s,@SHELL@,$SHELL,;t t
22748s,@exec_prefix@,$exec_prefix,;t t
22749s,@prefix@,$prefix,;t t
22750s,@program_transform_name@,$program_transform_name,;t t
22751s,@bindir@,$bindir,;t t
22752s,@sbindir@,$sbindir,;t t
22753s,@libexecdir@,$libexecdir,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022754s,@datarootdir@,$datarootdir,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022755s,@datadir@,$datadir,;t t
22756s,@sysconfdir@,$sysconfdir,;t t
22757s,@sharedstatedir@,$sharedstatedir,;t t
22758s,@localstatedir@,$localstatedir,;t t
22759s,@libdir@,$libdir,;t t
22760s,@includedir@,$includedir,;t t
22761s,@oldincludedir@,$oldincludedir,;t t
22762s,@infodir@,$infodir,;t t
22763s,@mandir@,$mandir,;t t
22764s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22765s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22766s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22767s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22768s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22769s,@build_alias@,$build_alias,;t t
22770s,@host_alias@,$host_alias,;t t
22771s,@target_alias@,$target_alias,;t t
22772s,@ECHO_C@,$ECHO_C,;t t
22773s,@ECHO_N@,$ECHO_N,;t t
22774s,@ECHO_T@,$ECHO_T,;t t
22775s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22776s,@DEFS@,$DEFS,;t t
22777s,@LIBS@,$LIBS,;t t
22778s,@top_builddir@,$top_builddir,;t t
22779s,@EGREP@,$EGREP,;t t
22780s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22781s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22782s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22783s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22784s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22785s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22786s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22787s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022788s,@VERSION@,$VERSION,;t t
22789s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22790s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22791s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22792s,@PACKAGE@,$PACKAGE,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022793s,@build@,$build,;t t
22794s,@build_cpu@,$build_cpu,;t t
22795s,@build_vendor@,$build_vendor,;t t
22796s,@build_os@,$build_os,;t t
22797s,@host@,$host,;t t
22798s,@host_cpu@,$host_cpu,;t t
22799s,@host_vendor@,$host_vendor,;t t
22800s,@host_os@,$host_os,;t t
22801s,@target@,$target,;t t
22802s,@target_cpu@,$target_cpu,;t t
22803s,@target_vendor@,$target_vendor,;t t
22804s,@target_os@,$target_os,;t t
22805s,@CC@,$CC,;t t
22806s,@CFLAGS@,$CFLAGS,;t t
22807s,@LDFLAGS@,$LDFLAGS,;t t
22808s,@CPPFLAGS@,$CPPFLAGS,;t t
22809s,@ac_ct_CC@,$ac_ct_CC,;t t
22810s,@EXEEXT@,$EXEEXT,;t t
22811s,@OBJEXT@,$OBJEXT,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022812s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022813s,@CPP@,$CPP,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022814s,@LDCONFIG@,$LDCONFIG,;t t
22815s,@CXX@,$CXX,;t t
22816s,@CXXFLAGS@,$CXXFLAGS,;t t
22817s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22818s,@AWK@,$AWK,;t t
22819s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22820s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22821s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22822s,@LINT@,$LINT,;t t
22823s,@LINT_OPTS@,$LINT_OPTS,;t t
22824s,@LN_S@,$LN_S,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022825s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22826s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22827s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22828s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22829s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022830s,@SET_MAKE@,$SET_MAKE,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022831s,@CTAGS@,$CTAGS,;t t
22832s,@ETAGS@,$ETAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022833s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22834s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22835s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22836s,@RANLIB@,$RANLIB,;t t
22837s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22838s,@LD@,$LD,;t t
22839s,@ac_ct_LD@,$ac_ct_LD,;t t
22840s,@AR@,$AR,;t t
22841s,@ac_ct_AR@,$ac_ct_AR,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022842s,@NM@,$NM,;t t
22843s,@ac_ct_NM@,$ac_ct_NM,;t t
22844s,@ARFLAGS@,$ARFLAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022845s,@DESTDIR@,$DESTDIR,;t t
22846s,@BUILD_CC@,$BUILD_CC,;t t
22847s,@BUILD_CPP@,$BUILD_CPP,;t t
22848s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22849s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22850s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22851s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22852s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22853s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22854s,@cf_list_models@,$cf_list_models,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022855s,@ABI_VERSION@,$ABI_VERSION,;t t
22856s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022857s,@LIBTOOL@,$LIBTOOL,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022858s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22859s,@LT_UNDEF@,$LT_UNDEF,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022860s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22861s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22862s,@LIB_CREATE@,$LIB_CREATE,;t t
22863s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22864s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22865s,@LIB_PREP@,$LIB_PREP,;t t
22866s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22867s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22868s,@LIB_LINK@,$LIB_LINK,;t t
22869s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22870s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22871s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22872s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22873s,@TICS_NAME@,$TICS_NAME,;t t
22874s,@TINFO_NAME@,$TINFO_NAME,;t t
22875s,@LIB_NAME@,$LIB_NAME,;t t
22876s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22877s,@CC_G_OPT@,$CC_G_OPT,;t t
22878s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22879s,@LD_MODEL@,$LD_MODEL,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022880s,@shlibdir@,$shlibdir,;t t
22881s,@MAKE_DLLS@,$MAKE_DLLS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022882s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022883s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022884s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22885s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022886s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022887s,@LINK_PROGS@,$LINK_PROGS,;t t
22888s,@LINK_TESTS@,$LINK_TESTS,;t t
22889s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22890s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22891s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22892s,@INSTALL_LIB@,$INSTALL_LIB,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022893s,@RPATH_LIST@,$RPATH_LIST,;t t
22894s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22895s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22896s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22897s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22898s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22899s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022900s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022901s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022902s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22903s,@WHICH_XTERM@,$WHICH_XTERM,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022904s,@XTERM_KBS@,$XTERM_KBS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022905s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22906s,@TERMINFO@,$TERMINFO,;t t
22907s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22908s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22909s,@TERMPATH@,$TERMPATH,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022910s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022911s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22912s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22913s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22914s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22915s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22916s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22917s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22918s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22919s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22920s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22921s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22922s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22923s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22924s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022925s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22926s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022927s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22928s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022929s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22930s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22931s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022932s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22933s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22934s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22935s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22936s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022937s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022938s,@PTHREAD@,$PTHREAD,;t t
22939s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22940s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22941s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22942s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022943s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22944s,@ECHO_LT@,$ECHO_LT,;t t
22945s,@ECHO_LD@,$ECHO_LD,;t t
22946s,@RULE_CC@,$RULE_CC,;t t
22947s,@SHOW_CC@,$SHOW_CC,;t t
22948s,@ECHO_CC@,$ECHO_CC,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022949s,@ECHO_LINK@,$ECHO_LINK,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022950s,@ADAFLAGS@,$ADAFLAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022951s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22952s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22953s,@ADA_TRACE@,$ADA_TRACE,;t t
22954s,@MATH_LIB@,$MATH_LIB,;t t
22955s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22956s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22957s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22958s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22959s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22960s,@TEST_LIBS@,$TEST_LIBS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022961s,@TEST_LIBS2@,$TEST_LIBS2,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022962s,@CXXCPP@,$CXXCPP,;t t
22963s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22964s,@CXX_AR@,$CXX_AR,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022965s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022966s,@CXXLIBS@,$CXXLIBS,;t t
22967s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22968s,@gnat_exists@,$gnat_exists,;t t
22969s,@M4_exists@,$M4_exists,;t t
22970s,@cf_ada_make@,$cf_ada_make,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022971s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022972s,@cf_compile_generics@,$cf_compile_generics,;t t
22973s,@cf_generic_objects@,$cf_generic_objects,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022974s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22975s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22976s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22977s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22978s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22979s,@cf_ada_package@,$cf_ada_package,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022980s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22981s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022982s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22983s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022984s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22985s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22986s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22987s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22988s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022989s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
22990s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
22991s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022992s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22993s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22994s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010022995s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22996s,@TICS_LIBS@,$TICS_LIBS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022997s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22998s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22999s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010023000s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23001s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23002s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023003s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23004s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010023005s,@includesubdir@,$includesubdir,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023006s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23007s,@TICS_LIST@,$TICS_LIST,;t t
23008s,@TINFO_LIST@,$TINFO_LIST,;t t
23009s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23010s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23011s,@TEST_ARGS@,$TEST_ARGS,;t t
23012s,@TEST_DEPS@,$TEST_DEPS,;t t
23013s,@TEST_ARG2@,$TEST_ARG2,;t t
23014s,@TEST_DEP2@,$TEST_DEP2,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010023015s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023016s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23017s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010023018s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023019s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010023020s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023021s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23022s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010023023s,@cross_compiling@,$cross_compiling,;t t
23024s,@TIC_PATH@,$TIC_PATH,;t t
23025s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23026s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23027s,@PANEL_NAME@,$PANEL_NAME,;t t
23028s,@MENU_NAME@,$MENU_NAME,;t t
23029s,@FORM_NAME@,$FORM_NAME,;t t
23030s,@CXX_NAME@,$CXX_NAME,;t t
23031s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23032s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23033s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23034s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23035s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023036CEOF
23037
23038EOF
23039
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
23054 fi
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"
23068 fi
23069 ac_sed_frag=`expr $ac_sed_frag + 1`
23070 ac_beg=$ac_end
23071 ac_end=`expr $ac_end + $ac_max_sed_lines`
23072 fi
23073 done
23074 if test -z "$ac_sed_cmds"; then
23075 ac_sed_cmds=cat
23076 fi
23077fi # test -n "$CONFIG_FILES"
23078
23079EOF
23080cat >>$CONFIG_STATUS <<\EOF
23081for 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
23092
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 ||
23099echo 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=.;;
23109esac
23110as_dummy="$ac_dir"
23111for 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 ;;
23115 *)
23116 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23117 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23118 ;;
23119 esac
23120done; }
23121
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=
23127 fi
23128
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
23143
23144 case $INSTALL in
23145 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23146 *) ac_INSTALL=$ac_dots$INSTALL ;;
23147 esac
23148
23149 if test x"$ac_file" != x-; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023150 { echo "$as_me:23150: creating $ac_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023151echo "$as_me: creating $ac_file" >&6;}
23152 rm -f "$ac_file"
23153 fi
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."
23159
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=:)
Steve Kondikae271bc2015-11-15 02:50:53 +010023168 test -f "$f" || { { echo "$as_me:23168: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023169echo "$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
Steve Kondikae271bc2015-11-15 02:50:53 +010023181 { { echo "$as_me:23181: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023182echo "$as_me: error: cannot find input file: $f" >&2;}
23183 { (exit 1); exit 1; }; }
23184 fi;;
23185 esac
23186 done` || { (exit 1); exit 1; }
23187EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010023188cat >>$CONFIG_STATUS <<\EOF
23189 ac_warn_datarootdir=no
23190 if test x"$ac_file" != x-; then
23191 for ac_item in $ac_file_inputs
23192 do
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
23199echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23200$ac_seen" >&2;}
23201 ac_warn_datarootdir=yes
23202 fi
23203 fi
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
23208echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23209$ac_seen" >&2;}
23210 ac_warn_datarootdir=yes
23211 fi
23212 done
23213 fi
23214
23215if 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'"
23217fi
23218
23219EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023220cat >>$CONFIG_STATUS <<EOF
23221 sed "$ac_vpsub
23222$extrasub
23223EOF
23224cat >>$CONFIG_STATUS <<\EOF
23225:t
23226/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23227s,@configure_input@,$configure_input,;t t
23228s,@srcdir@,$ac_srcdir,;t t
23229s,@top_srcdir@,$ac_top_srcdir,;t t
23230s,@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
Steve Kondikae271bc2015-11-15 02:50:53 +010023234 cp $tmp/out $ac_file
23235
23236 for ac_name in prefix exec_prefix datarootdir
23237 do
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
23245echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23246$ac_seen" >&2;}
23247 fi
23248 fi
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
23256echo "$as_me: WARNING: Some variables may not be substituted:
23257$ac_seen" >&2;}
23258 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023259 else
23260 cat $tmp/out
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023261 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010023262 rm -f $tmp/out
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023263
23264done
23265EOF
23266cat >>$CONFIG_STATUS <<\EOF
23267
23268#
23269# CONFIG_HEADER section.
23270#
23271
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.
23274#
23275# ac_d sets the value in "#define NAME VALUE" lines.
23276ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23277ac_dB='[ ].*$,\1#\2'
23278ac_dC=' '
23279ac_dD=',;t'
23280# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23281ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23282ac_iB='\([ ]\),\1#\2define\3'
23283ac_iC=' '
23284ac_iD='\4,;t'
23285# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23286ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23287ac_uB='$,\1#\2define\3'
23288ac_uC=' '
23289ac_uD=',;t'
23290
23291for 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
23302
Steve Kondikae271bc2015-11-15 02:50:53 +010023303 test x"$ac_file" != x- && { echo "$as_me:23303: creating $ac_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023304echo "$as_me: creating $ac_file" >&6;}
23305
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=:)
Steve Kondikae271bc2015-11-15 02:50:53 +010023314 test -f "$f" || { { echo "$as_me:23314: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023315echo "$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
Steve Kondikae271bc2015-11-15 02:50:53 +010023327 { { echo "$as_me:23327: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023328echo "$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
23335
23336EOF
23337
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'.
23341cat confdefs.h | uniq >conftest.vals
23342
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.
23345
23346rm -f conftest.tail
23347echo ' rm -f conftest.frag' >> $CONFIG_STATUS
23348while grep . conftest.vals >/dev/null
23349do
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
23357done
23358rm -f conftest.vals
23359
23360# Run sed to substitute the contents of conftest.frag into $tmp/in at the
23361# marker @DEFS@.
23362echo ' cat >> conftest.edit <<CEOF
23363/@DEFS@/r conftest.frag
23364/@DEFS@/d
23365CEOF
23366sed -f conftest.edit $tmp/in > $tmp/out
23367rm -f $tmp/in
23368mv $tmp/out $tmp/in
23369rm -f conftest.edit conftest.frag
23370' >> $CONFIG_STATUS
23371
23372cat >>$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
23380 fi
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
Steve Kondikae271bc2015-11-15 02:50:53 +010023385 { echo "$as_me:23385: $ac_file is unchanged" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023386echo "$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 ||
23393echo 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=.;;
23403esac
23404as_dummy="$ac_dir"
23405for 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 ;;
23409 *)
23410 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23411 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23412 ;;
23413 esac
23414done; }
23415
23416 fi
23417 rm -f $ac_file
23418 mv $tmp/config.h $ac_file
23419 fi
23420 else
23421 cat $tmp/config.h
23422 rm -f $tmp/config.h
23423 fi
23424done
23425EOF
23426cat >>$CONFIG_STATUS <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023427#
23428# CONFIG_COMMANDS section.
23429#
23430for 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,[^:]*:,,'`
23433
23434 case $ac_dest in
23435 default )
Steve Kondikae271bc2015-11-15 02:50:53 +010023436if test "x$cf_with_tests" != xno ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023437
23438for cf_dir in test
23439do
23440 if test ! -d $srcdir/$cf_dir; then
23441 continue
23442 elif test -f $srcdir/$cf_dir/programs; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023443 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023444 fi
23445done
23446
Steve Kondikae271bc2015-11-15 02:50:53 +010023447fi
23448
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023449cf_prefix=$LIB_PREFIX
23450
Steve Kondikae271bc2015-11-15 02:50:53 +010023451case $cf_cv_shlib_version in
23452(cygdll|msysdll|mingw)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023453 TINFO_NAME=$TINFO_ARG_SUFFIX
23454 TINFO_SUFFIX=.dll
Steve Kondikae271bc2015-11-15 02:50:53 +010023455 ;;
23456esac
23457
23458if 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'//'`
23463 ;;
23464 (t*)
23465 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23466 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23467 ;;
23468 (w*)
23469 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23470 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23471 ;;
23472 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023473fi
23474
23475for cf_dir in $SRC_SUBDIRS
23476do
23477 if test ! -d $srcdir/$cf_dir ; then
23478 continue
23479 elif test -f $srcdir/$cf_dir/modules; then
23480
23481 SHARED_LIB=
Steve Kondikae271bc2015-11-15 02:50:53 +010023482 Libs_To_Make=
23483
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\""
23489 fi
23490
23491 if test "x$WILDCARD_SYMS" = xno
23492 then
23493 cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23494 fi
23495
23496 if test "x$cf_sed_options" != "x"
23497 then
23498 cat >>$cf_dir/Makefile <<CF_EOF
23499
23500# Generated by CF_LIB_RULES
23501resulting.map: $UNALTERED_SYMS
23502 sed $cf_sed_options < $UNALTERED_SYMS >\$@
23503
23504clean::
23505 rm -f resulting.map
23506CF_EOF
23507 fi
23508
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023509 for cf_item in $cf_LIST_MODELS
23510 do
23511
Steve Kondikae271bc2015-11-15 02:50:53 +010023512 case X$cf_item in
23513 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023514 cf_suffix='.la'
23515 cf_depsuf=$cf_suffix
23516 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023517 (Xdebug)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023518 cf_suffix='_g.a'
23519 cf_depsuf=$cf_suffix
23520 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023521 (Xprofile)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023522 cf_suffix='_p.a'
23523 cf_depsuf=$cf_suffix
23524 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023525 (Xshared)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023526 case $cf_cv_system_name in
Steve Kondikae271bc2015-11-15 02:50:53 +010023527 (aix[5-7]*)
23528 cf_suffix='.so'
23529 cf_depsuf=$cf_suffix
23530 ;;
23531 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023532 cf_suffix='.dll'
23533 cf_depsuf='.dll.a'
23534 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023535 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023536 cf_suffix='.dylib'
23537 cf_depsuf=$cf_suffix
23538 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023539 (hpux*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023540 case $target in
Steve Kondikae271bc2015-11-15 02:50:53 +010023541 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023542 cf_suffix='.so'
23543 cf_depsuf=$cf_suffix
23544 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023545 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023546 cf_suffix='.sl'
23547 cf_depsuf=$cf_suffix
23548 ;;
23549 esac
23550 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023551 (*)
23552 cf_suffix='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023553 cf_depsuf=$cf_suffix
23554 ;;
23555 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023556 ;;
23557 (*)
23558 cf_suffix='.a'
23559 cf_depsuf=$cf_suffix
23560 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023561 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023562 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}"
23566 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023567
Steve Kondikae271bc2015-11-15 02:50:53 +010023568 cf_libname=$cf_dir
23569 test "$cf_dir" = c++ && cf_libname=ncurses++
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023570 if test $cf_item = shared ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023571 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"
23576 fi
23577 if test "$cf_cv_do_symlinks" = yes ; then
23578 cf_version_name=
23579
23580 case "$cf_cv_shlib_version" in
23581 (rel)
23582 cf_version_name=REL_VERSION
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023583 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023584 (abi)
23585 cf_version_name=ABI_VERSION
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023586 ;;
23587 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023588
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"
23595 ;;
23596 (*)
23597 cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23598 ;;
23599 esac
23600 fi
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"
23606 fi
23607 fi
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}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023615 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023616 (msysdll)
23617 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23618 cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23619 ;;
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}"
23623 ;;
23624 (*)
23625 cf_add_lib=
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023626 ;;
23627 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023628 if test -n "$cf_add_lib"
23629 then
23630 Libs_To_Make="$Libs_To_Make $cf_add_lib"
23631 continue
23632 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023633 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010023634 cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23635 Libs_To_Make="$Libs_To_Make $cf_add_lib"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023636 done
23637
23638 if test $cf_dir = ncurses ; then
23639 cf_subsets="$LIB_SUBSETS"
23640 cf_r_parts="$cf_subsets"
Steve Kondikae271bc2015-11-15 02:50:53 +010023641 cf_liblist="$Libs_To_Make"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023642
23643 while test -n "$cf_r_parts"
23644 do
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
Steve Kondikae271bc2015-11-15 02:50:53 +010023648 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`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023652 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023653 (*ticlib*)
23654 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023655 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023656 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023657 break
23658 ;;
23659 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023660 if test -n "$cf_add_lib"; then
23661 Libs_To_Make="$cf_add_lib $Libs_To_Make"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023662 fi
23663 else
23664 break
23665 fi
23666 done
23667 else
23668 cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23669 fi
23670
Steve Kondikae271bc2015-11-15 02:50:53 +010023671 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
23675 do
23676 case $cf_item in
23677 (*.a)
23678 ;;
23679 (*)
23680 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23681 ;;
23682 esac
23683 for cf_test in $cf_list
23684 do
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
23690 fi
23691 done
23692 test -n "$cf_item" && cf_list="$cf_list $cf_item"
23693 done
23694 Libs_To_Make="$cf_list"
23695 fi
23696 fi
23697
23698 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023699 -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23700 $cf_dir/Makefile >$cf_dir/Makefile.out
23701 mv $cf_dir/Makefile.out $cf_dir/Makefile
23702
23703 $AWK -f $srcdir/mk-0th.awk \
Steve Kondikae271bc2015-11-15 02:50:53 +010023704 libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023705 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23706
23707 for cf_subset in $cf_subsets
23708 do
23709 cf_subdirs=
23710 for cf_item in $cf_LIST_MODELS
23711 do
Steve Kondikae271bc2015-11-15 02:50:53 +010023712
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023713 echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23714
23715cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23716
Steve Kondikae271bc2015-11-15 02:50:53 +010023717 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
23722
23723echo "${as_me:-configure}:23723: testing overriding CXX_MODEL to SHARED ..." 1>&5
23724
23725 with_shared_cxx=yes
23726 ;;
23727 (*)
23728 test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23729 ;;
23730 esac
23731 fi
23732
23733 case X$cf_item in
23734 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023735 cf_suffix='.la'
23736 cf_depsuf=$cf_suffix
23737 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023738 (Xdebug)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023739 cf_suffix='_g.a'
23740 cf_depsuf=$cf_suffix
23741 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023742 (Xprofile)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023743 cf_suffix='_p.a'
23744 cf_depsuf=$cf_suffix
23745 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023746 (Xshared)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023747 case $cf_cv_system_name in
Steve Kondikae271bc2015-11-15 02:50:53 +010023748 (aix[5-7]*)
23749 cf_suffix='.so'
23750 cf_depsuf=$cf_suffix
23751 ;;
23752 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023753 cf_suffix='.dll'
23754 cf_depsuf='.dll.a'
23755 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023756 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023757 cf_suffix='.dylib'
23758 cf_depsuf=$cf_suffix
23759 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023760 (hpux*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023761 case $target in
Steve Kondikae271bc2015-11-15 02:50:53 +010023762 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023763 cf_suffix='.so'
23764 cf_depsuf=$cf_suffix
23765 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023766 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023767 cf_suffix='.sl'
23768 cf_depsuf=$cf_suffix
23769 ;;
23770 esac
23771 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023772 (*)
23773 cf_suffix='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023774 cf_depsuf=$cf_suffix
23775 ;;
23776 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023777 ;;
23778 (*)
23779 cf_suffix='.a'
23780 cf_depsuf=$cf_suffix
23781 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023782 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023783 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}"
23787 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023788
23789 case $cf_item in
Steve Kondikae271bc2015-11-15 02:50:53 +010023790 (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)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023797 cf_subdir='objects' ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023798 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023799 cf_subdir='obj_s' ;;
23800 esac
23801 esac
23802
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
Steve Kondikae271bc2015-11-15 02:50:53 +010023807 (*base*)
23808 cf_libname=${cf_libname}$USE_LIB_SUFFIX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023809 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023810 (*termlib*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023811 cf_libname=$TINFO_LIB_SUFFIX
23812 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010023813 (ticlib*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023814 cf_libname=$TICS_LIB_SUFFIX
23815 ;;
23816 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010023817 elif test $cf_dir = c++ ; then
23818 cf_libname=ncurses++$USE_LIB_SUFFIX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023819 else
Steve Kondikae271bc2015-11-15 02:50:53 +010023820 cf_libname=${cf_libname}$USE_LIB_SUFFIX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023821 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010023822 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}%%"`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023825 fi
23826
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}"
23834 fi
23835
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"
23840 fi
23841
23842 cf_dir_suffix=
23843 old_cf_suffix="$cf_suffix"
23844 if test "$cf_cv_shlib_version_infix" = yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023845 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
23851 ;;
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
23856 ;;
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
23861 ;;
23862 (*)
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
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023866 ;;
23867 esac
23868 fi
23869 fi
23870
23871 $AWK -f $srcdir/mk-1st.awk \
23872 name=${cf_libname}${cf_dir_suffix} \
23873 traces=$LIB_TRACING \
23874 MODEL=$cf_ITEM \
Steve Kondikae271bc2015-11-15 02:50:53 +010023875 CXX_MODEL=$CXX_MODEL \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023876 model=$cf_subdir \
23877 prefix=$cf_prefix \
23878 suffix=$cf_suffix \
23879 subset=$cf_subset \
Steve Kondikae271bc2015-11-15 02:50:53 +010023880 driver=$cf_cv_term_driver \
23881 SymLink="$LN_S" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023882 TermlibRoot=$TINFO_NAME \
23883 TermlibSuffix=$TINFO_SUFFIX \
23884 ShlibVer=$cf_cv_shlib_version \
23885 ShlibVerInfix=$cf_cv_shlib_version_infix \
Steve Kondikae271bc2015-11-15 02:50:53 +010023886 ReLink=${cf_cv_do_relink:-no} \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023887 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" \
Steve Kondikae271bc2015-11-15 02:50:53 +010023893 libtool_version="$LIBTOOL_VERSION" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023894 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23895
23896 cf_suffix="$old_cf_suffix"
23897
23898 for cf_subdir2 in $cf_subdirs lib
23899 do
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
23917 fi
23918
Steve Kondikae271bc2015-11-15 02:50:53 +010023919 echo ' cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023920done
23921
23922for cf_dir in $SRC_SUBDIRS
23923do
23924 if test ! -d $srcdir/$cf_dir ; then
23925 continue
23926 fi
23927
23928 if test -f $cf_dir/Makefile ; then
23929 case "$cf_dir" in
Steve Kondikae271bc2015-11-15 02:50:53 +010023930 (Ada95)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023931 echo 'libs \' >> Makefile
23932 echo 'install.libs \' >> Makefile
23933 echo 'uninstall.libs ::' >> Makefile
Steve Kondikae271bc2015-11-15 02:50:53 +010023934 echo ' cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023935 ;;
23936 esac
23937 fi
23938
23939 if test -f $srcdir/$cf_dir/modules; then
23940 echo >> Makefile
23941 if test -f $srcdir/$cf_dir/headers; then
23942cat >> Makefile <<CF_EOF
23943install.includes \\
23944uninstall.includes \\
23945CF_EOF
23946 fi
23947if test "$cf_dir" != "c++" ; then
23948echo 'lint \' >> Makefile
23949fi
23950cat >> Makefile <<CF_EOF
23951libs \\
23952lintlib \\
23953install.libs \\
23954uninstall.libs \\
23955install.$cf_dir \\
23956uninstall.$cf_dir ::
Steve Kondikae271bc2015-11-15 02:50:53 +010023957 cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023958CF_EOF
23959 elif test -f $srcdir/$cf_dir/headers; then
23960cat >> Makefile <<CF_EOF
23961
23962libs \\
23963install.libs \\
23964uninstall.libs \\
23965install.includes \\
23966uninstall.includes ::
Steve Kondikae271bc2015-11-15 02:50:53 +010023967 cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023968CF_EOF
23969fi
23970done
23971
Steve Kondikae271bc2015-11-15 02:50:53 +010023972if test "x$cf_with_db_install" = xyes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023973cat >> Makefile <<CF_EOF
23974
23975install.libs uninstall.libs \\
23976install.data uninstall.data ::
Steve Kondikae271bc2015-11-15 02:50:53 +010023977$MAKE_TERMINFO cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23978CF_EOF
23979else
23980cat >> Makefile <<CF_EOF
23981
23982install.libs uninstall.libs ::
23983 cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23984CF_EOF
23985fi
23986
23987if test "x$cf_with_manpages" = xyes; then
23988cat >> Makefile <<CF_EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023989
23990install.man \\
23991uninstall.man ::
Steve Kondikae271bc2015-11-15 02:50:53 +010023992 cd man && \${MAKE} \${TOP_MFLAGS} \$@
23993CF_EOF
23994fi
23995
23996cat >> Makefile <<CF_EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023997
23998distclean ::
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
Steve Kondikae271bc2015-11-15 02:50:53 +010024001 rm -f edit_man.* man_alias.*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024002 rm -rf \${DIRS_TO_MAKE}
24003CF_EOF
24004
24005# Special case: tack's manpage lives in its own directory.
Steve Kondikae271bc2015-11-15 02:50:53 +010024006if test "x$cf_with_manpages" = xyes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024007if test -d tack ; then
24008if test -f $srcdir/$tack.h; then
24009cat >> Makefile <<CF_EOF
24010
24011install.man \\
24012uninstall.man ::
Steve Kondikae271bc2015-11-15 02:50:53 +010024013 cd tack && \${MAKE} \${TOP_MFLAGS} \$@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024014CF_EOF
24015fi
24016fi
Steve Kondikae271bc2015-11-15 02:50:53 +010024017fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024018
24019rm -f headers.sed headers.sh
24020
24021echo creating headers.sh
24022cat >headers.sh <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010024023#! $SHELL
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024024# 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.
24028PRG=""
24029while test \$# != 3
24030do
24031PRG="\$PRG \$1"; shift
24032done
24033DST=\$1
24034REF=\$2
24035SRC=\$3
Steve Kondikae271bc2015-11-15 02:50:53 +010024036TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24037TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024038echo installing \$SRC in \$DST
24039CF_EOF
24040
24041if test $WITH_CURSES_H = yes; then
24042 cat >>headers.sh <<CF_EOF
24043case \$DST in
Steve Kondikae271bc2015-11-15 02:50:53 +010024044(/*/include/*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024045 END=\`basename \$DST\`
24046 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24047 do
24048 NAME=\`basename \$i\`
24049 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24050 done
24051 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010024052(*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024053 echo "" >> \$TMPSED
24054 ;;
24055esac
24056CF_EOF
24057
24058else
24059 cat >>headers.sh <<CF_EOF
24060case \$DST in
Steve Kondikae271bc2015-11-15 02:50:53 +010024061(/*/include/*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024062 END=\`basename \$DST\`
24063 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24064 do
24065 NAME=\`basename \$i\`
24066 if test "\$NAME" = "curses.h"
24067 then
24068 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24069 NAME=ncurses.h
24070 fi
24071 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24072 done
24073 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010024074(*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024075 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24076 ;;
24077esac
24078CF_EOF
24079fi
24080cat >>headers.sh <<CF_EOF
24081rm -f \$TMPSRC
24082sed -f \$TMPSED \$SRC > \$TMPSRC
24083NAME=\`basename \$SRC\`
24084CF_EOF
24085if test $WITH_CURSES_H != yes; then
24086 cat >>headers.sh <<CF_EOF
24087test "\$NAME" = "curses.h" && NAME=ncurses.h
24088CF_EOF
24089fi
24090cat >>headers.sh <<CF_EOF
24091# Just in case someone gzip'd manpages, remove the conflicting copy.
24092test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24093
24094eval \$PRG \$TMPSRC \$DST/\$NAME
24095rm -f \$TMPSRC \$TMPSED
24096CF_EOF
24097
24098chmod 0755 headers.sh
24099
24100for cf_dir in $SRC_SUBDIRS
24101do
24102 if test ! -d $srcdir/$cf_dir ; then
24103 continue
24104 fi
24105
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
24111 fi
24112
24113 if test -f $srcdir/$cf_dir/modules; then
24114 if test "$cf_dir" != "c++" ; then
24115 cat >>$cf_dir/Makefile <<"CF_EOF"
24116depend : ${AUTO_SRC}
24117 makedepend -- ${CPPFLAGS} -- ${C_SRC}
24118
24119# DO NOT DELETE THIS LINE -- make depend depends on it.
24120CF_EOF
24121 fi
24122 fi
24123done
24124
Steve Kondikae271bc2015-11-15 02:50:53 +010024125if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24126if test -z "$USE_OLD_MAKERULES" ; then
24127 $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24128fi
24129fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024130 ;;
24131 esac
24132done
24133EOF
24134
24135cat >>$CONFIG_STATUS <<\EOF
24136
24137{ (exit 0); exit 0; }
24138EOF
24139chmod +x $CONFIG_STATUS
24140ac_clean_files=$ac_clean_files_save
24141
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.
24150if 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; }
24158fi
Steve Kondikae271bc2015-11-15 02:50:53 +010024159${MAKE:-make} preinstall