blob: 501e71e114a5e065974dc9c6ac222fb9e39ba404 [file] [log] [blame]
Steve Kondikae271bc2015-11-15 02:50:53 +01001#! /bin/sh
2# From configure.in Revision: 1.60 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20141204.
5#
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="gen/gen.c"
109
110# Initialize some variables set by options.
111ac_init_help=
112ac_init_version=false
113# The variables have the same names as the options, with
114# dashes changed to underlines.
115cache_file=/dev/null
116exec_prefix=NONE
117no_create=
118no_recursion=
119prefix=NONE
120program_prefix=NONE
121program_suffix=NONE
122program_transform_name=s,x,x,
123silent=
124site=
125srcdir=
126verbose=
127x_includes=NONE
128x_libraries=NONE
129
130# Installation directory options.
131# These are left unexpanded so users can "make install exec_prefix=/foo"
132# and all the variables that are supposed to be based on exec_prefix
133# by default will actually change.
134# Use braces instead of parens because sh, perl, etc. also accept them.
135bindir='${exec_prefix}/bin'
136sbindir='${exec_prefix}/sbin'
137libexecdir='${exec_prefix}/libexec'
138datarootdir='${prefix}/share'
139datadir='${datarootdir}'
140sysconfdir='${prefix}/etc'
141sharedstatedir='${prefix}/com'
142localstatedir='${prefix}/var'
143libdir='${exec_prefix}/lib'
144includedir='${prefix}/include'
145oldincludedir='/usr/include'
146infodir='${datarootdir}/info'
147mandir='${datarootdir}/man'
148
149# Identity of this package.
150PACKAGE_NAME=
151PACKAGE_TARNAME=
152PACKAGE_VERSION=
153PACKAGE_STRING=
154PACKAGE_BUGREPORT=
155
156ac_prev=
157for ac_option
158do
159 # If the previous option needs an argument, assign it.
160 if test -n "$ac_prev"; then
161 eval "$ac_prev=\$ac_option"
162 ac_prev=
163 continue
164 fi
165
166 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167
168 # Accept the important Cygnus configure options, so we can diagnose typos.
169
170 case $ac_option in
171
172 -bindir | --bindir | --bindi | --bind | --bin | --bi)
173 ac_prev=bindir ;;
174 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
175 bindir=$ac_optarg ;;
176
177 -build | --build | --buil | --bui | --bu)
178 ac_prev=build_alias ;;
179 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180 build_alias=$ac_optarg ;;
181
182 -cache-file | --cache-file | --cache-fil | --cache-fi \
183 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184 ac_prev=cache_file ;;
185 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187 cache_file=$ac_optarg ;;
188
189 --config-cache | -C)
190 cache_file=config.cache ;;
191
192 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193 ac_prev=datadir ;;
194 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195 | --da=*)
196 datadir=$ac_optarg ;;
197
198 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199 | --dataroo | --dataro | --datar)
200 ac_prev=datarootdir ;;
201 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203 datarootdir=$ac_optarg ;;
204
205 -disable-* | --disable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207 # Reject names that are not valid shell variable names.
208 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210 { (exit 1); exit 1; }; }
211 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212 eval "enable_$ac_feature=no" ;;
213
214 -enable-* | --enable-*)
215 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216 # Reject names that are not valid shell variable names.
217 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219 { (exit 1); exit 1; }; }
220 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221 case $ac_option in
222 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
223 *) ac_optarg=yes ;;
224 esac
225 eval "enable_$ac_feature='$ac_optarg'" ;;
226
227 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229 | --exec | --exe | --ex)
230 ac_prev=exec_prefix ;;
231 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233 | --exec=* | --exe=* | --ex=*)
234 exec_prefix=$ac_optarg ;;
235
236 -gas | --gas | --ga | --g)
237 # Obsolete; use --with-gas.
238 with_gas=yes ;;
239
240 -help | --help | --hel | --he | -h)
241 ac_init_help=long ;;
242 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243 ac_init_help=recursive ;;
244 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245 ac_init_help=short ;;
246
247 -host | --host | --hos | --ho)
248 ac_prev=host_alias ;;
249 -host=* | --host=* | --hos=* | --ho=*)
250 host_alias=$ac_optarg ;;
251
252 -includedir | --includedir | --includedi | --included | --include \
253 | --includ | --inclu | --incl | --inc)
254 ac_prev=includedir ;;
255 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256 | --includ=* | --inclu=* | --incl=* | --inc=*)
257 includedir=$ac_optarg ;;
258
259 -infodir | --infodir | --infodi | --infod | --info | --inf)
260 ac_prev=infodir ;;
261 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262 infodir=$ac_optarg ;;
263
264 -libdir | --libdir | --libdi | --libd)
265 ac_prev=libdir ;;
266 -libdir=* | --libdir=* | --libdi=* | --libd=*)
267 libdir=$ac_optarg ;;
268
269 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270 | --libexe | --libex | --libe)
271 ac_prev=libexecdir ;;
272 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273 | --libexe=* | --libex=* | --libe=*)
274 libexecdir=$ac_optarg ;;
275
276 -localstatedir | --localstatedir | --localstatedi | --localstated \
277 | --localstate | --localstat | --localsta | --localst \
278 | --locals | --local | --loca | --loc | --lo)
279 ac_prev=localstatedir ;;
280 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283 localstatedir=$ac_optarg ;;
284
285 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286 ac_prev=mandir ;;
287 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
288 mandir=$ac_optarg ;;
289
290 -nfp | --nfp | --nf)
291 # Obsolete; use --without-fp.
292 with_fp=no ;;
293
294 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
295 | --no-cr | --no-c)
296 no_create=yes ;;
297
298 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
299 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
300 no_recursion=yes ;;
301
302 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
303 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
304 | --oldin | --oldi | --old | --ol | --o)
305 ac_prev=oldincludedir ;;
306 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
307 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
308 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
309 oldincludedir=$ac_optarg ;;
310
311 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312 ac_prev=prefix ;;
313 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
314 prefix=$ac_optarg ;;
315
316 -program-prefix | --program-prefix | --program-prefi | --program-pref \
317 | --program-pre | --program-pr | --program-p)
318 ac_prev=program_prefix ;;
319 -program-prefix=* | --program-prefix=* | --program-prefi=* \
320 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
321 program_prefix=$ac_optarg ;;
322
323 -program-suffix | --program-suffix | --program-suffi | --program-suff \
324 | --program-suf | --program-su | --program-s)
325 ac_prev=program_suffix ;;
326 -program-suffix=* | --program-suffix=* | --program-suffi=* \
327 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
328 program_suffix=$ac_optarg ;;
329
330 -program-transform-name | --program-transform-name \
331 | --program-transform-nam | --program-transform-na \
332 | --program-transform-n | --program-transform- \
333 | --program-transform | --program-transfor \
334 | --program-transfo | --program-transf \
335 | --program-trans | --program-tran \
336 | --progr-tra | --program-tr | --program-t)
337 ac_prev=program_transform_name ;;
338 -program-transform-name=* | --program-transform-name=* \
339 | --program-transform-nam=* | --program-transform-na=* \
340 | --program-transform-n=* | --program-transform-=* \
341 | --program-transform=* | --program-transfor=* \
342 | --program-transfo=* | --program-transf=* \
343 | --program-trans=* | --program-tran=* \
344 | --progr-tra=* | --program-tr=* | --program-t=*)
345 program_transform_name=$ac_optarg ;;
346
347 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
348 | -silent | --silent | --silen | --sile | --sil)
349 silent=yes ;;
350
351 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352 ac_prev=sbindir ;;
353 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354 | --sbi=* | --sb=*)
355 sbindir=$ac_optarg ;;
356
357 -sharedstatedir | --sharedstatedir | --sharedstatedi \
358 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
359 | --sharedst | --shareds | --shared | --share | --shar \
360 | --sha | --sh)
361 ac_prev=sharedstatedir ;;
362 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
363 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
364 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365 | --sha=* | --sh=*)
366 sharedstatedir=$ac_optarg ;;
367
368 -site | --site | --sit)
369 ac_prev=site ;;
370 -site=* | --site=* | --sit=*)
371 site=$ac_optarg ;;
372
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir=$ac_optarg ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir=$ac_optarg ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target_alias ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target_alias=$ac_optarg ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers | -V)
394 ac_init_version=: ;;
395
396 -with-* | --with-*)
397 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
398 # Reject names that are not valid shell variable names.
399 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid package name: $ac_package" >&2
401 { (exit 1); exit 1; }; }
402 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 case $ac_option in
404 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
405 *) ac_optarg=yes ;;
406 esac
407 eval "with_$ac_package='$ac_optarg'" ;;
408
409 -without-* | --without-*)
410 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
411 # Reject names that are not valid shell variable names.
412 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413 { echo "$as_me: error: invalid package name: $ac_package" >&2
414 { (exit 1); exit 1; }; }
415 ac_package=`echo $ac_package | sed 's/-/_/g'`
416 eval "with_$ac_package=no" ;;
417
418 --x)
419 # Obsolete; use --with-x.
420 with_x=yes ;;
421
422 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
423 | --x-incl | --x-inc | --x-in | --x-i)
424 ac_prev=x_includes ;;
425 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
426 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
427 x_includes=$ac_optarg ;;
428
429 -x-libraries | --x-libraries | --x-librarie | --x-librari \
430 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
431 ac_prev=x_libraries ;;
432 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
433 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
434 x_libraries=$ac_optarg ;;
435
436 -*) { echo "$as_me: error: unrecognized option: $ac_option
437Try \`$0 --help' for more information." >&2
438 { (exit 1); exit 1; }; }
439 ;;
440
441 *=*)
442 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
443 # Reject names that are not valid shell variable names.
444 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
445 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
446 { (exit 1); exit 1; }; }
447 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
448 eval "$ac_envvar='$ac_optarg'"
449 export $ac_envvar ;;
450
451 *)
452 # FIXME: should be removed in autoconf 3.0.
453 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
454 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
455 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
456 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
457 ;;
458
459 esac
460done
461
462if test -n "$ac_prev"; then
463 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
464 { echo "$as_me: error: missing argument to $ac_option" >&2
465 { (exit 1); exit 1; }; }
466fi
467
468# Be sure to have absolute paths.
469for ac_var in exec_prefix prefix
470do
471 eval ac_val=$`echo $ac_var`
472 case $ac_val in
473 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
474 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
475 { (exit 1); exit 1; }; };;
476 esac
477done
478
479# Be sure to have absolute paths.
480for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
481 localstatedir libdir includedir oldincludedir infodir mandir
482do
483 eval ac_val=$`echo $ac_var`
484 case $ac_val in
485 [\\/$]* | ?:[\\/]* ) ;;
486 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
487 { (exit 1); exit 1; }; };;
488 esac
489done
490
491# There might be people who depend on the old broken behavior: `$host'
492# used to hold the argument of --host etc.
493build=$build_alias
494host=$host_alias
495target=$target_alias
496
497# FIXME: should be removed in autoconf 3.0.
498if test "x$host_alias" != x; then
499 if test "x$build_alias" = x; then
500 cross_compiling=maybe
501 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
502 If a cross compiler is detected then cross compile mode will be used." >&2
503 elif test "x$build_alias" != "x$host_alias"; then
504 cross_compiling=yes
505 fi
506fi
507
508ac_tool_prefix=
509test -n "$host_alias" && ac_tool_prefix=$host_alias-
510
511test "$silent" = yes && exec 6>/dev/null
512
513# Find the source files, if location was not specified.
514if test -z "$srcdir"; then
515 ac_srcdir_defaulted=yes
516 # Try the directory containing this script, then its parent.
517 ac_prog=$0
518 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
519 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520 srcdir=$ac_confdir
521 if test ! -r $srcdir/$ac_unique_file; then
522 srcdir=..
523 fi
524else
525 ac_srcdir_defaulted=no
526fi
527if test ! -r $srcdir/$ac_unique_file; then
528 if test "$ac_srcdir_defaulted" = yes; then
529 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
530 { (exit 1); exit 1; }; }
531 else
532 { echo "$as_me: error: cannot find sources in $srcdir" >&2
533 { (exit 1); exit 1; }; }
534 fi
535fi
536srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
537ac_env_build_alias_set=${build_alias+set}
538ac_env_build_alias_value=$build_alias
539ac_cv_env_build_alias_set=${build_alias+set}
540ac_cv_env_build_alias_value=$build_alias
541ac_env_host_alias_set=${host_alias+set}
542ac_env_host_alias_value=$host_alias
543ac_cv_env_host_alias_set=${host_alias+set}
544ac_cv_env_host_alias_value=$host_alias
545ac_env_target_alias_set=${target_alias+set}
546ac_env_target_alias_value=$target_alias
547ac_cv_env_target_alias_set=${target_alias+set}
548ac_cv_env_target_alias_value=$target_alias
549ac_env_CC_set=${CC+set}
550ac_env_CC_value=$CC
551ac_cv_env_CC_set=${CC+set}
552ac_cv_env_CC_value=$CC
553ac_env_CFLAGS_set=${CFLAGS+set}
554ac_env_CFLAGS_value=$CFLAGS
555ac_cv_env_CFLAGS_set=${CFLAGS+set}
556ac_cv_env_CFLAGS_value=$CFLAGS
557ac_env_LDFLAGS_set=${LDFLAGS+set}
558ac_env_LDFLAGS_value=$LDFLAGS
559ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
560ac_cv_env_LDFLAGS_value=$LDFLAGS
561ac_env_CPPFLAGS_set=${CPPFLAGS+set}
562ac_env_CPPFLAGS_value=$CPPFLAGS
563ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
564ac_cv_env_CPPFLAGS_value=$CPPFLAGS
565ac_env_CPP_set=${CPP+set}
566ac_env_CPP_value=$CPP
567ac_cv_env_CPP_set=${CPP+set}
568ac_cv_env_CPP_value=$CPP
569
570#
571# Report the --help message.
572#
573if test "$ac_init_help" = "long"; then
574 # Omit some internal or obsolete options to make the list less imposing.
575 # This message is too long to be a string in the A/UX 3.1 sh.
576 cat <<EOF
577\`configure' configures this package to adapt to many kinds of systems.
578
579Usage: $0 [OPTION]... [VAR=VALUE]...
580
581To assign environment variables (e.g., CC, CFLAGS...), specify them as
582VAR=VALUE. See below for descriptions of some of the useful variables.
583
584Defaults for the options are specified in brackets.
585
586Configuration:
587 -h, --help display this help and exit
588 --help=short display options specific to this package
589 --help=recursive display the short help of all the included packages
590 -V, --version display version information and exit
591 -q, --quiet, --silent do not print \`checking...' messages
592 --cache-file=FILE cache test results in FILE [disabled]
593 -C, --config-cache alias for \`--cache-file=config.cache'
594 -n, --no-create do not create output files
595 --srcdir=DIR find the sources in DIR [configure dir or \`..']
596
597EOF
598
599 cat <<EOF
600Installation directories:
601 --prefix=PREFIX install architecture-independent files in PREFIX
602 [$ac_default_prefix]
603 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
604 [PREFIX]
605
606By default, \`make install' will install all the files in
607\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
608an installation prefix other than \`$ac_default_prefix' using \`--prefix',
609for instance \`--prefix=\$HOME'.
610
611For better control, use the options below.
612
613Fine tuning of the installation directories:
614 --bindir=DIR user executables [EPREFIX/bin]
615 --sbindir=DIR system admin executables [EPREFIX/sbin]
616 --libexecdir=DIR program executables [EPREFIX/libexec]
617 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
618 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
619 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
620 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
621 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
622 --libdir=DIR object code libraries [EPREFIX/lib]
623 --includedir=DIR C header files [PREFIX/include]
624 --oldincludedir=DIR C header files for non-gcc [/usr/include]
625 --infodir=DIR info documentation [DATAROOTDIR/info]
626 --mandir=DIR man documentation [DATAROOTDIR/man]
627EOF
628
629 cat <<\EOF
630
631Program names:
632 --program-prefix=PREFIX prepend PREFIX to installed program names
633 --program-suffix=SUFFIX append SUFFIX to installed program names
634 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
635
636System types:
637 --build=BUILD configure for building on BUILD [guessed]
638 --host=HOST build programs to run on HOST [BUILD]
639 --target=TARGET configure for building compilers for TARGET [HOST]
640EOF
641fi
642
643if test -n "$ac_init_help"; then
644
645 cat <<\EOF
646
647Optional Packages:
648 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
649 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
650
651Optional Features:
652 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
653 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
654
655 --with-system-type=XXX test: override derived host system-type
656 --with-pkg-config{=path} enable/disable use of pkg-config
657 --with-pkg-config-libdir=XXX use given directory for installing pc-files
658 --without-tests suppress build with test-programs
659 --enable-mixed-case tic should assume mixed-case filenames
660 --with-install-prefix prefixes actual install-location ($DESTDIR)
661Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
662 --with-build-cc=XXX the build C compiler ($BUILD_CC)
663 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
664 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
665 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
666 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
667 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
668Options to Specify the Libraries Built/Used:
669 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
670 --with-curses-dir=DIR directory in which (n)curses is installed
671 --enable-widec compile with wide-char/UTF-8 code
672 --with-lib-prefix override library-prefix
673 --with-shlib-version=X Specify rel or abi version for shared libs
674 --enable-rpath-link link sample programs with rpath option
675Fine-Tuning Your Configuration:
676 --enable-broken_linker compile with broken-linker support code
677 --disable-largefile omit support for large files
678 --with-rcs-ids compile-in RCS identifiers
679Extensions:
680 --disable-ext-funcs disable function-extensions
681 --enable-const compile with extra/non-standard const
682Development Code:
683 --without-develop disable development options
684Experimental Code:
685 --with-pthread use POSIX thread library
686 --enable-weak-symbols enable weak-symbols for pthreads
687 --enable-reentrant compile with experimental reentrant code
688 --with-wrap-prefix=XXX override prefix used for public variables
689Testing/development Options:
690 --disable-echo do not display "compiling" commands
691 --enable-warnings build: turn on GCC compiler warnings
692 --enable-assertions test: turn on generation of assertion code
693 --enable-expanded test: generate functions for certain macros
694 --disable-macros test: use functions rather than macros
695 --with-trace test: add trace() function to all models of ncurses
696 --disable-gnat-projects test: disable GNAT projects even if usable
697Ada95 Binding Options:
698 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
699 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
700 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
701 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
702
703Some influential environment variables:
704 CC C compiler command
705 CFLAGS C compiler flags
706 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
707 nonstandard directory <lib dir>
708 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
709 headers in a nonstandard directory <include dir>
710 CPP C preprocessor
711
712Use these variables to override the choices made by `configure' or to help
713it to find libraries and programs with nonstandard names/locations.
714
715EOF
716fi
717
718if test "$ac_init_help" = "recursive"; then
719 # If there are subdirs, report their specific --help.
720 ac_popdir=`pwd`
721 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
722 cd $ac_subdir
723 # A "../" for each directory in /$ac_subdir.
724 ac_dots=`echo $ac_subdir |
725 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
726
727 case $srcdir in
728 .) # No --srcdir option. We are building in place.
729 ac_sub_srcdir=$srcdir ;;
730 [\\/]* | ?:[\\/]* ) # Absolute path.
731 ac_sub_srcdir=$srcdir/$ac_subdir ;;
732 *) # Relative path.
733 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
734 esac
735
736 # Check for guested configure; otherwise get Cygnus style configure.
737 if test -f $ac_sub_srcdir/configure.gnu; then
738 echo
739 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
740 elif test -f $ac_sub_srcdir/configure; then
741 echo
742 $SHELL $ac_sub_srcdir/configure --help=recursive
743 elif test -f $ac_sub_srcdir/configure.ac ||
744 test -f $ac_sub_srcdir/configure.in; then
745 echo
746 $ac_configure --help
747 else
748 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
749 fi
750 cd $ac_popdir
751 done
752fi
753
754test -n "$ac_init_help" && exit 0
755if $ac_init_version; then
756 cat <<\EOF
757
758Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
759Free Software Foundation, Inc.
760This configure script is free software; the Free Software Foundation
761gives unlimited permission to copy, distribute and modify it.
762EOF
763 exit 0
764fi
765exec 5>config.log
766cat >&5 <<EOF
767This file contains any messages produced by compilers while
768running configure, to aid debugging if configure makes a mistake.
769
770It was created by $as_me, which was
771generated by GNU Autoconf 2.52.20141204. Invocation command line was
772
773 $ $0 $@
774
775EOF
776{
777cat <<_ASUNAME
778## ---------- ##
779## Platform. ##
780## ---------- ##
781
782hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
783uname -m = `(uname -m) 2>/dev/null || echo unknown`
784uname -r = `(uname -r) 2>/dev/null || echo unknown`
785uname -s = `(uname -s) 2>/dev/null || echo unknown`
786uname -v = `(uname -v) 2>/dev/null || echo unknown`
787
788/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
789/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
790
791/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
792/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
793/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
794hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
795/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
796/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
797/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
798
799PATH = $PATH
800
801_ASUNAME
802} >&5
803
804cat >&5 <<EOF
805## ------------ ##
806## Core tests. ##
807## ------------ ##
808
809EOF
810
811# Keep a trace of the command line.
812# Strip out --no-create and --no-recursion so they do not pile up.
813# Also quote any args containing shell meta-characters.
814ac_configure_args=
815ac_sep=
816for ac_arg
817do
818 case $ac_arg in
819 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
820 | --no-cr | --no-c) ;;
821 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
822 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
823 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
824 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
825 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
826 ac_sep=" " ;;
827 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
828 ac_sep=" " ;;
829 esac
830 # Get rid of the leading space.
831done
832
833# When interrupted or exit'd, cleanup temporary files, and complete
834# config.log. We remove comments because anyway the quotes in there
835# would cause problems or look ugly.
836trap 'exit_status=$?
837 # Save into config.log some information that might help in debugging.
838 echo >&5
839 echo "## ----------------- ##" >&5
840 echo "## Cache variables. ##" >&5
841 echo "## ----------------- ##" >&5
842 echo >&5
843 # The following way of writing the cache mishandles newlines in values,
844{
845 (set) 2>&1 |
846 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
847 *ac_space=\ *)
848 sed -n \
849 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
850 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
851 ;;
852 *)
853 sed -n \
854 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
855 ;;
856 esac;
857} >&5
858 sed "/^$/d" confdefs.h >conftest.log
859 if test -s conftest.log; then
860 echo >&5
861 echo "## ------------ ##" >&5
862 echo "## confdefs.h. ##" >&5
863 echo "## ------------ ##" >&5
864 echo >&5
865 cat conftest.log >&5
866 fi
867 (echo; echo) >&5
868 test "$ac_signal" != 0 &&
869 echo "$as_me: caught signal $ac_signal" >&5
870 echo "$as_me: exit $exit_status" >&5
871 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
872 exit $exit_status
873 ' 0
874for ac_signal in 1 2 13 15; do
875 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
876done
877ac_signal=0
878
879# confdefs.h avoids OS command line length limits that DEFS can exceed.
880rm -rf conftest* confdefs.h
881# AIX cpp loses on an empty file, so make sure it contains at least a newline.
882echo >confdefs.h
883
884# Let the site file select an alternate cache file if it wants to.
885# Prefer explicitly selected file to automatically selected ones.
886if test -z "$CONFIG_SITE"; then
887 if test "x$prefix" != xNONE; then
888 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
889 else
890 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
891 fi
892fi
893for ac_site_file in $CONFIG_SITE; do
894 if test -r "$ac_site_file"; then
895 { echo "$as_me:895: loading site script $ac_site_file" >&5
896echo "$as_me: loading site script $ac_site_file" >&6;}
897 cat "$ac_site_file" >&5
898 . "$ac_site_file"
899 fi
900done
901
902if test -r "$cache_file"; then
903 # Some versions of bash will fail to source /dev/null (special
904 # files actually), so we avoid doing that.
905 if test -f "$cache_file"; then
906 { echo "$as_me:906: loading cache $cache_file" >&5
907echo "$as_me: loading cache $cache_file" >&6;}
908 case $cache_file in
909 [\\/]* | ?:[\\/]* ) . $cache_file;;
910 *) . ./$cache_file;;
911 esac
912 fi
913else
914 { echo "$as_me:914: creating cache $cache_file" >&5
915echo "$as_me: creating cache $cache_file" >&6;}
916 >$cache_file
917fi
918
919# Check that the precious variables saved in the cache have kept the same
920# value.
921ac_cache_corrupted=false
922for ac_var in `(set) 2>&1 |
923 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
924 eval ac_old_set=\$ac_cv_env_${ac_var}_set
925 eval ac_new_set=\$ac_env_${ac_var}_set
926 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
927 eval ac_new_val="\$ac_env_${ac_var}_value"
928 case $ac_old_set,$ac_new_set in
929 set,)
930 { echo "$as_me:930: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
931echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
932 ac_cache_corrupted=: ;;
933 ,set)
934 { echo "$as_me:934: error: \`$ac_var' was not set in the previous run" >&5
935echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
936 ac_cache_corrupted=: ;;
937 ,);;
938 *)
939 if test "x$ac_old_val" != "x$ac_new_val"; then
940 { echo "$as_me:940: error: \`$ac_var' has changed since the previous run:" >&5
941echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
942 { echo "$as_me:942: former value: $ac_old_val" >&5
943echo "$as_me: former value: $ac_old_val" >&2;}
944 { echo "$as_me:944: current value: $ac_new_val" >&5
945echo "$as_me: current value: $ac_new_val" >&2;}
946 ac_cache_corrupted=:
947 fi;;
948 esac
949 # Pass precious variables to config.status. It doesn't matter if
950 # we pass some twice (in addition to the command line arguments).
951 if test "$ac_new_set" = set; then
952 case $ac_new_val in
953 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
955 ac_configure_args="$ac_configure_args '$ac_arg'"
956 ;;
957 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
958 ;;
959 esac
960 fi
961done
962if $ac_cache_corrupted; then
963 { echo "$as_me:963: error: changes in the environment can compromise the build" >&5
964echo "$as_me: error: changes in the environment can compromise the build" >&2;}
965 { { echo "$as_me:965: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
966echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
967 { (exit 1); exit 1; }; }
968fi
969
970ac_ext=c
971ac_cpp='$CPP $CPPFLAGS'
972ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
973ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
974ac_compiler_gnu=$ac_cv_c_compiler_gnu
975ac_main_return=return
976
977case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
978 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
979 ECHO_T=' ' ;;
980 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
982esac
983echo "#! $SHELL" >conftest.sh
984echo "exit 0" >>conftest.sh
985chmod +x conftest.sh
986if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987 (PATH=".;."; conftest.sh) 2>&5
988 ac_status=$?
989 echo "$as_me:989: \$? = $ac_status" >&5
990 (exit $ac_status); }; then
991 ac_path_separator=';'
992else
993 ac_path_separator=:
994fi
995PATH_SEPARATOR="$ac_path_separator"
996rm -f conftest.sh
997
998ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
999
1000top_builddir=`pwd`
1001
1002ac_aux_dir=
1003for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1004 if test -f $ac_dir/install-sh; then
1005 ac_aux_dir=$ac_dir
1006 ac_install_sh="$ac_aux_dir/install-sh -c"
1007 break
1008 elif test -f $ac_dir/install.sh; then
1009 ac_aux_dir=$ac_dir
1010 ac_install_sh="$ac_aux_dir/install.sh -c"
1011 break
1012 elif test -f $ac_dir/shtool; then
1013 ac_aux_dir=$ac_dir
1014 ac_install_sh="$ac_aux_dir/shtool install -c"
1015 break
1016 fi
1017done
1018if test -z "$ac_aux_dir"; then
1019 { { echo "$as_me:1019: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1020echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1021 { (exit 1); exit 1; }; }
1022fi
1023ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1024ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1025ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1026
1027# Make sure we can run config.sub.
1028$ac_config_sub sun4 >/dev/null 2>&1 ||
1029 { { echo "$as_me:1029: error: cannot run $ac_config_sub" >&5
1030echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1031 { (exit 1); exit 1; }; }
1032
1033echo "$as_me:1033: checking build system type" >&5
1034echo $ECHO_N "checking build system type... $ECHO_C" >&6
1035if test "${ac_cv_build+set}" = set; then
1036 echo $ECHO_N "(cached) $ECHO_C" >&6
1037else
1038 ac_cv_build_alias=$build_alias
1039test -z "$ac_cv_build_alias" &&
1040 ac_cv_build_alias=`$ac_config_guess`
1041test -z "$ac_cv_build_alias" &&
1042 { { echo "$as_me:1042: error: cannot guess build type; you must specify one" >&5
1043echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1044 { (exit 1); exit 1; }; }
1045ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1046 { { echo "$as_me:1046: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1047echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1048 { (exit 1); exit 1; }; }
1049
1050fi
1051echo "$as_me:1051: result: $ac_cv_build" >&5
1052echo "${ECHO_T}$ac_cv_build" >&6
1053build=$ac_cv_build
1054build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1055build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1056build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1057
1058echo "$as_me:1058: checking host system type" >&5
1059echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060if test "${ac_cv_host+set}" = set; then
1061 echo $ECHO_N "(cached) $ECHO_C" >&6
1062else
1063 ac_cv_host_alias=$host_alias
1064test -z "$ac_cv_host_alias" &&
1065 ac_cv_host_alias=$ac_cv_build_alias
1066ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067 { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069 { (exit 1); exit 1; }; }
1070
1071fi
1072echo "$as_me:1072: result: $ac_cv_host" >&5
1073echo "${ECHO_T}$ac_cv_host" >&6
1074host=$ac_cv_host
1075host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1078
1079if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1080 echo "$as_me:1080: checking target system type" >&5
1081echo $ECHO_N "checking target system type... $ECHO_C" >&6
1082if test "${ac_cv_target+set}" = set; then
1083 echo $ECHO_N "(cached) $ECHO_C" >&6
1084else
1085 ac_cv_target_alias=$target_alias
1086test "x$ac_cv_target_alias" = "x" &&
1087 ac_cv_target_alias=$ac_cv_host_alias
1088ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1089 { { echo "$as_me:1089: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1090echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1091 { (exit 1); exit 1; }; }
1092
1093fi
1094echo "$as_me:1094: result: $ac_cv_target" >&5
1095echo "${ECHO_T}$ac_cv_target" >&6
1096target=$ac_cv_target
1097target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1098target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1099target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1100
1101# The aliases save the names the user supplied, while $host etc.
1102# will get canonicalized.
1103test -n "$target_alias" &&
1104 test "$program_prefix$program_suffix$program_transform_name" = \
1105 NONENONEs,x,x, &&
1106 program_prefix=${target_alias}-
1107 system_name="$host_os"
1108else
1109 system_name="`(uname -s -r) 2>/dev/null`"
1110 if test -z "$system_name" ; then
1111 system_name="`(hostname) 2>/dev/null`"
1112 fi
1113fi
1114test -n "$system_name" &&
1115cat >>confdefs.h <<EOF
1116#define SYSTEM_NAME "$system_name"
1117EOF
1118
1119if test "${cf_cv_system_name+set}" = set; then
1120 echo $ECHO_N "(cached) $ECHO_C" >&6
1121else
1122 cf_cv_system_name="$system_name"
1123fi
1124
1125test -z "$system_name" && system_name="$cf_cv_system_name"
1126test -n "$cf_cv_system_name" && echo "$as_me:1126: result: Configuring for $cf_cv_system_name" >&5
1127echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1128
1129if test ".$system_name" != ".$cf_cv_system_name" ; then
1130 echo "$as_me:1130: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1131echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1132 { { echo "$as_me:1132: error: \"Please remove config.cache and try again.\"" >&5
1133echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1134 { (exit 1); exit 1; }; }
1135fi
1136
1137# Check whether --with-system-type or --without-system-type was given.
1138if test "${with_system_type+set}" = set; then
1139 withval="$with_system_type"
1140 { echo "$as_me:1140: WARNING: overriding system type to $withval" >&5
1141echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1142 cf_cv_system_name=$withval
1143 host_os=$withval
1144
1145fi;
1146
1147### Save the given $CFLAGS to allow user-override.
1148cf_user_CFLAGS="$CFLAGS"
1149
1150### Default install-location
1151
1152echo "$as_me:1152: checking for prefix" >&5
1153echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1154if test "x$prefix" = "xNONE" ; then
1155 case "$cf_cv_system_name" in
1156 # non-vendor systems don't have a conflict
1157 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1158 prefix=/usr
1159 ;;
1160 (*) prefix=$ac_default_prefix
1161 ;;
1162 esac
1163fi
1164echo "$as_me:1164: result: $prefix" >&5
1165echo "${ECHO_T}$prefix" >&6
1166
1167if test "x$prefix" = "xNONE" ; then
1168echo "$as_me:1168: checking for default include-directory" >&5
1169echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1170test -n "$verbose" && echo 1>&6
1171for cf_symbol in \
1172 $includedir \
1173 $includedir/ncurses \
1174 $prefix/include \
1175 $prefix/include/ncurses \
1176 /usr/local/include \
1177 /usr/local/include/ncurses \
1178 /usr/include \
1179 /usr/include/ncurses
1180do
1181 cf_dir=`eval echo $cf_symbol`
1182 if test -f $cf_dir/curses.h ; then
1183 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1184 includedir="$cf_symbol"
1185 test -n "$verbose" && echo $ac_n " found " 1>&6
1186 break
1187 fi
1188 fi
1189 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1190done
1191echo "$as_me:1191: result: $includedir" >&5
1192echo "${ECHO_T}$includedir" >&6
1193fi
1194
1195### Checks for programs.
1196
1197ac_ext=c
1198ac_cpp='$CPP $CPPFLAGS'
1199ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1200ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1201ac_compiler_gnu=$ac_cv_c_compiler_gnu
1202ac_main_return=return
1203if test -n "$ac_tool_prefix"; then
1204 for ac_prog in gnatgcc gcc cc
1205 do
1206 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1207set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1208echo "$as_me:1208: checking for $ac_word" >&5
1209echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1210if test "${ac_cv_prog_CC+set}" = set; then
1211 echo $ECHO_N "(cached) $ECHO_C" >&6
1212else
1213 if test -n "$CC"; then
1214 ac_cv_prog_CC="$CC" # Let the user override the test.
1215else
1216 ac_save_IFS=$IFS; IFS=$ac_path_separator
1217ac_dummy="$PATH"
1218for ac_dir in $ac_dummy; do
1219 IFS=$ac_save_IFS
1220 test -z "$ac_dir" && ac_dir=.
1221 $as_executable_p "$ac_dir/$ac_word" || continue
1222ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1223echo "$as_me:1223: found $ac_dir/$ac_word" >&5
1224break
1225done
1226
1227fi
1228fi
1229CC=$ac_cv_prog_CC
1230if test -n "$CC"; then
1231 echo "$as_me:1231: result: $CC" >&5
1232echo "${ECHO_T}$CC" >&6
1233else
1234 echo "$as_me:1234: result: no" >&5
1235echo "${ECHO_T}no" >&6
1236fi
1237
1238 test -n "$CC" && break
1239 done
1240fi
1241if test -z "$CC"; then
1242 ac_ct_CC=$CC
1243 for ac_prog in gnatgcc gcc cc
1244do
1245 # Extract the first word of "$ac_prog", so it can be a program name with args.
1246set dummy $ac_prog; ac_word=$2
1247echo "$as_me:1247: checking for $ac_word" >&5
1248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1249if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1250 echo $ECHO_N "(cached) $ECHO_C" >&6
1251else
1252 if test -n "$ac_ct_CC"; then
1253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1254else
1255 ac_save_IFS=$IFS; IFS=$ac_path_separator
1256ac_dummy="$PATH"
1257for ac_dir in $ac_dummy; do
1258 IFS=$ac_save_IFS
1259 test -z "$ac_dir" && ac_dir=.
1260 $as_executable_p "$ac_dir/$ac_word" || continue
1261ac_cv_prog_ac_ct_CC="$ac_prog"
1262echo "$as_me:1262: found $ac_dir/$ac_word" >&5
1263break
1264done
1265
1266fi
1267fi
1268ac_ct_CC=$ac_cv_prog_ac_ct_CC
1269if test -n "$ac_ct_CC"; then
1270 echo "$as_me:1270: result: $ac_ct_CC" >&5
1271echo "${ECHO_T}$ac_ct_CC" >&6
1272else
1273 echo "$as_me:1273: result: no" >&5
1274echo "${ECHO_T}no" >&6
1275fi
1276
1277 test -n "$ac_ct_CC" && break
1278done
1279
1280 CC=$ac_ct_CC
1281fi
1282
1283test -z "$CC" && { { echo "$as_me:1283: error: no acceptable cc found in \$PATH" >&5
1284echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1285 { (exit 1); exit 1; }; }
1286
1287# Provide some information about the compiler.
1288echo "$as_me:1288:" \
1289 "checking for C compiler version" >&5
1290ac_compiler=`set X $ac_compile; echo $2`
1291{ (eval echo "$as_me:1291: \"$ac_compiler --version </dev/null >&5\"") >&5
1292 (eval $ac_compiler --version </dev/null >&5) 2>&5
1293 ac_status=$?
1294 echo "$as_me:1294: \$? = $ac_status" >&5
1295 (exit $ac_status); }
1296{ (eval echo "$as_me:1296: \"$ac_compiler -v </dev/null >&5\"") >&5
1297 (eval $ac_compiler -v </dev/null >&5) 2>&5
1298 ac_status=$?
1299 echo "$as_me:1299: \$? = $ac_status" >&5
1300 (exit $ac_status); }
1301{ (eval echo "$as_me:1301: \"$ac_compiler -V </dev/null >&5\"") >&5
1302 (eval $ac_compiler -V </dev/null >&5) 2>&5
1303 ac_status=$?
1304 echo "$as_me:1304: \$? = $ac_status" >&5
1305 (exit $ac_status); }
1306
1307cat >conftest.$ac_ext <<_ACEOF
1308#line 1308 "configure"
1309#include "confdefs.h"
1310
1311int
1312main ()
1313{
1314
1315 ;
1316 return 0;
1317}
1318_ACEOF
1319ac_clean_files_save=$ac_clean_files
1320ac_clean_files="$ac_clean_files a.out a.exe"
1321# Try to create an executable without -o first, disregard a.out.
1322# It will help us diagnose broken compilers, and finding out an intuition
1323# of exeext.
1324echo "$as_me:1324: checking for C compiler default output" >&5
1325echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1326ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1327if { (eval echo "$as_me:1327: \"$ac_link_default\"") >&5
1328 (eval $ac_link_default) 2>&5
1329 ac_status=$?
1330 echo "$as_me:1330: \$? = $ac_status" >&5
1331 (exit $ac_status); }; then
1332 # Find the output, starting from the most likely. This scheme is
1333# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1334# resort.
1335for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1336 ls a.out conftest 2>/dev/null;
1337 ls a.* conftest.* 2>/dev/null`; do
1338 case $ac_file in
1339 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1340 a.out ) # We found the default executable, but exeext='' is most
1341 # certainly right.
1342 break;;
1343 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1344 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1345 export ac_cv_exeext
1346 break;;
1347 * ) break;;
1348 esac
1349done
1350else
1351 echo "$as_me: failed program was:" >&5
1352cat conftest.$ac_ext >&5
1353{ { echo "$as_me:1353: error: C compiler cannot create executables" >&5
1354echo "$as_me: error: C compiler cannot create executables" >&2;}
1355 { (exit 77); exit 77; }; }
1356fi
1357
1358ac_exeext=$ac_cv_exeext
1359echo "$as_me:1359: result: $ac_file" >&5
1360echo "${ECHO_T}$ac_file" >&6
1361
1362# Check the compiler produces executables we can run. If not, either
1363# the compiler is broken, or we cross compile.
1364echo "$as_me:1364: checking whether the C compiler works" >&5
1365echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1366# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1367# If not cross compiling, check that we can run a simple program.
1368if test "$cross_compiling" != yes; then
1369 if { ac_try='./$ac_file'
1370 { (eval echo "$as_me:1370: \"$ac_try\"") >&5
1371 (eval $ac_try) 2>&5
1372 ac_status=$?
1373 echo "$as_me:1373: \$? = $ac_status" >&5
1374 (exit $ac_status); }; }; then
1375 cross_compiling=no
1376 else
1377 if test "$cross_compiling" = maybe; then
1378 cross_compiling=yes
1379 else
1380 { { echo "$as_me:1380: error: cannot run C compiled programs.
1381If you meant to cross compile, use \`--host'." >&5
1382echo "$as_me: error: cannot run C compiled programs.
1383If you meant to cross compile, use \`--host'." >&2;}
1384 { (exit 1); exit 1; }; }
1385 fi
1386 fi
1387fi
1388echo "$as_me:1388: result: yes" >&5
1389echo "${ECHO_T}yes" >&6
1390
1391rm -f a.out a.exe conftest$ac_cv_exeext
1392ac_clean_files=$ac_clean_files_save
1393# Check the compiler produces executables we can run. If not, either
1394# the compiler is broken, or we cross compile.
1395echo "$as_me:1395: checking whether we are cross compiling" >&5
1396echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1397echo "$as_me:1397: result: $cross_compiling" >&5
1398echo "${ECHO_T}$cross_compiling" >&6
1399
1400echo "$as_me:1400: checking for executable suffix" >&5
1401echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1402if { (eval echo "$as_me:1402: \"$ac_link\"") >&5
1403 (eval $ac_link) 2>&5
1404 ac_status=$?
1405 echo "$as_me:1405: \$? = $ac_status" >&5
1406 (exit $ac_status); }; then
1407 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1408# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1409# work properly (i.e., refer to `conftest.exe'), while it won't with
1410# `rm'.
1411for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1412 case $ac_file in
1413 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1414 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1415 export ac_cv_exeext
1416 break;;
1417 * ) break;;
1418 esac
1419done
1420else
1421 { { echo "$as_me:1421: error: cannot compute EXEEXT: cannot compile and link" >&5
1422echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1423 { (exit 1); exit 1; }; }
1424fi
1425
1426rm -f conftest$ac_cv_exeext
1427echo "$as_me:1427: result: $ac_cv_exeext" >&5
1428echo "${ECHO_T}$ac_cv_exeext" >&6
1429
1430rm -f conftest.$ac_ext
1431EXEEXT=$ac_cv_exeext
1432ac_exeext=$EXEEXT
1433echo "$as_me:1433: checking for object suffix" >&5
1434echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1435if test "${ac_cv_objext+set}" = set; then
1436 echo $ECHO_N "(cached) $ECHO_C" >&6
1437else
1438 cat >conftest.$ac_ext <<_ACEOF
1439#line 1439 "configure"
1440#include "confdefs.h"
1441
1442int
1443main ()
1444{
1445
1446 ;
1447 return 0;
1448}
1449_ACEOF
1450rm -f conftest.o conftest.obj
1451if { (eval echo "$as_me:1451: \"$ac_compile\"") >&5
1452 (eval $ac_compile) 2>&5
1453 ac_status=$?
1454 echo "$as_me:1454: \$? = $ac_status" >&5
1455 (exit $ac_status); }; then
1456 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1457 case $ac_file in
1458 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1459 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1460 break;;
1461 esac
1462done
1463else
1464 echo "$as_me: failed program was:" >&5
1465cat conftest.$ac_ext >&5
1466{ { echo "$as_me:1466: error: cannot compute OBJEXT: cannot compile" >&5
1467echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1468 { (exit 1); exit 1; }; }
1469fi
1470
1471rm -f conftest.$ac_cv_objext conftest.$ac_ext
1472fi
1473echo "$as_me:1473: result: $ac_cv_objext" >&5
1474echo "${ECHO_T}$ac_cv_objext" >&6
1475OBJEXT=$ac_cv_objext
1476ac_objext=$OBJEXT
1477echo "$as_me:1477: checking whether we are using the GNU C compiler" >&5
1478echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1479if test "${ac_cv_c_compiler_gnu+set}" = set; then
1480 echo $ECHO_N "(cached) $ECHO_C" >&6
1481else
1482 cat >conftest.$ac_ext <<_ACEOF
1483#line 1483 "configure"
1484#include "confdefs.h"
1485
1486int
1487main ()
1488{
1489#ifndef __GNUC__
1490 choke me
1491#endif
1492
1493 ;
1494 return 0;
1495}
1496_ACEOF
1497rm -f conftest.$ac_objext
1498if { (eval echo "$as_me:1498: \"$ac_compile\"") >&5
1499 (eval $ac_compile) 2>&5
1500 ac_status=$?
1501 echo "$as_me:1501: \$? = $ac_status" >&5
1502 (exit $ac_status); } &&
1503 { ac_try='test -s conftest.$ac_objext'
1504 { (eval echo "$as_me:1504: \"$ac_try\"") >&5
1505 (eval $ac_try) 2>&5
1506 ac_status=$?
1507 echo "$as_me:1507: \$? = $ac_status" >&5
1508 (exit $ac_status); }; }; then
1509 ac_compiler_gnu=yes
1510else
1511 echo "$as_me: failed program was:" >&5
1512cat conftest.$ac_ext >&5
1513ac_compiler_gnu=no
1514fi
1515rm -f conftest.$ac_objext conftest.$ac_ext
1516ac_cv_c_compiler_gnu=$ac_compiler_gnu
1517
1518fi
1519echo "$as_me:1519: result: $ac_cv_c_compiler_gnu" >&5
1520echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1521GCC=`test $ac_compiler_gnu = yes && echo yes`
1522ac_test_CFLAGS=${CFLAGS+set}
1523ac_save_CFLAGS=$CFLAGS
1524CFLAGS="-g"
1525echo "$as_me:1525: checking whether $CC accepts -g" >&5
1526echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1527if test "${ac_cv_prog_cc_g+set}" = set; then
1528 echo $ECHO_N "(cached) $ECHO_C" >&6
1529else
1530 cat >conftest.$ac_ext <<_ACEOF
1531#line 1531 "configure"
1532#include "confdefs.h"
1533
1534int
1535main ()
1536{
1537
1538 ;
1539 return 0;
1540}
1541_ACEOF
1542rm -f conftest.$ac_objext
1543if { (eval echo "$as_me:1543: \"$ac_compile\"") >&5
1544 (eval $ac_compile) 2>&5
1545 ac_status=$?
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit $ac_status); } &&
1548 { ac_try='test -s conftest.$ac_objext'
1549 { (eval echo "$as_me:1549: \"$ac_try\"") >&5
1550 (eval $ac_try) 2>&5
1551 ac_status=$?
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); }; }; then
1554 ac_cv_prog_cc_g=yes
1555else
1556 echo "$as_me: failed program was:" >&5
1557cat conftest.$ac_ext >&5
1558ac_cv_prog_cc_g=no
1559fi
1560rm -f conftest.$ac_objext conftest.$ac_ext
1561fi
1562echo "$as_me:1562: result: $ac_cv_prog_cc_g" >&5
1563echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1564if test "$ac_test_CFLAGS" = set; then
1565 CFLAGS=$ac_save_CFLAGS
1566elif test $ac_cv_prog_cc_g = yes; then
1567 if test "$GCC" = yes; then
1568 CFLAGS="-g -O2"
1569 else
1570 CFLAGS="-g"
1571 fi
1572else
1573 if test "$GCC" = yes; then
1574 CFLAGS="-O2"
1575 else
1576 CFLAGS=
1577 fi
1578fi
1579# Some people use a C++ compiler to compile C. Since we use `exit',
1580# in C++ we need to declare it. In case someone uses the same compiler
1581# for both compiling C and C++ we need to have the C++ compiler decide
1582# the declaration of exit, since it's the most demanding environment.
1583cat >conftest.$ac_ext <<_ACEOF
1584#ifndef __cplusplus
1585 choke me
1586#endif
1587_ACEOF
1588rm -f conftest.$ac_objext
1589if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5
1590 (eval $ac_compile) 2>&5
1591 ac_status=$?
1592 echo "$as_me:1592: \$? = $ac_status" >&5
1593 (exit $ac_status); } &&
1594 { ac_try='test -s conftest.$ac_objext'
1595 { (eval echo "$as_me:1595: \"$ac_try\"") >&5
1596 (eval $ac_try) 2>&5
1597 ac_status=$?
1598 echo "$as_me:1598: \$? = $ac_status" >&5
1599 (exit $ac_status); }; }; then
1600 for ac_declaration in \
1601 ''\
1602 '#include <stdlib.h>' \
1603 'extern "C" void std::exit (int) throw (); using std::exit;' \
1604 'extern "C" void std::exit (int); using std::exit;' \
1605 'extern "C" void exit (int) throw ();' \
1606 'extern "C" void exit (int);' \
1607 'void exit (int);'
1608do
1609 cat >conftest.$ac_ext <<_ACEOF
1610#line 1610 "configure"
1611#include "confdefs.h"
1612#include <stdlib.h>
1613$ac_declaration
1614int
1615main ()
1616{
1617exit (42);
1618 ;
1619 return 0;
1620}
1621_ACEOF
1622rm -f conftest.$ac_objext
1623if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624 (eval $ac_compile) 2>&5
1625 ac_status=$?
1626 echo "$as_me:1626: \$? = $ac_status" >&5
1627 (exit $ac_status); } &&
1628 { ac_try='test -s conftest.$ac_objext'
1629 { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1630 (eval $ac_try) 2>&5
1631 ac_status=$?
1632 echo "$as_me:1632: \$? = $ac_status" >&5
1633 (exit $ac_status); }; }; then
1634 :
1635else
1636 echo "$as_me: failed program was:" >&5
1637cat conftest.$ac_ext >&5
1638continue
1639fi
1640rm -f conftest.$ac_objext conftest.$ac_ext
1641 cat >conftest.$ac_ext <<_ACEOF
1642#line 1642 "configure"
1643#include "confdefs.h"
1644$ac_declaration
1645int
1646main ()
1647{
1648exit (42);
1649 ;
1650 return 0;
1651}
1652_ACEOF
1653rm -f conftest.$ac_objext
1654if { (eval echo "$as_me:1654: \"$ac_compile\"") >&5
1655 (eval $ac_compile) 2>&5
1656 ac_status=$?
1657 echo "$as_me:1657: \$? = $ac_status" >&5
1658 (exit $ac_status); } &&
1659 { ac_try='test -s conftest.$ac_objext'
1660 { (eval echo "$as_me:1660: \"$ac_try\"") >&5
1661 (eval $ac_try) 2>&5
1662 ac_status=$?
1663 echo "$as_me:1663: \$? = $ac_status" >&5
1664 (exit $ac_status); }; }; then
1665 break
1666else
1667 echo "$as_me: failed program was:" >&5
1668cat conftest.$ac_ext >&5
1669fi
1670rm -f conftest.$ac_objext conftest.$ac_ext
1671done
1672rm -rf conftest*
1673if test -n "$ac_declaration"; then
1674 echo '#ifdef __cplusplus' >>confdefs.h
1675 echo $ac_declaration >>confdefs.h
1676 echo '#endif' >>confdefs.h
1677fi
1678
1679else
1680 echo "$as_me: failed program was:" >&5
1681cat conftest.$ac_ext >&5
1682fi
1683rm -f conftest.$ac_objext conftest.$ac_ext
1684ac_ext=c
1685ac_cpp='$CPP $CPPFLAGS'
1686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1688ac_compiler_gnu=$ac_cv_c_compiler_gnu
1689ac_main_return=return
1690
1691GCC_VERSION=none
1692if test "$GCC" = yes ; then
1693 echo "$as_me:1693: checking version of $CC" >&5
1694echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1695 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.].*//'`"
1696 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1697 echo "$as_me:1697: result: $GCC_VERSION" >&5
1698echo "${ECHO_T}$GCC_VERSION" >&6
1699fi
1700
1701echo "$as_me:1701: checking for $CC option to accept ANSI C" >&5
1702echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1703if test "${ac_cv_prog_cc_stdc+set}" = set; then
1704 echo $ECHO_N "(cached) $ECHO_C" >&6
1705else
1706 ac_cv_prog_cc_stdc=no
1707ac_save_CC=$CC
1708cat >conftest.$ac_ext <<_ACEOF
1709#line 1709 "configure"
1710#include "confdefs.h"
1711#include <stdarg.h>
1712#include <stdio.h>
1713#include <sys/types.h>
1714#include <sys/stat.h>
1715/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1716struct buf { int x; };
1717FILE * (*rcsopen) (struct buf *, struct stat *, int);
1718static char *e (p, i)
1719 char **p;
1720 int i;
1721{
1722 return p[i];
1723}
1724static char *f (char * (*g) (char **, int), char **p, ...)
1725{
1726 char *s;
1727 va_list v;
1728 va_start (v,p);
1729 s = g (p, va_arg (v,int));
1730 va_end (v);
1731 return s;
1732}
1733int test (int i, double x);
1734struct s1 {int (*f) (int a);};
1735struct s2 {int (*f) (double a);};
1736int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1737int argc;
1738char **argv;
1739int
1740main ()
1741{
1742return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1743 ;
1744 return 0;
1745}
1746_ACEOF
1747# Don't try gcc -ansi; that turns off useful extensions and
1748# breaks some systems' header files.
1749# AIX -qlanglvl=ansi
1750# Ultrix and OSF/1 -std1
1751# HP-UX 10.20 and later -Ae
1752# HP-UX older versions -Aa -D_HPUX_SOURCE
1753# SVR4 -Xc -D__EXTENSIONS__
1754for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1755do
1756 CC="$ac_save_CC $ac_arg"
1757 rm -f conftest.$ac_objext
1758if { (eval echo "$as_me:1758: \"$ac_compile\"") >&5
1759 (eval $ac_compile) 2>&5
1760 ac_status=$?
1761 echo "$as_me:1761: \$? = $ac_status" >&5
1762 (exit $ac_status); } &&
1763 { ac_try='test -s conftest.$ac_objext'
1764 { (eval echo "$as_me:1764: \"$ac_try\"") >&5
1765 (eval $ac_try) 2>&5
1766 ac_status=$?
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit $ac_status); }; }; then
1769 ac_cv_prog_cc_stdc=$ac_arg
1770break
1771else
1772 echo "$as_me: failed program was:" >&5
1773cat conftest.$ac_ext >&5
1774fi
1775rm -f conftest.$ac_objext
1776done
1777rm -f conftest.$ac_ext conftest.$ac_objext
1778CC=$ac_save_CC
1779
1780fi
1781
1782case "x$ac_cv_prog_cc_stdc" in
1783 x|xno)
1784 echo "$as_me:1784: result: none needed" >&5
1785echo "${ECHO_T}none needed" >&6 ;;
1786 *)
1787 echo "$as_me:1787: result: $ac_cv_prog_cc_stdc" >&5
1788echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1789 CC="$CC $ac_cv_prog_cc_stdc" ;;
1790esac
1791
1792# This should have been defined by AC_PROG_CC
1793: ${CC:=cc}
1794
1795echo "$as_me:1795: checking \$CC variable" >&5
1796echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1797case "$CC" in
1798(*[\ \ ]-[IUD]*)
1799 echo "$as_me:1799: result: broken" >&5
1800echo "${ECHO_T}broken" >&6
1801 { echo "$as_me:1801: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1802echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1803 # humor him...
1804 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
1805 CC=`echo "$CC" | sed -e 's/[ ].*//'`
1806
1807cf_fix_cppflags=no
1808cf_new_cflags=
1809cf_new_cppflags=
1810cf_new_extra_cppflags=
1811
1812for cf_add_cflags in $cf_flags
1813do
1814case $cf_fix_cppflags in
1815(no)
1816 case $cf_add_cflags in
1817 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1818 case $cf_add_cflags in
1819 (-D*)
1820 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1821
1822 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1823 && test -z "${cf_tst_cflags}" \
1824 && cf_fix_cppflags=yes
1825
1826 if test $cf_fix_cppflags = yes ; then
1827 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1828 continue
1829 elif test "${cf_tst_cflags}" = "\"'" ; then
1830 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1831 continue
1832 fi
1833 ;;
1834 esac
1835 case "$CPPFLAGS" in
1836 (*$cf_add_cflags)
1837 ;;
1838 (*)
1839 case $cf_add_cflags in
1840 (-D*)
1841 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1842
1843CPPFLAGS=`echo "$CPPFLAGS" | \
1844 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1845 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1846
1847 ;;
1848 esac
1849 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1850 ;;
1851 esac
1852 ;;
1853 (*)
1854 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1855 ;;
1856 esac
1857 ;;
1858(yes)
1859 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1860
1861 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1862
1863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1864 && test -z "${cf_tst_cflags}" \
1865 && cf_fix_cppflags=no
1866 ;;
1867esac
1868done
1869
1870if test -n "$cf_new_cflags" ; then
1871
1872 CFLAGS="$CFLAGS $cf_new_cflags"
1873fi
1874
1875if test -n "$cf_new_cppflags" ; then
1876
1877 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1878fi
1879
1880if test -n "$cf_new_extra_cppflags" ; then
1881
1882 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1883fi
1884
1885 ;;
1886(*)
1887 echo "$as_me:1887: result: ok" >&5
1888echo "${ECHO_T}ok" >&6
1889 ;;
1890esac
1891
1892ac_ext=c
1893ac_cpp='$CPP $CPPFLAGS'
1894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1896ac_compiler_gnu=$ac_cv_c_compiler_gnu
1897ac_main_return=return
1898echo "$as_me:1898: checking how to run the C preprocessor" >&5
1899echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1900# On Suns, sometimes $CPP names a directory.
1901if test -n "$CPP" && test -d "$CPP"; then
1902 CPP=
1903fi
1904if test -z "$CPP"; then
1905 if test "${ac_cv_prog_CPP+set}" = set; then
1906 echo $ECHO_N "(cached) $ECHO_C" >&6
1907else
1908 # Double quotes because CPP needs to be expanded
1909 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1910 do
1911 ac_preproc_ok=false
1912for ac_c_preproc_warn_flag in '' yes
1913do
1914 # Use a header file that comes with gcc, so configuring glibc
1915 # with a fresh cross-compiler works.
1916 # On the NeXT, cc -E runs the code through the compiler's parser,
1917 # not just through cpp. "Syntax error" is here to catch this case.
1918 cat >conftest.$ac_ext <<_ACEOF
1919#line 1919 "configure"
1920#include "confdefs.h"
1921#include <assert.h>
1922 Syntax error
1923_ACEOF
1924if { (eval echo "$as_me:1924: \"$ac_cpp conftest.$ac_ext\"") >&5
1925 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1926 ac_status=$?
1927 egrep -v '^ *\+' conftest.er1 >conftest.err
1928 rm -f conftest.er1
1929 cat conftest.err >&5
1930 echo "$as_me:1930: \$? = $ac_status" >&5
1931 (exit $ac_status); } >/dev/null; then
1932 if test -s conftest.err; then
1933 ac_cpp_err=$ac_c_preproc_warn_flag
1934 else
1935 ac_cpp_err=
1936 fi
1937else
1938 ac_cpp_err=yes
1939fi
1940if test -z "$ac_cpp_err"; then
1941 :
1942else
1943 echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 # Broken: fails on valid input.
1946continue
1947fi
1948rm -f conftest.err conftest.$ac_ext
1949
1950 # OK, works on sane cases. Now check whether non-existent headers
1951 # can be detected and how.
1952 cat >conftest.$ac_ext <<_ACEOF
1953#line 1953 "configure"
1954#include "confdefs.h"
1955#include <ac_nonexistent.h>
1956_ACEOF
1957if { (eval echo "$as_me:1957: \"$ac_cpp conftest.$ac_ext\"") >&5
1958 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1959 ac_status=$?
1960 egrep -v '^ *\+' conftest.er1 >conftest.err
1961 rm -f conftest.er1
1962 cat conftest.err >&5
1963 echo "$as_me:1963: \$? = $ac_status" >&5
1964 (exit $ac_status); } >/dev/null; then
1965 if test -s conftest.err; then
1966 ac_cpp_err=$ac_c_preproc_warn_flag
1967 else
1968 ac_cpp_err=
1969 fi
1970else
1971 ac_cpp_err=yes
1972fi
1973if test -z "$ac_cpp_err"; then
1974 # Broken: success on invalid input.
1975continue
1976else
1977 echo "$as_me: failed program was:" >&5
1978 cat conftest.$ac_ext >&5
1979 # Passes both tests.
1980ac_preproc_ok=:
1981break
1982fi
1983rm -f conftest.err conftest.$ac_ext
1984
1985done
1986# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1987rm -f conftest.err conftest.$ac_ext
1988if $ac_preproc_ok; then
1989 break
1990fi
1991
1992 done
1993 ac_cv_prog_CPP=$CPP
1994
1995fi
1996 CPP=$ac_cv_prog_CPP
1997else
1998 ac_cv_prog_CPP=$CPP
1999fi
2000echo "$as_me:2000: result: $CPP" >&5
2001echo "${ECHO_T}$CPP" >&6
2002ac_preproc_ok=false
2003for ac_c_preproc_warn_flag in '' yes
2004do
2005 # Use a header file that comes with gcc, so configuring glibc
2006 # with a fresh cross-compiler works.
2007 # On the NeXT, cc -E runs the code through the compiler's parser,
2008 # not just through cpp. "Syntax error" is here to catch this case.
2009 cat >conftest.$ac_ext <<_ACEOF
2010#line 2010 "configure"
2011#include "confdefs.h"
2012#include <assert.h>
2013 Syntax error
2014_ACEOF
2015if { (eval echo "$as_me:2015: \"$ac_cpp conftest.$ac_ext\"") >&5
2016 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2017 ac_status=$?
2018 egrep -v '^ *\+' conftest.er1 >conftest.err
2019 rm -f conftest.er1
2020 cat conftest.err >&5
2021 echo "$as_me:2021: \$? = $ac_status" >&5
2022 (exit $ac_status); } >/dev/null; then
2023 if test -s conftest.err; then
2024 ac_cpp_err=$ac_c_preproc_warn_flag
2025 else
2026 ac_cpp_err=
2027 fi
2028else
2029 ac_cpp_err=yes
2030fi
2031if test -z "$ac_cpp_err"; then
2032 :
2033else
2034 echo "$as_me: failed program was:" >&5
2035 cat conftest.$ac_ext >&5
2036 # Broken: fails on valid input.
2037continue
2038fi
2039rm -f conftest.err conftest.$ac_ext
2040
2041 # OK, works on sane cases. Now check whether non-existent headers
2042 # can be detected and how.
2043 cat >conftest.$ac_ext <<_ACEOF
2044#line 2044 "configure"
2045#include "confdefs.h"
2046#include <ac_nonexistent.h>
2047_ACEOF
2048if { (eval echo "$as_me:2048: \"$ac_cpp conftest.$ac_ext\"") >&5
2049 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2050 ac_status=$?
2051 egrep -v '^ *\+' conftest.er1 >conftest.err
2052 rm -f conftest.er1
2053 cat conftest.err >&5
2054 echo "$as_me:2054: \$? = $ac_status" >&5
2055 (exit $ac_status); } >/dev/null; then
2056 if test -s conftest.err; then
2057 ac_cpp_err=$ac_c_preproc_warn_flag
2058 else
2059 ac_cpp_err=
2060 fi
2061else
2062 ac_cpp_err=yes
2063fi
2064if test -z "$ac_cpp_err"; then
2065 # Broken: success on invalid input.
2066continue
2067else
2068 echo "$as_me: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 # Passes both tests.
2071ac_preproc_ok=:
2072break
2073fi
2074rm -f conftest.err conftest.$ac_ext
2075
2076done
2077# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2078rm -f conftest.err conftest.$ac_ext
2079if $ac_preproc_ok; then
2080 :
2081else
2082 { { echo "$as_me:2082: error: C preprocessor \"$CPP\" fails sanity check" >&5
2083echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2084 { (exit 1); exit 1; }; }
2085fi
2086
2087ac_ext=c
2088ac_cpp='$CPP $CPPFLAGS'
2089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2091ac_compiler_gnu=$ac_cv_c_compiler_gnu
2092ac_main_return=return
2093
2094if test $ac_cv_c_compiler_gnu = yes; then
2095 echo "$as_me:2095: checking whether $CC needs -traditional" >&5
2096echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2097if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2098 echo $ECHO_N "(cached) $ECHO_C" >&6
2099else
2100 ac_pattern="Autoconf.*'x'"
2101 cat >conftest.$ac_ext <<_ACEOF
2102#line 2102 "configure"
2103#include "confdefs.h"
2104#include <sgtty.h>
2105int Autoconf = TIOCGETP;
2106_ACEOF
2107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2108 egrep "$ac_pattern" >/dev/null 2>&1; then
2109 ac_cv_prog_gcc_traditional=yes
2110else
2111 ac_cv_prog_gcc_traditional=no
2112fi
2113rm -rf conftest*
2114
2115 if test $ac_cv_prog_gcc_traditional = no; then
2116 cat >conftest.$ac_ext <<_ACEOF
2117#line 2117 "configure"
2118#include "confdefs.h"
2119#include <termio.h>
2120int Autoconf = TCGETA;
2121_ACEOF
2122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2123 egrep "$ac_pattern" >/dev/null 2>&1; then
2124 ac_cv_prog_gcc_traditional=yes
2125fi
2126rm -rf conftest*
2127
2128 fi
2129fi
2130echo "$as_me:2130: result: $ac_cv_prog_gcc_traditional" >&5
2131echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2132 if test $ac_cv_prog_gcc_traditional = yes; then
2133 CC="$CC -traditional"
2134 fi
2135fi
2136
2137echo "$as_me:2137: checking whether $CC understands -c and -o together" >&5
2138echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2139if test "${cf_cv_prog_CC_c_o+set}" = set; then
2140 echo $ECHO_N "(cached) $ECHO_C" >&6
2141else
2142
2143cat > conftest.$ac_ext <<CF_EOF
2144#include <stdio.h>
2145int main()
2146{
2147 ${cf_cv_main_return:-return}(0);
2148}
2149CF_EOF
2150# We do the test twice because some compilers refuse to overwrite an
2151# existing .o file with -o, though they will create one.
2152ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2153if { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2154 (eval $ac_try) 2>&5
2155 ac_status=$?
2156 echo "$as_me:2156: \$? = $ac_status" >&5
2157 (exit $ac_status); } &&
2158 test -f conftest2.$ac_objext && { (eval echo "$as_me:2158: \"$ac_try\"") >&5
2159 (eval $ac_try) 2>&5
2160 ac_status=$?
2161 echo "$as_me:2161: \$? = $ac_status" >&5
2162 (exit $ac_status); };
2163then
2164 eval cf_cv_prog_CC_c_o=yes
2165else
2166 eval cf_cv_prog_CC_c_o=no
2167fi
2168rm -rf conftest*
2169
2170fi
2171if test $cf_cv_prog_CC_c_o = yes; then
2172 echo "$as_me:2172: result: yes" >&5
2173echo "${ECHO_T}yes" >&6
2174else
2175 echo "$as_me:2175: result: no" >&5
2176echo "${ECHO_T}no" >&6
2177fi
2178
2179test "$program_prefix" != NONE &&
2180 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2181# Use a double $ so make ignores it.
2182test "$program_suffix" != NONE &&
2183 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2184# Double any \ or $. echo might interpret backslashes.
2185# By default was `s,x,x', remove it if useless.
2186cat <<\_ACEOF >conftest.sed
2187s/[\\$]/&&/g;s/;s,x,x,$//
2188_ACEOF
2189program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2190rm conftest.sed
2191
2192for ac_prog in mawk gawk nawk awk
2193do
2194 # Extract the first word of "$ac_prog", so it can be a program name with args.
2195set dummy $ac_prog; ac_word=$2
2196echo "$as_me:2196: checking for $ac_word" >&5
2197echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2198if test "${ac_cv_prog_AWK+set}" = set; then
2199 echo $ECHO_N "(cached) $ECHO_C" >&6
2200else
2201 if test -n "$AWK"; then
2202 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2203else
2204 ac_save_IFS=$IFS; IFS=$ac_path_separator
2205ac_dummy="$PATH"
2206for ac_dir in $ac_dummy; do
2207 IFS=$ac_save_IFS
2208 test -z "$ac_dir" && ac_dir=.
2209 $as_executable_p "$ac_dir/$ac_word" || continue
2210ac_cv_prog_AWK="$ac_prog"
2211echo "$as_me:2211: found $ac_dir/$ac_word" >&5
2212break
2213done
2214
2215fi
2216fi
2217AWK=$ac_cv_prog_AWK
2218if test -n "$AWK"; then
2219 echo "$as_me:2219: result: $AWK" >&5
2220echo "${ECHO_T}$AWK" >&6
2221else
2222 echo "$as_me:2222: result: no" >&5
2223echo "${ECHO_T}no" >&6
2224fi
2225
2226 test -n "$AWK" && break
2227done
2228
2229test -z "$AWK" && { { echo "$as_me:2229: error: No awk program found" >&5
2230echo "$as_me: error: No awk program found" >&2;}
2231 { (exit 1); exit 1; }; }
2232
2233echo "$as_me:2233: checking for egrep" >&5
2234echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2235if test "${ac_cv_prog_egrep+set}" = set; then
2236 echo $ECHO_N "(cached) $ECHO_C" >&6
2237else
2238 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2239 then ac_cv_prog_egrep='grep -E'
2240 else ac_cv_prog_egrep='egrep'
2241 fi
2242fi
2243echo "$as_me:2243: result: $ac_cv_prog_egrep" >&5
2244echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2245 EGREP=$ac_cv_prog_egrep
2246
2247 test -z "$EGREP" && { { echo "$as_me:2247: error: No egrep program found" >&5
2248echo "$as_me: error: No egrep program found" >&2;}
2249 { (exit 1); exit 1; }; }
2250
2251# Find a good install program. We prefer a C program (faster),
2252# so one script is as good as another. But avoid the broken or
2253# incompatible versions:
2254# SysV /etc/install, /usr/sbin/install
2255# SunOS /usr/etc/install
2256# IRIX /sbin/install
2257# AIX /bin/install
2258# AmigaOS /C/install, which installs bootblocks on floppy discs
2259# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2260# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2261# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2262# ./install, which can be erroneously created by make from ./install.sh.
2263echo "$as_me:2263: checking for a BSD compatible install" >&5
2264echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2265if test -z "$INSTALL"; then
2266if test "${ac_cv_path_install+set}" = set; then
2267 echo $ECHO_N "(cached) $ECHO_C" >&6
2268else
2269 ac_save_IFS=$IFS; IFS=$ac_path_separator
2270 for ac_dir in $PATH; do
2271 IFS=$ac_save_IFS
2272 # Account for people who put trailing slashes in PATH elements.
2273 case $ac_dir/ in
2274 / | ./ | .// | /cC/* \
2275 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2276 | /usr/ucb/* ) ;;
2277 *)
2278 # OSF1 and SCO ODT 3.0 have their own names for install.
2279 # Don't use installbsd from OSF since it installs stuff as root
2280 # by default.
2281 for ac_prog in ginstall scoinst install; do
2282 if $as_executable_p "$ac_dir/$ac_prog"; then
2283 if test $ac_prog = install &&
2284 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2285 # AIX install. It has an incompatible calling convention.
2286 :
2287 elif test $ac_prog = install &&
2288 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2289 # program-specific install script used by HP pwplus--don't use.
2290 :
2291 else
2292 ac_cv_path_install="$ac_dir/$ac_prog -c"
2293 break 2
2294 fi
2295 fi
2296 done
2297 ;;
2298 esac
2299 done
2300
2301fi
2302 if test "${ac_cv_path_install+set}" = set; then
2303 INSTALL=$ac_cv_path_install
2304 else
2305 # As a last resort, use the slow shell script. We don't cache a
2306 # path for INSTALL within a source directory, because that will
2307 # break other packages using the cache if that directory is
2308 # removed, or if the path is relative.
2309 INSTALL=$ac_install_sh
2310 fi
2311fi
2312echo "$as_me:2312: result: $INSTALL" >&5
2313echo "${ECHO_T}$INSTALL" >&6
2314
2315# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2316# It thinks the first close brace ends the variable substitution.
2317test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2318
2319test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2320
2321test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2322
2323echo "$as_me:2323: checking whether ln -s works" >&5
2324echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2325LN_S=$as_ln_s
2326if test "$LN_S" = "ln -s"; then
2327 echo "$as_me:2327: result: yes" >&5
2328echo "${ECHO_T}yes" >&6
2329else
2330 echo "$as_me:2330: result: no, using $LN_S" >&5
2331echo "${ECHO_T}no, using $LN_S" >&6
2332fi
2333
2334echo "$as_me:2334: checking if $LN_S -f options work" >&5
2335echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2336
2337rm -f conf$$.src conf$$dst
2338echo >conf$$.dst
2339echo first >conf$$.src
2340if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2341 cf_prog_ln_sf=yes
2342else
2343 cf_prog_ln_sf=no
2344fi
2345rm -f conf$$.dst conf$$src
2346echo "$as_me:2346: result: $cf_prog_ln_sf" >&5
2347echo "${ECHO_T}$cf_prog_ln_sf" >&6
2348
2349test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2350
2351echo "$as_me:2351: checking for long file names" >&5
2352echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2353if test "${ac_cv_sys_long_file_names+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
2355else
2356 ac_cv_sys_long_file_names=yes
2357# Test for long file names in all the places we know might matter:
2358# . the current directory, where building will happen
2359# $prefix/lib where we will be installing things
2360# $exec_prefix/lib likewise
2361# eval it to expand exec_prefix.
2362# $TMPDIR if set, where it might want to write temporary files
2363# if $TMPDIR is not set:
2364# /tmp where it might want to write temporary files
2365# /var/tmp likewise
2366# /usr/tmp likewise
2367if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2368 ac_tmpdirs=$TMPDIR
2369else
2370 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2371fi
2372for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2373 test -d $ac_dir || continue
2374 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2375 ac_xdir=$ac_dir/cf$$
2376 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2377 ac_tf1=$ac_xdir/conftest9012345
2378 ac_tf2=$ac_xdir/conftest9012346
2379 (echo 1 >$ac_tf1) 2>/dev/null
2380 (echo 2 >$ac_tf2) 2>/dev/null
2381 ac_val=`cat $ac_tf1 2>/dev/null`
2382 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2383 ac_cv_sys_long_file_names=no
2384 rm -rf $ac_xdir 2>/dev/null
2385 break
2386 fi
2387 rm -rf $ac_xdir 2>/dev/null
2388done
2389fi
2390echo "$as_me:2390: result: $ac_cv_sys_long_file_names" >&5
2391echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2392if test $ac_cv_sys_long_file_names = yes; then
2393
2394cat >>confdefs.h <<\EOF
2395#define HAVE_LONG_FILE_NAMES 1
2396EOF
2397
2398fi
2399
2400# if we find pkg-config, check if we should install the ".pc" files.
2401
2402echo "$as_me:2402: checking if you want to use pkg-config" >&5
2403echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2404
2405# Check whether --with-pkg-config or --without-pkg-config was given.
2406if test "${with_pkg_config+set}" = set; then
2407 withval="$with_pkg_config"
2408 cf_pkg_config=$withval
2409else
2410 cf_pkg_config=yes
2411fi;
2412echo "$as_me:2412: result: $cf_pkg_config" >&5
2413echo "${ECHO_T}$cf_pkg_config" >&6
2414
2415case $cf_pkg_config in
2416(no)
2417 PKG_CONFIG=none
2418 ;;
2419(yes)
2420
2421if test -n "$ac_tool_prefix"; then
2422 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2423set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2424echo "$as_me:2424: checking for $ac_word" >&5
2425echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2426if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2427 echo $ECHO_N "(cached) $ECHO_C" >&6
2428else
2429 case $PKG_CONFIG in
2430 [\\/]* | ?:[\\/]*)
2431 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2432 ;;
2433 *)
2434 ac_save_IFS=$IFS; IFS=$ac_path_separator
2435ac_dummy="$PATH"
2436for ac_dir in $ac_dummy; do
2437 IFS=$ac_save_IFS
2438 test -z "$ac_dir" && ac_dir=.
2439 if $as_executable_p "$ac_dir/$ac_word"; then
2440 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2441 echo "$as_me:2441: found $ac_dir/$ac_word" >&5
2442 break
2443fi
2444done
2445
2446 ;;
2447esac
2448fi
2449PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2450
2451if test -n "$PKG_CONFIG"; then
2452 echo "$as_me:2452: result: $PKG_CONFIG" >&5
2453echo "${ECHO_T}$PKG_CONFIG" >&6
2454else
2455 echo "$as_me:2455: result: no" >&5
2456echo "${ECHO_T}no" >&6
2457fi
2458
2459fi
2460if test -z "$ac_cv_path_PKG_CONFIG"; then
2461 ac_pt_PKG_CONFIG=$PKG_CONFIG
2462 # Extract the first word of "pkg-config", so it can be a program name with args.
2463set dummy pkg-config; ac_word=$2
2464echo "$as_me:2464: checking for $ac_word" >&5
2465echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2466if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2467 echo $ECHO_N "(cached) $ECHO_C" >&6
2468else
2469 case $ac_pt_PKG_CONFIG in
2470 [\\/]* | ?:[\\/]*)
2471 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2472 ;;
2473 *)
2474 ac_save_IFS=$IFS; IFS=$ac_path_separator
2475ac_dummy="$PATH"
2476for ac_dir in $ac_dummy; do
2477 IFS=$ac_save_IFS
2478 test -z "$ac_dir" && ac_dir=.
2479 if $as_executable_p "$ac_dir/$ac_word"; then
2480 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2481 echo "$as_me:2481: found $ac_dir/$ac_word" >&5
2482 break
2483fi
2484done
2485
2486 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2487 ;;
2488esac
2489fi
2490ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2491
2492if test -n "$ac_pt_PKG_CONFIG"; then
2493 echo "$as_me:2493: result: $ac_pt_PKG_CONFIG" >&5
2494echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2495else
2496 echo "$as_me:2496: result: no" >&5
2497echo "${ECHO_T}no" >&6
2498fi
2499
2500 PKG_CONFIG=$ac_pt_PKG_CONFIG
2501else
2502 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2503fi
2504
2505 ;;
2506(*)
2507 PKG_CONFIG=$withval
2508 ;;
2509esac
2510
2511test -z "$PKG_CONFIG" && PKG_CONFIG=none
2512if test "$PKG_CONFIG" != none ; then
2513
2514if test "x$prefix" != xNONE; then
2515 cf_path_syntax="$prefix"
2516else
2517 cf_path_syntax="$ac_default_prefix"
2518fi
2519
2520case ".$PKG_CONFIG" in
2521(.\$\(*\)*|.\'*\'*)
2522 ;;
2523(..|./*|.\\*)
2524 ;;
2525(.[a-zA-Z]:[\\/]*) # OS/2 EMX
2526 ;;
2527(.\${*prefix}*|.\${*dir}*)
2528 eval PKG_CONFIG="$PKG_CONFIG"
2529 case ".$PKG_CONFIG" in
2530 (.NONE/*)
2531 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2532 ;;
2533 esac
2534 ;;
2535(.no|.NONE/*)
2536 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2537 ;;
2538(*)
2539 { { echo "$as_me:2539: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2540echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2541 { (exit 1); exit 1; }; }
2542 ;;
2543esac
2544
2545elif test "x$cf_pkg_config" != xno ; then
2546 { echo "$as_me:2546: WARNING: pkg-config is not installed" >&5
2547echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2548fi
2549
2550if test "x$PKG_CONFIG" = xnone ; then
2551 PKG_CONFIG_LIBDIR=no
2552else
2553 echo "$as_me:2553: checking for $PKG_CONFIG library directory" >&5
2554echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2555
2556# Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2557if test "${with_pkg_config_libdir+set}" = set; then
2558 withval="$with_pkg_config_libdir"
2559 PKG_CONFIG_LIBDIR=$withval
2560else
2561 PKG_CONFIG_LIBDIR=yes
2562fi;
2563fi
2564
2565case x$PKG_CONFIG_LIBDIR in
2566(x/*)
2567 ;;
2568(xyes)
2569 # Look for the library directory using the same prefix as the executable
2570 if test "x$PKG_CONFIG" = xnone
2571 then
2572 cf_path=$prefix
2573 else
2574 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2575 fi
2576
2577 # If you don't like using the default architecture, you have to specify the
2578 # intended library directory and corresponding compiler/linker options.
2579 #
2580 # This case allows for Debian's 2014-flavor of multiarch, along with the
2581 # most common variations before that point. Some other variants spell the
2582 # directory differently, e.g., "pkg-config", and put it in unusual places.
2583 # pkg-config has always been poorly standardized, which is ironic...
2584 case x`(arch) 2>/dev/null` in
2585 (*64)
2586 cf_search_path="\
2587 $cf_path/lib/*64-linux-gnu \
2588 $cf_path/share \
2589 $cf_path/lib64 \
2590 $cf_path/lib32 \
2591 $cf_path/lib"
2592 ;;
2593 (*)
2594 cf_search_path="\
2595 $cf_path/lib/*-linux-gnu \
2596 $cf_path/share \
2597 $cf_path/lib32 \
2598 $cf_path/lib \
2599 $cf_path/libdata"
2600 ;;
2601 esac
2602
2603 test -n "$verbose" && echo " list..." 1>&6
2604
2605echo "${as_me:-configure}:2605: testing list... ..." 1>&5
2606
2607 for cf_config in $cf_search_path
2608 do
2609 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2610
2611echo "${as_me:-configure}:2611: testing checking $cf_config/pkgconfig ..." 1>&5
2612
2613 if test -d $cf_config/pkgconfig
2614 then
2615 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2616 echo "$as_me:2616: checking done" >&5
2617echo $ECHO_N "checking done... $ECHO_C" >&6
2618 break
2619 fi
2620 done
2621 ;;
2622(*)
2623 ;;
2624esac
2625
2626if test "x$PKG_CONFIG" != xnone ; then
2627 echo "$as_me:2627: result: $PKG_CONFIG_LIBDIR" >&5
2628echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2629fi
2630
2631echo "$as_me:2631: checking if you want to build test-programs" >&5
2632echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2633
2634# Check whether --with-tests or --without-tests was given.
2635if test "${with_tests+set}" = set; then
2636 withval="$with_tests"
2637 cf_with_tests=$withval
2638else
2639 cf_with_tests=yes
2640fi;
2641echo "$as_me:2641: result: $cf_with_tests" >&5
2642echo "${ECHO_T}$cf_with_tests" >&6
2643
2644echo "$as_me:2644: checking if we should assume mixed-case filenames" >&5
2645echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2646
2647# Check whether --enable-mixed-case or --disable-mixed-case was given.
2648if test "${enable_mixed_case+set}" = set; then
2649 enableval="$enable_mixed_case"
2650 enable_mixedcase=$enableval
2651else
2652 enable_mixedcase=auto
2653fi;
2654echo "$as_me:2654: result: $enable_mixedcase" >&5
2655echo "${ECHO_T}$enable_mixedcase" >&6
2656if test "$enable_mixedcase" = "auto" ; then
2657
2658echo "$as_me:2658: checking if filesystem supports mixed-case filenames" >&5
2659echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2660if test "${cf_cv_mixedcase+set}" = set; then
2661 echo $ECHO_N "(cached) $ECHO_C" >&6
2662else
2663
2664if test "$cross_compiling" = yes ; then
2665 case $target_alias in
2666 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2667 cf_cv_mixedcase=no
2668 ;;
2669 (*)
2670 cf_cv_mixedcase=yes
2671 ;;
2672 esac
2673else
2674 rm -f conftest CONFTEST
2675 echo test >conftest
2676 if test -f CONFTEST ; then
2677 cf_cv_mixedcase=no
2678 else
2679 cf_cv_mixedcase=yes
2680 fi
2681 rm -f conftest CONFTEST
2682fi
2683
2684fi
2685echo "$as_me:2685: result: $cf_cv_mixedcase" >&5
2686echo "${ECHO_T}$cf_cv_mixedcase" >&6
2687test "$cf_cv_mixedcase" = yes &&
2688cat >>confdefs.h <<\EOF
2689#define MIXEDCASE_FILENAMES 1
2690EOF
2691
2692else
2693 cf_cv_mixedcase=$enable_mixedcase
2694 if test "$enable_mixedcase" = "yes" ; then
2695 cat >>confdefs.h <<\EOF
2696#define MIXEDCASE_FILENAMES 1
2697EOF
2698
2699 fi
2700fi
2701
2702# do this after mixed-case option (tags/TAGS is not as important as tic).
2703echo "$as_me:2703: checking whether ${MAKE-make} sets \${MAKE}" >&5
2704echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2705set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2706if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2707 echo $ECHO_N "(cached) $ECHO_C" >&6
2708else
2709 cat >conftest.make <<\EOF
2710all:
2711 @echo 'ac_maketemp="${MAKE}"'
2712EOF
2713# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2714eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2715if test -n "$ac_maketemp"; then
2716 eval ac_cv_prog_make_${ac_make}_set=yes
2717else
2718 eval ac_cv_prog_make_${ac_make}_set=no
2719fi
2720rm -f conftest.make
2721fi
2722if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2723 echo "$as_me:2723: result: yes" >&5
2724echo "${ECHO_T}yes" >&6
2725 SET_MAKE=
2726else
2727 echo "$as_me:2727: result: no" >&5
2728echo "${ECHO_T}no" >&6
2729 SET_MAKE="MAKE=${MAKE-make}"
2730fi
2731
2732for ac_prog in exctags ctags
2733do
2734 # Extract the first word of "$ac_prog", so it can be a program name with args.
2735set dummy $ac_prog; ac_word=$2
2736echo "$as_me:2736: checking for $ac_word" >&5
2737echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738if test "${ac_cv_prog_CTAGS+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
2740else
2741 if test -n "$CTAGS"; then
2742 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2743else
2744 ac_save_IFS=$IFS; IFS=$ac_path_separator
2745ac_dummy="$PATH"
2746for ac_dir in $ac_dummy; do
2747 IFS=$ac_save_IFS
2748 test -z "$ac_dir" && ac_dir=.
2749 $as_executable_p "$ac_dir/$ac_word" || continue
2750ac_cv_prog_CTAGS="$ac_prog"
2751echo "$as_me:2751: found $ac_dir/$ac_word" >&5
2752break
2753done
2754
2755fi
2756fi
2757CTAGS=$ac_cv_prog_CTAGS
2758if test -n "$CTAGS"; then
2759 echo "$as_me:2759: result: $CTAGS" >&5
2760echo "${ECHO_T}$CTAGS" >&6
2761else
2762 echo "$as_me:2762: result: no" >&5
2763echo "${ECHO_T}no" >&6
2764fi
2765
2766 test -n "$CTAGS" && break
2767done
2768
2769for ac_prog in exetags etags
2770do
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772set dummy $ac_prog; ac_word=$2
2773echo "$as_me:2773: checking for $ac_word" >&5
2774echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2775if test "${ac_cv_prog_ETAGS+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2777else
2778 if test -n "$ETAGS"; then
2779 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2780else
2781 ac_save_IFS=$IFS; IFS=$ac_path_separator
2782ac_dummy="$PATH"
2783for ac_dir in $ac_dummy; do
2784 IFS=$ac_save_IFS
2785 test -z "$ac_dir" && ac_dir=.
2786 $as_executable_p "$ac_dir/$ac_word" || continue
2787ac_cv_prog_ETAGS="$ac_prog"
2788echo "$as_me:2788: found $ac_dir/$ac_word" >&5
2789break
2790done
2791
2792fi
2793fi
2794ETAGS=$ac_cv_prog_ETAGS
2795if test -n "$ETAGS"; then
2796 echo "$as_me:2796: result: $ETAGS" >&5
2797echo "${ECHO_T}$ETAGS" >&6
2798else
2799 echo "$as_me:2799: result: no" >&5
2800echo "${ECHO_T}no" >&6
2801fi
2802
2803 test -n "$ETAGS" && break
2804done
2805
2806# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2807set dummy ${CTAGS:-ctags}; ac_word=$2
2808echo "$as_me:2808: checking for $ac_word" >&5
2809echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2810if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2811 echo $ECHO_N "(cached) $ECHO_C" >&6
2812else
2813 if test -n "$MAKE_LOWER_TAGS"; then
2814 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2815else
2816 ac_save_IFS=$IFS; IFS=$ac_path_separator
2817ac_dummy="$PATH"
2818for ac_dir in $ac_dummy; do
2819 IFS=$ac_save_IFS
2820 test -z "$ac_dir" && ac_dir=.
2821 $as_executable_p "$ac_dir/$ac_word" || continue
2822ac_cv_prog_MAKE_LOWER_TAGS="yes"
2823echo "$as_me:2823: found $ac_dir/$ac_word" >&5
2824break
2825done
2826
2827 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2828fi
2829fi
2830MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2831if test -n "$MAKE_LOWER_TAGS"; then
2832 echo "$as_me:2832: result: $MAKE_LOWER_TAGS" >&5
2833echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2834else
2835 echo "$as_me:2835: result: no" >&5
2836echo "${ECHO_T}no" >&6
2837fi
2838
2839if test "$cf_cv_mixedcase" = yes ; then
2840 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2841set dummy ${ETAGS:-etags}; ac_word=$2
2842echo "$as_me:2842: checking for $ac_word" >&5
2843echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2844if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2845 echo $ECHO_N "(cached) $ECHO_C" >&6
2846else
2847 if test -n "$MAKE_UPPER_TAGS"; then
2848 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2849else
2850 ac_save_IFS=$IFS; IFS=$ac_path_separator
2851ac_dummy="$PATH"
2852for ac_dir in $ac_dummy; do
2853 IFS=$ac_save_IFS
2854 test -z "$ac_dir" && ac_dir=.
2855 $as_executable_p "$ac_dir/$ac_word" || continue
2856ac_cv_prog_MAKE_UPPER_TAGS="yes"
2857echo "$as_me:2857: found $ac_dir/$ac_word" >&5
2858break
2859done
2860
2861 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2862fi
2863fi
2864MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2865if test -n "$MAKE_UPPER_TAGS"; then
2866 echo "$as_me:2866: result: $MAKE_UPPER_TAGS" >&5
2867echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2868else
2869 echo "$as_me:2869: result: no" >&5
2870echo "${ECHO_T}no" >&6
2871fi
2872
2873else
2874 MAKE_UPPER_TAGS=no
2875fi
2876
2877if test "$MAKE_UPPER_TAGS" = yes ; then
2878 MAKE_UPPER_TAGS=
2879else
2880 MAKE_UPPER_TAGS="#"
2881fi
2882
2883if test "$MAKE_LOWER_TAGS" = yes ; then
2884 MAKE_LOWER_TAGS=
2885else
2886 MAKE_LOWER_TAGS="#"
2887fi
2888
2889echo "$as_me:2889: checking for makeflags variable" >&5
2890echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2891if test "${cf_cv_makeflags+set}" = set; then
2892 echo $ECHO_N "(cached) $ECHO_C" >&6
2893else
2894
2895 cf_cv_makeflags=''
2896 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2897 do
2898 cat >cf_makeflags.tmp <<CF_EOF
2899SHELL = $SHELL
2900all :
2901 @ echo '.$cf_option'
2902CF_EOF
2903 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
2904 case "$cf_result" in
2905 (.*k|.*kw)
2906 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2907 case "$cf_result" in
2908 (.*CC=*) cf_cv_makeflags=
2909 ;;
2910 (*) cf_cv_makeflags=$cf_option
2911 ;;
2912 esac
2913 break
2914 ;;
2915 (.-) ;;
2916 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
2917 ;;
2918 esac
2919 done
2920 rm -f cf_makeflags.tmp
2921
2922fi
2923echo "$as_me:2923: result: $cf_cv_makeflags" >&5
2924echo "${ECHO_T}$cf_cv_makeflags" >&6
2925
2926if test -n "$ac_tool_prefix"; then
2927 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2928set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2929echo "$as_me:2929: checking for $ac_word" >&5
2930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2931if test "${ac_cv_prog_RANLIB+set}" = set; then
2932 echo $ECHO_N "(cached) $ECHO_C" >&6
2933else
2934 if test -n "$RANLIB"; then
2935 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2936else
2937 ac_save_IFS=$IFS; IFS=$ac_path_separator
2938ac_dummy="$PATH"
2939for ac_dir in $ac_dummy; do
2940 IFS=$ac_save_IFS
2941 test -z "$ac_dir" && ac_dir=.
2942 $as_executable_p "$ac_dir/$ac_word" || continue
2943ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2944echo "$as_me:2944: found $ac_dir/$ac_word" >&5
2945break
2946done
2947
2948fi
2949fi
2950RANLIB=$ac_cv_prog_RANLIB
2951if test -n "$RANLIB"; then
2952 echo "$as_me:2952: result: $RANLIB" >&5
2953echo "${ECHO_T}$RANLIB" >&6
2954else
2955 echo "$as_me:2955: result: no" >&5
2956echo "${ECHO_T}no" >&6
2957fi
2958
2959fi
2960if test -z "$ac_cv_prog_RANLIB"; then
2961 ac_ct_RANLIB=$RANLIB
2962 # Extract the first word of "ranlib", so it can be a program name with args.
2963set dummy ranlib; ac_word=$2
2964echo "$as_me:2964: checking for $ac_word" >&5
2965echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2966if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2967 echo $ECHO_N "(cached) $ECHO_C" >&6
2968else
2969 if test -n "$ac_ct_RANLIB"; then
2970 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2971else
2972 ac_save_IFS=$IFS; IFS=$ac_path_separator
2973ac_dummy="$PATH"
2974for ac_dir in $ac_dummy; do
2975 IFS=$ac_save_IFS
2976 test -z "$ac_dir" && ac_dir=.
2977 $as_executable_p "$ac_dir/$ac_word" || continue
2978ac_cv_prog_ac_ct_RANLIB="ranlib"
2979echo "$as_me:2979: found $ac_dir/$ac_word" >&5
2980break
2981done
2982
2983 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
2984fi
2985fi
2986ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2987if test -n "$ac_ct_RANLIB"; then
2988 echo "$as_me:2988: result: $ac_ct_RANLIB" >&5
2989echo "${ECHO_T}$ac_ct_RANLIB" >&6
2990else
2991 echo "$as_me:2991: result: no" >&5
2992echo "${ECHO_T}no" >&6
2993fi
2994
2995 RANLIB=$ac_ct_RANLIB
2996else
2997 RANLIB="$ac_cv_prog_RANLIB"
2998fi
2999
3000if test -n "$ac_tool_prefix"; then
3001 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3002set dummy ${ac_tool_prefix}ld; 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_prog_LD+set}" = set; then
3006 echo $ECHO_N "(cached) $ECHO_C" >&6
3007else
3008 if test -n "$LD"; then
3009 ac_cv_prog_LD="$LD" # Let the user override the test.
3010else
3011 ac_save_IFS=$IFS; IFS=$ac_path_separator
3012ac_dummy="$PATH"
3013for ac_dir in $ac_dummy; do
3014 IFS=$ac_save_IFS
3015 test -z "$ac_dir" && ac_dir=.
3016 $as_executable_p "$ac_dir/$ac_word" || continue
3017ac_cv_prog_LD="${ac_tool_prefix}ld"
3018echo "$as_me:3018: found $ac_dir/$ac_word" >&5
3019break
3020done
3021
3022fi
3023fi
3024LD=$ac_cv_prog_LD
3025if test -n "$LD"; then
3026 echo "$as_me:3026: result: $LD" >&5
3027echo "${ECHO_T}$LD" >&6
3028else
3029 echo "$as_me:3029: result: no" >&5
3030echo "${ECHO_T}no" >&6
3031fi
3032
3033fi
3034if test -z "$ac_cv_prog_LD"; then
3035 ac_ct_LD=$LD
3036 # Extract the first word of "ld", so it can be a program name with args.
3037set dummy ld; ac_word=$2
3038echo "$as_me:3038: checking for $ac_word" >&5
3039echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3040if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3041 echo $ECHO_N "(cached) $ECHO_C" >&6
3042else
3043 if test -n "$ac_ct_LD"; then
3044 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3045else
3046 ac_save_IFS=$IFS; IFS=$ac_path_separator
3047ac_dummy="$PATH"
3048for ac_dir in $ac_dummy; do
3049 IFS=$ac_save_IFS
3050 test -z "$ac_dir" && ac_dir=.
3051 $as_executable_p "$ac_dir/$ac_word" || continue
3052ac_cv_prog_ac_ct_LD="ld"
3053echo "$as_me:3053: found $ac_dir/$ac_word" >&5
3054break
3055done
3056
3057 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3058fi
3059fi
3060ac_ct_LD=$ac_cv_prog_ac_ct_LD
3061if test -n "$ac_ct_LD"; then
3062 echo "$as_me:3062: result: $ac_ct_LD" >&5
3063echo "${ECHO_T}$ac_ct_LD" >&6
3064else
3065 echo "$as_me:3065: result: no" >&5
3066echo "${ECHO_T}no" >&6
3067fi
3068
3069 LD=$ac_ct_LD
3070else
3071 LD="$ac_cv_prog_LD"
3072fi
3073
3074if test -n "$ac_tool_prefix"; then
3075 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3076set dummy ${ac_tool_prefix}ar; ac_word=$2
3077echo "$as_me:3077: checking for $ac_word" >&5
3078echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3079if test "${ac_cv_prog_AR+set}" = set; then
3080 echo $ECHO_N "(cached) $ECHO_C" >&6
3081else
3082 if test -n "$AR"; then
3083 ac_cv_prog_AR="$AR" # Let the user override the test.
3084else
3085 ac_save_IFS=$IFS; IFS=$ac_path_separator
3086ac_dummy="$PATH"
3087for ac_dir in $ac_dummy; do
3088 IFS=$ac_save_IFS
3089 test -z "$ac_dir" && ac_dir=.
3090 $as_executable_p "$ac_dir/$ac_word" || continue
3091ac_cv_prog_AR="${ac_tool_prefix}ar"
3092echo "$as_me:3092: found $ac_dir/$ac_word" >&5
3093break
3094done
3095
3096fi
3097fi
3098AR=$ac_cv_prog_AR
3099if test -n "$AR"; then
3100 echo "$as_me:3100: result: $AR" >&5
3101echo "${ECHO_T}$AR" >&6
3102else
3103 echo "$as_me:3103: result: no" >&5
3104echo "${ECHO_T}no" >&6
3105fi
3106
3107fi
3108if test -z "$ac_cv_prog_AR"; then
3109 ac_ct_AR=$AR
3110 # Extract the first word of "ar", so it can be a program name with args.
3111set dummy ar; ac_word=$2
3112echo "$as_me:3112: checking for $ac_word" >&5
3113echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3115 echo $ECHO_N "(cached) $ECHO_C" >&6
3116else
3117 if test -n "$ac_ct_AR"; then
3118 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3119else
3120 ac_save_IFS=$IFS; IFS=$ac_path_separator
3121ac_dummy="$PATH"
3122for ac_dir in $ac_dummy; do
3123 IFS=$ac_save_IFS
3124 test -z "$ac_dir" && ac_dir=.
3125 $as_executable_p "$ac_dir/$ac_word" || continue
3126ac_cv_prog_ac_ct_AR="ar"
3127echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3128break
3129done
3130
3131 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3132fi
3133fi
3134ac_ct_AR=$ac_cv_prog_ac_ct_AR
3135if test -n "$ac_ct_AR"; then
3136 echo "$as_me:3136: result: $ac_ct_AR" >&5
3137echo "${ECHO_T}$ac_ct_AR" >&6
3138else
3139 echo "$as_me:3139: result: no" >&5
3140echo "${ECHO_T}no" >&6
3141fi
3142
3143 AR=$ac_ct_AR
3144else
3145 AR="$ac_cv_prog_AR"
3146fi
3147
3148if test -n "$ac_tool_prefix"; then
3149 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3150set dummy ${ac_tool_prefix}ar; ac_word=$2
3151echo "$as_me:3151: checking for $ac_word" >&5
3152echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3153if test "${ac_cv_prog_AR+set}" = set; then
3154 echo $ECHO_N "(cached) $ECHO_C" >&6
3155else
3156 if test -n "$AR"; then
3157 ac_cv_prog_AR="$AR" # Let the user override the test.
3158else
3159 ac_save_IFS=$IFS; IFS=$ac_path_separator
3160ac_dummy="$PATH"
3161for ac_dir in $ac_dummy; do
3162 IFS=$ac_save_IFS
3163 test -z "$ac_dir" && ac_dir=.
3164 $as_executable_p "$ac_dir/$ac_word" || continue
3165ac_cv_prog_AR="${ac_tool_prefix}ar"
3166echo "$as_me:3166: found $ac_dir/$ac_word" >&5
3167break
3168done
3169
3170fi
3171fi
3172AR=$ac_cv_prog_AR
3173if test -n "$AR"; then
3174 echo "$as_me:3174: result: $AR" >&5
3175echo "${ECHO_T}$AR" >&6
3176else
3177 echo "$as_me:3177: result: no" >&5
3178echo "${ECHO_T}no" >&6
3179fi
3180
3181fi
3182if test -z "$ac_cv_prog_AR"; then
3183 ac_ct_AR=$AR
3184 # Extract the first word of "ar", so it can be a program name with args.
3185set dummy ar; ac_word=$2
3186echo "$as_me:3186: checking for $ac_word" >&5
3187echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3188if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3189 echo $ECHO_N "(cached) $ECHO_C" >&6
3190else
3191 if test -n "$ac_ct_AR"; then
3192 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3193else
3194 ac_save_IFS=$IFS; IFS=$ac_path_separator
3195ac_dummy="$PATH"
3196for ac_dir in $ac_dummy; do
3197 IFS=$ac_save_IFS
3198 test -z "$ac_dir" && ac_dir=.
3199 $as_executable_p "$ac_dir/$ac_word" || continue
3200ac_cv_prog_ac_ct_AR="ar"
3201echo "$as_me:3201: found $ac_dir/$ac_word" >&5
3202break
3203done
3204
3205 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3206fi
3207fi
3208ac_ct_AR=$ac_cv_prog_ac_ct_AR
3209if test -n "$ac_ct_AR"; then
3210 echo "$as_me:3210: result: $ac_ct_AR" >&5
3211echo "${ECHO_T}$ac_ct_AR" >&6
3212else
3213 echo "$as_me:3213: result: no" >&5
3214echo "${ECHO_T}no" >&6
3215fi
3216
3217 AR=$ac_ct_AR
3218else
3219 AR="$ac_cv_prog_AR"
3220fi
3221
3222echo "$as_me:3222: checking for options to update archives" >&5
3223echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3224if test "${cf_cv_ar_flags+set}" = set; then
3225 echo $ECHO_N "(cached) $ECHO_C" >&6
3226else
3227
3228 cf_cv_ar_flags=unknown
3229 for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3230 do
3231
3232 # check if $ARFLAGS already contains this choice
3233 if test "x$ARFLAGS" != "x" ; then
3234 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3235 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3236 cf_cv_ar_flags=
3237 break
3238 fi
3239 fi
3240
3241 rm -f conftest.$ac_cv_objext
3242 rm -f conftest.a
3243
3244 cat >conftest.$ac_ext <<EOF
3245#line 3245 "configure"
3246int testdata[3] = { 123, 456, 789 };
3247EOF
3248 if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
3249 (eval $ac_compile) 2>&5
3250 ac_status=$?
3251 echo "$as_me:3251: \$? = $ac_status" >&5
3252 (exit $ac_status); } ; then
3253 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3254 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3255 if test -f conftest.a ; then
3256 cf_cv_ar_flags=$cf_ar_flags
3257 break
3258 fi
3259 else
3260 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3261
3262echo "${as_me:-configure}:3262: testing cannot compile test-program ..." 1>&5
3263
3264 break
3265 fi
3266 done
3267 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3268
3269fi
3270echo "$as_me:3270: result: $cf_cv_ar_flags" >&5
3271echo "${ECHO_T}$cf_cv_ar_flags" >&6
3272
3273if test -n "$ARFLAGS" ; then
3274 if test -n "$cf_cv_ar_flags" ; then
3275 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3276 fi
3277else
3278 ARFLAGS=$cf_cv_ar_flags
3279fi
3280
3281 echo "$as_me:3281: checking for PATH separator" >&5
3282echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3283 case $cf_cv_system_name in
3284 (os2*) PATH_SEPARATOR=';' ;;
3285 (*) ${PATH_SEPARATOR:=':'} ;;
3286 esac
3287
3288 echo "$as_me:3288: result: $PATH_SEPARATOR" >&5
3289echo "${ECHO_T}$PATH_SEPARATOR" >&6
3290
3291echo "$as_me:3291: checking if you have specified an install-prefix" >&5
3292echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3293
3294# Check whether --with-install-prefix or --without-install-prefix was given.
3295if test "${with_install_prefix+set}" = set; then
3296 withval="$with_install_prefix"
3297 case "$withval" in
3298 (yes|no)
3299 ;;
3300 (*) DESTDIR="$withval"
3301 ;;
3302 esac
3303fi;
3304echo "$as_me:3304: result: $DESTDIR" >&5
3305echo "${ECHO_T}$DESTDIR" >&6
3306
3307###############################################################################
3308
3309# If we're cross-compiling, allow the user to override the tools and their
3310# options. The configure script is oriented toward identifying the host
3311# compiler, etc., but we need a build compiler to generate parts of the source.
3312
3313if test "$cross_compiling" = yes ; then
3314
3315 # defaults that we might want to override
3316 : ${BUILD_CFLAGS:=''}
3317 : ${BUILD_CPPFLAGS:=''}
3318 : ${BUILD_LDFLAGS:=''}
3319 : ${BUILD_LIBS:=''}
3320 : ${BUILD_EXEEXT:='$x'}
3321 : ${BUILD_OBJEXT:='o'}
3322
3323# Check whether --with-build-cc or --without-build-cc was given.
3324if test "${with_build_cc+set}" = set; then
3325 withval="$with_build_cc"
3326 BUILD_CC="$withval"
3327else
3328 for ac_prog in gcc cc cl
3329do
3330 # Extract the first word of "$ac_prog", so it can be a program name with args.
3331set dummy $ac_prog; ac_word=$2
3332echo "$as_me:3332: checking for $ac_word" >&5
3333echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3334if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3335 echo $ECHO_N "(cached) $ECHO_C" >&6
3336else
3337 if test -n "$BUILD_CC"; then
3338 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3339else
3340 ac_save_IFS=$IFS; IFS=$ac_path_separator
3341ac_dummy="$PATH"
3342for ac_dir in $ac_dummy; do
3343 IFS=$ac_save_IFS
3344 test -z "$ac_dir" && ac_dir=.
3345 $as_executable_p "$ac_dir/$ac_word" || continue
3346ac_cv_prog_BUILD_CC="$ac_prog"
3347echo "$as_me:3347: found $ac_dir/$ac_word" >&5
3348break
3349done
3350
3351fi
3352fi
3353BUILD_CC=$ac_cv_prog_BUILD_CC
3354if test -n "$BUILD_CC"; then
3355 echo "$as_me:3355: result: $BUILD_CC" >&5
3356echo "${ECHO_T}$BUILD_CC" >&6
3357else
3358 echo "$as_me:3358: result: no" >&5
3359echo "${ECHO_T}no" >&6
3360fi
3361
3362 test -n "$BUILD_CC" && break
3363done
3364
3365fi;
3366 echo "$as_me:3366: checking for native build C compiler" >&5
3367echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3368 echo "$as_me:3368: result: $BUILD_CC" >&5
3369echo "${ECHO_T}$BUILD_CC" >&6
3370
3371 echo "$as_me:3371: checking for native build C preprocessor" >&5
3372echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3373
3374# Check whether --with-build-cpp or --without-build-cpp was given.
3375if test "${with_build_cpp+set}" = set; then
3376 withval="$with_build_cpp"
3377 BUILD_CPP="$withval"
3378else
3379 BUILD_CPP='${BUILD_CC} -E'
3380fi;
3381 echo "$as_me:3381: result: $BUILD_CPP" >&5
3382echo "${ECHO_T}$BUILD_CPP" >&6
3383
3384 echo "$as_me:3384: checking for native build C flags" >&5
3385echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3386
3387# Check whether --with-build-cflags or --without-build-cflags was given.
3388if test "${with_build_cflags+set}" = set; then
3389 withval="$with_build_cflags"
3390 BUILD_CFLAGS="$withval"
3391fi;
3392 echo "$as_me:3392: result: $BUILD_CFLAGS" >&5
3393echo "${ECHO_T}$BUILD_CFLAGS" >&6
3394
3395 echo "$as_me:3395: checking for native build C preprocessor-flags" >&5
3396echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3397
3398# Check whether --with-build-cppflags or --without-build-cppflags was given.
3399if test "${with_build_cppflags+set}" = set; then
3400 withval="$with_build_cppflags"
3401 BUILD_CPPFLAGS="$withval"
3402fi;
3403 echo "$as_me:3403: result: $BUILD_CPPFLAGS" >&5
3404echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3405
3406 echo "$as_me:3406: checking for native build linker-flags" >&5
3407echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3408
3409# Check whether --with-build-ldflags or --without-build-ldflags was given.
3410if test "${with_build_ldflags+set}" = set; then
3411 withval="$with_build_ldflags"
3412 BUILD_LDFLAGS="$withval"
3413fi;
3414 echo "$as_me:3414: result: $BUILD_LDFLAGS" >&5
3415echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3416
3417 echo "$as_me:3417: checking for native build linker-libraries" >&5
3418echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3419
3420# Check whether --with-build-libs or --without-build-libs was given.
3421if test "${with_build_libs+set}" = set; then
3422 withval="$with_build_libs"
3423 BUILD_LIBS="$withval"
3424fi;
3425 echo "$as_me:3425: result: $BUILD_LIBS" >&5
3426echo "${ECHO_T}$BUILD_LIBS" >&6
3427
3428 # this assumes we're on Unix.
3429 BUILD_EXEEXT=
3430 BUILD_OBJEXT=o
3431
3432 : ${BUILD_CC:='${CC}'}
3433
3434 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3435 { { echo "$as_me:3435: error: Cross-build requires two compilers.
3436Use --with-build-cc to specify the native compiler." >&5
3437echo "$as_me: error: Cross-build requires two compilers.
3438Use --with-build-cc to specify the native compiler." >&2;}
3439 { (exit 1); exit 1; }; }
3440 fi
3441
3442else
3443 : ${BUILD_CC:='${CC}'}
3444 : ${BUILD_CPP:='${CPP}'}
3445 : ${BUILD_CFLAGS:='${CFLAGS}'}
3446 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3447 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3448 : ${BUILD_LIBS:='${LIBS}'}
3449 : ${BUILD_EXEEXT:='$x'}
3450 : ${BUILD_OBJEXT:='o'}
3451fi
3452
3453###############################################################################
3454
3455### Options to allow the user to specify the set of libraries which are used.
3456### Use "--without-normal --with-shared" to allow the default model to be
3457### shared, for example.
3458cf_list_models=""
3459
3460echo "$as_me:3460: checking if you want to build shared C-objects" >&5
3461echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3462
3463# Check whether --with-shared or --without-shared was given.
3464if test "${with_shared+set}" = set; then
3465 withval="$with_shared"
3466 with_shared=$withval
3467else
3468 with_shared=no
3469fi;
3470echo "$as_me:3470: result: $with_shared" >&5
3471echo "${ECHO_T}$with_shared" >&6
3472test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3473
3474echo "$as_me:3474: checking for specified models" >&5
3475echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3476test -z "$cf_list_models" && cf_list_models=normal
3477echo "$as_me:3477: result: $cf_list_models" >&5
3478echo "${ECHO_T}$cf_list_models" >&6
3479
3480### Use the first model as the default, and save its suffix for use in building
3481### up test-applications.
3482echo "$as_me:3482: checking for default model" >&5
3483echo $ECHO_N "checking for default model... $ECHO_C" >&6
3484DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3485echo "$as_me:3485: result: $DFT_LWR_MODEL" >&5
3486echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3487
3488DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3489
3490echo "$as_me:3490: checking for specific curses-directory" >&5
3491echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3492
3493# Check whether --with-curses-dir or --without-curses-dir was given.
3494if test "${with_curses_dir+set}" = set; then
3495 withval="$with_curses_dir"
3496 cf_cv_curses_dir=$withval
3497else
3498 cf_cv_curses_dir=no
3499fi;
3500echo "$as_me:3500: result: $cf_cv_curses_dir" >&5
3501echo "${ECHO_T}$cf_cv_curses_dir" >&6
3502
3503if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3504then
3505
3506if test "x$prefix" != xNONE; then
3507 cf_path_syntax="$prefix"
3508else
3509 cf_path_syntax="$ac_default_prefix"
3510fi
3511
3512case ".$withval" in
3513(.\$\(*\)*|.\'*\'*)
3514 ;;
3515(..|./*|.\\*)
3516 ;;
3517(.[a-zA-Z]:[\\/]*) # OS/2 EMX
3518 ;;
3519(.\${*prefix}*|.\${*dir}*)
3520 eval withval="$withval"
3521 case ".$withval" in
3522 (.NONE/*)
3523 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3524 ;;
3525 esac
3526 ;;
3527(.no|.NONE/*)
3528 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3529 ;;
3530(*)
3531 { { echo "$as_me:3531: error: expected a pathname, not \"$withval\"" >&5
3532echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3533 { (exit 1); exit 1; }; }
3534 ;;
3535esac
3536
3537 if test -d "$cf_cv_curses_dir"
3538 then
3539
3540if test -n "$cf_cv_curses_dir/include" ; then
3541 for cf_add_incdir in $cf_cv_curses_dir/include
3542 do
3543 while test $cf_add_incdir != /usr/include
3544 do
3545 if test -d $cf_add_incdir
3546 then
3547 cf_have_incdir=no
3548 if test -n "$CFLAGS$CPPFLAGS" ; then
3549 # a loop is needed to ensure we can add subdirs of existing dirs
3550 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3551 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3552 cf_have_incdir=yes; break
3553 fi
3554 done
3555 fi
3556
3557 if test "$cf_have_incdir" = no ; then
3558 if test "$cf_add_incdir" = /usr/local/include ; then
3559 if test "$GCC" = yes
3560 then
3561 cf_save_CPPFLAGS=$CPPFLAGS
3562 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3563 cat >conftest.$ac_ext <<_ACEOF
3564#line 3564 "configure"
3565#include "confdefs.h"
3566#include <stdio.h>
3567int
3568main ()
3569{
3570printf("Hello")
3571 ;
3572 return 0;
3573}
3574_ACEOF
3575rm -f conftest.$ac_objext
3576if { (eval echo "$as_me:3576: \"$ac_compile\"") >&5
3577 (eval $ac_compile) 2>&5
3578 ac_status=$?
3579 echo "$as_me:3579: \$? = $ac_status" >&5
3580 (exit $ac_status); } &&
3581 { ac_try='test -s conftest.$ac_objext'
3582 { (eval echo "$as_me:3582: \"$ac_try\"") >&5
3583 (eval $ac_try) 2>&5
3584 ac_status=$?
3585 echo "$as_me:3585: \$? = $ac_status" >&5
3586 (exit $ac_status); }; }; then
3587 :
3588else
3589 echo "$as_me: failed program was:" >&5
3590cat conftest.$ac_ext >&5
3591cf_have_incdir=yes
3592fi
3593rm -f conftest.$ac_objext conftest.$ac_ext
3594 CPPFLAGS=$cf_save_CPPFLAGS
3595 fi
3596 fi
3597 fi
3598
3599 if test "$cf_have_incdir" = no ; then
3600 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3601
3602echo "${as_me:-configure}:3602: testing adding $cf_add_incdir to include-path ..." 1>&5
3603
3604 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3605
3606 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3607 test "$cf_top_incdir" = "$cf_add_incdir" && break
3608 cf_add_incdir="$cf_top_incdir"
3609 else
3610 break
3611 fi
3612 else
3613 break
3614 fi
3615 done
3616 done
3617fi
3618
3619if test -n "$cf_cv_curses_dir/lib" ; then
3620 for cf_add_libdir in $cf_cv_curses_dir/lib
3621 do
3622 if test $cf_add_libdir = /usr/lib ; then
3623 :
3624 elif test -d $cf_add_libdir
3625 then
3626 cf_have_libdir=no
3627 if test -n "$LDFLAGS$LIBS" ; then
3628 # a loop is needed to ensure we can add subdirs of existing dirs
3629 for cf_test_libdir in $LDFLAGS $LIBS ; do
3630 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3631 cf_have_libdir=yes; break
3632 fi
3633 done
3634 fi
3635 if test "$cf_have_libdir" = no ; then
3636 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3637
3638echo "${as_me:-configure}:3638: testing adding $cf_add_libdir to library-path ..." 1>&5
3639
3640 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3641 fi
3642 fi
3643 done
3644fi
3645
3646 fi
3647fi
3648
3649cf_ncuconfig_root=ncurses
3650cf_have_ncuconfig=no
3651
3652if test "x${PKG_CONFIG:=none}" != xnone; then
3653 echo "$as_me:3653: checking pkg-config for $cf_ncuconfig_root" >&5
3654echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3655 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3656 echo "$as_me:3656: result: yes" >&5
3657echo "${ECHO_T}yes" >&6
3658
3659 echo "$as_me:3659: checking if the $cf_ncuconfig_root package files work" >&5
3660echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3661 cf_have_ncuconfig=unknown
3662
3663 cf_save_CPPFLAGS="$CPPFLAGS"
3664 cf_save_LIBS="$LIBS"
3665
3666 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3667
3668cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3669# Filter out duplicates - this happens with badly-designed ".pc" files...
3670for cf_add_1lib in $LIBS
3671do
3672 for cf_add_2lib in $cf_add_libs
3673 do
3674 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3675 then
3676 cf_add_1lib=
3677 break
3678 fi
3679 done
3680 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3681done
3682LIBS="$cf_add_libs"
3683
3684 cat >conftest.$ac_ext <<_ACEOF
3685#line 3685 "configure"
3686#include "confdefs.h"
3687#include <${cf_cv_ncurses_header:-curses.h}>
3688int
3689main ()
3690{
3691initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3692 ;
3693 return 0;
3694}
3695_ACEOF
3696rm -f conftest.$ac_objext conftest$ac_exeext
3697if { (eval echo "$as_me:3697: \"$ac_link\"") >&5
3698 (eval $ac_link) 2>&5
3699 ac_status=$?
3700 echo "$as_me:3700: \$? = $ac_status" >&5
3701 (exit $ac_status); } &&
3702 { ac_try='test -s conftest$ac_exeext'
3703 { (eval echo "$as_me:3703: \"$ac_try\"") >&5
3704 (eval $ac_try) 2>&5
3705 ac_status=$?
3706 echo "$as_me:3706: \$? = $ac_status" >&5
3707 (exit $ac_status); }; }; then
3708 if test "$cross_compiling" = yes; then
3709 cf_have_ncuconfig=maybe
3710else
3711 cat >conftest.$ac_ext <<_ACEOF
3712#line 3712 "configure"
3713#include "confdefs.h"
3714#include <${cf_cv_ncurses_header:-curses.h}>
3715 int main(void)
3716 { char *xx = curses_version(); return (xx == 0); }
3717_ACEOF
3718rm -f conftest$ac_exeext
3719if { (eval echo "$as_me:3719: \"$ac_link\"") >&5
3720 (eval $ac_link) 2>&5
3721 ac_status=$?
3722 echo "$as_me:3722: \$? = $ac_status" >&5
3723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3724 { (eval echo "$as_me:3724: \"$ac_try\"") >&5
3725 (eval $ac_try) 2>&5
3726 ac_status=$?
3727 echo "$as_me:3727: \$? = $ac_status" >&5
3728 (exit $ac_status); }; }; then
3729 cf_have_ncuconfig=yes
3730else
3731 echo "$as_me: program exited with status $ac_status" >&5
3732echo "$as_me: failed program was:" >&5
3733cat conftest.$ac_ext >&5
3734cf_have_ncuconfig=no
3735fi
3736rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3737fi
3738else
3739 echo "$as_me: failed program was:" >&5
3740cat conftest.$ac_ext >&5
3741cf_have_ncuconfig=no
3742fi
3743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3744 echo "$as_me:3744: result: $cf_have_ncuconfig" >&5
3745echo "${ECHO_T}$cf_have_ncuconfig" >&6
3746 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
3747 if test "$cf_have_ncuconfig" != "yes"
3748 then
3749 CPPFLAGS="$cf_save_CPPFLAGS"
3750 LIBS="$cf_save_LIBS"
3751 NCURSES_CONFIG_PKG=none
3752 else
3753
3754cat >>confdefs.h <<\EOF
3755#define NCURSES 1
3756EOF
3757
3758 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3759 fi
3760
3761 else
3762 echo "$as_me:3762: result: no" >&5
3763echo "${ECHO_T}no" >&6
3764 NCURSES_CONFIG_PKG=none
3765 fi
3766else
3767 NCURSES_CONFIG_PKG=none
3768fi
3769
3770if test "x$cf_have_ncuconfig" = "xno"; then
3771 echo "Looking for ${cf_ncuconfig_root}-config"
3772
3773if test -n "$ac_tool_prefix"; then
3774 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3775 do
3776 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3777set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3778echo "$as_me:3778: checking for $ac_word" >&5
3779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
3781 echo $ECHO_N "(cached) $ECHO_C" >&6
3782else
3783 if test -n "$NCURSES_CONFIG"; then
3784 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
3785else
3786 ac_save_IFS=$IFS; IFS=$ac_path_separator
3787ac_dummy="$PATH"
3788for ac_dir in $ac_dummy; do
3789 IFS=$ac_save_IFS
3790 test -z "$ac_dir" && ac_dir=.
3791 $as_executable_p "$ac_dir/$ac_word" || continue
3792ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
3793echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794break
3795done
3796
3797fi
3798fi
3799NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
3800if test -n "$NCURSES_CONFIG"; then
3801 echo "$as_me:3801: result: $NCURSES_CONFIG" >&5
3802echo "${ECHO_T}$NCURSES_CONFIG" >&6
3803else
3804 echo "$as_me:3804: result: no" >&5
3805echo "${ECHO_T}no" >&6
3806fi
3807
3808 test -n "$NCURSES_CONFIG" && break
3809 done
3810fi
3811if test -z "$NCURSES_CONFIG"; then
3812 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
3813 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3814do
3815 # Extract the first word of "$ac_prog", so it can be a program name with args.
3816set dummy $ac_prog; ac_word=$2
3817echo "$as_me:3817: checking for $ac_word" >&5
3818echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3819if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
3820 echo $ECHO_N "(cached) $ECHO_C" >&6
3821else
3822 if test -n "$ac_ct_NCURSES_CONFIG"; then
3823 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
3824else
3825 ac_save_IFS=$IFS; IFS=$ac_path_separator
3826ac_dummy="$PATH"
3827for ac_dir in $ac_dummy; do
3828 IFS=$ac_save_IFS
3829 test -z "$ac_dir" && ac_dir=.
3830 $as_executable_p "$ac_dir/$ac_word" || continue
3831ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
3832echo "$as_me:3832: found $ac_dir/$ac_word" >&5
3833break
3834done
3835
3836fi
3837fi
3838ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
3839if test -n "$ac_ct_NCURSES_CONFIG"; then
3840 echo "$as_me:3840: result: $ac_ct_NCURSES_CONFIG" >&5
3841echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
3842else
3843 echo "$as_me:3843: result: no" >&5
3844echo "${ECHO_T}no" >&6
3845fi
3846
3847 test -n "$ac_ct_NCURSES_CONFIG" && break
3848done
3849test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
3850
3851 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
3852fi
3853
3854 if test "$NCURSES_CONFIG" != none ; then
3855
3856 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3857
3858cf_add_libs="`$NCURSES_CONFIG --libs`"
3859# Filter out duplicates - this happens with badly-designed ".pc" files...
3860for cf_add_1lib in $LIBS
3861do
3862 for cf_add_2lib in $cf_add_libs
3863 do
3864 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3865 then
3866 cf_add_1lib=
3867 break
3868 fi
3869 done
3870 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3871done
3872LIBS="$cf_add_libs"
3873
3874 # even with config script, some packages use no-override for curses.h
3875
3876echo "$as_me:3876: checking if we have identified curses headers" >&5
3877echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
3878if test "${cf_cv_ncurses_header+set}" = set; then
3879 echo $ECHO_N "(cached) $ECHO_C" >&6
3880else
3881
3882cf_cv_ncurses_header=none
3883for cf_header in \
3884 ncurses.h ncurses/ncurses.h \
3885 curses.h ncurses/curses.h
3886do
3887cat >conftest.$ac_ext <<_ACEOF
3888#line 3888 "configure"
3889#include "confdefs.h"
3890#include <${cf_header}>
3891int
3892main ()
3893{
3894initscr(); tgoto("?", 0,0)
3895 ;
3896 return 0;
3897}
3898_ACEOF
3899rm -f conftest.$ac_objext
3900if { (eval echo "$as_me:3900: \"$ac_compile\"") >&5
3901 (eval $ac_compile) 2>&5
3902 ac_status=$?
3903 echo "$as_me:3903: \$? = $ac_status" >&5
3904 (exit $ac_status); } &&
3905 { ac_try='test -s conftest.$ac_objext'
3906 { (eval echo "$as_me:3906: \"$ac_try\"") >&5
3907 (eval $ac_try) 2>&5
3908 ac_status=$?
3909 echo "$as_me:3909: \$? = $ac_status" >&5
3910 (exit $ac_status); }; }; then
3911 cf_cv_ncurses_header=$cf_header; break
3912else
3913 echo "$as_me: failed program was:" >&5
3914cat conftest.$ac_ext >&5
3915fi
3916rm -f conftest.$ac_objext conftest.$ac_ext
3917done
3918
3919fi
3920echo "$as_me:3920: result: $cf_cv_ncurses_header" >&5
3921echo "${ECHO_T}$cf_cv_ncurses_header" >&6
3922
3923if test "$cf_cv_ncurses_header" = none ; then
3924 { { echo "$as_me:3924: error: No curses header-files found" >&5
3925echo "$as_me: error: No curses header-files found" >&2;}
3926 { (exit 1); exit 1; }; }
3927fi
3928
3929# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3930
3931for ac_header in $cf_cv_ncurses_header
3932do
3933as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3934echo "$as_me:3934: checking for $ac_header" >&5
3935echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3936if eval "test \"\${$as_ac_Header+set}\" = set"; then
3937 echo $ECHO_N "(cached) $ECHO_C" >&6
3938else
3939 cat >conftest.$ac_ext <<_ACEOF
3940#line 3940 "configure"
3941#include "confdefs.h"
3942#include <$ac_header>
3943_ACEOF
3944if { (eval echo "$as_me:3944: \"$ac_cpp conftest.$ac_ext\"") >&5
3945 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3946 ac_status=$?
3947 egrep -v '^ *\+' conftest.er1 >conftest.err
3948 rm -f conftest.er1
3949 cat conftest.err >&5
3950 echo "$as_me:3950: \$? = $ac_status" >&5
3951 (exit $ac_status); } >/dev/null; then
3952 if test -s conftest.err; then
3953 ac_cpp_err=$ac_c_preproc_warn_flag
3954 else
3955 ac_cpp_err=
3956 fi
3957else
3958 ac_cpp_err=yes
3959fi
3960if test -z "$ac_cpp_err"; then
3961 eval "$as_ac_Header=yes"
3962else
3963 echo "$as_me: failed program was:" >&5
3964 cat conftest.$ac_ext >&5
3965 eval "$as_ac_Header=no"
3966fi
3967rm -f conftest.err conftest.$ac_ext
3968fi
3969echo "$as_me:3969: result: `eval echo '${'$as_ac_Header'}'`" >&5
3970echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3971if test `eval echo '${'$as_ac_Header'}'` = yes; then
3972 cat >>confdefs.h <<EOF
3973#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3974EOF
3975
3976fi
3977done
3978
3979cat >>confdefs.h <<\EOF
3980#define NCURSES 1
3981EOF
3982
3983cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3984
3985 cat >>confdefs.h <<EOF
3986#define $cf_nculib_ROOT 1
3987EOF
3988
3989 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3990
3991 else
3992
3993cf_ncuhdr_root=ncurses
3994
3995test -n "$cf_cv_curses_dir" && \
3996test "$cf_cv_curses_dir" != "no" && { \
3997
3998if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3999 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4000 do
4001 while test $cf_add_incdir != /usr/include
4002 do
4003 if test -d $cf_add_incdir
4004 then
4005 cf_have_incdir=no
4006 if test -n "$CFLAGS$CPPFLAGS" ; then
4007 # a loop is needed to ensure we can add subdirs of existing dirs
4008 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4009 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4010 cf_have_incdir=yes; break
4011 fi
4012 done
4013 fi
4014
4015 if test "$cf_have_incdir" = no ; then
4016 if test "$cf_add_incdir" = /usr/local/include ; then
4017 if test "$GCC" = yes
4018 then
4019 cf_save_CPPFLAGS=$CPPFLAGS
4020 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4021 cat >conftest.$ac_ext <<_ACEOF
4022#line 4022 "configure"
4023#include "confdefs.h"
4024#include <stdio.h>
4025int
4026main ()
4027{
4028printf("Hello")
4029 ;
4030 return 0;
4031}
4032_ACEOF
4033rm -f conftest.$ac_objext
4034if { (eval echo "$as_me:4034: \"$ac_compile\"") >&5
4035 (eval $ac_compile) 2>&5
4036 ac_status=$?
4037 echo "$as_me:4037: \$? = $ac_status" >&5
4038 (exit $ac_status); } &&
4039 { ac_try='test -s conftest.$ac_objext'
4040 { (eval echo "$as_me:4040: \"$ac_try\"") >&5
4041 (eval $ac_try) 2>&5
4042 ac_status=$?
4043 echo "$as_me:4043: \$? = $ac_status" >&5
4044 (exit $ac_status); }; }; then
4045 :
4046else
4047 echo "$as_me: failed program was:" >&5
4048cat conftest.$ac_ext >&5
4049cf_have_incdir=yes
4050fi
4051rm -f conftest.$ac_objext conftest.$ac_ext
4052 CPPFLAGS=$cf_save_CPPFLAGS
4053 fi
4054 fi
4055 fi
4056
4057 if test "$cf_have_incdir" = no ; then
4058 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4059
4060echo "${as_me:-configure}:4060: testing adding $cf_add_incdir to include-path ..." 1>&5
4061
4062 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4063
4064 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4065 test "$cf_top_incdir" = "$cf_add_incdir" && break
4066 cf_add_incdir="$cf_top_incdir"
4067 else
4068 break
4069 fi
4070 else
4071 break
4072 fi
4073 done
4074 done
4075fi
4076
4077}
4078
4079echo "$as_me:4079: checking for $cf_ncuhdr_root header in include-path" >&5
4080echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4081if test "${cf_cv_ncurses_h+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
4083else
4084
4085 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4086 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4087 for cf_header in $cf_header_list
4088 do
4089
4090 cat >conftest.$ac_ext <<_ACEOF
4091#line 4091 "configure"
4092#include "confdefs.h"
4093
4094#include <$cf_header>
4095int
4096main ()
4097{
4098
4099#ifdef NCURSES_VERSION
4100
4101printf("%s\n", NCURSES_VERSION);
4102#else
4103#ifdef __NCURSES_H
4104printf("old\n");
4105#else
4106 make an error
4107#endif
4108#endif
4109
4110 ;
4111 return 0;
4112}
4113_ACEOF
4114rm -f conftest.$ac_objext
4115if { (eval echo "$as_me:4115: \"$ac_compile\"") >&5
4116 (eval $ac_compile) 2>&5
4117 ac_status=$?
4118 echo "$as_me:4118: \$? = $ac_status" >&5
4119 (exit $ac_status); } &&
4120 { ac_try='test -s conftest.$ac_objext'
4121 { (eval echo "$as_me:4121: \"$ac_try\"") >&5
4122 (eval $ac_try) 2>&5
4123 ac_status=$?
4124 echo "$as_me:4124: \$? = $ac_status" >&5
4125 (exit $ac_status); }; }; then
4126 cf_cv_ncurses_h=$cf_header
4127
4128else
4129 echo "$as_me: failed program was:" >&5
4130cat conftest.$ac_ext >&5
4131cf_cv_ncurses_h=no
4132fi
4133rm -f conftest.$ac_objext conftest.$ac_ext
4134
4135 test "$cf_cv_ncurses_h" != no && break
4136 done
4137
4138fi
4139echo "$as_me:4139: result: $cf_cv_ncurses_h" >&5
4140echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4141
4142if test "$cf_cv_ncurses_h" != no ; then
4143 cf_cv_ncurses_header=$cf_cv_ncurses_h
4144else
4145
4146echo "$as_me:4146: checking for $cf_ncuhdr_root include-path" >&5
4147echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4148if test "${cf_cv_ncurses_h2+set}" = set; then
4149 echo $ECHO_N "(cached) $ECHO_C" >&6
4150else
4151
4152 test -n "$verbose" && echo
4153
4154cf_search=
4155
4156# collect the current set of include-directories from compiler flags
4157cf_header_path_list=""
4158if test -n "${CFLAGS}${CPPFLAGS}" ; then
4159 for cf_header_path in $CPPFLAGS $CFLAGS
4160 do
4161 case $cf_header_path in
4162 (-I*)
4163 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4164
4165test "x$cf_header_path" != "xNONE" && \
4166test -d "$cf_header_path" && \
4167 {
4168 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4169 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4170 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4171 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4172 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4173 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4174}
4175
4176 cf_header_path_list="$cf_header_path_list $cf_search"
4177 ;;
4178 esac
4179 done
4180fi
4181
4182# add the variations for the package we are looking for
4183
4184cf_search=
4185
4186test "x$prefix" != "xNONE" && \
4187test -d "$prefix" && \
4188 {
4189 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4190 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4191 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4192 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4193 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4194 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4195}
4196
4197for cf_subdir_prefix in \
4198 /usr \
4199 /usr/local \
4200 /usr/pkg \
4201 /opt \
4202 /opt/local \
4203 $HOME
4204do
4205
4206test "x$cf_subdir_prefix" != "x$prefix" && \
4207test -d "$cf_subdir_prefix" && \
4208(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4209 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4210 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4211 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4212 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4213 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4214 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4215}
4216
4217done
4218
4219test "$includedir" != NONE && \
4220test "$includedir" != "/usr/include" && \
4221test -d "$includedir" && {
4222 test -d $includedir && cf_search="$cf_search $includedir"
4223 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4224}
4225
4226test "$oldincludedir" != NONE && \
4227test "$oldincludedir" != "/usr/include" && \
4228test -d "$oldincludedir" && {
4229 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4230 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4231}
4232
4233cf_search="$cf_search $cf_header_path_list"
4234
4235 test -n "$verbose" && echo search path $cf_search
4236 cf_save2_CPPFLAGS="$CPPFLAGS"
4237 for cf_incdir in $cf_search
4238 do
4239
4240if test -n "$cf_incdir" ; then
4241 for cf_add_incdir in $cf_incdir
4242 do
4243 while test $cf_add_incdir != /usr/include
4244 do
4245 if test -d $cf_add_incdir
4246 then
4247 cf_have_incdir=no
4248 if test -n "$CFLAGS$CPPFLAGS" ; then
4249 # a loop is needed to ensure we can add subdirs of existing dirs
4250 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4251 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4252 cf_have_incdir=yes; break
4253 fi
4254 done
4255 fi
4256
4257 if test "$cf_have_incdir" = no ; then
4258 if test "$cf_add_incdir" = /usr/local/include ; then
4259 if test "$GCC" = yes
4260 then
4261 cf_save_CPPFLAGS=$CPPFLAGS
4262 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4263 cat >conftest.$ac_ext <<_ACEOF
4264#line 4264 "configure"
4265#include "confdefs.h"
4266#include <stdio.h>
4267int
4268main ()
4269{
4270printf("Hello")
4271 ;
4272 return 0;
4273}
4274_ACEOF
4275rm -f conftest.$ac_objext
4276if { (eval echo "$as_me:4276: \"$ac_compile\"") >&5
4277 (eval $ac_compile) 2>&5
4278 ac_status=$?
4279 echo "$as_me:4279: \$? = $ac_status" >&5
4280 (exit $ac_status); } &&
4281 { ac_try='test -s conftest.$ac_objext'
4282 { (eval echo "$as_me:4282: \"$ac_try\"") >&5
4283 (eval $ac_try) 2>&5
4284 ac_status=$?
4285 echo "$as_me:4285: \$? = $ac_status" >&5
4286 (exit $ac_status); }; }; then
4287 :
4288else
4289 echo "$as_me: failed program was:" >&5
4290cat conftest.$ac_ext >&5
4291cf_have_incdir=yes
4292fi
4293rm -f conftest.$ac_objext conftest.$ac_ext
4294 CPPFLAGS=$cf_save_CPPFLAGS
4295 fi
4296 fi
4297 fi
4298
4299 if test "$cf_have_incdir" = no ; then
4300 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4301
4302echo "${as_me:-configure}:4302: testing adding $cf_add_incdir to include-path ..." 1>&5
4303
4304 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4305
4306 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4307 test "$cf_top_incdir" = "$cf_add_incdir" && break
4308 cf_add_incdir="$cf_top_incdir"
4309 else
4310 break
4311 fi
4312 else
4313 break
4314 fi
4315 done
4316 done
4317fi
4318
4319 for cf_header in \
4320 ncurses.h \
4321 curses.h
4322 do
4323
4324 cat >conftest.$ac_ext <<_ACEOF
4325#line 4325 "configure"
4326#include "confdefs.h"
4327
4328#include <$cf_header>
4329int
4330main ()
4331{
4332
4333#ifdef NCURSES_VERSION
4334
4335printf("%s\n", NCURSES_VERSION);
4336#else
4337#ifdef __NCURSES_H
4338printf("old\n");
4339#else
4340 make an error
4341#endif
4342#endif
4343
4344 ;
4345 return 0;
4346}
4347_ACEOF
4348rm -f conftest.$ac_objext
4349if { (eval echo "$as_me:4349: \"$ac_compile\"") >&5
4350 (eval $ac_compile) 2>&5
4351 ac_status=$?
4352 echo "$as_me:4352: \$? = $ac_status" >&5
4353 (exit $ac_status); } &&
4354 { ac_try='test -s conftest.$ac_objext'
4355 { (eval echo "$as_me:4355: \"$ac_try\"") >&5
4356 (eval $ac_try) 2>&5
4357 ac_status=$?
4358 echo "$as_me:4358: \$? = $ac_status" >&5
4359 (exit $ac_status); }; }; then
4360 cf_cv_ncurses_h2=$cf_header
4361
4362else
4363 echo "$as_me: failed program was:" >&5
4364cat conftest.$ac_ext >&5
4365cf_cv_ncurses_h2=no
4366fi
4367rm -f conftest.$ac_objext conftest.$ac_ext
4368
4369 if test "$cf_cv_ncurses_h2" != no ; then
4370 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4371 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4372 break
4373 fi
4374 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4375 done
4376 CPPFLAGS="$cf_save2_CPPFLAGS"
4377 test "$cf_cv_ncurses_h2" != no && break
4378 done
4379 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4379: error: not found" >&5
4380echo "$as_me: error: not found" >&2;}
4381 { (exit 1); exit 1; }; }
4382
4383fi
4384echo "$as_me:4384: result: $cf_cv_ncurses_h2" >&5
4385echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4386
4387 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4388 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4389 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4390 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4391 fi
4392
4393if test -n "$cf_1st_incdir" ; then
4394 for cf_add_incdir in $cf_1st_incdir
4395 do
4396 while test $cf_add_incdir != /usr/include
4397 do
4398 if test -d $cf_add_incdir
4399 then
4400 cf_have_incdir=no
4401 if test -n "$CFLAGS$CPPFLAGS" ; then
4402 # a loop is needed to ensure we can add subdirs of existing dirs
4403 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4404 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4405 cf_have_incdir=yes; break
4406 fi
4407 done
4408 fi
4409
4410 if test "$cf_have_incdir" = no ; then
4411 if test "$cf_add_incdir" = /usr/local/include ; then
4412 if test "$GCC" = yes
4413 then
4414 cf_save_CPPFLAGS=$CPPFLAGS
4415 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4416 cat >conftest.$ac_ext <<_ACEOF
4417#line 4417 "configure"
4418#include "confdefs.h"
4419#include <stdio.h>
4420int
4421main ()
4422{
4423printf("Hello")
4424 ;
4425 return 0;
4426}
4427_ACEOF
4428rm -f conftest.$ac_objext
4429if { (eval echo "$as_me:4429: \"$ac_compile\"") >&5
4430 (eval $ac_compile) 2>&5
4431 ac_status=$?
4432 echo "$as_me:4432: \$? = $ac_status" >&5
4433 (exit $ac_status); } &&
4434 { ac_try='test -s conftest.$ac_objext'
4435 { (eval echo "$as_me:4435: \"$ac_try\"") >&5
4436 (eval $ac_try) 2>&5
4437 ac_status=$?
4438 echo "$as_me:4438: \$? = $ac_status" >&5
4439 (exit $ac_status); }; }; then
4440 :
4441else
4442 echo "$as_me: failed program was:" >&5
4443cat conftest.$ac_ext >&5
4444cf_have_incdir=yes
4445fi
4446rm -f conftest.$ac_objext conftest.$ac_ext
4447 CPPFLAGS=$cf_save_CPPFLAGS
4448 fi
4449 fi
4450 fi
4451
4452 if test "$cf_have_incdir" = no ; then
4453 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4454
4455echo "${as_me:-configure}:4455: testing adding $cf_add_incdir to include-path ..." 1>&5
4456
4457 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4458
4459 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4460 test "$cf_top_incdir" = "$cf_add_incdir" && break
4461 cf_add_incdir="$cf_top_incdir"
4462 else
4463 break
4464 fi
4465 else
4466 break
4467 fi
4468 done
4469 done
4470fi
4471
4472fi
4473
4474# Set definitions to allow ifdef'ing for ncurses.h
4475
4476case $cf_cv_ncurses_header in
4477(*ncurses.h)
4478
4479cat >>confdefs.h <<\EOF
4480#define HAVE_NCURSES_H 1
4481EOF
4482
4483 ;;
4484esac
4485
4486case $cf_cv_ncurses_header in
4487(ncurses/curses.h|ncurses/ncurses.h)
4488
4489cat >>confdefs.h <<\EOF
4490#define HAVE_NCURSES_NCURSES_H 1
4491EOF
4492
4493 ;;
4494(ncursesw/curses.h|ncursesw/ncurses.h)
4495
4496cat >>confdefs.h <<\EOF
4497#define HAVE_NCURSESW_NCURSES_H 1
4498EOF
4499
4500 ;;
4501esac
4502
4503echo "$as_me:4503: checking for terminfo header" >&5
4504echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4505if test "${cf_cv_term_header+set}" = set; then
4506 echo $ECHO_N "(cached) $ECHO_C" >&6
4507else
4508
4509case ${cf_cv_ncurses_header} in
4510(*/ncurses.h|*/ncursesw.h)
4511 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4512 ;;
4513(*)
4514 cf_term_header=term.h
4515 ;;
4516esac
4517
4518for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4519do
4520cat >conftest.$ac_ext <<_ACEOF
4521#line 4521 "configure"
4522#include "confdefs.h"
4523#include <stdio.h>
4524#include <${cf_cv_ncurses_header:-curses.h}>
4525#include <$cf_test>
4526
4527int
4528main ()
4529{
4530int x = auto_left_margin
4531 ;
4532 return 0;
4533}
4534_ACEOF
4535rm -f conftest.$ac_objext
4536if { (eval echo "$as_me:4536: \"$ac_compile\"") >&5
4537 (eval $ac_compile) 2>&5
4538 ac_status=$?
4539 echo "$as_me:4539: \$? = $ac_status" >&5
4540 (exit $ac_status); } &&
4541 { ac_try='test -s conftest.$ac_objext'
4542 { (eval echo "$as_me:4542: \"$ac_try\"") >&5
4543 (eval $ac_try) 2>&5
4544 ac_status=$?
4545 echo "$as_me:4545: \$? = $ac_status" >&5
4546 (exit $ac_status); }; }; then
4547
4548 cf_cv_term_header="$cf_test"
4549else
4550 echo "$as_me: failed program was:" >&5
4551cat conftest.$ac_ext >&5
4552
4553 cf_cv_term_header=unknown
4554
4555fi
4556rm -f conftest.$ac_objext conftest.$ac_ext
4557 test "$cf_cv_term_header" != unknown && break
4558done
4559
4560fi
4561echo "$as_me:4561: result: $cf_cv_term_header" >&5
4562echo "${ECHO_T}$cf_cv_term_header" >&6
4563
4564# Set definitions to allow ifdef'ing to accommodate subdirectories
4565
4566case $cf_cv_term_header in
4567(*term.h)
4568
4569cat >>confdefs.h <<\EOF
4570#define HAVE_TERM_H 1
4571EOF
4572
4573 ;;
4574esac
4575
4576case $cf_cv_term_header in
4577(ncurses/term.h)
4578
4579cat >>confdefs.h <<\EOF
4580#define HAVE_NCURSES_TERM_H 1
4581EOF
4582
4583 ;;
4584(ncursesw/term.h)
4585
4586cat >>confdefs.h <<\EOF
4587#define HAVE_NCURSESW_TERM_H 1
4588EOF
4589
4590 ;;
4591esac
4592
4593# some applications need this, but should check for NCURSES_VERSION
4594
4595cat >>confdefs.h <<\EOF
4596#define NCURSES 1
4597EOF
4598
4599echo "$as_me:4599: checking for ncurses version" >&5
4600echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4601if test "${cf_cv_ncurses_version+set}" = set; then
4602 echo $ECHO_N "(cached) $ECHO_C" >&6
4603else
4604
4605 cf_cv_ncurses_version=no
4606 cf_tempfile=out$$
4607 rm -f $cf_tempfile
4608 if test "$cross_compiling" = yes; then
4609
4610 # This will not work if the preprocessor splits the line after the
4611 # Autoconf token. The 'unproto' program does that.
4612 cat > conftest.$ac_ext <<EOF
4613#include <${cf_cv_ncurses_header:-curses.h}>
4614#undef Autoconf
4615#ifdef NCURSES_VERSION
4616Autoconf NCURSES_VERSION
4617#else
4618#ifdef __NCURSES_H
4619Autoconf "old"
4620#endif
4621;
4622#endif
4623EOF
4624 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4625 { (eval echo "$as_me:4625: \"$cf_try\"") >&5
4626 (eval $cf_try) 2>&5
4627 ac_status=$?
4628 echo "$as_me:4628: \$? = $ac_status" >&5
4629 (exit $ac_status); }
4630 if test -f conftest.out ; then
4631 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4632 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4633 rm -f conftest.out
4634 fi
4635
4636else
4637 cat >conftest.$ac_ext <<_ACEOF
4638#line 4638 "configure"
4639#include "confdefs.h"
4640
4641#include <${cf_cv_ncurses_header:-curses.h}>
4642#include <stdio.h>
4643int main()
4644{
4645 FILE *fp = fopen("$cf_tempfile", "w");
4646#ifdef NCURSES_VERSION
4647# ifdef NCURSES_VERSION_PATCH
4648 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4649# else
4650 fprintf(fp, "%s\n", NCURSES_VERSION);
4651# endif
4652#else
4653# ifdef __NCURSES_H
4654 fprintf(fp, "old\n");
4655# else
4656 make an error
4657# endif
4658#endif
4659 ${cf_cv_main_return:-return}(0);
4660}
4661_ACEOF
4662rm -f conftest$ac_exeext
4663if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
4664 (eval $ac_link) 2>&5
4665 ac_status=$?
4666 echo "$as_me:4666: \$? = $ac_status" >&5
4667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4668 { (eval echo "$as_me:4668: \"$ac_try\"") >&5
4669 (eval $ac_try) 2>&5
4670 ac_status=$?
4671 echo "$as_me:4671: \$? = $ac_status" >&5
4672 (exit $ac_status); }; }; then
4673
4674 cf_cv_ncurses_version=`cat $cf_tempfile`
4675else
4676 echo "$as_me: program exited with status $ac_status" >&5
4677echo "$as_me: failed program was:" >&5
4678cat conftest.$ac_ext >&5
4679fi
4680rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4681fi
4682 rm -f $cf_tempfile
4683
4684fi
4685echo "$as_me:4685: result: $cf_cv_ncurses_version" >&5
4686echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4687test "$cf_cv_ncurses_version" = no ||
4688cat >>confdefs.h <<\EOF
4689#define NCURSES 1
4690EOF
4691
4692cf_nculib_root=ncurses
4693 # This works, except for the special case where we find gpm, but
4694 # ncurses is in a nonstandard location via $LIBS, and we really want
4695 # to link gpm.
4696cf_ncurses_LIBS=""
4697cf_ncurses_SAVE="$LIBS"
4698echo "$as_me:4698: checking for Gpm_Open in -lgpm" >&5
4699echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4700if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4701 echo $ECHO_N "(cached) $ECHO_C" >&6
4702else
4703 ac_check_lib_save_LIBS=$LIBS
4704LIBS="-lgpm $LIBS"
4705cat >conftest.$ac_ext <<_ACEOF
4706#line 4706 "configure"
4707#include "confdefs.h"
4708
4709/* Override any gcc2 internal prototype to avoid an error. */
4710#ifdef __cplusplus
4711extern "C"
4712#endif
4713/* We use char because int might match the return type of a gcc2
4714 builtin and then its argument prototype would still apply. */
4715char Gpm_Open ();
4716int
4717main ()
4718{
4719Gpm_Open ();
4720 ;
4721 return 0;
4722}
4723_ACEOF
4724rm -f conftest.$ac_objext conftest$ac_exeext
4725if { (eval echo "$as_me:4725: \"$ac_link\"") >&5
4726 (eval $ac_link) 2>&5
4727 ac_status=$?
4728 echo "$as_me:4728: \$? = $ac_status" >&5
4729 (exit $ac_status); } &&
4730 { ac_try='test -s conftest$ac_exeext'
4731 { (eval echo "$as_me:4731: \"$ac_try\"") >&5
4732 (eval $ac_try) 2>&5
4733 ac_status=$?
4734 echo "$as_me:4734: \$? = $ac_status" >&5
4735 (exit $ac_status); }; }; then
4736 ac_cv_lib_gpm_Gpm_Open=yes
4737else
4738 echo "$as_me: failed program was:" >&5
4739cat conftest.$ac_ext >&5
4740ac_cv_lib_gpm_Gpm_Open=no
4741fi
4742rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4743LIBS=$ac_check_lib_save_LIBS
4744fi
4745echo "$as_me:4745: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4746echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4747if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4748 echo "$as_me:4748: checking for initscr in -lgpm" >&5
4749echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4750if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4751 echo $ECHO_N "(cached) $ECHO_C" >&6
4752else
4753 ac_check_lib_save_LIBS=$LIBS
4754LIBS="-lgpm $LIBS"
4755cat >conftest.$ac_ext <<_ACEOF
4756#line 4756 "configure"
4757#include "confdefs.h"
4758
4759/* Override any gcc2 internal prototype to avoid an error. */
4760#ifdef __cplusplus
4761extern "C"
4762#endif
4763/* We use char because int might match the return type of a gcc2
4764 builtin and then its argument prototype would still apply. */
4765char initscr ();
4766int
4767main ()
4768{
4769initscr ();
4770 ;
4771 return 0;
4772}
4773_ACEOF
4774rm -f conftest.$ac_objext conftest$ac_exeext
4775if { (eval echo "$as_me:4775: \"$ac_link\"") >&5
4776 (eval $ac_link) 2>&5
4777 ac_status=$?
4778 echo "$as_me:4778: \$? = $ac_status" >&5
4779 (exit $ac_status); } &&
4780 { ac_try='test -s conftest$ac_exeext'
4781 { (eval echo "$as_me:4781: \"$ac_try\"") >&5
4782 (eval $ac_try) 2>&5
4783 ac_status=$?
4784 echo "$as_me:4784: \$? = $ac_status" >&5
4785 (exit $ac_status); }; }; then
4786 ac_cv_lib_gpm_initscr=yes
4787else
4788 echo "$as_me: failed program was:" >&5
4789cat conftest.$ac_ext >&5
4790ac_cv_lib_gpm_initscr=no
4791fi
4792rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4793LIBS=$ac_check_lib_save_LIBS
4794fi
4795echo "$as_me:4795: result: $ac_cv_lib_gpm_initscr" >&5
4796echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4797if test $ac_cv_lib_gpm_initscr = yes; then
4798 LIBS="$cf_ncurses_SAVE"
4799else
4800 cf_ncurses_LIBS="-lgpm"
4801fi
4802
4803fi
4804
4805case $host_os in
4806(freebsd*)
4807 # This is only necessary if you are linking against an obsolete
4808 # version of ncurses (but it should do no harm, since it's static).
4809 if test "$cf_nculib_root" = ncurses ; then
4810 echo "$as_me:4810: checking for tgoto in -lmytinfo" >&5
4811echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4812if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4813 echo $ECHO_N "(cached) $ECHO_C" >&6
4814else
4815 ac_check_lib_save_LIBS=$LIBS
4816LIBS="-lmytinfo $LIBS"
4817cat >conftest.$ac_ext <<_ACEOF
4818#line 4818 "configure"
4819#include "confdefs.h"
4820
4821/* Override any gcc2 internal prototype to avoid an error. */
4822#ifdef __cplusplus
4823extern "C"
4824#endif
4825/* We use char because int might match the return type of a gcc2
4826 builtin and then its argument prototype would still apply. */
4827char tgoto ();
4828int
4829main ()
4830{
4831tgoto ();
4832 ;
4833 return 0;
4834}
4835_ACEOF
4836rm -f conftest.$ac_objext conftest$ac_exeext
4837if { (eval echo "$as_me:4837: \"$ac_link\"") >&5
4838 (eval $ac_link) 2>&5
4839 ac_status=$?
4840 echo "$as_me:4840: \$? = $ac_status" >&5
4841 (exit $ac_status); } &&
4842 { ac_try='test -s conftest$ac_exeext'
4843 { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4844 (eval $ac_try) 2>&5
4845 ac_status=$?
4846 echo "$as_me:4846: \$? = $ac_status" >&5
4847 (exit $ac_status); }; }; then
4848 ac_cv_lib_mytinfo_tgoto=yes
4849else
4850 echo "$as_me: failed program was:" >&5
4851cat conftest.$ac_ext >&5
4852ac_cv_lib_mytinfo_tgoto=no
4853fi
4854rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4855LIBS=$ac_check_lib_save_LIBS
4856fi
4857echo "$as_me:4857: result: $ac_cv_lib_mytinfo_tgoto" >&5
4858echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4859if test $ac_cv_lib_mytinfo_tgoto = yes; then
4860 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4861fi
4862
4863 fi
4864 ;;
4865esac
4866
4867cf_add_libs="$cf_ncurses_LIBS"
4868# Filter out duplicates - this happens with badly-designed ".pc" files...
4869for cf_add_1lib in $LIBS
4870do
4871 for cf_add_2lib in $cf_add_libs
4872 do
4873 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4874 then
4875 cf_add_1lib=
4876 break
4877 fi
4878 done
4879 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4880done
4881LIBS="$cf_add_libs"
4882
4883if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4884then
4885
4886cf_add_libs="-l$cf_nculib_root"
4887# Filter out duplicates - this happens with badly-designed ".pc" files...
4888for cf_add_1lib in $LIBS
4889do
4890 for cf_add_2lib in $cf_add_libs
4891 do
4892 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4893 then
4894 cf_add_1lib=
4895 break
4896 fi
4897 done
4898 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4899done
4900LIBS="$cf_add_libs"
4901
4902else
4903
4904 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4905 cf_libdir=""
4906 echo "$as_me:4906: checking for initscr" >&5
4907echo $ECHO_N "checking for initscr... $ECHO_C" >&6
4908if test "${ac_cv_func_initscr+set}" = set; then
4909 echo $ECHO_N "(cached) $ECHO_C" >&6
4910else
4911 cat >conftest.$ac_ext <<_ACEOF
4912#line 4912 "configure"
4913#include "confdefs.h"
4914/* System header to define __stub macros and hopefully few prototypes,
4915 which can conflict with char initscr (); below. */
4916#include <assert.h>
4917/* Override any gcc2 internal prototype to avoid an error. */
4918#ifdef __cplusplus
4919extern "C"
4920#endif
4921/* We use char because int might match the return type of a gcc2
4922 builtin and then its argument prototype would still apply. */
4923char initscr ();
4924char (*f) ();
4925
4926int
4927main ()
4928{
4929/* The GNU C library defines this for functions which it implements
4930 to always fail with ENOSYS. Some functions are actually named
4931 something starting with __ and the normal name is an alias. */
4932#if defined (__stub_initscr) || defined (__stub___initscr)
4933choke me
4934#else
4935f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4936#endif
4937
4938 ;
4939 return 0;
4940}
4941_ACEOF
4942rm -f conftest.$ac_objext conftest$ac_exeext
4943if { (eval echo "$as_me:4943: \"$ac_link\"") >&5
4944 (eval $ac_link) 2>&5
4945 ac_status=$?
4946 echo "$as_me:4946: \$? = $ac_status" >&5
4947 (exit $ac_status); } &&
4948 { ac_try='test -s conftest$ac_exeext'
4949 { (eval echo "$as_me:4949: \"$ac_try\"") >&5
4950 (eval $ac_try) 2>&5
4951 ac_status=$?
4952 echo "$as_me:4952: \$? = $ac_status" >&5
4953 (exit $ac_status); }; }; then
4954 ac_cv_func_initscr=yes
4955else
4956 echo "$as_me: failed program was:" >&5
4957cat conftest.$ac_ext >&5
4958ac_cv_func_initscr=no
4959fi
4960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4961fi
4962echo "$as_me:4962: result: $ac_cv_func_initscr" >&5
4963echo "${ECHO_T}$ac_cv_func_initscr" >&6
4964if test $ac_cv_func_initscr = yes; then
4965 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4966else
4967
4968 cf_save_LIBS="$LIBS"
4969 echo "$as_me:4969: checking for initscr in -l$cf_nculib_root" >&5
4970echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
4971 LIBS="-l$cf_nculib_root $LIBS"
4972 cat >conftest.$ac_ext <<_ACEOF
4973#line 4973 "configure"
4974#include "confdefs.h"
4975#include <${cf_cv_ncurses_header:-curses.h}>
4976int
4977main ()
4978{
4979initscr()
4980 ;
4981 return 0;
4982}
4983_ACEOF
4984rm -f conftest.$ac_objext conftest$ac_exeext
4985if { (eval echo "$as_me:4985: \"$ac_link\"") >&5
4986 (eval $ac_link) 2>&5
4987 ac_status=$?
4988 echo "$as_me:4988: \$? = $ac_status" >&5
4989 (exit $ac_status); } &&
4990 { ac_try='test -s conftest$ac_exeext'
4991 { (eval echo "$as_me:4991: \"$ac_try\"") >&5
4992 (eval $ac_try) 2>&5
4993 ac_status=$?
4994 echo "$as_me:4994: \$? = $ac_status" >&5
4995 (exit $ac_status); }; }; then
4996 echo "$as_me:4996: result: yes" >&5
4997echo "${ECHO_T}yes" >&6
4998 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4999
5000else
5001 echo "$as_me: failed program was:" >&5
5002cat conftest.$ac_ext >&5
5003echo "$as_me:5003: result: no" >&5
5004echo "${ECHO_T}no" >&6
5005
5006cf_search=
5007cf_library_path_list=""
5008if test -n "${LDFLAGS}${LIBS}" ; then
5009 for cf_library_path in $LDFLAGS $LIBS
5010 do
5011 case $cf_library_path in
5012 (-L*)
5013 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5014
5015test "x$cf_library_path" != "xNONE" && \
5016test -d "$cf_library_path" && \
5017 {
5018 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5019 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5020 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5021 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5022 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5023 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
5024}
5025
5026 cf_library_path_list="$cf_library_path_list $cf_search"
5027 ;;
5028 esac
5029 done
5030fi
5031
5032cf_search=
5033
5034test "x$prefix" != "xNONE" && \
5035test -d "$prefix" && \
5036 {
5037 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5038 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5039 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5040 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5041 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5042 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5043}
5044
5045for cf_subdir_prefix in \
5046 /usr \
5047 /usr/local \
5048 /usr/pkg \
5049 /opt \
5050 /opt/local \
5051 $HOME
5052do
5053
5054test "x$cf_subdir_prefix" != "x$prefix" && \
5055test -d "$cf_subdir_prefix" && \
5056(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5057 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5058 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5059 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5060 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5061 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5062 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
5063}
5064
5065done
5066
5067cf_search="$cf_library_path_list $cf_search"
5068
5069 for cf_libdir in $cf_search
5070 do
5071 echo "$as_me:5071: checking for -l$cf_nculib_root in $cf_libdir" >&5
5072echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5073 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5074 cat >conftest.$ac_ext <<_ACEOF
5075#line 5075 "configure"
5076#include "confdefs.h"
5077#include <${cf_cv_ncurses_header:-curses.h}>
5078int
5079main ()
5080{
5081initscr()
5082 ;
5083 return 0;
5084}
5085_ACEOF
5086rm -f conftest.$ac_objext conftest$ac_exeext
5087if { (eval echo "$as_me:5087: \"$ac_link\"") >&5
5088 (eval $ac_link) 2>&5
5089 ac_status=$?
5090 echo "$as_me:5090: \$? = $ac_status" >&5
5091 (exit $ac_status); } &&
5092 { ac_try='test -s conftest$ac_exeext'
5093 { (eval echo "$as_me:5093: \"$ac_try\"") >&5
5094 (eval $ac_try) 2>&5
5095 ac_status=$?
5096 echo "$as_me:5096: \$? = $ac_status" >&5
5097 (exit $ac_status); }; }; then
5098 echo "$as_me:5098: result: yes" >&5
5099echo "${ECHO_T}yes" >&6
5100 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5101 break
5102else
5103 echo "$as_me: failed program was:" >&5
5104cat conftest.$ac_ext >&5
5105echo "$as_me:5105: result: no" >&5
5106echo "${ECHO_T}no" >&6
5107 LIBS="$cf_save_LIBS"
5108fi
5109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5110 done
5111
5112fi
5113rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5114
5115fi
5116
5117eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5118
5119if test $cf_found_library = no ; then
5120 { { echo "$as_me:5120: error: Cannot link $cf_nculib_root library" >&5
5121echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5122 { (exit 1); exit 1; }; }
5123fi
5124
5125fi
5126
5127if test -n "$cf_ncurses_LIBS" ; then
5128 echo "$as_me:5128: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5129echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5130 cf_ncurses_SAVE="$LIBS"
5131 for p in $cf_ncurses_LIBS ; do
5132 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5133 if test "$q" != "$LIBS" ; then
5134 LIBS="$q"
5135 fi
5136 done
5137 cat >conftest.$ac_ext <<_ACEOF
5138#line 5138 "configure"
5139#include "confdefs.h"
5140#include <${cf_cv_ncurses_header:-curses.h}>
5141int
5142main ()
5143{
5144initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5145 ;
5146 return 0;
5147}
5148_ACEOF
5149rm -f conftest.$ac_objext conftest$ac_exeext
5150if { (eval echo "$as_me:5150: \"$ac_link\"") >&5
5151 (eval $ac_link) 2>&5
5152 ac_status=$?
5153 echo "$as_me:5153: \$? = $ac_status" >&5
5154 (exit $ac_status); } &&
5155 { ac_try='test -s conftest$ac_exeext'
5156 { (eval echo "$as_me:5156: \"$ac_try\"") >&5
5157 (eval $ac_try) 2>&5
5158 ac_status=$?
5159 echo "$as_me:5159: \$? = $ac_status" >&5
5160 (exit $ac_status); }; }; then
5161 echo "$as_me:5161: result: yes" >&5
5162echo "${ECHO_T}yes" >&6
5163else
5164 echo "$as_me: failed program was:" >&5
5165cat conftest.$ac_ext >&5
5166echo "$as_me:5166: result: no" >&5
5167echo "${ECHO_T}no" >&6
5168 LIBS="$cf_ncurses_SAVE"
5169fi
5170rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5171fi
5172
5173cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5174
5175cat >>confdefs.h <<EOF
5176#define $cf_nculib_ROOT 1
5177EOF
5178
5179 fi
5180else
5181 NCURSES_CONFIG=none
5182fi
5183
5184echo "$as_me:5184: checking if you want wide-character code" >&5
5185echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5186
5187# Check whether --enable-widec or --disable-widec was given.
5188if test "${enable_widec+set}" = set; then
5189 enableval="$enable_widec"
5190 with_widec=$enableval
5191else
5192 with_widec=no
5193fi;
5194echo "$as_me:5194: result: $with_widec" >&5
5195echo "${ECHO_T}$with_widec" >&6
5196if test "$with_widec" = yes ; then
5197
5198echo "$as_me:5198: checking for multibyte character support" >&5
5199echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5200if test "${cf_cv_utf8_lib+set}" = set; then
5201 echo $ECHO_N "(cached) $ECHO_C" >&6
5202else
5203
5204 cf_save_LIBS="$LIBS"
5205 cat >conftest.$ac_ext <<_ACEOF
5206#line 5206 "configure"
5207#include "confdefs.h"
5208
5209#include <stdlib.h>
5210int
5211main ()
5212{
5213putwc(0,0);
5214 ;
5215 return 0;
5216}
5217_ACEOF
5218rm -f conftest.$ac_objext conftest$ac_exeext
5219if { (eval echo "$as_me:5219: \"$ac_link\"") >&5
5220 (eval $ac_link) 2>&5
5221 ac_status=$?
5222 echo "$as_me:5222: \$? = $ac_status" >&5
5223 (exit $ac_status); } &&
5224 { ac_try='test -s conftest$ac_exeext'
5225 { (eval echo "$as_me:5225: \"$ac_try\"") >&5
5226 (eval $ac_try) 2>&5
5227 ac_status=$?
5228 echo "$as_me:5228: \$? = $ac_status" >&5
5229 (exit $ac_status); }; }; then
5230 cf_cv_utf8_lib=yes
5231else
5232 echo "$as_me: failed program was:" >&5
5233cat conftest.$ac_ext >&5
5234
5235# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5236# will be set on completion of the AC_TRY_LINK below.
5237cf_cv_header_path_utf8=
5238cf_cv_library_path_utf8=
5239
5240echo "${as_me:-configure}:5240: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5241
5242cf_save_LIBS="$LIBS"
5243
5244cat >conftest.$ac_ext <<_ACEOF
5245#line 5245 "configure"
5246#include "confdefs.h"
5247
5248#include <libutf8.h>
5249int
5250main ()
5251{
5252putwc(0,0);
5253 ;
5254 return 0;
5255}
5256_ACEOF
5257rm -f conftest.$ac_objext conftest$ac_exeext
5258if { (eval echo "$as_me:5258: \"$ac_link\"") >&5
5259 (eval $ac_link) 2>&5
5260 ac_status=$?
5261 echo "$as_me:5261: \$? = $ac_status" >&5
5262 (exit $ac_status); } &&
5263 { ac_try='test -s conftest$ac_exeext'
5264 { (eval echo "$as_me:5264: \"$ac_try\"") >&5
5265 (eval $ac_try) 2>&5
5266 ac_status=$?
5267 echo "$as_me:5267: \$? = $ac_status" >&5
5268 (exit $ac_status); }; }; then
5269
5270 cf_cv_find_linkage_utf8=yes
5271 cf_cv_header_path_utf8=/usr/include
5272 cf_cv_library_path_utf8=/usr/lib
5273
5274else
5275 echo "$as_me: failed program was:" >&5
5276cat conftest.$ac_ext >&5
5277
5278LIBS="-lutf8 $cf_save_LIBS"
5279
5280cat >conftest.$ac_ext <<_ACEOF
5281#line 5281 "configure"
5282#include "confdefs.h"
5283
5284#include <libutf8.h>
5285int
5286main ()
5287{
5288putwc(0,0);
5289 ;
5290 return 0;
5291}
5292_ACEOF
5293rm -f conftest.$ac_objext conftest$ac_exeext
5294if { (eval echo "$as_me:5294: \"$ac_link\"") >&5
5295 (eval $ac_link) 2>&5
5296 ac_status=$?
5297 echo "$as_me:5297: \$? = $ac_status" >&5
5298 (exit $ac_status); } &&
5299 { ac_try='test -s conftest$ac_exeext'
5300 { (eval echo "$as_me:5300: \"$ac_try\"") >&5
5301 (eval $ac_try) 2>&5
5302 ac_status=$?
5303 echo "$as_me:5303: \$? = $ac_status" >&5
5304 (exit $ac_status); }; }; then
5305
5306 cf_cv_find_linkage_utf8=yes
5307 cf_cv_header_path_utf8=/usr/include
5308 cf_cv_library_path_utf8=/usr/lib
5309 cf_cv_library_file_utf8="-lutf8"
5310
5311else
5312 echo "$as_me: failed program was:" >&5
5313cat conftest.$ac_ext >&5
5314
5315 cf_cv_find_linkage_utf8=no
5316 LIBS="$cf_save_LIBS"
5317
5318 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5319
5320echo "${as_me:-configure}:5320: testing find linkage for utf8 library ..." 1>&5
5321
5322echo "${as_me:-configure}:5322: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5323
5324 cf_save_CPPFLAGS="$CPPFLAGS"
5325 cf_test_CPPFLAGS="$CPPFLAGS"
5326
5327cf_search=
5328
5329# collect the current set of include-directories from compiler flags
5330cf_header_path_list=""
5331if test -n "${CFLAGS}${CPPFLAGS}" ; then
5332 for cf_header_path in $CPPFLAGS $CFLAGS
5333 do
5334 case $cf_header_path in
5335 (-I*)
5336 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5337
5338test "x$cf_header_path" != "xNONE" && \
5339test -d "$cf_header_path" && \
5340 {
5341 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5342 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5343 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5344 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5345 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5346 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5347}
5348
5349 cf_header_path_list="$cf_header_path_list $cf_search"
5350 ;;
5351 esac
5352 done
5353fi
5354
5355# add the variations for the package we are looking for
5356
5357cf_search=
5358
5359test "x$prefix" != "xNONE" && \
5360test -d "$prefix" && \
5361 {
5362 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5363 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5364 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5365 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5366 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5367 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5368}
5369
5370for cf_subdir_prefix in \
5371 /usr \
5372 /usr/local \
5373 /usr/pkg \
5374 /opt \
5375 /opt/local \
5376 $HOME
5377do
5378
5379test "x$cf_subdir_prefix" != "x$prefix" && \
5380test -d "$cf_subdir_prefix" && \
5381(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5382 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5383 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5384 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5385 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5386 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5387 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5388}
5389
5390done
5391
5392test "$includedir" != NONE && \
5393test "$includedir" != "/usr/include" && \
5394test -d "$includedir" && {
5395 test -d $includedir && cf_search="$cf_search $includedir"
5396 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5397}
5398
5399test "$oldincludedir" != NONE && \
5400test "$oldincludedir" != "/usr/include" && \
5401test -d "$oldincludedir" && {
5402 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5403 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5404}
5405
5406cf_search="$cf_search $cf_header_path_list"
5407
5408 for cf_cv_header_path_utf8 in $cf_search
5409 do
5410 if test -d $cf_cv_header_path_utf8 ; then
5411 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5412
5413echo "${as_me:-configure}:5413: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5414
5415 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5416 cat >conftest.$ac_ext <<_ACEOF
5417#line 5417 "configure"
5418#include "confdefs.h"
5419
5420#include <libutf8.h>
5421int
5422main ()
5423{
5424putwc(0,0);
5425 ;
5426 return 0;
5427}
5428_ACEOF
5429rm -f conftest.$ac_objext
5430if { (eval echo "$as_me:5430: \"$ac_compile\"") >&5
5431 (eval $ac_compile) 2>&5
5432 ac_status=$?
5433 echo "$as_me:5433: \$? = $ac_status" >&5
5434 (exit $ac_status); } &&
5435 { ac_try='test -s conftest.$ac_objext'
5436 { (eval echo "$as_me:5436: \"$ac_try\"") >&5
5437 (eval $ac_try) 2>&5
5438 ac_status=$?
5439 echo "$as_me:5439: \$? = $ac_status" >&5
5440 (exit $ac_status); }; }; then
5441
5442 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5443
5444echo "${as_me:-configure}:5444: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5445
5446 cf_cv_find_linkage_utf8=maybe
5447 cf_test_CPPFLAGS="$CPPFLAGS"
5448 break
5449else
5450 echo "$as_me: failed program was:" >&5
5451cat conftest.$ac_ext >&5
5452
5453 CPPFLAGS="$cf_save_CPPFLAGS"
5454
5455fi
5456rm -f conftest.$ac_objext conftest.$ac_ext
5457 fi
5458 done
5459
5460 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5461
5462echo "${as_me:-configure}:5462: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5463
5464 cf_save_LIBS="$LIBS"
5465 cf_save_LDFLAGS="$LDFLAGS"
5466
5467 if test "$cf_cv_find_linkage_utf8" != yes ; then
5468
5469cf_search=
5470cf_library_path_list=""
5471if test -n "${LDFLAGS}${LIBS}" ; then
5472 for cf_library_path in $LDFLAGS $LIBS
5473 do
5474 case $cf_library_path in
5475 (-L*)
5476 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5477
5478test "x$cf_library_path" != "xNONE" && \
5479test -d "$cf_library_path" && \
5480 {
5481 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5482 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5483 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5484 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5485 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5486 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5487}
5488
5489 cf_library_path_list="$cf_library_path_list $cf_search"
5490 ;;
5491 esac
5492 done
5493fi
5494
5495cf_search=
5496
5497test "x$prefix" != "xNONE" && \
5498test -d "$prefix" && \
5499 {
5500 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5501 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5502 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5503 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5504 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5505 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5506}
5507
5508for cf_subdir_prefix in \
5509 /usr \
5510 /usr/local \
5511 /usr/pkg \
5512 /opt \
5513 /opt/local \
5514 $HOME
5515do
5516
5517test "x$cf_subdir_prefix" != "x$prefix" && \
5518test -d "$cf_subdir_prefix" && \
5519(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5520 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5521 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5522 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5523 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5524 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5525 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5526}
5527
5528done
5529
5530cf_search="$cf_library_path_list $cf_search"
5531
5532 for cf_cv_library_path_utf8 in $cf_search
5533 do
5534 if test -d $cf_cv_library_path_utf8 ; then
5535 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5536
5537echo "${as_me:-configure}:5537: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5538
5539 CPPFLAGS="$cf_test_CPPFLAGS"
5540 LIBS="-lutf8 $cf_save_LIBS"
5541 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5542 cat >conftest.$ac_ext <<_ACEOF
5543#line 5543 "configure"
5544#include "confdefs.h"
5545
5546#include <libutf8.h>
5547int
5548main ()
5549{
5550putwc(0,0);
5551 ;
5552 return 0;
5553}
5554_ACEOF
5555rm -f conftest.$ac_objext conftest$ac_exeext
5556if { (eval echo "$as_me:5556: \"$ac_link\"") >&5
5557 (eval $ac_link) 2>&5
5558 ac_status=$?
5559 echo "$as_me:5559: \$? = $ac_status" >&5
5560 (exit $ac_status); } &&
5561 { ac_try='test -s conftest$ac_exeext'
5562 { (eval echo "$as_me:5562: \"$ac_try\"") >&5
5563 (eval $ac_try) 2>&5
5564 ac_status=$?
5565 echo "$as_me:5565: \$? = $ac_status" >&5
5566 (exit $ac_status); }; }; then
5567
5568 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5569
5570echo "${as_me:-configure}:5570: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5571
5572 cf_cv_find_linkage_utf8=yes
5573 cf_cv_library_file_utf8="-lutf8"
5574 break
5575else
5576 echo "$as_me: failed program was:" >&5
5577cat conftest.$ac_ext >&5
5578
5579 CPPFLAGS="$cf_save_CPPFLAGS"
5580 LIBS="$cf_save_LIBS"
5581 LDFLAGS="$cf_save_LDFLAGS"
5582
5583fi
5584rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5585 fi
5586 done
5587 CPPFLAGS="$cf_save_CPPFLAGS"
5588 LDFLAGS="$cf_save_LDFLAGS"
5589 fi
5590
5591 else
5592 cf_cv_find_linkage_utf8=no
5593 fi
5594
5595fi
5596rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5597
5598fi
5599rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5600
5601LIBS="$cf_save_LIBS"
5602
5603if test "$cf_cv_find_linkage_utf8" = yes ; then
5604cf_cv_utf8_lib=add-on
5605else
5606cf_cv_utf8_lib=no
5607fi
5608
5609fi
5610rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5611fi
5612echo "$as_me:5612: result: $cf_cv_utf8_lib" >&5
5613echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5614
5615# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5616# ncurses/ncursesw:
5617if test "$cf_cv_utf8_lib" = "add-on" ; then
5618
5619cat >>confdefs.h <<\EOF
5620#define HAVE_LIBUTF8_H 1
5621EOF
5622
5623if test -n "$cf_cv_header_path_utf8" ; then
5624 for cf_add_incdir in $cf_cv_header_path_utf8
5625 do
5626 while test $cf_add_incdir != /usr/include
5627 do
5628 if test -d $cf_add_incdir
5629 then
5630 cf_have_incdir=no
5631 if test -n "$CFLAGS$CPPFLAGS" ; then
5632 # a loop is needed to ensure we can add subdirs of existing dirs
5633 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5634 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5635 cf_have_incdir=yes; break
5636 fi
5637 done
5638 fi
5639
5640 if test "$cf_have_incdir" = no ; then
5641 if test "$cf_add_incdir" = /usr/local/include ; then
5642 if test "$GCC" = yes
5643 then
5644 cf_save_CPPFLAGS=$CPPFLAGS
5645 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5646 cat >conftest.$ac_ext <<_ACEOF
5647#line 5647 "configure"
5648#include "confdefs.h"
5649#include <stdio.h>
5650int
5651main ()
5652{
5653printf("Hello")
5654 ;
5655 return 0;
5656}
5657_ACEOF
5658rm -f conftest.$ac_objext
5659if { (eval echo "$as_me:5659: \"$ac_compile\"") >&5
5660 (eval $ac_compile) 2>&5
5661 ac_status=$?
5662 echo "$as_me:5662: \$? = $ac_status" >&5
5663 (exit $ac_status); } &&
5664 { ac_try='test -s conftest.$ac_objext'
5665 { (eval echo "$as_me:5665: \"$ac_try\"") >&5
5666 (eval $ac_try) 2>&5
5667 ac_status=$?
5668 echo "$as_me:5668: \$? = $ac_status" >&5
5669 (exit $ac_status); }; }; then
5670 :
5671else
5672 echo "$as_me: failed program was:" >&5
5673cat conftest.$ac_ext >&5
5674cf_have_incdir=yes
5675fi
5676rm -f conftest.$ac_objext conftest.$ac_ext
5677 CPPFLAGS=$cf_save_CPPFLAGS
5678 fi
5679 fi
5680 fi
5681
5682 if test "$cf_have_incdir" = no ; then
5683 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5684
5685echo "${as_me:-configure}:5685: testing adding $cf_add_incdir to include-path ..." 1>&5
5686
5687 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5688
5689 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5690 test "$cf_top_incdir" = "$cf_add_incdir" && break
5691 cf_add_incdir="$cf_top_incdir"
5692 else
5693 break
5694 fi
5695 else
5696 break
5697 fi
5698 done
5699 done
5700fi
5701
5702if test -n "$cf_cv_library_path_utf8" ; then
5703 for cf_add_libdir in $cf_cv_library_path_utf8
5704 do
5705 if test $cf_add_libdir = /usr/lib ; then
5706 :
5707 elif test -d $cf_add_libdir
5708 then
5709 cf_have_libdir=no
5710 if test -n "$LDFLAGS$LIBS" ; then
5711 # a loop is needed to ensure we can add subdirs of existing dirs
5712 for cf_test_libdir in $LDFLAGS $LIBS ; do
5713 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5714 cf_have_libdir=yes; break
5715 fi
5716 done
5717 fi
5718 if test "$cf_have_libdir" = no ; then
5719 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5720
5721echo "${as_me:-configure}:5721: testing adding $cf_add_libdir to library-path ..." 1>&5
5722
5723 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5724 fi
5725 fi
5726 done
5727fi
5728
5729cf_add_libs="$cf_cv_library_file_utf8"
5730# Filter out duplicates - this happens with badly-designed ".pc" files...
5731for cf_add_1lib in $LIBS
5732do
5733 for cf_add_2lib in $cf_add_libs
5734 do
5735 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5736 then
5737 cf_add_1lib=
5738 break
5739 fi
5740 done
5741 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5742done
5743LIBS="$cf_add_libs"
5744
5745fi
5746
5747cf_ncuconfig_root=ncursesw
5748cf_have_ncuconfig=no
5749
5750if test "x${PKG_CONFIG:=none}" != xnone; then
5751 echo "$as_me:5751: checking pkg-config for $cf_ncuconfig_root" >&5
5752echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
5753 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
5754 echo "$as_me:5754: result: yes" >&5
5755echo "${ECHO_T}yes" >&6
5756
5757 echo "$as_me:5757: checking if the $cf_ncuconfig_root package files work" >&5
5758echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
5759 cf_have_ncuconfig=unknown
5760
5761 cf_save_CPPFLAGS="$CPPFLAGS"
5762 cf_save_LIBS="$LIBS"
5763
5764 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
5765
5766cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
5767# Filter out duplicates - this happens with badly-designed ".pc" files...
5768for cf_add_1lib in $LIBS
5769do
5770 for cf_add_2lib in $cf_add_libs
5771 do
5772 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5773 then
5774 cf_add_1lib=
5775 break
5776 fi
5777 done
5778 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5779done
5780LIBS="$cf_add_libs"
5781
5782 cat >conftest.$ac_ext <<_ACEOF
5783#line 5783 "configure"
5784#include "confdefs.h"
5785#include <${cf_cv_ncurses_header:-curses.h}>
5786int
5787main ()
5788{
5789initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5790 ;
5791 return 0;
5792}
5793_ACEOF
5794rm -f conftest.$ac_objext conftest$ac_exeext
5795if { (eval echo "$as_me:5795: \"$ac_link\"") >&5
5796 (eval $ac_link) 2>&5
5797 ac_status=$?
5798 echo "$as_me:5798: \$? = $ac_status" >&5
5799 (exit $ac_status); } &&
5800 { ac_try='test -s conftest$ac_exeext'
5801 { (eval echo "$as_me:5801: \"$ac_try\"") >&5
5802 (eval $ac_try) 2>&5
5803 ac_status=$?
5804 echo "$as_me:5804: \$? = $ac_status" >&5
5805 (exit $ac_status); }; }; then
5806 if test "$cross_compiling" = yes; then
5807 cf_have_ncuconfig=maybe
5808else
5809 cat >conftest.$ac_ext <<_ACEOF
5810#line 5810 "configure"
5811#include "confdefs.h"
5812#include <${cf_cv_ncurses_header:-curses.h}>
5813 int main(void)
5814 { char *xx = curses_version(); return (xx == 0); }
5815_ACEOF
5816rm -f conftest$ac_exeext
5817if { (eval echo "$as_me:5817: \"$ac_link\"") >&5
5818 (eval $ac_link) 2>&5
5819 ac_status=$?
5820 echo "$as_me:5820: \$? = $ac_status" >&5
5821 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5822 { (eval echo "$as_me:5822: \"$ac_try\"") >&5
5823 (eval $ac_try) 2>&5
5824 ac_status=$?
5825 echo "$as_me:5825: \$? = $ac_status" >&5
5826 (exit $ac_status); }; }; then
5827 cf_have_ncuconfig=yes
5828else
5829 echo "$as_me: program exited with status $ac_status" >&5
5830echo "$as_me: failed program was:" >&5
5831cat conftest.$ac_ext >&5
5832cf_have_ncuconfig=no
5833fi
5834rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5835fi
5836else
5837 echo "$as_me: failed program was:" >&5
5838cat conftest.$ac_ext >&5
5839cf_have_ncuconfig=no
5840fi
5841rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5842 echo "$as_me:5842: result: $cf_have_ncuconfig" >&5
5843echo "${ECHO_T}$cf_have_ncuconfig" >&6
5844 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
5845 if test "$cf_have_ncuconfig" != "yes"
5846 then
5847 CPPFLAGS="$cf_save_CPPFLAGS"
5848 LIBS="$cf_save_LIBS"
5849 NCURSES_CONFIG_PKG=none
5850 else
5851
5852cat >>confdefs.h <<\EOF
5853#define NCURSES 1
5854EOF
5855
5856 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5857 fi
5858
5859 else
5860 echo "$as_me:5860: result: no" >&5
5861echo "${ECHO_T}no" >&6
5862 NCURSES_CONFIG_PKG=none
5863 fi
5864else
5865 NCURSES_CONFIG_PKG=none
5866fi
5867
5868if test "x$cf_have_ncuconfig" = "xno"; then
5869 echo "Looking for ${cf_ncuconfig_root}-config"
5870
5871if test -n "$ac_tool_prefix"; then
5872 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5873 do
5874 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5875set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5876echo "$as_me:5876: checking for $ac_word" >&5
5877echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5878if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5879 echo $ECHO_N "(cached) $ECHO_C" >&6
5880else
5881 if test -n "$NCURSES_CONFIG"; then
5882 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5883else
5884 ac_save_IFS=$IFS; IFS=$ac_path_separator
5885ac_dummy="$PATH"
5886for ac_dir in $ac_dummy; do
5887 IFS=$ac_save_IFS
5888 test -z "$ac_dir" && ac_dir=.
5889 $as_executable_p "$ac_dir/$ac_word" || continue
5890ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5891echo "$as_me:5891: found $ac_dir/$ac_word" >&5
5892break
5893done
5894
5895fi
5896fi
5897NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5898if test -n "$NCURSES_CONFIG"; then
5899 echo "$as_me:5899: result: $NCURSES_CONFIG" >&5
5900echo "${ECHO_T}$NCURSES_CONFIG" >&6
5901else
5902 echo "$as_me:5902: result: no" >&5
5903echo "${ECHO_T}no" >&6
5904fi
5905
5906 test -n "$NCURSES_CONFIG" && break
5907 done
5908fi
5909if test -z "$NCURSES_CONFIG"; then
5910 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5911 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5912do
5913 # Extract the first word of "$ac_prog", so it can be a program name with args.
5914set dummy $ac_prog; ac_word=$2
5915echo "$as_me:5915: checking for $ac_word" >&5
5916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5917if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5918 echo $ECHO_N "(cached) $ECHO_C" >&6
5919else
5920 if test -n "$ac_ct_NCURSES_CONFIG"; then
5921 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5922else
5923 ac_save_IFS=$IFS; IFS=$ac_path_separator
5924ac_dummy="$PATH"
5925for ac_dir in $ac_dummy; do
5926 IFS=$ac_save_IFS
5927 test -z "$ac_dir" && ac_dir=.
5928 $as_executable_p "$ac_dir/$ac_word" || continue
5929ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5930echo "$as_me:5930: found $ac_dir/$ac_word" >&5
5931break
5932done
5933
5934fi
5935fi
5936ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5937if test -n "$ac_ct_NCURSES_CONFIG"; then
5938 echo "$as_me:5938: result: $ac_ct_NCURSES_CONFIG" >&5
5939echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5940else
5941 echo "$as_me:5941: result: no" >&5
5942echo "${ECHO_T}no" >&6
5943fi
5944
5945 test -n "$ac_ct_NCURSES_CONFIG" && break
5946done
5947test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5948
5949 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5950fi
5951
5952 if test "$NCURSES_CONFIG" != none ; then
5953
5954 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5955
5956cf_add_libs="`$NCURSES_CONFIG --libs`"
5957# Filter out duplicates - this happens with badly-designed ".pc" files...
5958for cf_add_1lib in $LIBS
5959do
5960 for cf_add_2lib in $cf_add_libs
5961 do
5962 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5963 then
5964 cf_add_1lib=
5965 break
5966 fi
5967 done
5968 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5969done
5970LIBS="$cf_add_libs"
5971
5972 # even with config script, some packages use no-override for curses.h
5973
5974echo "$as_me:5974: checking if we have identified curses headers" >&5
5975echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5976if test "${cf_cv_ncurses_header+set}" = set; then
5977 echo $ECHO_N "(cached) $ECHO_C" >&6
5978else
5979
5980cf_cv_ncurses_header=none
5981for cf_header in \
5982 ncurses.h ncursesw/ncurses.h \
5983 curses.h ncursesw/curses.h
5984do
5985cat >conftest.$ac_ext <<_ACEOF
5986#line 5986 "configure"
5987#include "confdefs.h"
5988#include <${cf_header}>
5989int
5990main ()
5991{
5992initscr(); tgoto("?", 0,0)
5993 ;
5994 return 0;
5995}
5996_ACEOF
5997rm -f conftest.$ac_objext
5998if { (eval echo "$as_me:5998: \"$ac_compile\"") >&5
5999 (eval $ac_compile) 2>&5
6000 ac_status=$?
6001 echo "$as_me:6001: \$? = $ac_status" >&5
6002 (exit $ac_status); } &&
6003 { ac_try='test -s conftest.$ac_objext'
6004 { (eval echo "$as_me:6004: \"$ac_try\"") >&5
6005 (eval $ac_try) 2>&5
6006 ac_status=$?
6007 echo "$as_me:6007: \$? = $ac_status" >&5
6008 (exit $ac_status); }; }; then
6009 cf_cv_ncurses_header=$cf_header; break
6010else
6011 echo "$as_me: failed program was:" >&5
6012cat conftest.$ac_ext >&5
6013fi
6014rm -f conftest.$ac_objext conftest.$ac_ext
6015done
6016
6017fi
6018echo "$as_me:6018: result: $cf_cv_ncurses_header" >&5
6019echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6020
6021if test "$cf_cv_ncurses_header" = none ; then
6022 { { echo "$as_me:6022: error: No curses header-files found" >&5
6023echo "$as_me: error: No curses header-files found" >&2;}
6024 { (exit 1); exit 1; }; }
6025fi
6026
6027# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6028
6029for ac_header in $cf_cv_ncurses_header
6030do
6031as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6032echo "$as_me:6032: checking for $ac_header" >&5
6033echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6034if eval "test \"\${$as_ac_Header+set}\" = set"; then
6035 echo $ECHO_N "(cached) $ECHO_C" >&6
6036else
6037 cat >conftest.$ac_ext <<_ACEOF
6038#line 6038 "configure"
6039#include "confdefs.h"
6040#include <$ac_header>
6041_ACEOF
6042if { (eval echo "$as_me:6042: \"$ac_cpp conftest.$ac_ext\"") >&5
6043 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6044 ac_status=$?
6045 egrep -v '^ *\+' conftest.er1 >conftest.err
6046 rm -f conftest.er1
6047 cat conftest.err >&5
6048 echo "$as_me:6048: \$? = $ac_status" >&5
6049 (exit $ac_status); } >/dev/null; then
6050 if test -s conftest.err; then
6051 ac_cpp_err=$ac_c_preproc_warn_flag
6052 else
6053 ac_cpp_err=
6054 fi
6055else
6056 ac_cpp_err=yes
6057fi
6058if test -z "$ac_cpp_err"; then
6059 eval "$as_ac_Header=yes"
6060else
6061 echo "$as_me: failed program was:" >&5
6062 cat conftest.$ac_ext >&5
6063 eval "$as_ac_Header=no"
6064fi
6065rm -f conftest.err conftest.$ac_ext
6066fi
6067echo "$as_me:6067: result: `eval echo '${'$as_ac_Header'}'`" >&5
6068echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6069if test `eval echo '${'$as_ac_Header'}'` = yes; then
6070 cat >>confdefs.h <<EOF
6071#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6072EOF
6073
6074fi
6075done
6076
6077cat >>confdefs.h <<\EOF
6078#define NCURSES 1
6079EOF
6080
6081cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6082
6083 cat >>confdefs.h <<EOF
6084#define $cf_nculib_ROOT 1
6085EOF
6086
6087 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6088
6089 else
6090
6091cf_ncuhdr_root=ncursesw
6092
6093test -n "$cf_cv_curses_dir" && \
6094test "$cf_cv_curses_dir" != "no" && { \
6095
6096if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6097 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6098 do
6099 while test $cf_add_incdir != /usr/include
6100 do
6101 if test -d $cf_add_incdir
6102 then
6103 cf_have_incdir=no
6104 if test -n "$CFLAGS$CPPFLAGS" ; then
6105 # a loop is needed to ensure we can add subdirs of existing dirs
6106 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6107 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6108 cf_have_incdir=yes; break
6109 fi
6110 done
6111 fi
6112
6113 if test "$cf_have_incdir" = no ; then
6114 if test "$cf_add_incdir" = /usr/local/include ; then
6115 if test "$GCC" = yes
6116 then
6117 cf_save_CPPFLAGS=$CPPFLAGS
6118 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6119 cat >conftest.$ac_ext <<_ACEOF
6120#line 6120 "configure"
6121#include "confdefs.h"
6122#include <stdio.h>
6123int
6124main ()
6125{
6126printf("Hello")
6127 ;
6128 return 0;
6129}
6130_ACEOF
6131rm -f conftest.$ac_objext
6132if { (eval echo "$as_me:6132: \"$ac_compile\"") >&5
6133 (eval $ac_compile) 2>&5
6134 ac_status=$?
6135 echo "$as_me:6135: \$? = $ac_status" >&5
6136 (exit $ac_status); } &&
6137 { ac_try='test -s conftest.$ac_objext'
6138 { (eval echo "$as_me:6138: \"$ac_try\"") >&5
6139 (eval $ac_try) 2>&5
6140 ac_status=$?
6141 echo "$as_me:6141: \$? = $ac_status" >&5
6142 (exit $ac_status); }; }; then
6143 :
6144else
6145 echo "$as_me: failed program was:" >&5
6146cat conftest.$ac_ext >&5
6147cf_have_incdir=yes
6148fi
6149rm -f conftest.$ac_objext conftest.$ac_ext
6150 CPPFLAGS=$cf_save_CPPFLAGS
6151 fi
6152 fi
6153 fi
6154
6155 if test "$cf_have_incdir" = no ; then
6156 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6157
6158echo "${as_me:-configure}:6158: testing adding $cf_add_incdir to include-path ..." 1>&5
6159
6160 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6161
6162 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6163 test "$cf_top_incdir" = "$cf_add_incdir" && break
6164 cf_add_incdir="$cf_top_incdir"
6165 else
6166 break
6167 fi
6168 else
6169 break
6170 fi
6171 done
6172 done
6173fi
6174
6175}
6176
6177echo "$as_me:6177: checking for $cf_ncuhdr_root header in include-path" >&5
6178echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6179if test "${cf_cv_ncurses_h+set}" = set; then
6180 echo $ECHO_N "(cached) $ECHO_C" >&6
6181else
6182
6183 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6184 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6185 for cf_header in $cf_header_list
6186 do
6187
6188 cat >conftest.$ac_ext <<_ACEOF
6189#line 6189 "configure"
6190#include "confdefs.h"
6191
6192#define _XOPEN_SOURCE_EXTENDED
6193#undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6194#define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6195
6196#include <$cf_header>
6197int
6198main ()
6199{
6200
6201#ifdef NCURSES_VERSION
6202
6203#ifndef WACS_BSSB
6204 make an error
6205#endif
6206
6207printf("%s\n", NCURSES_VERSION);
6208#else
6209#ifdef __NCURSES_H
6210printf("old\n");
6211#else
6212 make an error
6213#endif
6214#endif
6215
6216 ;
6217 return 0;
6218}
6219_ACEOF
6220rm -f conftest.$ac_objext
6221if { (eval echo "$as_me:6221: \"$ac_compile\"") >&5
6222 (eval $ac_compile) 2>&5
6223 ac_status=$?
6224 echo "$as_me:6224: \$? = $ac_status" >&5
6225 (exit $ac_status); } &&
6226 { ac_try='test -s conftest.$ac_objext'
6227 { (eval echo "$as_me:6227: \"$ac_try\"") >&5
6228 (eval $ac_try) 2>&5
6229 ac_status=$?
6230 echo "$as_me:6230: \$? = $ac_status" >&5
6231 (exit $ac_status); }; }; then
6232 cf_cv_ncurses_h=$cf_header
6233
6234else
6235 echo "$as_me: failed program was:" >&5
6236cat conftest.$ac_ext >&5
6237cf_cv_ncurses_h=no
6238fi
6239rm -f conftest.$ac_objext conftest.$ac_ext
6240
6241 test "$cf_cv_ncurses_h" != no && break
6242 done
6243
6244fi
6245echo "$as_me:6245: result: $cf_cv_ncurses_h" >&5
6246echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6247
6248if test "$cf_cv_ncurses_h" != no ; then
6249 cf_cv_ncurses_header=$cf_cv_ncurses_h
6250else
6251
6252echo "$as_me:6252: checking for $cf_ncuhdr_root include-path" >&5
6253echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6254if test "${cf_cv_ncurses_h2+set}" = set; then
6255 echo $ECHO_N "(cached) $ECHO_C" >&6
6256else
6257
6258 test -n "$verbose" && echo
6259
6260cf_search=
6261
6262# collect the current set of include-directories from compiler flags
6263cf_header_path_list=""
6264if test -n "${CFLAGS}${CPPFLAGS}" ; then
6265 for cf_header_path in $CPPFLAGS $CFLAGS
6266 do
6267 case $cf_header_path in
6268 (-I*)
6269 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6270
6271test "x$cf_header_path" != "xNONE" && \
6272test -d "$cf_header_path" && \
6273 {
6274 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6275 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6276 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6277 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6278 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6279 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6280}
6281
6282 cf_header_path_list="$cf_header_path_list $cf_search"
6283 ;;
6284 esac
6285 done
6286fi
6287
6288# add the variations for the package we are looking for
6289
6290cf_search=
6291
6292test "x$prefix" != "xNONE" && \
6293test -d "$prefix" && \
6294 {
6295 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6296 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6297 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6298 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6299 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6300 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6301}
6302
6303for cf_subdir_prefix in \
6304 /usr \
6305 /usr/local \
6306 /usr/pkg \
6307 /opt \
6308 /opt/local \
6309 $HOME
6310do
6311
6312test "x$cf_subdir_prefix" != "x$prefix" && \
6313test -d "$cf_subdir_prefix" && \
6314(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6315 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6316 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6317 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6318 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6319 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6320 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6321}
6322
6323done
6324
6325test "$includedir" != NONE && \
6326test "$includedir" != "/usr/include" && \
6327test -d "$includedir" && {
6328 test -d $includedir && cf_search="$cf_search $includedir"
6329 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6330}
6331
6332test "$oldincludedir" != NONE && \
6333test "$oldincludedir" != "/usr/include" && \
6334test -d "$oldincludedir" && {
6335 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6336 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6337}
6338
6339cf_search="$cf_search $cf_header_path_list"
6340
6341 test -n "$verbose" && echo search path $cf_search
6342 cf_save2_CPPFLAGS="$CPPFLAGS"
6343 for cf_incdir in $cf_search
6344 do
6345
6346if test -n "$cf_incdir" ; then
6347 for cf_add_incdir in $cf_incdir
6348 do
6349 while test $cf_add_incdir != /usr/include
6350 do
6351 if test -d $cf_add_incdir
6352 then
6353 cf_have_incdir=no
6354 if test -n "$CFLAGS$CPPFLAGS" ; then
6355 # a loop is needed to ensure we can add subdirs of existing dirs
6356 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6357 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6358 cf_have_incdir=yes; break
6359 fi
6360 done
6361 fi
6362
6363 if test "$cf_have_incdir" = no ; then
6364 if test "$cf_add_incdir" = /usr/local/include ; then
6365 if test "$GCC" = yes
6366 then
6367 cf_save_CPPFLAGS=$CPPFLAGS
6368 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6369 cat >conftest.$ac_ext <<_ACEOF
6370#line 6370 "configure"
6371#include "confdefs.h"
6372#include <stdio.h>
6373int
6374main ()
6375{
6376printf("Hello")
6377 ;
6378 return 0;
6379}
6380_ACEOF
6381rm -f conftest.$ac_objext
6382if { (eval echo "$as_me:6382: \"$ac_compile\"") >&5
6383 (eval $ac_compile) 2>&5
6384 ac_status=$?
6385 echo "$as_me:6385: \$? = $ac_status" >&5
6386 (exit $ac_status); } &&
6387 { ac_try='test -s conftest.$ac_objext'
6388 { (eval echo "$as_me:6388: \"$ac_try\"") >&5
6389 (eval $ac_try) 2>&5
6390 ac_status=$?
6391 echo "$as_me:6391: \$? = $ac_status" >&5
6392 (exit $ac_status); }; }; then
6393 :
6394else
6395 echo "$as_me: failed program was:" >&5
6396cat conftest.$ac_ext >&5
6397cf_have_incdir=yes
6398fi
6399rm -f conftest.$ac_objext conftest.$ac_ext
6400 CPPFLAGS=$cf_save_CPPFLAGS
6401 fi
6402 fi
6403 fi
6404
6405 if test "$cf_have_incdir" = no ; then
6406 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6407
6408echo "${as_me:-configure}:6408: testing adding $cf_add_incdir to include-path ..." 1>&5
6409
6410 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6411
6412 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6413 test "$cf_top_incdir" = "$cf_add_incdir" && break
6414 cf_add_incdir="$cf_top_incdir"
6415 else
6416 break
6417 fi
6418 else
6419 break
6420 fi
6421 done
6422 done
6423fi
6424
6425 for cf_header in \
6426 ncurses.h \
6427 curses.h
6428 do
6429
6430 cat >conftest.$ac_ext <<_ACEOF
6431#line 6431 "configure"
6432#include "confdefs.h"
6433
6434#include <$cf_header>
6435int
6436main ()
6437{
6438
6439#ifdef NCURSES_VERSION
6440
6441printf("%s\n", NCURSES_VERSION);
6442#else
6443#ifdef __NCURSES_H
6444printf("old\n");
6445#else
6446 make an error
6447#endif
6448#endif
6449
6450 ;
6451 return 0;
6452}
6453_ACEOF
6454rm -f conftest.$ac_objext
6455if { (eval echo "$as_me:6455: \"$ac_compile\"") >&5
6456 (eval $ac_compile) 2>&5
6457 ac_status=$?
6458 echo "$as_me:6458: \$? = $ac_status" >&5
6459 (exit $ac_status); } &&
6460 { ac_try='test -s conftest.$ac_objext'
6461 { (eval echo "$as_me:6461: \"$ac_try\"") >&5
6462 (eval $ac_try) 2>&5
6463 ac_status=$?
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit $ac_status); }; }; then
6466 cf_cv_ncurses_h2=$cf_header
6467
6468else
6469 echo "$as_me: failed program was:" >&5
6470cat conftest.$ac_ext >&5
6471cf_cv_ncurses_h2=no
6472fi
6473rm -f conftest.$ac_objext conftest.$ac_ext
6474
6475 if test "$cf_cv_ncurses_h2" != no ; then
6476 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6477 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6478 break
6479 fi
6480 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6481 done
6482 CPPFLAGS="$cf_save2_CPPFLAGS"
6483 test "$cf_cv_ncurses_h2" != no && break
6484 done
6485 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6485: error: not found" >&5
6486echo "$as_me: error: not found" >&2;}
6487 { (exit 1); exit 1; }; }
6488
6489fi
6490echo "$as_me:6490: result: $cf_cv_ncurses_h2" >&5
6491echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6492
6493 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6494 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6495 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6496 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6497 fi
6498
6499if test -n "$cf_1st_incdir" ; then
6500 for cf_add_incdir in $cf_1st_incdir
6501 do
6502 while test $cf_add_incdir != /usr/include
6503 do
6504 if test -d $cf_add_incdir
6505 then
6506 cf_have_incdir=no
6507 if test -n "$CFLAGS$CPPFLAGS" ; then
6508 # a loop is needed to ensure we can add subdirs of existing dirs
6509 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6510 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6511 cf_have_incdir=yes; break
6512 fi
6513 done
6514 fi
6515
6516 if test "$cf_have_incdir" = no ; then
6517 if test "$cf_add_incdir" = /usr/local/include ; then
6518 if test "$GCC" = yes
6519 then
6520 cf_save_CPPFLAGS=$CPPFLAGS
6521 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6522 cat >conftest.$ac_ext <<_ACEOF
6523#line 6523 "configure"
6524#include "confdefs.h"
6525#include <stdio.h>
6526int
6527main ()
6528{
6529printf("Hello")
6530 ;
6531 return 0;
6532}
6533_ACEOF
6534rm -f conftest.$ac_objext
6535if { (eval echo "$as_me:6535: \"$ac_compile\"") >&5
6536 (eval $ac_compile) 2>&5
6537 ac_status=$?
6538 echo "$as_me:6538: \$? = $ac_status" >&5
6539 (exit $ac_status); } &&
6540 { ac_try='test -s conftest.$ac_objext'
6541 { (eval echo "$as_me:6541: \"$ac_try\"") >&5
6542 (eval $ac_try) 2>&5
6543 ac_status=$?
6544 echo "$as_me:6544: \$? = $ac_status" >&5
6545 (exit $ac_status); }; }; then
6546 :
6547else
6548 echo "$as_me: failed program was:" >&5
6549cat conftest.$ac_ext >&5
6550cf_have_incdir=yes
6551fi
6552rm -f conftest.$ac_objext conftest.$ac_ext
6553 CPPFLAGS=$cf_save_CPPFLAGS
6554 fi
6555 fi
6556 fi
6557
6558 if test "$cf_have_incdir" = no ; then
6559 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6560
6561echo "${as_me:-configure}:6561: testing adding $cf_add_incdir to include-path ..." 1>&5
6562
6563 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6564
6565 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6566 test "$cf_top_incdir" = "$cf_add_incdir" && break
6567 cf_add_incdir="$cf_top_incdir"
6568 else
6569 break
6570 fi
6571 else
6572 break
6573 fi
6574 done
6575 done
6576fi
6577
6578fi
6579
6580# Set definitions to allow ifdef'ing for ncurses.h
6581
6582case $cf_cv_ncurses_header in
6583(*ncurses.h)
6584
6585cat >>confdefs.h <<\EOF
6586#define HAVE_NCURSES_H 1
6587EOF
6588
6589 ;;
6590esac
6591
6592case $cf_cv_ncurses_header in
6593(ncurses/curses.h|ncurses/ncurses.h)
6594
6595cat >>confdefs.h <<\EOF
6596#define HAVE_NCURSES_NCURSES_H 1
6597EOF
6598
6599 ;;
6600(ncursesw/curses.h|ncursesw/ncurses.h)
6601
6602cat >>confdefs.h <<\EOF
6603#define HAVE_NCURSESW_NCURSES_H 1
6604EOF
6605
6606 ;;
6607esac
6608
6609echo "$as_me:6609: checking for terminfo header" >&5
6610echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6611if test "${cf_cv_term_header+set}" = set; then
6612 echo $ECHO_N "(cached) $ECHO_C" >&6
6613else
6614
6615case ${cf_cv_ncurses_header} in
6616(*/ncurses.h|*/ncursesw.h)
6617 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6618 ;;
6619(*)
6620 cf_term_header=term.h
6621 ;;
6622esac
6623
6624for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6625do
6626cat >conftest.$ac_ext <<_ACEOF
6627#line 6627 "configure"
6628#include "confdefs.h"
6629#include <stdio.h>
6630#include <${cf_cv_ncurses_header:-curses.h}>
6631#include <$cf_test>
6632
6633int
6634main ()
6635{
6636int x = auto_left_margin
6637 ;
6638 return 0;
6639}
6640_ACEOF
6641rm -f conftest.$ac_objext
6642if { (eval echo "$as_me:6642: \"$ac_compile\"") >&5
6643 (eval $ac_compile) 2>&5
6644 ac_status=$?
6645 echo "$as_me:6645: \$? = $ac_status" >&5
6646 (exit $ac_status); } &&
6647 { ac_try='test -s conftest.$ac_objext'
6648 { (eval echo "$as_me:6648: \"$ac_try\"") >&5
6649 (eval $ac_try) 2>&5
6650 ac_status=$?
6651 echo "$as_me:6651: \$? = $ac_status" >&5
6652 (exit $ac_status); }; }; then
6653
6654 cf_cv_term_header="$cf_test"
6655else
6656 echo "$as_me: failed program was:" >&5
6657cat conftest.$ac_ext >&5
6658
6659 cf_cv_term_header=unknown
6660
6661fi
6662rm -f conftest.$ac_objext conftest.$ac_ext
6663 test "$cf_cv_term_header" != unknown && break
6664done
6665
6666fi
6667echo "$as_me:6667: result: $cf_cv_term_header" >&5
6668echo "${ECHO_T}$cf_cv_term_header" >&6
6669
6670# Set definitions to allow ifdef'ing to accommodate subdirectories
6671
6672case $cf_cv_term_header in
6673(*term.h)
6674
6675cat >>confdefs.h <<\EOF
6676#define HAVE_TERM_H 1
6677EOF
6678
6679 ;;
6680esac
6681
6682case $cf_cv_term_header in
6683(ncurses/term.h)
6684
6685cat >>confdefs.h <<\EOF
6686#define HAVE_NCURSES_TERM_H 1
6687EOF
6688
6689 ;;
6690(ncursesw/term.h)
6691
6692cat >>confdefs.h <<\EOF
6693#define HAVE_NCURSESW_TERM_H 1
6694EOF
6695
6696 ;;
6697esac
6698
6699# some applications need this, but should check for NCURSES_VERSION
6700
6701cat >>confdefs.h <<\EOF
6702#define NCURSES 1
6703EOF
6704
6705echo "$as_me:6705: checking for ncurses version" >&5
6706echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6707if test "${cf_cv_ncurses_version+set}" = set; then
6708 echo $ECHO_N "(cached) $ECHO_C" >&6
6709else
6710
6711 cf_cv_ncurses_version=no
6712 cf_tempfile=out$$
6713 rm -f $cf_tempfile
6714 if test "$cross_compiling" = yes; then
6715
6716 # This will not work if the preprocessor splits the line after the
6717 # Autoconf token. The 'unproto' program does that.
6718 cat > conftest.$ac_ext <<EOF
6719#include <${cf_cv_ncurses_header:-curses.h}>
6720#undef Autoconf
6721#ifdef NCURSES_VERSION
6722Autoconf NCURSES_VERSION
6723#else
6724#ifdef __NCURSES_H
6725Autoconf "old"
6726#endif
6727;
6728#endif
6729EOF
6730 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6731 { (eval echo "$as_me:6731: \"$cf_try\"") >&5
6732 (eval $cf_try) 2>&5
6733 ac_status=$?
6734 echo "$as_me:6734: \$? = $ac_status" >&5
6735 (exit $ac_status); }
6736 if test -f conftest.out ; then
6737 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6738 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6739 rm -f conftest.out
6740 fi
6741
6742else
6743 cat >conftest.$ac_ext <<_ACEOF
6744#line 6744 "configure"
6745#include "confdefs.h"
6746
6747#include <${cf_cv_ncurses_header:-curses.h}>
6748#include <stdio.h>
6749int main()
6750{
6751 FILE *fp = fopen("$cf_tempfile", "w");
6752#ifdef NCURSES_VERSION
6753# ifdef NCURSES_VERSION_PATCH
6754 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6755# else
6756 fprintf(fp, "%s\n", NCURSES_VERSION);
6757# endif
6758#else
6759# ifdef __NCURSES_H
6760 fprintf(fp, "old\n");
6761# else
6762 make an error
6763# endif
6764#endif
6765 ${cf_cv_main_return:-return}(0);
6766}
6767_ACEOF
6768rm -f conftest$ac_exeext
6769if { (eval echo "$as_me:6769: \"$ac_link\"") >&5
6770 (eval $ac_link) 2>&5
6771 ac_status=$?
6772 echo "$as_me:6772: \$? = $ac_status" >&5
6773 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6774 { (eval echo "$as_me:6774: \"$ac_try\"") >&5
6775 (eval $ac_try) 2>&5
6776 ac_status=$?
6777 echo "$as_me:6777: \$? = $ac_status" >&5
6778 (exit $ac_status); }; }; then
6779
6780 cf_cv_ncurses_version=`cat $cf_tempfile`
6781else
6782 echo "$as_me: program exited with status $ac_status" >&5
6783echo "$as_me: failed program was:" >&5
6784cat conftest.$ac_ext >&5
6785fi
6786rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6787fi
6788 rm -f $cf_tempfile
6789
6790fi
6791echo "$as_me:6791: result: $cf_cv_ncurses_version" >&5
6792echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6793test "$cf_cv_ncurses_version" = no ||
6794cat >>confdefs.h <<\EOF
6795#define NCURSES 1
6796EOF
6797
6798cf_nculib_root=ncursesw
6799 # This works, except for the special case where we find gpm, but
6800 # ncurses is in a nonstandard location via $LIBS, and we really want
6801 # to link gpm.
6802cf_ncurses_LIBS=""
6803cf_ncurses_SAVE="$LIBS"
6804echo "$as_me:6804: checking for Gpm_Open in -lgpm" >&5
6805echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6806if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6807 echo $ECHO_N "(cached) $ECHO_C" >&6
6808else
6809 ac_check_lib_save_LIBS=$LIBS
6810LIBS="-lgpm $LIBS"
6811cat >conftest.$ac_ext <<_ACEOF
6812#line 6812 "configure"
6813#include "confdefs.h"
6814
6815/* Override any gcc2 internal prototype to avoid an error. */
6816#ifdef __cplusplus
6817extern "C"
6818#endif
6819/* We use char because int might match the return type of a gcc2
6820 builtin and then its argument prototype would still apply. */
6821char Gpm_Open ();
6822int
6823main ()
6824{
6825Gpm_Open ();
6826 ;
6827 return 0;
6828}
6829_ACEOF
6830rm -f conftest.$ac_objext conftest$ac_exeext
6831if { (eval echo "$as_me:6831: \"$ac_link\"") >&5
6832 (eval $ac_link) 2>&5
6833 ac_status=$?
6834 echo "$as_me:6834: \$? = $ac_status" >&5
6835 (exit $ac_status); } &&
6836 { ac_try='test -s conftest$ac_exeext'
6837 { (eval echo "$as_me:6837: \"$ac_try\"") >&5
6838 (eval $ac_try) 2>&5
6839 ac_status=$?
6840 echo "$as_me:6840: \$? = $ac_status" >&5
6841 (exit $ac_status); }; }; then
6842 ac_cv_lib_gpm_Gpm_Open=yes
6843else
6844 echo "$as_me: failed program was:" >&5
6845cat conftest.$ac_ext >&5
6846ac_cv_lib_gpm_Gpm_Open=no
6847fi
6848rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6849LIBS=$ac_check_lib_save_LIBS
6850fi
6851echo "$as_me:6851: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6852echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6853if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6854 echo "$as_me:6854: checking for initscr in -lgpm" >&5
6855echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6856if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6857 echo $ECHO_N "(cached) $ECHO_C" >&6
6858else
6859 ac_check_lib_save_LIBS=$LIBS
6860LIBS="-lgpm $LIBS"
6861cat >conftest.$ac_ext <<_ACEOF
6862#line 6862 "configure"
6863#include "confdefs.h"
6864
6865/* Override any gcc2 internal prototype to avoid an error. */
6866#ifdef __cplusplus
6867extern "C"
6868#endif
6869/* We use char because int might match the return type of a gcc2
6870 builtin and then its argument prototype would still apply. */
6871char initscr ();
6872int
6873main ()
6874{
6875initscr ();
6876 ;
6877 return 0;
6878}
6879_ACEOF
6880rm -f conftest.$ac_objext conftest$ac_exeext
6881if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
6882 (eval $ac_link) 2>&5
6883 ac_status=$?
6884 echo "$as_me:6884: \$? = $ac_status" >&5
6885 (exit $ac_status); } &&
6886 { ac_try='test -s conftest$ac_exeext'
6887 { (eval echo "$as_me:6887: \"$ac_try\"") >&5
6888 (eval $ac_try) 2>&5
6889 ac_status=$?
6890 echo "$as_me:6890: \$? = $ac_status" >&5
6891 (exit $ac_status); }; }; then
6892 ac_cv_lib_gpm_initscr=yes
6893else
6894 echo "$as_me: failed program was:" >&5
6895cat conftest.$ac_ext >&5
6896ac_cv_lib_gpm_initscr=no
6897fi
6898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6899LIBS=$ac_check_lib_save_LIBS
6900fi
6901echo "$as_me:6901: result: $ac_cv_lib_gpm_initscr" >&5
6902echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6903if test $ac_cv_lib_gpm_initscr = yes; then
6904 LIBS="$cf_ncurses_SAVE"
6905else
6906 cf_ncurses_LIBS="-lgpm"
6907fi
6908
6909fi
6910
6911case $host_os in
6912(freebsd*)
6913 # This is only necessary if you are linking against an obsolete
6914 # version of ncurses (but it should do no harm, since it's static).
6915 if test "$cf_nculib_root" = ncurses ; then
6916 echo "$as_me:6916: checking for tgoto in -lmytinfo" >&5
6917echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6918if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6919 echo $ECHO_N "(cached) $ECHO_C" >&6
6920else
6921 ac_check_lib_save_LIBS=$LIBS
6922LIBS="-lmytinfo $LIBS"
6923cat >conftest.$ac_ext <<_ACEOF
6924#line 6924 "configure"
6925#include "confdefs.h"
6926
6927/* Override any gcc2 internal prototype to avoid an error. */
6928#ifdef __cplusplus
6929extern "C"
6930#endif
6931/* We use char because int might match the return type of a gcc2
6932 builtin and then its argument prototype would still apply. */
6933char tgoto ();
6934int
6935main ()
6936{
6937tgoto ();
6938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext conftest$ac_exeext
6943if { (eval echo "$as_me:6943: \"$ac_link\"") >&5
6944 (eval $ac_link) 2>&5
6945 ac_status=$?
6946 echo "$as_me:6946: \$? = $ac_status" >&5
6947 (exit $ac_status); } &&
6948 { ac_try='test -s conftest$ac_exeext'
6949 { (eval echo "$as_me:6949: \"$ac_try\"") >&5
6950 (eval $ac_try) 2>&5
6951 ac_status=$?
6952 echo "$as_me:6952: \$? = $ac_status" >&5
6953 (exit $ac_status); }; }; then
6954 ac_cv_lib_mytinfo_tgoto=yes
6955else
6956 echo "$as_me: failed program was:" >&5
6957cat conftest.$ac_ext >&5
6958ac_cv_lib_mytinfo_tgoto=no
6959fi
6960rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6961LIBS=$ac_check_lib_save_LIBS
6962fi
6963echo "$as_me:6963: result: $ac_cv_lib_mytinfo_tgoto" >&5
6964echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6965if test $ac_cv_lib_mytinfo_tgoto = yes; then
6966 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6967fi
6968
6969 fi
6970 ;;
6971esac
6972
6973cf_add_libs="$cf_ncurses_LIBS"
6974# Filter out duplicates - this happens with badly-designed ".pc" files...
6975for cf_add_1lib in $LIBS
6976do
6977 for cf_add_2lib in $cf_add_libs
6978 do
6979 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6980 then
6981 cf_add_1lib=
6982 break
6983 fi
6984 done
6985 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6986done
6987LIBS="$cf_add_libs"
6988
6989if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6990then
6991
6992cf_add_libs="-l$cf_nculib_root"
6993# Filter out duplicates - this happens with badly-designed ".pc" files...
6994for cf_add_1lib in $LIBS
6995do
6996 for cf_add_2lib in $cf_add_libs
6997 do
6998 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6999 then
7000 cf_add_1lib=
7001 break
7002 fi
7003 done
7004 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7005done
7006LIBS="$cf_add_libs"
7007
7008else
7009
7010 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7011 cf_libdir=""
7012 echo "$as_me:7012: checking for initscr" >&5
7013echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7014if test "${ac_cv_func_initscr+set}" = set; then
7015 echo $ECHO_N "(cached) $ECHO_C" >&6
7016else
7017 cat >conftest.$ac_ext <<_ACEOF
7018#line 7018 "configure"
7019#include "confdefs.h"
7020/* System header to define __stub macros and hopefully few prototypes,
7021 which can conflict with char initscr (); below. */
7022#include <assert.h>
7023/* Override any gcc2 internal prototype to avoid an error. */
7024#ifdef __cplusplus
7025extern "C"
7026#endif
7027/* We use char because int might match the return type of a gcc2
7028 builtin and then its argument prototype would still apply. */
7029char initscr ();
7030char (*f) ();
7031
7032int
7033main ()
7034{
7035/* The GNU C library defines this for functions which it implements
7036 to always fail with ENOSYS. Some functions are actually named
7037 something starting with __ and the normal name is an alias. */
7038#if defined (__stub_initscr) || defined (__stub___initscr)
7039choke me
7040#else
7041f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7042#endif
7043
7044 ;
7045 return 0;
7046}
7047_ACEOF
7048rm -f conftest.$ac_objext conftest$ac_exeext
7049if { (eval echo "$as_me:7049: \"$ac_link\"") >&5
7050 (eval $ac_link) 2>&5
7051 ac_status=$?
7052 echo "$as_me:7052: \$? = $ac_status" >&5
7053 (exit $ac_status); } &&
7054 { ac_try='test -s conftest$ac_exeext'
7055 { (eval echo "$as_me:7055: \"$ac_try\"") >&5
7056 (eval $ac_try) 2>&5
7057 ac_status=$?
7058 echo "$as_me:7058: \$? = $ac_status" >&5
7059 (exit $ac_status); }; }; then
7060 ac_cv_func_initscr=yes
7061else
7062 echo "$as_me: failed program was:" >&5
7063cat conftest.$ac_ext >&5
7064ac_cv_func_initscr=no
7065fi
7066rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7067fi
7068echo "$as_me:7068: result: $ac_cv_func_initscr" >&5
7069echo "${ECHO_T}$ac_cv_func_initscr" >&6
7070if test $ac_cv_func_initscr = yes; then
7071 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7072else
7073
7074 cf_save_LIBS="$LIBS"
7075 echo "$as_me:7075: checking for initscr in -l$cf_nculib_root" >&5
7076echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7077 LIBS="-l$cf_nculib_root $LIBS"
7078 cat >conftest.$ac_ext <<_ACEOF
7079#line 7079 "configure"
7080#include "confdefs.h"
7081#include <${cf_cv_ncurses_header:-curses.h}>
7082int
7083main ()
7084{
7085initscr()
7086 ;
7087 return 0;
7088}
7089_ACEOF
7090rm -f conftest.$ac_objext conftest$ac_exeext
7091if { (eval echo "$as_me:7091: \"$ac_link\"") >&5
7092 (eval $ac_link) 2>&5
7093 ac_status=$?
7094 echo "$as_me:7094: \$? = $ac_status" >&5
7095 (exit $ac_status); } &&
7096 { ac_try='test -s conftest$ac_exeext'
7097 { (eval echo "$as_me:7097: \"$ac_try\"") >&5
7098 (eval $ac_try) 2>&5
7099 ac_status=$?
7100 echo "$as_me:7100: \$? = $ac_status" >&5
7101 (exit $ac_status); }; }; then
7102 echo "$as_me:7102: result: yes" >&5
7103echo "${ECHO_T}yes" >&6
7104 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7105
7106else
7107 echo "$as_me: failed program was:" >&5
7108cat conftest.$ac_ext >&5
7109echo "$as_me:7109: result: no" >&5
7110echo "${ECHO_T}no" >&6
7111
7112cf_search=
7113cf_library_path_list=""
7114if test -n "${LDFLAGS}${LIBS}" ; then
7115 for cf_library_path in $LDFLAGS $LIBS
7116 do
7117 case $cf_library_path in
7118 (-L*)
7119 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7120
7121test "x$cf_library_path" != "xNONE" && \
7122test -d "$cf_library_path" && \
7123 {
7124 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7125 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7126 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7127 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7128 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7129 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
7130}
7131
7132 cf_library_path_list="$cf_library_path_list $cf_search"
7133 ;;
7134 esac
7135 done
7136fi
7137
7138cf_search=
7139
7140test "x$prefix" != "xNONE" && \
7141test -d "$prefix" && \
7142 {
7143 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7144 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7145 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7146 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7147 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7148 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7149}
7150
7151for cf_subdir_prefix in \
7152 /usr \
7153 /usr/local \
7154 /usr/pkg \
7155 /opt \
7156 /opt/local \
7157 $HOME
7158do
7159
7160test "x$cf_subdir_prefix" != "x$prefix" && \
7161test -d "$cf_subdir_prefix" && \
7162(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7163 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7164 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7165 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7166 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7167 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7168 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
7169}
7170
7171done
7172
7173cf_search="$cf_library_path_list $cf_search"
7174
7175 for cf_libdir in $cf_search
7176 do
7177 echo "$as_me:7177: checking for -l$cf_nculib_root in $cf_libdir" >&5
7178echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7179 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7180 cat >conftest.$ac_ext <<_ACEOF
7181#line 7181 "configure"
7182#include "confdefs.h"
7183#include <${cf_cv_ncurses_header:-curses.h}>
7184int
7185main ()
7186{
7187initscr()
7188 ;
7189 return 0;
7190}
7191_ACEOF
7192rm -f conftest.$ac_objext conftest$ac_exeext
7193if { (eval echo "$as_me:7193: \"$ac_link\"") >&5
7194 (eval $ac_link) 2>&5
7195 ac_status=$?
7196 echo "$as_me:7196: \$? = $ac_status" >&5
7197 (exit $ac_status); } &&
7198 { ac_try='test -s conftest$ac_exeext'
7199 { (eval echo "$as_me:7199: \"$ac_try\"") >&5
7200 (eval $ac_try) 2>&5
7201 ac_status=$?
7202 echo "$as_me:7202: \$? = $ac_status" >&5
7203 (exit $ac_status); }; }; then
7204 echo "$as_me:7204: result: yes" >&5
7205echo "${ECHO_T}yes" >&6
7206 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7207 break
7208else
7209 echo "$as_me: failed program was:" >&5
7210cat conftest.$ac_ext >&5
7211echo "$as_me:7211: result: no" >&5
7212echo "${ECHO_T}no" >&6
7213 LIBS="$cf_save_LIBS"
7214fi
7215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7216 done
7217
7218fi
7219rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7220
7221fi
7222
7223eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7224
7225if test $cf_found_library = no ; then
7226 { { echo "$as_me:7226: error: Cannot link $cf_nculib_root library" >&5
7227echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7228 { (exit 1); exit 1; }; }
7229fi
7230
7231fi
7232
7233if test -n "$cf_ncurses_LIBS" ; then
7234 echo "$as_me:7234: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7235echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7236 cf_ncurses_SAVE="$LIBS"
7237 for p in $cf_ncurses_LIBS ; do
7238 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7239 if test "$q" != "$LIBS" ; then
7240 LIBS="$q"
7241 fi
7242 done
7243 cat >conftest.$ac_ext <<_ACEOF
7244#line 7244 "configure"
7245#include "confdefs.h"
7246#include <${cf_cv_ncurses_header:-curses.h}>
7247int
7248main ()
7249{
7250initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255rm -f conftest.$ac_objext conftest$ac_exeext
7256if { (eval echo "$as_me:7256: \"$ac_link\"") >&5
7257 (eval $ac_link) 2>&5
7258 ac_status=$?
7259 echo "$as_me:7259: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
7261 { ac_try='test -s conftest$ac_exeext'
7262 { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7263 (eval $ac_try) 2>&5
7264 ac_status=$?
7265 echo "$as_me:7265: \$? = $ac_status" >&5
7266 (exit $ac_status); }; }; then
7267 echo "$as_me:7267: result: yes" >&5
7268echo "${ECHO_T}yes" >&6
7269else
7270 echo "$as_me: failed program was:" >&5
7271cat conftest.$ac_ext >&5
7272echo "$as_me:7272: result: no" >&5
7273echo "${ECHO_T}no" >&6
7274 LIBS="$cf_ncurses_SAVE"
7275fi
7276rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7277fi
7278
7279cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7280
7281cat >>confdefs.h <<EOF
7282#define $cf_nculib_ROOT 1
7283EOF
7284
7285 fi
7286else
7287 NCURSES_CONFIG=none
7288fi
7289
7290else
7291
7292cf_ncuconfig_root=ncurses
7293cf_have_ncuconfig=no
7294
7295if test "x${PKG_CONFIG:=none}" != xnone; then
7296 echo "$as_me:7296: checking pkg-config for $cf_ncuconfig_root" >&5
7297echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7298 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7299 echo "$as_me:7299: result: yes" >&5
7300echo "${ECHO_T}yes" >&6
7301
7302 echo "$as_me:7302: checking if the $cf_ncuconfig_root package files work" >&5
7303echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7304 cf_have_ncuconfig=unknown
7305
7306 cf_save_CPPFLAGS="$CPPFLAGS"
7307 cf_save_LIBS="$LIBS"
7308
7309 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7310
7311cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7312# Filter out duplicates - this happens with badly-designed ".pc" files...
7313for cf_add_1lib in $LIBS
7314do
7315 for cf_add_2lib in $cf_add_libs
7316 do
7317 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7318 then
7319 cf_add_1lib=
7320 break
7321 fi
7322 done
7323 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7324done
7325LIBS="$cf_add_libs"
7326
7327 cat >conftest.$ac_ext <<_ACEOF
7328#line 7328 "configure"
7329#include "confdefs.h"
7330#include <${cf_cv_ncurses_header:-curses.h}>
7331int
7332main ()
7333{
7334initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7335 ;
7336 return 0;
7337}
7338_ACEOF
7339rm -f conftest.$ac_objext conftest$ac_exeext
7340if { (eval echo "$as_me:7340: \"$ac_link\"") >&5
7341 (eval $ac_link) 2>&5
7342 ac_status=$?
7343 echo "$as_me:7343: \$? = $ac_status" >&5
7344 (exit $ac_status); } &&
7345 { ac_try='test -s conftest$ac_exeext'
7346 { (eval echo "$as_me:7346: \"$ac_try\"") >&5
7347 (eval $ac_try) 2>&5
7348 ac_status=$?
7349 echo "$as_me:7349: \$? = $ac_status" >&5
7350 (exit $ac_status); }; }; then
7351 if test "$cross_compiling" = yes; then
7352 cf_have_ncuconfig=maybe
7353else
7354 cat >conftest.$ac_ext <<_ACEOF
7355#line 7355 "configure"
7356#include "confdefs.h"
7357#include <${cf_cv_ncurses_header:-curses.h}>
7358 int main(void)
7359 { char *xx = curses_version(); return (xx == 0); }
7360_ACEOF
7361rm -f conftest$ac_exeext
7362if { (eval echo "$as_me:7362: \"$ac_link\"") >&5
7363 (eval $ac_link) 2>&5
7364 ac_status=$?
7365 echo "$as_me:7365: \$? = $ac_status" >&5
7366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7367 { (eval echo "$as_me:7367: \"$ac_try\"") >&5
7368 (eval $ac_try) 2>&5
7369 ac_status=$?
7370 echo "$as_me:7370: \$? = $ac_status" >&5
7371 (exit $ac_status); }; }; then
7372 cf_have_ncuconfig=yes
7373else
7374 echo "$as_me: program exited with status $ac_status" >&5
7375echo "$as_me: failed program was:" >&5
7376cat conftest.$ac_ext >&5
7377cf_have_ncuconfig=no
7378fi
7379rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7380fi
7381else
7382 echo "$as_me: failed program was:" >&5
7383cat conftest.$ac_ext >&5
7384cf_have_ncuconfig=no
7385fi
7386rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7387 echo "$as_me:7387: result: $cf_have_ncuconfig" >&5
7388echo "${ECHO_T}$cf_have_ncuconfig" >&6
7389 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7390 if test "$cf_have_ncuconfig" != "yes"
7391 then
7392 CPPFLAGS="$cf_save_CPPFLAGS"
7393 LIBS="$cf_save_LIBS"
7394 NCURSES_CONFIG_PKG=none
7395 else
7396
7397cat >>confdefs.h <<\EOF
7398#define NCURSES 1
7399EOF
7400
7401 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7402 fi
7403
7404 else
7405 echo "$as_me:7405: result: no" >&5
7406echo "${ECHO_T}no" >&6
7407 NCURSES_CONFIG_PKG=none
7408 fi
7409else
7410 NCURSES_CONFIG_PKG=none
7411fi
7412
7413if test "x$cf_have_ncuconfig" = "xno"; then
7414 echo "Looking for ${cf_ncuconfig_root}-config"
7415
7416if test -n "$ac_tool_prefix"; then
7417 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7418 do
7419 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7420set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7421echo "$as_me:7421: checking for $ac_word" >&5
7422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7423if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7424 echo $ECHO_N "(cached) $ECHO_C" >&6
7425else
7426 if test -n "$NCURSES_CONFIG"; then
7427 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7428else
7429 ac_save_IFS=$IFS; IFS=$ac_path_separator
7430ac_dummy="$PATH"
7431for ac_dir in $ac_dummy; do
7432 IFS=$ac_save_IFS
7433 test -z "$ac_dir" && ac_dir=.
7434 $as_executable_p "$ac_dir/$ac_word" || continue
7435ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7436echo "$as_me:7436: found $ac_dir/$ac_word" >&5
7437break
7438done
7439
7440fi
7441fi
7442NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7443if test -n "$NCURSES_CONFIG"; then
7444 echo "$as_me:7444: result: $NCURSES_CONFIG" >&5
7445echo "${ECHO_T}$NCURSES_CONFIG" >&6
7446else
7447 echo "$as_me:7447: result: no" >&5
7448echo "${ECHO_T}no" >&6
7449fi
7450
7451 test -n "$NCURSES_CONFIG" && break
7452 done
7453fi
7454if test -z "$NCURSES_CONFIG"; then
7455 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7456 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7457do
7458 # Extract the first word of "$ac_prog", so it can be a program name with args.
7459set dummy $ac_prog; ac_word=$2
7460echo "$as_me:7460: checking for $ac_word" >&5
7461echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7462if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7463 echo $ECHO_N "(cached) $ECHO_C" >&6
7464else
7465 if test -n "$ac_ct_NCURSES_CONFIG"; then
7466 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7467else
7468 ac_save_IFS=$IFS; IFS=$ac_path_separator
7469ac_dummy="$PATH"
7470for ac_dir in $ac_dummy; do
7471 IFS=$ac_save_IFS
7472 test -z "$ac_dir" && ac_dir=.
7473 $as_executable_p "$ac_dir/$ac_word" || continue
7474ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7475echo "$as_me:7475: found $ac_dir/$ac_word" >&5
7476break
7477done
7478
7479fi
7480fi
7481ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7482if test -n "$ac_ct_NCURSES_CONFIG"; then
7483 echo "$as_me:7483: result: $ac_ct_NCURSES_CONFIG" >&5
7484echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7485else
7486 echo "$as_me:7486: result: no" >&5
7487echo "${ECHO_T}no" >&6
7488fi
7489
7490 test -n "$ac_ct_NCURSES_CONFIG" && break
7491done
7492test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7493
7494 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7495fi
7496
7497 if test "$NCURSES_CONFIG" != none ; then
7498
7499 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7500
7501cf_add_libs="`$NCURSES_CONFIG --libs`"
7502# Filter out duplicates - this happens with badly-designed ".pc" files...
7503for cf_add_1lib in $LIBS
7504do
7505 for cf_add_2lib in $cf_add_libs
7506 do
7507 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7508 then
7509 cf_add_1lib=
7510 break
7511 fi
7512 done
7513 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7514done
7515LIBS="$cf_add_libs"
7516
7517 # even with config script, some packages use no-override for curses.h
7518
7519echo "$as_me:7519: checking if we have identified curses headers" >&5
7520echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7521if test "${cf_cv_ncurses_header+set}" = set; then
7522 echo $ECHO_N "(cached) $ECHO_C" >&6
7523else
7524
7525cf_cv_ncurses_header=none
7526for cf_header in \
7527 ncurses.h ncurses/ncurses.h \
7528 curses.h ncurses/curses.h
7529do
7530cat >conftest.$ac_ext <<_ACEOF
7531#line 7531 "configure"
7532#include "confdefs.h"
7533#include <${cf_header}>
7534int
7535main ()
7536{
7537initscr(); tgoto("?", 0,0)
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
7543if { (eval echo "$as_me:7543: \"$ac_compile\"") >&5
7544 (eval $ac_compile) 2>&5
7545 ac_status=$?
7546 echo "$as_me:7546: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
7548 { ac_try='test -s conftest.$ac_objext'
7549 { (eval echo "$as_me:7549: \"$ac_try\"") >&5
7550 (eval $ac_try) 2>&5
7551 ac_status=$?
7552 echo "$as_me:7552: \$? = $ac_status" >&5
7553 (exit $ac_status); }; }; then
7554 cf_cv_ncurses_header=$cf_header; break
7555else
7556 echo "$as_me: failed program was:" >&5
7557cat conftest.$ac_ext >&5
7558fi
7559rm -f conftest.$ac_objext conftest.$ac_ext
7560done
7561
7562fi
7563echo "$as_me:7563: result: $cf_cv_ncurses_header" >&5
7564echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7565
7566if test "$cf_cv_ncurses_header" = none ; then
7567 { { echo "$as_me:7567: error: No curses header-files found" >&5
7568echo "$as_me: error: No curses header-files found" >&2;}
7569 { (exit 1); exit 1; }; }
7570fi
7571
7572# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7573
7574for ac_header in $cf_cv_ncurses_header
7575do
7576as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7577echo "$as_me:7577: checking for $ac_header" >&5
7578echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7579if eval "test \"\${$as_ac_Header+set}\" = set"; then
7580 echo $ECHO_N "(cached) $ECHO_C" >&6
7581else
7582 cat >conftest.$ac_ext <<_ACEOF
7583#line 7583 "configure"
7584#include "confdefs.h"
7585#include <$ac_header>
7586_ACEOF
7587if { (eval echo "$as_me:7587: \"$ac_cpp conftest.$ac_ext\"") >&5
7588 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7589 ac_status=$?
7590 egrep -v '^ *\+' conftest.er1 >conftest.err
7591 rm -f conftest.er1
7592 cat conftest.err >&5
7593 echo "$as_me:7593: \$? = $ac_status" >&5
7594 (exit $ac_status); } >/dev/null; then
7595 if test -s conftest.err; then
7596 ac_cpp_err=$ac_c_preproc_warn_flag
7597 else
7598 ac_cpp_err=
7599 fi
7600else
7601 ac_cpp_err=yes
7602fi
7603if test -z "$ac_cpp_err"; then
7604 eval "$as_ac_Header=yes"
7605else
7606 echo "$as_me: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 eval "$as_ac_Header=no"
7609fi
7610rm -f conftest.err conftest.$ac_ext
7611fi
7612echo "$as_me:7612: result: `eval echo '${'$as_ac_Header'}'`" >&5
7613echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7614if test `eval echo '${'$as_ac_Header'}'` = yes; then
7615 cat >>confdefs.h <<EOF
7616#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7617EOF
7618
7619fi
7620done
7621
7622cat >>confdefs.h <<\EOF
7623#define NCURSES 1
7624EOF
7625
7626cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7627
7628 cat >>confdefs.h <<EOF
7629#define $cf_nculib_ROOT 1
7630EOF
7631
7632 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7633
7634 else
7635
7636cf_ncuhdr_root=ncurses
7637
7638test -n "$cf_cv_curses_dir" && \
7639test "$cf_cv_curses_dir" != "no" && { \
7640
7641if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7642 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7643 do
7644 while test $cf_add_incdir != /usr/include
7645 do
7646 if test -d $cf_add_incdir
7647 then
7648 cf_have_incdir=no
7649 if test -n "$CFLAGS$CPPFLAGS" ; then
7650 # a loop is needed to ensure we can add subdirs of existing dirs
7651 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7652 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7653 cf_have_incdir=yes; break
7654 fi
7655 done
7656 fi
7657
7658 if test "$cf_have_incdir" = no ; then
7659 if test "$cf_add_incdir" = /usr/local/include ; then
7660 if test "$GCC" = yes
7661 then
7662 cf_save_CPPFLAGS=$CPPFLAGS
7663 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7664 cat >conftest.$ac_ext <<_ACEOF
7665#line 7665 "configure"
7666#include "confdefs.h"
7667#include <stdio.h>
7668int
7669main ()
7670{
7671printf("Hello")
7672 ;
7673 return 0;
7674}
7675_ACEOF
7676rm -f conftest.$ac_objext
7677if { (eval echo "$as_me:7677: \"$ac_compile\"") >&5
7678 (eval $ac_compile) 2>&5
7679 ac_status=$?
7680 echo "$as_me:7680: \$? = $ac_status" >&5
7681 (exit $ac_status); } &&
7682 { ac_try='test -s conftest.$ac_objext'
7683 { (eval echo "$as_me:7683: \"$ac_try\"") >&5
7684 (eval $ac_try) 2>&5
7685 ac_status=$?
7686 echo "$as_me:7686: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7688 :
7689else
7690 echo "$as_me: failed program was:" >&5
7691cat conftest.$ac_ext >&5
7692cf_have_incdir=yes
7693fi
7694rm -f conftest.$ac_objext conftest.$ac_ext
7695 CPPFLAGS=$cf_save_CPPFLAGS
7696 fi
7697 fi
7698 fi
7699
7700 if test "$cf_have_incdir" = no ; then
7701 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7702
7703echo "${as_me:-configure}:7703: testing adding $cf_add_incdir to include-path ..." 1>&5
7704
7705 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7706
7707 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7708 test "$cf_top_incdir" = "$cf_add_incdir" && break
7709 cf_add_incdir="$cf_top_incdir"
7710 else
7711 break
7712 fi
7713 else
7714 break
7715 fi
7716 done
7717 done
7718fi
7719
7720}
7721
7722echo "$as_me:7722: checking for $cf_ncuhdr_root header in include-path" >&5
7723echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7724if test "${cf_cv_ncurses_h+set}" = set; then
7725 echo $ECHO_N "(cached) $ECHO_C" >&6
7726else
7727
7728 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7729 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7730 for cf_header in $cf_header_list
7731 do
7732
7733 cat >conftest.$ac_ext <<_ACEOF
7734#line 7734 "configure"
7735#include "confdefs.h"
7736
7737#include <$cf_header>
7738int
7739main ()
7740{
7741
7742#ifdef NCURSES_VERSION
7743
7744printf("%s\n", NCURSES_VERSION);
7745#else
7746#ifdef __NCURSES_H
7747printf("old\n");
7748#else
7749 make an error
7750#endif
7751#endif
7752
7753 ;
7754 return 0;
7755}
7756_ACEOF
7757rm -f conftest.$ac_objext
7758if { (eval echo "$as_me:7758: \"$ac_compile\"") >&5
7759 (eval $ac_compile) 2>&5
7760 ac_status=$?
7761 echo "$as_me:7761: \$? = $ac_status" >&5
7762 (exit $ac_status); } &&
7763 { ac_try='test -s conftest.$ac_objext'
7764 { (eval echo "$as_me:7764: \"$ac_try\"") >&5
7765 (eval $ac_try) 2>&5
7766 ac_status=$?
7767 echo "$as_me:7767: \$? = $ac_status" >&5
7768 (exit $ac_status); }; }; then
7769 cf_cv_ncurses_h=$cf_header
7770
7771else
7772 echo "$as_me: failed program was:" >&5
7773cat conftest.$ac_ext >&5
7774cf_cv_ncurses_h=no
7775fi
7776rm -f conftest.$ac_objext conftest.$ac_ext
7777
7778 test "$cf_cv_ncurses_h" != no && break
7779 done
7780
7781fi
7782echo "$as_me:7782: result: $cf_cv_ncurses_h" >&5
7783echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7784
7785if test "$cf_cv_ncurses_h" != no ; then
7786 cf_cv_ncurses_header=$cf_cv_ncurses_h
7787else
7788
7789echo "$as_me:7789: checking for $cf_ncuhdr_root include-path" >&5
7790echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7791if test "${cf_cv_ncurses_h2+set}" = set; then
7792 echo $ECHO_N "(cached) $ECHO_C" >&6
7793else
7794
7795 test -n "$verbose" && echo
7796
7797cf_search=
7798
7799# collect the current set of include-directories from compiler flags
7800cf_header_path_list=""
7801if test -n "${CFLAGS}${CPPFLAGS}" ; then
7802 for cf_header_path in $CPPFLAGS $CFLAGS
7803 do
7804 case $cf_header_path in
7805 (-I*)
7806 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7807
7808test "x$cf_header_path" != "xNONE" && \
7809test -d "$cf_header_path" && \
7810 {
7811 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7812 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7813 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7814 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7815 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7816 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7817}
7818
7819 cf_header_path_list="$cf_header_path_list $cf_search"
7820 ;;
7821 esac
7822 done
7823fi
7824
7825# add the variations for the package we are looking for
7826
7827cf_search=
7828
7829test "x$prefix" != "xNONE" && \
7830test -d "$prefix" && \
7831 {
7832 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7833 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7834 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7835 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7836 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7837 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7838}
7839
7840for cf_subdir_prefix in \
7841 /usr \
7842 /usr/local \
7843 /usr/pkg \
7844 /opt \
7845 /opt/local \
7846 $HOME
7847do
7848
7849test "x$cf_subdir_prefix" != "x$prefix" && \
7850test -d "$cf_subdir_prefix" && \
7851(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7852 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7853 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7854 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7855 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7856 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7857 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7858}
7859
7860done
7861
7862test "$includedir" != NONE && \
7863test "$includedir" != "/usr/include" && \
7864test -d "$includedir" && {
7865 test -d $includedir && cf_search="$cf_search $includedir"
7866 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7867}
7868
7869test "$oldincludedir" != NONE && \
7870test "$oldincludedir" != "/usr/include" && \
7871test -d "$oldincludedir" && {
7872 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7873 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7874}
7875
7876cf_search="$cf_search $cf_header_path_list"
7877
7878 test -n "$verbose" && echo search path $cf_search
7879 cf_save2_CPPFLAGS="$CPPFLAGS"
7880 for cf_incdir in $cf_search
7881 do
7882
7883if test -n "$cf_incdir" ; then
7884 for cf_add_incdir in $cf_incdir
7885 do
7886 while test $cf_add_incdir != /usr/include
7887 do
7888 if test -d $cf_add_incdir
7889 then
7890 cf_have_incdir=no
7891 if test -n "$CFLAGS$CPPFLAGS" ; then
7892 # a loop is needed to ensure we can add subdirs of existing dirs
7893 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7894 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7895 cf_have_incdir=yes; break
7896 fi
7897 done
7898 fi
7899
7900 if test "$cf_have_incdir" = no ; then
7901 if test "$cf_add_incdir" = /usr/local/include ; then
7902 if test "$GCC" = yes
7903 then
7904 cf_save_CPPFLAGS=$CPPFLAGS
7905 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7906 cat >conftest.$ac_ext <<_ACEOF
7907#line 7907 "configure"
7908#include "confdefs.h"
7909#include <stdio.h>
7910int
7911main ()
7912{
7913printf("Hello")
7914 ;
7915 return 0;
7916}
7917_ACEOF
7918rm -f conftest.$ac_objext
7919if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
7920 (eval $ac_compile) 2>&5
7921 ac_status=$?
7922 echo "$as_me:7922: \$? = $ac_status" >&5
7923 (exit $ac_status); } &&
7924 { ac_try='test -s conftest.$ac_objext'
7925 { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926 (eval $ac_try) 2>&5
7927 ac_status=$?
7928 echo "$as_me:7928: \$? = $ac_status" >&5
7929 (exit $ac_status); }; }; then
7930 :
7931else
7932 echo "$as_me: failed program was:" >&5
7933cat conftest.$ac_ext >&5
7934cf_have_incdir=yes
7935fi
7936rm -f conftest.$ac_objext conftest.$ac_ext
7937 CPPFLAGS=$cf_save_CPPFLAGS
7938 fi
7939 fi
7940 fi
7941
7942 if test "$cf_have_incdir" = no ; then
7943 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7944
7945echo "${as_me:-configure}:7945: testing adding $cf_add_incdir to include-path ..." 1>&5
7946
7947 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7948
7949 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7950 test "$cf_top_incdir" = "$cf_add_incdir" && break
7951 cf_add_incdir="$cf_top_incdir"
7952 else
7953 break
7954 fi
7955 else
7956 break
7957 fi
7958 done
7959 done
7960fi
7961
7962 for cf_header in \
7963 ncurses.h \
7964 curses.h
7965 do
7966
7967 cat >conftest.$ac_ext <<_ACEOF
7968#line 7968 "configure"
7969#include "confdefs.h"
7970
7971#include <$cf_header>
7972int
7973main ()
7974{
7975
7976#ifdef NCURSES_VERSION
7977
7978printf("%s\n", NCURSES_VERSION);
7979#else
7980#ifdef __NCURSES_H
7981printf("old\n");
7982#else
7983 make an error
7984#endif
7985#endif
7986
7987 ;
7988 return 0;
7989}
7990_ACEOF
7991rm -f conftest.$ac_objext
7992if { (eval echo "$as_me:7992: \"$ac_compile\"") >&5
7993 (eval $ac_compile) 2>&5
7994 ac_status=$?
7995 echo "$as_me:7995: \$? = $ac_status" >&5
7996 (exit $ac_status); } &&
7997 { ac_try='test -s conftest.$ac_objext'
7998 { (eval echo "$as_me:7998: \"$ac_try\"") >&5
7999 (eval $ac_try) 2>&5
8000 ac_status=$?
8001 echo "$as_me:8001: \$? = $ac_status" >&5
8002 (exit $ac_status); }; }; then
8003 cf_cv_ncurses_h2=$cf_header
8004
8005else
8006 echo "$as_me: failed program was:" >&5
8007cat conftest.$ac_ext >&5
8008cf_cv_ncurses_h2=no
8009fi
8010rm -f conftest.$ac_objext conftest.$ac_ext
8011
8012 if test "$cf_cv_ncurses_h2" != no ; then
8013 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8014 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8015 break
8016 fi
8017 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8018 done
8019 CPPFLAGS="$cf_save2_CPPFLAGS"
8020 test "$cf_cv_ncurses_h2" != no && break
8021 done
8022 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8022: error: not found" >&5
8023echo "$as_me: error: not found" >&2;}
8024 { (exit 1); exit 1; }; }
8025
8026fi
8027echo "$as_me:8027: result: $cf_cv_ncurses_h2" >&5
8028echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8029
8030 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8031 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8032 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8033 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8034 fi
8035
8036if test -n "$cf_1st_incdir" ; then
8037 for cf_add_incdir in $cf_1st_incdir
8038 do
8039 while test $cf_add_incdir != /usr/include
8040 do
8041 if test -d $cf_add_incdir
8042 then
8043 cf_have_incdir=no
8044 if test -n "$CFLAGS$CPPFLAGS" ; then
8045 # a loop is needed to ensure we can add subdirs of existing dirs
8046 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8047 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8048 cf_have_incdir=yes; break
8049 fi
8050 done
8051 fi
8052
8053 if test "$cf_have_incdir" = no ; then
8054 if test "$cf_add_incdir" = /usr/local/include ; then
8055 if test "$GCC" = yes
8056 then
8057 cf_save_CPPFLAGS=$CPPFLAGS
8058 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8059 cat >conftest.$ac_ext <<_ACEOF
8060#line 8060 "configure"
8061#include "confdefs.h"
8062#include <stdio.h>
8063int
8064main ()
8065{
8066printf("Hello")
8067 ;
8068 return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext
8072if { (eval echo "$as_me:8072: \"$ac_compile\"") >&5
8073 (eval $ac_compile) 2>&5
8074 ac_status=$?
8075 echo "$as_me:8075: \$? = $ac_status" >&5
8076 (exit $ac_status); } &&
8077 { ac_try='test -s conftest.$ac_objext'
8078 { (eval echo "$as_me:8078: \"$ac_try\"") >&5
8079 (eval $ac_try) 2>&5
8080 ac_status=$?
8081 echo "$as_me:8081: \$? = $ac_status" >&5
8082 (exit $ac_status); }; }; then
8083 :
8084else
8085 echo "$as_me: failed program was:" >&5
8086cat conftest.$ac_ext >&5
8087cf_have_incdir=yes
8088fi
8089rm -f conftest.$ac_objext conftest.$ac_ext
8090 CPPFLAGS=$cf_save_CPPFLAGS
8091 fi
8092 fi
8093 fi
8094
8095 if test "$cf_have_incdir" = no ; then
8096 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8097
8098echo "${as_me:-configure}:8098: testing adding $cf_add_incdir to include-path ..." 1>&5
8099
8100 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8101
8102 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8103 test "$cf_top_incdir" = "$cf_add_incdir" && break
8104 cf_add_incdir="$cf_top_incdir"
8105 else
8106 break
8107 fi
8108 else
8109 break
8110 fi
8111 done
8112 done
8113fi
8114
8115fi
8116
8117# Set definitions to allow ifdef'ing for ncurses.h
8118
8119case $cf_cv_ncurses_header in
8120(*ncurses.h)
8121
8122cat >>confdefs.h <<\EOF
8123#define HAVE_NCURSES_H 1
8124EOF
8125
8126 ;;
8127esac
8128
8129case $cf_cv_ncurses_header in
8130(ncurses/curses.h|ncurses/ncurses.h)
8131
8132cat >>confdefs.h <<\EOF
8133#define HAVE_NCURSES_NCURSES_H 1
8134EOF
8135
8136 ;;
8137(ncursesw/curses.h|ncursesw/ncurses.h)
8138
8139cat >>confdefs.h <<\EOF
8140#define HAVE_NCURSESW_NCURSES_H 1
8141EOF
8142
8143 ;;
8144esac
8145
8146echo "$as_me:8146: checking for terminfo header" >&5
8147echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8148if test "${cf_cv_term_header+set}" = set; then
8149 echo $ECHO_N "(cached) $ECHO_C" >&6
8150else
8151
8152case ${cf_cv_ncurses_header} in
8153(*/ncurses.h|*/ncursesw.h)
8154 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8155 ;;
8156(*)
8157 cf_term_header=term.h
8158 ;;
8159esac
8160
8161for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8162do
8163cat >conftest.$ac_ext <<_ACEOF
8164#line 8164 "configure"
8165#include "confdefs.h"
8166#include <stdio.h>
8167#include <${cf_cv_ncurses_header:-curses.h}>
8168#include <$cf_test>
8169
8170int
8171main ()
8172{
8173int x = auto_left_margin
8174 ;
8175 return 0;
8176}
8177_ACEOF
8178rm -f conftest.$ac_objext
8179if { (eval echo "$as_me:8179: \"$ac_compile\"") >&5
8180 (eval $ac_compile) 2>&5
8181 ac_status=$?
8182 echo "$as_me:8182: \$? = $ac_status" >&5
8183 (exit $ac_status); } &&
8184 { ac_try='test -s conftest.$ac_objext'
8185 { (eval echo "$as_me:8185: \"$ac_try\"") >&5
8186 (eval $ac_try) 2>&5
8187 ac_status=$?
8188 echo "$as_me:8188: \$? = $ac_status" >&5
8189 (exit $ac_status); }; }; then
8190
8191 cf_cv_term_header="$cf_test"
8192else
8193 echo "$as_me: failed program was:" >&5
8194cat conftest.$ac_ext >&5
8195
8196 cf_cv_term_header=unknown
8197
8198fi
8199rm -f conftest.$ac_objext conftest.$ac_ext
8200 test "$cf_cv_term_header" != unknown && break
8201done
8202
8203fi
8204echo "$as_me:8204: result: $cf_cv_term_header" >&5
8205echo "${ECHO_T}$cf_cv_term_header" >&6
8206
8207# Set definitions to allow ifdef'ing to accommodate subdirectories
8208
8209case $cf_cv_term_header in
8210(*term.h)
8211
8212cat >>confdefs.h <<\EOF
8213#define HAVE_TERM_H 1
8214EOF
8215
8216 ;;
8217esac
8218
8219case $cf_cv_term_header in
8220(ncurses/term.h)
8221
8222cat >>confdefs.h <<\EOF
8223#define HAVE_NCURSES_TERM_H 1
8224EOF
8225
8226 ;;
8227(ncursesw/term.h)
8228
8229cat >>confdefs.h <<\EOF
8230#define HAVE_NCURSESW_TERM_H 1
8231EOF
8232
8233 ;;
8234esac
8235
8236# some applications need this, but should check for NCURSES_VERSION
8237
8238cat >>confdefs.h <<\EOF
8239#define NCURSES 1
8240EOF
8241
8242echo "$as_me:8242: checking for ncurses version" >&5
8243echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8244if test "${cf_cv_ncurses_version+set}" = set; then
8245 echo $ECHO_N "(cached) $ECHO_C" >&6
8246else
8247
8248 cf_cv_ncurses_version=no
8249 cf_tempfile=out$$
8250 rm -f $cf_tempfile
8251 if test "$cross_compiling" = yes; then
8252
8253 # This will not work if the preprocessor splits the line after the
8254 # Autoconf token. The 'unproto' program does that.
8255 cat > conftest.$ac_ext <<EOF
8256#include <${cf_cv_ncurses_header:-curses.h}>
8257#undef Autoconf
8258#ifdef NCURSES_VERSION
8259Autoconf NCURSES_VERSION
8260#else
8261#ifdef __NCURSES_H
8262Autoconf "old"
8263#endif
8264;
8265#endif
8266EOF
8267 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8268 { (eval echo "$as_me:8268: \"$cf_try\"") >&5
8269 (eval $cf_try) 2>&5
8270 ac_status=$?
8271 echo "$as_me:8271: \$? = $ac_status" >&5
8272 (exit $ac_status); }
8273 if test -f conftest.out ; then
8274 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8275 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8276 rm -f conftest.out
8277 fi
8278
8279else
8280 cat >conftest.$ac_ext <<_ACEOF
8281#line 8281 "configure"
8282#include "confdefs.h"
8283
8284#include <${cf_cv_ncurses_header:-curses.h}>
8285#include <stdio.h>
8286int main()
8287{
8288 FILE *fp = fopen("$cf_tempfile", "w");
8289#ifdef NCURSES_VERSION
8290# ifdef NCURSES_VERSION_PATCH
8291 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8292# else
8293 fprintf(fp, "%s\n", NCURSES_VERSION);
8294# endif
8295#else
8296# ifdef __NCURSES_H
8297 fprintf(fp, "old\n");
8298# else
8299 make an error
8300# endif
8301#endif
8302 ${cf_cv_main_return:-return}(0);
8303}
8304_ACEOF
8305rm -f conftest$ac_exeext
8306if { (eval echo "$as_me:8306: \"$ac_link\"") >&5
8307 (eval $ac_link) 2>&5
8308 ac_status=$?
8309 echo "$as_me:8309: \$? = $ac_status" >&5
8310 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8311 { (eval echo "$as_me:8311: \"$ac_try\"") >&5
8312 (eval $ac_try) 2>&5
8313 ac_status=$?
8314 echo "$as_me:8314: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
8316
8317 cf_cv_ncurses_version=`cat $cf_tempfile`
8318else
8319 echo "$as_me: program exited with status $ac_status" >&5
8320echo "$as_me: failed program was:" >&5
8321cat conftest.$ac_ext >&5
8322fi
8323rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8324fi
8325 rm -f $cf_tempfile
8326
8327fi
8328echo "$as_me:8328: result: $cf_cv_ncurses_version" >&5
8329echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8330test "$cf_cv_ncurses_version" = no ||
8331cat >>confdefs.h <<\EOF
8332#define NCURSES 1
8333EOF
8334
8335cf_nculib_root=ncurses
8336 # This works, except for the special case where we find gpm, but
8337 # ncurses is in a nonstandard location via $LIBS, and we really want
8338 # to link gpm.
8339cf_ncurses_LIBS=""
8340cf_ncurses_SAVE="$LIBS"
8341echo "$as_me:8341: checking for Gpm_Open in -lgpm" >&5
8342echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8343if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8344 echo $ECHO_N "(cached) $ECHO_C" >&6
8345else
8346 ac_check_lib_save_LIBS=$LIBS
8347LIBS="-lgpm $LIBS"
8348cat >conftest.$ac_ext <<_ACEOF
8349#line 8349 "configure"
8350#include "confdefs.h"
8351
8352/* Override any gcc2 internal prototype to avoid an error. */
8353#ifdef __cplusplus
8354extern "C"
8355#endif
8356/* We use char because int might match the return type of a gcc2
8357 builtin and then its argument prototype would still apply. */
8358char Gpm_Open ();
8359int
8360main ()
8361{
8362Gpm_Open ();
8363 ;
8364 return 0;
8365}
8366_ACEOF
8367rm -f conftest.$ac_objext conftest$ac_exeext
8368if { (eval echo "$as_me:8368: \"$ac_link\"") >&5
8369 (eval $ac_link) 2>&5
8370 ac_status=$?
8371 echo "$as_me:8371: \$? = $ac_status" >&5
8372 (exit $ac_status); } &&
8373 { ac_try='test -s conftest$ac_exeext'
8374 { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:8377: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8379 ac_cv_lib_gpm_Gpm_Open=yes
8380else
8381 echo "$as_me: failed program was:" >&5
8382cat conftest.$ac_ext >&5
8383ac_cv_lib_gpm_Gpm_Open=no
8384fi
8385rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8386LIBS=$ac_check_lib_save_LIBS
8387fi
8388echo "$as_me:8388: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8389echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8390if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8391 echo "$as_me:8391: checking for initscr in -lgpm" >&5
8392echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8393if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8394 echo $ECHO_N "(cached) $ECHO_C" >&6
8395else
8396 ac_check_lib_save_LIBS=$LIBS
8397LIBS="-lgpm $LIBS"
8398cat >conftest.$ac_ext <<_ACEOF
8399#line 8399 "configure"
8400#include "confdefs.h"
8401
8402/* Override any gcc2 internal prototype to avoid an error. */
8403#ifdef __cplusplus
8404extern "C"
8405#endif
8406/* We use char because int might match the return type of a gcc2
8407 builtin and then its argument prototype would still apply. */
8408char initscr ();
8409int
8410main ()
8411{
8412initscr ();
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext conftest$ac_exeext
8418if { (eval echo "$as_me:8418: \"$ac_link\"") >&5
8419 (eval $ac_link) 2>&5
8420 ac_status=$?
8421 echo "$as_me:8421: \$? = $ac_status" >&5
8422 (exit $ac_status); } &&
8423 { ac_try='test -s conftest$ac_exeext'
8424 { (eval echo "$as_me:8424: \"$ac_try\"") >&5
8425 (eval $ac_try) 2>&5
8426 ac_status=$?
8427 echo "$as_me:8427: \$? = $ac_status" >&5
8428 (exit $ac_status); }; }; then
8429 ac_cv_lib_gpm_initscr=yes
8430else
8431 echo "$as_me: failed program was:" >&5
8432cat conftest.$ac_ext >&5
8433ac_cv_lib_gpm_initscr=no
8434fi
8435rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8436LIBS=$ac_check_lib_save_LIBS
8437fi
8438echo "$as_me:8438: result: $ac_cv_lib_gpm_initscr" >&5
8439echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8440if test $ac_cv_lib_gpm_initscr = yes; then
8441 LIBS="$cf_ncurses_SAVE"
8442else
8443 cf_ncurses_LIBS="-lgpm"
8444fi
8445
8446fi
8447
8448case $host_os in
8449(freebsd*)
8450 # This is only necessary if you are linking against an obsolete
8451 # version of ncurses (but it should do no harm, since it's static).
8452 if test "$cf_nculib_root" = ncurses ; then
8453 echo "$as_me:8453: checking for tgoto in -lmytinfo" >&5
8454echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8455if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8456 echo $ECHO_N "(cached) $ECHO_C" >&6
8457else
8458 ac_check_lib_save_LIBS=$LIBS
8459LIBS="-lmytinfo $LIBS"
8460cat >conftest.$ac_ext <<_ACEOF
8461#line 8461 "configure"
8462#include "confdefs.h"
8463
8464/* Override any gcc2 internal prototype to avoid an error. */
8465#ifdef __cplusplus
8466extern "C"
8467#endif
8468/* We use char because int might match the return type of a gcc2
8469 builtin and then its argument prototype would still apply. */
8470char tgoto ();
8471int
8472main ()
8473{
8474tgoto ();
8475 ;
8476 return 0;
8477}
8478_ACEOF
8479rm -f conftest.$ac_objext conftest$ac_exeext
8480if { (eval echo "$as_me:8480: \"$ac_link\"") >&5
8481 (eval $ac_link) 2>&5
8482 ac_status=$?
8483 echo "$as_me:8483: \$? = $ac_status" >&5
8484 (exit $ac_status); } &&
8485 { ac_try='test -s conftest$ac_exeext'
8486 { (eval echo "$as_me:8486: \"$ac_try\"") >&5
8487 (eval $ac_try) 2>&5
8488 ac_status=$?
8489 echo "$as_me:8489: \$? = $ac_status" >&5
8490 (exit $ac_status); }; }; then
8491 ac_cv_lib_mytinfo_tgoto=yes
8492else
8493 echo "$as_me: failed program was:" >&5
8494cat conftest.$ac_ext >&5
8495ac_cv_lib_mytinfo_tgoto=no
8496fi
8497rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8498LIBS=$ac_check_lib_save_LIBS
8499fi
8500echo "$as_me:8500: result: $ac_cv_lib_mytinfo_tgoto" >&5
8501echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8502if test $ac_cv_lib_mytinfo_tgoto = yes; then
8503 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8504fi
8505
8506 fi
8507 ;;
8508esac
8509
8510cf_add_libs="$cf_ncurses_LIBS"
8511# Filter out duplicates - this happens with badly-designed ".pc" files...
8512for cf_add_1lib in $LIBS
8513do
8514 for cf_add_2lib in $cf_add_libs
8515 do
8516 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8517 then
8518 cf_add_1lib=
8519 break
8520 fi
8521 done
8522 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8523done
8524LIBS="$cf_add_libs"
8525
8526if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8527then
8528
8529cf_add_libs="-l$cf_nculib_root"
8530# Filter out duplicates - this happens with badly-designed ".pc" files...
8531for cf_add_1lib in $LIBS
8532do
8533 for cf_add_2lib in $cf_add_libs
8534 do
8535 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8536 then
8537 cf_add_1lib=
8538 break
8539 fi
8540 done
8541 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8542done
8543LIBS="$cf_add_libs"
8544
8545else
8546
8547 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8548 cf_libdir=""
8549 echo "$as_me:8549: checking for initscr" >&5
8550echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8551if test "${ac_cv_func_initscr+set}" = set; then
8552 echo $ECHO_N "(cached) $ECHO_C" >&6
8553else
8554 cat >conftest.$ac_ext <<_ACEOF
8555#line 8555 "configure"
8556#include "confdefs.h"
8557/* System header to define __stub macros and hopefully few prototypes,
8558 which can conflict with char initscr (); below. */
8559#include <assert.h>
8560/* Override any gcc2 internal prototype to avoid an error. */
8561#ifdef __cplusplus
8562extern "C"
8563#endif
8564/* We use char because int might match the return type of a gcc2
8565 builtin and then its argument prototype would still apply. */
8566char initscr ();
8567char (*f) ();
8568
8569int
8570main ()
8571{
8572/* The GNU C library defines this for functions which it implements
8573 to always fail with ENOSYS. Some functions are actually named
8574 something starting with __ and the normal name is an alias. */
8575#if defined (__stub_initscr) || defined (__stub___initscr)
8576choke me
8577#else
8578f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8579#endif
8580
8581 ;
8582 return 0;
8583}
8584_ACEOF
8585rm -f conftest.$ac_objext conftest$ac_exeext
8586if { (eval echo "$as_me:8586: \"$ac_link\"") >&5
8587 (eval $ac_link) 2>&5
8588 ac_status=$?
8589 echo "$as_me:8589: \$? = $ac_status" >&5
8590 (exit $ac_status); } &&
8591 { ac_try='test -s conftest$ac_exeext'
8592 { (eval echo "$as_me:8592: \"$ac_try\"") >&5
8593 (eval $ac_try) 2>&5
8594 ac_status=$?
8595 echo "$as_me:8595: \$? = $ac_status" >&5
8596 (exit $ac_status); }; }; then
8597 ac_cv_func_initscr=yes
8598else
8599 echo "$as_me: failed program was:" >&5
8600cat conftest.$ac_ext >&5
8601ac_cv_func_initscr=no
8602fi
8603rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8604fi
8605echo "$as_me:8605: result: $ac_cv_func_initscr" >&5
8606echo "${ECHO_T}$ac_cv_func_initscr" >&6
8607if test $ac_cv_func_initscr = yes; then
8608 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8609else
8610
8611 cf_save_LIBS="$LIBS"
8612 echo "$as_me:8612: checking for initscr in -l$cf_nculib_root" >&5
8613echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8614 LIBS="-l$cf_nculib_root $LIBS"
8615 cat >conftest.$ac_ext <<_ACEOF
8616#line 8616 "configure"
8617#include "confdefs.h"
8618#include <${cf_cv_ncurses_header:-curses.h}>
8619int
8620main ()
8621{
8622initscr()
8623 ;
8624 return 0;
8625}
8626_ACEOF
8627rm -f conftest.$ac_objext conftest$ac_exeext
8628if { (eval echo "$as_me:8628: \"$ac_link\"") >&5
8629 (eval $ac_link) 2>&5
8630 ac_status=$?
8631 echo "$as_me:8631: \$? = $ac_status" >&5
8632 (exit $ac_status); } &&
8633 { ac_try='test -s conftest$ac_exeext'
8634 { (eval echo "$as_me:8634: \"$ac_try\"") >&5
8635 (eval $ac_try) 2>&5
8636 ac_status=$?
8637 echo "$as_me:8637: \$? = $ac_status" >&5
8638 (exit $ac_status); }; }; then
8639 echo "$as_me:8639: result: yes" >&5
8640echo "${ECHO_T}yes" >&6
8641 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8642
8643else
8644 echo "$as_me: failed program was:" >&5
8645cat conftest.$ac_ext >&5
8646echo "$as_me:8646: result: no" >&5
8647echo "${ECHO_T}no" >&6
8648
8649cf_search=
8650cf_library_path_list=""
8651if test -n "${LDFLAGS}${LIBS}" ; then
8652 for cf_library_path in $LDFLAGS $LIBS
8653 do
8654 case $cf_library_path in
8655 (-L*)
8656 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8657
8658test "x$cf_library_path" != "xNONE" && \
8659test -d "$cf_library_path" && \
8660 {
8661 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8662 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8663 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8664 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8665 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8666 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
8667}
8668
8669 cf_library_path_list="$cf_library_path_list $cf_search"
8670 ;;
8671 esac
8672 done
8673fi
8674
8675cf_search=
8676
8677test "x$prefix" != "xNONE" && \
8678test -d "$prefix" && \
8679 {
8680 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8681 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8682 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8683 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8684 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8685 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8686}
8687
8688for cf_subdir_prefix in \
8689 /usr \
8690 /usr/local \
8691 /usr/pkg \
8692 /opt \
8693 /opt/local \
8694 $HOME
8695do
8696
8697test "x$cf_subdir_prefix" != "x$prefix" && \
8698test -d "$cf_subdir_prefix" && \
8699(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8700 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8701 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8702 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8703 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8704 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8705 test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
8706}
8707
8708done
8709
8710cf_search="$cf_library_path_list $cf_search"
8711
8712 for cf_libdir in $cf_search
8713 do
8714 echo "$as_me:8714: checking for -l$cf_nculib_root in $cf_libdir" >&5
8715echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8716 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8717 cat >conftest.$ac_ext <<_ACEOF
8718#line 8718 "configure"
8719#include "confdefs.h"
8720#include <${cf_cv_ncurses_header:-curses.h}>
8721int
8722main ()
8723{
8724initscr()
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext conftest$ac_exeext
8730if { (eval echo "$as_me:8730: \"$ac_link\"") >&5
8731 (eval $ac_link) 2>&5
8732 ac_status=$?
8733 echo "$as_me:8733: \$? = $ac_status" >&5
8734 (exit $ac_status); } &&
8735 { ac_try='test -s conftest$ac_exeext'
8736 { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8737 (eval $ac_try) 2>&5
8738 ac_status=$?
8739 echo "$as_me:8739: \$? = $ac_status" >&5
8740 (exit $ac_status); }; }; then
8741 echo "$as_me:8741: result: yes" >&5
8742echo "${ECHO_T}yes" >&6
8743 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8744 break
8745else
8746 echo "$as_me: failed program was:" >&5
8747cat conftest.$ac_ext >&5
8748echo "$as_me:8748: result: no" >&5
8749echo "${ECHO_T}no" >&6
8750 LIBS="$cf_save_LIBS"
8751fi
8752rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8753 done
8754
8755fi
8756rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8757
8758fi
8759
8760eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8761
8762if test $cf_found_library = no ; then
8763 { { echo "$as_me:8763: error: Cannot link $cf_nculib_root library" >&5
8764echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8765 { (exit 1); exit 1; }; }
8766fi
8767
8768fi
8769
8770if test -n "$cf_ncurses_LIBS" ; then
8771 echo "$as_me:8771: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8772echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8773 cf_ncurses_SAVE="$LIBS"
8774 for p in $cf_ncurses_LIBS ; do
8775 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8776 if test "$q" != "$LIBS" ; then
8777 LIBS="$q"
8778 fi
8779 done
8780 cat >conftest.$ac_ext <<_ACEOF
8781#line 8781 "configure"
8782#include "confdefs.h"
8783#include <${cf_cv_ncurses_header:-curses.h}>
8784int
8785main ()
8786{
8787initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8788 ;
8789 return 0;
8790}
8791_ACEOF
8792rm -f conftest.$ac_objext conftest$ac_exeext
8793if { (eval echo "$as_me:8793: \"$ac_link\"") >&5
8794 (eval $ac_link) 2>&5
8795 ac_status=$?
8796 echo "$as_me:8796: \$? = $ac_status" >&5
8797 (exit $ac_status); } &&
8798 { ac_try='test -s conftest$ac_exeext'
8799 { (eval echo "$as_me:8799: \"$ac_try\"") >&5
8800 (eval $ac_try) 2>&5
8801 ac_status=$?
8802 echo "$as_me:8802: \$? = $ac_status" >&5
8803 (exit $ac_status); }; }; then
8804 echo "$as_me:8804: result: yes" >&5
8805echo "${ECHO_T}yes" >&6
8806else
8807 echo "$as_me: failed program was:" >&5
8808cat conftest.$ac_ext >&5
8809echo "$as_me:8809: result: no" >&5
8810echo "${ECHO_T}no" >&6
8811 LIBS="$cf_ncurses_SAVE"
8812fi
8813rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8814fi
8815
8816cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8817
8818cat >>confdefs.h <<EOF
8819#define $cf_nculib_ROOT 1
8820EOF
8821
8822 fi
8823else
8824 NCURSES_CONFIG=none
8825fi
8826
8827fi
8828
8829if test "$NCURSES_CONFIG_PKG" != none ; then
8830 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
8831
8832 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8833 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8834 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8835
8836 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
8837 if test -z "$cf_cv_abi_version"
8838 then
8839 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
8840 fi
8841
8842elif test "$NCURSES_CONFIG" != none ; then
8843
8844 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
8845
8846 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8847 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8848 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8849
8850 # ABI version is not available from headers
8851 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
8852
8853else
8854
8855 for cf_name in MAJOR MINOR PATCH
8856 do
8857 cat >conftest.$ac_ext <<CF_EOF
8858 #include <${cf_cv_ncurses_header:-curses.h}>
8859 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
8860CF_EOF
8861 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
8862 { (eval echo "$as_me:8862: \"$cf_try\"") >&5
8863 (eval $cf_try) 2>&5
8864 ac_status=$?
8865 echo "$as_me:8865: \$? = $ac_status" >&5
8866 (exit $ac_status); }
8867 if test -f conftest.out ; then
8868 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
8869 eval NCURSES_$cf_name=\"$cf_result\"
8870 # cat conftest.$ac_ext
8871 # cat conftest.out
8872 fi
8873 done
8874
8875 cf_cv_abi_version=${NCURSES_MAJOR}
8876
8877fi
8878
8879cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
8880
8881cf_cv_timestamp=`date`
8882
8883echo "$as_me:8883: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
8884echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
8885
8886echo "$as_me:8886: checking if you want to have a library-prefix" >&5
8887echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
8888
8889# Check whether --with-lib-prefix or --without-lib-prefix was given.
8890if test "${with_lib_prefix+set}" = set; then
8891 withval="$with_lib_prefix"
8892 with_lib_prefix=$withval
8893else
8894 with_lib_prefix=auto
8895fi;
8896echo "$as_me:8896: result: $with_lib_prefix" >&5
8897echo "${ECHO_T}$with_lib_prefix" >&6
8898
8899if test $with_lib_prefix = auto
8900then
8901
8902 case $cf_cv_system_name in
8903 (OS/2*|os2*)
8904 LIB_PREFIX=''
8905 ;;
8906 (*) LIB_PREFIX='lib'
8907 ;;
8908 esac
8909cf_prefix=$LIB_PREFIX
8910
8911elif test $with_lib_prefix = no
8912then
8913 LIB_PREFIX=
8914else
8915 LIB_PREFIX=$with_lib_prefix
8916fi
8917
8918LIB_SUFFIX=
8919
8920###############################################################################
8921
8922if test X"$CC_G_OPT" = X"" ; then
8923 CC_G_OPT='-g'
8924 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
8925fi
8926
8927echo "$as_me:8927: checking for default loader flags" >&5
8928echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
8929case $DFT_LWR_MODEL in
8930(normal) LD_MODEL='' ;;
8931(debug) LD_MODEL=$CC_G_OPT ;;
8932(profile) LD_MODEL='-pg';;
8933(shared) LD_MODEL='' ;;
8934esac
8935echo "$as_me:8935: result: $LD_MODEL" >&5
8936echo "${ECHO_T}$LD_MODEL" >&6
8937
8938LD_RPATH_OPT=
8939echo "$as_me:8939: checking for an rpath option" >&5
8940echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
8941case $cf_cv_system_name in
8942(irix*)
8943 if test "$GCC" = yes; then
8944 LD_RPATH_OPT="-Wl,-rpath,"
8945 else
8946 LD_RPATH_OPT="-rpath "
8947 fi
8948 ;;
8949(linux*|gnu*|k*bsd*-gnu)
8950 LD_RPATH_OPT="-Wl,-rpath,"
8951 ;;
8952(openbsd[2-9].*|mirbsd*)
8953 LD_RPATH_OPT="-Wl,-rpath,"
8954 ;;
8955(dragonfly*|freebsd*)
8956 LD_RPATH_OPT="-rpath "
8957 ;;
8958(netbsd*)
8959 LD_RPATH_OPT="-Wl,-rpath,"
8960 ;;
8961(osf*|mls+*)
8962 LD_RPATH_OPT="-rpath "
8963 ;;
8964(solaris2*)
8965 LD_RPATH_OPT="-R"
8966 ;;
8967(*)
8968 ;;
8969esac
8970echo "$as_me:8970: result: $LD_RPATH_OPT" >&5
8971echo "${ECHO_T}$LD_RPATH_OPT" >&6
8972
8973case "x$LD_RPATH_OPT" in
8974(x-R*)
8975 echo "$as_me:8975: checking if we need a space after rpath option" >&5
8976echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
8977 cf_save_LIBS="$LIBS"
8978
8979cf_add_libs="${LD_RPATH_OPT}$libdir"
8980# Filter out duplicates - this happens with badly-designed ".pc" files...
8981for cf_add_1lib in $LIBS
8982do
8983 for cf_add_2lib in $cf_add_libs
8984 do
8985 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8986 then
8987 cf_add_1lib=
8988 break
8989 fi
8990 done
8991 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8992done
8993LIBS="$cf_add_libs"
8994
8995 cat >conftest.$ac_ext <<_ACEOF
8996#line 8996 "configure"
8997#include "confdefs.h"
8998
8999int
9000main ()
9001{
9002
9003 ;
9004 return 0;
9005}
9006_ACEOF
9007rm -f conftest.$ac_objext conftest$ac_exeext
9008if { (eval echo "$as_me:9008: \"$ac_link\"") >&5
9009 (eval $ac_link) 2>&5
9010 ac_status=$?
9011 echo "$as_me:9011: \$? = $ac_status" >&5
9012 (exit $ac_status); } &&
9013 { ac_try='test -s conftest$ac_exeext'
9014 { (eval echo "$as_me:9014: \"$ac_try\"") >&5
9015 (eval $ac_try) 2>&5
9016 ac_status=$?
9017 echo "$as_me:9017: \$? = $ac_status" >&5
9018 (exit $ac_status); }; }; then
9019 cf_rpath_space=no
9020else
9021 echo "$as_me: failed program was:" >&5
9022cat conftest.$ac_ext >&5
9023cf_rpath_space=yes
9024fi
9025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9026 LIBS="$cf_save_LIBS"
9027 echo "$as_me:9027: result: $cf_rpath_space" >&5
9028echo "${ECHO_T}$cf_rpath_space" >&6
9029 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9030 ;;
9031esac
9032
9033 RM_SHARED_OPTS=
9034 LOCAL_LDFLAGS=
9035 LOCAL_LDFLAGS2=
9036 LD_SHARED_OPTS=
9037 INSTALL_LIB="-m 644"
9038 : ${rel_builddir:=.}
9039
9040 shlibdir=$libdir
9041
9042 MAKE_DLLS="#"
9043
9044 cf_cv_do_symlinks=no
9045 cf_ld_rpath_opt=
9046 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9047
9048 echo "$as_me:9048: checking if release/abi version should be used for shared libs" >&5
9049echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9050
9051# Check whether --with-shlib-version or --without-shlib-version was given.
9052if test "${with_shlib_version+set}" = set; then
9053 withval="$with_shlib_version"
9054 test -z "$withval" && withval=auto
9055 case $withval in
9056 (yes)
9057 cf_cv_shlib_version=auto
9058 ;;
9059 (rel|abi|auto|no)
9060 cf_cv_shlib_version=$withval
9061 ;;
9062 (*)
9063 { { echo "$as_me:9063: error: option value must be one of: rel, abi, auto or no" >&5
9064echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
9065 { (exit 1); exit 1; }; }
9066 ;;
9067 esac
9068
9069else
9070 cf_cv_shlib_version=auto
9071fi;
9072 echo "$as_me:9072: result: $cf_cv_shlib_version" >&5
9073echo "${ECHO_T}$cf_cv_shlib_version" >&6
9074
9075 cf_cv_rm_so_locs=no
9076 cf_try_cflags=
9077
9078 # Some less-capable ports of gcc support only -fpic
9079 CC_SHARED_OPTS=
9080 if test "$GCC" = yes
9081 then
9082 echo "$as_me:9082: checking which $CC option to use" >&5
9083echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9084 cf_save_CFLAGS="$CFLAGS"
9085 for CC_SHARED_OPTS in -fPIC -fpic ''
9086 do
9087 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9088 cat >conftest.$ac_ext <<_ACEOF
9089#line 9089 "configure"
9090#include "confdefs.h"
9091#include <stdio.h>
9092int
9093main ()
9094{
9095int x = 1
9096 ;
9097 return 0;
9098}
9099_ACEOF
9100rm -f conftest.$ac_objext
9101if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
9102 (eval $ac_compile) 2>&5
9103 ac_status=$?
9104 echo "$as_me:9104: \$? = $ac_status" >&5
9105 (exit $ac_status); } &&
9106 { ac_try='test -s conftest.$ac_objext'
9107 { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108 (eval $ac_try) 2>&5
9109 ac_status=$?
9110 echo "$as_me:9110: \$? = $ac_status" >&5
9111 (exit $ac_status); }; }; then
9112 break
9113else
9114 echo "$as_me: failed program was:" >&5
9115cat conftest.$ac_ext >&5
9116fi
9117rm -f conftest.$ac_objext conftest.$ac_ext
9118 done
9119 echo "$as_me:9119: result: $CC_SHARED_OPTS" >&5
9120echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9121 CFLAGS="$cf_save_CFLAGS"
9122 fi
9123
9124 cf_cv_shlib_version_infix=no
9125
9126 case $cf_cv_system_name in
9127 (aix4.3-9*|aix[5-7]*)
9128 if test "$GCC" = yes; then
9129 CC_SHARED_OPTS='-Wl,-brtl'
9130 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9131 else
9132 CC_SHARED_OPTS='-brtl'
9133 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9134 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9135 fi
9136 ;;
9137 (beos*)
9138 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9139 ;;
9140 (cygwin*)
9141 CC_SHARED_OPTS=
9142 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9143 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9144 cf_cv_shlib_version=cygdll
9145 cf_cv_shlib_version_infix=cygdll
9146 shlibdir=$bindir
9147 MAKE_DLLS=
9148 cat >mk_shared_lib.sh <<-CF_EOF
9149 #!$SHELL
9150 SHARED_LIB=\$1
9151 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9152 shift
9153 cat <<-EOF
9154 Linking shared library
9155 ** SHARED_LIB \$SHARED_LIB
9156 ** IMPORT_LIB \$IMPORT_LIB
9157EOF
9158 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9159CF_EOF
9160 chmod +x mk_shared_lib.sh
9161 ;;
9162 (msys*)
9163 CC_SHARED_OPTS=
9164 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9165 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9166 cf_cv_shlib_version=msysdll
9167 cf_cv_shlib_version_infix=msysdll
9168 shlibdir=$bindir
9169 MAKE_DLLS=
9170 cat >mk_shared_lib.sh <<-CF_EOF
9171 #!$SHELL
9172 SHARED_LIB=\$1
9173 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9174 shift
9175 cat <<-EOF
9176 Linking shared library
9177 ** SHARED_LIB \$SHARED_LIB
9178 ** IMPORT_LIB \$IMPORT_LIB
9179EOF
9180 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9181CF_EOF
9182 chmod +x mk_shared_lib.sh
9183 ;;
9184 (darwin*)
9185 cf_try_cflags="no-cpp-precomp"
9186 CC_SHARED_OPTS="-dynamic"
9187 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9188 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9189 cf_cv_shlib_version_infix=yes
9190 echo "$as_me:9190: checking if ld -search_paths_first works" >&5
9191echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9192if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9193 echo $ECHO_N "(cached) $ECHO_C" >&6
9194else
9195
9196 cf_save_LDFLAGS=$LDFLAGS
9197 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9198 cat >conftest.$ac_ext <<_ACEOF
9199#line 9199 "configure"
9200#include "confdefs.h"
9201
9202int
9203main ()
9204{
9205int i;
9206 ;
9207 return 0;
9208}
9209_ACEOF
9210rm -f conftest.$ac_objext conftest$ac_exeext
9211if { (eval echo "$as_me:9211: \"$ac_link\"") >&5
9212 (eval $ac_link) 2>&5
9213 ac_status=$?
9214 echo "$as_me:9214: \$? = $ac_status" >&5
9215 (exit $ac_status); } &&
9216 { ac_try='test -s conftest$ac_exeext'
9217 { (eval echo "$as_me:9217: \"$ac_try\"") >&5
9218 (eval $ac_try) 2>&5
9219 ac_status=$?
9220 echo "$as_me:9220: \$? = $ac_status" >&5
9221 (exit $ac_status); }; }; then
9222 cf_cv_ldflags_search_paths_first=yes
9223else
9224 echo "$as_me: failed program was:" >&5
9225cat conftest.$ac_ext >&5
9226cf_cv_ldflags_search_paths_first=no
9227fi
9228rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9229 LDFLAGS=$cf_save_LDFLAGS
9230fi
9231echo "$as_me:9231: result: $cf_cv_ldflags_search_paths_first" >&5
9232echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9233 if test $cf_cv_ldflags_search_paths_first = yes; then
9234 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9235 fi
9236 ;;
9237 (hpux[7-8]*)
9238 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9239 if test "$GCC" != yes; then
9240 CC_SHARED_OPTS='+Z'
9241 fi
9242 MK_SHARED_LIB='${LD} -b -o $@'
9243 INSTALL_LIB="-m 555"
9244 ;;
9245 (hpux*)
9246 # (tested with gcc 2.7.2 -- I don't have c89)
9247 if test "$GCC" = yes; then
9248 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9249 else
9250 CC_SHARED_OPTS='+Z'
9251 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9252 fi
9253 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9254 # HP-UX shared libraries must be executable, and should be
9255 # readonly to exploit a quirk in the memory manager.
9256 INSTALL_LIB="-m 555"
9257 ;;
9258 (interix*)
9259 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9260 if test "$cf_cv_shlib_version" = rel; then
9261 cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
9262 else
9263 cf_shared_soname='`basename `'
9264 fi
9265 CC_SHARED_OPTS=
9266 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9267 ;;
9268 (irix*)
9269 if test "$cf_cv_enable_rpath" = yes ; then
9270 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9271 fi
9272 # tested with IRIX 5.2 and 'cc'.
9273 if test "$GCC" != yes; then
9274 CC_SHARED_OPTS='-KPIC'
9275 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9276 else
9277 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9278 fi
9279 cf_cv_rm_so_locs=yes
9280 ;;
9281 (linux*|gnu*|k*bsd*-gnu)
9282 if test "$DFT_LWR_MODEL" = "shared" ; then
9283 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9284 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9285 fi
9286 if test "$cf_cv_enable_rpath" = yes ; then
9287 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9288 fi
9289
9290 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9291 if test "$cf_cv_shlib_version" = rel; then
9292 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9293 else
9294 cf_cv_shared_soname='`basename $@`'
9295 fi
9296
9297 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9298 ;;
9299 (mingw*)
9300 cf_cv_shlib_version=mingw
9301 cf_cv_shlib_version_infix=mingw
9302 shlibdir=$bindir
9303 MAKE_DLLS=
9304 if test "$DFT_LWR_MODEL" = "shared" ; then
9305 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9306 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9307 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9308 fi
9309 CC_SHARED_OPTS=
9310 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9311 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9312 cat >mk_shared_lib.sh <<-CF_EOF
9313 #!$SHELL
9314 SHARED_LIB=\$1
9315 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9316 shift
9317 cat <<-EOF
9318 Linking shared library
9319 ** SHARED_LIB \$SHARED_LIB
9320 ** IMPORT_LIB \$IMPORT_LIB
9321EOF
9322 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9323CF_EOF
9324 chmod +x mk_shared_lib.sh
9325 ;;
9326 (openbsd[2-9].*|mirbsd*)
9327 if test "$DFT_LWR_MODEL" = "shared" ; then
9328 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9329 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9330 fi
9331 if test "$cf_cv_enable_rpath" = yes ; then
9332 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9333 fi
9334 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9335
9336 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9337 if test "$cf_cv_shlib_version" = rel; then
9338 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9339 else
9340 cf_cv_shared_soname='`basename $@`'
9341 fi
9342
9343 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9344 ;;
9345 (nto-qnx*|openbsd*|freebsd[12].*)
9346 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9347 MK_SHARED_LIB='${LD} -Bshareable -o $@'
9348 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9349 ;;
9350 (dragonfly*|freebsd*)
9351 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9352 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9353 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9354 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9355 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9356 fi
9357
9358 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9359 if test "$cf_cv_shlib_version" = rel; then
9360 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9361 else
9362 cf_cv_shared_soname='`basename $@`'
9363 fi
9364
9365 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9366 ;;
9367 (netbsd*)
9368 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9369 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9370 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9371 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9372 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9373 if test "$cf_cv_shlib_version" = auto; then
9374 if test -f /usr/libexec/ld.elf_so; then
9375 cf_cv_shlib_version=abi
9376 else
9377 cf_cv_shlib_version=rel
9378 fi
9379 fi
9380
9381 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9382 if test "$cf_cv_shlib_version" = rel; then
9383 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9384 else
9385 cf_cv_shared_soname='`basename $@`'
9386 fi
9387
9388 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9389 else
9390 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
9391 fi
9392 ;;
9393 (osf*|mls+*)
9394 # tested with OSF/1 V3.2 and 'cc'
9395 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9396 # link with shared libs).
9397 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9398 case $host_os in
9399 (osf4*)
9400 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9401 ;;
9402 esac
9403 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9404 if test "$DFT_LWR_MODEL" = "shared" ; then
9405 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9406 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9407 fi
9408 cf_cv_rm_so_locs=yes
9409 ;;
9410 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9411 # tested with osr5.0.5
9412 if test "$GCC" != yes; then
9413 CC_SHARED_OPTS='-belf -KPIC'
9414 fi
9415 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9416 if test "$cf_cv_enable_rpath" = yes ; then
9417 # only way is to set LD_RUN_PATH but no switch for it
9418 RUN_PATH=$libdir
9419 fi
9420 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9421 LINK_PROGS='LD_RUN_PATH=${libdir}'
9422 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9423 ;;
9424 (sunos4*)
9425 # tested with SunOS 4.1.1 and gcc 2.7.0
9426 if test "$GCC" != yes; then
9427 CC_SHARED_OPTS='-KPIC'
9428 fi
9429 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
9430 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9431 ;;
9432 (solaris2*)
9433 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9434 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9435 if test "$DFT_LWR_MODEL" = "shared" ; then
9436 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9437 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9438 fi
9439 if test "$cf_cv_enable_rpath" = yes ; then
9440 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9441 fi
9442
9443 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9444 if test "$cf_cv_shlib_version" = rel; then
9445 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9446 else
9447 cf_cv_shared_soname='`basename $@`'
9448 fi
9449
9450 if test "$GCC" != yes; then
9451 cf_save_CFLAGS="$CFLAGS"
9452 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9453 do
9454 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9455 cat >conftest.$ac_ext <<_ACEOF
9456#line 9456 "configure"
9457#include "confdefs.h"
9458#include <stdio.h>
9459int
9460main ()
9461{
9462printf("Hello\n");
9463 ;
9464 return 0;
9465}
9466_ACEOF
9467rm -f conftest.$ac_objext
9468if { (eval echo "$as_me:9468: \"$ac_compile\"") >&5
9469 (eval $ac_compile) 2>&5
9470 ac_status=$?
9471 echo "$as_me:9471: \$? = $ac_status" >&5
9472 (exit $ac_status); } &&
9473 { ac_try='test -s conftest.$ac_objext'
9474 { (eval echo "$as_me:9474: \"$ac_try\"") >&5
9475 (eval $ac_try) 2>&5
9476 ac_status=$?
9477 echo "$as_me:9477: \$? = $ac_status" >&5
9478 (exit $ac_status); }; }; then
9479 break
9480else
9481 echo "$as_me: failed program was:" >&5
9482cat conftest.$ac_ext >&5
9483fi
9484rm -f conftest.$ac_objext conftest.$ac_ext
9485 done
9486 CFLAGS="$cf_save_CFLAGS"
9487 CC_SHARED_OPTS=$cf_shared_opts
9488 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
9489 else
9490 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
9491 fi
9492 ;;
9493 (sysv5uw7*|unix_sv*)
9494 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
9495 if test "$GCC" != yes; then
9496 CC_SHARED_OPTS='-KPIC'
9497 fi
9498 MK_SHARED_LIB='${LD} -d y -G -o $@'
9499 ;;
9500 (*)
9501 CC_SHARED_OPTS='unknown'
9502 MK_SHARED_LIB='echo unknown'
9503 ;;
9504 esac
9505
9506 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
9507 case "$cf_cv_shlib_version" in
9508 (rel|abi)
9509 case "$MK_SHARED_LIB" in
9510 (*'-o $@')
9511 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
9512 ;;
9513 (*)
9514 { echo "$as_me:9514: WARNING: ignored --with-shlib-version" >&5
9515echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
9516 ;;
9517 esac
9518 ;;
9519 esac
9520
9521 if test -n "$cf_try_cflags"
9522 then
9523cat > conftest.$ac_ext <<EOF
9524#line 9524 "${as_me:-configure}"
9525#include <stdio.h>
9526int main(int argc, char *argv[])
9527{
9528 printf("hello\n");
9529 return (argv[argc-1] == 0) ;
9530}
9531EOF
9532 cf_save_CFLAGS="$CFLAGS"
9533 for cf_opt in $cf_try_cflags
9534 do
9535 CFLAGS="$cf_save_CFLAGS -$cf_opt"
9536 echo "$as_me:9536: checking if CFLAGS option -$cf_opt works" >&5
9537echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
9538 if { (eval echo "$as_me:9538: \"$ac_compile\"") >&5
9539 (eval $ac_compile) 2>&5
9540 ac_status=$?
9541 echo "$as_me:9541: \$? = $ac_status" >&5
9542 (exit $ac_status); }; then
9543 echo "$as_me:9543: result: yes" >&5
9544echo "${ECHO_T}yes" >&6
9545 cf_save_CFLAGS="$CFLAGS"
9546 else
9547 echo "$as_me:9547: result: no" >&5
9548echo "${ECHO_T}no" >&6
9549 fi
9550 done
9551 CFLAGS="$cf_save_CFLAGS"
9552 fi
9553
9554 # RPATH_LIST is a colon-separated list of directories
9555 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
9556 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
9557
9558 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
9559
9560 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
9561
9562echo "${as_me:-configure}:9562: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
9563
9564 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
9565
9566echo "${as_me:-configure}:9566: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
9567
9568# The test/sample programs in the original tree link using rpath option.
9569# Make it optional for packagers.
9570if test -n "$LOCAL_LDFLAGS"
9571then
9572 echo "$as_me:9572: checking if you want to link sample programs with rpath option" >&5
9573echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
9574
9575# Check whether --enable-rpath-link or --disable-rpath-link was given.
9576if test "${enable_rpath_link+set}" = set; then
9577 enableval="$enable_rpath_link"
9578 with_rpath_link=$enableval
9579else
9580 with_rpath_link=yes
9581fi;
9582 echo "$as_me:9582: result: $with_rpath_link" >&5
9583echo "${ECHO_T}$with_rpath_link" >&6
9584 if test "$with_rpath_link" = no
9585 then
9586 LOCAL_LDFLAGS=
9587 LOCAL_LDFLAGS2=
9588 fi
9589fi
9590
9591###############################################################################
9592
9593### use option --enable-broken-linker to force on use of broken-linker support
9594echo "$as_me:9594: checking if you want broken-linker support code" >&5
9595echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9596
9597# Check whether --enable-broken_linker or --disable-broken_linker was given.
9598if test "${enable_broken_linker+set}" = set; then
9599 enableval="$enable_broken_linker"
9600 with_broken_linker=$enableval
9601else
9602 with_broken_linker=${BROKEN_LINKER:-no}
9603fi;
9604echo "$as_me:9604: result: $with_broken_linker" >&5
9605echo "${ECHO_T}$with_broken_linker" >&6
9606
9607BROKEN_LINKER=0
9608if test "$with_broken_linker" = yes ; then
9609 cat >>confdefs.h <<\EOF
9610#define BROKEN_LINKER 1
9611EOF
9612
9613 BROKEN_LINKER=1
9614elif test "$DFT_LWR_MODEL" = shared ; then
9615 case $cf_cv_system_name in
9616 (cygwin*)
9617 cat >>confdefs.h <<\EOF
9618#define BROKEN_LINKER 1
9619EOF
9620
9621 BROKEN_LINKER=1
9622 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
9623
9624echo "${as_me:-configure}:9624: testing cygwin linker is broken anyway ..." 1>&5
9625
9626 ;;
9627 esac
9628fi
9629
9630# Check to define _XOPEN_SOURCE "automatically"
9631
9632cf_XOPEN_SOURCE=500
9633cf_POSIX_C_SOURCE=199506L
9634cf_xopen_source=
9635
9636case $host_os in
9637(aix[4-7]*)
9638 cf_xopen_source="-D_ALL_SOURCE"
9639 ;;
9640(cygwin|msys)
9641 cf_XOPEN_SOURCE=600
9642 ;;
9643(darwin[0-8].*)
9644 cf_xopen_source="-D_APPLE_C_SOURCE"
9645 ;;
9646(darwin*)
9647 cf_xopen_source="-D_DARWIN_C_SOURCE"
9648 cf_XOPEN_SOURCE=
9649 ;;
9650(freebsd*|dragonfly*)
9651 # 5.x headers associate
9652 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9653 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9654 cf_POSIX_C_SOURCE=200112L
9655 cf_XOPEN_SOURCE=600
9656 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9657 ;;
9658(hpux11*)
9659 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9660 ;;
9661(hpux*)
9662 cf_xopen_source="-D_HPUX_SOURCE"
9663 ;;
9664(irix[56].*)
9665 cf_xopen_source="-D_SGI_SOURCE"
9666 cf_XOPEN_SOURCE=
9667 ;;
9668(linux*|gnu*|mint*|k*bsd*-gnu)
9669
9670echo "$as_me:9670: checking if we must define _GNU_SOURCE" >&5
9671echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9672if test "${cf_cv_gnu_source+set}" = set; then
9673 echo $ECHO_N "(cached) $ECHO_C" >&6
9674else
9675
9676cat >conftest.$ac_ext <<_ACEOF
9677#line 9677 "configure"
9678#include "confdefs.h"
9679#include <sys/types.h>
9680int
9681main ()
9682{
9683
9684#ifndef _XOPEN_SOURCE
9685make an error
9686#endif
9687 ;
9688 return 0;
9689}
9690_ACEOF
9691rm -f conftest.$ac_objext
9692if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
9693 (eval $ac_compile) 2>&5
9694 ac_status=$?
9695 echo "$as_me:9695: \$? = $ac_status" >&5
9696 (exit $ac_status); } &&
9697 { ac_try='test -s conftest.$ac_objext'
9698 { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9699 (eval $ac_try) 2>&5
9700 ac_status=$?
9701 echo "$as_me:9701: \$? = $ac_status" >&5
9702 (exit $ac_status); }; }; then
9703 cf_cv_gnu_source=no
9704else
9705 echo "$as_me: failed program was:" >&5
9706cat conftest.$ac_ext >&5
9707cf_save="$CPPFLAGS"
9708 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9709 cat >conftest.$ac_ext <<_ACEOF
9710#line 9710 "configure"
9711#include "confdefs.h"
9712#include <sys/types.h>
9713int
9714main ()
9715{
9716
9717#ifdef _XOPEN_SOURCE
9718make an error
9719#endif
9720 ;
9721 return 0;
9722}
9723_ACEOF
9724rm -f conftest.$ac_objext
9725if { (eval echo "$as_me:9725: \"$ac_compile\"") >&5
9726 (eval $ac_compile) 2>&5
9727 ac_status=$?
9728 echo "$as_me:9728: \$? = $ac_status" >&5
9729 (exit $ac_status); } &&
9730 { ac_try='test -s conftest.$ac_objext'
9731 { (eval echo "$as_me:9731: \"$ac_try\"") >&5
9732 (eval $ac_try) 2>&5
9733 ac_status=$?
9734 echo "$as_me:9734: \$? = $ac_status" >&5
9735 (exit $ac_status); }; }; then
9736 cf_cv_gnu_source=no
9737else
9738 echo "$as_me: failed program was:" >&5
9739cat conftest.$ac_ext >&5
9740cf_cv_gnu_source=yes
9741fi
9742rm -f conftest.$ac_objext conftest.$ac_ext
9743 CPPFLAGS="$cf_save"
9744
9745fi
9746rm -f conftest.$ac_objext conftest.$ac_ext
9747
9748fi
9749echo "$as_me:9749: result: $cf_cv_gnu_source" >&5
9750echo "${ECHO_T}$cf_cv_gnu_source" >&6
9751test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9752
9753 ;;
9754(minix*)
9755 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9756 ;;
9757(mirbsd*)
9758 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9759 cf_XOPEN_SOURCE=
9760
9761cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9762
9763cf_save_CFLAGS="$CFLAGS"
9764cf_save_CPPFLAGS="$CPPFLAGS"
9765
9766cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9767 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9768 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9769
9770cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9771 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9772 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9773
9774echo "$as_me:9774: checking if we should define _POSIX_C_SOURCE" >&5
9775echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9776if test "${cf_cv_posix_c_source+set}" = set; then
9777 echo $ECHO_N "(cached) $ECHO_C" >&6
9778else
9779
9780echo "${as_me:-configure}:9780: testing if the symbol is already defined go no further ..." 1>&5
9781
9782 cat >conftest.$ac_ext <<_ACEOF
9783#line 9783 "configure"
9784#include "confdefs.h"
9785#include <sys/types.h>
9786int
9787main ()
9788{
9789
9790#ifndef _POSIX_C_SOURCE
9791make an error
9792#endif
9793 ;
9794 return 0;
9795}
9796_ACEOF
9797rm -f conftest.$ac_objext
9798if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799 (eval $ac_compile) 2>&5
9800 ac_status=$?
9801 echo "$as_me:9801: \$? = $ac_status" >&5
9802 (exit $ac_status); } &&
9803 { ac_try='test -s conftest.$ac_objext'
9804 { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805 (eval $ac_try) 2>&5
9806 ac_status=$?
9807 echo "$as_me:9807: \$? = $ac_status" >&5
9808 (exit $ac_status); }; }; then
9809 cf_cv_posix_c_source=no
9810else
9811 echo "$as_me: failed program was:" >&5
9812cat conftest.$ac_ext >&5
9813cf_want_posix_source=no
9814 case .$cf_POSIX_C_SOURCE in
9815 (.[12]??*)
9816 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9817 ;;
9818 (.2)
9819 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9820 cf_want_posix_source=yes
9821 ;;
9822 (.*)
9823 cf_want_posix_source=yes
9824 ;;
9825 esac
9826 if test "$cf_want_posix_source" = yes ; then
9827 cat >conftest.$ac_ext <<_ACEOF
9828#line 9828 "configure"
9829#include "confdefs.h"
9830#include <sys/types.h>
9831int
9832main ()
9833{
9834
9835#ifdef _POSIX_SOURCE
9836make an error
9837#endif
9838 ;
9839 return 0;
9840}
9841_ACEOF
9842rm -f conftest.$ac_objext
9843if { (eval echo "$as_me:9843: \"$ac_compile\"") >&5
9844 (eval $ac_compile) 2>&5
9845 ac_status=$?
9846 echo "$as_me:9846: \$? = $ac_status" >&5
9847 (exit $ac_status); } &&
9848 { ac_try='test -s conftest.$ac_objext'
9849 { (eval echo "$as_me:9849: \"$ac_try\"") >&5
9850 (eval $ac_try) 2>&5
9851 ac_status=$?
9852 echo "$as_me:9852: \$? = $ac_status" >&5
9853 (exit $ac_status); }; }; then
9854 :
9855else
9856 echo "$as_me: failed program was:" >&5
9857cat conftest.$ac_ext >&5
9858cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9859fi
9860rm -f conftest.$ac_objext conftest.$ac_ext
9861 fi
9862
9863echo "${as_me:-configure}:9863: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9864
9865 CFLAGS="$cf_trim_CFLAGS"
9866 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
9867
9868echo "${as_me:-configure}:9868: testing if the second compile does not leave our definition intact error ..." 1>&5
9869
9870 cat >conftest.$ac_ext <<_ACEOF
9871#line 9871 "configure"
9872#include "confdefs.h"
9873#include <sys/types.h>
9874int
9875main ()
9876{
9877
9878#ifndef _POSIX_C_SOURCE
9879make an error
9880#endif
9881 ;
9882 return 0;
9883}
9884_ACEOF
9885rm -f conftest.$ac_objext
9886if { (eval echo "$as_me:9886: \"$ac_compile\"") >&5
9887 (eval $ac_compile) 2>&5
9888 ac_status=$?
9889 echo "$as_me:9889: \$? = $ac_status" >&5
9890 (exit $ac_status); } &&
9891 { ac_try='test -s conftest.$ac_objext'
9892 { (eval echo "$as_me:9892: \"$ac_try\"") >&5
9893 (eval $ac_try) 2>&5
9894 ac_status=$?
9895 echo "$as_me:9895: \$? = $ac_status" >&5
9896 (exit $ac_status); }; }; then
9897 :
9898else
9899 echo "$as_me: failed program was:" >&5
9900cat conftest.$ac_ext >&5
9901cf_cv_posix_c_source=no
9902fi
9903rm -f conftest.$ac_objext conftest.$ac_ext
9904 CFLAGS="$cf_save_CFLAGS"
9905 CPPFLAGS="$cf_save_CPPFLAGS"
9906
9907fi
9908rm -f conftest.$ac_objext conftest.$ac_ext
9909
9910fi
9911echo "$as_me:9911: result: $cf_cv_posix_c_source" >&5
9912echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9913
9914if test "$cf_cv_posix_c_source" != no ; then
9915 CFLAGS="$cf_trim_CFLAGS"
9916 CPPFLAGS="$cf_trim_CPPFLAGS"
9917
9918cf_fix_cppflags=no
9919cf_new_cflags=
9920cf_new_cppflags=
9921cf_new_extra_cppflags=
9922
9923for cf_add_cflags in $cf_cv_posix_c_source
9924do
9925case $cf_fix_cppflags in
9926(no)
9927 case $cf_add_cflags in
9928 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9929 case $cf_add_cflags in
9930 (-D*)
9931 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9932
9933 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9934 && test -z "${cf_tst_cflags}" \
9935 && cf_fix_cppflags=yes
9936
9937 if test $cf_fix_cppflags = yes ; then
9938 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9939 continue
9940 elif test "${cf_tst_cflags}" = "\"'" ; then
9941 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9942 continue
9943 fi
9944 ;;
9945 esac
9946 case "$CPPFLAGS" in
9947 (*$cf_add_cflags)
9948 ;;
9949 (*)
9950 case $cf_add_cflags in
9951 (-D*)
9952 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9953
9954CPPFLAGS=`echo "$CPPFLAGS" | \
9955 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9956 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9957
9958 ;;
9959 esac
9960 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9961 ;;
9962 esac
9963 ;;
9964 (*)
9965 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9966 ;;
9967 esac
9968 ;;
9969(yes)
9970 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9971
9972 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9973
9974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9975 && test -z "${cf_tst_cflags}" \
9976 && cf_fix_cppflags=no
9977 ;;
9978esac
9979done
9980
9981if test -n "$cf_new_cflags" ; then
9982
9983 CFLAGS="$CFLAGS $cf_new_cflags"
9984fi
9985
9986if test -n "$cf_new_cppflags" ; then
9987
9988 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9989fi
9990
9991if test -n "$cf_new_extra_cppflags" ; then
9992
9993 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9994fi
9995
9996fi
9997
9998 ;;
9999(netbsd*)
10000 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10001 ;;
10002(openbsd[4-9]*)
10003 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10004 cf_xopen_source="-D_BSD_SOURCE"
10005 cf_XOPEN_SOURCE=600
10006 ;;
10007(openbsd*)
10008 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10009 ;;
10010(osf[45]*)
10011 cf_xopen_source="-D_OSF_SOURCE"
10012 ;;
10013(nto-qnx*)
10014 cf_xopen_source="-D_QNX_SOURCE"
10015 ;;
10016(sco*)
10017 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10018 ;;
10019(solaris2.*)
10020 cf_xopen_source="-D__EXTENSIONS__"
10021 cf_cv_xopen_source=broken
10022 ;;
10023(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10024 cf_XOPEN_SOURCE=
10025 cf_POSIX_C_SOURCE=
10026 ;;
10027(*)
10028
10029echo "$as_me:10029: checking if we should define _XOPEN_SOURCE" >&5
10030echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10031if test "${cf_cv_xopen_source+set}" = set; then
10032 echo $ECHO_N "(cached) $ECHO_C" >&6
10033else
10034
10035 cat >conftest.$ac_ext <<_ACEOF
10036#line 10036 "configure"
10037#include "confdefs.h"
10038
10039#include <stdlib.h>
10040#include <string.h>
10041#include <sys/types.h>
10042
10043int
10044main ()
10045{
10046
10047#ifndef _XOPEN_SOURCE
10048make an error
10049#endif
10050 ;
10051 return 0;
10052}
10053_ACEOF
10054rm -f conftest.$ac_objext
10055if { (eval echo "$as_me:10055: \"$ac_compile\"") >&5
10056 (eval $ac_compile) 2>&5
10057 ac_status=$?
10058 echo "$as_me:10058: \$? = $ac_status" >&5
10059 (exit $ac_status); } &&
10060 { ac_try='test -s conftest.$ac_objext'
10061 { (eval echo "$as_me:10061: \"$ac_try\"") >&5
10062 (eval $ac_try) 2>&5
10063 ac_status=$?
10064 echo "$as_me:10064: \$? = $ac_status" >&5
10065 (exit $ac_status); }; }; then
10066 cf_cv_xopen_source=no
10067else
10068 echo "$as_me: failed program was:" >&5
10069cat conftest.$ac_ext >&5
10070cf_save="$CPPFLAGS"
10071 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10072 cat >conftest.$ac_ext <<_ACEOF
10073#line 10073 "configure"
10074#include "confdefs.h"
10075
10076#include <stdlib.h>
10077#include <string.h>
10078#include <sys/types.h>
10079
10080int
10081main ()
10082{
10083
10084#ifdef _XOPEN_SOURCE
10085make an error
10086#endif
10087 ;
10088 return 0;
10089}
10090_ACEOF
10091rm -f conftest.$ac_objext
10092if { (eval echo "$as_me:10092: \"$ac_compile\"") >&5
10093 (eval $ac_compile) 2>&5
10094 ac_status=$?
10095 echo "$as_me:10095: \$? = $ac_status" >&5
10096 (exit $ac_status); } &&
10097 { ac_try='test -s conftest.$ac_objext'
10098 { (eval echo "$as_me:10098: \"$ac_try\"") >&5
10099 (eval $ac_try) 2>&5
10100 ac_status=$?
10101 echo "$as_me:10101: \$? = $ac_status" >&5
10102 (exit $ac_status); }; }; then
10103 cf_cv_xopen_source=no
10104else
10105 echo "$as_me: failed program was:" >&5
10106cat conftest.$ac_ext >&5
10107cf_cv_xopen_source=$cf_XOPEN_SOURCE
10108fi
10109rm -f conftest.$ac_objext conftest.$ac_ext
10110 CPPFLAGS="$cf_save"
10111
10112fi
10113rm -f conftest.$ac_objext conftest.$ac_ext
10114
10115fi
10116echo "$as_me:10116: result: $cf_cv_xopen_source" >&5
10117echo "${ECHO_T}$cf_cv_xopen_source" >&6
10118
10119if test "$cf_cv_xopen_source" != no ; then
10120
10121CFLAGS=`echo "$CFLAGS" | \
10122 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10123 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10124
10125CPPFLAGS=`echo "$CPPFLAGS" | \
10126 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10127 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10128
10129 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10130
10131cf_fix_cppflags=no
10132cf_new_cflags=
10133cf_new_cppflags=
10134cf_new_extra_cppflags=
10135
10136for cf_add_cflags in $cf_temp_xopen_source
10137do
10138case $cf_fix_cppflags in
10139(no)
10140 case $cf_add_cflags in
10141 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10142 case $cf_add_cflags in
10143 (-D*)
10144 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10145
10146 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10147 && test -z "${cf_tst_cflags}" \
10148 && cf_fix_cppflags=yes
10149
10150 if test $cf_fix_cppflags = yes ; then
10151 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10152 continue
10153 elif test "${cf_tst_cflags}" = "\"'" ; then
10154 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10155 continue
10156 fi
10157 ;;
10158 esac
10159 case "$CPPFLAGS" in
10160 (*$cf_add_cflags)
10161 ;;
10162 (*)
10163 case $cf_add_cflags in
10164 (-D*)
10165 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10166
10167CPPFLAGS=`echo "$CPPFLAGS" | \
10168 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10169 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10170
10171 ;;
10172 esac
10173 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10174 ;;
10175 esac
10176 ;;
10177 (*)
10178 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10179 ;;
10180 esac
10181 ;;
10182(yes)
10183 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10184
10185 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10186
10187 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10188 && test -z "${cf_tst_cflags}" \
10189 && cf_fix_cppflags=no
10190 ;;
10191esac
10192done
10193
10194if test -n "$cf_new_cflags" ; then
10195
10196 CFLAGS="$CFLAGS $cf_new_cflags"
10197fi
10198
10199if test -n "$cf_new_cppflags" ; then
10200
10201 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10202fi
10203
10204if test -n "$cf_new_extra_cppflags" ; then
10205
10206 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10207fi
10208
10209fi
10210
10211cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10212
10213cf_save_CFLAGS="$CFLAGS"
10214cf_save_CPPFLAGS="$CPPFLAGS"
10215
10216cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10217 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10218 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10219
10220cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10221 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10222 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10223
10224echo "$as_me:10224: checking if we should define _POSIX_C_SOURCE" >&5
10225echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10226if test "${cf_cv_posix_c_source+set}" = set; then
10227 echo $ECHO_N "(cached) $ECHO_C" >&6
10228else
10229
10230echo "${as_me:-configure}:10230: testing if the symbol is already defined go no further ..." 1>&5
10231
10232 cat >conftest.$ac_ext <<_ACEOF
10233#line 10233 "configure"
10234#include "confdefs.h"
10235#include <sys/types.h>
10236int
10237main ()
10238{
10239
10240#ifndef _POSIX_C_SOURCE
10241make an error
10242#endif
10243 ;
10244 return 0;
10245}
10246_ACEOF
10247rm -f conftest.$ac_objext
10248if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10249 (eval $ac_compile) 2>&5
10250 ac_status=$?
10251 echo "$as_me:10251: \$? = $ac_status" >&5
10252 (exit $ac_status); } &&
10253 { ac_try='test -s conftest.$ac_objext'
10254 { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255 (eval $ac_try) 2>&5
10256 ac_status=$?
10257 echo "$as_me:10257: \$? = $ac_status" >&5
10258 (exit $ac_status); }; }; then
10259 cf_cv_posix_c_source=no
10260else
10261 echo "$as_me: failed program was:" >&5
10262cat conftest.$ac_ext >&5
10263cf_want_posix_source=no
10264 case .$cf_POSIX_C_SOURCE in
10265 (.[12]??*)
10266 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10267 ;;
10268 (.2)
10269 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10270 cf_want_posix_source=yes
10271 ;;
10272 (.*)
10273 cf_want_posix_source=yes
10274 ;;
10275 esac
10276 if test "$cf_want_posix_source" = yes ; then
10277 cat >conftest.$ac_ext <<_ACEOF
10278#line 10278 "configure"
10279#include "confdefs.h"
10280#include <sys/types.h>
10281int
10282main ()
10283{
10284
10285#ifdef _POSIX_SOURCE
10286make an error
10287#endif
10288 ;
10289 return 0;
10290}
10291_ACEOF
10292rm -f conftest.$ac_objext
10293if { (eval echo "$as_me:10293: \"$ac_compile\"") >&5
10294 (eval $ac_compile) 2>&5
10295 ac_status=$?
10296 echo "$as_me:10296: \$? = $ac_status" >&5
10297 (exit $ac_status); } &&
10298 { ac_try='test -s conftest.$ac_objext'
10299 { (eval echo "$as_me:10299: \"$ac_try\"") >&5
10300 (eval $ac_try) 2>&5
10301 ac_status=$?
10302 echo "$as_me:10302: \$? = $ac_status" >&5
10303 (exit $ac_status); }; }; then
10304 :
10305else
10306 echo "$as_me: failed program was:" >&5
10307cat conftest.$ac_ext >&5
10308cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10309fi
10310rm -f conftest.$ac_objext conftest.$ac_ext
10311 fi
10312
10313echo "${as_me:-configure}:10313: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10314
10315 CFLAGS="$cf_trim_CFLAGS"
10316 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10317
10318echo "${as_me:-configure}:10318: testing if the second compile does not leave our definition intact error ..." 1>&5
10319
10320 cat >conftest.$ac_ext <<_ACEOF
10321#line 10321 "configure"
10322#include "confdefs.h"
10323#include <sys/types.h>
10324int
10325main ()
10326{
10327
10328#ifndef _POSIX_C_SOURCE
10329make an error
10330#endif
10331 ;
10332 return 0;
10333}
10334_ACEOF
10335rm -f conftest.$ac_objext
10336if { (eval echo "$as_me:10336: \"$ac_compile\"") >&5
10337 (eval $ac_compile) 2>&5
10338 ac_status=$?
10339 echo "$as_me:10339: \$? = $ac_status" >&5
10340 (exit $ac_status); } &&
10341 { ac_try='test -s conftest.$ac_objext'
10342 { (eval echo "$as_me:10342: \"$ac_try\"") >&5
10343 (eval $ac_try) 2>&5
10344 ac_status=$?
10345 echo "$as_me:10345: \$? = $ac_status" >&5
10346 (exit $ac_status); }; }; then
10347 :
10348else
10349 echo "$as_me: failed program was:" >&5
10350cat conftest.$ac_ext >&5
10351cf_cv_posix_c_source=no
10352fi
10353rm -f conftest.$ac_objext conftest.$ac_ext
10354 CFLAGS="$cf_save_CFLAGS"
10355 CPPFLAGS="$cf_save_CPPFLAGS"
10356
10357fi
10358rm -f conftest.$ac_objext conftest.$ac_ext
10359
10360fi
10361echo "$as_me:10361: result: $cf_cv_posix_c_source" >&5
10362echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10363
10364if test "$cf_cv_posix_c_source" != no ; then
10365 CFLAGS="$cf_trim_CFLAGS"
10366 CPPFLAGS="$cf_trim_CPPFLAGS"
10367
10368cf_fix_cppflags=no
10369cf_new_cflags=
10370cf_new_cppflags=
10371cf_new_extra_cppflags=
10372
10373for cf_add_cflags in $cf_cv_posix_c_source
10374do
10375case $cf_fix_cppflags in
10376(no)
10377 case $cf_add_cflags in
10378 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10379 case $cf_add_cflags in
10380 (-D*)
10381 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10382
10383 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10384 && test -z "${cf_tst_cflags}" \
10385 && cf_fix_cppflags=yes
10386
10387 if test $cf_fix_cppflags = yes ; then
10388 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10389 continue
10390 elif test "${cf_tst_cflags}" = "\"'" ; then
10391 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10392 continue
10393 fi
10394 ;;
10395 esac
10396 case "$CPPFLAGS" in
10397 (*$cf_add_cflags)
10398 ;;
10399 (*)
10400 case $cf_add_cflags in
10401 (-D*)
10402 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10403
10404CPPFLAGS=`echo "$CPPFLAGS" | \
10405 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10406 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10407
10408 ;;
10409 esac
10410 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10411 ;;
10412 esac
10413 ;;
10414 (*)
10415 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10416 ;;
10417 esac
10418 ;;
10419(yes)
10420 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10421
10422 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10423
10424 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10425 && test -z "${cf_tst_cflags}" \
10426 && cf_fix_cppflags=no
10427 ;;
10428esac
10429done
10430
10431if test -n "$cf_new_cflags" ; then
10432
10433 CFLAGS="$CFLAGS $cf_new_cflags"
10434fi
10435
10436if test -n "$cf_new_cppflags" ; then
10437
10438 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10439fi
10440
10441if test -n "$cf_new_extra_cppflags" ; then
10442
10443 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10444fi
10445
10446fi
10447
10448 ;;
10449esac
10450
10451if test -n "$cf_xopen_source" ; then
10452
10453cf_fix_cppflags=no
10454cf_new_cflags=
10455cf_new_cppflags=
10456cf_new_extra_cppflags=
10457
10458for cf_add_cflags in $cf_xopen_source
10459do
10460case $cf_fix_cppflags in
10461(no)
10462 case $cf_add_cflags in
10463 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10464 case $cf_add_cflags in
10465 (-D*)
10466 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10467
10468 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10469 && test -z "${cf_tst_cflags}" \
10470 && cf_fix_cppflags=yes
10471
10472 if test $cf_fix_cppflags = yes ; then
10473 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10474 continue
10475 elif test "${cf_tst_cflags}" = "\"'" ; then
10476 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10477 continue
10478 fi
10479 ;;
10480 esac
10481 case "$CPPFLAGS" in
10482 (*$cf_add_cflags)
10483 ;;
10484 (*)
10485 case $cf_add_cflags in
10486 (-D*)
10487 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10488
10489CPPFLAGS=`echo "$CPPFLAGS" | \
10490 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10491 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10492
10493 ;;
10494 esac
10495 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10496 ;;
10497 esac
10498 ;;
10499 (*)
10500 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10501 ;;
10502 esac
10503 ;;
10504(yes)
10505 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10506
10507 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10508
10509 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10510 && test -z "${cf_tst_cflags}" \
10511 && cf_fix_cppflags=no
10512 ;;
10513esac
10514done
10515
10516if test -n "$cf_new_cflags" ; then
10517 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
10518
10519echo "${as_me:-configure}:10519: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10520
10521 CFLAGS="$CFLAGS $cf_new_cflags"
10522fi
10523
10524if test -n "$cf_new_cppflags" ; then
10525 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10526
10527echo "${as_me:-configure}:10527: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10528
10529 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10530fi
10531
10532if test -n "$cf_new_extra_cppflags" ; then
10533 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10534
10535echo "${as_me:-configure}:10535: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10536
10537 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10538fi
10539
10540fi
10541
10542if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10543 echo "$as_me:10543: checking if _XOPEN_SOURCE really is set" >&5
10544echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10545 cat >conftest.$ac_ext <<_ACEOF
10546#line 10546 "configure"
10547#include "confdefs.h"
10548#include <stdlib.h>
10549int
10550main ()
10551{
10552
10553#ifndef _XOPEN_SOURCE
10554make an error
10555#endif
10556 ;
10557 return 0;
10558}
10559_ACEOF
10560rm -f conftest.$ac_objext
10561if { (eval echo "$as_me:10561: \"$ac_compile\"") >&5
10562 (eval $ac_compile) 2>&5
10563 ac_status=$?
10564 echo "$as_me:10564: \$? = $ac_status" >&5
10565 (exit $ac_status); } &&
10566 { ac_try='test -s conftest.$ac_objext'
10567 { (eval echo "$as_me:10567: \"$ac_try\"") >&5
10568 (eval $ac_try) 2>&5
10569 ac_status=$?
10570 echo "$as_me:10570: \$? = $ac_status" >&5
10571 (exit $ac_status); }; }; then
10572 cf_XOPEN_SOURCE_set=yes
10573else
10574 echo "$as_me: failed program was:" >&5
10575cat conftest.$ac_ext >&5
10576cf_XOPEN_SOURCE_set=no
10577fi
10578rm -f conftest.$ac_objext conftest.$ac_ext
10579 echo "$as_me:10579: result: $cf_XOPEN_SOURCE_set" >&5
10580echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10581 if test $cf_XOPEN_SOURCE_set = yes
10582 then
10583 cat >conftest.$ac_ext <<_ACEOF
10584#line 10584 "configure"
10585#include "confdefs.h"
10586#include <stdlib.h>
10587int
10588main ()
10589{
10590
10591#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10592make an error
10593#endif
10594 ;
10595 return 0;
10596}
10597_ACEOF
10598rm -f conftest.$ac_objext
10599if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
10600 (eval $ac_compile) 2>&5
10601 ac_status=$?
10602 echo "$as_me:10602: \$? = $ac_status" >&5
10603 (exit $ac_status); } &&
10604 { ac_try='test -s conftest.$ac_objext'
10605 { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606 (eval $ac_try) 2>&5
10607 ac_status=$?
10608 echo "$as_me:10608: \$? = $ac_status" >&5
10609 (exit $ac_status); }; }; then
10610 cf_XOPEN_SOURCE_set_ok=yes
10611else
10612 echo "$as_me: failed program was:" >&5
10613cat conftest.$ac_ext >&5
10614cf_XOPEN_SOURCE_set_ok=no
10615fi
10616rm -f conftest.$ac_objext conftest.$ac_ext
10617 if test $cf_XOPEN_SOURCE_set_ok = no
10618 then
10619 { echo "$as_me:10619: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10620echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10621 fi
10622 else
10623
10624echo "$as_me:10624: checking if we should define _XOPEN_SOURCE" >&5
10625echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10626if test "${cf_cv_xopen_source+set}" = set; then
10627 echo $ECHO_N "(cached) $ECHO_C" >&6
10628else
10629
10630 cat >conftest.$ac_ext <<_ACEOF
10631#line 10631 "configure"
10632#include "confdefs.h"
10633
10634#include <stdlib.h>
10635#include <string.h>
10636#include <sys/types.h>
10637
10638int
10639main ()
10640{
10641
10642#ifndef _XOPEN_SOURCE
10643make an error
10644#endif
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 cf_cv_xopen_source=no
10662else
10663 echo "$as_me: failed program was:" >&5
10664cat conftest.$ac_ext >&5
10665cf_save="$CPPFLAGS"
10666 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10667 cat >conftest.$ac_ext <<_ACEOF
10668#line 10668 "configure"
10669#include "confdefs.h"
10670
10671#include <stdlib.h>
10672#include <string.h>
10673#include <sys/types.h>
10674
10675int
10676main ()
10677{
10678
10679#ifdef _XOPEN_SOURCE
10680make an error
10681#endif
10682 ;
10683 return 0;
10684}
10685_ACEOF
10686rm -f conftest.$ac_objext
10687if { (eval echo "$as_me:10687: \"$ac_compile\"") >&5
10688 (eval $ac_compile) 2>&5
10689 ac_status=$?
10690 echo "$as_me:10690: \$? = $ac_status" >&5
10691 (exit $ac_status); } &&
10692 { ac_try='test -s conftest.$ac_objext'
10693 { (eval echo "$as_me:10693: \"$ac_try\"") >&5
10694 (eval $ac_try) 2>&5
10695 ac_status=$?
10696 echo "$as_me:10696: \$? = $ac_status" >&5
10697 (exit $ac_status); }; }; then
10698 cf_cv_xopen_source=no
10699else
10700 echo "$as_me: failed program was:" >&5
10701cat conftest.$ac_ext >&5
10702cf_cv_xopen_source=$cf_XOPEN_SOURCE
10703fi
10704rm -f conftest.$ac_objext conftest.$ac_ext
10705 CPPFLAGS="$cf_save"
10706
10707fi
10708rm -f conftest.$ac_objext conftest.$ac_ext
10709
10710fi
10711echo "$as_me:10711: result: $cf_cv_xopen_source" >&5
10712echo "${ECHO_T}$cf_cv_xopen_source" >&6
10713
10714if test "$cf_cv_xopen_source" != no ; then
10715
10716CFLAGS=`echo "$CFLAGS" | \
10717 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10718 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10719
10720CPPFLAGS=`echo "$CPPFLAGS" | \
10721 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10722 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10723
10724 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10725
10726cf_fix_cppflags=no
10727cf_new_cflags=
10728cf_new_cppflags=
10729cf_new_extra_cppflags=
10730
10731for cf_add_cflags in $cf_temp_xopen_source
10732do
10733case $cf_fix_cppflags in
10734(no)
10735 case $cf_add_cflags in
10736 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10737 case $cf_add_cflags in
10738 (-D*)
10739 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10740
10741 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10742 && test -z "${cf_tst_cflags}" \
10743 && cf_fix_cppflags=yes
10744
10745 if test $cf_fix_cppflags = yes ; then
10746 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10747 continue
10748 elif test "${cf_tst_cflags}" = "\"'" ; then
10749 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10750 continue
10751 fi
10752 ;;
10753 esac
10754 case "$CPPFLAGS" in
10755 (*$cf_add_cflags)
10756 ;;
10757 (*)
10758 case $cf_add_cflags in
10759 (-D*)
10760 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10761
10762CPPFLAGS=`echo "$CPPFLAGS" | \
10763 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10764 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10765
10766 ;;
10767 esac
10768 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10769 ;;
10770 esac
10771 ;;
10772 (*)
10773 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10774 ;;
10775 esac
10776 ;;
10777(yes)
10778 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10779
10780 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10781
10782 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10783 && test -z "${cf_tst_cflags}" \
10784 && cf_fix_cppflags=no
10785 ;;
10786esac
10787done
10788
10789if test -n "$cf_new_cflags" ; then
10790
10791 CFLAGS="$CFLAGS $cf_new_cflags"
10792fi
10793
10794if test -n "$cf_new_cppflags" ; then
10795
10796 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10797fi
10798
10799if test -n "$cf_new_extra_cppflags" ; then
10800
10801 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10802fi
10803
10804fi
10805
10806 fi
10807fi
10808
10809# Check whether --enable-largefile or --disable-largefile was given.
10810if test "${enable_largefile+set}" = set; then
10811 enableval="$enable_largefile"
10812
10813fi;
10814if test "$enable_largefile" != no; then
10815
10816 echo "$as_me:10816: checking for special C compiler options needed for large files" >&5
10817echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10818if test "${ac_cv_sys_largefile_CC+set}" = set; then
10819 echo $ECHO_N "(cached) $ECHO_C" >&6
10820else
10821 ac_cv_sys_largefile_CC=no
10822 if test "$GCC" != yes; then
10823 ac_save_CC=$CC
10824 while :; do
10825 # IRIX 6.2 and later do not support large files by default,
10826 # so use the C compiler's -n32 option if that helps.
10827 cat >conftest.$ac_ext <<_ACEOF
10828#line 10828 "configure"
10829#include "confdefs.h"
10830#include <sys/types.h>
10831 /* Check that off_t can represent 2**63 - 1 correctly.
10832 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10833 since some C++ compilers masquerading as C compilers
10834 incorrectly reject 9223372036854775807. */
10835#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10836 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10837 && LARGE_OFF_T % 2147483647 == 1)
10838 ? 1 : -1];
10839int
10840main ()
10841{
10842
10843 ;
10844 return 0;
10845}
10846_ACEOF
10847 rm -f conftest.$ac_objext
10848if { (eval echo "$as_me:10848: \"$ac_compile\"") >&5
10849 (eval $ac_compile) 2>&5
10850 ac_status=$?
10851 echo "$as_me:10851: \$? = $ac_status" >&5
10852 (exit $ac_status); } &&
10853 { ac_try='test -s conftest.$ac_objext'
10854 { (eval echo "$as_me:10854: \"$ac_try\"") >&5
10855 (eval $ac_try) 2>&5
10856 ac_status=$?
10857 echo "$as_me:10857: \$? = $ac_status" >&5
10858 (exit $ac_status); }; }; then
10859 break
10860else
10861 echo "$as_me: failed program was:" >&5
10862cat conftest.$ac_ext >&5
10863fi
10864rm -f conftest.$ac_objext
10865 CC="$CC -n32"
10866 rm -f conftest.$ac_objext
10867if { (eval echo "$as_me:10867: \"$ac_compile\"") >&5
10868 (eval $ac_compile) 2>&5
10869 ac_status=$?
10870 echo "$as_me:10870: \$? = $ac_status" >&5
10871 (exit $ac_status); } &&
10872 { ac_try='test -s conftest.$ac_objext'
10873 { (eval echo "$as_me:10873: \"$ac_try\"") >&5
10874 (eval $ac_try) 2>&5
10875 ac_status=$?
10876 echo "$as_me:10876: \$? = $ac_status" >&5
10877 (exit $ac_status); }; }; then
10878 ac_cv_sys_largefile_CC=' -n32'; break
10879else
10880 echo "$as_me: failed program was:" >&5
10881cat conftest.$ac_ext >&5
10882fi
10883rm -f conftest.$ac_objext
10884 break
10885 done
10886 CC=$ac_save_CC
10887 rm -f conftest.$ac_ext
10888 fi
10889fi
10890echo "$as_me:10890: result: $ac_cv_sys_largefile_CC" >&5
10891echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10892 if test "$ac_cv_sys_largefile_CC" != no; then
10893 CC=$CC$ac_cv_sys_largefile_CC
10894 fi
10895
10896 echo "$as_me:10896: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10897echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10898if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10899 echo $ECHO_N "(cached) $ECHO_C" >&6
10900else
10901 while :; do
10902 ac_cv_sys_file_offset_bits=no
10903 cat >conftest.$ac_ext <<_ACEOF
10904#line 10904 "configure"
10905#include "confdefs.h"
10906#include <sys/types.h>
10907 /* Check that off_t can represent 2**63 - 1 correctly.
10908 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10909 since some C++ compilers masquerading as C compilers
10910 incorrectly reject 9223372036854775807. */
10911#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10912 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10913 && LARGE_OFF_T % 2147483647 == 1)
10914 ? 1 : -1];
10915int
10916main ()
10917{
10918
10919 ;
10920 return 0;
10921}
10922_ACEOF
10923rm -f conftest.$ac_objext
10924if { (eval echo "$as_me:10924: \"$ac_compile\"") >&5
10925 (eval $ac_compile) 2>&5
10926 ac_status=$?
10927 echo "$as_me:10927: \$? = $ac_status" >&5
10928 (exit $ac_status); } &&
10929 { ac_try='test -s conftest.$ac_objext'
10930 { (eval echo "$as_me:10930: \"$ac_try\"") >&5
10931 (eval $ac_try) 2>&5
10932 ac_status=$?
10933 echo "$as_me:10933: \$? = $ac_status" >&5
10934 (exit $ac_status); }; }; then
10935 break
10936else
10937 echo "$as_me: failed program was:" >&5
10938cat conftest.$ac_ext >&5
10939fi
10940rm -f conftest.$ac_objext conftest.$ac_ext
10941 cat >conftest.$ac_ext <<_ACEOF
10942#line 10942 "configure"
10943#include "confdefs.h"
10944#define _FILE_OFFSET_BITS 64
10945#include <sys/types.h>
10946 /* Check that off_t can represent 2**63 - 1 correctly.
10947 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10948 since some C++ compilers masquerading as C compilers
10949 incorrectly reject 9223372036854775807. */
10950#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10951 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10952 && LARGE_OFF_T % 2147483647 == 1)
10953 ? 1 : -1];
10954int
10955main ()
10956{
10957
10958 ;
10959 return 0;
10960}
10961_ACEOF
10962rm -f conftest.$ac_objext
10963if { (eval echo "$as_me:10963: \"$ac_compile\"") >&5
10964 (eval $ac_compile) 2>&5
10965 ac_status=$?
10966 echo "$as_me:10966: \$? = $ac_status" >&5
10967 (exit $ac_status); } &&
10968 { ac_try='test -s conftest.$ac_objext'
10969 { (eval echo "$as_me:10969: \"$ac_try\"") >&5
10970 (eval $ac_try) 2>&5
10971 ac_status=$?
10972 echo "$as_me:10972: \$? = $ac_status" >&5
10973 (exit $ac_status); }; }; then
10974 ac_cv_sys_file_offset_bits=64; break
10975else
10976 echo "$as_me: failed program was:" >&5
10977cat conftest.$ac_ext >&5
10978fi
10979rm -f conftest.$ac_objext conftest.$ac_ext
10980 break
10981done
10982fi
10983echo "$as_me:10983: result: $ac_cv_sys_file_offset_bits" >&5
10984echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10985if test "$ac_cv_sys_file_offset_bits" != no; then
10986
10987cat >>confdefs.h <<EOF
10988#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10989EOF
10990
10991fi
10992rm -rf conftest*
10993 echo "$as_me:10993: checking for _LARGE_FILES value needed for large files" >&5
10994echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10995if test "${ac_cv_sys_large_files+set}" = set; then
10996 echo $ECHO_N "(cached) $ECHO_C" >&6
10997else
10998 while :; do
10999 ac_cv_sys_large_files=no
11000 cat >conftest.$ac_ext <<_ACEOF
11001#line 11001 "configure"
11002#include "confdefs.h"
11003#include <sys/types.h>
11004 /* Check that off_t can represent 2**63 - 1 correctly.
11005 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11006 since some C++ compilers masquerading as C compilers
11007 incorrectly reject 9223372036854775807. */
11008#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11009 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11010 && LARGE_OFF_T % 2147483647 == 1)
11011 ? 1 : -1];
11012int
11013main ()
11014{
11015
11016 ;
11017 return 0;
11018}
11019_ACEOF
11020rm -f conftest.$ac_objext
11021if { (eval echo "$as_me:11021: \"$ac_compile\"") >&5
11022 (eval $ac_compile) 2>&5
11023 ac_status=$?
11024 echo "$as_me:11024: \$? = $ac_status" >&5
11025 (exit $ac_status); } &&
11026 { ac_try='test -s conftest.$ac_objext'
11027 { (eval echo "$as_me:11027: \"$ac_try\"") >&5
11028 (eval $ac_try) 2>&5
11029 ac_status=$?
11030 echo "$as_me:11030: \$? = $ac_status" >&5
11031 (exit $ac_status); }; }; then
11032 break
11033else
11034 echo "$as_me: failed program was:" >&5
11035cat conftest.$ac_ext >&5
11036fi
11037rm -f conftest.$ac_objext conftest.$ac_ext
11038 cat >conftest.$ac_ext <<_ACEOF
11039#line 11039 "configure"
11040#include "confdefs.h"
11041#define _LARGE_FILES 1
11042#include <sys/types.h>
11043 /* Check that off_t can represent 2**63 - 1 correctly.
11044 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11045 since some C++ compilers masquerading as C compilers
11046 incorrectly reject 9223372036854775807. */
11047#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11048 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11049 && LARGE_OFF_T % 2147483647 == 1)
11050 ? 1 : -1];
11051int
11052main ()
11053{
11054
11055 ;
11056 return 0;
11057}
11058_ACEOF
11059rm -f conftest.$ac_objext
11060if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5
11061 (eval $ac_compile) 2>&5
11062 ac_status=$?
11063 echo "$as_me:11063: \$? = $ac_status" >&5
11064 (exit $ac_status); } &&
11065 { ac_try='test -s conftest.$ac_objext'
11066 { (eval echo "$as_me:11066: \"$ac_try\"") >&5
11067 (eval $ac_try) 2>&5
11068 ac_status=$?
11069 echo "$as_me:11069: \$? = $ac_status" >&5
11070 (exit $ac_status); }; }; then
11071 ac_cv_sys_large_files=1; break
11072else
11073 echo "$as_me: failed program was:" >&5
11074cat conftest.$ac_ext >&5
11075fi
11076rm -f conftest.$ac_objext conftest.$ac_ext
11077 break
11078done
11079fi
11080echo "$as_me:11080: result: $ac_cv_sys_large_files" >&5
11081echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11082if test "$ac_cv_sys_large_files" != no; then
11083
11084cat >>confdefs.h <<EOF
11085#define _LARGE_FILES $ac_cv_sys_large_files
11086EOF
11087
11088fi
11089rm -rf conftest*
11090fi
11091
11092 if test "$enable_largefile" != no ; then
11093 echo "$as_me:11093: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11094echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11095if test "${ac_cv_sys_largefile_source+set}" = set; then
11096 echo $ECHO_N "(cached) $ECHO_C" >&6
11097else
11098 while :; do
11099 ac_cv_sys_largefile_source=no
11100 cat >conftest.$ac_ext <<_ACEOF
11101#line 11101 "configure"
11102#include "confdefs.h"
11103#include <stdio.h>
11104int
11105main ()
11106{
11107return !fseeko;
11108 ;
11109 return 0;
11110}
11111_ACEOF
11112rm -f conftest.$ac_objext
11113if { (eval echo "$as_me:11113: \"$ac_compile\"") >&5
11114 (eval $ac_compile) 2>&5
11115 ac_status=$?
11116 echo "$as_me:11116: \$? = $ac_status" >&5
11117 (exit $ac_status); } &&
11118 { ac_try='test -s conftest.$ac_objext'
11119 { (eval echo "$as_me:11119: \"$ac_try\"") >&5
11120 (eval $ac_try) 2>&5
11121 ac_status=$?
11122 echo "$as_me:11122: \$? = $ac_status" >&5
11123 (exit $ac_status); }; }; then
11124 break
11125else
11126 echo "$as_me: failed program was:" >&5
11127cat conftest.$ac_ext >&5
11128fi
11129rm -f conftest.$ac_objext conftest.$ac_ext
11130 cat >conftest.$ac_ext <<_ACEOF
11131#line 11131 "configure"
11132#include "confdefs.h"
11133#define _LARGEFILE_SOURCE 1
11134#include <stdio.h>
11135int
11136main ()
11137{
11138return !fseeko;
11139 ;
11140 return 0;
11141}
11142_ACEOF
11143rm -f conftest.$ac_objext
11144if { (eval echo "$as_me:11144: \"$ac_compile\"") >&5
11145 (eval $ac_compile) 2>&5
11146 ac_status=$?
11147 echo "$as_me:11147: \$? = $ac_status" >&5
11148 (exit $ac_status); } &&
11149 { ac_try='test -s conftest.$ac_objext'
11150 { (eval echo "$as_me:11150: \"$ac_try\"") >&5
11151 (eval $ac_try) 2>&5
11152 ac_status=$?
11153 echo "$as_me:11153: \$? = $ac_status" >&5
11154 (exit $ac_status); }; }; then
11155 ac_cv_sys_largefile_source=1; break
11156else
11157 echo "$as_me: failed program was:" >&5
11158cat conftest.$ac_ext >&5
11159fi
11160rm -f conftest.$ac_objext conftest.$ac_ext
11161 break
11162done
11163fi
11164echo "$as_me:11164: result: $ac_cv_sys_largefile_source" >&5
11165echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11166if test "$ac_cv_sys_largefile_source" != no; then
11167
11168cat >>confdefs.h <<EOF
11169#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11170EOF
11171
11172fi
11173rm -rf conftest*
11174
11175# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11176# in glibc 2.1.3, but that breaks too many other things.
11177# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11178echo "$as_me:11178: checking for fseeko" >&5
11179echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11180if test "${ac_cv_func_fseeko+set}" = set; then
11181 echo $ECHO_N "(cached) $ECHO_C" >&6
11182else
11183 cat >conftest.$ac_ext <<_ACEOF
11184#line 11184 "configure"
11185#include "confdefs.h"
11186#include <stdio.h>
11187int
11188main ()
11189{
11190return fseeko && fseeko (stdin, 0, 0);
11191 ;
11192 return 0;
11193}
11194_ACEOF
11195rm -f conftest.$ac_objext conftest$ac_exeext
11196if { (eval echo "$as_me:11196: \"$ac_link\"") >&5
11197 (eval $ac_link) 2>&5
11198 ac_status=$?
11199 echo "$as_me:11199: \$? = $ac_status" >&5
11200 (exit $ac_status); } &&
11201 { ac_try='test -s conftest$ac_exeext'
11202 { (eval echo "$as_me:11202: \"$ac_try\"") >&5
11203 (eval $ac_try) 2>&5
11204 ac_status=$?
11205 echo "$as_me:11205: \$? = $ac_status" >&5
11206 (exit $ac_status); }; }; then
11207 ac_cv_func_fseeko=yes
11208else
11209 echo "$as_me: failed program was:" >&5
11210cat conftest.$ac_ext >&5
11211ac_cv_func_fseeko=no
11212fi
11213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11214fi
11215echo "$as_me:11215: result: $ac_cv_func_fseeko" >&5
11216echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11217if test $ac_cv_func_fseeko = yes; then
11218
11219cat >>confdefs.h <<\EOF
11220#define HAVE_FSEEKO 1
11221EOF
11222
11223fi
11224
11225 # Normally we would collect these definitions in the config.h,
11226 # but (like _XOPEN_SOURCE), some environments rely on having these
11227 # defined before any of the system headers are included. Another
11228 # case comes up with C++, e.g., on AIX the compiler compiles the
11229 # header files by themselves before looking at the body files it is
11230 # told to compile. For ncurses, those header files do not include
11231 # the config.h
11232 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11233 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11234 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11235
11236 echo "$as_me:11236: checking whether to use struct dirent64" >&5
11237echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11238if test "${cf_cv_struct_dirent64+set}" = set; then
11239 echo $ECHO_N "(cached) $ECHO_C" >&6
11240else
11241
11242 cat >conftest.$ac_ext <<_ACEOF
11243#line 11243 "configure"
11244#include "confdefs.h"
11245
11246#include <sys/types.h>
11247#include <dirent.h>
11248
11249int
11250main ()
11251{
11252
11253 /* if transitional largefile support is setup, this is true */
11254 extern struct dirent64 * readdir(DIR *);
11255 struct dirent64 *x = readdir((DIR *)0);
11256 struct dirent *y = readdir((DIR *)0);
11257 int z = x - y;
11258
11259 ;
11260 return 0;
11261}
11262_ACEOF
11263rm -f conftest.$ac_objext
11264if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
11265 (eval $ac_compile) 2>&5
11266 ac_status=$?
11267 echo "$as_me:11267: \$? = $ac_status" >&5
11268 (exit $ac_status); } &&
11269 { ac_try='test -s conftest.$ac_objext'
11270 { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271 (eval $ac_try) 2>&5
11272 ac_status=$?
11273 echo "$as_me:11273: \$? = $ac_status" >&5
11274 (exit $ac_status); }; }; then
11275 cf_cv_struct_dirent64=yes
11276else
11277 echo "$as_me: failed program was:" >&5
11278cat conftest.$ac_ext >&5
11279cf_cv_struct_dirent64=no
11280fi
11281rm -f conftest.$ac_objext conftest.$ac_ext
11282
11283fi
11284echo "$as_me:11284: result: $cf_cv_struct_dirent64" >&5
11285echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11286 test "$cf_cv_struct_dirent64" = yes &&
11287cat >>confdefs.h <<\EOF
11288#define HAVE_STRUCT_DIRENT64 1
11289EOF
11290
11291 fi
11292
11293### Enable compiling-in rcs id's
11294echo "$as_me:11294: checking if RCS identifiers should be compiled-in" >&5
11295echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11296
11297# Check whether --with-rcs-ids or --without-rcs-ids was given.
11298if test "${with_rcs_ids+set}" = set; then
11299 withval="$with_rcs_ids"
11300 with_rcs_ids=$withval
11301else
11302 with_rcs_ids=no
11303fi;
11304echo "$as_me:11304: result: $with_rcs_ids" >&5
11305echo "${ECHO_T}$with_rcs_ids" >&6
11306test "$with_rcs_ids" = yes &&
11307cat >>confdefs.h <<\EOF
11308#define USE_RCS_IDS 1
11309EOF
11310
11311###############################################################################
11312
11313### Note that some functions (such as const) are normally disabled anyway.
11314echo "$as_me:11314: checking if you want to build with function extensions" >&5
11315echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11316
11317# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11318if test "${enable_ext_funcs+set}" = set; then
11319 enableval="$enable_ext_funcs"
11320 with_ext_funcs=$enableval
11321else
11322 with_ext_funcs=yes
11323fi;
11324echo "$as_me:11324: result: $with_ext_funcs" >&5
11325echo "${ECHO_T}$with_ext_funcs" >&6
11326if test "$with_ext_funcs" = yes ; then
11327 NCURSES_EXT_FUNCS=1
11328
11329cat >>confdefs.h <<\EOF
11330#define HAVE_USE_DEFAULT_COLORS 1
11331EOF
11332
11333cat >>confdefs.h <<\EOF
11334#define NCURSES_EXT_FUNCS 1
11335EOF
11336
11337else
11338 NCURSES_EXT_FUNCS=0
11339fi
11340
11341### use option --enable-const to turn on use of const beyond that in XSI.
11342echo "$as_me:11342: checking for extended use of const keyword" >&5
11343echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11344
11345# Check whether --enable-const or --disable-const was given.
11346if test "${enable_const+set}" = set; then
11347 enableval="$enable_const"
11348 with_ext_const=$enableval
11349else
11350 with_ext_const=no
11351fi;
11352echo "$as_me:11352: result: $with_ext_const" >&5
11353echo "${ECHO_T}$with_ext_const" >&6
11354NCURSES_CONST='/*nothing*/'
11355if test "$with_ext_const" = yes ; then
11356 NCURSES_CONST=const
11357fi
11358
11359###############################################################################
11360# These options are relatively safe to experiment with.
11361
11362echo "$as_me:11362: checking if you want all development code" >&5
11363echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11364
11365# Check whether --with-develop or --without-develop was given.
11366if test "${with_develop+set}" = set; then
11367 withval="$with_develop"
11368 with_develop=$withval
11369else
11370 with_develop=no
11371fi;
11372echo "$as_me:11372: result: $with_develop" >&5
11373echo "${ECHO_T}$with_develop" >&6
11374
11375###############################################################################
11376# These are just experimental, probably should not be in a package:
11377
11378# This is still experimental (20080329), but should ultimately be moved to
11379# the script-block --with-normal, etc.
11380
11381echo "$as_me:11381: checking if you want to link with the pthread library" >&5
11382echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11383
11384# Check whether --with-pthread or --without-pthread was given.
11385if test "${with_pthread+set}" = set; then
11386 withval="$with_pthread"
11387 with_pthread=$withval
11388else
11389 with_pthread=no
11390fi;
11391echo "$as_me:11391: result: $with_pthread" >&5
11392echo "${ECHO_T}$with_pthread" >&6
11393
11394if test "$with_pthread" != no ; then
11395 echo "$as_me:11395: checking for pthread.h" >&5
11396echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11397if test "${ac_cv_header_pthread_h+set}" = set; then
11398 echo $ECHO_N "(cached) $ECHO_C" >&6
11399else
11400 cat >conftest.$ac_ext <<_ACEOF
11401#line 11401 "configure"
11402#include "confdefs.h"
11403#include <pthread.h>
11404_ACEOF
11405if { (eval echo "$as_me:11405: \"$ac_cpp conftest.$ac_ext\"") >&5
11406 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11407 ac_status=$?
11408 egrep -v '^ *\+' conftest.er1 >conftest.err
11409 rm -f conftest.er1
11410 cat conftest.err >&5
11411 echo "$as_me:11411: \$? = $ac_status" >&5
11412 (exit $ac_status); } >/dev/null; then
11413 if test -s conftest.err; then
11414 ac_cpp_err=$ac_c_preproc_warn_flag
11415 else
11416 ac_cpp_err=
11417 fi
11418else
11419 ac_cpp_err=yes
11420fi
11421if test -z "$ac_cpp_err"; then
11422 ac_cv_header_pthread_h=yes
11423else
11424 echo "$as_me: failed program was:" >&5
11425 cat conftest.$ac_ext >&5
11426 ac_cv_header_pthread_h=no
11427fi
11428rm -f conftest.err conftest.$ac_ext
11429fi
11430echo "$as_me:11430: result: $ac_cv_header_pthread_h" >&5
11431echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11432if test $ac_cv_header_pthread_h = yes; then
11433
11434cat >>confdefs.h <<\EOF
11435#define HAVE_PTHREADS_H 1
11436EOF
11437
11438 for cf_lib_pthread in pthread c_r
11439 do
11440 echo "$as_me:11440: checking if we can link with the $cf_lib_pthread library" >&5
11441echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11442 cf_save_LIBS="$LIBS"
11443
11444cf_add_libs="-l$cf_lib_pthread"
11445# Filter out duplicates - this happens with badly-designed ".pc" files...
11446for cf_add_1lib in $LIBS
11447do
11448 for cf_add_2lib in $cf_add_libs
11449 do
11450 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11451 then
11452 cf_add_1lib=
11453 break
11454 fi
11455 done
11456 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11457done
11458LIBS="$cf_add_libs"
11459
11460 cat >conftest.$ac_ext <<_ACEOF
11461#line 11461 "configure"
11462#include "confdefs.h"
11463
11464#include <pthread.h>
11465
11466int
11467main ()
11468{
11469
11470 int rc = pthread_create(0,0,0,0);
11471 int r2 = pthread_mutexattr_settype(0, 0);
11472
11473 ;
11474 return 0;
11475}
11476_ACEOF
11477rm -f conftest.$ac_objext conftest$ac_exeext
11478if { (eval echo "$as_me:11478: \"$ac_link\"") >&5
11479 (eval $ac_link) 2>&5
11480 ac_status=$?
11481 echo "$as_me:11481: \$? = $ac_status" >&5
11482 (exit $ac_status); } &&
11483 { ac_try='test -s conftest$ac_exeext'
11484 { (eval echo "$as_me:11484: \"$ac_try\"") >&5
11485 (eval $ac_try) 2>&5
11486 ac_status=$?
11487 echo "$as_me:11487: \$? = $ac_status" >&5
11488 (exit $ac_status); }; }; then
11489 with_pthread=yes
11490else
11491 echo "$as_me: failed program was:" >&5
11492cat conftest.$ac_ext >&5
11493with_pthread=no
11494fi
11495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11496 LIBS="$cf_save_LIBS"
11497 echo "$as_me:11497: result: $with_pthread" >&5
11498echo "${ECHO_T}$with_pthread" >&6
11499 test "$with_pthread" = yes && break
11500 done
11501
11502 if test "$with_pthread" = yes ; then
11503
11504cf_add_libs="-l$cf_lib_pthread"
11505# Filter out duplicates - this happens with badly-designed ".pc" files...
11506for cf_add_1lib in $LIBS
11507do
11508 for cf_add_2lib in $cf_add_libs
11509 do
11510 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11511 then
11512 cf_add_1lib=
11513 break
11514 fi
11515 done
11516 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11517done
11518LIBS="$cf_add_libs"
11519
11520cat >>confdefs.h <<\EOF
11521#define HAVE_LIBPTHREADS 1
11522EOF
11523
11524 else
11525 { { echo "$as_me:11525: error: Cannot link with pthread library" >&5
11526echo "$as_me: error: Cannot link with pthread library" >&2;}
11527 { (exit 1); exit 1; }; }
11528 fi
11529
11530fi
11531
11532fi
11533
11534echo "$as_me:11534: checking if you want to use weak-symbols for pthreads" >&5
11535echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11536
11537# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11538if test "${enable_weak_symbols+set}" = set; then
11539 enableval="$enable_weak_symbols"
11540 use_weak_symbols=$withval
11541else
11542 use_weak_symbols=no
11543fi;
11544echo "$as_me:11544: result: $use_weak_symbols" >&5
11545echo "${ECHO_T}$use_weak_symbols" >&6
11546if test "$use_weak_symbols" = yes ; then
11547
11548echo "$as_me:11548: checking if $CC supports weak symbols" >&5
11549echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11550if test "${cf_cv_weak_symbols+set}" = set; then
11551 echo $ECHO_N "(cached) $ECHO_C" >&6
11552else
11553
11554cat >conftest.$ac_ext <<_ACEOF
11555#line 11555 "configure"
11556#include "confdefs.h"
11557
11558#include <stdio.h>
11559int
11560main ()
11561{
11562
11563#if defined(__GNUC__)
11564# if defined __USE_ISOC99
11565# define _cat_pragma(exp) _Pragma(#exp)
11566# define _weak_pragma(exp) _cat_pragma(weak name)
11567# else
11568# define _weak_pragma(exp)
11569# endif
11570# define _declare(name) __extension__ extern __typeof__(name) name
11571# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
11572#endif
11573
11574weak_symbol(fopen);
11575
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext
11581if { (eval echo "$as_me:11581: \"$ac_compile\"") >&5
11582 (eval $ac_compile) 2>&5
11583 ac_status=$?
11584 echo "$as_me:11584: \$? = $ac_status" >&5
11585 (exit $ac_status); } &&
11586 { ac_try='test -s conftest.$ac_objext'
11587 { (eval echo "$as_me:11587: \"$ac_try\"") >&5
11588 (eval $ac_try) 2>&5
11589 ac_status=$?
11590 echo "$as_me:11590: \$? = $ac_status" >&5
11591 (exit $ac_status); }; }; then
11592 cf_cv_weak_symbols=yes
11593else
11594 echo "$as_me: failed program was:" >&5
11595cat conftest.$ac_ext >&5
11596cf_cv_weak_symbols=no
11597fi
11598rm -f conftest.$ac_objext conftest.$ac_ext
11599
11600fi
11601echo "$as_me:11601: result: $cf_cv_weak_symbols" >&5
11602echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11603
11604else
11605 cf_cv_weak_symbols=no
11606fi
11607
11608if test $cf_cv_weak_symbols = yes ; then
11609
11610cat >>confdefs.h <<\EOF
11611#define USE_WEAK_SYMBOLS 1
11612EOF
11613
11614fi
11615
11616PTHREAD=
11617if test "$with_pthread" = "yes" ; then
11618
11619cat >>confdefs.h <<\EOF
11620#define USE_PTHREADS 1
11621EOF
11622
11623 enable_reentrant=yes
11624 if test $cf_cv_weak_symbols = yes ; then
11625 PTHREAD=-lpthread
11626 fi
11627fi
11628
11629# OpenSUSE is installing ncurses6, using reentrant option.
11630echo "$as_me:11630: checking for _nc_TABSIZE" >&5
11631echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
11632if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
11634else
11635 cat >conftest.$ac_ext <<_ACEOF
11636#line 11636 "configure"
11637#include "confdefs.h"
11638/* System header to define __stub macros and hopefully few prototypes,
11639 which can conflict with char _nc_TABSIZE (); below. */
11640#include <assert.h>
11641/* Override any gcc2 internal prototype to avoid an error. */
11642#ifdef __cplusplus
11643extern "C"
11644#endif
11645/* We use char because int might match the return type of a gcc2
11646 builtin and then its argument prototype would still apply. */
11647char _nc_TABSIZE ();
11648char (*f) ();
11649
11650int
11651main ()
11652{
11653/* The GNU C library defines this for functions which it implements
11654 to always fail with ENOSYS. Some functions are actually named
11655 something starting with __ and the normal name is an alias. */
11656#if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
11657choke me
11658#else
11659f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11660#endif
11661
11662 ;
11663 return 0;
11664}
11665_ACEOF
11666rm -f conftest.$ac_objext conftest$ac_exeext
11667if { (eval echo "$as_me:11667: \"$ac_link\"") >&5
11668 (eval $ac_link) 2>&5
11669 ac_status=$?
11670 echo "$as_me:11670: \$? = $ac_status" >&5
11671 (exit $ac_status); } &&
11672 { ac_try='test -s conftest$ac_exeext'
11673 { (eval echo "$as_me:11673: \"$ac_try\"") >&5
11674 (eval $ac_try) 2>&5
11675 ac_status=$?
11676 echo "$as_me:11676: \$? = $ac_status" >&5
11677 (exit $ac_status); }; }; then
11678 ac_cv_func__nc_TABSIZE=yes
11679else
11680 echo "$as_me: failed program was:" >&5
11681cat conftest.$ac_ext >&5
11682ac_cv_func__nc_TABSIZE=no
11683fi
11684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11685fi
11686echo "$as_me:11686: result: $ac_cv_func__nc_TABSIZE" >&5
11687echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
11688if test $ac_cv_func__nc_TABSIZE = yes; then
11689 assume_reentrant=yes
11690else
11691 assume_reentrant=no
11692fi
11693
11694# Reentrant code has to be opaque; there's little advantage to making ncurses
11695# opaque outside of that, so there is no --enable-opaque option. We can use
11696# this option without --with-pthreads, but this will be always set for
11697# pthreads.
11698echo "$as_me:11698: checking if you want experimental reentrant code" >&5
11699echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11700
11701# Check whether --enable-reentrant or --disable-reentrant was given.
11702if test "${enable_reentrant+set}" = set; then
11703 enableval="$enable_reentrant"
11704 with_reentrant=$enableval
11705else
11706 with_reentrant=$assume_reentrant
11707fi;
11708echo "$as_me:11708: result: $with_reentrant" >&5
11709echo "${ECHO_T}$with_reentrant" >&6
11710if test "$with_reentrant" = yes ; then
11711 cf_cv_enable_reentrant=1
11712 if test $cf_cv_weak_symbols = yes ; then
11713
11714# remove pthread library from $LIBS
11715LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
11716
11717 elif test "$assume_reentrant" = no ; then
11718 LIB_SUFFIX="t${LIB_SUFFIX}"
11719 fi
11720
11721cat >>confdefs.h <<\EOF
11722#define USE_REENTRANT 1
11723EOF
11724
11725else
11726 cf_cv_enable_reentrant=0
11727fi
11728
11729### Allow using a different wrap-prefix
11730if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11731 echo "$as_me:11731: checking for prefix used to wrap public variables" >&5
11732echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11733
11734# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11735if test "${with_wrap_prefix+set}" = set; then
11736 withval="$with_wrap_prefix"
11737 NCURSES_WRAP_PREFIX=$withval
11738else
11739 NCURSES_WRAP_PREFIX=_nc_
11740fi;
11741 echo "$as_me:11741: result: $NCURSES_WRAP_PREFIX" >&5
11742echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11743else
11744 NCURSES_WRAP_PREFIX=_nc_
11745fi
11746
11747cat >>confdefs.h <<EOF
11748#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11749EOF
11750
11751###############################################################################
11752
11753### use option --disable-echo to suppress full display compiling commands
11754
11755echo "$as_me:11755: checking if you want to see long compiling messages" >&5
11756echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11757
11758# Check whether --enable-echo or --disable-echo was given.
11759if test "${enable_echo+set}" = set; then
11760 enableval="$enable_echo"
11761 test "$enableval" != no && enableval=yes
11762 if test "$enableval" != "yes" ; then
11763
11764 ECHO_LT='--silent'
11765 ECHO_LD='@echo linking $@;'
11766 RULE_CC='@echo compiling $<'
11767 SHOW_CC='@echo compiling $@'
11768 ECHO_CC='@'
11769
11770 else
11771
11772 ECHO_LT=''
11773 ECHO_LD=''
11774 RULE_CC=''
11775 SHOW_CC=''
11776 ECHO_CC=''
11777
11778 fi
11779else
11780 enableval=yes
11781
11782 ECHO_LT=''
11783 ECHO_LD=''
11784 RULE_CC=''
11785 SHOW_CC=''
11786 ECHO_CC=''
11787
11788fi;
11789echo "$as_me:11789: result: $enableval" >&5
11790echo "${ECHO_T}$enableval" >&6
11791
11792### use option --enable-warnings to turn on all gcc warnings
11793echo "$as_me:11793: checking if you want to see compiler warnings" >&5
11794echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11795
11796# Check whether --enable-warnings or --disable-warnings was given.
11797if test "${enable_warnings+set}" = set; then
11798 enableval="$enable_warnings"
11799 with_warnings=$enableval
11800fi;
11801echo "$as_me:11801: result: $with_warnings" >&5
11802echo "${ECHO_T}$with_warnings" >&6
11803
11804if test "x$with_warnings" = "xyes"; then
11805
11806 ADAFLAGS="$ADAFLAGS -gnatg"
11807
11808INTEL_COMPILER=no
11809
11810if test "$GCC" = yes ; then
11811 case $host_os in
11812 (linux*|gnu*)
11813 echo "$as_me:11813: checking if this is really Intel C compiler" >&5
11814echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11815 cf_save_CFLAGS="$CFLAGS"
11816 CFLAGS="$CFLAGS -no-gcc"
11817 cat >conftest.$ac_ext <<_ACEOF
11818#line 11818 "configure"
11819#include "confdefs.h"
11820
11821int
11822main ()
11823{
11824
11825#ifdef __INTEL_COMPILER
11826#else
11827make an error
11828#endif
11829
11830 ;
11831 return 0;
11832}
11833_ACEOF
11834rm -f conftest.$ac_objext
11835if { (eval echo "$as_me:11835: \"$ac_compile\"") >&5
11836 (eval $ac_compile) 2>&5
11837 ac_status=$?
11838 echo "$as_me:11838: \$? = $ac_status" >&5
11839 (exit $ac_status); } &&
11840 { ac_try='test -s conftest.$ac_objext'
11841 { (eval echo "$as_me:11841: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11843 ac_status=$?
11844 echo "$as_me:11844: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
11846 INTEL_COMPILER=yes
11847cf_save_CFLAGS="$cf_save_CFLAGS -we147"
11848
11849else
11850 echo "$as_me: failed program was:" >&5
11851cat conftest.$ac_ext >&5
11852fi
11853rm -f conftest.$ac_objext conftest.$ac_ext
11854 CFLAGS="$cf_save_CFLAGS"
11855 echo "$as_me:11855: result: $INTEL_COMPILER" >&5
11856echo "${ECHO_T}$INTEL_COMPILER" >&6
11857 ;;
11858 esac
11859fi
11860
11861CLANG_COMPILER=no
11862
11863if test "$GCC" = yes ; then
11864 echo "$as_me:11864: checking if this is really Clang C compiler" >&5
11865echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11866 cf_save_CFLAGS="$CFLAGS"
11867 CFLAGS="$CFLAGS -Qunused-arguments"
11868 cat >conftest.$ac_ext <<_ACEOF
11869#line 11869 "configure"
11870#include "confdefs.h"
11871
11872int
11873main ()
11874{
11875
11876#ifdef __clang__
11877#else
11878make an error
11879#endif
11880
11881 ;
11882 return 0;
11883}
11884_ACEOF
11885rm -f conftest.$ac_objext
11886if { (eval echo "$as_me:11886: \"$ac_compile\"") >&5
11887 (eval $ac_compile) 2>&5
11888 ac_status=$?
11889 echo "$as_me:11889: \$? = $ac_status" >&5
11890 (exit $ac_status); } &&
11891 { ac_try='test -s conftest.$ac_objext'
11892 { (eval echo "$as_me:11892: \"$ac_try\"") >&5
11893 (eval $ac_try) 2>&5
11894 ac_status=$?
11895 echo "$as_me:11895: \$? = $ac_status" >&5
11896 (exit $ac_status); }; }; then
11897 CLANG_COMPILER=yes
11898cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
11899
11900else
11901 echo "$as_me: failed program was:" >&5
11902cat conftest.$ac_ext >&5
11903fi
11904rm -f conftest.$ac_objext conftest.$ac_ext
11905 CFLAGS="$cf_save_CFLAGS"
11906 echo "$as_me:11906: result: $CLANG_COMPILER" >&5
11907echo "${ECHO_T}$CLANG_COMPILER" >&6
11908fi
11909
11910cat > conftest.$ac_ext <<EOF
11911#line 11911 "${as_me:-configure}"
11912int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11913EOF
11914
11915if test "$INTEL_COMPILER" = yes
11916then
11917# The "-wdXXX" options suppress warnings:
11918# remark #1419: external declaration in primary source file
11919# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11920# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11921# remark #193: zero used for undefined preprocessing identifier
11922# remark #593: variable "curs_sb_left_arrow" was set but never used
11923# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11924# remark #869: parameter "tw" was never referenced
11925# remark #981: operands are evaluated in unspecified order
11926# warning #279: controlling expression is constant
11927
11928 { echo "$as_me:11928: checking for $CC warning options..." >&5
11929echo "$as_me: checking for $CC warning options..." >&6;}
11930 cf_save_CFLAGS="$CFLAGS"
11931 EXTRA_CFLAGS="-Wall"
11932 for cf_opt in \
11933 wd1419 \
11934 wd1683 \
11935 wd1684 \
11936 wd193 \
11937 wd593 \
11938 wd279 \
11939 wd810 \
11940 wd869 \
11941 wd981
11942 do
11943 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11944 if { (eval echo "$as_me:11944: \"$ac_compile\"") >&5
11945 (eval $ac_compile) 2>&5
11946 ac_status=$?
11947 echo "$as_me:11947: \$? = $ac_status" >&5
11948 (exit $ac_status); }; then
11949 test -n "$verbose" && echo "$as_me:11949: result: ... -$cf_opt" >&5
11950echo "${ECHO_T}... -$cf_opt" >&6
11951 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11952 fi
11953 done
11954 CFLAGS="$cf_save_CFLAGS"
11955
11956elif test "$GCC" = yes
11957then
11958 { echo "$as_me:11958: checking for $CC warning options..." >&5
11959echo "$as_me: checking for $CC warning options..." >&6;}
11960 cf_save_CFLAGS="$CFLAGS"
11961 EXTRA_CFLAGS=
11962 cf_warn_CONST=""
11963 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11964 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
11965 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
11966 for cf_opt in W Wall \
11967 Wbad-function-cast \
11968 Wcast-align \
11969 Wcast-qual \
11970 Wdeclaration-after-statement \
11971 Wextra \
11972 Winline \
11973 Wmissing-declarations \
11974 Wmissing-prototypes \
11975 Wnested-externs \
11976 Wpointer-arith \
11977 Wshadow \
11978 Wstrict-prototypes \
11979 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
11980 do
11981 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11982 if { (eval echo "$as_me:11982: \"$ac_compile\"") >&5
11983 (eval $ac_compile) 2>&5
11984 ac_status=$?
11985 echo "$as_me:11985: \$? = $ac_status" >&5
11986 (exit $ac_status); }; then
11987 test -n "$verbose" && echo "$as_me:11987: result: ... -$cf_opt" >&5
11988echo "${ECHO_T}... -$cf_opt" >&6
11989 case $cf_opt in
11990 (Wcast-qual)
11991 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11992 ;;
11993 (Winline)
11994 case $GCC_VERSION in
11995 ([34].*)
11996 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
11997
11998echo "${as_me:-configure}:11998: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11999
12000 continue;;
12001 esac
12002 ;;
12003 (Wpointer-arith)
12004 case $GCC_VERSION in
12005 ([12].*)
12006 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12007
12008echo "${as_me:-configure}:12008: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12009
12010 continue;;
12011 esac
12012 ;;
12013 esac
12014 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12015 fi
12016 done
12017 CFLAGS="$cf_save_CFLAGS"
12018fi
12019rm -rf conftest*
12020
12021fi
12022
12023if test "$GCC" = yes
12024then
12025cat > conftest.i <<EOF
12026#ifndef GCC_PRINTF
12027#define GCC_PRINTF 0
12028#endif
12029#ifndef GCC_SCANF
12030#define GCC_SCANF 0
12031#endif
12032#ifndef GCC_NORETURN
12033#define GCC_NORETURN /* nothing */
12034#endif
12035#ifndef GCC_UNUSED
12036#define GCC_UNUSED /* nothing */
12037#endif
12038EOF
12039if test "$GCC" = yes
12040then
12041 { echo "$as_me:12041: checking for $CC __attribute__ directives..." >&5
12042echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12043cat > conftest.$ac_ext <<EOF
12044#line 12044 "${as_me:-configure}"
12045#include "confdefs.h"
12046#include "conftest.h"
12047#include "conftest.i"
12048#if GCC_PRINTF
12049#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12050#else
12051#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12052#endif
12053#if GCC_SCANF
12054#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12055#else
12056#define GCC_SCANFLIKE(fmt,var) /*nothing*/
12057#endif
12058extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12059extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12060extern void foo(void) GCC_NORETURN;
12061int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12062EOF
12063 cf_printf_attribute=no
12064 cf_scanf_attribute=no
12065 for cf_attribute in scanf printf unused noreturn
12066 do
12067
12068cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12069
12070 cf_directive="__attribute__(($cf_attribute))"
12071 echo "checking for $CC $cf_directive" 1>&5
12072
12073 case $cf_attribute in
12074 (printf)
12075 cf_printf_attribute=yes
12076 cat >conftest.h <<EOF
12077#define GCC_$cf_ATTRIBUTE 1
12078EOF
12079 ;;
12080 (scanf)
12081 cf_scanf_attribute=yes
12082 cat >conftest.h <<EOF
12083#define GCC_$cf_ATTRIBUTE 1
12084EOF
12085 ;;
12086 (*)
12087 cat >conftest.h <<EOF
12088#define GCC_$cf_ATTRIBUTE $cf_directive
12089EOF
12090 ;;
12091 esac
12092
12093 if { (eval echo "$as_me:12093: \"$ac_compile\"") >&5
12094 (eval $ac_compile) 2>&5
12095 ac_status=$?
12096 echo "$as_me:12096: \$? = $ac_status" >&5
12097 (exit $ac_status); }; then
12098 test -n "$verbose" && echo "$as_me:12098: result: ... $cf_attribute" >&5
12099echo "${ECHO_T}... $cf_attribute" >&6
12100 cat conftest.h >>confdefs.h
12101 case $cf_attribute in
12102 (noreturn)
12103
12104cat >>confdefs.h <<EOF
12105#define GCC_NORETURN $cf_directive
12106EOF
12107
12108 ;;
12109 (printf)
12110 cf_value='/* nothing */'
12111 if test "$cf_printf_attribute" != no ; then
12112 cf_value='__attribute__((format(printf,fmt,var)))'
12113
12114cat >>confdefs.h <<\EOF
12115#define GCC_PRINTF 1
12116EOF
12117
12118 fi
12119
12120cat >>confdefs.h <<EOF
12121#define GCC_PRINTFLIKE(fmt,var) $cf_value
12122EOF
12123
12124 ;;
12125 (scanf)
12126 cf_value='/* nothing */'
12127 if test "$cf_scanf_attribute" != no ; then
12128 cf_value='__attribute__((format(scanf,fmt,var)))'
12129
12130cat >>confdefs.h <<\EOF
12131#define GCC_SCANF 1
12132EOF
12133
12134 fi
12135
12136cat >>confdefs.h <<EOF
12137#define GCC_SCANFLIKE(fmt,var) $cf_value
12138EOF
12139
12140 ;;
12141 (unused)
12142
12143cat >>confdefs.h <<EOF
12144#define GCC_UNUSED $cf_directive
12145EOF
12146
12147 ;;
12148 esac
12149 fi
12150 done
12151else
12152 fgrep define conftest.i >>confdefs.h
12153fi
12154rm -rf conftest*
12155fi
12156
12157### use option --enable-assertions to turn on generation of assertion code
12158echo "$as_me:12158: checking if you want to enable runtime assertions" >&5
12159echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12160
12161# Check whether --enable-assertions or --disable-assertions was given.
12162if test "${enable_assertions+set}" = set; then
12163 enableval="$enable_assertions"
12164 with_assertions=$enableval
12165else
12166 with_assertions=no
12167fi;
12168echo "$as_me:12168: result: $with_assertions" >&5
12169echo "${ECHO_T}$with_assertions" >&6
12170if test -n "$GCC"
12171then
12172 if test "$with_assertions" = no
12173 then
12174 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12175 else
12176
12177 ADAFLAGS="$ADAFLAGS -gnata"
12178
12179 fi
12180fi
12181
12182### use option --disable-leaks to suppress "permanent" leaks, for testing
12183
12184cat >>confdefs.h <<\EOF
12185#define HAVE_NC_ALLOC_H 1
12186EOF
12187
12188### use option --enable-expanded to generate certain macros as functions
12189
12190# Check whether --enable-expanded or --disable-expanded was given.
12191if test "${enable_expanded+set}" = set; then
12192 enableval="$enable_expanded"
12193 test "$enableval" = yes &&
12194cat >>confdefs.h <<\EOF
12195#define NCURSES_EXPANDED 1
12196EOF
12197
12198fi;
12199
12200### use option --disable-macros to suppress macros in favor of functions
12201
12202# Check whether --enable-macros or --disable-macros was given.
12203if test "${enable_macros+set}" = set; then
12204 enableval="$enable_macros"
12205 test "$enableval" = no &&
12206cat >>confdefs.h <<\EOF
12207#define NCURSES_NOMACROS 1
12208EOF
12209
12210fi;
12211
12212# Normally we only add trace() to the debug-library. Allow this to be
12213# extended to all models of the ncurses library:
12214cf_all_traces=no
12215case "$CFLAGS $CPPFLAGS" in
12216(*-DTRACE*)
12217 cf_all_traces=yes
12218 ;;
12219esac
12220
12221echo "$as_me:12221: checking whether to add trace feature to all models" >&5
12222echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12223
12224# Check whether --with-trace or --without-trace was given.
12225if test "${with_trace+set}" = set; then
12226 withval="$with_trace"
12227 cf_with_trace=$withval
12228else
12229 cf_with_trace=$cf_all_traces
12230fi;
12231echo "$as_me:12231: result: $cf_with_trace" >&5
12232echo "${ECHO_T}$cf_with_trace" >&6
12233
12234if test "$cf_with_trace" = yes ; then
12235 ADA_TRACE=TRUE
12236
12237cf_fix_cppflags=no
12238cf_new_cflags=
12239cf_new_cppflags=
12240cf_new_extra_cppflags=
12241
12242for cf_add_cflags in -DTRACE
12243do
12244case $cf_fix_cppflags in
12245(no)
12246 case $cf_add_cflags in
12247 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12248 case $cf_add_cflags in
12249 (-D*)
12250 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12251
12252 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12253 && test -z "${cf_tst_cflags}" \
12254 && cf_fix_cppflags=yes
12255
12256 if test $cf_fix_cppflags = yes ; then
12257 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12258 continue
12259 elif test "${cf_tst_cflags}" = "\"'" ; then
12260 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12261 continue
12262 fi
12263 ;;
12264 esac
12265 case "$CPPFLAGS" in
12266 (*$cf_add_cflags)
12267 ;;
12268 (*)
12269 case $cf_add_cflags in
12270 (-D*)
12271 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12272
12273CPPFLAGS=`echo "$CPPFLAGS" | \
12274 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12275 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12276
12277 ;;
12278 esac
12279 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12280 ;;
12281 esac
12282 ;;
12283 (*)
12284 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12285 ;;
12286 esac
12287 ;;
12288(yes)
12289 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12290
12291 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12292
12293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12294 && test -z "${cf_tst_cflags}" \
12295 && cf_fix_cppflags=no
12296 ;;
12297esac
12298done
12299
12300if test -n "$cf_new_cflags" ; then
12301
12302 CFLAGS="$CFLAGS $cf_new_cflags"
12303fi
12304
12305if test -n "$cf_new_cppflags" ; then
12306
12307 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12308fi
12309
12310if test -n "$cf_new_extra_cppflags" ; then
12311
12312 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12313fi
12314
12315else
12316 ADA_TRACE=FALSE
12317fi
12318
12319echo "$as_me:12319: checking if we want to use GNAT projects" >&5
12320echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12321
12322# Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12323if test "${enable_gnat_projects+set}" = set; then
12324 enableval="$enable_gnat_projects"
12325 test "$enableval" != no && enableval=yes
12326 if test "$enableval" != "yes" ; then
12327 enable_gnat_projects=no
12328 else
12329 enable_gnat_projects=yes
12330 fi
12331else
12332 enableval=yes
12333 enable_gnat_projects=yes
12334
12335fi;
12336echo "$as_me:12336: result: $enable_gnat_projects" >&5
12337echo "${ECHO_T}$enable_gnat_projects" >&6
12338
12339### Checks for libraries.
12340case $cf_cv_system_name in
12341(*mingw32*)
12342 ;;
12343(*)
12344echo "$as_me:12344: checking for gettimeofday" >&5
12345echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12346if test "${ac_cv_func_gettimeofday+set}" = set; then
12347 echo $ECHO_N "(cached) $ECHO_C" >&6
12348else
12349 cat >conftest.$ac_ext <<_ACEOF
12350#line 12350 "configure"
12351#include "confdefs.h"
12352/* System header to define __stub macros and hopefully few prototypes,
12353 which can conflict with char gettimeofday (); below. */
12354#include <assert.h>
12355/* Override any gcc2 internal prototype to avoid an error. */
12356#ifdef __cplusplus
12357extern "C"
12358#endif
12359/* We use char because int might match the return type of a gcc2
12360 builtin and then its argument prototype would still apply. */
12361char gettimeofday ();
12362char (*f) ();
12363
12364int
12365main ()
12366{
12367/* The GNU C library defines this for functions which it implements
12368 to always fail with ENOSYS. Some functions are actually named
12369 something starting with __ and the normal name is an alias. */
12370#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12371choke me
12372#else
12373f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12374#endif
12375
12376 ;
12377 return 0;
12378}
12379_ACEOF
12380rm -f conftest.$ac_objext conftest$ac_exeext
12381if { (eval echo "$as_me:12381: \"$ac_link\"") >&5
12382 (eval $ac_link) 2>&5
12383 ac_status=$?
12384 echo "$as_me:12384: \$? = $ac_status" >&5
12385 (exit $ac_status); } &&
12386 { ac_try='test -s conftest$ac_exeext'
12387 { (eval echo "$as_me:12387: \"$ac_try\"") >&5
12388 (eval $ac_try) 2>&5
12389 ac_status=$?
12390 echo "$as_me:12390: \$? = $ac_status" >&5
12391 (exit $ac_status); }; }; then
12392 ac_cv_func_gettimeofday=yes
12393else
12394 echo "$as_me: failed program was:" >&5
12395cat conftest.$ac_ext >&5
12396ac_cv_func_gettimeofday=no
12397fi
12398rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12399fi
12400echo "$as_me:12400: result: $ac_cv_func_gettimeofday" >&5
12401echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12402if test $ac_cv_func_gettimeofday = yes; then
12403 cat >>confdefs.h <<\EOF
12404#define HAVE_GETTIMEOFDAY 1
12405EOF
12406
12407else
12408
12409echo "$as_me:12409: checking for gettimeofday in -lbsd" >&5
12410echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12411if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12412 echo $ECHO_N "(cached) $ECHO_C" >&6
12413else
12414 ac_check_lib_save_LIBS=$LIBS
12415LIBS="-lbsd $LIBS"
12416cat >conftest.$ac_ext <<_ACEOF
12417#line 12417 "configure"
12418#include "confdefs.h"
12419
12420/* Override any gcc2 internal prototype to avoid an error. */
12421#ifdef __cplusplus
12422extern "C"
12423#endif
12424/* We use char because int might match the return type of a gcc2
12425 builtin and then its argument prototype would still apply. */
12426char gettimeofday ();
12427int
12428main ()
12429{
12430gettimeofday ();
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435rm -f conftest.$ac_objext conftest$ac_exeext
12436if { (eval echo "$as_me:12436: \"$ac_link\"") >&5
12437 (eval $ac_link) 2>&5
12438 ac_status=$?
12439 echo "$as_me:12439: \$? = $ac_status" >&5
12440 (exit $ac_status); } &&
12441 { ac_try='test -s conftest$ac_exeext'
12442 { (eval echo "$as_me:12442: \"$ac_try\"") >&5
12443 (eval $ac_try) 2>&5
12444 ac_status=$?
12445 echo "$as_me:12445: \$? = $ac_status" >&5
12446 (exit $ac_status); }; }; then
12447 ac_cv_lib_bsd_gettimeofday=yes
12448else
12449 echo "$as_me: failed program was:" >&5
12450cat conftest.$ac_ext >&5
12451ac_cv_lib_bsd_gettimeofday=no
12452fi
12453rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12454LIBS=$ac_check_lib_save_LIBS
12455fi
12456echo "$as_me:12456: result: $ac_cv_lib_bsd_gettimeofday" >&5
12457echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12458if test $ac_cv_lib_bsd_gettimeofday = yes; then
12459
12460cat >>confdefs.h <<\EOF
12461#define HAVE_GETTIMEOFDAY 1
12462EOF
12463
12464 LIBS="$LIBS -lbsd"
12465fi
12466
12467fi
12468 ;;
12469esac
12470
12471### Checks for header files.
12472echo "$as_me:12472: checking for ANSI C header files" >&5
12473echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12474if test "${ac_cv_header_stdc+set}" = set; then
12475 echo $ECHO_N "(cached) $ECHO_C" >&6
12476else
12477 cat >conftest.$ac_ext <<_ACEOF
12478#line 12478 "configure"
12479#include "confdefs.h"
12480#include <stdlib.h>
12481#include <stdarg.h>
12482#include <string.h>
12483#include <float.h>
12484
12485_ACEOF
12486if { (eval echo "$as_me:12486: \"$ac_cpp conftest.$ac_ext\"") >&5
12487 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12488 ac_status=$?
12489 egrep -v '^ *\+' conftest.er1 >conftest.err
12490 rm -f conftest.er1
12491 cat conftest.err >&5
12492 echo "$as_me:12492: \$? = $ac_status" >&5
12493 (exit $ac_status); } >/dev/null; then
12494 if test -s conftest.err; then
12495 ac_cpp_err=$ac_c_preproc_warn_flag
12496 else
12497 ac_cpp_err=
12498 fi
12499else
12500 ac_cpp_err=yes
12501fi
12502if test -z "$ac_cpp_err"; then
12503 ac_cv_header_stdc=yes
12504else
12505 echo "$as_me: failed program was:" >&5
12506 cat conftest.$ac_ext >&5
12507 ac_cv_header_stdc=no
12508fi
12509rm -f conftest.err conftest.$ac_ext
12510
12511if test $ac_cv_header_stdc = yes; then
12512 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12513 cat >conftest.$ac_ext <<_ACEOF
12514#line 12514 "configure"
12515#include "confdefs.h"
12516#include <string.h>
12517
12518_ACEOF
12519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12520 egrep "memchr" >/dev/null 2>&1; then
12521 :
12522else
12523 ac_cv_header_stdc=no
12524fi
12525rm -rf conftest*
12526
12527fi
12528
12529if test $ac_cv_header_stdc = yes; then
12530 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12531 cat >conftest.$ac_ext <<_ACEOF
12532#line 12532 "configure"
12533#include "confdefs.h"
12534#include <stdlib.h>
12535
12536_ACEOF
12537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12538 egrep "free" >/dev/null 2>&1; then
12539 :
12540else
12541 ac_cv_header_stdc=no
12542fi
12543rm -rf conftest*
12544
12545fi
12546
12547if test $ac_cv_header_stdc = yes; then
12548 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12549 if test "$cross_compiling" = yes; then
12550 :
12551else
12552 cat >conftest.$ac_ext <<_ACEOF
12553#line 12553 "configure"
12554#include "confdefs.h"
12555#include <ctype.h>
12556#if ((' ' & 0x0FF) == 0x020)
12557# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12558# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12559#else
12560# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12561 || ('j' <= (c) && (c) <= 'r') \
12562 || ('s' <= (c) && (c) <= 'z'))
12563# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12564#endif
12565
12566#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12567int
12568main ()
12569{
12570 int i;
12571 for (i = 0; i < 256; i++)
12572 if (XOR (islower (i), ISLOWER (i))
12573 || toupper (i) != TOUPPER (i))
12574 $ac_main_return(2);
12575 $ac_main_return (0);
12576}
12577_ACEOF
12578rm -f conftest$ac_exeext
12579if { (eval echo "$as_me:12579: \"$ac_link\"") >&5
12580 (eval $ac_link) 2>&5
12581 ac_status=$?
12582 echo "$as_me:12582: \$? = $ac_status" >&5
12583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12584 { (eval echo "$as_me:12584: \"$ac_try\"") >&5
12585 (eval $ac_try) 2>&5
12586 ac_status=$?
12587 echo "$as_me:12587: \$? = $ac_status" >&5
12588 (exit $ac_status); }; }; then
12589 :
12590else
12591 echo "$as_me: program exited with status $ac_status" >&5
12592echo "$as_me: failed program was:" >&5
12593cat conftest.$ac_ext >&5
12594ac_cv_header_stdc=no
12595fi
12596rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12597fi
12598fi
12599fi
12600echo "$as_me:12600: result: $ac_cv_header_stdc" >&5
12601echo "${ECHO_T}$ac_cv_header_stdc" >&6
12602if test $ac_cv_header_stdc = yes; then
12603
12604cat >>confdefs.h <<\EOF
12605#define STDC_HEADERS 1
12606EOF
12607
12608fi
12609
12610ac_header_dirent=no
12611for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12612 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12613echo "$as_me:12613: checking for $ac_hdr that defines DIR" >&5
12614echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12615if eval "test \"\${$as_ac_Header+set}\" = set"; then
12616 echo $ECHO_N "(cached) $ECHO_C" >&6
12617else
12618 cat >conftest.$ac_ext <<_ACEOF
12619#line 12619 "configure"
12620#include "confdefs.h"
12621#include <sys/types.h>
12622#include <$ac_hdr>
12623
12624int
12625main ()
12626{
12627if ((DIR *) 0)
12628return 0;
12629 ;
12630 return 0;
12631}
12632_ACEOF
12633rm -f conftest.$ac_objext
12634if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635 (eval $ac_compile) 2>&5
12636 ac_status=$?
12637 echo "$as_me:12637: \$? = $ac_status" >&5
12638 (exit $ac_status); } &&
12639 { ac_try='test -s conftest.$ac_objext'
12640 { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641 (eval $ac_try) 2>&5
12642 ac_status=$?
12643 echo "$as_me:12643: \$? = $ac_status" >&5
12644 (exit $ac_status); }; }; then
12645 eval "$as_ac_Header=yes"
12646else
12647 echo "$as_me: failed program was:" >&5
12648cat conftest.$ac_ext >&5
12649eval "$as_ac_Header=no"
12650fi
12651rm -f conftest.$ac_objext conftest.$ac_ext
12652fi
12653echo "$as_me:12653: result: `eval echo '${'$as_ac_Header'}'`" >&5
12654echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12655if test `eval echo '${'$as_ac_Header'}'` = yes; then
12656 cat >>confdefs.h <<EOF
12657#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12658EOF
12659
12660ac_header_dirent=$ac_hdr; break
12661fi
12662
12663done
12664# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12665if test $ac_header_dirent = dirent.h; then
12666 echo "$as_me:12666: checking for opendir in -ldir" >&5
12667echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12668if test "${ac_cv_lib_dir_opendir+set}" = set; then
12669 echo $ECHO_N "(cached) $ECHO_C" >&6
12670else
12671 ac_check_lib_save_LIBS=$LIBS
12672LIBS="-ldir $LIBS"
12673cat >conftest.$ac_ext <<_ACEOF
12674#line 12674 "configure"
12675#include "confdefs.h"
12676
12677/* Override any gcc2 internal prototype to avoid an error. */
12678#ifdef __cplusplus
12679extern "C"
12680#endif
12681/* We use char because int might match the return type of a gcc2
12682 builtin and then its argument prototype would still apply. */
12683char opendir ();
12684int
12685main ()
12686{
12687opendir ();
12688 ;
12689 return 0;
12690}
12691_ACEOF
12692rm -f conftest.$ac_objext conftest$ac_exeext
12693if { (eval echo "$as_me:12693: \"$ac_link\"") >&5
12694 (eval $ac_link) 2>&5
12695 ac_status=$?
12696 echo "$as_me:12696: \$? = $ac_status" >&5
12697 (exit $ac_status); } &&
12698 { ac_try='test -s conftest$ac_exeext'
12699 { (eval echo "$as_me:12699: \"$ac_try\"") >&5
12700 (eval $ac_try) 2>&5
12701 ac_status=$?
12702 echo "$as_me:12702: \$? = $ac_status" >&5
12703 (exit $ac_status); }; }; then
12704 ac_cv_lib_dir_opendir=yes
12705else
12706 echo "$as_me: failed program was:" >&5
12707cat conftest.$ac_ext >&5
12708ac_cv_lib_dir_opendir=no
12709fi
12710rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12711LIBS=$ac_check_lib_save_LIBS
12712fi
12713echo "$as_me:12713: result: $ac_cv_lib_dir_opendir" >&5
12714echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12715if test $ac_cv_lib_dir_opendir = yes; then
12716 LIBS="$LIBS -ldir"
12717fi
12718
12719else
12720 echo "$as_me:12720: checking for opendir in -lx" >&5
12721echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12722if test "${ac_cv_lib_x_opendir+set}" = set; then
12723 echo $ECHO_N "(cached) $ECHO_C" >&6
12724else
12725 ac_check_lib_save_LIBS=$LIBS
12726LIBS="-lx $LIBS"
12727cat >conftest.$ac_ext <<_ACEOF
12728#line 12728 "configure"
12729#include "confdefs.h"
12730
12731/* Override any gcc2 internal prototype to avoid an error. */
12732#ifdef __cplusplus
12733extern "C"
12734#endif
12735/* We use char because int might match the return type of a gcc2
12736 builtin and then its argument prototype would still apply. */
12737char opendir ();
12738int
12739main ()
12740{
12741opendir ();
12742 ;
12743 return 0;
12744}
12745_ACEOF
12746rm -f conftest.$ac_objext conftest$ac_exeext
12747if { (eval echo "$as_me:12747: \"$ac_link\"") >&5
12748 (eval $ac_link) 2>&5
12749 ac_status=$?
12750 echo "$as_me:12750: \$? = $ac_status" >&5
12751 (exit $ac_status); } &&
12752 { ac_try='test -s conftest$ac_exeext'
12753 { (eval echo "$as_me:12753: \"$ac_try\"") >&5
12754 (eval $ac_try) 2>&5
12755 ac_status=$?
12756 echo "$as_me:12756: \$? = $ac_status" >&5
12757 (exit $ac_status); }; }; then
12758 ac_cv_lib_x_opendir=yes
12759else
12760 echo "$as_me: failed program was:" >&5
12761cat conftest.$ac_ext >&5
12762ac_cv_lib_x_opendir=no
12763fi
12764rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12765LIBS=$ac_check_lib_save_LIBS
12766fi
12767echo "$as_me:12767: result: $ac_cv_lib_x_opendir" >&5
12768echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12769if test $ac_cv_lib_x_opendir = yes; then
12770 LIBS="$LIBS -lx"
12771fi
12772
12773fi
12774
12775echo "$as_me:12775: checking whether time.h and sys/time.h may both be included" >&5
12776echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12777if test "${ac_cv_header_time+set}" = set; then
12778 echo $ECHO_N "(cached) $ECHO_C" >&6
12779else
12780 cat >conftest.$ac_ext <<_ACEOF
12781#line 12781 "configure"
12782#include "confdefs.h"
12783#include <sys/types.h>
12784#include <sys/time.h>
12785#include <time.h>
12786
12787int
12788main ()
12789{
12790if ((struct tm *) 0)
12791return 0;
12792 ;
12793 return 0;
12794}
12795_ACEOF
12796rm -f conftest.$ac_objext
12797if { (eval echo "$as_me:12797: \"$ac_compile\"") >&5
12798 (eval $ac_compile) 2>&5
12799 ac_status=$?
12800 echo "$as_me:12800: \$? = $ac_status" >&5
12801 (exit $ac_status); } &&
12802 { ac_try='test -s conftest.$ac_objext'
12803 { (eval echo "$as_me:12803: \"$ac_try\"") >&5
12804 (eval $ac_try) 2>&5
12805 ac_status=$?
12806 echo "$as_me:12806: \$? = $ac_status" >&5
12807 (exit $ac_status); }; }; then
12808 ac_cv_header_time=yes
12809else
12810 echo "$as_me: failed program was:" >&5
12811cat conftest.$ac_ext >&5
12812ac_cv_header_time=no
12813fi
12814rm -f conftest.$ac_objext conftest.$ac_ext
12815fi
12816echo "$as_me:12816: result: $ac_cv_header_time" >&5
12817echo "${ECHO_T}$ac_cv_header_time" >&6
12818if test $ac_cv_header_time = yes; then
12819
12820cat >>confdefs.h <<\EOF
12821#define TIME_WITH_SYS_TIME 1
12822EOF
12823
12824fi
12825
12826### checks for compiler characteristics
12827ac_ext=c
12828ac_cpp='$CPP $CPPFLAGS'
12829ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12830ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12831ac_compiler_gnu=$ac_cv_c_compiler_gnu
12832ac_main_return=return
12833
12834echo "$as_me:12834: checking for an ANSI C-conforming const" >&5
12835echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12836if test "${ac_cv_c_const+set}" = set; then
12837 echo $ECHO_N "(cached) $ECHO_C" >&6
12838else
12839 cat >conftest.$ac_ext <<_ACEOF
12840#line 12840 "configure"
12841#include "confdefs.h"
12842
12843int
12844main ()
12845{
12846/* FIXME: Include the comments suggested by Paul. */
12847#ifndef __cplusplus
12848 /* Ultrix mips cc rejects this. */
12849 typedef int charset[2];
12850 const charset x;
12851 /* SunOS 4.1.1 cc rejects this. */
12852 char const *const *ccp;
12853 char **p;
12854 /* NEC SVR4.0.2 mips cc rejects this. */
12855 struct point {int x, y;};
12856 static struct point const zero = {0,0};
12857 /* AIX XL C 1.02.0.0 rejects this.
12858 It does not let you subtract one const X* pointer from another in
12859 an arm of an if-expression whose if-part is not a constant
12860 expression */
12861 const char *g = "string";
12862 ccp = &g + (g ? g-g : 0);
12863 /* HPUX 7.0 cc rejects these. */
12864 ++ccp;
12865 p = (char**) ccp;
12866 ccp = (char const *const *) p;
12867 { /* SCO 3.2v4 cc rejects this. */
12868 char *t;
12869 char const *s = 0 ? (char *) 0 : (char const *) 0;
12870
12871 *t++ = 0;
12872 }
12873 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12874 int x[] = {25, 17};
12875 const int *foo = &x[0];
12876 ++foo;
12877 }
12878 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12879 typedef const int *iptr;
12880 iptr p = 0;
12881 ++p;
12882 }
12883 { /* AIX XL C 1.02.0.0 rejects this saying
12884 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12885 struct s { int j; const int *ap[3]; };
12886 struct s *b; b->j = 5;
12887 }
12888 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12889 const int foo = 10;
12890 }
12891#endif
12892
12893 ;
12894 return 0;
12895}
12896_ACEOF
12897rm -f conftest.$ac_objext
12898if { (eval echo "$as_me:12898: \"$ac_compile\"") >&5
12899 (eval $ac_compile) 2>&5
12900 ac_status=$?
12901 echo "$as_me:12901: \$? = $ac_status" >&5
12902 (exit $ac_status); } &&
12903 { ac_try='test -s conftest.$ac_objext'
12904 { (eval echo "$as_me:12904: \"$ac_try\"") >&5
12905 (eval $ac_try) 2>&5
12906 ac_status=$?
12907 echo "$as_me:12907: \$? = $ac_status" >&5
12908 (exit $ac_status); }; }; then
12909 ac_cv_c_const=yes
12910else
12911 echo "$as_me: failed program was:" >&5
12912cat conftest.$ac_ext >&5
12913ac_cv_c_const=no
12914fi
12915rm -f conftest.$ac_objext conftest.$ac_ext
12916fi
12917echo "$as_me:12917: result: $ac_cv_c_const" >&5
12918echo "${ECHO_T}$ac_cv_c_const" >&6
12919if test $ac_cv_c_const = no; then
12920
12921cat >>confdefs.h <<\EOF
12922#define const
12923EOF
12924
12925fi
12926
12927### Checks for external-data
12928
12929echo "$as_me:12929: checking if data-only library module links" >&5
12930echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12931if test "${cf_cv_link_dataonly+set}" = set; then
12932 echo $ECHO_N "(cached) $ECHO_C" >&6
12933else
12934
12935 rm -f conftest.a
12936 cat >conftest.$ac_ext <<EOF
12937#line 12937 "configure"
12938int testdata[3] = { 123, 456, 789 };
12939EOF
12940 if { (eval echo "$as_me:12940: \"$ac_compile\"") >&5
12941 (eval $ac_compile) 2>&5
12942 ac_status=$?
12943 echo "$as_me:12943: \$? = $ac_status" >&5
12944 (exit $ac_status); } ; then
12945 mv conftest.o data.o && \
12946 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
12947 fi
12948 rm -f conftest.$ac_ext data.o
12949 cat >conftest.$ac_ext <<EOF
12950#line 12950 "configure"
12951int testfunc()
12952{
12953#if defined(NeXT)
12954 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
12955#else
12956 extern int testdata[3];
12957 return testdata[0] == 123
12958 && testdata[1] == 456
12959 && testdata[2] == 789;
12960#endif
12961}
12962EOF
12963 if { (eval echo "$as_me:12963: \"$ac_compile\"") >&5
12964 (eval $ac_compile) 2>&5
12965 ac_status=$?
12966 echo "$as_me:12966: \$? = $ac_status" >&5
12967 (exit $ac_status); }; then
12968 mv conftest.o func.o && \
12969 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
12970 fi
12971 rm -f conftest.$ac_ext func.o
12972 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
12973 cf_saveLIBS="$LIBS"
12974 LIBS="conftest.a $LIBS"
12975 if test "$cross_compiling" = yes; then
12976 cf_cv_link_dataonly=unknown
12977else
12978 cat >conftest.$ac_ext <<_ACEOF
12979#line 12979 "configure"
12980#include "confdefs.h"
12981
12982 int main()
12983 {
12984 extern int testfunc();
12985 ${cf_cv_main_return:-return} (!testfunc());
12986 }
12987
12988_ACEOF
12989rm -f conftest$ac_exeext
12990if { (eval echo "$as_me:12990: \"$ac_link\"") >&5
12991 (eval $ac_link) 2>&5
12992 ac_status=$?
12993 echo "$as_me:12993: \$? = $ac_status" >&5
12994 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12995 { (eval echo "$as_me:12995: \"$ac_try\"") >&5
12996 (eval $ac_try) 2>&5
12997 ac_status=$?
12998 echo "$as_me:12998: \$? = $ac_status" >&5
12999 (exit $ac_status); }; }; then
13000 cf_cv_link_dataonly=yes
13001else
13002 echo "$as_me: program exited with status $ac_status" >&5
13003echo "$as_me: failed program was:" >&5
13004cat conftest.$ac_ext >&5
13005cf_cv_link_dataonly=no
13006fi
13007rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13008fi
13009 LIBS="$cf_saveLIBS"
13010
13011fi
13012
13013echo "$as_me:13013: result: $cf_cv_link_dataonly" >&5
13014echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13015
13016if test "$cf_cv_link_dataonly" = no ; then
13017
13018cat >>confdefs.h <<\EOF
13019#define BROKEN_LINKER 1
13020EOF
13021
13022 BROKEN_LINKER=1
13023fi
13024
13025### Checks for library functions.
13026
13027echo "$as_me:13027: checking for working mkstemp" >&5
13028echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13029if test "${cf_cv_func_mkstemp+set}" = set; then
13030 echo $ECHO_N "(cached) $ECHO_C" >&6
13031else
13032
13033rm -rf conftest*
13034if test "$cross_compiling" = yes; then
13035 cf_cv_func_mkstemp=maybe
13036else
13037 cat >conftest.$ac_ext <<_ACEOF
13038#line 13038 "configure"
13039#include "confdefs.h"
13040
13041#include <sys/types.h>
13042#include <stdlib.h>
13043#include <stdio.h>
13044#include <string.h>
13045#include <sys/stat.h>
13046int main()
13047{
13048 char *tmpl = "conftestXXXXXX";
13049 char name[2][80];
13050 int n;
13051 int result = 0;
13052 int fd;
13053 struct stat sb;
13054
13055 umask(077);
13056 for (n = 0; n < 2; ++n) {
13057 strcpy(name[n], tmpl);
13058 if ((fd = mkstemp(name[n])) >= 0) {
13059 if (!strcmp(name[n], tmpl)
13060 || stat(name[n], &sb) != 0
13061 || (sb.st_mode & S_IFMT) != S_IFREG
13062 || (sb.st_mode & 077) != 0) {
13063 result = 1;
13064 }
13065 close(fd);
13066 }
13067 }
13068 if (result == 0
13069 && !strcmp(name[0], name[1]))
13070 result = 1;
13071 ${cf_cv_main_return:-return}(result);
13072}
13073
13074_ACEOF
13075rm -f conftest$ac_exeext
13076if { (eval echo "$as_me:13076: \"$ac_link\"") >&5
13077 (eval $ac_link) 2>&5
13078 ac_status=$?
13079 echo "$as_me:13079: \$? = $ac_status" >&5
13080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13081 { (eval echo "$as_me:13081: \"$ac_try\"") >&5
13082 (eval $ac_try) 2>&5
13083 ac_status=$?
13084 echo "$as_me:13084: \$? = $ac_status" >&5
13085 (exit $ac_status); }; }; then
13086 cf_cv_func_mkstemp=yes
13087
13088else
13089 echo "$as_me: program exited with status $ac_status" >&5
13090echo "$as_me: failed program was:" >&5
13091cat conftest.$ac_ext >&5
13092cf_cv_func_mkstemp=no
13093
13094fi
13095rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13096fi
13097
13098fi
13099echo "$as_me:13099: result: $cf_cv_func_mkstemp" >&5
13100echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13101if test "x$cf_cv_func_mkstemp" = xmaybe ; then
13102 echo "$as_me:13102: checking for mkstemp" >&5
13103echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13104if test "${ac_cv_func_mkstemp+set}" = set; then
13105 echo $ECHO_N "(cached) $ECHO_C" >&6
13106else
13107 cat >conftest.$ac_ext <<_ACEOF
13108#line 13108 "configure"
13109#include "confdefs.h"
13110/* System header to define __stub macros and hopefully few prototypes,
13111 which can conflict with char mkstemp (); below. */
13112#include <assert.h>
13113/* Override any gcc2 internal prototype to avoid an error. */
13114#ifdef __cplusplus
13115extern "C"
13116#endif
13117/* We use char because int might match the return type of a gcc2
13118 builtin and then its argument prototype would still apply. */
13119char mkstemp ();
13120char (*f) ();
13121
13122int
13123main ()
13124{
13125/* The GNU C library defines this for functions which it implements
13126 to always fail with ENOSYS. Some functions are actually named
13127 something starting with __ and the normal name is an alias. */
13128#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13129choke me
13130#else
13131f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13132#endif
13133
13134 ;
13135 return 0;
13136}
13137_ACEOF
13138rm -f conftest.$ac_objext conftest$ac_exeext
13139if { (eval echo "$as_me:13139: \"$ac_link\"") >&5
13140 (eval $ac_link) 2>&5
13141 ac_status=$?
13142 echo "$as_me:13142: \$? = $ac_status" >&5
13143 (exit $ac_status); } &&
13144 { ac_try='test -s conftest$ac_exeext'
13145 { (eval echo "$as_me:13145: \"$ac_try\"") >&5
13146 (eval $ac_try) 2>&5
13147 ac_status=$?
13148 echo "$as_me:13148: \$? = $ac_status" >&5
13149 (exit $ac_status); }; }; then
13150 ac_cv_func_mkstemp=yes
13151else
13152 echo "$as_me: failed program was:" >&5
13153cat conftest.$ac_ext >&5
13154ac_cv_func_mkstemp=no
13155fi
13156rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13157fi
13158echo "$as_me:13158: result: $ac_cv_func_mkstemp" >&5
13159echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13160
13161fi
13162if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
13163
13164cat >>confdefs.h <<\EOF
13165#define HAVE_MKSTEMP 1
13166EOF
13167
13168fi
13169
13170if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13171 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13172 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13173fi
13174
13175cf_with_ada=yes
13176if test "$cf_with_ada" != "no" ; then
13177
13178cf_ada_make=gnatmake
13179# Extract the first word of "$cf_ada_make", so it can be a program name with args.
13180set dummy $cf_ada_make; ac_word=$2
13181echo "$as_me:13181: checking for $ac_word" >&5
13182echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13183if test "${ac_cv_prog_gnat_exists+set}" = set; then
13184 echo $ECHO_N "(cached) $ECHO_C" >&6
13185else
13186 if test -n "$gnat_exists"; then
13187 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13188else
13189 ac_save_IFS=$IFS; IFS=$ac_path_separator
13190ac_dummy="$PATH"
13191for ac_dir in $ac_dummy; do
13192 IFS=$ac_save_IFS
13193 test -z "$ac_dir" && ac_dir=.
13194 $as_executable_p "$ac_dir/$ac_word" || continue
13195ac_cv_prog_gnat_exists="yes"
13196echo "$as_me:13196: found $ac_dir/$ac_word" >&5
13197break
13198done
13199
13200 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13201fi
13202fi
13203gnat_exists=$ac_cv_prog_gnat_exists
13204if test -n "$gnat_exists"; then
13205 echo "$as_me:13205: result: $gnat_exists" >&5
13206echo "${ECHO_T}$gnat_exists" >&6
13207else
13208 echo "$as_me:13208: result: no" >&5
13209echo "${ECHO_T}no" >&6
13210fi
13211
13212if test "$ac_cv_prog_gnat_exists" = no; then
13213 cf_ada_make=
13214 cf_cv_prog_gnat_correct=no
13215else
13216
13217echo "$as_me:13217: checking for gnat version" >&5
13218echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13219cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
13220 grep '[0-9].[0-9][0-9]*' |\
13221 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13222echo "$as_me:13222: result: $cf_gnat_version" >&5
13223echo "${ECHO_T}$cf_gnat_version" >&6
13224
13225case $cf_gnat_version in
13226(3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
13227 cf_cv_prog_gnat_correct=yes
13228 ;;
13229(*)
13230 { echo "$as_me:13230: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
13231echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
13232 cf_cv_prog_gnat_correct=no
13233 ;;
13234esac
13235
13236 # Extract the first word of "m4", so it can be a program name with args.
13237set dummy m4; ac_word=$2
13238echo "$as_me:13238: checking for $ac_word" >&5
13239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13240if test "${ac_cv_prog_M4_exists+set}" = set; then
13241 echo $ECHO_N "(cached) $ECHO_C" >&6
13242else
13243 if test -n "$M4_exists"; then
13244 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13245else
13246 ac_save_IFS=$IFS; IFS=$ac_path_separator
13247ac_dummy="$PATH"
13248for ac_dir in $ac_dummy; do
13249 IFS=$ac_save_IFS
13250 test -z "$ac_dir" && ac_dir=.
13251 $as_executable_p "$ac_dir/$ac_word" || continue
13252ac_cv_prog_M4_exists="yes"
13253echo "$as_me:13253: found $ac_dir/$ac_word" >&5
13254break
13255done
13256
13257 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13258fi
13259fi
13260M4_exists=$ac_cv_prog_M4_exists
13261if test -n "$M4_exists"; then
13262 echo "$as_me:13262: result: $M4_exists" >&5
13263echo "${ECHO_T}$M4_exists" >&6
13264else
13265 echo "$as_me:13265: result: no" >&5
13266echo "${ECHO_T}no" >&6
13267fi
13268
13269 if test "$ac_cv_prog_M4_exists" = no; then
13270 cf_cv_prog_gnat_correct=no
13271 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13272 fi
13273 if test "$cf_cv_prog_gnat_correct" = yes; then
13274 echo "$as_me:13274: checking if GNAT works" >&5
13275echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13276
13277rm -rf conftest* *~conftest*
13278cat >>conftest.ads <<CF_EOF
13279procedure conftest;
13280CF_EOF
13281cat >>conftest.adb <<CF_EOF
13282with Text_IO;
13283with GNAT.OS_Lib;
13284procedure conftest is
13285begin
13286 Text_IO.Put ("Hello World");
13287 Text_IO.New_Line;
13288 GNAT.OS_Lib.OS_Exit (0);
13289end conftest;
13290CF_EOF
13291if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13292 if ( ./conftest 1>&5 2>&1 ) ; then
13293 cf_cv_prog_gnat_correct=yes
13294 else
13295 cf_cv_prog_gnat_correct=no
13296 fi
13297else
13298 cf_cv_prog_gnat_correct=no
13299fi
13300rm -rf conftest* *~conftest*
13301
13302 echo "$as_me:13302: result: $cf_cv_prog_gnat_correct" >&5
13303echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13304 fi
13305fi
13306
13307 if test "$cf_cv_prog_gnat_correct" = yes; then
13308
13309 echo "$as_me:13309: checking optimization options for ADAFLAGS" >&5
13310echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
13311 case "$CFLAGS" in
13312 (*-g*)
13313
13314 ADAFLAGS="$ADAFLAGS -g"
13315
13316 ;;
13317 esac
13318 case "$CFLAGS" in
13319 (*-O*)
13320 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
13321
13322 ADAFLAGS="$ADAFLAGS $cf_O_flag"
13323
13324 ;;
13325 esac
13326 echo "$as_me:13326: result: $ADAFLAGS" >&5
13327echo "${ECHO_T}$ADAFLAGS" >&6
13328
13329echo "$as_me:13329: checking if GNATPREP supports -T option" >&5
13330echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
13331if test "${cf_cv_gnatprep_opt_t+set}" = set; then
13332 echo $ECHO_N "(cached) $ECHO_C" >&6
13333else
13334
13335cf_cv_gnatprep_opt_t=no
13336gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
13337
13338fi
13339echo "$as_me:13339: result: $cf_cv_gnatprep_opt_t" >&5
13340echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
13341test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
13342
13343echo "$as_me:13343: checking if GNAT supports generics" >&5
13344echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
13345case $cf_gnat_version in
13346(3.[1-9]*|[4-9].*)
13347 cf_gnat_generics=yes
13348 ;;
13349(*)
13350 cf_gnat_generics=no
13351 ;;
13352esac
13353echo "$as_me:13353: result: $cf_gnat_generics" >&5
13354echo "${ECHO_T}$cf_gnat_generics" >&6
13355
13356if test "$cf_gnat_generics" = yes
13357then
13358 cf_compile_generics=generics
13359 cf_generic_objects="\${GENOBJS}"
13360else
13361 cf_compile_generics=
13362 cf_generic_objects=
13363fi
13364
13365echo "$as_me:13365: checking if GNAT supports SIGINT" >&5
13366echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
13367if test "${cf_cv_gnat_sigint+set}" = set; then
13368 echo $ECHO_N "(cached) $ECHO_C" >&6
13369else
13370
13371rm -rf conftest* *~conftest*
13372cat >>conftest.ads <<CF_EOF
13373with Ada.Interrupts.Names;
13374
13375package ConfTest is
13376
13377 pragma Warnings (Off); -- the next pragma exists since 3.11p
13378 pragma Unreserve_All_Interrupts;
13379 pragma Warnings (On);
13380
13381 protected Process is
13382 procedure Stop;
13383 function Continue return Boolean;
13384 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
13385 private
13386 Done : Boolean := False;
13387 end Process;
13388
13389end ConfTest;
13390CF_EOF
13391cat >>conftest.adb <<CF_EOF
13392package body ConfTest is
13393 protected body Process is
13394 procedure Stop is
13395 begin
13396 Done := True;
13397 end Stop;
13398 function Continue return Boolean is
13399 begin
13400 return not Done;
13401 end Continue;
13402 end Process;
13403end ConfTest;
13404CF_EOF
13405if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13406 cf_cv_gnat_sigint=yes
13407else
13408 cf_cv_gnat_sigint=no
13409fi
13410rm -rf conftest* *~conftest*
13411
13412fi
13413echo "$as_me:13413: result: $cf_cv_gnat_sigint" >&5
13414echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
13415
13416if test $cf_cv_gnat_sigint = yes ; then
13417 USE_GNAT_SIGINT=""
13418else
13419 USE_GNAT_SIGINT="#"
13420fi
13421
13422cf_gnat_libraries=no
13423cf_gnat_projects=no
13424
13425if test "$enable_gnat_projects" != no ; then
13426echo "$as_me:13426: checking if GNAT supports project files" >&5
13427echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
13428case $cf_gnat_version in
13429(3.[0-9]*)
13430 ;;
13431(*)
13432 case $cf_cv_system_name in
13433 (cygwin*|msys*)
13434 ;;
13435 (*)
13436 mkdir conftest.src conftest.bin conftest.lib
13437 cd conftest.src
13438 rm -rf conftest* *~conftest*
13439 cat >>library.gpr <<CF_EOF
13440project Library is
13441 Kind := External ("LIB_KIND");
13442 for Library_Name use "ConfTest";
13443 for Object_Dir use ".";
13444 for Library_ALI_Dir use External("LIBRARY_DIR");
13445 for Library_Version use External ("SONAME");
13446 for Library_Kind use Kind;
13447 for Library_Dir use External("BUILD_DIR");
13448 Source_Dir := External ("SOURCE_DIR");
13449 for Source_Dirs use (Source_Dir);
13450end Library;
13451CF_EOF
13452 cat >>confpackage.ads <<CF_EOF
13453package ConfPackage is
13454 procedure conftest;
13455end ConfPackage;
13456CF_EOF
13457 cat >>confpackage.adb <<CF_EOF
13458with Text_IO;
13459package body ConfPackage is
13460 procedure conftest is
13461 begin
13462 Text_IO.Put ("Hello World");
13463 Text_IO.New_Line;
13464 end conftest;
13465end ConfPackage;
13466CF_EOF
13467 if ( $cf_ada_make $ADAFLAGS \
13468 -Plibrary.gpr \
13469 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
13470 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
13471 -XSOURCE_DIR=`pwd` \
13472 -XSONAME=libConfTest.so.1 \
13473 -XLIB_KIND=static 1>&5 2>&1 ) ; then
13474 cf_gnat_projects=yes
13475 fi
13476 cd ..
13477 if test -f conftest.lib/confpackage.ali
13478 then
13479 cf_gnat_libraries=yes
13480 fi
13481 rm -rf conftest* *~conftest*
13482 ;;
13483 esac
13484 ;;
13485esac
13486echo "$as_me:13486: result: $cf_gnat_projects" >&5
13487echo "${ECHO_T}$cf_gnat_projects" >&6
13488fi # enable_gnat_projects
13489
13490if test $cf_gnat_projects = yes
13491then
13492 echo "$as_me:13492: checking if GNAT supports libraries" >&5
13493echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
13494 echo "$as_me:13494: result: $cf_gnat_libraries" >&5
13495echo "${ECHO_T}$cf_gnat_libraries" >&6
13496fi
13497
13498if test "$cf_gnat_projects" = yes
13499then
13500 USE_OLD_MAKERULES="#"
13501 USE_GNAT_PROJECTS=""
13502else
13503 USE_OLD_MAKERULES=""
13504 USE_GNAT_PROJECTS="#"
13505fi
13506
13507if test "$cf_gnat_libraries" = yes
13508then
13509 USE_GNAT_LIBRARIES=""
13510else
13511 USE_GNAT_LIBRARIES="#"
13512fi
13513
13514echo "$as_me:13514: checking for ada-compiler" >&5
13515echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
13516
13517# Check whether --with-ada-compiler or --without-ada-compiler was given.
13518if test "${with_ada_compiler+set}" = set; then
13519 withval="$with_ada_compiler"
13520 cf_ada_compiler=$withval
13521else
13522 cf_ada_compiler=gnatmake
13523fi;
13524
13525echo "$as_me:13525: result: $cf_ada_compiler" >&5
13526echo "${ECHO_T}$cf_ada_compiler" >&6
13527
13528 cf_ada_package=terminal_interface
13529
13530echo "$as_me:13530: checking for ada-include" >&5
13531echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
13532
13533# Check whether --with-ada-include or --without-ada-include was given.
13534if test "${with_ada_include+set}" = set; then
13535 withval="$with_ada_include"
13536
13537else
13538 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
13539fi; if test -n "$prefix/share/ada/adainclude" ; then
13540
13541if test "x$prefix" != xNONE; then
13542 cf_path_syntax="$prefix"
13543else
13544 cf_path_syntax="$ac_default_prefix"
13545fi
13546
13547case ".$withval" in
13548(.\$\(*\)*|.\'*\'*)
13549 ;;
13550(..|./*|.\\*)
13551 ;;
13552(.[a-zA-Z]:[\\/]*) # OS/2 EMX
13553 ;;
13554(.\${*prefix}*|.\${*dir}*)
13555 eval withval="$withval"
13556 case ".$withval" in
13557 (.NONE/*)
13558 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13559 ;;
13560 esac
13561 ;;
13562(.no|.NONE/*)
13563 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13564 ;;
13565(*)
13566 { { echo "$as_me:13566: error: expected a pathname, not \"$withval\"" >&5
13567echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13568 { (exit 1); exit 1; }; }
13569 ;;
13570esac
13571
13572fi
13573eval ADA_INCLUDE="$withval"
13574
13575echo "$as_me:13575: result: $ADA_INCLUDE" >&5
13576echo "${ECHO_T}$ADA_INCLUDE" >&6
13577
13578echo "$as_me:13578: checking for ada-objects" >&5
13579echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
13580
13581# Check whether --with-ada-objects or --without-ada-objects was given.
13582if test "${with_ada_objects+set}" = set; then
13583 withval="$with_ada_objects"
13584
13585else
13586 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
13587fi; if test -n "$prefix/lib/ada/adalib" ; then
13588
13589if test "x$prefix" != xNONE; then
13590 cf_path_syntax="$prefix"
13591else
13592 cf_path_syntax="$ac_default_prefix"
13593fi
13594
13595case ".$withval" in
13596(.\$\(*\)*|.\'*\'*)
13597 ;;
13598(..|./*|.\\*)
13599 ;;
13600(.[a-zA-Z]:[\\/]*) # OS/2 EMX
13601 ;;
13602(.\${*prefix}*|.\${*dir}*)
13603 eval withval="$withval"
13604 case ".$withval" in
13605 (.NONE/*)
13606 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13607 ;;
13608 esac
13609 ;;
13610(.no|.NONE/*)
13611 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
13612 ;;
13613(*)
13614 { { echo "$as_me:13614: error: expected a pathname, not \"$withval\"" >&5
13615echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13616 { (exit 1); exit 1; }; }
13617 ;;
13618esac
13619
13620fi
13621eval ADA_OBJECTS="$withval"
13622
13623echo "$as_me:13623: result: $ADA_OBJECTS" >&5
13624echo "${ECHO_T}$ADA_OBJECTS" >&6
13625
13626echo "$as_me:13626: checking if an Ada95 shared-library should be built" >&5
13627echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
13628
13629# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
13630if test "${with_ada_sharedlib+set}" = set; then
13631 withval="$with_ada_sharedlib"
13632 with_ada_sharedlib=$withval
13633else
13634 with_ada_sharedlib=no
13635fi;
13636echo "$as_me:13636: result: $with_ada_sharedlib" >&5
13637echo "${ECHO_T}$with_ada_sharedlib" >&6
13638
13639ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
13640MAKE_ADA_SHAREDLIB="#"
13641
13642if test "x$with_ada_sharedlib" != xno
13643then
13644 MAKE_ADA_SHAREDLIB=
13645 if test "x$with_ada_sharedlib" != xyes
13646 then
13647 ADA_SHAREDLIB="$with_ada_sharedlib"
13648 fi
13649fi
13650
13651 else
13652 { { echo "$as_me:13652: error: No usable Ada compiler found" >&5
13653echo "$as_me: error: No usable Ada compiler found" >&2;}
13654 { (exit 1); exit 1; }; }
13655 fi
13656else
13657 { { echo "$as_me:13657: error: The Ada compiler is needed for this package" >&5
13658echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
13659 { (exit 1); exit 1; }; }
13660fi
13661
13662################################################################################
13663
13664# not needed
13665TINFO_LDFLAGS2=
13666
13667TINFO_LIBS=
13668
13669### Construct the list of include-directories to be generated
13670
13671if test "$srcdir" != "."; then
13672 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
13673fi
13674CPPFLAGS="-I../include $CPPFLAGS"
13675if test "$srcdir" != "."; then
13676 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
13677fi
13678CPPFLAGS="-I. $CPPFLAGS"
13679
13680ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
13681if test "$srcdir" != "."; then
13682 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
13683fi
13684if test "$GCC" != yes; then
13685 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13686elif test "$includedir" != "/usr/include"; then
13687 if test "$includedir" = '${prefix}/include' ; then
13688 if test x$prefix != x/usr ; then
13689 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13690 fi
13691 else
13692 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
13693 fi
13694fi
13695
13696### Build up pieces for makefile rules
13697echo "$as_me:13697: checking default library suffix" >&5
13698echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
13699
13700 case $DFT_LWR_MODEL in
13701 (libtool) DFT_ARG_SUFFIX='' ;;
13702 (normal) DFT_ARG_SUFFIX='' ;;
13703 (debug) DFT_ARG_SUFFIX='_g' ;;
13704 (profile) DFT_ARG_SUFFIX='_p' ;;
13705 (shared) DFT_ARG_SUFFIX='' ;;
13706 esac
13707 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
13708echo "$as_me:13708: result: $DFT_ARG_SUFFIX" >&5
13709echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
13710
13711echo "$as_me:13711: checking default library-dependency suffix" >&5
13712echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
13713
13714 case X$DFT_LWR_MODEL in
13715 (Xlibtool)
13716 DFT_LIB_SUFFIX='.la'
13717 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13718 ;;
13719 (Xdebug)
13720 DFT_LIB_SUFFIX='_g.a'
13721 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13722 ;;
13723 (Xprofile)
13724 DFT_LIB_SUFFIX='_p.a'
13725 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13726 ;;
13727 (Xshared)
13728 case $cf_cv_system_name in
13729 (aix[5-7]*)
13730 DFT_LIB_SUFFIX='.so'
13731 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13732 ;;
13733 (cygwin*|msys*|mingw*)
13734 DFT_LIB_SUFFIX='.dll'
13735 DFT_DEP_SUFFIX='.dll.a'
13736 ;;
13737 (darwin*)
13738 DFT_LIB_SUFFIX='.dylib'
13739 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13740 ;;
13741 (hpux*)
13742 case $target in
13743 (ia64*)
13744 DFT_LIB_SUFFIX='.so'
13745 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13746 ;;
13747 (*)
13748 DFT_LIB_SUFFIX='.sl'
13749 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13750 ;;
13751 esac
13752 ;;
13753 (*)
13754 DFT_LIB_SUFFIX='.so'
13755 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13756 ;;
13757 esac
13758 ;;
13759 (*)
13760 DFT_LIB_SUFFIX='.a'
13761 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13762 ;;
13763 esac
13764 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
13765 then
13766 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
13767 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
13768 fi
13769echo "$as_me:13769: result: $DFT_DEP_SUFFIX" >&5
13770echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
13771
13772echo "$as_me:13772: checking default object directory" >&5
13773echo $ECHO_N "checking default object directory... $ECHO_C" >&6
13774
13775 case $DFT_LWR_MODEL in
13776 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
13777 (normal) DFT_OBJ_SUBDIR='objects' ;;
13778 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
13779 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
13780 (shared)
13781 case $cf_cv_system_name in
13782 (cygwin|msys)
13783 DFT_OBJ_SUBDIR='objects' ;;
13784 (*)
13785 DFT_OBJ_SUBDIR='obj_s' ;;
13786 esac
13787 esac
13788echo "$as_me:13788: result: $DFT_OBJ_SUBDIR" >&5
13789echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
13790
13791### Set up low-level terminfo dependencies for makefiles.
13792
13793if test "$DFT_LWR_MODEL" = shared ; then
13794 case $cf_cv_system_name in
13795 (cygwin*)
13796 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
13797 ;;
13798 (msys*)
13799 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
13800 ;;
13801 esac
13802fi
13803
13804USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
13805
13806### Construct the list of subdirectories for which we'll customize makefiles
13807### with the appropriate compile-rules.
13808
13809SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
13810
13811cat >>confdefs.h <<EOF
13812#define NCURSES_PATHSEP '$PATH_SEPARATOR'
13813EOF
13814
13815### Now that we're done running tests, add the compiler-warnings, if any
13816
13817cf_fix_cppflags=no
13818cf_new_cflags=
13819cf_new_cppflags=
13820cf_new_extra_cppflags=
13821
13822for cf_add_cflags in $EXTRA_CFLAGS
13823do
13824case $cf_fix_cppflags in
13825(no)
13826 case $cf_add_cflags in
13827 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13828 case $cf_add_cflags in
13829 (-D*)
13830 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13831
13832 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13833 && test -z "${cf_tst_cflags}" \
13834 && cf_fix_cppflags=yes
13835
13836 if test $cf_fix_cppflags = yes ; then
13837 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13838 continue
13839 elif test "${cf_tst_cflags}" = "\"'" ; then
13840 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13841 continue
13842 fi
13843 ;;
13844 esac
13845 case "$CPPFLAGS" in
13846 (*$cf_add_cflags)
13847 ;;
13848 (*)
13849 case $cf_add_cflags in
13850 (-D*)
13851 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13852
13853CPPFLAGS=`echo "$CPPFLAGS" | \
13854 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13855 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13856
13857 ;;
13858 esac
13859 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13860 ;;
13861 esac
13862 ;;
13863 (*)
13864 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13865 ;;
13866 esac
13867 ;;
13868(yes)
13869 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13870
13871 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13872
13873 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13874 && test -z "${cf_tst_cflags}" \
13875 && cf_fix_cppflags=no
13876 ;;
13877esac
13878done
13879
13880if test -n "$cf_new_cflags" ; then
13881
13882 CFLAGS="$CFLAGS $cf_new_cflags"
13883fi
13884
13885if test -n "$cf_new_cppflags" ; then
13886
13887 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13888fi
13889
13890if test -n "$cf_new_extra_cppflags" ; then
13891
13892 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13893fi
13894
13895################################################################################
13896
13897TEST_ARG2=
13898
13899TEST_LIBS2=
13900
13901NCURSES_SHLIB2="sh -c"
13902
13903ADA_SUBDIRS="include gen src doc"
13904if test "x$cf_with_tests" != "xno" ; then
13905 ADA_SUBDIRS="$ADA_SUBDIRS samples"
13906fi
13907for cf_dir in $ADA_SUBDIRS
13908do
13909 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
13910done
13911
13912NCURSES_TREE="#"
13913
13914EXTERNAL_TREE=
13915
13916# match layout used by make-tar.sh
13917ADAHTML_DIR=../doc/ada
13918
13919ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
13920ac_config_commands="$ac_config_commands default"
13921cat >confcache <<\_ACEOF
13922# This file is a shell script that caches the results of configure
13923# tests run on this system so they can be shared between configure
13924# scripts and configure runs, see configure's option --config-cache.
13925# It is not useful on other systems. If it contains results you don't
13926# want to keep, you may remove or edit it.
13927#
13928# config.status only pays attention to the cache file if you give it
13929# the --recheck option to rerun configure.
13930#
13931# `ac_cv_env_foo' variables (set or unset) will be overriden when
13932# loading this file, other *unset* `ac_cv_foo' will be assigned the
13933# following values.
13934
13935_ACEOF
13936
13937# The following way of writing the cache mishandles newlines in values,
13938# but we know of no workaround that is simple, portable, and efficient.
13939# So, don't put newlines in cache variables' values.
13940# Ultrix sh set writes to stderr and can't be redirected directly,
13941# and sets the high bit in the cache file unless we assign to the vars.
13942{
13943 (set) 2>&1 |
13944 case `(ac_space=' '; set | grep ac_space) 2>&1` in
13945 *ac_space=\ *)
13946 # `set' does not quote correctly, so add quotes (double-quote
13947 # substitution turns \\\\ into \\, and sed turns \\ into \).
13948 sed -n \
13949 "s/'/'\\\\''/g;
13950 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13951 ;;
13952 *)
13953 # `set' quotes correctly as required by POSIX, so do not add quotes.
13954 sed -n \
13955 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13956 ;;
13957 esac;
13958} |
13959 sed '
13960 t clear
13961 : clear
13962 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13963 t end
13964 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13965 : end' >>confcache
13966if cmp -s $cache_file confcache; then :; else
13967 if test -w $cache_file; then
13968 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
13969 cat confcache >$cache_file
13970 else
13971 echo "not updating unwritable cache $cache_file"
13972 fi
13973fi
13974rm -f confcache
13975
13976test "x$prefix" = xNONE && prefix=$ac_default_prefix
13977# Let make expand exec_prefix.
13978test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13979
13980# VPATH may cause trouble with some makes, so we remove $(srcdir),
13981# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13982# trailing colons and then remove the whole line if VPATH becomes empty
13983# (actually we leave an empty line to preserve line numbers).
13984if test "x$srcdir" = x.; then
13985 ac_vpsub='/^[ ]*VPATH[ ]*=/{
13986s/:*\$(srcdir):*/:/;
13987s/:*\${srcdir}:*/:/;
13988s/:*@srcdir@:*/:/;
13989s/^\([^=]*=[ ]*\):*/\1/;
13990s/:*$//;
13991s/^[^=]*=[ ]*$//;
13992}'
13993fi
13994
13995DEFS=-DHAVE_CONFIG_H
13996
13997: ${CONFIG_STATUS=./config.status}
13998ac_clean_files_save=$ac_clean_files
13999ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14000{ echo "$as_me:14000: creating $CONFIG_STATUS" >&5
14001echo "$as_me: creating $CONFIG_STATUS" >&6;}
14002cat >$CONFIG_STATUS <<_ACEOF
14003#! $SHELL
14004# Generated automatically by configure.
14005# Run this file to recreate the current configuration.
14006# Compiler output produced by configure, useful for debugging
14007# configure, is in config.log if it exists.
14008
14009debug=false
14010SHELL=\${CONFIG_SHELL-$SHELL}
14011ac_cs_invocation="\$0 \$@"
14012
14013_ACEOF
14014
14015cat >>$CONFIG_STATUS <<\_ACEOF
14016# Be Bourne compatible
14017if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14018 emulate sh
14019 NULLCMD=:
14020elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14021 set -o posix
14022fi
14023
14024# Name of the executable.
14025as_me=`echo "$0" |sed 's,.*[\\/],,'`
14026
14027if expr a : '\(a\)' >/dev/null 2>&1; then
14028 as_expr=expr
14029else
14030 as_expr=false
14031fi
14032
14033rm -f conf$$ conf$$.exe conf$$.file
14034echo >conf$$.file
14035if ln -s conf$$.file conf$$ 2>/dev/null; then
14036 # We could just check for DJGPP; but this test a) works b) is more generic
14037 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14038 if test -f conf$$.exe; then
14039 # Don't use ln at all; we don't have any links
14040 as_ln_s='cp -p'
14041 else
14042 as_ln_s='ln -s'
14043 fi
14044elif ln conf$$.file conf$$ 2>/dev/null; then
14045 as_ln_s=ln
14046else
14047 as_ln_s='cp -p'
14048fi
14049rm -f conf$$ conf$$.exe conf$$.file
14050
14051as_executable_p="test -f"
14052
14053# Support unset when possible.
14054if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14055 as_unset=unset
14056else
14057 as_unset=false
14058fi
14059
14060# NLS nuisances.
14061$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14062$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14063$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14064$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14065$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14066$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14067$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14068$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14069
14070# IFS
14071# We need space, tab and new line, in precisely that order.
14072as_nl='
14073'
14074IFS=" $as_nl"
14075
14076# CDPATH.
14077$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14078
14079exec 6>&1
14080
14081_ACEOF
14082
14083# Files that config.status was made for.
14084if test -n "$ac_config_files"; then
14085 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14086fi
14087
14088if test -n "$ac_config_headers"; then
14089 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14090fi
14091
14092if test -n "$ac_config_links"; then
14093 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14094fi
14095
14096if test -n "$ac_config_commands"; then
14097 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14098fi
14099
14100cat >>$CONFIG_STATUS <<\EOF
14101
14102ac_cs_usage="\
14103\`$as_me' instantiates files from templates according to the
14104current configuration.
14105
14106Usage: $0 [OPTIONS] [FILE]...
14107
14108 -h, --help print this help, then exit
14109 -V, --version print version number, then exit
14110 -d, --debug don't remove temporary files
14111 --recheck update $as_me by reconfiguring in the same conditions
14112 --file=FILE[:TEMPLATE]
14113 instantiate the configuration file FILE
14114 --header=FILE[:TEMPLATE]
14115 instantiate the configuration header FILE
14116
14117Configuration files:
14118$config_files
14119
14120Configuration headers:
14121$config_headers
14122
14123Configuration commands:
14124$config_commands
14125
14126Report bugs to <dickey@invisible-island.net>."
14127EOF
14128
14129cat >>$CONFIG_STATUS <<EOF
14130ac_cs_version="\\
14131config.status
14132configured by $0, generated by GNU Autoconf 2.52.20141204,
14133 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14134
14135Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14136Free Software Foundation, Inc.
14137This config.status script is free software; the Free Software Foundation
14138gives unlimited permission to copy, distribute and modify it."
14139srcdir=$srcdir
14140INSTALL="$INSTALL"
14141EOF
14142
14143cat >>$CONFIG_STATUS <<\EOF
14144# If no file are specified by the user, then we need to provide default
14145# value. By we need to know if files were specified by the user.
14146ac_need_defaults=:
14147while test $# != 0
14148do
14149 case $1 in
14150 --*=*)
14151 ac_option=`expr "x$1" : 'x\([^=]*\)='`
14152 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14153 shift
14154 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14155 shift
14156 ;;
14157 -*);;
14158 *) # This is not an option, so the user has probably given explicit
14159 # arguments.
14160 ac_need_defaults=false;;
14161 esac
14162
14163 case $1 in
14164 # Handling of the options.
14165EOF
14166cat >>$CONFIG_STATUS <<EOF
14167 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14168 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14169 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14170EOF
14171cat >>$CONFIG_STATUS <<\EOF
14172 --version | --vers* | -V )
14173 echo "$ac_cs_version"; exit 0 ;;
14174 --he | --h)
14175 # Conflict between --help and --header
14176 { { echo "$as_me:14176: error: ambiguous option: $1
14177Try \`$0 --help' for more information." >&5
14178echo "$as_me: error: ambiguous option: $1
14179Try \`$0 --help' for more information." >&2;}
14180 { (exit 1); exit 1; }; };;
14181 --help | --hel | -h )
14182 echo "$ac_cs_usage"; exit 0 ;;
14183 --debug | --d* | -d )
14184 debug=: ;;
14185 --file | --fil | --fi | --f )
14186 shift
14187 CONFIG_FILES="$CONFIG_FILES $1"
14188 ac_need_defaults=false;;
14189 --header | --heade | --head | --hea )
14190 shift
14191 CONFIG_HEADERS="$CONFIG_HEADERS $1"
14192 ac_need_defaults=false;;
14193
14194 # This is an error.
14195 -*) { { echo "$as_me:14195: error: unrecognized option: $1
14196Try \`$0 --help' for more information." >&5
14197echo "$as_me: error: unrecognized option: $1
14198Try \`$0 --help' for more information." >&2;}
14199 { (exit 1); exit 1; }; } ;;
14200
14201 *) ac_config_targets="$ac_config_targets $1" ;;
14202
14203 esac
14204 shift
14205done
14206
14207exec 5>>config.log
14208cat >&5 << _ACEOF
14209
14210## ----------------------- ##
14211## Running config.status. ##
14212## ----------------------- ##
14213
14214This file was extended by $as_me 2.52.20141204, executed with
14215 CONFIG_FILES = $CONFIG_FILES
14216 CONFIG_HEADERS = $CONFIG_HEADERS
14217 CONFIG_LINKS = $CONFIG_LINKS
14218 CONFIG_COMMANDS = $CONFIG_COMMANDS
14219 > $ac_cs_invocation
14220on `(hostname || uname -n) 2>/dev/null | sed 1q`
14221
14222_ACEOF
14223EOF
14224
14225cat >>$CONFIG_STATUS <<EOF
14226#
14227# INIT-COMMANDS section.
14228#
14229
14230### Special initialization commands, used to pass information from the
14231### configuration-run into config.status
14232
14233AWK="$AWK"
14234DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14235DFT_LWR_MODEL="$DFT_LWR_MODEL"
14236LIB_NAME="$LIB_NAME"
14237LIB_PREFIX="$LIB_PREFIX"
14238LIB_SUFFIX="$LIB_SUFFIX"
14239LN_S="$LN_S"
14240NCURSES_MAJOR="$NCURSES_MAJOR"
14241NCURSES_MINOR="$NCURSES_MINOR"
14242NCURSES_PATCH="$NCURSES_PATCH"
14243USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
14244cf_cv_abi_version="$cf_cv_abi_version"
14245cf_cv_rel_version="$cf_cv_rel_version"
14246cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14247cf_cv_shared_soname='$cf_cv_shared_soname'
14248cf_cv_shlib_version="$cf_cv_shlib_version"
14249cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14250cf_cv_system_name="$cf_cv_system_name"
14251host="$host"
14252target="$target"
14253
14254EOF
14255
14256cat >>$CONFIG_STATUS <<\EOF
14257for ac_config_target in $ac_config_targets
14258do
14259 case "$ac_config_target" in
14260 # Handling of arguments.
14261 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14262 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
14263 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14264 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14265 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14266 *) { { echo "$as_me:14266: error: invalid argument: $ac_config_target" >&5
14267echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14268 { (exit 1); exit 1; }; };;
14269 esac
14270done
14271
14272# If the user did not use the arguments to specify the items to instantiate,
14273# then the envvar interface is used. Set only those that are not.
14274# We use the long form for the default assignment because of an extremely
14275# bizarre bug on SunOS 4.1.3.
14276if $ac_need_defaults; then
14277 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14278 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14279 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14280fi
14281
14282# Create a temporary directory, and hook for its removal unless debugging.
14283$debug ||
14284{
14285 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14286 trap '{ (exit 1); exit 1; }' 1 2 13 15
14287}
14288
14289# Create a (secure) tmp directory for tmp files.
14290: ${TMPDIR=/tmp}
14291{
14292 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14293 test -n "$tmp" && test -d "$tmp"
14294} ||
14295{
14296 tmp=$TMPDIR/cs$$-$RANDOM
14297 (umask 077 && mkdir $tmp)
14298} ||
14299{
14300 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14301 { (exit 1); exit 1; }
14302}
14303
14304EOF
14305
14306cat >>$CONFIG_STATUS <<EOF
14307
14308#
14309# CONFIG_FILES section.
14310#
14311
14312# No need to generate the scripts if there are no CONFIG_FILES.
14313# This happens for instance when ./config.status config.h
14314if test -n "\$CONFIG_FILES"; then
14315 # Protect against being on the right side of a sed subst in config.status.
14316 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14317 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14318s,@SHELL@,$SHELL,;t t
14319s,@exec_prefix@,$exec_prefix,;t t
14320s,@prefix@,$prefix,;t t
14321s,@program_transform_name@,$program_transform_name,;t t
14322s,@bindir@,$bindir,;t t
14323s,@sbindir@,$sbindir,;t t
14324s,@libexecdir@,$libexecdir,;t t
14325s,@datarootdir@,$datarootdir,;t t
14326s,@datadir@,$datadir,;t t
14327s,@sysconfdir@,$sysconfdir,;t t
14328s,@sharedstatedir@,$sharedstatedir,;t t
14329s,@localstatedir@,$localstatedir,;t t
14330s,@libdir@,$libdir,;t t
14331s,@includedir@,$includedir,;t t
14332s,@oldincludedir@,$oldincludedir,;t t
14333s,@infodir@,$infodir,;t t
14334s,@mandir@,$mandir,;t t
14335s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14336s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14337s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14338s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14339s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14340s,@build_alias@,$build_alias,;t t
14341s,@host_alias@,$host_alias,;t t
14342s,@target_alias@,$target_alias,;t t
14343s,@ECHO_C@,$ECHO_C,;t t
14344s,@ECHO_N@,$ECHO_N,;t t
14345s,@ECHO_T@,$ECHO_T,;t t
14346s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14347s,@DEFS@,$DEFS,;t t
14348s,@LIBS@,$LIBS,;t t
14349s,@top_builddir@,$top_builddir,;t t
14350s,@build@,$build,;t t
14351s,@build_cpu@,$build_cpu,;t t
14352s,@build_vendor@,$build_vendor,;t t
14353s,@build_os@,$build_os,;t t
14354s,@host@,$host,;t t
14355s,@host_cpu@,$host_cpu,;t t
14356s,@host_vendor@,$host_vendor,;t t
14357s,@host_os@,$host_os,;t t
14358s,@target@,$target,;t t
14359s,@target_cpu@,$target_cpu,;t t
14360s,@target_vendor@,$target_vendor,;t t
14361s,@target_os@,$target_os,;t t
14362s,@CC@,$CC,;t t
14363s,@CFLAGS@,$CFLAGS,;t t
14364s,@LDFLAGS@,$LDFLAGS,;t t
14365s,@CPPFLAGS@,$CPPFLAGS,;t t
14366s,@ac_ct_CC@,$ac_ct_CC,;t t
14367s,@EXEEXT@,$EXEEXT,;t t
14368s,@OBJEXT@,$OBJEXT,;t t
14369s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14370s,@CPP@,$CPP,;t t
14371s,@AWK@,$AWK,;t t
14372s,@EGREP@,$EGREP,;t t
14373s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14374s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14375s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14376s,@LN_S@,$LN_S,;t t
14377s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14378s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
14379s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
14380s,@SET_MAKE@,$SET_MAKE,;t t
14381s,@CTAGS@,$CTAGS,;t t
14382s,@ETAGS@,$ETAGS,;t t
14383s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14384s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14385s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14386s,@RANLIB@,$RANLIB,;t t
14387s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14388s,@LD@,$LD,;t t
14389s,@ac_ct_LD@,$ac_ct_LD,;t t
14390s,@AR@,$AR,;t t
14391s,@ac_ct_AR@,$ac_ct_AR,;t t
14392s,@ARFLAGS@,$ARFLAGS,;t t
14393s,@DESTDIR@,$DESTDIR,;t t
14394s,@BUILD_CC@,$BUILD_CC,;t t
14395s,@BUILD_CPP@,$BUILD_CPP,;t t
14396s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14397s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14398s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14399s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14400s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14401s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14402s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14403s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14404s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14405s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
14406s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14407s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14408s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14409s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14410s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14411s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14412s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14413s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14414s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14415s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14416s,@CC_G_OPT@,$CC_G_OPT,;t t
14417s,@LD_MODEL@,$LD_MODEL,;t t
14418s,@shlibdir@,$shlibdir,;t t
14419s,@MAKE_DLLS@,$MAKE_DLLS,;t t
14420s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14421s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
14422s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14423s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14424s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
14425s,@LINK_PROGS@,$LINK_PROGS,;t t
14426s,@LINK_TESTS@,$LINK_TESTS,;t t
14427s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14428s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14429s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14430s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14431s,@RPATH_LIST@,$RPATH_LIST,;t t
14432s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14433s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14434s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14435s,@PTHREAD@,$PTHREAD,;t t
14436s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
14437s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
14438s,@ECHO_LT@,$ECHO_LT,;t t
14439s,@ECHO_LD@,$ECHO_LD,;t t
14440s,@RULE_CC@,$RULE_CC,;t t
14441s,@SHOW_CC@,$SHOW_CC,;t t
14442s,@ECHO_CC@,$ECHO_CC,;t t
14443s,@ADAFLAGS@,$ADAFLAGS,;t t
14444s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14445s,@ADA_TRACE@,$ADA_TRACE,;t t
14446s,@gnat_exists@,$gnat_exists,;t t
14447s,@M4_exists@,$M4_exists,;t t
14448s,@cf_ada_make@,$cf_ada_make,;t t
14449s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
14450s,@cf_compile_generics@,$cf_compile_generics,;t t
14451s,@cf_generic_objects@,$cf_generic_objects,;t t
14452s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
14453s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
14454s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
14455s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
14456s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14457s,@cf_ada_package@,$cf_ada_package,;t t
14458s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14459s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14460s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
14461s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
14462s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
14463s,@TINFO_LIBS@,$TINFO_LIBS,;t t
14464s,@ACPPFLAGS@,$ACPPFLAGS,;t t
14465s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
14466s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
14467s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
14468s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
14469s,@TEST_ARG2@,$TEST_ARG2,;t t
14470s,@TEST_LIBS2@,$TEST_LIBS2,;t t
14471s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
14472s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
14473s,@NCURSES_TREE@,$NCURSES_TREE,;t t
14474s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
14475s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
14476CEOF
14477
14478EOF
14479
14480 cat >>$CONFIG_STATUS <<\EOF
14481 # Split the substitutions into bite-sized pieces for seds with
14482 # small command number limits, like on Digital OSF/1 and HP-UX.
14483 ac_max_sed_lines=48
14484 ac_sed_frag=1 # Number of current file.
14485 ac_beg=1 # First line for current file.
14486 ac_end=$ac_max_sed_lines # Line after last line for current file.
14487 ac_more_lines=:
14488 ac_sed_cmds=
14489 while $ac_more_lines; do
14490 if test $ac_beg -gt 1; then
14491 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14492 else
14493 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14494 fi
14495 if test ! -s $tmp/subs.frag; then
14496 ac_more_lines=false
14497 else
14498 # The purpose of the label and of the branching condition is to
14499 # speed up the sed processing (if there are no `@' at all, there
14500 # is no need to browse any of the substitutions).
14501 # These are the two extra sed commands mentioned above.
14502 (echo ':t
14503 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14504 if test -z "$ac_sed_cmds"; then
14505 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14506 else
14507 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14508 fi
14509 ac_sed_frag=`expr $ac_sed_frag + 1`
14510 ac_beg=$ac_end
14511 ac_end=`expr $ac_end + $ac_max_sed_lines`
14512 fi
14513 done
14514 if test -z "$ac_sed_cmds"; then
14515 ac_sed_cmds=cat
14516 fi
14517fi # test -n "$CONFIG_FILES"
14518
14519EOF
14520cat >>$CONFIG_STATUS <<\EOF
14521for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14522 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14523 case $ac_file in
14524 - | *:- | *:-:* ) # input from stdin
14525 cat >$tmp/stdin
14526 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14527 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14528 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14529 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14530 * ) ac_file_in=$ac_file.in ;;
14531 esac
14532
14533 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14534 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14535 X"$ac_file" : 'X\(//\)[^/]' \| \
14536 X"$ac_file" : 'X\(//\)$' \| \
14537 X"$ac_file" : 'X\(/\)' \| \
14538 . : '\(.\)' 2>/dev/null ||
14539echo X"$ac_file" |
14540 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14541 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14542 /^X\(\/\/\)$/{ s//\1/; q; }
14543 /^X\(\/\).*/{ s//\1/; q; }
14544 s/.*/./; q'`
14545 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14546 { case "$ac_dir" in
14547 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14548 *) as_incr_dir=.;;
14549esac
14550as_dummy="$ac_dir"
14551for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14552 case $as_mkdir_dir in
14553 # Skip DOS drivespec
14554 ?:) as_incr_dir=$as_mkdir_dir ;;
14555 *)
14556 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14557 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14558 ;;
14559 esac
14560done; }
14561
14562 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14563 # A "../" for each directory in $ac_dir_suffix.
14564 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14565 else
14566 ac_dir_suffix= ac_dots=
14567 fi
14568
14569 case $srcdir in
14570 .) ac_srcdir=.
14571 if test -z "$ac_dots"; then
14572 ac_top_srcdir=.
14573 else
14574 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14575 fi ;;
14576 [\\/]* | ?:[\\/]* )
14577 ac_srcdir=$srcdir$ac_dir_suffix;
14578 ac_top_srcdir=$srcdir ;;
14579 *) # Relative path.
14580 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14581 ac_top_srcdir=$ac_dots$srcdir ;;
14582 esac
14583
14584 case $INSTALL in
14585 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14586 *) ac_INSTALL=$ac_dots$INSTALL ;;
14587 esac
14588
14589 if test x"$ac_file" != x-; then
14590 { echo "$as_me:14590: creating $ac_file" >&5
14591echo "$as_me: creating $ac_file" >&6;}
14592 rm -f "$ac_file"
14593 fi
14594 # Let's still pretend it is `configure' which instantiates (i.e., don't
14595 # use $as_me), people would be surprised to read:
14596 # /* config.h. Generated automatically by config.status. */
14597 configure_input="Generated automatically from `echo $ac_file_in |
14598 sed 's,.*/,,'` by configure."
14599
14600 # First look for the input files in the build tree, otherwise in the
14601 # src tree.
14602 ac_file_inputs=`IFS=:
14603 for f in $ac_file_in; do
14604 case $f in
14605 -) echo $tmp/stdin ;;
14606 [\\/$]*)
14607 # Absolute (can't be DOS-style, as IFS=:)
14608 test -f "$f" || { { echo "$as_me:14608: error: cannot find input file: $f" >&5
14609echo "$as_me: error: cannot find input file: $f" >&2;}
14610 { (exit 1); exit 1; }; }
14611 echo $f;;
14612 *) # Relative
14613 if test -f "$f"; then
14614 # Build tree
14615 echo $f
14616 elif test -f "$srcdir/$f"; then
14617 # Source tree
14618 echo $srcdir/$f
14619 else
14620 # /dev/null tree
14621 { { echo "$as_me:14621: error: cannot find input file: $f" >&5
14622echo "$as_me: error: cannot find input file: $f" >&2;}
14623 { (exit 1); exit 1; }; }
14624 fi;;
14625 esac
14626 done` || { (exit 1); exit 1; }
14627EOF
14628cat >>$CONFIG_STATUS <<\EOF
14629 ac_warn_datarootdir=no
14630 if test x"$ac_file" != x-; then
14631 for ac_item in $ac_file_inputs
14632 do
14633 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
14634 if test -n "$ac_seen"; then
14635 ac_used=`grep '@datarootdir@' $ac_item`
14636 if test -z "$ac_used"; then
14637 { echo "$as_me:14637: WARNING: datarootdir was used implicitly but not set:
14638$ac_seen" >&5
14639echo "$as_me: WARNING: datarootdir was used implicitly but not set:
14640$ac_seen" >&2;}
14641 ac_warn_datarootdir=yes
14642 fi
14643 fi
14644 ac_seen=`grep '${datarootdir}' $ac_item`
14645 if test -n "$ac_seen"; then
14646 { echo "$as_me:14646: WARNING: datarootdir was used explicitly but not set:
14647$ac_seen" >&5
14648echo "$as_me: WARNING: datarootdir was used explicitly but not set:
14649$ac_seen" >&2;}
14650 ac_warn_datarootdir=yes
14651 fi
14652 done
14653 fi
14654
14655if test "x$ac_warn_datarootdir" = xyes; then
14656 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
14657fi
14658
14659EOF
14660cat >>$CONFIG_STATUS <<EOF
14661 sed "$ac_vpsub
14662$extrasub
14663EOF
14664cat >>$CONFIG_STATUS <<\EOF
14665:t
14666/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14667s,@configure_input@,$configure_input,;t t
14668s,@srcdir@,$ac_srcdir,;t t
14669s,@top_srcdir@,$ac_top_srcdir,;t t
14670s,@INSTALL@,$ac_INSTALL,;t t
14671" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14672 rm -f $tmp/stdin
14673 if test x"$ac_file" != x-; then
14674 cp $tmp/out $ac_file
14675
14676 for ac_name in prefix exec_prefix datarootdir
14677 do
14678 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
14679 if test -n "$ac_seen"; then
14680 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
14681 if test -z "$ac_init"; then
14682 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
14683 { echo "$as_me:14683: WARNING: Variable $ac_name is used but was not set:
14684$ac_seen" >&5
14685echo "$as_me: WARNING: Variable $ac_name is used but was not set:
14686$ac_seen" >&2;}
14687 fi
14688 fi
14689 done
14690 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
14691 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
14692 if test -s $tmp/out; then
14693 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
14694 { echo "$as_me:14694: WARNING: Some variables may not be substituted:
14695$ac_seen" >&5
14696echo "$as_me: WARNING: Some variables may not be substituted:
14697$ac_seen" >&2;}
14698 fi
14699 else
14700 cat $tmp/out
14701 fi
14702 rm -f $tmp/out
14703
14704done
14705EOF
14706cat >>$CONFIG_STATUS <<\EOF
14707
14708#
14709# CONFIG_HEADER section.
14710#
14711
14712# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14713# NAME is the cpp macro being defined and VALUE is the value it is being given.
14714#
14715# ac_d sets the value in "#define NAME VALUE" lines.
14716ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
14717ac_dB='[ ].*$,\1#\2'
14718ac_dC=' '
14719ac_dD=',;t'
14720# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14721ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14722ac_iB='\([ ]\),\1#\2define\3'
14723ac_iC=' '
14724ac_iD='\4,;t'
14725# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14726ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
14727ac_uB='$,\1#\2define\3'
14728ac_uC=' '
14729ac_uD=',;t'
14730
14731for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14732 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14733 case $ac_file in
14734 - | *:- | *:-:* ) # input from stdin
14735 cat >$tmp/stdin
14736 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14737 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14738 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14739 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14740 * ) ac_file_in=$ac_file.in ;;
14741 esac
14742
14743 test x"$ac_file" != x- && { echo "$as_me:14743: creating $ac_file" >&5
14744echo "$as_me: creating $ac_file" >&6;}
14745
14746 # First look for the input files in the build tree, otherwise in the
14747 # src tree.
14748 ac_file_inputs=`IFS=:
14749 for f in $ac_file_in; do
14750 case $f in
14751 -) echo $tmp/stdin ;;
14752 [\\/$]*)
14753 # Absolute (can't be DOS-style, as IFS=:)
14754 test -f "$f" || { { echo "$as_me:14754: error: cannot find input file: $f" >&5
14755echo "$as_me: error: cannot find input file: $f" >&2;}
14756 { (exit 1); exit 1; }; }
14757 echo $f;;
14758 *) # Relative
14759 if test -f "$f"; then
14760 # Build tree
14761 echo $f
14762 elif test -f "$srcdir/$f"; then
14763 # Source tree
14764 echo $srcdir/$f
14765 else
14766 # /dev/null tree
14767 { { echo "$as_me:14767: error: cannot find input file: $f" >&5
14768echo "$as_me: error: cannot find input file: $f" >&2;}
14769 { (exit 1); exit 1; }; }
14770 fi;;
14771 esac
14772 done` || { (exit 1); exit 1; }
14773 # Remove the trailing spaces.
14774 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
14775
14776EOF
14777
14778# Transform confdefs.h into a list of #define's. We won't use it as a sed
14779# script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
14780# be either 'cat' or 'sort'.
14781cat confdefs.h | uniq >conftest.vals
14782
14783# Break up conftest.vals because some shells have a limit on
14784# the size of here documents, and old seds have small limits too.
14785
14786rm -f conftest.tail
14787echo ' rm -f conftest.frag' >> $CONFIG_STATUS
14788while grep . conftest.vals >/dev/null
14789do
14790 # Write chunks of a limited-size here document to conftest.frag.
14791 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14792 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
14793 echo 'CEOF' >> $CONFIG_STATUS
14794 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14795 rm -f conftest.vals
14796 mv conftest.tail conftest.vals
14797done
14798rm -f conftest.vals
14799
14800# Run sed to substitute the contents of conftest.frag into $tmp/in at the
14801# marker @DEFS@.
14802echo ' cat >> conftest.edit <<CEOF
14803/@DEFS@/r conftest.frag
14804/@DEFS@/d
14805CEOF
14806sed -f conftest.edit $tmp/in > $tmp/out
14807rm -f $tmp/in
14808mv $tmp/out $tmp/in
14809rm -f conftest.edit conftest.frag
14810' >> $CONFIG_STATUS
14811
14812cat >>$CONFIG_STATUS <<\EOF
14813 # Let's still pretend it is `configure' which instantiates (i.e., don't
14814 # use $as_me), people would be surprised to read:
14815 # /* config.h. Generated automatically by config.status. */
14816 if test x"$ac_file" = x-; then
14817 echo "/* Generated automatically by configure. */" >$tmp/config.h
14818 else
14819 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
14820 fi
14821 cat $tmp/in >>$tmp/config.h
14822 rm -f $tmp/in
14823 if test x"$ac_file" != x-; then
14824 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14825 { echo "$as_me:14825: $ac_file is unchanged" >&5
14826echo "$as_me: $ac_file is unchanged" >&6;}
14827 else
14828 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14829 X"$ac_file" : 'X\(//\)[^/]' \| \
14830 X"$ac_file" : 'X\(//\)$' \| \
14831 X"$ac_file" : 'X\(/\)' \| \
14832 . : '\(.\)' 2>/dev/null ||
14833echo X"$ac_file" |
14834 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14835 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14836 /^X\(\/\/\)$/{ s//\1/; q; }
14837 /^X\(\/\).*/{ s//\1/; q; }
14838 s/.*/./; q'`
14839 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14840 { case "$ac_dir" in
14841 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14842 *) as_incr_dir=.;;
14843esac
14844as_dummy="$ac_dir"
14845for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14846 case $as_mkdir_dir in
14847 # Skip DOS drivespec
14848 ?:) as_incr_dir=$as_mkdir_dir ;;
14849 *)
14850 as_incr_dir=$as_incr_dir/$as_mkdir_dir
14851 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14852 ;;
14853 esac
14854done; }
14855
14856 fi
14857 rm -f $ac_file
14858 mv $tmp/config.h $ac_file
14859 fi
14860 else
14861 cat $tmp/config.h
14862 rm -f $tmp/config.h
14863 fi
14864done
14865EOF
14866cat >>$CONFIG_STATUS <<\EOF
14867#
14868# CONFIG_COMMANDS section.
14869#
14870for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14871 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14872 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14873
14874 case $ac_dest in
14875 default )
14876if test -z "$USE_OLD_MAKERULES" ; then
14877 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
14878fi
14879 ;;
14880 esac
14881done
14882EOF
14883
14884cat >>$CONFIG_STATUS <<\EOF
14885
14886{ (exit 0); exit 0; }
14887EOF
14888chmod +x $CONFIG_STATUS
14889ac_clean_files=$ac_clean_files_save
14890
14891# configure is writing to config.log, and then calls config.status.
14892# config.status does its own redirection, appending to config.log.
14893# Unfortunately, on DOS this fails, as config.log is still kept open
14894# by configure, so config.status won't be able to write to it; its
14895# output is simply discarded. So we exec the FD to /dev/null,
14896# effectively closing config.log, so it can be properly (re)opened and
14897# appended to by config.status. When coming back to configure, we
14898# need to make the FD available again.
14899if test "$no_create" != yes; then
14900 ac_cs_success=:
14901 exec 5>/dev/null
14902 $SHELL $CONFIG_STATUS || ac_cs_success=false
14903 exec 5>>config.log
14904 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14905 # would make configure fail if this is the last instruction.
14906 $ac_cs_success || { (exit 1); exit 1; }
14907fi
14908${MAKE:-make} preinstall