blob: 29e858ca8fae79f5c9fc2adec7ac16589d305d34 [file] [log] [blame]
Steve Kondikae271bc2015-11-15 02:50:53 +01001#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20141204.
4#
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25 emulate sh
26 NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28 set -o posix
29fi
30
31# Name of the executable.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35 as_expr=expr
36else
37 as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
47 as_ln_s='cp -p'
48 else
49 as_ln_s='ln -s'
50 fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52 as_ln_s=ln
53else
54 as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62 as_unset=unset
63else
64 as_unset=false
65fi
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" $as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
96ac_default_prefix=/usr/local
97cross_compiling=no
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete. It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="ncurses.c"
108
109# Initialize some variables set by options.
110ac_init_help=
111ac_init_version=false
112# The variables have the same names as the options, with
113# dashes changed to underlines.
114cache_file=/dev/null
115exec_prefix=NONE
116no_create=
117no_recursion=
118prefix=NONE
119program_prefix=NONE
120program_suffix=NONE
121program_transform_name=s,x,x,
122silent=
123site=
124srcdir=
125verbose=
126x_includes=NONE
127x_libraries=NONE
128
129# Installation directory options.
130# These are left unexpanded so users can "make install exec_prefix=/foo"
131# and all the variables that are supposed to be based on exec_prefix
132# by default will actually change.
133# Use braces instead of parens because sh, perl, etc. also accept them.
134bindir='${exec_prefix}/bin'
135sbindir='${exec_prefix}/sbin'
136libexecdir='${exec_prefix}/libexec'
137datarootdir='${prefix}/share'
138datadir='${datarootdir}'
139sysconfdir='${prefix}/etc'
140sharedstatedir='${prefix}/com'
141localstatedir='${prefix}/var'
142libdir='${exec_prefix}/lib'
143includedir='${prefix}/include'
144oldincludedir='/usr/include'
145infodir='${datarootdir}/info'
146mandir='${datarootdir}/man'
147
148# Identity of this package.
149PACKAGE_NAME=
150PACKAGE_TARNAME=
151PACKAGE_VERSION=
152PACKAGE_STRING=
153PACKAGE_BUGREPORT=
154
155ac_prev=
156for ac_option
157do
158 # If the previous option needs an argument, assign it.
159 if test -n "$ac_prev"; then
160 eval "$ac_prev=\$ac_option"
161 ac_prev=
162 continue
163 fi
164
165 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167 # Accept the important Cygnus configure options, so we can diagnose typos.
168
169 case $ac_option in
170
171 -bindir | --bindir | --bindi | --bind | --bin | --bi)
172 ac_prev=bindir ;;
173 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174 bindir=$ac_optarg ;;
175
176 -build | --build | --buil | --bui | --bu)
177 ac_prev=build_alias ;;
178 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179 build_alias=$ac_optarg ;;
180
181 -cache-file | --cache-file | --cache-fil | --cache-fi \
182 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183 ac_prev=cache_file ;;
184 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186 cache_file=$ac_optarg ;;
187
188 --config-cache | -C)
189 cache_file=config.cache ;;
190
191 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192 ac_prev=datadir ;;
193 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194 | --da=*)
195 datadir=$ac_optarg ;;
196
197 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198 | --dataroo | --dataro | --datar)
199 ac_prev=datarootdir ;;
200 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202 datarootdir=$ac_optarg ;;
203
204 -disable-* | --disable-*)
205 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206 # Reject names that are not valid shell variable names.
207 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209 { (exit 1); exit 1; }; }
210 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211 eval "enable_$ac_feature=no" ;;
212
213 -enable-* | --enable-*)
214 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215 # Reject names that are not valid shell variable names.
216 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218 { (exit 1); exit 1; }; }
219 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
220 case $ac_option in
221 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
222 *) ac_optarg=yes ;;
223 esac
224 eval "enable_$ac_feature='$ac_optarg'" ;;
225
226 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228 | --exec | --exe | --ex)
229 ac_prev=exec_prefix ;;
230 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232 | --exec=* | --exe=* | --ex=*)
233 exec_prefix=$ac_optarg ;;
234
235 -gas | --gas | --ga | --g)
236 # Obsolete; use --with-gas.
237 with_gas=yes ;;
238
239 -help | --help | --hel | --he | -h)
240 ac_init_help=long ;;
241 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242 ac_init_help=recursive ;;
243 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244 ac_init_help=short ;;
245
246 -host | --host | --hos | --ho)
247 ac_prev=host_alias ;;
248 -host=* | --host=* | --hos=* | --ho=*)
249 host_alias=$ac_optarg ;;
250
251 -includedir | --includedir | --includedi | --included | --include \
252 | --includ | --inclu | --incl | --inc)
253 ac_prev=includedir ;;
254 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255 | --includ=* | --inclu=* | --incl=* | --inc=*)
256 includedir=$ac_optarg ;;
257
258 -infodir | --infodir | --infodi | --infod | --info | --inf)
259 ac_prev=infodir ;;
260 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261 infodir=$ac_optarg ;;
262
263 -libdir | --libdir | --libdi | --libd)
264 ac_prev=libdir ;;
265 -libdir=* | --libdir=* | --libdi=* | --libd=*)
266 libdir=$ac_optarg ;;
267
268 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269 | --libexe | --libex | --libe)
270 ac_prev=libexecdir ;;
271 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272 | --libexe=* | --libex=* | --libe=*)
273 libexecdir=$ac_optarg ;;
274
275 -localstatedir | --localstatedir | --localstatedi | --localstated \
276 | --localstate | --localstat | --localsta | --localst \
277 | --locals | --local | --loca | --loc | --lo)
278 ac_prev=localstatedir ;;
279 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282 localstatedir=$ac_optarg ;;
283
284 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
285 ac_prev=mandir ;;
286 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
287 mandir=$ac_optarg ;;
288
289 -nfp | --nfp | --nf)
290 # Obsolete; use --without-fp.
291 with_fp=no ;;
292
293 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
294 | --no-cr | --no-c)
295 no_create=yes ;;
296
297 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
299 no_recursion=yes ;;
300
301 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303 | --oldin | --oldi | --old | --ol | --o)
304 ac_prev=oldincludedir ;;
305 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308 oldincludedir=$ac_optarg ;;
309
310 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
311 ac_prev=prefix ;;
312 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
313 prefix=$ac_optarg ;;
314
315 -program-prefix | --program-prefix | --program-prefi | --program-pref \
316 | --program-pre | --program-pr | --program-p)
317 ac_prev=program_prefix ;;
318 -program-prefix=* | --program-prefix=* | --program-prefi=* \
319 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320 program_prefix=$ac_optarg ;;
321
322 -program-suffix | --program-suffix | --program-suffi | --program-suff \
323 | --program-suf | --program-su | --program-s)
324 ac_prev=program_suffix ;;
325 -program-suffix=* | --program-suffix=* | --program-suffi=* \
326 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327 program_suffix=$ac_optarg ;;
328
329 -program-transform-name | --program-transform-name \
330 | --program-transform-nam | --program-transform-na \
331 | --program-transform-n | --program-transform- \
332 | --program-transform | --program-transfor \
333 | --program-transfo | --program-transf \
334 | --program-trans | --program-tran \
335 | --progr-tra | --program-tr | --program-t)
336 ac_prev=program_transform_name ;;
337 -program-transform-name=* | --program-transform-name=* \
338 | --program-transform-nam=* | --program-transform-na=* \
339 | --program-transform-n=* | --program-transform-=* \
340 | --program-transform=* | --program-transfor=* \
341 | --program-transfo=* | --program-transf=* \
342 | --program-trans=* | --program-tran=* \
343 | --progr-tra=* | --program-tr=* | --program-t=*)
344 program_transform_name=$ac_optarg ;;
345
346 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347 | -silent | --silent | --silen | --sile | --sil)
348 silent=yes ;;
349
350 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
351 ac_prev=sbindir ;;
352 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
353 | --sbi=* | --sb=*)
354 sbindir=$ac_optarg ;;
355
356 -sharedstatedir | --sharedstatedir | --sharedstatedi \
357 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358 | --sharedst | --shareds | --shared | --share | --shar \
359 | --sha | --sh)
360 ac_prev=sharedstatedir ;;
361 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
364 | --sha=* | --sh=*)
365 sharedstatedir=$ac_optarg ;;
366
367 -site | --site | --sit)
368 ac_prev=site ;;
369 -site=* | --site=* | --sit=*)
370 site=$ac_optarg ;;
371
372 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
373 ac_prev=srcdir ;;
374 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
375 srcdir=$ac_optarg ;;
376
377 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378 | --syscon | --sysco | --sysc | --sys | --sy)
379 ac_prev=sysconfdir ;;
380 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382 sysconfdir=$ac_optarg ;;
383
384 -target | --target | --targe | --targ | --tar | --ta | --t)
385 ac_prev=target_alias ;;
386 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387 target_alias=$ac_optarg ;;
388
389 -v | -verbose | --verbose | --verbos | --verbo | --verb)
390 verbose=yes ;;
391
392 -version | --version | --versio | --versi | --vers | -V)
393 ac_init_version=: ;;
394
395 -with-* | --with-*)
396 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397 # Reject names that are not valid shell variable names.
398 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid package name: $ac_package" >&2
400 { (exit 1); exit 1; }; }
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
402 case $ac_option in
403 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
404 *) ac_optarg=yes ;;
405 esac
406 eval "with_$ac_package='$ac_optarg'" ;;
407
408 -without-* | --without-*)
409 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410 # Reject names that are not valid shell variable names.
411 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412 { echo "$as_me: error: invalid package name: $ac_package" >&2
413 { (exit 1); exit 1; }; }
414 ac_package=`echo $ac_package | sed 's/-/_/g'`
415 eval "with_$ac_package=no" ;;
416
417 --x)
418 # Obsolete; use --with-x.
419 with_x=yes ;;
420
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes=$ac_optarg ;;
427
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries=$ac_optarg ;;
434
435 -*) { echo "$as_me: error: unrecognized option: $ac_option
436Try \`$0 --help' for more information." >&2
437 { (exit 1); exit 1; }; }
438 ;;
439
440 *=*)
441 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442 # Reject names that are not valid shell variable names.
443 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445 { (exit 1); exit 1; }; }
446 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447 eval "$ac_envvar='$ac_optarg'"
448 export $ac_envvar ;;
449
450 *)
451 # FIXME: should be removed in autoconf 3.0.
452 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
456 ;;
457
458 esac
459done
460
461if test -n "$ac_prev"; then
462 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463 { echo "$as_me: error: missing argument to $ac_option" >&2
464 { (exit 1); exit 1; }; }
465fi
466
467# Be sure to have absolute paths.
468for ac_var in exec_prefix prefix
469do
470 eval ac_val=$`echo $ac_var`
471 case $ac_val in
472 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474 { (exit 1); exit 1; }; };;
475 esac
476done
477
478# Be sure to have absolute paths.
479for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480 localstatedir libdir includedir oldincludedir infodir mandir
481do
482 eval ac_val=$`echo $ac_var`
483 case $ac_val in
484 [\\/$]* | ?:[\\/]* ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
487 esac
488done
489
490# There might be people who depend on the old broken behavior: `$host'
491# used to hold the argument of --host etc.
492build=$build_alias
493host=$host_alias
494target=$target_alias
495
496# FIXME: should be removed in autoconf 3.0.
497if test "x$host_alias" != x; then
498 if test "x$build_alias" = x; then
499 cross_compiling=maybe
500 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501 If a cross compiler is detected then cross compile mode will be used." >&2
502 elif test "x$build_alias" != "x$host_alias"; then
503 cross_compiling=yes
504 fi
505fi
506
507ac_tool_prefix=
508test -n "$host_alias" && ac_tool_prefix=$host_alias-
509
510test "$silent" = yes && exec 6>/dev/null
511
512# Find the source files, if location was not specified.
513if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
516 ac_prog=$0
517 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519 srcdir=$ac_confdir
520 if test ! -r $srcdir/$ac_unique_file; then
521 srcdir=..
522 fi
523else
524 ac_srcdir_defaulted=no
525fi
526if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529 { (exit 1); exit 1; }; }
530 else
531 { echo "$as_me: error: cannot find sources in $srcdir" >&2
532 { (exit 1); exit 1; }; }
533 fi
534fi
535srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536ac_env_build_alias_set=${build_alias+set}
537ac_env_build_alias_value=$build_alias
538ac_cv_env_build_alias_set=${build_alias+set}
539ac_cv_env_build_alias_value=$build_alias
540ac_env_host_alias_set=${host_alias+set}
541ac_env_host_alias_value=$host_alias
542ac_cv_env_host_alias_set=${host_alias+set}
543ac_cv_env_host_alias_value=$host_alias
544ac_env_target_alias_set=${target_alias+set}
545ac_env_target_alias_value=$target_alias
546ac_cv_env_target_alias_set=${target_alias+set}
547ac_cv_env_target_alias_value=$target_alias
548ac_env_CC_set=${CC+set}
549ac_env_CC_value=$CC
550ac_cv_env_CC_set=${CC+set}
551ac_cv_env_CC_value=$CC
552ac_env_CFLAGS_set=${CFLAGS+set}
553ac_env_CFLAGS_value=$CFLAGS
554ac_cv_env_CFLAGS_set=${CFLAGS+set}
555ac_cv_env_CFLAGS_value=$CFLAGS
556ac_env_LDFLAGS_set=${LDFLAGS+set}
557ac_env_LDFLAGS_value=$LDFLAGS
558ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559ac_cv_env_LDFLAGS_value=$LDFLAGS
560ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561ac_env_CPPFLAGS_value=$CPPFLAGS
562ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564ac_env_CPP_set=${CPP+set}
565ac_env_CPP_value=$CPP
566ac_cv_env_CPP_set=${CPP+set}
567ac_cv_env_CPP_value=$CPP
568
569#
570# Report the --help message.
571#
572if test "$ac_init_help" = "long"; then
573 # Omit some internal or obsolete options to make the list less imposing.
574 # This message is too long to be a string in the A/UX 3.1 sh.
575 cat <<EOF
576\`configure' configures this package to adapt to many kinds of systems.
577
578Usage: $0 [OPTION]... [VAR=VALUE]...
579
580To assign environment variables (e.g., CC, CFLAGS...), specify them as
581VAR=VALUE. See below for descriptions of some of the useful variables.
582
583Defaults for the options are specified in brackets.
584
585Configuration:
586 -h, --help display this help and exit
587 --help=short display options specific to this package
588 --help=recursive display the short help of all the included packages
589 -V, --version display version information and exit
590 -q, --quiet, --silent do not print \`checking...' messages
591 --cache-file=FILE cache test results in FILE [disabled]
592 -C, --config-cache alias for \`--cache-file=config.cache'
593 -n, --no-create do not create output files
594 --srcdir=DIR find the sources in DIR [configure dir or \`..']
595
596EOF
597
598 cat <<EOF
599Installation directories:
600 --prefix=PREFIX install architecture-independent files in PREFIX
601 [$ac_default_prefix]
602 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
603 [PREFIX]
604
605By default, \`make install' will install all the files in
606\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
607an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608for instance \`--prefix=\$HOME'.
609
610For better control, use the options below.
611
612Fine tuning of the installation directories:
613 --bindir=DIR user executables [EPREFIX/bin]
614 --sbindir=DIR system admin executables [EPREFIX/sbin]
615 --libexecdir=DIR program executables [EPREFIX/libexec]
616 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
617 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
618 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
619 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
620 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
621 --libdir=DIR object code libraries [EPREFIX/lib]
622 --includedir=DIR C header files [PREFIX/include]
623 --oldincludedir=DIR C header files for non-gcc [/usr/include]
624 --infodir=DIR info documentation [DATAROOTDIR/info]
625 --mandir=DIR man documentation [DATAROOTDIR/man]
626EOF
627
628 cat <<\EOF
629
630Program names:
631 --program-prefix=PREFIX prepend PREFIX to installed program names
632 --program-suffix=SUFFIX append SUFFIX to installed program names
633 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
634
635X features:
636 --x-includes=DIR X include files are in DIR
637 --x-libraries=DIR X library files are in DIR
638
639System types:
640 --build=BUILD configure for building on BUILD [guessed]
641 --host=HOST build programs to run on HOST [BUILD]
642EOF
643fi
644
645if test -n "$ac_init_help"; then
646
647 cat <<\EOF
648
649Optional Packages:
650 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
651 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
652
653Optional Features:
654 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
655 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
656
657General Options:
658 --with-pkg-config{=path} enable/disable use of pkg-config
659 --disable-echo do not display "compiling" commands
660Curses Version-dependent Options:
661 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
662 --disable-widec disable checks for wide-character functions
663 --with-curses-dir=DIR directory in which (n)curses is installed
664 --with-screen=XXX use specified curses-libraries
665 --with-ncursesw use wide ncurses-libraries
666 --with-ncurses use ncurses-libraries
667 --with-pdcurses compile/link with pdcurses X11 library
668 --with-curses-colr compile/link with HPUX 10.x color-curses
669 --with-curses-5lib compile/link with SunOS 5lib curses
670 --with-Xaw3d link with Xaw 3d library
671 --with-Xaw3dxft link with Xaw 3d xft library
672 --with-neXtaw link with neXT Athena library
673 --with-XawPlus link with Athena-Plus library
674 --with-x use the X Window System
675Testing/development Options:
676 --enable-warnings test: turn on gcc compiler warnings
677 --with-dmalloc test: use Gray Watson's dmalloc library
678 --with-dbmalloc test: use Conor Cahill's dbmalloc library
679 --with-valgrind test: use valgrind
680 --disable-leaks test: free permanent memory, analyze leaks
681 --disable-rpath-hack don't add rpath options for additional libraries
682
683Some influential environment variables:
684 CC C compiler command
685 CFLAGS C compiler flags
686 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
687 nonstandard directory <lib dir>
688 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
689 headers in a nonstandard directory <include dir>
690 CPP C preprocessor
691
692Use these variables to override the choices made by `configure' or to help
693it to find libraries and programs with nonstandard names/locations.
694
695EOF
696fi
697
698if test "$ac_init_help" = "recursive"; then
699 # If there are subdirs, report their specific --help.
700 ac_popdir=`pwd`
701 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
702 cd $ac_subdir
703 # A "../" for each directory in /$ac_subdir.
704 ac_dots=`echo $ac_subdir |
705 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
706
707 case $srcdir in
708 .) # No --srcdir option. We are building in place.
709 ac_sub_srcdir=$srcdir ;;
710 [\\/]* | ?:[\\/]* ) # Absolute path.
711 ac_sub_srcdir=$srcdir/$ac_subdir ;;
712 *) # Relative path.
713 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
714 esac
715
716 # Check for guested configure; otherwise get Cygnus style configure.
717 if test -f $ac_sub_srcdir/configure.gnu; then
718 echo
719 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
720 elif test -f $ac_sub_srcdir/configure; then
721 echo
722 $SHELL $ac_sub_srcdir/configure --help=recursive
723 elif test -f $ac_sub_srcdir/configure.ac ||
724 test -f $ac_sub_srcdir/configure.in; then
725 echo
726 $ac_configure --help
727 else
728 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
729 fi
730 cd $ac_popdir
731 done
732fi
733
734test -n "$ac_init_help" && exit 0
735if $ac_init_version; then
736 cat <<\EOF
737
738Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
739Free Software Foundation, Inc.
740This configure script is free software; the Free Software Foundation
741gives unlimited permission to copy, distribute and modify it.
742EOF
743 exit 0
744fi
745exec 5>config.log
746cat >&5 <<EOF
747This file contains any messages produced by compilers while
748running configure, to aid debugging if configure makes a mistake.
749
750It was created by $as_me, which was
751generated by GNU Autoconf 2.52.20141204. Invocation command line was
752
753 $ $0 $@
754
755EOF
756{
757cat <<_ASUNAME
758## ---------- ##
759## Platform. ##
760## ---------- ##
761
762hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
763uname -m = `(uname -m) 2>/dev/null || echo unknown`
764uname -r = `(uname -r) 2>/dev/null || echo unknown`
765uname -s = `(uname -s) 2>/dev/null || echo unknown`
766uname -v = `(uname -v) 2>/dev/null || echo unknown`
767
768/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
769/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
770
771/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
772/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
773/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
774hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
775/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
776/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
777/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
778
779PATH = $PATH
780
781_ASUNAME
782} >&5
783
784cat >&5 <<EOF
785## ------------ ##
786## Core tests. ##
787## ------------ ##
788
789EOF
790
791# Keep a trace of the command line.
792# Strip out --no-create and --no-recursion so they do not pile up.
793# Also quote any args containing shell meta-characters.
794ac_configure_args=
795ac_sep=
796for ac_arg
797do
798 case $ac_arg in
799 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
800 | --no-cr | --no-c) ;;
801 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
802 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
803 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
804 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
805 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
806 ac_sep=" " ;;
807 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
808 ac_sep=" " ;;
809 esac
810 # Get rid of the leading space.
811done
812
813# When interrupted or exit'd, cleanup temporary files, and complete
814# config.log. We remove comments because anyway the quotes in there
815# would cause problems or look ugly.
816trap 'exit_status=$?
817 # Save into config.log some information that might help in debugging.
818 echo >&5
819 echo "## ----------------- ##" >&5
820 echo "## Cache variables. ##" >&5
821 echo "## ----------------- ##" >&5
822 echo >&5
823 # The following way of writing the cache mishandles newlines in values,
824{
825 (set) 2>&1 |
826 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
827 *ac_space=\ *)
828 sed -n \
829 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
830 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
831 ;;
832 *)
833 sed -n \
834 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
835 ;;
836 esac;
837} >&5
838 sed "/^$/d" confdefs.h >conftest.log
839 if test -s conftest.log; then
840 echo >&5
841 echo "## ------------ ##" >&5
842 echo "## confdefs.h. ##" >&5
843 echo "## ------------ ##" >&5
844 echo >&5
845 cat conftest.log >&5
846 fi
847 (echo; echo) >&5
848 test "$ac_signal" != 0 &&
849 echo "$as_me: caught signal $ac_signal" >&5
850 echo "$as_me: exit $exit_status" >&5
851 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
852 exit $exit_status
853 ' 0
854for ac_signal in 1 2 13 15; do
855 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
856done
857ac_signal=0
858
859# confdefs.h avoids OS command line length limits that DEFS can exceed.
860rm -rf conftest* confdefs.h
861# AIX cpp loses on an empty file, so make sure it contains at least a newline.
862echo >confdefs.h
863
864# Let the site file select an alternate cache file if it wants to.
865# Prefer explicitly selected file to automatically selected ones.
866if test -z "$CONFIG_SITE"; then
867 if test "x$prefix" != xNONE; then
868 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
869 else
870 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
871 fi
872fi
873for ac_site_file in $CONFIG_SITE; do
874 if test -r "$ac_site_file"; then
875 { echo "$as_me:875: loading site script $ac_site_file" >&5
876echo "$as_me: loading site script $ac_site_file" >&6;}
877 cat "$ac_site_file" >&5
878 . "$ac_site_file"
879 fi
880done
881
882if test -r "$cache_file"; then
883 # Some versions of bash will fail to source /dev/null (special
884 # files actually), so we avoid doing that.
885 if test -f "$cache_file"; then
886 { echo "$as_me:886: loading cache $cache_file" >&5
887echo "$as_me: loading cache $cache_file" >&6;}
888 case $cache_file in
889 [\\/]* | ?:[\\/]* ) . $cache_file;;
890 *) . ./$cache_file;;
891 esac
892 fi
893else
894 { echo "$as_me:894: creating cache $cache_file" >&5
895echo "$as_me: creating cache $cache_file" >&6;}
896 >$cache_file
897fi
898
899# Check that the precious variables saved in the cache have kept the same
900# value.
901ac_cache_corrupted=false
902for ac_var in `(set) 2>&1 |
903 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
904 eval ac_old_set=\$ac_cv_env_${ac_var}_set
905 eval ac_new_set=\$ac_env_${ac_var}_set
906 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
907 eval ac_new_val="\$ac_env_${ac_var}_value"
908 case $ac_old_set,$ac_new_set in
909 set,)
910 { echo "$as_me:910: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
911echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
912 ac_cache_corrupted=: ;;
913 ,set)
914 { echo "$as_me:914: error: \`$ac_var' was not set in the previous run" >&5
915echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
916 ac_cache_corrupted=: ;;
917 ,);;
918 *)
919 if test "x$ac_old_val" != "x$ac_new_val"; then
920 { echo "$as_me:920: error: \`$ac_var' has changed since the previous run:" >&5
921echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
922 { echo "$as_me:922: former value: $ac_old_val" >&5
923echo "$as_me: former value: $ac_old_val" >&2;}
924 { echo "$as_me:924: current value: $ac_new_val" >&5
925echo "$as_me: current value: $ac_new_val" >&2;}
926 ac_cache_corrupted=:
927 fi;;
928 esac
929 # Pass precious variables to config.status. It doesn't matter if
930 # we pass some twice (in addition to the command line arguments).
931 if test "$ac_new_set" = set; then
932 case $ac_new_val in
933 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
935 ac_configure_args="$ac_configure_args '$ac_arg'"
936 ;;
937 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
938 ;;
939 esac
940 fi
941done
942if $ac_cache_corrupted; then
943 { echo "$as_me:943: error: changes in the environment can compromise the build" >&5
944echo "$as_me: error: changes in the environment can compromise the build" >&2;}
945 { { echo "$as_me:945: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
946echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
947 { (exit 1); exit 1; }; }
948fi
949
950ac_ext=c
951ac_cpp='$CPP $CPPFLAGS'
952ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
953ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
954ac_compiler_gnu=$ac_cv_c_compiler_gnu
955ac_main_return=return
956
957case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
958 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
959 ECHO_T=' ' ;;
960 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
961 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
962esac
963echo "#! $SHELL" >conftest.sh
964echo "exit 0" >>conftest.sh
965chmod +x conftest.sh
966if { (echo "$as_me:966: PATH=\".;.\"; conftest.sh") >&5
967 (PATH=".;."; conftest.sh) 2>&5
968 ac_status=$?
969 echo "$as_me:969: \$? = $ac_status" >&5
970 (exit $ac_status); }; then
971 ac_path_separator=';'
972else
973 ac_path_separator=:
974fi
975PATH_SEPARATOR="$ac_path_separator"
976rm -f conftest.sh
977
978ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
979
980test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
981
982test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
983
984ac_aux_dir=
985for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
986 if test -f $ac_dir/install-sh; then
987 ac_aux_dir=$ac_dir
988 ac_install_sh="$ac_aux_dir/install-sh -c"
989 break
990 elif test -f $ac_dir/install.sh; then
991 ac_aux_dir=$ac_dir
992 ac_install_sh="$ac_aux_dir/install.sh -c"
993 break
994 elif test -f $ac_dir/shtool; then
995 ac_aux_dir=$ac_dir
996 ac_install_sh="$ac_aux_dir/shtool install -c"
997 break
998 fi
999done
1000if test -z "$ac_aux_dir"; then
1001 { { echo "$as_me:1001: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1002echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1003 { (exit 1); exit 1; }; }
1004fi
1005ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1006ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1007ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1008
1009# Make sure we can run config.sub.
1010$ac_config_sub sun4 >/dev/null 2>&1 ||
1011 { { echo "$as_me:1011: error: cannot run $ac_config_sub" >&5
1012echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1013 { (exit 1); exit 1; }; }
1014
1015echo "$as_me:1015: checking build system type" >&5
1016echo $ECHO_N "checking build system type... $ECHO_C" >&6
1017if test "${ac_cv_build+set}" = set; then
1018 echo $ECHO_N "(cached) $ECHO_C" >&6
1019else
1020 ac_cv_build_alias=$build_alias
1021test -z "$ac_cv_build_alias" &&
1022 ac_cv_build_alias=`$ac_config_guess`
1023test -z "$ac_cv_build_alias" &&
1024 { { echo "$as_me:1024: error: cannot guess build type; you must specify one" >&5
1025echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1026 { (exit 1); exit 1; }; }
1027ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1028 { { echo "$as_me:1028: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1029echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1030 { (exit 1); exit 1; }; }
1031
1032fi
1033echo "$as_me:1033: result: $ac_cv_build" >&5
1034echo "${ECHO_T}$ac_cv_build" >&6
1035build=$ac_cv_build
1036build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1037build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1038build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1039
1040if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1041 echo "$as_me:1041: checking host system type" >&5
1042echo $ECHO_N "checking host system type... $ECHO_C" >&6
1043if test "${ac_cv_host+set}" = set; then
1044 echo $ECHO_N "(cached) $ECHO_C" >&6
1045else
1046 ac_cv_host_alias=$host_alias
1047test -z "$ac_cv_host_alias" &&
1048 ac_cv_host_alias=$ac_cv_build_alias
1049ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1050 { { echo "$as_me:1050: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1051echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1052 { (exit 1); exit 1; }; }
1053
1054fi
1055echo "$as_me:1055: result: $ac_cv_host" >&5
1056echo "${ECHO_T}$ac_cv_host" >&6
1057host=$ac_cv_host
1058host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1059host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1060host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1061
1062 system_name="$host_os"
1063else
1064 system_name="`(uname -s -r) 2>/dev/null`"
1065 if test -z "$system_name" ; then
1066 system_name="`(hostname) 2>/dev/null`"
1067 fi
1068fi
1069test -n "$system_name" &&
1070cat >>confdefs.h <<EOF
1071#define SYSTEM_NAME "$system_name"
1072EOF
1073
1074if test "${cf_cv_system_name+set}" = set; then
1075 echo $ECHO_N "(cached) $ECHO_C" >&6
1076else
1077 cf_cv_system_name="$system_name"
1078fi
1079
1080test -z "$system_name" && system_name="$cf_cv_system_name"
1081test -n "$cf_cv_system_name" && echo "$as_me:1081: result: Configuring for $cf_cv_system_name" >&5
1082echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1083
1084if test ".$system_name" != ".$cf_cv_system_name" ; then
1085 echo "$as_me:1085: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1086echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1087 { { echo "$as_me:1087: error: \"Please remove config.cache and try again.\"" >&5
1088echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1089 { (exit 1); exit 1; }; }
1090fi
1091
1092test "$program_prefix" != NONE &&
1093 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1094# Use a double $ so make ignores it.
1095test "$program_suffix" != NONE &&
1096 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1097# Double any \ or $. echo might interpret backslashes.
1098# By default was `s,x,x', remove it if useless.
1099cat <<\_ACEOF >conftest.sed
1100s/[\\$]/&&/g;s/;s,x,x,$//
1101_ACEOF
1102program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1103rm conftest.sed
1104
1105echo "$as_me:1105: checking whether ${MAKE-make} sets \${MAKE}" >&5
1106echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1107set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1108if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1109 echo $ECHO_N "(cached) $ECHO_C" >&6
1110else
1111 cat >conftest.make <<\EOF
1112all:
1113 @echo 'ac_maketemp="${MAKE}"'
1114EOF
1115# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1116eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1117if test -n "$ac_maketemp"; then
1118 eval ac_cv_prog_make_${ac_make}_set=yes
1119else
1120 eval ac_cv_prog_make_${ac_make}_set=no
1121fi
1122rm -f conftest.make
1123fi
1124if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1125 echo "$as_me:1125: result: yes" >&5
1126echo "${ECHO_T}yes" >&6
1127 SET_MAKE=
1128else
1129 echo "$as_me:1129: result: no" >&5
1130echo "${ECHO_T}no" >&6
1131 SET_MAKE="MAKE=${MAKE-make}"
1132fi
1133
1134ac_ext=c
1135ac_cpp='$CPP $CPPFLAGS'
1136ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1137ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1138ac_compiler_gnu=$ac_cv_c_compiler_gnu
1139ac_main_return=return
1140if test -n "$ac_tool_prefix"; then
1141 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1142set dummy ${ac_tool_prefix}gcc; ac_word=$2
1143echo "$as_me:1143: checking for $ac_word" >&5
1144echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1145if test "${ac_cv_prog_CC+set}" = set; then
1146 echo $ECHO_N "(cached) $ECHO_C" >&6
1147else
1148 if test -n "$CC"; then
1149 ac_cv_prog_CC="$CC" # Let the user override the test.
1150else
1151 ac_save_IFS=$IFS; IFS=$ac_path_separator
1152ac_dummy="$PATH"
1153for ac_dir in $ac_dummy; do
1154 IFS=$ac_save_IFS
1155 test -z "$ac_dir" && ac_dir=.
1156 $as_executable_p "$ac_dir/$ac_word" || continue
1157ac_cv_prog_CC="${ac_tool_prefix}gcc"
1158echo "$as_me:1158: found $ac_dir/$ac_word" >&5
1159break
1160done
1161
1162fi
1163fi
1164CC=$ac_cv_prog_CC
1165if test -n "$CC"; then
1166 echo "$as_me:1166: result: $CC" >&5
1167echo "${ECHO_T}$CC" >&6
1168else
1169 echo "$as_me:1169: result: no" >&5
1170echo "${ECHO_T}no" >&6
1171fi
1172
1173fi
1174if test -z "$ac_cv_prog_CC"; then
1175 ac_ct_CC=$CC
1176 # Extract the first word of "gcc", so it can be a program name with args.
1177set dummy gcc; ac_word=$2
1178echo "$as_me:1178: checking for $ac_word" >&5
1179echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1180if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1181 echo $ECHO_N "(cached) $ECHO_C" >&6
1182else
1183 if test -n "$ac_ct_CC"; then
1184 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1185else
1186 ac_save_IFS=$IFS; IFS=$ac_path_separator
1187ac_dummy="$PATH"
1188for ac_dir in $ac_dummy; do
1189 IFS=$ac_save_IFS
1190 test -z "$ac_dir" && ac_dir=.
1191 $as_executable_p "$ac_dir/$ac_word" || continue
1192ac_cv_prog_ac_ct_CC="gcc"
1193echo "$as_me:1193: found $ac_dir/$ac_word" >&5
1194break
1195done
1196
1197fi
1198fi
1199ac_ct_CC=$ac_cv_prog_ac_ct_CC
1200if test -n "$ac_ct_CC"; then
1201 echo "$as_me:1201: result: $ac_ct_CC" >&5
1202echo "${ECHO_T}$ac_ct_CC" >&6
1203else
1204 echo "$as_me:1204: result: no" >&5
1205echo "${ECHO_T}no" >&6
1206fi
1207
1208 CC=$ac_ct_CC
1209else
1210 CC="$ac_cv_prog_CC"
1211fi
1212
1213if test -z "$CC"; then
1214 if test -n "$ac_tool_prefix"; then
1215 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1216set dummy ${ac_tool_prefix}cc; ac_word=$2
1217echo "$as_me:1217: checking for $ac_word" >&5
1218echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219if test "${ac_cv_prog_CC+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1221else
1222 if test -n "$CC"; then
1223 ac_cv_prog_CC="$CC" # Let the user override the test.
1224else
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1226ac_dummy="$PATH"
1227for ac_dir in $ac_dummy; do
1228 IFS=$ac_save_IFS
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231ac_cv_prog_CC="${ac_tool_prefix}cc"
1232echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1233break
1234done
1235
1236fi
1237fi
1238CC=$ac_cv_prog_CC
1239if test -n "$CC"; then
1240 echo "$as_me:1240: result: $CC" >&5
1241echo "${ECHO_T}$CC" >&6
1242else
1243 echo "$as_me:1243: result: no" >&5
1244echo "${ECHO_T}no" >&6
1245fi
1246
1247fi
1248if test -z "$ac_cv_prog_CC"; then
1249 ac_ct_CC=$CC
1250 # Extract the first word of "cc", so it can be a program name with args.
1251set dummy cc; ac_word=$2
1252echo "$as_me:1252: checking for $ac_word" >&5
1253echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1254if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1255 echo $ECHO_N "(cached) $ECHO_C" >&6
1256else
1257 if test -n "$ac_ct_CC"; then
1258 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1259else
1260 ac_save_IFS=$IFS; IFS=$ac_path_separator
1261ac_dummy="$PATH"
1262for ac_dir in $ac_dummy; do
1263 IFS=$ac_save_IFS
1264 test -z "$ac_dir" && ac_dir=.
1265 $as_executable_p "$ac_dir/$ac_word" || continue
1266ac_cv_prog_ac_ct_CC="cc"
1267echo "$as_me:1267: found $ac_dir/$ac_word" >&5
1268break
1269done
1270
1271fi
1272fi
1273ac_ct_CC=$ac_cv_prog_ac_ct_CC
1274if test -n "$ac_ct_CC"; then
1275 echo "$as_me:1275: result: $ac_ct_CC" >&5
1276echo "${ECHO_T}$ac_ct_CC" >&6
1277else
1278 echo "$as_me:1278: result: no" >&5
1279echo "${ECHO_T}no" >&6
1280fi
1281
1282 CC=$ac_ct_CC
1283else
1284 CC="$ac_cv_prog_CC"
1285fi
1286
1287fi
1288if test -z "$CC"; then
1289 # Extract the first word of "cc", so it can be a program name with args.
1290set dummy cc; ac_word=$2
1291echo "$as_me:1291: checking for $ac_word" >&5
1292echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1293if test "${ac_cv_prog_CC+set}" = set; then
1294 echo $ECHO_N "(cached) $ECHO_C" >&6
1295else
1296 if test -n "$CC"; then
1297 ac_cv_prog_CC="$CC" # Let the user override the test.
1298else
1299 ac_prog_rejected=no
1300 ac_save_IFS=$IFS; IFS=$ac_path_separator
1301ac_dummy="$PATH"
1302for ac_dir in $ac_dummy; do
1303 IFS=$ac_save_IFS
1304 test -z "$ac_dir" && ac_dir=.
1305 $as_executable_p "$ac_dir/$ac_word" || continue
1306if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1307 ac_prog_rejected=yes
1308 continue
1309fi
1310ac_cv_prog_CC="cc"
1311echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1312break
1313done
1314
1315if test $ac_prog_rejected = yes; then
1316 # We found a bogon in the path, so make sure we never use it.
1317 set dummy $ac_cv_prog_CC
1318 shift
1319 if test $# != 0; then
1320 # We chose a different compiler from the bogus one.
1321 # However, it has the same basename, so the bogon will be chosen
1322 # first if we set CC to just the basename; use the full file name.
1323 shift
1324 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1325 shift
1326 ac_cv_prog_CC="$@"
1327 fi
1328fi
1329fi
1330fi
1331CC=$ac_cv_prog_CC
1332if test -n "$CC"; then
1333 echo "$as_me:1333: result: $CC" >&5
1334echo "${ECHO_T}$CC" >&6
1335else
1336 echo "$as_me:1336: result: no" >&5
1337echo "${ECHO_T}no" >&6
1338fi
1339
1340fi
1341if test -z "$CC"; then
1342 if test -n "$ac_tool_prefix"; then
1343 for ac_prog in cl
1344 do
1345 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1346set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1347echo "$as_me:1347: checking for $ac_word" >&5
1348echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1349if test "${ac_cv_prog_CC+set}" = set; then
1350 echo $ECHO_N "(cached) $ECHO_C" >&6
1351else
1352 if test -n "$CC"; then
1353 ac_cv_prog_CC="$CC" # Let the user override the test.
1354else
1355 ac_save_IFS=$IFS; IFS=$ac_path_separator
1356ac_dummy="$PATH"
1357for ac_dir in $ac_dummy; do
1358 IFS=$ac_save_IFS
1359 test -z "$ac_dir" && ac_dir=.
1360 $as_executable_p "$ac_dir/$ac_word" || continue
1361ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1362echo "$as_me:1362: found $ac_dir/$ac_word" >&5
1363break
1364done
1365
1366fi
1367fi
1368CC=$ac_cv_prog_CC
1369if test -n "$CC"; then
1370 echo "$as_me:1370: result: $CC" >&5
1371echo "${ECHO_T}$CC" >&6
1372else
1373 echo "$as_me:1373: result: no" >&5
1374echo "${ECHO_T}no" >&6
1375fi
1376
1377 test -n "$CC" && break
1378 done
1379fi
1380if test -z "$CC"; then
1381 ac_ct_CC=$CC
1382 for ac_prog in cl
1383do
1384 # Extract the first word of "$ac_prog", so it can be a program name with args.
1385set dummy $ac_prog; ac_word=$2
1386echo "$as_me:1386: checking for $ac_word" >&5
1387echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1388if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1389 echo $ECHO_N "(cached) $ECHO_C" >&6
1390else
1391 if test -n "$ac_ct_CC"; then
1392 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1393else
1394 ac_save_IFS=$IFS; IFS=$ac_path_separator
1395ac_dummy="$PATH"
1396for ac_dir in $ac_dummy; do
1397 IFS=$ac_save_IFS
1398 test -z "$ac_dir" && ac_dir=.
1399 $as_executable_p "$ac_dir/$ac_word" || continue
1400ac_cv_prog_ac_ct_CC="$ac_prog"
1401echo "$as_me:1401: found $ac_dir/$ac_word" >&5
1402break
1403done
1404
1405fi
1406fi
1407ac_ct_CC=$ac_cv_prog_ac_ct_CC
1408if test -n "$ac_ct_CC"; then
1409 echo "$as_me:1409: result: $ac_ct_CC" >&5
1410echo "${ECHO_T}$ac_ct_CC" >&6
1411else
1412 echo "$as_me:1412: result: no" >&5
1413echo "${ECHO_T}no" >&6
1414fi
1415
1416 test -n "$ac_ct_CC" && break
1417done
1418
1419 CC=$ac_ct_CC
1420fi
1421
1422fi
1423
1424test -z "$CC" && { { echo "$as_me:1424: error: no acceptable cc found in \$PATH" >&5
1425echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1426 { (exit 1); exit 1; }; }
1427
1428# Provide some information about the compiler.
1429echo "$as_me:1429:" \
1430 "checking for C compiler version" >&5
1431ac_compiler=`set X $ac_compile; echo $2`
1432{ (eval echo "$as_me:1432: \"$ac_compiler --version </dev/null >&5\"") >&5
1433 (eval $ac_compiler --version </dev/null >&5) 2>&5
1434 ac_status=$?
1435 echo "$as_me:1435: \$? = $ac_status" >&5
1436 (exit $ac_status); }
1437{ (eval echo "$as_me:1437: \"$ac_compiler -v </dev/null >&5\"") >&5
1438 (eval $ac_compiler -v </dev/null >&5) 2>&5
1439 ac_status=$?
1440 echo "$as_me:1440: \$? = $ac_status" >&5
1441 (exit $ac_status); }
1442{ (eval echo "$as_me:1442: \"$ac_compiler -V </dev/null >&5\"") >&5
1443 (eval $ac_compiler -V </dev/null >&5) 2>&5
1444 ac_status=$?
1445 echo "$as_me:1445: \$? = $ac_status" >&5
1446 (exit $ac_status); }
1447
1448cat >conftest.$ac_ext <<_ACEOF
1449#line 1449 "configure"
1450#include "confdefs.h"
1451
1452int
1453main ()
1454{
1455
1456 ;
1457 return 0;
1458}
1459_ACEOF
1460ac_clean_files_save=$ac_clean_files
1461ac_clean_files="$ac_clean_files a.out a.exe"
1462# Try to create an executable without -o first, disregard a.out.
1463# It will help us diagnose broken compilers, and finding out an intuition
1464# of exeext.
1465echo "$as_me:1465: checking for C compiler default output" >&5
1466echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1467ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1468if { (eval echo "$as_me:1468: \"$ac_link_default\"") >&5
1469 (eval $ac_link_default) 2>&5
1470 ac_status=$?
1471 echo "$as_me:1471: \$? = $ac_status" >&5
1472 (exit $ac_status); }; then
1473 # Find the output, starting from the most likely. This scheme is
1474# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1475# resort.
1476for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1477 ls a.out conftest 2>/dev/null;
1478 ls a.* conftest.* 2>/dev/null`; do
1479 case $ac_file in
1480 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1481 a.out ) # We found the default executable, but exeext='' is most
1482 # certainly right.
1483 break;;
1484 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1485 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1486 export ac_cv_exeext
1487 break;;
1488 * ) break;;
1489 esac
1490done
1491else
1492 echo "$as_me: failed program was:" >&5
1493cat conftest.$ac_ext >&5
1494{ { echo "$as_me:1494: error: C compiler cannot create executables" >&5
1495echo "$as_me: error: C compiler cannot create executables" >&2;}
1496 { (exit 77); exit 77; }; }
1497fi
1498
1499ac_exeext=$ac_cv_exeext
1500echo "$as_me:1500: result: $ac_file" >&5
1501echo "${ECHO_T}$ac_file" >&6
1502
1503# Check the compiler produces executables we can run. If not, either
1504# the compiler is broken, or we cross compile.
1505echo "$as_me:1505: checking whether the C compiler works" >&5
1506echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1507# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1508# If not cross compiling, check that we can run a simple program.
1509if test "$cross_compiling" != yes; then
1510 if { ac_try='./$ac_file'
1511 { (eval echo "$as_me:1511: \"$ac_try\"") >&5
1512 (eval $ac_try) 2>&5
1513 ac_status=$?
1514 echo "$as_me:1514: \$? = $ac_status" >&5
1515 (exit $ac_status); }; }; then
1516 cross_compiling=no
1517 else
1518 if test "$cross_compiling" = maybe; then
1519 cross_compiling=yes
1520 else
1521 { { echo "$as_me:1521: error: cannot run C compiled programs.
1522If you meant to cross compile, use \`--host'." >&5
1523echo "$as_me: error: cannot run C compiled programs.
1524If you meant to cross compile, use \`--host'." >&2;}
1525 { (exit 1); exit 1; }; }
1526 fi
1527 fi
1528fi
1529echo "$as_me:1529: result: yes" >&5
1530echo "${ECHO_T}yes" >&6
1531
1532rm -f a.out a.exe conftest$ac_cv_exeext
1533ac_clean_files=$ac_clean_files_save
1534# Check the compiler produces executables we can run. If not, either
1535# the compiler is broken, or we cross compile.
1536echo "$as_me:1536: checking whether we are cross compiling" >&5
1537echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1538echo "$as_me:1538: result: $cross_compiling" >&5
1539echo "${ECHO_T}$cross_compiling" >&6
1540
1541echo "$as_me:1541: checking for executable suffix" >&5
1542echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1543if { (eval echo "$as_me:1543: \"$ac_link\"") >&5
1544 (eval $ac_link) 2>&5
1545 ac_status=$?
1546 echo "$as_me:1546: \$? = $ac_status" >&5
1547 (exit $ac_status); }; then
1548 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1549# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1550# work properly (i.e., refer to `conftest.exe'), while it won't with
1551# `rm'.
1552for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1553 case $ac_file in
1554 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1555 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1556 export ac_cv_exeext
1557 break;;
1558 * ) break;;
1559 esac
1560done
1561else
1562 { { echo "$as_me:1562: error: cannot compute EXEEXT: cannot compile and link" >&5
1563echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1564 { (exit 1); exit 1; }; }
1565fi
1566
1567rm -f conftest$ac_cv_exeext
1568echo "$as_me:1568: result: $ac_cv_exeext" >&5
1569echo "${ECHO_T}$ac_cv_exeext" >&6
1570
1571rm -f conftest.$ac_ext
1572EXEEXT=$ac_cv_exeext
1573ac_exeext=$EXEEXT
1574echo "$as_me:1574: checking for object suffix" >&5
1575echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1576if test "${ac_cv_objext+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1578else
1579 cat >conftest.$ac_ext <<_ACEOF
1580#line 1580 "configure"
1581#include "confdefs.h"
1582
1583int
1584main ()
1585{
1586
1587 ;
1588 return 0;
1589}
1590_ACEOF
1591rm -f conftest.o conftest.obj
1592if { (eval echo "$as_me:1592: \"$ac_compile\"") >&5
1593 (eval $ac_compile) 2>&5
1594 ac_status=$?
1595 echo "$as_me:1595: \$? = $ac_status" >&5
1596 (exit $ac_status); }; then
1597 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1598 case $ac_file in
1599 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1600 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1601 break;;
1602 esac
1603done
1604else
1605 echo "$as_me: failed program was:" >&5
1606cat conftest.$ac_ext >&5
1607{ { echo "$as_me:1607: error: cannot compute OBJEXT: cannot compile" >&5
1608echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1609 { (exit 1); exit 1; }; }
1610fi
1611
1612rm -f conftest.$ac_cv_objext conftest.$ac_ext
1613fi
1614echo "$as_me:1614: result: $ac_cv_objext" >&5
1615echo "${ECHO_T}$ac_cv_objext" >&6
1616OBJEXT=$ac_cv_objext
1617ac_objext=$OBJEXT
1618echo "$as_me:1618: checking whether we are using the GNU C compiler" >&5
1619echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1620if test "${ac_cv_c_compiler_gnu+set}" = set; then
1621 echo $ECHO_N "(cached) $ECHO_C" >&6
1622else
1623 cat >conftest.$ac_ext <<_ACEOF
1624#line 1624 "configure"
1625#include "confdefs.h"
1626
1627int
1628main ()
1629{
1630#ifndef __GNUC__
1631 choke me
1632#endif
1633
1634 ;
1635 return 0;
1636}
1637_ACEOF
1638rm -f conftest.$ac_objext
1639if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
1640 (eval $ac_compile) 2>&5
1641 ac_status=$?
1642 echo "$as_me:1642: \$? = $ac_status" >&5
1643 (exit $ac_status); } &&
1644 { ac_try='test -s conftest.$ac_objext'
1645 { (eval echo "$as_me:1645: \"$ac_try\"") >&5
1646 (eval $ac_try) 2>&5
1647 ac_status=$?
1648 echo "$as_me:1648: \$? = $ac_status" >&5
1649 (exit $ac_status); }; }; then
1650 ac_compiler_gnu=yes
1651else
1652 echo "$as_me: failed program was:" >&5
1653cat conftest.$ac_ext >&5
1654ac_compiler_gnu=no
1655fi
1656rm -f conftest.$ac_objext conftest.$ac_ext
1657ac_cv_c_compiler_gnu=$ac_compiler_gnu
1658
1659fi
1660echo "$as_me:1660: result: $ac_cv_c_compiler_gnu" >&5
1661echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1662GCC=`test $ac_compiler_gnu = yes && echo yes`
1663ac_test_CFLAGS=${CFLAGS+set}
1664ac_save_CFLAGS=$CFLAGS
1665CFLAGS="-g"
1666echo "$as_me:1666: checking whether $CC accepts -g" >&5
1667echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1668if test "${ac_cv_prog_cc_g+set}" = set; then
1669 echo $ECHO_N "(cached) $ECHO_C" >&6
1670else
1671 cat >conftest.$ac_ext <<_ACEOF
1672#line 1672 "configure"
1673#include "confdefs.h"
1674
1675int
1676main ()
1677{
1678
1679 ;
1680 return 0;
1681}
1682_ACEOF
1683rm -f conftest.$ac_objext
1684if { (eval echo "$as_me:1684: \"$ac_compile\"") >&5
1685 (eval $ac_compile) 2>&5
1686 ac_status=$?
1687 echo "$as_me:1687: \$? = $ac_status" >&5
1688 (exit $ac_status); } &&
1689 { ac_try='test -s conftest.$ac_objext'
1690 { (eval echo "$as_me:1690: \"$ac_try\"") >&5
1691 (eval $ac_try) 2>&5
1692 ac_status=$?
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); }; }; then
1695 ac_cv_prog_cc_g=yes
1696else
1697 echo "$as_me: failed program was:" >&5
1698cat conftest.$ac_ext >&5
1699ac_cv_prog_cc_g=no
1700fi
1701rm -f conftest.$ac_objext conftest.$ac_ext
1702fi
1703echo "$as_me:1703: result: $ac_cv_prog_cc_g" >&5
1704echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1705if test "$ac_test_CFLAGS" = set; then
1706 CFLAGS=$ac_save_CFLAGS
1707elif test $ac_cv_prog_cc_g = yes; then
1708 if test "$GCC" = yes; then
1709 CFLAGS="-g -O2"
1710 else
1711 CFLAGS="-g"
1712 fi
1713else
1714 if test "$GCC" = yes; then
1715 CFLAGS="-O2"
1716 else
1717 CFLAGS=
1718 fi
1719fi
1720# Some people use a C++ compiler to compile C. Since we use `exit',
1721# in C++ we need to declare it. In case someone uses the same compiler
1722# for both compiling C and C++ we need to have the C++ compiler decide
1723# the declaration of exit, since it's the most demanding environment.
1724cat >conftest.$ac_ext <<_ACEOF
1725#ifndef __cplusplus
1726 choke me
1727#endif
1728_ACEOF
1729rm -f conftest.$ac_objext
1730if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5
1731 (eval $ac_compile) 2>&5
1732 ac_status=$?
1733 echo "$as_me:1733: \$? = $ac_status" >&5
1734 (exit $ac_status); } &&
1735 { ac_try='test -s conftest.$ac_objext'
1736 { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1737 (eval $ac_try) 2>&5
1738 ac_status=$?
1739 echo "$as_me:1739: \$? = $ac_status" >&5
1740 (exit $ac_status); }; }; then
1741 for ac_declaration in \
1742 ''\
1743 '#include <stdlib.h>' \
1744 'extern "C" void std::exit (int) throw (); using std::exit;' \
1745 'extern "C" void std::exit (int); using std::exit;' \
1746 'extern "C" void exit (int) throw ();' \
1747 'extern "C" void exit (int);' \
1748 'void exit (int);'
1749do
1750 cat >conftest.$ac_ext <<_ACEOF
1751#line 1751 "configure"
1752#include "confdefs.h"
1753#include <stdlib.h>
1754$ac_declaration
1755int
1756main ()
1757{
1758exit (42);
1759 ;
1760 return 0;
1761}
1762_ACEOF
1763rm -f conftest.$ac_objext
1764if { (eval echo "$as_me:1764: \"$ac_compile\"") >&5
1765 (eval $ac_compile) 2>&5
1766 ac_status=$?
1767 echo "$as_me:1767: \$? = $ac_status" >&5
1768 (exit $ac_status); } &&
1769 { ac_try='test -s conftest.$ac_objext'
1770 { (eval echo "$as_me:1770: \"$ac_try\"") >&5
1771 (eval $ac_try) 2>&5
1772 ac_status=$?
1773 echo "$as_me:1773: \$? = $ac_status" >&5
1774 (exit $ac_status); }; }; then
1775 :
1776else
1777 echo "$as_me: failed program was:" >&5
1778cat conftest.$ac_ext >&5
1779continue
1780fi
1781rm -f conftest.$ac_objext conftest.$ac_ext
1782 cat >conftest.$ac_ext <<_ACEOF
1783#line 1783 "configure"
1784#include "confdefs.h"
1785$ac_declaration
1786int
1787main ()
1788{
1789exit (42);
1790 ;
1791 return 0;
1792}
1793_ACEOF
1794rm -f conftest.$ac_objext
1795if { (eval echo "$as_me:1795: \"$ac_compile\"") >&5
1796 (eval $ac_compile) 2>&5
1797 ac_status=$?
1798 echo "$as_me:1798: \$? = $ac_status" >&5
1799 (exit $ac_status); } &&
1800 { ac_try='test -s conftest.$ac_objext'
1801 { (eval echo "$as_me:1801: \"$ac_try\"") >&5
1802 (eval $ac_try) 2>&5
1803 ac_status=$?
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit $ac_status); }; }; then
1806 break
1807else
1808 echo "$as_me: failed program was:" >&5
1809cat conftest.$ac_ext >&5
1810fi
1811rm -f conftest.$ac_objext conftest.$ac_ext
1812done
1813rm -rf conftest*
1814if test -n "$ac_declaration"; then
1815 echo '#ifdef __cplusplus' >>confdefs.h
1816 echo $ac_declaration >>confdefs.h
1817 echo '#endif' >>confdefs.h
1818fi
1819
1820else
1821 echo "$as_me: failed program was:" >&5
1822cat conftest.$ac_ext >&5
1823fi
1824rm -f conftest.$ac_objext conftest.$ac_ext
1825ac_ext=c
1826ac_cpp='$CPP $CPPFLAGS'
1827ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1828ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1829ac_compiler_gnu=$ac_cv_c_compiler_gnu
1830ac_main_return=return
1831
1832GCC_VERSION=none
1833if test "$GCC" = yes ; then
1834 echo "$as_me:1834: checking version of $CC" >&5
1835echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1836 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.].*//'`"
1837 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1838 echo "$as_me:1838: result: $GCC_VERSION" >&5
1839echo "${ECHO_T}$GCC_VERSION" >&6
1840fi
1841
1842echo "$as_me:1842: checking for $CC option to accept ANSI C" >&5
1843echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1844if test "${ac_cv_prog_cc_stdc+set}" = set; then
1845 echo $ECHO_N "(cached) $ECHO_C" >&6
1846else
1847 ac_cv_prog_cc_stdc=no
1848ac_save_CC=$CC
1849cat >conftest.$ac_ext <<_ACEOF
1850#line 1850 "configure"
1851#include "confdefs.h"
1852#include <stdarg.h>
1853#include <stdio.h>
1854#include <sys/types.h>
1855#include <sys/stat.h>
1856/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1857struct buf { int x; };
1858FILE * (*rcsopen) (struct buf *, struct stat *, int);
1859static char *e (p, i)
1860 char **p;
1861 int i;
1862{
1863 return p[i];
1864}
1865static char *f (char * (*g) (char **, int), char **p, ...)
1866{
1867 char *s;
1868 va_list v;
1869 va_start (v,p);
1870 s = g (p, va_arg (v,int));
1871 va_end (v);
1872 return s;
1873}
1874int test (int i, double x);
1875struct s1 {int (*f) (int a);};
1876struct s2 {int (*f) (double a);};
1877int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1878int argc;
1879char **argv;
1880int
1881main ()
1882{
1883return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888# Don't try gcc -ansi; that turns off useful extensions and
1889# breaks some systems' header files.
1890# AIX -qlanglvl=ansi
1891# Ultrix and OSF/1 -std1
1892# HP-UX 10.20 and later -Ae
1893# HP-UX older versions -Aa -D_HPUX_SOURCE
1894# SVR4 -Xc -D__EXTENSIONS__
1895for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1896do
1897 CC="$ac_save_CC $ac_arg"
1898 rm -f conftest.$ac_objext
1899if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900 (eval $ac_compile) 2>&5
1901 ac_status=$?
1902 echo "$as_me:1902: \$? = $ac_status" >&5
1903 (exit $ac_status); } &&
1904 { ac_try='test -s conftest.$ac_objext'
1905 { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906 (eval $ac_try) 2>&5
1907 ac_status=$?
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit $ac_status); }; }; then
1910 ac_cv_prog_cc_stdc=$ac_arg
1911break
1912else
1913 echo "$as_me: failed program was:" >&5
1914cat conftest.$ac_ext >&5
1915fi
1916rm -f conftest.$ac_objext
1917done
1918rm -f conftest.$ac_ext conftest.$ac_objext
1919CC=$ac_save_CC
1920
1921fi
1922
1923case "x$ac_cv_prog_cc_stdc" in
1924 x|xno)
1925 echo "$as_me:1925: result: none needed" >&5
1926echo "${ECHO_T}none needed" >&6 ;;
1927 *)
1928 echo "$as_me:1928: result: $ac_cv_prog_cc_stdc" >&5
1929echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1930 CC="$CC $ac_cv_prog_cc_stdc" ;;
1931esac
1932
1933# This should have been defined by AC_PROG_CC
1934: ${CC:=cc}
1935
1936echo "$as_me:1936: checking \$CC variable" >&5
1937echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1938case "$CC" in
1939(*[\ \ ]-[IUD]*)
1940 echo "$as_me:1940: result: broken" >&5
1941echo "${ECHO_T}broken" >&6
1942 { echo "$as_me:1942: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1943echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1944 # humor him...
1945 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
1946 CC=`echo "$CC" | sed -e 's/[ ].*//'`
1947
1948cf_fix_cppflags=no
1949cf_new_cflags=
1950cf_new_cppflags=
1951cf_new_extra_cppflags=
1952
1953for cf_add_cflags in $cf_flags
1954do
1955case $cf_fix_cppflags in
1956(no)
1957 case $cf_add_cflags in
1958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1959 case $cf_add_cflags in
1960 (-D*)
1961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1962
1963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1964 && test -z "${cf_tst_cflags}" \
1965 && cf_fix_cppflags=yes
1966
1967 if test $cf_fix_cppflags = yes ; then
1968 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1969 continue
1970 elif test "${cf_tst_cflags}" = "\"'" ; then
1971 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1972 continue
1973 fi
1974 ;;
1975 esac
1976 case "$CPPFLAGS" in
1977 (*$cf_add_cflags)
1978 ;;
1979 (*)
1980 case $cf_add_cflags in
1981 (-D*)
1982 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1983
1984CPPFLAGS=`echo "$CPPFLAGS" | \
1985 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1986 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1987
1988 ;;
1989 esac
1990 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1991 ;;
1992 esac
1993 ;;
1994 (*)
1995 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1996 ;;
1997 esac
1998 ;;
1999(yes)
2000 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2001
2002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2003
2004 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2005 && test -z "${cf_tst_cflags}" \
2006 && cf_fix_cppflags=no
2007 ;;
2008esac
2009done
2010
2011if test -n "$cf_new_cflags" ; then
2012
2013 CFLAGS="$CFLAGS $cf_new_cflags"
2014fi
2015
2016if test -n "$cf_new_cppflags" ; then
2017
2018 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2019fi
2020
2021if test -n "$cf_new_extra_cppflags" ; then
2022
2023 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2024fi
2025
2026 ;;
2027(*)
2028 echo "$as_me:2028: result: ok" >&5
2029echo "${ECHO_T}ok" >&6
2030 ;;
2031esac
2032
2033ac_ext=c
2034ac_cpp='$CPP $CPPFLAGS'
2035ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2036ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2037ac_compiler_gnu=$ac_cv_c_compiler_gnu
2038ac_main_return=return
2039echo "$as_me:2039: checking how to run the C preprocessor" >&5
2040echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2041# On Suns, sometimes $CPP names a directory.
2042if test -n "$CPP" && test -d "$CPP"; then
2043 CPP=
2044fi
2045if test -z "$CPP"; then
2046 if test "${ac_cv_prog_CPP+set}" = set; then
2047 echo $ECHO_N "(cached) $ECHO_C" >&6
2048else
2049 # Double quotes because CPP needs to be expanded
2050 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2051 do
2052 ac_preproc_ok=false
2053for ac_c_preproc_warn_flag in '' yes
2054do
2055 # Use a header file that comes with gcc, so configuring glibc
2056 # with a fresh cross-compiler works.
2057 # On the NeXT, cc -E runs the code through the compiler's parser,
2058 # not just through cpp. "Syntax error" is here to catch this case.
2059 cat >conftest.$ac_ext <<_ACEOF
2060#line 2060 "configure"
2061#include "confdefs.h"
2062#include <assert.h>
2063 Syntax error
2064_ACEOF
2065if { (eval echo "$as_me:2065: \"$ac_cpp conftest.$ac_ext\"") >&5
2066 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2067 ac_status=$?
2068 egrep -v '^ *\+' conftest.er1 >conftest.err
2069 rm -f conftest.er1
2070 cat conftest.err >&5
2071 echo "$as_me:2071: \$? = $ac_status" >&5
2072 (exit $ac_status); } >/dev/null; then
2073 if test -s conftest.err; then
2074 ac_cpp_err=$ac_c_preproc_warn_flag
2075 else
2076 ac_cpp_err=
2077 fi
2078else
2079 ac_cpp_err=yes
2080fi
2081if test -z "$ac_cpp_err"; then
2082 :
2083else
2084 echo "$as_me: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 # Broken: fails on valid input.
2087continue
2088fi
2089rm -f conftest.err conftest.$ac_ext
2090
2091 # OK, works on sane cases. Now check whether non-existent headers
2092 # can be detected and how.
2093 cat >conftest.$ac_ext <<_ACEOF
2094#line 2094 "configure"
2095#include "confdefs.h"
2096#include <ac_nonexistent.h>
2097_ACEOF
2098if { (eval echo "$as_me:2098: \"$ac_cpp conftest.$ac_ext\"") >&5
2099 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2100 ac_status=$?
2101 egrep -v '^ *\+' conftest.er1 >conftest.err
2102 rm -f conftest.er1
2103 cat conftest.err >&5
2104 echo "$as_me:2104: \$? = $ac_status" >&5
2105 (exit $ac_status); } >/dev/null; then
2106 if test -s conftest.err; then
2107 ac_cpp_err=$ac_c_preproc_warn_flag
2108 else
2109 ac_cpp_err=
2110 fi
2111else
2112 ac_cpp_err=yes
2113fi
2114if test -z "$ac_cpp_err"; then
2115 # Broken: success on invalid input.
2116continue
2117else
2118 echo "$as_me: failed program was:" >&5
2119 cat conftest.$ac_ext >&5
2120 # Passes both tests.
2121ac_preproc_ok=:
2122break
2123fi
2124rm -f conftest.err conftest.$ac_ext
2125
2126done
2127# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2128rm -f conftest.err conftest.$ac_ext
2129if $ac_preproc_ok; then
2130 break
2131fi
2132
2133 done
2134 ac_cv_prog_CPP=$CPP
2135
2136fi
2137 CPP=$ac_cv_prog_CPP
2138else
2139 ac_cv_prog_CPP=$CPP
2140fi
2141echo "$as_me:2141: result: $CPP" >&5
2142echo "${ECHO_T}$CPP" >&6
2143ac_preproc_ok=false
2144for ac_c_preproc_warn_flag in '' yes
2145do
2146 # Use a header file that comes with gcc, so configuring glibc
2147 # with a fresh cross-compiler works.
2148 # On the NeXT, cc -E runs the code through the compiler's parser,
2149 # not just through cpp. "Syntax error" is here to catch this case.
2150 cat >conftest.$ac_ext <<_ACEOF
2151#line 2151 "configure"
2152#include "confdefs.h"
2153#include <assert.h>
2154 Syntax error
2155_ACEOF
2156if { (eval echo "$as_me:2156: \"$ac_cpp conftest.$ac_ext\"") >&5
2157 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2158 ac_status=$?
2159 egrep -v '^ *\+' conftest.er1 >conftest.err
2160 rm -f conftest.er1
2161 cat conftest.err >&5
2162 echo "$as_me:2162: \$? = $ac_status" >&5
2163 (exit $ac_status); } >/dev/null; then
2164 if test -s conftest.err; then
2165 ac_cpp_err=$ac_c_preproc_warn_flag
2166 else
2167 ac_cpp_err=
2168 fi
2169else
2170 ac_cpp_err=yes
2171fi
2172if test -z "$ac_cpp_err"; then
2173 :
2174else
2175 echo "$as_me: failed program was:" >&5
2176 cat conftest.$ac_ext >&5
2177 # Broken: fails on valid input.
2178continue
2179fi
2180rm -f conftest.err conftest.$ac_ext
2181
2182 # OK, works on sane cases. Now check whether non-existent headers
2183 # can be detected and how.
2184 cat >conftest.$ac_ext <<_ACEOF
2185#line 2185 "configure"
2186#include "confdefs.h"
2187#include <ac_nonexistent.h>
2188_ACEOF
2189if { (eval echo "$as_me:2189: \"$ac_cpp conftest.$ac_ext\"") >&5
2190 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2191 ac_status=$?
2192 egrep -v '^ *\+' conftest.er1 >conftest.err
2193 rm -f conftest.er1
2194 cat conftest.err >&5
2195 echo "$as_me:2195: \$? = $ac_status" >&5
2196 (exit $ac_status); } >/dev/null; then
2197 if test -s conftest.err; then
2198 ac_cpp_err=$ac_c_preproc_warn_flag
2199 else
2200 ac_cpp_err=
2201 fi
2202else
2203 ac_cpp_err=yes
2204fi
2205if test -z "$ac_cpp_err"; then
2206 # Broken: success on invalid input.
2207continue
2208else
2209 echo "$as_me: failed program was:" >&5
2210 cat conftest.$ac_ext >&5
2211 # Passes both tests.
2212ac_preproc_ok=:
2213break
2214fi
2215rm -f conftest.err conftest.$ac_ext
2216
2217done
2218# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2219rm -f conftest.err conftest.$ac_ext
2220if $ac_preproc_ok; then
2221 :
2222else
2223 { { echo "$as_me:2223: error: C preprocessor \"$CPP\" fails sanity check" >&5
2224echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2225 { (exit 1); exit 1; }; }
2226fi
2227
2228ac_ext=c
2229ac_cpp='$CPP $CPPFLAGS'
2230ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2231ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2232ac_compiler_gnu=$ac_cv_c_compiler_gnu
2233ac_main_return=return
2234
2235for ac_prog in mawk gawk nawk awk
2236do
2237 # Extract the first word of "$ac_prog", so it can be a program name with args.
2238set dummy $ac_prog; ac_word=$2
2239echo "$as_me:2239: checking for $ac_word" >&5
2240echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2241if test "${ac_cv_prog_AWK+set}" = set; then
2242 echo $ECHO_N "(cached) $ECHO_C" >&6
2243else
2244 if test -n "$AWK"; then
2245 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2246else
2247 ac_save_IFS=$IFS; IFS=$ac_path_separator
2248ac_dummy="$PATH"
2249for ac_dir in $ac_dummy; do
2250 IFS=$ac_save_IFS
2251 test -z "$ac_dir" && ac_dir=.
2252 $as_executable_p "$ac_dir/$ac_word" || continue
2253ac_cv_prog_AWK="$ac_prog"
2254echo "$as_me:2254: found $ac_dir/$ac_word" >&5
2255break
2256done
2257
2258fi
2259fi
2260AWK=$ac_cv_prog_AWK
2261if test -n "$AWK"; then
2262 echo "$as_me:2262: result: $AWK" >&5
2263echo "${ECHO_T}$AWK" >&6
2264else
2265 echo "$as_me:2265: result: no" >&5
2266echo "${ECHO_T}no" >&6
2267fi
2268
2269 test -n "$AWK" && break
2270done
2271
2272# Find a good install program. We prefer a C program (faster),
2273# so one script is as good as another. But avoid the broken or
2274# incompatible versions:
2275# SysV /etc/install, /usr/sbin/install
2276# SunOS /usr/etc/install
2277# IRIX /sbin/install
2278# AIX /bin/install
2279# AmigaOS /C/install, which installs bootblocks on floppy discs
2280# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2281# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2282# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2283# ./install, which can be erroneously created by make from ./install.sh.
2284echo "$as_me:2284: checking for a BSD compatible install" >&5
2285echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2286if test -z "$INSTALL"; then
2287if test "${ac_cv_path_install+set}" = set; then
2288 echo $ECHO_N "(cached) $ECHO_C" >&6
2289else
2290 ac_save_IFS=$IFS; IFS=$ac_path_separator
2291 for ac_dir in $PATH; do
2292 IFS=$ac_save_IFS
2293 # Account for people who put trailing slashes in PATH elements.
2294 case $ac_dir/ in
2295 / | ./ | .// | /cC/* \
2296 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2297 | /usr/ucb/* ) ;;
2298 *)
2299 # OSF1 and SCO ODT 3.0 have their own names for install.
2300 # Don't use installbsd from OSF since it installs stuff as root
2301 # by default.
2302 for ac_prog in ginstall scoinst install; do
2303 if $as_executable_p "$ac_dir/$ac_prog"; then
2304 if test $ac_prog = install &&
2305 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2306 # AIX install. It has an incompatible calling convention.
2307 :
2308 elif test $ac_prog = install &&
2309 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2310 # program-specific install script used by HP pwplus--don't use.
2311 :
2312 else
2313 ac_cv_path_install="$ac_dir/$ac_prog -c"
2314 break 2
2315 fi
2316 fi
2317 done
2318 ;;
2319 esac
2320 done
2321
2322fi
2323 if test "${ac_cv_path_install+set}" = set; then
2324 INSTALL=$ac_cv_path_install
2325 else
2326 # As a last resort, use the slow shell script. We don't cache a
2327 # path for INSTALL within a source directory, because that will
2328 # break other packages using the cache if that directory is
2329 # removed, or if the path is relative.
2330 INSTALL=$ac_install_sh
2331 fi
2332fi
2333echo "$as_me:2333: result: $INSTALL" >&5
2334echo "${ECHO_T}$INSTALL" >&6
2335
2336# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2337# It thinks the first close brace ends the variable substitution.
2338test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2339
2340test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2341
2342test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2343
2344case $INSTALL in
2345(/*)
2346 ;;
2347(*)
2348 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2349 test -z "$cf_dir" && cf_dir=.
2350 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2351 ;;
2352esac
2353
2354for ac_prog in tdlint lint alint splint lclint
2355do
2356 # Extract the first word of "$ac_prog", so it can be a program name with args.
2357set dummy $ac_prog; ac_word=$2
2358echo "$as_me:2358: checking for $ac_word" >&5
2359echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2360if test "${ac_cv_prog_LINT+set}" = set; then
2361 echo $ECHO_N "(cached) $ECHO_C" >&6
2362else
2363 if test -n "$LINT"; then
2364 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2365else
2366 ac_save_IFS=$IFS; IFS=$ac_path_separator
2367ac_dummy="$PATH"
2368for ac_dir in $ac_dummy; do
2369 IFS=$ac_save_IFS
2370 test -z "$ac_dir" && ac_dir=.
2371 $as_executable_p "$ac_dir/$ac_word" || continue
2372ac_cv_prog_LINT="$ac_prog"
2373echo "$as_me:2373: found $ac_dir/$ac_word" >&5
2374break
2375done
2376
2377fi
2378fi
2379LINT=$ac_cv_prog_LINT
2380if test -n "$LINT"; then
2381 echo "$as_me:2381: result: $LINT" >&5
2382echo "${ECHO_T}$LINT" >&6
2383else
2384 echo "$as_me:2384: result: no" >&5
2385echo "${ECHO_T}no" >&6
2386fi
2387
2388 test -n "$LINT" && break
2389done
2390
2391echo "$as_me:2391: checking if filesystem supports mixed-case filenames" >&5
2392echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2393if test "${cf_cv_mixedcase+set}" = set; then
2394 echo $ECHO_N "(cached) $ECHO_C" >&6
2395else
2396
2397if test "$cross_compiling" = yes ; then
2398 case $target_alias in
2399 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2400 cf_cv_mixedcase=no
2401 ;;
2402 (*)
2403 cf_cv_mixedcase=yes
2404 ;;
2405 esac
2406else
2407 rm -f conftest CONFTEST
2408 echo test >conftest
2409 if test -f CONFTEST ; then
2410 cf_cv_mixedcase=no
2411 else
2412 cf_cv_mixedcase=yes
2413 fi
2414 rm -f conftest CONFTEST
2415fi
2416
2417fi
2418echo "$as_me:2418: result: $cf_cv_mixedcase" >&5
2419echo "${ECHO_T}$cf_cv_mixedcase" >&6
2420test "$cf_cv_mixedcase" = yes &&
2421cat >>confdefs.h <<\EOF
2422#define MIXEDCASE_FILENAMES 1
2423EOF
2424
2425for ac_prog in exctags ctags
2426do
2427 # Extract the first word of "$ac_prog", so it can be a program name with args.
2428set dummy $ac_prog; ac_word=$2
2429echo "$as_me:2429: checking for $ac_word" >&5
2430echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2431if test "${ac_cv_prog_CTAGS+set}" = set; then
2432 echo $ECHO_N "(cached) $ECHO_C" >&6
2433else
2434 if test -n "$CTAGS"; then
2435 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2436else
2437 ac_save_IFS=$IFS; IFS=$ac_path_separator
2438ac_dummy="$PATH"
2439for ac_dir in $ac_dummy; do
2440 IFS=$ac_save_IFS
2441 test -z "$ac_dir" && ac_dir=.
2442 $as_executable_p "$ac_dir/$ac_word" || continue
2443ac_cv_prog_CTAGS="$ac_prog"
2444echo "$as_me:2444: found $ac_dir/$ac_word" >&5
2445break
2446done
2447
2448fi
2449fi
2450CTAGS=$ac_cv_prog_CTAGS
2451if test -n "$CTAGS"; then
2452 echo "$as_me:2452: result: $CTAGS" >&5
2453echo "${ECHO_T}$CTAGS" >&6
2454else
2455 echo "$as_me:2455: result: no" >&5
2456echo "${ECHO_T}no" >&6
2457fi
2458
2459 test -n "$CTAGS" && break
2460done
2461
2462for ac_prog in exetags etags
2463do
2464 # Extract the first word of "$ac_prog", so it can be a program name with args.
2465set dummy $ac_prog; ac_word=$2
2466echo "$as_me:2466: checking for $ac_word" >&5
2467echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2468if test "${ac_cv_prog_ETAGS+set}" = set; then
2469 echo $ECHO_N "(cached) $ECHO_C" >&6
2470else
2471 if test -n "$ETAGS"; then
2472 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2473else
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 $as_executable_p "$ac_dir/$ac_word" || continue
2480ac_cv_prog_ETAGS="$ac_prog"
2481echo "$as_me:2481: found $ac_dir/$ac_word" >&5
2482break
2483done
2484
2485fi
2486fi
2487ETAGS=$ac_cv_prog_ETAGS
2488if test -n "$ETAGS"; then
2489 echo "$as_me:2489: result: $ETAGS" >&5
2490echo "${ECHO_T}$ETAGS" >&6
2491else
2492 echo "$as_me:2492: result: no" >&5
2493echo "${ECHO_T}no" >&6
2494fi
2495
2496 test -n "$ETAGS" && break
2497done
2498
2499# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2500set dummy ${CTAGS:-ctags}; ac_word=$2
2501echo "$as_me:2501: checking for $ac_word" >&5
2502echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2504 echo $ECHO_N "(cached) $ECHO_C" >&6
2505else
2506 if test -n "$MAKE_LOWER_TAGS"; then
2507 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2508else
2509 ac_save_IFS=$IFS; IFS=$ac_path_separator
2510ac_dummy="$PATH"
2511for ac_dir in $ac_dummy; do
2512 IFS=$ac_save_IFS
2513 test -z "$ac_dir" && ac_dir=.
2514 $as_executable_p "$ac_dir/$ac_word" || continue
2515ac_cv_prog_MAKE_LOWER_TAGS="yes"
2516echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2517break
2518done
2519
2520 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2521fi
2522fi
2523MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2524if test -n "$MAKE_LOWER_TAGS"; then
2525 echo "$as_me:2525: result: $MAKE_LOWER_TAGS" >&5
2526echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2527else
2528 echo "$as_me:2528: result: no" >&5
2529echo "${ECHO_T}no" >&6
2530fi
2531
2532if test "$cf_cv_mixedcase" = yes ; then
2533 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2534set dummy ${ETAGS:-etags}; ac_word=$2
2535echo "$as_me:2535: checking for $ac_word" >&5
2536echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2537if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2538 echo $ECHO_N "(cached) $ECHO_C" >&6
2539else
2540 if test -n "$MAKE_UPPER_TAGS"; then
2541 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2542else
2543 ac_save_IFS=$IFS; IFS=$ac_path_separator
2544ac_dummy="$PATH"
2545for ac_dir in $ac_dummy; do
2546 IFS=$ac_save_IFS
2547 test -z "$ac_dir" && ac_dir=.
2548 $as_executable_p "$ac_dir/$ac_word" || continue
2549ac_cv_prog_MAKE_UPPER_TAGS="yes"
2550echo "$as_me:2550: found $ac_dir/$ac_word" >&5
2551break
2552done
2553
2554 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2555fi
2556fi
2557MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2558if test -n "$MAKE_UPPER_TAGS"; then
2559 echo "$as_me:2559: result: $MAKE_UPPER_TAGS" >&5
2560echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2561else
2562 echo "$as_me:2562: result: no" >&5
2563echo "${ECHO_T}no" >&6
2564fi
2565
2566else
2567 MAKE_UPPER_TAGS=no
2568fi
2569
2570if test "$MAKE_UPPER_TAGS" = yes ; then
2571 MAKE_UPPER_TAGS=
2572else
2573 MAKE_UPPER_TAGS="#"
2574fi
2575
2576if test "$MAKE_LOWER_TAGS" = yes ; then
2577 MAKE_LOWER_TAGS=
2578else
2579 MAKE_LOWER_TAGS="#"
2580fi
2581
2582echo "$as_me:2582: checking if -lm needed for math functions" >&5
2583echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2584if test "${cf_cv_need_libm+set}" = set; then
2585 echo $ECHO_N "(cached) $ECHO_C" >&6
2586else
2587
2588 cat >conftest.$ac_ext <<_ACEOF
2589#line 2589 "configure"
2590#include "confdefs.h"
2591
2592 #include <stdio.h>
2593 #include <math.h>
2594
2595int
2596main ()
2597{
2598double x = rand(); printf("result = %g\n", pow(sin(x),x))
2599 ;
2600 return 0;
2601}
2602_ACEOF
2603rm -f conftest.$ac_objext conftest$ac_exeext
2604if { (eval echo "$as_me:2604: \"$ac_link\"") >&5
2605 (eval $ac_link) 2>&5
2606 ac_status=$?
2607 echo "$as_me:2607: \$? = $ac_status" >&5
2608 (exit $ac_status); } &&
2609 { ac_try='test -s conftest$ac_exeext'
2610 { (eval echo "$as_me:2610: \"$ac_try\"") >&5
2611 (eval $ac_try) 2>&5
2612 ac_status=$?
2613 echo "$as_me:2613: \$? = $ac_status" >&5
2614 (exit $ac_status); }; }; then
2615 cf_cv_need_libm=no
2616else
2617 echo "$as_me: failed program was:" >&5
2618cat conftest.$ac_ext >&5
2619cf_cv_need_libm=yes
2620fi
2621rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2622fi
2623echo "$as_me:2623: result: $cf_cv_need_libm" >&5
2624echo "${ECHO_T}$cf_cv_need_libm" >&6
2625if test "$cf_cv_need_libm" = yes
2626then
2627MATH_LIB=-lm
2628fi
2629
2630top_builddir=`pwd`
2631
2632CC_G_OPT="-g"
2633CC_SHARED_OPTS=unknown
2634CPPFLAGS="$CPPFLAGS"
2635DFT_DEP_SUFFIX=""
2636DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2637DFT_UPR_MODEL="NORMAL"
2638LD="ld"
2639LDFLAGS_SHARED=""
2640LDFLAGS_STATIC=""
2641LD_MODEL=""
2642LD_SHARED_OPTS=""
2643LIBTOOL=""
2644LIBTOOL_OPTS=""
2645LIB_CLEAN=""
2646LIB_COMPILE=""
2647LIB_LINK='${CC}'
2648LINK_TESTS=""
2649LOCAL_LDFLAGS=""
2650PACKAGE="ncurses-examples"
2651PTHREAD="-lm"
2652TEST_ARGS=""
2653TEST_DEPS=""
2654TEST_LIBS=""
2655TINFO_LDFLAGS=''
2656TINFO_LIBS='$(LIBS_CURSES)'
2657cf_cv_abi_version=""
2658cf_cv_rel_version=""
2659includesubdir=""
2660
2661cf_cv_screen=curses
2662cf_cv_libtype=
2663
2664if test "$GCC" = yes
2665then
2666cat > conftest.i <<EOF
2667#ifndef GCC_PRINTF
2668#define GCC_PRINTF 0
2669#endif
2670#ifndef GCC_SCANF
2671#define GCC_SCANF 0
2672#endif
2673#ifndef GCC_NORETURN
2674#define GCC_NORETURN /* nothing */
2675#endif
2676#ifndef GCC_UNUSED
2677#define GCC_UNUSED /* nothing */
2678#endif
2679EOF
2680if test "$GCC" = yes
2681then
2682 { echo "$as_me:2682: checking for $CC __attribute__ directives..." >&5
2683echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2684cat > conftest.$ac_ext <<EOF
2685#line 2685 "${as_me:-configure}"
2686#include "confdefs.h"
2687#include "conftest.h"
2688#include "conftest.i"
2689#if GCC_PRINTF
2690#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2691#else
2692#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2693#endif
2694#if GCC_SCANF
2695#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2696#else
2697#define GCC_SCANFLIKE(fmt,var) /*nothing*/
2698#endif
2699extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2700extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2701extern void foo(void) GCC_NORETURN;
2702int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2703EOF
2704 cf_printf_attribute=no
2705 cf_scanf_attribute=no
2706 for cf_attribute in scanf printf unused noreturn
2707 do
2708
2709cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2710
2711 cf_directive="__attribute__(($cf_attribute))"
2712 echo "checking for $CC $cf_directive" 1>&5
2713
2714 case $cf_attribute in
2715 (printf)
2716 cf_printf_attribute=yes
2717 cat >conftest.h <<EOF
2718#define GCC_$cf_ATTRIBUTE 1
2719EOF
2720 ;;
2721 (scanf)
2722 cf_scanf_attribute=yes
2723 cat >conftest.h <<EOF
2724#define GCC_$cf_ATTRIBUTE 1
2725EOF
2726 ;;
2727 (*)
2728 cat >conftest.h <<EOF
2729#define GCC_$cf_ATTRIBUTE $cf_directive
2730EOF
2731 ;;
2732 esac
2733
2734 if { (eval echo "$as_me:2734: \"$ac_compile\"") >&5
2735 (eval $ac_compile) 2>&5
2736 ac_status=$?
2737 echo "$as_me:2737: \$? = $ac_status" >&5
2738 (exit $ac_status); }; then
2739 test -n "$verbose" && echo "$as_me:2739: result: ... $cf_attribute" >&5
2740echo "${ECHO_T}... $cf_attribute" >&6
2741 cat conftest.h >>confdefs.h
2742 case $cf_attribute in
2743 (noreturn)
2744
2745cat >>confdefs.h <<EOF
2746#define GCC_NORETURN $cf_directive
2747EOF
2748
2749 ;;
2750 (printf)
2751 cf_value='/* nothing */'
2752 if test "$cf_printf_attribute" != no ; then
2753 cf_value='__attribute__((format(printf,fmt,var)))'
2754
2755cat >>confdefs.h <<\EOF
2756#define GCC_PRINTF 1
2757EOF
2758
2759 fi
2760
2761cat >>confdefs.h <<EOF
2762#define GCC_PRINTFLIKE(fmt,var) $cf_value
2763EOF
2764
2765 ;;
2766 (scanf)
2767 cf_value='/* nothing */'
2768 if test "$cf_scanf_attribute" != no ; then
2769 cf_value='__attribute__((format(scanf,fmt,var)))'
2770
2771cat >>confdefs.h <<\EOF
2772#define GCC_SCANF 1
2773EOF
2774
2775 fi
2776
2777cat >>confdefs.h <<EOF
2778#define GCC_SCANFLIKE(fmt,var) $cf_value
2779EOF
2780
2781 ;;
2782 (unused)
2783
2784cat >>confdefs.h <<EOF
2785#define GCC_UNUSED $cf_directive
2786EOF
2787
2788 ;;
2789 esac
2790 fi
2791 done
2792else
2793 fgrep define conftest.i >>confdefs.h
2794fi
2795rm -rf conftest*
2796fi
2797
2798cf_XOPEN_SOURCE=500
2799cf_POSIX_C_SOURCE=199506L
2800cf_xopen_source=
2801
2802case $host_os in
2803(aix[4-7]*)
2804 cf_xopen_source="-D_ALL_SOURCE"
2805 ;;
2806(cygwin|msys)
2807 cf_XOPEN_SOURCE=600
2808 ;;
2809(darwin[0-8].*)
2810 cf_xopen_source="-D_APPLE_C_SOURCE"
2811 ;;
2812(darwin*)
2813 cf_xopen_source="-D_DARWIN_C_SOURCE"
2814 cf_XOPEN_SOURCE=
2815 ;;
2816(freebsd*|dragonfly*)
2817 # 5.x headers associate
2818 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2819 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2820 cf_POSIX_C_SOURCE=200112L
2821 cf_XOPEN_SOURCE=600
2822 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2823 ;;
2824(hpux11*)
2825 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2826 ;;
2827(hpux*)
2828 cf_xopen_source="-D_HPUX_SOURCE"
2829 ;;
2830(irix[56].*)
2831 cf_xopen_source="-D_SGI_SOURCE"
2832 cf_XOPEN_SOURCE=
2833 ;;
2834(linux*|gnu*|mint*|k*bsd*-gnu)
2835
2836echo "$as_me:2836: checking if we must define _GNU_SOURCE" >&5
2837echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2838if test "${cf_cv_gnu_source+set}" = set; then
2839 echo $ECHO_N "(cached) $ECHO_C" >&6
2840else
2841
2842cat >conftest.$ac_ext <<_ACEOF
2843#line 2843 "configure"
2844#include "confdefs.h"
2845#include <sys/types.h>
2846int
2847main ()
2848{
2849
2850#ifndef _XOPEN_SOURCE
2851make an error
2852#endif
2853 ;
2854 return 0;
2855}
2856_ACEOF
2857rm -f conftest.$ac_objext
2858if { (eval echo "$as_me:2858: \"$ac_compile\"") >&5
2859 (eval $ac_compile) 2>&5
2860 ac_status=$?
2861 echo "$as_me:2861: \$? = $ac_status" >&5
2862 (exit $ac_status); } &&
2863 { ac_try='test -s conftest.$ac_objext'
2864 { (eval echo "$as_me:2864: \"$ac_try\"") >&5
2865 (eval $ac_try) 2>&5
2866 ac_status=$?
2867 echo "$as_me:2867: \$? = $ac_status" >&5
2868 (exit $ac_status); }; }; then
2869 cf_cv_gnu_source=no
2870else
2871 echo "$as_me: failed program was:" >&5
2872cat conftest.$ac_ext >&5
2873cf_save="$CPPFLAGS"
2874 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2875 cat >conftest.$ac_ext <<_ACEOF
2876#line 2876 "configure"
2877#include "confdefs.h"
2878#include <sys/types.h>
2879int
2880main ()
2881{
2882
2883#ifdef _XOPEN_SOURCE
2884make an error
2885#endif
2886 ;
2887 return 0;
2888}
2889_ACEOF
2890rm -f conftest.$ac_objext
2891if { (eval echo "$as_me:2891: \"$ac_compile\"") >&5
2892 (eval $ac_compile) 2>&5
2893 ac_status=$?
2894 echo "$as_me:2894: \$? = $ac_status" >&5
2895 (exit $ac_status); } &&
2896 { ac_try='test -s conftest.$ac_objext'
2897 { (eval echo "$as_me:2897: \"$ac_try\"") >&5
2898 (eval $ac_try) 2>&5
2899 ac_status=$?
2900 echo "$as_me:2900: \$? = $ac_status" >&5
2901 (exit $ac_status); }; }; then
2902 cf_cv_gnu_source=no
2903else
2904 echo "$as_me: failed program was:" >&5
2905cat conftest.$ac_ext >&5
2906cf_cv_gnu_source=yes
2907fi
2908rm -f conftest.$ac_objext conftest.$ac_ext
2909 CPPFLAGS="$cf_save"
2910
2911fi
2912rm -f conftest.$ac_objext conftest.$ac_ext
2913
2914fi
2915echo "$as_me:2915: result: $cf_cv_gnu_source" >&5
2916echo "${ECHO_T}$cf_cv_gnu_source" >&6
2917test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2918
2919 ;;
2920(minix*)
2921 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2922 ;;
2923(mirbsd*)
2924 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2925 cf_XOPEN_SOURCE=
2926
2927cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2928
2929cf_save_CFLAGS="$CFLAGS"
2930cf_save_CPPFLAGS="$CPPFLAGS"
2931
2932cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2933 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2934 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2935
2936cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2937 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2938 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2939
2940echo "$as_me:2940: checking if we should define _POSIX_C_SOURCE" >&5
2941echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2942if test "${cf_cv_posix_c_source+set}" = set; then
2943 echo $ECHO_N "(cached) $ECHO_C" >&6
2944else
2945
2946echo "${as_me:-configure}:2946: testing if the symbol is already defined go no further ..." 1>&5
2947
2948 cat >conftest.$ac_ext <<_ACEOF
2949#line 2949 "configure"
2950#include "confdefs.h"
2951#include <sys/types.h>
2952int
2953main ()
2954{
2955
2956#ifndef _POSIX_C_SOURCE
2957make an error
2958#endif
2959 ;
2960 return 0;
2961}
2962_ACEOF
2963rm -f conftest.$ac_objext
2964if { (eval echo "$as_me:2964: \"$ac_compile\"") >&5
2965 (eval $ac_compile) 2>&5
2966 ac_status=$?
2967 echo "$as_me:2967: \$? = $ac_status" >&5
2968 (exit $ac_status); } &&
2969 { ac_try='test -s conftest.$ac_objext'
2970 { (eval echo "$as_me:2970: \"$ac_try\"") >&5
2971 (eval $ac_try) 2>&5
2972 ac_status=$?
2973 echo "$as_me:2973: \$? = $ac_status" >&5
2974 (exit $ac_status); }; }; then
2975 cf_cv_posix_c_source=no
2976else
2977 echo "$as_me: failed program was:" >&5
2978cat conftest.$ac_ext >&5
2979cf_want_posix_source=no
2980 case .$cf_POSIX_C_SOURCE in
2981 (.[12]??*)
2982 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2983 ;;
2984 (.2)
2985 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2986 cf_want_posix_source=yes
2987 ;;
2988 (.*)
2989 cf_want_posix_source=yes
2990 ;;
2991 esac
2992 if test "$cf_want_posix_source" = yes ; then
2993 cat >conftest.$ac_ext <<_ACEOF
2994#line 2994 "configure"
2995#include "confdefs.h"
2996#include <sys/types.h>
2997int
2998main ()
2999{
3000
3001#ifdef _POSIX_SOURCE
3002make an error
3003#endif
3004 ;
3005 return 0;
3006}
3007_ACEOF
3008rm -f conftest.$ac_objext
3009if { (eval echo "$as_me:3009: \"$ac_compile\"") >&5
3010 (eval $ac_compile) 2>&5
3011 ac_status=$?
3012 echo "$as_me:3012: \$? = $ac_status" >&5
3013 (exit $ac_status); } &&
3014 { ac_try='test -s conftest.$ac_objext'
3015 { (eval echo "$as_me:3015: \"$ac_try\"") >&5
3016 (eval $ac_try) 2>&5
3017 ac_status=$?
3018 echo "$as_me:3018: \$? = $ac_status" >&5
3019 (exit $ac_status); }; }; then
3020 :
3021else
3022 echo "$as_me: failed program was:" >&5
3023cat conftest.$ac_ext >&5
3024cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3025fi
3026rm -f conftest.$ac_objext conftest.$ac_ext
3027 fi
3028
3029echo "${as_me:-configure}:3029: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3030
3031 CFLAGS="$cf_trim_CFLAGS"
3032 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3033
3034echo "${as_me:-configure}:3034: testing if the second compile does not leave our definition intact error ..." 1>&5
3035
3036 cat >conftest.$ac_ext <<_ACEOF
3037#line 3037 "configure"
3038#include "confdefs.h"
3039#include <sys/types.h>
3040int
3041main ()
3042{
3043
3044#ifndef _POSIX_C_SOURCE
3045make an error
3046#endif
3047 ;
3048 return 0;
3049}
3050_ACEOF
3051rm -f conftest.$ac_objext
3052if { (eval echo "$as_me:3052: \"$ac_compile\"") >&5
3053 (eval $ac_compile) 2>&5
3054 ac_status=$?
3055 echo "$as_me:3055: \$? = $ac_status" >&5
3056 (exit $ac_status); } &&
3057 { ac_try='test -s conftest.$ac_objext'
3058 { (eval echo "$as_me:3058: \"$ac_try\"") >&5
3059 (eval $ac_try) 2>&5
3060 ac_status=$?
3061 echo "$as_me:3061: \$? = $ac_status" >&5
3062 (exit $ac_status); }; }; then
3063 :
3064else
3065 echo "$as_me: failed program was:" >&5
3066cat conftest.$ac_ext >&5
3067cf_cv_posix_c_source=no
3068fi
3069rm -f conftest.$ac_objext conftest.$ac_ext
3070 CFLAGS="$cf_save_CFLAGS"
3071 CPPFLAGS="$cf_save_CPPFLAGS"
3072
3073fi
3074rm -f conftest.$ac_objext conftest.$ac_ext
3075
3076fi
3077echo "$as_me:3077: result: $cf_cv_posix_c_source" >&5
3078echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3079
3080if test "$cf_cv_posix_c_source" != no ; then
3081 CFLAGS="$cf_trim_CFLAGS"
3082 CPPFLAGS="$cf_trim_CPPFLAGS"
3083
3084cf_fix_cppflags=no
3085cf_new_cflags=
3086cf_new_cppflags=
3087cf_new_extra_cppflags=
3088
3089for cf_add_cflags in $cf_cv_posix_c_source
3090do
3091case $cf_fix_cppflags in
3092(no)
3093 case $cf_add_cflags in
3094 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3095 case $cf_add_cflags in
3096 (-D*)
3097 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3098
3099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3100 && test -z "${cf_tst_cflags}" \
3101 && cf_fix_cppflags=yes
3102
3103 if test $cf_fix_cppflags = yes ; then
3104 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3105 continue
3106 elif test "${cf_tst_cflags}" = "\"'" ; then
3107 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3108 continue
3109 fi
3110 ;;
3111 esac
3112 case "$CPPFLAGS" in
3113 (*$cf_add_cflags)
3114 ;;
3115 (*)
3116 case $cf_add_cflags in
3117 (-D*)
3118 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3119
3120CPPFLAGS=`echo "$CPPFLAGS" | \
3121 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3122 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3123
3124 ;;
3125 esac
3126 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3127 ;;
3128 esac
3129 ;;
3130 (*)
3131 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3132 ;;
3133 esac
3134 ;;
3135(yes)
3136 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3137
3138 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3139
3140 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3141 && test -z "${cf_tst_cflags}" \
3142 && cf_fix_cppflags=no
3143 ;;
3144esac
3145done
3146
3147if test -n "$cf_new_cflags" ; then
3148
3149 CFLAGS="$CFLAGS $cf_new_cflags"
3150fi
3151
3152if test -n "$cf_new_cppflags" ; then
3153
3154 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3155fi
3156
3157if test -n "$cf_new_extra_cppflags" ; then
3158
3159 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3160fi
3161
3162fi
3163
3164 ;;
3165(netbsd*)
3166 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3167 ;;
3168(openbsd[4-9]*)
3169 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3170 cf_xopen_source="-D_BSD_SOURCE"
3171 cf_XOPEN_SOURCE=600
3172 ;;
3173(openbsd*)
3174 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3175 ;;
3176(osf[45]*)
3177 cf_xopen_source="-D_OSF_SOURCE"
3178 ;;
3179(nto-qnx*)
3180 cf_xopen_source="-D_QNX_SOURCE"
3181 ;;
3182(sco*)
3183 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3184 ;;
3185(solaris2.*)
3186 cf_xopen_source="-D__EXTENSIONS__"
3187 cf_cv_xopen_source=broken
3188 ;;
3189(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3190 cf_XOPEN_SOURCE=
3191 cf_POSIX_C_SOURCE=
3192 ;;
3193(*)
3194
3195echo "$as_me:3195: checking if we should define _XOPEN_SOURCE" >&5
3196echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3197if test "${cf_cv_xopen_source+set}" = set; then
3198 echo $ECHO_N "(cached) $ECHO_C" >&6
3199else
3200
3201 cat >conftest.$ac_ext <<_ACEOF
3202#line 3202 "configure"
3203#include "confdefs.h"
3204
3205#include <stdlib.h>
3206#include <string.h>
3207#include <sys/types.h>
3208
3209int
3210main ()
3211{
3212
3213#ifndef _XOPEN_SOURCE
3214make an error
3215#endif
3216 ;
3217 return 0;
3218}
3219_ACEOF
3220rm -f conftest.$ac_objext
3221if { (eval echo "$as_me:3221: \"$ac_compile\"") >&5
3222 (eval $ac_compile) 2>&5
3223 ac_status=$?
3224 echo "$as_me:3224: \$? = $ac_status" >&5
3225 (exit $ac_status); } &&
3226 { ac_try='test -s conftest.$ac_objext'
3227 { (eval echo "$as_me:3227: \"$ac_try\"") >&5
3228 (eval $ac_try) 2>&5
3229 ac_status=$?
3230 echo "$as_me:3230: \$? = $ac_status" >&5
3231 (exit $ac_status); }; }; then
3232 cf_cv_xopen_source=no
3233else
3234 echo "$as_me: failed program was:" >&5
3235cat conftest.$ac_ext >&5
3236cf_save="$CPPFLAGS"
3237 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3238 cat >conftest.$ac_ext <<_ACEOF
3239#line 3239 "configure"
3240#include "confdefs.h"
3241
3242#include <stdlib.h>
3243#include <string.h>
3244#include <sys/types.h>
3245
3246int
3247main ()
3248{
3249
3250#ifdef _XOPEN_SOURCE
3251make an error
3252#endif
3253 ;
3254 return 0;
3255}
3256_ACEOF
3257rm -f conftest.$ac_objext
3258if { (eval echo "$as_me:3258: \"$ac_compile\"") >&5
3259 (eval $ac_compile) 2>&5
3260 ac_status=$?
3261 echo "$as_me:3261: \$? = $ac_status" >&5
3262 (exit $ac_status); } &&
3263 { ac_try='test -s conftest.$ac_objext'
3264 { (eval echo "$as_me:3264: \"$ac_try\"") >&5
3265 (eval $ac_try) 2>&5
3266 ac_status=$?
3267 echo "$as_me:3267: \$? = $ac_status" >&5
3268 (exit $ac_status); }; }; then
3269 cf_cv_xopen_source=no
3270else
3271 echo "$as_me: failed program was:" >&5
3272cat conftest.$ac_ext >&5
3273cf_cv_xopen_source=$cf_XOPEN_SOURCE
3274fi
3275rm -f conftest.$ac_objext conftest.$ac_ext
3276 CPPFLAGS="$cf_save"
3277
3278fi
3279rm -f conftest.$ac_objext conftest.$ac_ext
3280
3281fi
3282echo "$as_me:3282: result: $cf_cv_xopen_source" >&5
3283echo "${ECHO_T}$cf_cv_xopen_source" >&6
3284
3285if test "$cf_cv_xopen_source" != no ; then
3286
3287CFLAGS=`echo "$CFLAGS" | \
3288 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3289 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3290
3291CPPFLAGS=`echo "$CPPFLAGS" | \
3292 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3293 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3294
3295 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3296
3297cf_fix_cppflags=no
3298cf_new_cflags=
3299cf_new_cppflags=
3300cf_new_extra_cppflags=
3301
3302for cf_add_cflags in $cf_temp_xopen_source
3303do
3304case $cf_fix_cppflags in
3305(no)
3306 case $cf_add_cflags in
3307 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3308 case $cf_add_cflags in
3309 (-D*)
3310 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3311
3312 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3313 && test -z "${cf_tst_cflags}" \
3314 && cf_fix_cppflags=yes
3315
3316 if test $cf_fix_cppflags = yes ; then
3317 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3318 continue
3319 elif test "${cf_tst_cflags}" = "\"'" ; then
3320 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3321 continue
3322 fi
3323 ;;
3324 esac
3325 case "$CPPFLAGS" in
3326 (*$cf_add_cflags)
3327 ;;
3328 (*)
3329 case $cf_add_cflags in
3330 (-D*)
3331 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3332
3333CPPFLAGS=`echo "$CPPFLAGS" | \
3334 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3335 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3336
3337 ;;
3338 esac
3339 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3340 ;;
3341 esac
3342 ;;
3343 (*)
3344 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3345 ;;
3346 esac
3347 ;;
3348(yes)
3349 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3350
3351 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3352
3353 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3354 && test -z "${cf_tst_cflags}" \
3355 && cf_fix_cppflags=no
3356 ;;
3357esac
3358done
3359
3360if test -n "$cf_new_cflags" ; then
3361
3362 CFLAGS="$CFLAGS $cf_new_cflags"
3363fi
3364
3365if test -n "$cf_new_cppflags" ; then
3366
3367 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3368fi
3369
3370if test -n "$cf_new_extra_cppflags" ; then
3371
3372 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3373fi
3374
3375fi
3376
3377cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3378
3379cf_save_CFLAGS="$CFLAGS"
3380cf_save_CPPFLAGS="$CPPFLAGS"
3381
3382cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3383 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3384 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3385
3386cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3387 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3388 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3389
3390echo "$as_me:3390: checking if we should define _POSIX_C_SOURCE" >&5
3391echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3392if test "${cf_cv_posix_c_source+set}" = set; then
3393 echo $ECHO_N "(cached) $ECHO_C" >&6
3394else
3395
3396echo "${as_me:-configure}:3396: testing if the symbol is already defined go no further ..." 1>&5
3397
3398 cat >conftest.$ac_ext <<_ACEOF
3399#line 3399 "configure"
3400#include "confdefs.h"
3401#include <sys/types.h>
3402int
3403main ()
3404{
3405
3406#ifndef _POSIX_C_SOURCE
3407make an error
3408#endif
3409 ;
3410 return 0;
3411}
3412_ACEOF
3413rm -f conftest.$ac_objext
3414if { (eval echo "$as_me:3414: \"$ac_compile\"") >&5
3415 (eval $ac_compile) 2>&5
3416 ac_status=$?
3417 echo "$as_me:3417: \$? = $ac_status" >&5
3418 (exit $ac_status); } &&
3419 { ac_try='test -s conftest.$ac_objext'
3420 { (eval echo "$as_me:3420: \"$ac_try\"") >&5
3421 (eval $ac_try) 2>&5
3422 ac_status=$?
3423 echo "$as_me:3423: \$? = $ac_status" >&5
3424 (exit $ac_status); }; }; then
3425 cf_cv_posix_c_source=no
3426else
3427 echo "$as_me: failed program was:" >&5
3428cat conftest.$ac_ext >&5
3429cf_want_posix_source=no
3430 case .$cf_POSIX_C_SOURCE in
3431 (.[12]??*)
3432 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3433 ;;
3434 (.2)
3435 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3436 cf_want_posix_source=yes
3437 ;;
3438 (.*)
3439 cf_want_posix_source=yes
3440 ;;
3441 esac
3442 if test "$cf_want_posix_source" = yes ; then
3443 cat >conftest.$ac_ext <<_ACEOF
3444#line 3444 "configure"
3445#include "confdefs.h"
3446#include <sys/types.h>
3447int
3448main ()
3449{
3450
3451#ifdef _POSIX_SOURCE
3452make an error
3453#endif
3454 ;
3455 return 0;
3456}
3457_ACEOF
3458rm -f conftest.$ac_objext
3459if { (eval echo "$as_me:3459: \"$ac_compile\"") >&5
3460 (eval $ac_compile) 2>&5
3461 ac_status=$?
3462 echo "$as_me:3462: \$? = $ac_status" >&5
3463 (exit $ac_status); } &&
3464 { ac_try='test -s conftest.$ac_objext'
3465 { (eval echo "$as_me:3465: \"$ac_try\"") >&5
3466 (eval $ac_try) 2>&5
3467 ac_status=$?
3468 echo "$as_me:3468: \$? = $ac_status" >&5
3469 (exit $ac_status); }; }; then
3470 :
3471else
3472 echo "$as_me: failed program was:" >&5
3473cat conftest.$ac_ext >&5
3474cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3475fi
3476rm -f conftest.$ac_objext conftest.$ac_ext
3477 fi
3478
3479echo "${as_me:-configure}:3479: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3480
3481 CFLAGS="$cf_trim_CFLAGS"
3482 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3483
3484echo "${as_me:-configure}:3484: testing if the second compile does not leave our definition intact error ..." 1>&5
3485
3486 cat >conftest.$ac_ext <<_ACEOF
3487#line 3487 "configure"
3488#include "confdefs.h"
3489#include <sys/types.h>
3490int
3491main ()
3492{
3493
3494#ifndef _POSIX_C_SOURCE
3495make an error
3496#endif
3497 ;
3498 return 0;
3499}
3500_ACEOF
3501rm -f conftest.$ac_objext
3502if { (eval echo "$as_me:3502: \"$ac_compile\"") >&5
3503 (eval $ac_compile) 2>&5
3504 ac_status=$?
3505 echo "$as_me:3505: \$? = $ac_status" >&5
3506 (exit $ac_status); } &&
3507 { ac_try='test -s conftest.$ac_objext'
3508 { (eval echo "$as_me:3508: \"$ac_try\"") >&5
3509 (eval $ac_try) 2>&5
3510 ac_status=$?
3511 echo "$as_me:3511: \$? = $ac_status" >&5
3512 (exit $ac_status); }; }; then
3513 :
3514else
3515 echo "$as_me: failed program was:" >&5
3516cat conftest.$ac_ext >&5
3517cf_cv_posix_c_source=no
3518fi
3519rm -f conftest.$ac_objext conftest.$ac_ext
3520 CFLAGS="$cf_save_CFLAGS"
3521 CPPFLAGS="$cf_save_CPPFLAGS"
3522
3523fi
3524rm -f conftest.$ac_objext conftest.$ac_ext
3525
3526fi
3527echo "$as_me:3527: result: $cf_cv_posix_c_source" >&5
3528echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3529
3530if test "$cf_cv_posix_c_source" != no ; then
3531 CFLAGS="$cf_trim_CFLAGS"
3532 CPPFLAGS="$cf_trim_CPPFLAGS"
3533
3534cf_fix_cppflags=no
3535cf_new_cflags=
3536cf_new_cppflags=
3537cf_new_extra_cppflags=
3538
3539for cf_add_cflags in $cf_cv_posix_c_source
3540do
3541case $cf_fix_cppflags in
3542(no)
3543 case $cf_add_cflags in
3544 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3545 case $cf_add_cflags in
3546 (-D*)
3547 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3548
3549 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3550 && test -z "${cf_tst_cflags}" \
3551 && cf_fix_cppflags=yes
3552
3553 if test $cf_fix_cppflags = yes ; then
3554 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3555 continue
3556 elif test "${cf_tst_cflags}" = "\"'" ; then
3557 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3558 continue
3559 fi
3560 ;;
3561 esac
3562 case "$CPPFLAGS" in
3563 (*$cf_add_cflags)
3564 ;;
3565 (*)
3566 case $cf_add_cflags in
3567 (-D*)
3568 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3569
3570CPPFLAGS=`echo "$CPPFLAGS" | \
3571 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3572 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3573
3574 ;;
3575 esac
3576 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3577 ;;
3578 esac
3579 ;;
3580 (*)
3581 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3582 ;;
3583 esac
3584 ;;
3585(yes)
3586 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3587
3588 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3589
3590 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3591 && test -z "${cf_tst_cflags}" \
3592 && cf_fix_cppflags=no
3593 ;;
3594esac
3595done
3596
3597if test -n "$cf_new_cflags" ; then
3598
3599 CFLAGS="$CFLAGS $cf_new_cflags"
3600fi
3601
3602if test -n "$cf_new_cppflags" ; then
3603
3604 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3605fi
3606
3607if test -n "$cf_new_extra_cppflags" ; then
3608
3609 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3610fi
3611
3612fi
3613
3614 ;;
3615esac
3616
3617if test -n "$cf_xopen_source" ; then
3618
3619cf_fix_cppflags=no
3620cf_new_cflags=
3621cf_new_cppflags=
3622cf_new_extra_cppflags=
3623
3624for cf_add_cflags in $cf_xopen_source
3625do
3626case $cf_fix_cppflags in
3627(no)
3628 case $cf_add_cflags in
3629 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3630 case $cf_add_cflags in
3631 (-D*)
3632 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3633
3634 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3635 && test -z "${cf_tst_cflags}" \
3636 && cf_fix_cppflags=yes
3637
3638 if test $cf_fix_cppflags = yes ; then
3639 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3640 continue
3641 elif test "${cf_tst_cflags}" = "\"'" ; then
3642 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3643 continue
3644 fi
3645 ;;
3646 esac
3647 case "$CPPFLAGS" in
3648 (*$cf_add_cflags)
3649 ;;
3650 (*)
3651 case $cf_add_cflags in
3652 (-D*)
3653 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3654
3655CPPFLAGS=`echo "$CPPFLAGS" | \
3656 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3657 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3658
3659 ;;
3660 esac
3661 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3662 ;;
3663 esac
3664 ;;
3665 (*)
3666 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3667 ;;
3668 esac
3669 ;;
3670(yes)
3671 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3672
3673 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3674
3675 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3676 && test -z "${cf_tst_cflags}" \
3677 && cf_fix_cppflags=no
3678 ;;
3679esac
3680done
3681
3682if test -n "$cf_new_cflags" ; then
3683 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
3684
3685echo "${as_me:-configure}:3685: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3686
3687 CFLAGS="$CFLAGS $cf_new_cflags"
3688fi
3689
3690if test -n "$cf_new_cppflags" ; then
3691 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3692
3693echo "${as_me:-configure}:3693: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3694
3695 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3696fi
3697
3698if test -n "$cf_new_extra_cppflags" ; then
3699 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3700
3701echo "${as_me:-configure}:3701: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3702
3703 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3704fi
3705
3706fi
3707
3708if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3709 echo "$as_me:3709: checking if _XOPEN_SOURCE really is set" >&5
3710echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3711 cat >conftest.$ac_ext <<_ACEOF
3712#line 3712 "configure"
3713#include "confdefs.h"
3714#include <stdlib.h>
3715int
3716main ()
3717{
3718
3719#ifndef _XOPEN_SOURCE
3720make an error
3721#endif
3722 ;
3723 return 0;
3724}
3725_ACEOF
3726rm -f conftest.$ac_objext
3727if { (eval echo "$as_me:3727: \"$ac_compile\"") >&5
3728 (eval $ac_compile) 2>&5
3729 ac_status=$?
3730 echo "$as_me:3730: \$? = $ac_status" >&5
3731 (exit $ac_status); } &&
3732 { ac_try='test -s conftest.$ac_objext'
3733 { (eval echo "$as_me:3733: \"$ac_try\"") >&5
3734 (eval $ac_try) 2>&5
3735 ac_status=$?
3736 echo "$as_me:3736: \$? = $ac_status" >&5
3737 (exit $ac_status); }; }; then
3738 cf_XOPEN_SOURCE_set=yes
3739else
3740 echo "$as_me: failed program was:" >&5
3741cat conftest.$ac_ext >&5
3742cf_XOPEN_SOURCE_set=no
3743fi
3744rm -f conftest.$ac_objext conftest.$ac_ext
3745 echo "$as_me:3745: result: $cf_XOPEN_SOURCE_set" >&5
3746echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3747 if test $cf_XOPEN_SOURCE_set = yes
3748 then
3749 cat >conftest.$ac_ext <<_ACEOF
3750#line 3750 "configure"
3751#include "confdefs.h"
3752#include <stdlib.h>
3753int
3754main ()
3755{
3756
3757#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3758make an error
3759#endif
3760 ;
3761 return 0;
3762}
3763_ACEOF
3764rm -f conftest.$ac_objext
3765if { (eval echo "$as_me:3765: \"$ac_compile\"") >&5
3766 (eval $ac_compile) 2>&5
3767 ac_status=$?
3768 echo "$as_me:3768: \$? = $ac_status" >&5
3769 (exit $ac_status); } &&
3770 { ac_try='test -s conftest.$ac_objext'
3771 { (eval echo "$as_me:3771: \"$ac_try\"") >&5
3772 (eval $ac_try) 2>&5
3773 ac_status=$?
3774 echo "$as_me:3774: \$? = $ac_status" >&5
3775 (exit $ac_status); }; }; then
3776 cf_XOPEN_SOURCE_set_ok=yes
3777else
3778 echo "$as_me: failed program was:" >&5
3779cat conftest.$ac_ext >&5
3780cf_XOPEN_SOURCE_set_ok=no
3781fi
3782rm -f conftest.$ac_objext conftest.$ac_ext
3783 if test $cf_XOPEN_SOURCE_set_ok = no
3784 then
3785 { echo "$as_me:3785: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3786echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3787 fi
3788 else
3789
3790echo "$as_me:3790: checking if we should define _XOPEN_SOURCE" >&5
3791echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3792if test "${cf_cv_xopen_source+set}" = set; then
3793 echo $ECHO_N "(cached) $ECHO_C" >&6
3794else
3795
3796 cat >conftest.$ac_ext <<_ACEOF
3797#line 3797 "configure"
3798#include "confdefs.h"
3799
3800#include <stdlib.h>
3801#include <string.h>
3802#include <sys/types.h>
3803
3804int
3805main ()
3806{
3807
3808#ifndef _XOPEN_SOURCE
3809make an error
3810#endif
3811 ;
3812 return 0;
3813}
3814_ACEOF
3815rm -f conftest.$ac_objext
3816if { (eval echo "$as_me:3816: \"$ac_compile\"") >&5
3817 (eval $ac_compile) 2>&5
3818 ac_status=$?
3819 echo "$as_me:3819: \$? = $ac_status" >&5
3820 (exit $ac_status); } &&
3821 { ac_try='test -s conftest.$ac_objext'
3822 { (eval echo "$as_me:3822: \"$ac_try\"") >&5
3823 (eval $ac_try) 2>&5
3824 ac_status=$?
3825 echo "$as_me:3825: \$? = $ac_status" >&5
3826 (exit $ac_status); }; }; then
3827 cf_cv_xopen_source=no
3828else
3829 echo "$as_me: failed program was:" >&5
3830cat conftest.$ac_ext >&5
3831cf_save="$CPPFLAGS"
3832 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3833 cat >conftest.$ac_ext <<_ACEOF
3834#line 3834 "configure"
3835#include "confdefs.h"
3836
3837#include <stdlib.h>
3838#include <string.h>
3839#include <sys/types.h>
3840
3841int
3842main ()
3843{
3844
3845#ifdef _XOPEN_SOURCE
3846make an error
3847#endif
3848 ;
3849 return 0;
3850}
3851_ACEOF
3852rm -f conftest.$ac_objext
3853if { (eval echo "$as_me:3853: \"$ac_compile\"") >&5
3854 (eval $ac_compile) 2>&5
3855 ac_status=$?
3856 echo "$as_me:3856: \$? = $ac_status" >&5
3857 (exit $ac_status); } &&
3858 { ac_try='test -s conftest.$ac_objext'
3859 { (eval echo "$as_me:3859: \"$ac_try\"") >&5
3860 (eval $ac_try) 2>&5
3861 ac_status=$?
3862 echo "$as_me:3862: \$? = $ac_status" >&5
3863 (exit $ac_status); }; }; then
3864 cf_cv_xopen_source=no
3865else
3866 echo "$as_me: failed program was:" >&5
3867cat conftest.$ac_ext >&5
3868cf_cv_xopen_source=$cf_XOPEN_SOURCE
3869fi
3870rm -f conftest.$ac_objext conftest.$ac_ext
3871 CPPFLAGS="$cf_save"
3872
3873fi
3874rm -f conftest.$ac_objext conftest.$ac_ext
3875
3876fi
3877echo "$as_me:3877: result: $cf_cv_xopen_source" >&5
3878echo "${ECHO_T}$cf_cv_xopen_source" >&6
3879
3880if test "$cf_cv_xopen_source" != no ; then
3881
3882CFLAGS=`echo "$CFLAGS" | \
3883 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3884 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3885
3886CPPFLAGS=`echo "$CPPFLAGS" | \
3887 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3888 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3889
3890 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3891
3892cf_fix_cppflags=no
3893cf_new_cflags=
3894cf_new_cppflags=
3895cf_new_extra_cppflags=
3896
3897for cf_add_cflags in $cf_temp_xopen_source
3898do
3899case $cf_fix_cppflags in
3900(no)
3901 case $cf_add_cflags in
3902 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3903 case $cf_add_cflags in
3904 (-D*)
3905 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3906
3907 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3908 && test -z "${cf_tst_cflags}" \
3909 && cf_fix_cppflags=yes
3910
3911 if test $cf_fix_cppflags = yes ; then
3912 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3913 continue
3914 elif test "${cf_tst_cflags}" = "\"'" ; then
3915 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3916 continue
3917 fi
3918 ;;
3919 esac
3920 case "$CPPFLAGS" in
3921 (*$cf_add_cflags)
3922 ;;
3923 (*)
3924 case $cf_add_cflags in
3925 (-D*)
3926 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3927
3928CPPFLAGS=`echo "$CPPFLAGS" | \
3929 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3930 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3931
3932 ;;
3933 esac
3934 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3935 ;;
3936 esac
3937 ;;
3938 (*)
3939 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3940 ;;
3941 esac
3942 ;;
3943(yes)
3944 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3945
3946 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3947
3948 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3949 && test -z "${cf_tst_cflags}" \
3950 && cf_fix_cppflags=no
3951 ;;
3952esac
3953done
3954
3955if test -n "$cf_new_cflags" ; then
3956
3957 CFLAGS="$CFLAGS $cf_new_cflags"
3958fi
3959
3960if test -n "$cf_new_cppflags" ; then
3961
3962 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3963fi
3964
3965if test -n "$cf_new_extra_cppflags" ; then
3966
3967 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3968fi
3969
3970fi
3971
3972 fi
3973fi
3974
3975echo "$as_me:3975: checking for signal global datatype" >&5
3976echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3977if test "${cf_cv_sig_atomic_t+set}" = set; then
3978 echo $ECHO_N "(cached) $ECHO_C" >&6
3979else
3980
3981 for cf_type in \
3982 "volatile sig_atomic_t" \
3983 "sig_atomic_t" \
3984 "int"
3985 do
3986 cat >conftest.$ac_ext <<_ACEOF
3987#line 3987 "configure"
3988#include "confdefs.h"
3989
3990#include <sys/types.h>
3991#include <signal.h>
3992#include <stdio.h>
3993
3994extern $cf_type x;
3995$cf_type x;
3996static void handler(int sig)
3997{
3998 x = 5;
3999}
4000int
4001main ()
4002{
4003signal(SIGINT, handler);
4004 x = 1
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009rm -f conftest.$ac_objext
4010if { (eval echo "$as_me:4010: \"$ac_compile\"") >&5
4011 (eval $ac_compile) 2>&5
4012 ac_status=$?
4013 echo "$as_me:4013: \$? = $ac_status" >&5
4014 (exit $ac_status); } &&
4015 { ac_try='test -s conftest.$ac_objext'
4016 { (eval echo "$as_me:4016: \"$ac_try\"") >&5
4017 (eval $ac_try) 2>&5
4018 ac_status=$?
4019 echo "$as_me:4019: \$? = $ac_status" >&5
4020 (exit $ac_status); }; }; then
4021 cf_cv_sig_atomic_t=$cf_type
4022else
4023 echo "$as_me: failed program was:" >&5
4024cat conftest.$ac_ext >&5
4025cf_cv_sig_atomic_t=no
4026fi
4027rm -f conftest.$ac_objext conftest.$ac_ext
4028 test "$cf_cv_sig_atomic_t" != no && break
4029 done
4030
4031fi
4032
4033echo "$as_me:4033: result: $cf_cv_sig_atomic_t" >&5
4034echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4035test "$cf_cv_sig_atomic_t" != no &&
4036cat >>confdefs.h <<EOF
4037#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4038EOF
4039
4040echo "$as_me:4040: checking if you want to use pkg-config" >&5
4041echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4042
4043# Check whether --with-pkg-config or --without-pkg-config was given.
4044if test "${with_pkg_config+set}" = set; then
4045 withval="$with_pkg_config"
4046 cf_pkg_config=$withval
4047else
4048 cf_pkg_config=yes
4049fi;
4050echo "$as_me:4050: result: $cf_pkg_config" >&5
4051echo "${ECHO_T}$cf_pkg_config" >&6
4052
4053case $cf_pkg_config in
4054(no)
4055 PKG_CONFIG=none
4056 ;;
4057(yes)
4058
4059if test -n "$ac_tool_prefix"; then
4060 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4061set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4062echo "$as_me:4062: checking for $ac_word" >&5
4063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4064if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4065 echo $ECHO_N "(cached) $ECHO_C" >&6
4066else
4067 case $PKG_CONFIG in
4068 [\\/]* | ?:[\\/]*)
4069 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4070 ;;
4071 *)
4072 ac_save_IFS=$IFS; IFS=$ac_path_separator
4073ac_dummy="$PATH"
4074for ac_dir in $ac_dummy; do
4075 IFS=$ac_save_IFS
4076 test -z "$ac_dir" && ac_dir=.
4077 if $as_executable_p "$ac_dir/$ac_word"; then
4078 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4079 echo "$as_me:4079: found $ac_dir/$ac_word" >&5
4080 break
4081fi
4082done
4083
4084 ;;
4085esac
4086fi
4087PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4088
4089if test -n "$PKG_CONFIG"; then
4090 echo "$as_me:4090: result: $PKG_CONFIG" >&5
4091echo "${ECHO_T}$PKG_CONFIG" >&6
4092else
4093 echo "$as_me:4093: result: no" >&5
4094echo "${ECHO_T}no" >&6
4095fi
4096
4097fi
4098if test -z "$ac_cv_path_PKG_CONFIG"; then
4099 ac_pt_PKG_CONFIG=$PKG_CONFIG
4100 # Extract the first word of "pkg-config", so it can be a program name with args.
4101set dummy pkg-config; ac_word=$2
4102echo "$as_me:4102: checking for $ac_word" >&5
4103echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4104if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4105 echo $ECHO_N "(cached) $ECHO_C" >&6
4106else
4107 case $ac_pt_PKG_CONFIG in
4108 [\\/]* | ?:[\\/]*)
4109 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4110 ;;
4111 *)
4112 ac_save_IFS=$IFS; IFS=$ac_path_separator
4113ac_dummy="$PATH"
4114for ac_dir in $ac_dummy; do
4115 IFS=$ac_save_IFS
4116 test -z "$ac_dir" && ac_dir=.
4117 if $as_executable_p "$ac_dir/$ac_word"; then
4118 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4119 echo "$as_me:4119: found $ac_dir/$ac_word" >&5
4120 break
4121fi
4122done
4123
4124 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4125 ;;
4126esac
4127fi
4128ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4129
4130if test -n "$ac_pt_PKG_CONFIG"; then
4131 echo "$as_me:4131: result: $ac_pt_PKG_CONFIG" >&5
4132echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4133else
4134 echo "$as_me:4134: result: no" >&5
4135echo "${ECHO_T}no" >&6
4136fi
4137
4138 PKG_CONFIG=$ac_pt_PKG_CONFIG
4139else
4140 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4141fi
4142
4143 ;;
4144(*)
4145 PKG_CONFIG=$withval
4146 ;;
4147esac
4148
4149test -z "$PKG_CONFIG" && PKG_CONFIG=none
4150if test "$PKG_CONFIG" != none ; then
4151
4152if test "x$prefix" != xNONE; then
4153 cf_path_syntax="$prefix"
4154else
4155 cf_path_syntax="$ac_default_prefix"
4156fi
4157
4158case ".$PKG_CONFIG" in
4159(.\$\(*\)*|.\'*\'*)
4160 ;;
4161(..|./*|.\\*)
4162 ;;
4163(.[a-zA-Z]:[\\/]*) # OS/2 EMX
4164 ;;
4165(.\${*prefix}*|.\${*dir}*)
4166 eval PKG_CONFIG="$PKG_CONFIG"
4167 case ".$PKG_CONFIG" in
4168 (.NONE/*)
4169 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4170 ;;
4171 esac
4172 ;;
4173(.no|.NONE/*)
4174 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4175 ;;
4176(*)
4177 { { echo "$as_me:4177: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4178echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4179 { (exit 1); exit 1; }; }
4180 ;;
4181esac
4182
4183elif test "x$cf_pkg_config" != xno ; then
4184 { echo "$as_me:4184: WARNING: pkg-config is not installed" >&5
4185echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4186fi
4187
4188echo "$as_me:4188: checking if you want to see long compiling messages" >&5
4189echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4190
4191# Check whether --enable-echo or --disable-echo was given.
4192if test "${enable_echo+set}" = set; then
4193 enableval="$enable_echo"
4194 test "$enableval" != no && enableval=yes
4195 if test "$enableval" != "yes" ; then
4196
4197 ECHO_LT='--silent'
4198 ECHO_LD='@echo linking $@;'
4199 RULE_CC='@echo compiling $<'
4200 SHOW_CC='@echo compiling $@'
4201 ECHO_CC='@'
4202
4203 else
4204
4205 ECHO_LT=''
4206 ECHO_LD=''
4207 RULE_CC=''
4208 SHOW_CC=''
4209 ECHO_CC=''
4210
4211 fi
4212else
4213 enableval=yes
4214
4215 ECHO_LT=''
4216 ECHO_LD=''
4217 RULE_CC=''
4218 SHOW_CC=''
4219 ECHO_CC=''
4220
4221fi;
4222echo "$as_me:4222: result: $enableval" >&5
4223echo "${ECHO_T}$enableval" >&6
4224
4225echo "$as_me:4225: checking for ncurses wrap-prefix" >&5
4226echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4227
4228# Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4229if test "${with_ncurses_wrap_prefix+set}" = set; then
4230 withval="$with_ncurses_wrap_prefix"
4231 NCURSES_WRAP_PREFIX=$withval
4232else
4233 NCURSES_WRAP_PREFIX=_nc_
4234fi;
4235echo "$as_me:4235: result: $NCURSES_WRAP_PREFIX" >&5
4236echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4237
4238echo "$as_me:4238: checking if you want to check for wide-character functions" >&5
4239echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4240
4241# Check whether --enable-widec or --disable-widec was given.
4242if test "${enable_widec+set}" = set; then
4243 enableval="$enable_widec"
4244 test "$enableval" != no && enableval=yes
4245 if test "$enableval" != "yes" ; then
4246 cf_enable_widec=no
4247 else
4248 cf_enable_widec=yes
4249 fi
4250else
4251 enableval=yes
4252 cf_enable_widec=yes
4253
4254fi;
4255echo "$as_me:4255: result: $cf_enable_widec" >&5
4256echo "${ECHO_T}$cf_enable_widec" >&6
4257
4258echo "$as_me:4258: checking for specific curses-directory" >&5
4259echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4260
4261# Check whether --with-curses-dir or --without-curses-dir was given.
4262if test "${with_curses_dir+set}" = set; then
4263 withval="$with_curses_dir"
4264 cf_cv_curses_dir=$withval
4265else
4266 cf_cv_curses_dir=no
4267fi;
4268echo "$as_me:4268: result: $cf_cv_curses_dir" >&5
4269echo "${ECHO_T}$cf_cv_curses_dir" >&6
4270
4271if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4272then
4273
4274if test "x$prefix" != xNONE; then
4275 cf_path_syntax="$prefix"
4276else
4277 cf_path_syntax="$ac_default_prefix"
4278fi
4279
4280case ".$withval" in
4281(.\$\(*\)*|.\'*\'*)
4282 ;;
4283(..|./*|.\\*)
4284 ;;
4285(.[a-zA-Z]:[\\/]*) # OS/2 EMX
4286 ;;
4287(.\${*prefix}*|.\${*dir}*)
4288 eval withval="$withval"
4289 case ".$withval" in
4290 (.NONE/*)
4291 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4292 ;;
4293 esac
4294 ;;
4295(.no|.NONE/*)
4296 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4297 ;;
4298(*)
4299 { { echo "$as_me:4299: error: expected a pathname, not \"$withval\"" >&5
4300echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4301 { (exit 1); exit 1; }; }
4302 ;;
4303esac
4304
4305 if test -d "$cf_cv_curses_dir"
4306 then
4307
4308if test -n "$cf_cv_curses_dir/include" ; then
4309 for cf_add_incdir in $cf_cv_curses_dir/include
4310 do
4311 while test $cf_add_incdir != /usr/include
4312 do
4313 if test -d $cf_add_incdir
4314 then
4315 cf_have_incdir=no
4316 if test -n "$CFLAGS$CPPFLAGS" ; then
4317 # a loop is needed to ensure we can add subdirs of existing dirs
4318 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4319 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4320 cf_have_incdir=yes; break
4321 fi
4322 done
4323 fi
4324
4325 if test "$cf_have_incdir" = no ; then
4326 if test "$cf_add_incdir" = /usr/local/include ; then
4327 if test "$GCC" = yes
4328 then
4329 cf_save_CPPFLAGS=$CPPFLAGS
4330 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4331 cat >conftest.$ac_ext <<_ACEOF
4332#line 4332 "configure"
4333#include "confdefs.h"
4334#include <stdio.h>
4335int
4336main ()
4337{
4338printf("Hello")
4339 ;
4340 return 0;
4341}
4342_ACEOF
4343rm -f conftest.$ac_objext
4344if { (eval echo "$as_me:4344: \"$ac_compile\"") >&5
4345 (eval $ac_compile) 2>&5
4346 ac_status=$?
4347 echo "$as_me:4347: \$? = $ac_status" >&5
4348 (exit $ac_status); } &&
4349 { ac_try='test -s conftest.$ac_objext'
4350 { (eval echo "$as_me:4350: \"$ac_try\"") >&5
4351 (eval $ac_try) 2>&5
4352 ac_status=$?
4353 echo "$as_me:4353: \$? = $ac_status" >&5
4354 (exit $ac_status); }; }; then
4355 :
4356else
4357 echo "$as_me: failed program was:" >&5
4358cat conftest.$ac_ext >&5
4359cf_have_incdir=yes
4360fi
4361rm -f conftest.$ac_objext conftest.$ac_ext
4362 CPPFLAGS=$cf_save_CPPFLAGS
4363 fi
4364 fi
4365 fi
4366
4367 if test "$cf_have_incdir" = no ; then
4368 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4369
4370echo "${as_me:-configure}:4370: testing adding $cf_add_incdir to include-path ..." 1>&5
4371
4372 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4373
4374 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4375 test "$cf_top_incdir" = "$cf_add_incdir" && break
4376 cf_add_incdir="$cf_top_incdir"
4377 else
4378 break
4379 fi
4380 else
4381 break
4382 fi
4383 done
4384 done
4385fi
4386
4387if test -n "$cf_cv_curses_dir/lib" ; then
4388 for cf_add_libdir in $cf_cv_curses_dir/lib
4389 do
4390 if test $cf_add_libdir = /usr/lib ; then
4391 :
4392 elif test -d $cf_add_libdir
4393 then
4394 cf_have_libdir=no
4395 if test -n "$LDFLAGS$LIBS" ; then
4396 # a loop is needed to ensure we can add subdirs of existing dirs
4397 for cf_test_libdir in $LDFLAGS $LIBS ; do
4398 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4399 cf_have_libdir=yes; break
4400 fi
4401 done
4402 fi
4403 if test "$cf_have_libdir" = no ; then
4404 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4405
4406echo "${as_me:-configure}:4406: testing adding $cf_add_libdir to library-path ..." 1>&5
4407
4408 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4409 fi
4410 fi
4411 done
4412fi
4413
4414 fi
4415fi
4416
4417cf_cv_screen=curses
4418
4419echo "$as_me:4419: checking for specified curses library type" >&5
4420echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4421
4422# Check whether --with-screen or --without-screen was given.
4423if test "${with_screen+set}" = set; then
4424 withval="$with_screen"
4425 cf_cv_screen=$withval
4426else
4427
4428# Check whether --with-ncursesw or --without-ncursesw was given.
4429if test "${with_ncursesw+set}" = set; then
4430 withval="$with_ncursesw"
4431 cf_cv_screen=ncursesw
4432else
4433
4434# Check whether --with-ncurses or --without-ncurses was given.
4435if test "${with_ncurses+set}" = set; then
4436 withval="$with_ncurses"
4437 cf_cv_screen=ncurses
4438else
4439
4440# Check whether --with-pdcurses or --without-pdcurses was given.
4441if test "${with_pdcurses+set}" = set; then
4442 withval="$with_pdcurses"
4443 cf_cv_screen=pdcurses
4444else
4445
4446# Check whether --with-curses-colr or --without-curses-colr was given.
4447if test "${with_curses_colr+set}" = set; then
4448 withval="$with_curses_colr"
4449 cf_cv_screen=curses_colr
4450else
4451
4452# Check whether --with-curses-5lib or --without-curses-5lib was given.
4453if test "${with_curses_5lib+set}" = set; then
4454 withval="$with_curses_5lib"
4455 cf_cv_screen=curses_5lib
4456fi;
4457fi;
4458fi;
4459fi;
4460fi;
4461fi;
4462
4463echo "$as_me:4463: result: $cf_cv_screen" >&5
4464echo "${ECHO_T}$cf_cv_screen" >&6
4465
4466case $cf_cv_screen in
4467(curses|curses_*)
4468
4469echo "$as_me:4469: checking for extra include directories" >&5
4470echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4471if test "${cf_cv_curses_incdir+set}" = set; then
4472 echo $ECHO_N "(cached) $ECHO_C" >&6
4473else
4474
4475cf_cv_curses_incdir=no
4476case $host_os in
4477(hpux10.*)
4478 if test "x$cf_cv_screen" = "xcurses_colr"
4479 then
4480 test -d /usr/include/curses_colr && \
4481 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4482 fi
4483 ;;
4484(sunos3*|sunos4*)
4485 if test "x$cf_cv_screen" = "xcurses_5lib"
4486 then
4487 test -d /usr/5lib && \
4488 test -d /usr/5include && \
4489 cf_cv_curses_incdir="-I/usr/5include"
4490 fi
4491 ;;
4492esac
4493
4494fi
4495echo "$as_me:4495: result: $cf_cv_curses_incdir" >&5
4496echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4497test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4498
4499echo "$as_me:4499: checking if we have identified curses headers" >&5
4500echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4501if test "${cf_cv_ncurses_header+set}" = set; then
4502 echo $ECHO_N "(cached) $ECHO_C" >&6
4503else
4504
4505cf_cv_ncurses_header=none
4506for cf_header in \
4507 ncurses.h \
4508 curses.h ncurses/ncurses.h ncurses/curses.h
4509do
4510cat >conftest.$ac_ext <<_ACEOF
4511#line 4511 "configure"
4512#include "confdefs.h"
4513#include <${cf_header}>
4514int
4515main ()
4516{
4517initscr(); tgoto("?", 0,0)
4518 ;
4519 return 0;
4520}
4521_ACEOF
4522rm -f conftest.$ac_objext
4523if { (eval echo "$as_me:4523: \"$ac_compile\"") >&5
4524 (eval $ac_compile) 2>&5
4525 ac_status=$?
4526 echo "$as_me:4526: \$? = $ac_status" >&5
4527 (exit $ac_status); } &&
4528 { ac_try='test -s conftest.$ac_objext'
4529 { (eval echo "$as_me:4529: \"$ac_try\"") >&5
4530 (eval $ac_try) 2>&5
4531 ac_status=$?
4532 echo "$as_me:4532: \$? = $ac_status" >&5
4533 (exit $ac_status); }; }; then
4534 cf_cv_ncurses_header=$cf_header; break
4535else
4536 echo "$as_me: failed program was:" >&5
4537cat conftest.$ac_ext >&5
4538fi
4539rm -f conftest.$ac_objext conftest.$ac_ext
4540done
4541
4542fi
4543echo "$as_me:4543: result: $cf_cv_ncurses_header" >&5
4544echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4545
4546if test "$cf_cv_ncurses_header" = none ; then
4547 { { echo "$as_me:4547: error: No curses header-files found" >&5
4548echo "$as_me: error: No curses header-files found" >&2;}
4549 { (exit 1); exit 1; }; }
4550fi
4551
4552# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4553
4554for ac_header in $cf_cv_ncurses_header
4555do
4556as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4557echo "$as_me:4557: checking for $ac_header" >&5
4558echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4559if eval "test \"\${$as_ac_Header+set}\" = set"; then
4560 echo $ECHO_N "(cached) $ECHO_C" >&6
4561else
4562 cat >conftest.$ac_ext <<_ACEOF
4563#line 4563 "configure"
4564#include "confdefs.h"
4565#include <$ac_header>
4566_ACEOF
4567if { (eval echo "$as_me:4567: \"$ac_cpp conftest.$ac_ext\"") >&5
4568 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4569 ac_status=$?
4570 egrep -v '^ *\+' conftest.er1 >conftest.err
4571 rm -f conftest.er1
4572 cat conftest.err >&5
4573 echo "$as_me:4573: \$? = $ac_status" >&5
4574 (exit $ac_status); } >/dev/null; then
4575 if test -s conftest.err; then
4576 ac_cpp_err=$ac_c_preproc_warn_flag
4577 else
4578 ac_cpp_err=
4579 fi
4580else
4581 ac_cpp_err=yes
4582fi
4583if test -z "$ac_cpp_err"; then
4584 eval "$as_ac_Header=yes"
4585else
4586 echo "$as_me: failed program was:" >&5
4587 cat conftest.$ac_ext >&5
4588 eval "$as_ac_Header=no"
4589fi
4590rm -f conftest.err conftest.$ac_ext
4591fi
4592echo "$as_me:4592: result: `eval echo '${'$as_ac_Header'}'`" >&5
4593echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4594if test `eval echo '${'$as_ac_Header'}'` = yes; then
4595 cat >>confdefs.h <<EOF
4596#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4597EOF
4598
4599fi
4600done
4601
4602echo "$as_me:4602: checking for terminfo header" >&5
4603echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4604if test "${cf_cv_term_header+set}" = set; then
4605 echo $ECHO_N "(cached) $ECHO_C" >&6
4606else
4607
4608case ${cf_cv_ncurses_header} in
4609(*/ncurses.h|*/ncursesw.h)
4610 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4611 ;;
4612(*)
4613 cf_term_header=term.h
4614 ;;
4615esac
4616
4617for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4618do
4619cat >conftest.$ac_ext <<_ACEOF
4620#line 4620 "configure"
4621#include "confdefs.h"
4622#include <stdio.h>
4623#include <${cf_cv_ncurses_header:-curses.h}>
4624#include <$cf_test>
4625
4626int
4627main ()
4628{
4629int x = auto_left_margin
4630 ;
4631 return 0;
4632}
4633_ACEOF
4634rm -f conftest.$ac_objext
4635if { (eval echo "$as_me:4635: \"$ac_compile\"") >&5
4636 (eval $ac_compile) 2>&5
4637 ac_status=$?
4638 echo "$as_me:4638: \$? = $ac_status" >&5
4639 (exit $ac_status); } &&
4640 { ac_try='test -s conftest.$ac_objext'
4641 { (eval echo "$as_me:4641: \"$ac_try\"") >&5
4642 (eval $ac_try) 2>&5
4643 ac_status=$?
4644 echo "$as_me:4644: \$? = $ac_status" >&5
4645 (exit $ac_status); }; }; then
4646
4647 cf_cv_term_header="$cf_test"
4648else
4649 echo "$as_me: failed program was:" >&5
4650cat conftest.$ac_ext >&5
4651
4652 cf_cv_term_header=unknown
4653
4654fi
4655rm -f conftest.$ac_objext conftest.$ac_ext
4656 test "$cf_cv_term_header" != unknown && break
4657done
4658
4659fi
4660echo "$as_me:4660: result: $cf_cv_term_header" >&5
4661echo "${ECHO_T}$cf_cv_term_header" >&6
4662
4663# Set definitions to allow ifdef'ing to accommodate subdirectories
4664
4665case $cf_cv_term_header in
4666(*term.h)
4667
4668cat >>confdefs.h <<\EOF
4669#define HAVE_TERM_H 1
4670EOF
4671
4672 ;;
4673esac
4674
4675case $cf_cv_term_header in
4676(ncurses/term.h)
4677
4678cat >>confdefs.h <<\EOF
4679#define HAVE_NCURSES_TERM_H 1
4680EOF
4681
4682 ;;
4683(ncursesw/term.h)
4684
4685cat >>confdefs.h <<\EOF
4686#define HAVE_NCURSESW_TERM_H 1
4687EOF
4688
4689 ;;
4690esac
4691
4692echo "$as_me:4692: checking for ncurses version" >&5
4693echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4694if test "${cf_cv_ncurses_version+set}" = set; then
4695 echo $ECHO_N "(cached) $ECHO_C" >&6
4696else
4697
4698 cf_cv_ncurses_version=no
4699 cf_tempfile=out$$
4700 rm -f $cf_tempfile
4701 if test "$cross_compiling" = yes; then
4702
4703 # This will not work if the preprocessor splits the line after the
4704 # Autoconf token. The 'unproto' program does that.
4705 cat > conftest.$ac_ext <<EOF
4706#include <${cf_cv_ncurses_header:-curses.h}>
4707#undef Autoconf
4708#ifdef NCURSES_VERSION
4709Autoconf NCURSES_VERSION
4710#else
4711#ifdef __NCURSES_H
4712Autoconf "old"
4713#endif
4714;
4715#endif
4716EOF
4717 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4718 { (eval echo "$as_me:4718: \"$cf_try\"") >&5
4719 (eval $cf_try) 2>&5
4720 ac_status=$?
4721 echo "$as_me:4721: \$? = $ac_status" >&5
4722 (exit $ac_status); }
4723 if test -f conftest.out ; then
4724 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4725 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4726 rm -f conftest.out
4727 fi
4728
4729else
4730 cat >conftest.$ac_ext <<_ACEOF
4731#line 4731 "configure"
4732#include "confdefs.h"
4733
4734#include <${cf_cv_ncurses_header:-curses.h}>
4735#include <stdio.h>
4736int main()
4737{
4738 FILE *fp = fopen("$cf_tempfile", "w");
4739#ifdef NCURSES_VERSION
4740# ifdef NCURSES_VERSION_PATCH
4741 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4742# else
4743 fprintf(fp, "%s\n", NCURSES_VERSION);
4744# endif
4745#else
4746# ifdef __NCURSES_H
4747 fprintf(fp, "old\n");
4748# else
4749 make an error
4750# endif
4751#endif
4752 ${cf_cv_main_return:-return}(0);
4753}
4754_ACEOF
4755rm -f conftest$ac_exeext
4756if { (eval echo "$as_me:4756: \"$ac_link\"") >&5
4757 (eval $ac_link) 2>&5
4758 ac_status=$?
4759 echo "$as_me:4759: \$? = $ac_status" >&5
4760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4761 { (eval echo "$as_me:4761: \"$ac_try\"") >&5
4762 (eval $ac_try) 2>&5
4763 ac_status=$?
4764 echo "$as_me:4764: \$? = $ac_status" >&5
4765 (exit $ac_status); }; }; then
4766
4767 cf_cv_ncurses_version=`cat $cf_tempfile`
4768else
4769 echo "$as_me: program exited with status $ac_status" >&5
4770echo "$as_me: failed program was:" >&5
4771cat conftest.$ac_ext >&5
4772fi
4773rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4774fi
4775 rm -f $cf_tempfile
4776
4777fi
4778echo "$as_me:4778: result: $cf_cv_ncurses_version" >&5
4779echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4780test "$cf_cv_ncurses_version" = no ||
4781cat >>confdefs.h <<\EOF
4782#define NCURSES 1
4783EOF
4784
4785echo "$as_me:4785: checking if we have identified curses libraries" >&5
4786echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
4787cat >conftest.$ac_ext <<_ACEOF
4788#line 4788 "configure"
4789#include "confdefs.h"
4790#include <${cf_cv_ncurses_header:-curses.h}>
4791int
4792main ()
4793{
4794initscr(); tgoto("?", 0,0)
4795 ;
4796 return 0;
4797}
4798_ACEOF
4799rm -f conftest.$ac_objext conftest$ac_exeext
4800if { (eval echo "$as_me:4800: \"$ac_link\"") >&5
4801 (eval $ac_link) 2>&5
4802 ac_status=$?
4803 echo "$as_me:4803: \$? = $ac_status" >&5
4804 (exit $ac_status); } &&
4805 { ac_try='test -s conftest$ac_exeext'
4806 { (eval echo "$as_me:4806: \"$ac_try\"") >&5
4807 (eval $ac_try) 2>&5
4808 ac_status=$?
4809 echo "$as_me:4809: \$? = $ac_status" >&5
4810 (exit $ac_status); }; }; then
4811 cf_result=yes
4812else
4813 echo "$as_me: failed program was:" >&5
4814cat conftest.$ac_ext >&5
4815cf_result=no
4816fi
4817rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4818echo "$as_me:4818: result: $cf_result" >&5
4819echo "${ECHO_T}$cf_result" >&6
4820
4821if test "$cf_result" = no ; then
4822case $host_os in
4823(freebsd*)
4824 echo "$as_me:4824: checking for tgoto in -lmytinfo" >&5
4825echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4826if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4827 echo $ECHO_N "(cached) $ECHO_C" >&6
4828else
4829 ac_check_lib_save_LIBS=$LIBS
4830LIBS="-lmytinfo $LIBS"
4831cat >conftest.$ac_ext <<_ACEOF
4832#line 4832 "configure"
4833#include "confdefs.h"
4834
4835/* Override any gcc2 internal prototype to avoid an error. */
4836#ifdef __cplusplus
4837extern "C"
4838#endif
4839/* We use char because int might match the return type of a gcc2
4840 builtin and then its argument prototype would still apply. */
4841char tgoto ();
4842int
4843main ()
4844{
4845tgoto ();
4846 ;
4847 return 0;
4848}
4849_ACEOF
4850rm -f conftest.$ac_objext conftest$ac_exeext
4851if { (eval echo "$as_me:4851: \"$ac_link\"") >&5
4852 (eval $ac_link) 2>&5
4853 ac_status=$?
4854 echo "$as_me:4854: \$? = $ac_status" >&5
4855 (exit $ac_status); } &&
4856 { ac_try='test -s conftest$ac_exeext'
4857 { (eval echo "$as_me:4857: \"$ac_try\"") >&5
4858 (eval $ac_try) 2>&5
4859 ac_status=$?
4860 echo "$as_me:4860: \$? = $ac_status" >&5
4861 (exit $ac_status); }; }; then
4862 ac_cv_lib_mytinfo_tgoto=yes
4863else
4864 echo "$as_me: failed program was:" >&5
4865cat conftest.$ac_ext >&5
4866ac_cv_lib_mytinfo_tgoto=no
4867fi
4868rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4869LIBS=$ac_check_lib_save_LIBS
4870fi
4871echo "$as_me:4871: result: $ac_cv_lib_mytinfo_tgoto" >&5
4872echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4873if test $ac_cv_lib_mytinfo_tgoto = yes; then
4874
4875cf_add_libs="-lmytinfo"
4876# Filter out duplicates - this happens with badly-designed ".pc" files...
4877for cf_add_1lib in $LIBS
4878do
4879 for cf_add_2lib in $cf_add_libs
4880 do
4881 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4882 then
4883 cf_add_1lib=
4884 break
4885 fi
4886 done
4887 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4888done
4889LIBS="$cf_add_libs"
4890
4891fi
4892
4893 ;;
4894(hpux10.*)
4895 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
4896 # next (1998), and xcurses "newer" (2000). There is no header file for
4897 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
4898 # term.h) for cur_colr
4899 if test "x$cf_cv_screen" = "xcurses_colr"
4900 then
4901 echo "$as_me:4901: checking for initscr in -lcur_colr" >&5
4902echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
4903if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
4904 echo $ECHO_N "(cached) $ECHO_C" >&6
4905else
4906 ac_check_lib_save_LIBS=$LIBS
4907LIBS="-lcur_colr $LIBS"
4908cat >conftest.$ac_ext <<_ACEOF
4909#line 4909 "configure"
4910#include "confdefs.h"
4911
4912/* Override any gcc2 internal prototype to avoid an error. */
4913#ifdef __cplusplus
4914extern "C"
4915#endif
4916/* We use char because int might match the return type of a gcc2
4917 builtin and then its argument prototype would still apply. */
4918char initscr ();
4919int
4920main ()
4921{
4922initscr ();
4923 ;
4924 return 0;
4925}
4926_ACEOF
4927rm -f conftest.$ac_objext conftest$ac_exeext
4928if { (eval echo "$as_me:4928: \"$ac_link\"") >&5
4929 (eval $ac_link) 2>&5
4930 ac_status=$?
4931 echo "$as_me:4931: \$? = $ac_status" >&5
4932 (exit $ac_status); } &&
4933 { ac_try='test -s conftest$ac_exeext'
4934 { (eval echo "$as_me:4934: \"$ac_try\"") >&5
4935 (eval $ac_try) 2>&5
4936 ac_status=$?
4937 echo "$as_me:4937: \$? = $ac_status" >&5
4938 (exit $ac_status); }; }; then
4939 ac_cv_lib_cur_colr_initscr=yes
4940else
4941 echo "$as_me: failed program was:" >&5
4942cat conftest.$ac_ext >&5
4943ac_cv_lib_cur_colr_initscr=no
4944fi
4945rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4946LIBS=$ac_check_lib_save_LIBS
4947fi
4948echo "$as_me:4948: result: $ac_cv_lib_cur_colr_initscr" >&5
4949echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
4950if test $ac_cv_lib_cur_colr_initscr = yes; then
4951
4952cf_add_libs="-lcur_colr"
4953# Filter out duplicates - this happens with badly-designed ".pc" files...
4954for cf_add_1lib in $LIBS
4955do
4956 for cf_add_2lib in $cf_add_libs
4957 do
4958 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4959 then
4960 cf_add_1lib=
4961 break
4962 fi
4963 done
4964 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4965done
4966LIBS="$cf_add_libs"
4967
4968 ac_cv_func_initscr=yes
4969
4970else
4971
4972 echo "$as_me:4972: checking for initscr in -lHcurses" >&5
4973echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
4974if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
4975 echo $ECHO_N "(cached) $ECHO_C" >&6
4976else
4977 ac_check_lib_save_LIBS=$LIBS
4978LIBS="-lHcurses $LIBS"
4979cat >conftest.$ac_ext <<_ACEOF
4980#line 4980 "configure"
4981#include "confdefs.h"
4982
4983/* Override any gcc2 internal prototype to avoid an error. */
4984#ifdef __cplusplus
4985extern "C"
4986#endif
4987/* We use char because int might match the return type of a gcc2
4988 builtin and then its argument prototype would still apply. */
4989char initscr ();
4990int
4991main ()
4992{
4993initscr ();
4994 ;
4995 return 0;
4996}
4997_ACEOF
4998rm -f conftest.$ac_objext conftest$ac_exeext
4999if { (eval echo "$as_me:4999: \"$ac_link\"") >&5
5000 (eval $ac_link) 2>&5
5001 ac_status=$?
5002 echo "$as_me:5002: \$? = $ac_status" >&5
5003 (exit $ac_status); } &&
5004 { ac_try='test -s conftest$ac_exeext'
5005 { (eval echo "$as_me:5005: \"$ac_try\"") >&5
5006 (eval $ac_try) 2>&5
5007 ac_status=$?
5008 echo "$as_me:5008: \$? = $ac_status" >&5
5009 (exit $ac_status); }; }; then
5010 ac_cv_lib_Hcurses_initscr=yes
5011else
5012 echo "$as_me: failed program was:" >&5
5013cat conftest.$ac_ext >&5
5014ac_cv_lib_Hcurses_initscr=no
5015fi
5016rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5017LIBS=$ac_check_lib_save_LIBS
5018fi
5019echo "$as_me:5019: result: $ac_cv_lib_Hcurses_initscr" >&5
5020echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5021if test $ac_cv_lib_Hcurses_initscr = yes; then
5022
5023 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5024
5025cf_add_libs="-lHcurses"
5026# Filter out duplicates - this happens with badly-designed ".pc" files...
5027for cf_add_1lib in $LIBS
5028do
5029 for cf_add_2lib in $cf_add_libs
5030 do
5031 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5032 then
5033 cf_add_1lib=
5034 break
5035 fi
5036 done
5037 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5038done
5039LIBS="$cf_add_libs"
5040
5041 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5042 ac_cv_func_initscr=yes
5043
5044fi
5045
5046fi
5047
5048 fi
5049 ;;
5050(linux*)
5051 case `arch 2>/dev/null` in
5052 (x86_64)
5053 if test -d /lib64
5054 then
5055
5056if test -n "/lib64" ; then
5057 for cf_add_libdir in /lib64
5058 do
5059 if test $cf_add_libdir = /usr/lib ; then
5060 :
5061 elif test -d $cf_add_libdir
5062 then
5063 cf_have_libdir=no
5064 if test -n "$LDFLAGS$LIBS" ; then
5065 # a loop is needed to ensure we can add subdirs of existing dirs
5066 for cf_test_libdir in $LDFLAGS $LIBS ; do
5067 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5068 cf_have_libdir=yes; break
5069 fi
5070 done
5071 fi
5072 if test "$cf_have_libdir" = no ; then
5073 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5074
5075echo "${as_me:-configure}:5075: testing adding $cf_add_libdir to library-path ..." 1>&5
5076
5077 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5078 fi
5079 fi
5080 done
5081fi
5082
5083 else
5084
5085if test -n "/lib" ; then
5086 for cf_add_libdir in /lib
5087 do
5088 if test $cf_add_libdir = /usr/lib ; then
5089 :
5090 elif test -d $cf_add_libdir
5091 then
5092 cf_have_libdir=no
5093 if test -n "$LDFLAGS$LIBS" ; then
5094 # a loop is needed to ensure we can add subdirs of existing dirs
5095 for cf_test_libdir in $LDFLAGS $LIBS ; do
5096 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5097 cf_have_libdir=yes; break
5098 fi
5099 done
5100 fi
5101 if test "$cf_have_libdir" = no ; then
5102 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5103
5104echo "${as_me:-configure}:5104: testing adding $cf_add_libdir to library-path ..." 1>&5
5105
5106 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5107 fi
5108 fi
5109 done
5110fi
5111
5112 fi
5113 ;;
5114 (*)
5115
5116if test -n "/lib" ; then
5117 for cf_add_libdir in /lib
5118 do
5119 if test $cf_add_libdir = /usr/lib ; then
5120 :
5121 elif test -d $cf_add_libdir
5122 then
5123 cf_have_libdir=no
5124 if test -n "$LDFLAGS$LIBS" ; then
5125 # a loop is needed to ensure we can add subdirs of existing dirs
5126 for cf_test_libdir in $LDFLAGS $LIBS ; do
5127 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5128 cf_have_libdir=yes; break
5129 fi
5130 done
5131 fi
5132 if test "$cf_have_libdir" = no ; then
5133 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5134
5135echo "${as_me:-configure}:5135: testing adding $cf_add_libdir to library-path ..." 1>&5
5136
5137 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5138 fi
5139 fi
5140 done
5141fi
5142
5143 ;;
5144 esac
5145 ;;
5146(sunos3*|sunos4*)
5147 if test "x$cf_cv_screen" = "xcurses_5lib"
5148 then
5149 if test -d /usr/5lib ; then
5150
5151if test -n "/usr/5lib" ; then
5152 for cf_add_libdir in /usr/5lib
5153 do
5154 if test $cf_add_libdir = /usr/lib ; then
5155 :
5156 elif test -d $cf_add_libdir
5157 then
5158 cf_have_libdir=no
5159 if test -n "$LDFLAGS$LIBS" ; then
5160 # a loop is needed to ensure we can add subdirs of existing dirs
5161 for cf_test_libdir in $LDFLAGS $LIBS ; do
5162 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5163 cf_have_libdir=yes; break
5164 fi
5165 done
5166 fi
5167 if test "$cf_have_libdir" = no ; then
5168 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5169
5170echo "${as_me:-configure}:5170: testing adding $cf_add_libdir to library-path ..." 1>&5
5171
5172 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5173 fi
5174 fi
5175 done
5176fi
5177
5178cf_add_libs="-lcurses -ltermcap"
5179# Filter out duplicates - this happens with badly-designed ".pc" files...
5180for cf_add_1lib in $LIBS
5181do
5182 for cf_add_2lib in $cf_add_libs
5183 do
5184 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5185 then
5186 cf_add_1lib=
5187 break
5188 fi
5189 done
5190 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5191done
5192LIBS="$cf_add_libs"
5193
5194 fi
5195 fi
5196 ac_cv_func_initscr=yes
5197 ;;
5198esac
5199
5200if test ".$ac_cv_func_initscr" != .yes ; then
5201 cf_save_LIBS="$LIBS"
5202
5203 if test ".${cf_cv_ncurses_version:-no}" != .no
5204 then
5205 cf_check_list="ncurses curses cursesX"
5206 else
5207 cf_check_list="cursesX curses ncurses"
5208 fi
5209
5210 # Check for library containing tgoto. Do this before curses library
5211 # because it may be needed to link the test-case for initscr.
5212 if test "x$cf_term_lib" = x
5213 then
5214 echo "$as_me:5214: checking for tgoto" >&5
5215echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5216if test "${ac_cv_func_tgoto+set}" = set; then
5217 echo $ECHO_N "(cached) $ECHO_C" >&6
5218else
5219 cat >conftest.$ac_ext <<_ACEOF
5220#line 5220 "configure"
5221#include "confdefs.h"
5222/* System header to define __stub macros and hopefully few prototypes,
5223 which can conflict with char tgoto (); below. */
5224#include <assert.h>
5225/* Override any gcc2 internal prototype to avoid an error. */
5226#ifdef __cplusplus
5227extern "C"
5228#endif
5229/* We use char because int might match the return type of a gcc2
5230 builtin and then its argument prototype would still apply. */
5231char tgoto ();
5232char (*f) ();
5233
5234int
5235main ()
5236{
5237/* The GNU C library defines this for functions which it implements
5238 to always fail with ENOSYS. Some functions are actually named
5239 something starting with __ and the normal name is an alias. */
5240#if defined (__stub_tgoto) || defined (__stub___tgoto)
5241choke me
5242#else
5243f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5244#endif
5245
5246 ;
5247 return 0;
5248}
5249_ACEOF
5250rm -f conftest.$ac_objext conftest$ac_exeext
5251if { (eval echo "$as_me:5251: \"$ac_link\"") >&5
5252 (eval $ac_link) 2>&5
5253 ac_status=$?
5254 echo "$as_me:5254: \$? = $ac_status" >&5
5255 (exit $ac_status); } &&
5256 { ac_try='test -s conftest$ac_exeext'
5257 { (eval echo "$as_me:5257: \"$ac_try\"") >&5
5258 (eval $ac_try) 2>&5
5259 ac_status=$?
5260 echo "$as_me:5260: \$? = $ac_status" >&5
5261 (exit $ac_status); }; }; then
5262 ac_cv_func_tgoto=yes
5263else
5264 echo "$as_me: failed program was:" >&5
5265cat conftest.$ac_ext >&5
5266ac_cv_func_tgoto=no
5267fi
5268rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5269fi
5270echo "$as_me:5270: result: $ac_cv_func_tgoto" >&5
5271echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5272if test $ac_cv_func_tgoto = yes; then
5273 cf_term_lib=predefined
5274else
5275
5276 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5277 do
5278 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5279echo "$as_me:5279: checking for tgoto in -l$cf_term_lib" >&5
5280echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5281if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5282 echo $ECHO_N "(cached) $ECHO_C" >&6
5283else
5284 ac_check_lib_save_LIBS=$LIBS
5285LIBS="-l$cf_term_lib $LIBS"
5286cat >conftest.$ac_ext <<_ACEOF
5287#line 5287 "configure"
5288#include "confdefs.h"
5289
5290/* Override any gcc2 internal prototype to avoid an error. */
5291#ifdef __cplusplus
5292extern "C"
5293#endif
5294/* We use char because int might match the return type of a gcc2
5295 builtin and then its argument prototype would still apply. */
5296char tgoto ();
5297int
5298main ()
5299{
5300tgoto ();
5301 ;
5302 return 0;
5303}
5304_ACEOF
5305rm -f conftest.$ac_objext conftest$ac_exeext
5306if { (eval echo "$as_me:5306: \"$ac_link\"") >&5
5307 (eval $ac_link) 2>&5
5308 ac_status=$?
5309 echo "$as_me:5309: \$? = $ac_status" >&5
5310 (exit $ac_status); } &&
5311 { ac_try='test -s conftest$ac_exeext'
5312 { (eval echo "$as_me:5312: \"$ac_try\"") >&5
5313 (eval $ac_try) 2>&5
5314 ac_status=$?
5315 echo "$as_me:5315: \$? = $ac_status" >&5
5316 (exit $ac_status); }; }; then
5317 eval "$as_ac_Lib=yes"
5318else
5319 echo "$as_me: failed program was:" >&5
5320cat conftest.$ac_ext >&5
5321eval "$as_ac_Lib=no"
5322fi
5323rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5324LIBS=$ac_check_lib_save_LIBS
5325fi
5326echo "$as_me:5326: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5327echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5328if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5329 break
5330fi
5331
5332 done
5333
5334fi
5335
5336 fi
5337
5338 # Check for library containing initscr
5339 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5340 if test "x$cf_curs_lib" = x
5341 then
5342 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5343 do
5344 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5345echo "$as_me:5345: checking for initscr in -l$cf_curs_lib" >&5
5346echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5347if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5348 echo $ECHO_N "(cached) $ECHO_C" >&6
5349else
5350 ac_check_lib_save_LIBS=$LIBS
5351LIBS="-l$cf_curs_lib $LIBS"
5352cat >conftest.$ac_ext <<_ACEOF
5353#line 5353 "configure"
5354#include "confdefs.h"
5355
5356/* Override any gcc2 internal prototype to avoid an error. */
5357#ifdef __cplusplus
5358extern "C"
5359#endif
5360/* We use char because int might match the return type of a gcc2
5361 builtin and then its argument prototype would still apply. */
5362char initscr ();
5363int
5364main ()
5365{
5366initscr ();
5367 ;
5368 return 0;
5369}
5370_ACEOF
5371rm -f conftest.$ac_objext conftest$ac_exeext
5372if { (eval echo "$as_me:5372: \"$ac_link\"") >&5
5373 (eval $ac_link) 2>&5
5374 ac_status=$?
5375 echo "$as_me:5375: \$? = $ac_status" >&5
5376 (exit $ac_status); } &&
5377 { ac_try='test -s conftest$ac_exeext'
5378 { (eval echo "$as_me:5378: \"$ac_try\"") >&5
5379 (eval $ac_try) 2>&5
5380 ac_status=$?
5381 echo "$as_me:5381: \$? = $ac_status" >&5
5382 (exit $ac_status); }; }; then
5383 eval "$as_ac_Lib=yes"
5384else
5385 echo "$as_me: failed program was:" >&5
5386cat conftest.$ac_ext >&5
5387eval "$as_ac_Lib=no"
5388fi
5389rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5390LIBS=$ac_check_lib_save_LIBS
5391fi
5392echo "$as_me:5392: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5393echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5394if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5395 break
5396fi
5397
5398 done
5399 fi
5400 test $cf_curs_lib = unknown && { { echo "$as_me:5400: error: no curses library found" >&5
5401echo "$as_me: error: no curses library found" >&2;}
5402 { (exit 1); exit 1; }; }
5403
5404 LIBS="-l$cf_curs_lib $cf_save_LIBS"
5405 if test "$cf_term_lib" = unknown ; then
5406 echo "$as_me:5406: checking if we can link with $cf_curs_lib library" >&5
5407echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5408 cat >conftest.$ac_ext <<_ACEOF
5409#line 5409 "configure"
5410#include "confdefs.h"
5411#include <${cf_cv_ncurses_header:-curses.h}>
5412int
5413main ()
5414{
5415initscr()
5416 ;
5417 return 0;
5418}
5419_ACEOF
5420rm -f conftest.$ac_objext conftest$ac_exeext
5421if { (eval echo "$as_me:5421: \"$ac_link\"") >&5
5422 (eval $ac_link) 2>&5
5423 ac_status=$?
5424 echo "$as_me:5424: \$? = $ac_status" >&5
5425 (exit $ac_status); } &&
5426 { ac_try='test -s conftest$ac_exeext'
5427 { (eval echo "$as_me:5427: \"$ac_try\"") >&5
5428 (eval $ac_try) 2>&5
5429 ac_status=$?
5430 echo "$as_me:5430: \$? = $ac_status" >&5
5431 (exit $ac_status); }; }; then
5432 cf_result=yes
5433else
5434 echo "$as_me: failed program was:" >&5
5435cat conftest.$ac_ext >&5
5436cf_result=no
5437fi
5438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5439 echo "$as_me:5439: result: $cf_result" >&5
5440echo "${ECHO_T}$cf_result" >&6
5441 test $cf_result = no && { { echo "$as_me:5441: error: Cannot link curses library" >&5
5442echo "$as_me: error: Cannot link curses library" >&2;}
5443 { (exit 1); exit 1; }; }
5444 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5445 :
5446 elif test "$cf_term_lib" != predefined ; then
5447 echo "$as_me:5447: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5448echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5449 cat >conftest.$ac_ext <<_ACEOF
5450#line 5450 "configure"
5451#include "confdefs.h"
5452#include <${cf_cv_ncurses_header:-curses.h}>
5453int
5454main ()
5455{
5456initscr(); tgoto((char *)0, 0, 0);
5457 ;
5458 return 0;
5459}
5460_ACEOF
5461rm -f conftest.$ac_objext conftest$ac_exeext
5462if { (eval echo "$as_me:5462: \"$ac_link\"") >&5
5463 (eval $ac_link) 2>&5
5464 ac_status=$?
5465 echo "$as_me:5465: \$? = $ac_status" >&5
5466 (exit $ac_status); } &&
5467 { ac_try='test -s conftest$ac_exeext'
5468 { (eval echo "$as_me:5468: \"$ac_try\"") >&5
5469 (eval $ac_try) 2>&5
5470 ac_status=$?
5471 echo "$as_me:5471: \$? = $ac_status" >&5
5472 (exit $ac_status); }; }; then
5473 cf_result=no
5474else
5475 echo "$as_me: failed program was:" >&5
5476cat conftest.$ac_ext >&5
5477
5478 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5479 cat >conftest.$ac_ext <<_ACEOF
5480#line 5480 "configure"
5481#include "confdefs.h"
5482#include <${cf_cv_ncurses_header:-curses.h}>
5483int
5484main ()
5485{
5486initscr()
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491rm -f conftest.$ac_objext conftest$ac_exeext
5492if { (eval echo "$as_me:5492: \"$ac_link\"") >&5
5493 (eval $ac_link) 2>&5
5494 ac_status=$?
5495 echo "$as_me:5495: \$? = $ac_status" >&5
5496 (exit $ac_status); } &&
5497 { ac_try='test -s conftest$ac_exeext'
5498 { (eval echo "$as_me:5498: \"$ac_try\"") >&5
5499 (eval $ac_try) 2>&5
5500 ac_status=$?
5501 echo "$as_me:5501: \$? = $ac_status" >&5
5502 (exit $ac_status); }; }; then
5503 cf_result=yes
5504else
5505 echo "$as_me: failed program was:" >&5
5506cat conftest.$ac_ext >&5
5507cf_result=error
5508fi
5509rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5510
5511fi
5512rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5513 echo "$as_me:5513: result: $cf_result" >&5
5514echo "${ECHO_T}$cf_result" >&6
5515 fi
5516fi
5517fi
5518
5519 ;;
5520(ncursesw*)
5521
5522echo "$as_me:5522: checking for multibyte character support" >&5
5523echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5524if test "${cf_cv_utf8_lib+set}" = set; then
5525 echo $ECHO_N "(cached) $ECHO_C" >&6
5526else
5527
5528 cf_save_LIBS="$LIBS"
5529 cat >conftest.$ac_ext <<_ACEOF
5530#line 5530 "configure"
5531#include "confdefs.h"
5532
5533#include <stdlib.h>
5534int
5535main ()
5536{
5537putwc(0,0);
5538 ;
5539 return 0;
5540}
5541_ACEOF
5542rm -f conftest.$ac_objext conftest$ac_exeext
5543if { (eval echo "$as_me:5543: \"$ac_link\"") >&5
5544 (eval $ac_link) 2>&5
5545 ac_status=$?
5546 echo "$as_me:5546: \$? = $ac_status" >&5
5547 (exit $ac_status); } &&
5548 { ac_try='test -s conftest$ac_exeext'
5549 { (eval echo "$as_me:5549: \"$ac_try\"") >&5
5550 (eval $ac_try) 2>&5
5551 ac_status=$?
5552 echo "$as_me:5552: \$? = $ac_status" >&5
5553 (exit $ac_status); }; }; then
5554 cf_cv_utf8_lib=yes
5555else
5556 echo "$as_me: failed program was:" >&5
5557cat conftest.$ac_ext >&5
5558
5559# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5560# will be set on completion of the AC_TRY_LINK below.
5561cf_cv_header_path_utf8=
5562cf_cv_library_path_utf8=
5563
5564echo "${as_me:-configure}:5564: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5565
5566cf_save_LIBS="$LIBS"
5567
5568cat >conftest.$ac_ext <<_ACEOF
5569#line 5569 "configure"
5570#include "confdefs.h"
5571
5572#include <libutf8.h>
5573int
5574main ()
5575{
5576putwc(0,0);
5577 ;
5578 return 0;
5579}
5580_ACEOF
5581rm -f conftest.$ac_objext conftest$ac_exeext
5582if { (eval echo "$as_me:5582: \"$ac_link\"") >&5
5583 (eval $ac_link) 2>&5
5584 ac_status=$?
5585 echo "$as_me:5585: \$? = $ac_status" >&5
5586 (exit $ac_status); } &&
5587 { ac_try='test -s conftest$ac_exeext'
5588 { (eval echo "$as_me:5588: \"$ac_try\"") >&5
5589 (eval $ac_try) 2>&5
5590 ac_status=$?
5591 echo "$as_me:5591: \$? = $ac_status" >&5
5592 (exit $ac_status); }; }; then
5593
5594 cf_cv_find_linkage_utf8=yes
5595 cf_cv_header_path_utf8=/usr/include
5596 cf_cv_library_path_utf8=/usr/lib
5597
5598else
5599 echo "$as_me: failed program was:" >&5
5600cat conftest.$ac_ext >&5
5601
5602LIBS="-lutf8 $cf_save_LIBS"
5603
5604cat >conftest.$ac_ext <<_ACEOF
5605#line 5605 "configure"
5606#include "confdefs.h"
5607
5608#include <libutf8.h>
5609int
5610main ()
5611{
5612putwc(0,0);
5613 ;
5614 return 0;
5615}
5616_ACEOF
5617rm -f conftest.$ac_objext conftest$ac_exeext
5618if { (eval echo "$as_me:5618: \"$ac_link\"") >&5
5619 (eval $ac_link) 2>&5
5620 ac_status=$?
5621 echo "$as_me:5621: \$? = $ac_status" >&5
5622 (exit $ac_status); } &&
5623 { ac_try='test -s conftest$ac_exeext'
5624 { (eval echo "$as_me:5624: \"$ac_try\"") >&5
5625 (eval $ac_try) 2>&5
5626 ac_status=$?
5627 echo "$as_me:5627: \$? = $ac_status" >&5
5628 (exit $ac_status); }; }; then
5629
5630 cf_cv_find_linkage_utf8=yes
5631 cf_cv_header_path_utf8=/usr/include
5632 cf_cv_library_path_utf8=/usr/lib
5633 cf_cv_library_file_utf8="-lutf8"
5634
5635else
5636 echo "$as_me: failed program was:" >&5
5637cat conftest.$ac_ext >&5
5638
5639 cf_cv_find_linkage_utf8=no
5640 LIBS="$cf_save_LIBS"
5641
5642 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5643
5644echo "${as_me:-configure}:5644: testing find linkage for utf8 library ..." 1>&5
5645
5646echo "${as_me:-configure}:5646: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5647
5648 cf_save_CPPFLAGS="$CPPFLAGS"
5649 cf_test_CPPFLAGS="$CPPFLAGS"
5650
5651cf_search=
5652
5653# collect the current set of include-directories from compiler flags
5654cf_header_path_list=""
5655if test -n "${CFLAGS}${CPPFLAGS}" ; then
5656 for cf_header_path in $CPPFLAGS $CFLAGS
5657 do
5658 case $cf_header_path in
5659 (-I*)
5660 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5661
5662test "x$cf_header_path" != "xNONE" && \
5663test -d "$cf_header_path" && \
5664 {
5665 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5666 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5667 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5668 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5669 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5670 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5671}
5672
5673 cf_header_path_list="$cf_header_path_list $cf_search"
5674 ;;
5675 esac
5676 done
5677fi
5678
5679# add the variations for the package we are looking for
5680
5681cf_search=
5682
5683test "x$prefix" != "xNONE" && \
5684test -d "$prefix" && \
5685 {
5686 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5687 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5688 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5689 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5690 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5691 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5692}
5693
5694for cf_subdir_prefix in \
5695 /usr \
5696 /usr/local \
5697 /usr/pkg \
5698 /opt \
5699 /opt/local \
5700 $HOME
5701do
5702
5703test "x$cf_subdir_prefix" != "x$prefix" && \
5704test -d "$cf_subdir_prefix" && \
5705(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5706 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5707 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5708 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5709 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5710 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5711 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5712}
5713
5714done
5715
5716test "$includedir" != NONE && \
5717test "$includedir" != "/usr/include" && \
5718test -d "$includedir" && {
5719 test -d $includedir && cf_search="$cf_search $includedir"
5720 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5721}
5722
5723test "$oldincludedir" != NONE && \
5724test "$oldincludedir" != "/usr/include" && \
5725test -d "$oldincludedir" && {
5726 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5727 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5728}
5729
5730cf_search="$cf_search $cf_header_path_list"
5731
5732 for cf_cv_header_path_utf8 in $cf_search
5733 do
5734 if test -d $cf_cv_header_path_utf8 ; then
5735 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5736
5737echo "${as_me:-configure}:5737: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5738
5739 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5740 cat >conftest.$ac_ext <<_ACEOF
5741#line 5741 "configure"
5742#include "confdefs.h"
5743
5744#include <libutf8.h>
5745int
5746main ()
5747{
5748putwc(0,0);
5749 ;
5750 return 0;
5751}
5752_ACEOF
5753rm -f conftest.$ac_objext
5754if { (eval echo "$as_me:5754: \"$ac_compile\"") >&5
5755 (eval $ac_compile) 2>&5
5756 ac_status=$?
5757 echo "$as_me:5757: \$? = $ac_status" >&5
5758 (exit $ac_status); } &&
5759 { ac_try='test -s conftest.$ac_objext'
5760 { (eval echo "$as_me:5760: \"$ac_try\"") >&5
5761 (eval $ac_try) 2>&5
5762 ac_status=$?
5763 echo "$as_me:5763: \$? = $ac_status" >&5
5764 (exit $ac_status); }; }; then
5765
5766 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5767
5768echo "${as_me:-configure}:5768: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5769
5770 cf_cv_find_linkage_utf8=maybe
5771 cf_test_CPPFLAGS="$CPPFLAGS"
5772 break
5773else
5774 echo "$as_me: failed program was:" >&5
5775cat conftest.$ac_ext >&5
5776
5777 CPPFLAGS="$cf_save_CPPFLAGS"
5778
5779fi
5780rm -f conftest.$ac_objext conftest.$ac_ext
5781 fi
5782 done
5783
5784 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5785
5786echo "${as_me:-configure}:5786: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5787
5788 cf_save_LIBS="$LIBS"
5789 cf_save_LDFLAGS="$LDFLAGS"
5790
5791 if test "$cf_cv_find_linkage_utf8" != yes ; then
5792
5793cf_search=
5794cf_library_path_list=""
5795if test -n "${LDFLAGS}${LIBS}" ; then
5796 for cf_library_path in $LDFLAGS $LIBS
5797 do
5798 case $cf_library_path in
5799 (-L*)
5800 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5801
5802test "x$cf_library_path" != "xNONE" && \
5803test -d "$cf_library_path" && \
5804 {
5805 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5806 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5807 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5808 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5809 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5810 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5811}
5812
5813 cf_library_path_list="$cf_library_path_list $cf_search"
5814 ;;
5815 esac
5816 done
5817fi
5818
5819cf_search=
5820
5821test "x$prefix" != "xNONE" && \
5822test -d "$prefix" && \
5823 {
5824 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5825 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5826 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5827 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5828 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5829 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5830}
5831
5832for cf_subdir_prefix in \
5833 /usr \
5834 /usr/local \
5835 /usr/pkg \
5836 /opt \
5837 /opt/local \
5838 $HOME
5839do
5840
5841test "x$cf_subdir_prefix" != "x$prefix" && \
5842test -d "$cf_subdir_prefix" && \
5843(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5844 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5845 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5846 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5847 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5848 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5849 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5850}
5851
5852done
5853
5854cf_search="$cf_library_path_list $cf_search"
5855
5856 for cf_cv_library_path_utf8 in $cf_search
5857 do
5858 if test -d $cf_cv_library_path_utf8 ; then
5859 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5860
5861echo "${as_me:-configure}:5861: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5862
5863 CPPFLAGS="$cf_test_CPPFLAGS"
5864 LIBS="-lutf8 $cf_save_LIBS"
5865 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5866 cat >conftest.$ac_ext <<_ACEOF
5867#line 5867 "configure"
5868#include "confdefs.h"
5869
5870#include <libutf8.h>
5871int
5872main ()
5873{
5874putwc(0,0);
5875 ;
5876 return 0;
5877}
5878_ACEOF
5879rm -f conftest.$ac_objext conftest$ac_exeext
5880if { (eval echo "$as_me:5880: \"$ac_link\"") >&5
5881 (eval $ac_link) 2>&5
5882 ac_status=$?
5883 echo "$as_me:5883: \$? = $ac_status" >&5
5884 (exit $ac_status); } &&
5885 { ac_try='test -s conftest$ac_exeext'
5886 { (eval echo "$as_me:5886: \"$ac_try\"") >&5
5887 (eval $ac_try) 2>&5
5888 ac_status=$?
5889 echo "$as_me:5889: \$? = $ac_status" >&5
5890 (exit $ac_status); }; }; then
5891
5892 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5893
5894echo "${as_me:-configure}:5894: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5895
5896 cf_cv_find_linkage_utf8=yes
5897 cf_cv_library_file_utf8="-lutf8"
5898 break
5899else
5900 echo "$as_me: failed program was:" >&5
5901cat conftest.$ac_ext >&5
5902
5903 CPPFLAGS="$cf_save_CPPFLAGS"
5904 LIBS="$cf_save_LIBS"
5905 LDFLAGS="$cf_save_LDFLAGS"
5906
5907fi
5908rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5909 fi
5910 done
5911 CPPFLAGS="$cf_save_CPPFLAGS"
5912 LDFLAGS="$cf_save_LDFLAGS"
5913 fi
5914
5915 else
5916 cf_cv_find_linkage_utf8=no
5917 fi
5918
5919fi
5920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5921
5922fi
5923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5924
5925LIBS="$cf_save_LIBS"
5926
5927if test "$cf_cv_find_linkage_utf8" = yes ; then
5928cf_cv_utf8_lib=add-on
5929else
5930cf_cv_utf8_lib=no
5931fi
5932
5933fi
5934rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5935fi
5936echo "$as_me:5936: result: $cf_cv_utf8_lib" >&5
5937echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5938
5939# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5940# ncurses/ncursesw:
5941if test "$cf_cv_utf8_lib" = "add-on" ; then
5942
5943cat >>confdefs.h <<\EOF
5944#define HAVE_LIBUTF8_H 1
5945EOF
5946
5947if test -n "$cf_cv_header_path_utf8" ; then
5948 for cf_add_incdir in $cf_cv_header_path_utf8
5949 do
5950 while test $cf_add_incdir != /usr/include
5951 do
5952 if test -d $cf_add_incdir
5953 then
5954 cf_have_incdir=no
5955 if test -n "$CFLAGS$CPPFLAGS" ; then
5956 # a loop is needed to ensure we can add subdirs of existing dirs
5957 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5958 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5959 cf_have_incdir=yes; break
5960 fi
5961 done
5962 fi
5963
5964 if test "$cf_have_incdir" = no ; then
5965 if test "$cf_add_incdir" = /usr/local/include ; then
5966 if test "$GCC" = yes
5967 then
5968 cf_save_CPPFLAGS=$CPPFLAGS
5969 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5970 cat >conftest.$ac_ext <<_ACEOF
5971#line 5971 "configure"
5972#include "confdefs.h"
5973#include <stdio.h>
5974int
5975main ()
5976{
5977printf("Hello")
5978 ;
5979 return 0;
5980}
5981_ACEOF
5982rm -f conftest.$ac_objext
5983if { (eval echo "$as_me:5983: \"$ac_compile\"") >&5
5984 (eval $ac_compile) 2>&5
5985 ac_status=$?
5986 echo "$as_me:5986: \$? = $ac_status" >&5
5987 (exit $ac_status); } &&
5988 { ac_try='test -s conftest.$ac_objext'
5989 { (eval echo "$as_me:5989: \"$ac_try\"") >&5
5990 (eval $ac_try) 2>&5
5991 ac_status=$?
5992 echo "$as_me:5992: \$? = $ac_status" >&5
5993 (exit $ac_status); }; }; then
5994 :
5995else
5996 echo "$as_me: failed program was:" >&5
5997cat conftest.$ac_ext >&5
5998cf_have_incdir=yes
5999fi
6000rm -f conftest.$ac_objext conftest.$ac_ext
6001 CPPFLAGS=$cf_save_CPPFLAGS
6002 fi
6003 fi
6004 fi
6005
6006 if test "$cf_have_incdir" = no ; then
6007 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6008
6009echo "${as_me:-configure}:6009: testing adding $cf_add_incdir to include-path ..." 1>&5
6010
6011 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6012
6013 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6014 test "$cf_top_incdir" = "$cf_add_incdir" && break
6015 cf_add_incdir="$cf_top_incdir"
6016 else
6017 break
6018 fi
6019 else
6020 break
6021 fi
6022 done
6023 done
6024fi
6025
6026if test -n "$cf_cv_library_path_utf8" ; then
6027 for cf_add_libdir in $cf_cv_library_path_utf8
6028 do
6029 if test $cf_add_libdir = /usr/lib ; then
6030 :
6031 elif test -d $cf_add_libdir
6032 then
6033 cf_have_libdir=no
6034 if test -n "$LDFLAGS$LIBS" ; then
6035 # a loop is needed to ensure we can add subdirs of existing dirs
6036 for cf_test_libdir in $LDFLAGS $LIBS ; do
6037 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6038 cf_have_libdir=yes; break
6039 fi
6040 done
6041 fi
6042 if test "$cf_have_libdir" = no ; then
6043 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6044
6045echo "${as_me:-configure}:6045: testing adding $cf_add_libdir to library-path ..." 1>&5
6046
6047 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6048 fi
6049 fi
6050 done
6051fi
6052
6053cf_add_libs="$cf_cv_library_file_utf8"
6054# Filter out duplicates - this happens with badly-designed ".pc" files...
6055for cf_add_1lib in $LIBS
6056do
6057 for cf_add_2lib in $cf_add_libs
6058 do
6059 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6060 then
6061 cf_add_1lib=
6062 break
6063 fi
6064 done
6065 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6066done
6067LIBS="$cf_add_libs"
6068
6069fi
6070
6071cf_ncuconfig_root=$cf_cv_screen
6072cf_have_ncuconfig=no
6073
6074if test "x${PKG_CONFIG:=none}" != xnone; then
6075 echo "$as_me:6075: checking pkg-config for $cf_ncuconfig_root" >&5
6076echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6077 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6078 echo "$as_me:6078: result: yes" >&5
6079echo "${ECHO_T}yes" >&6
6080
6081 echo "$as_me:6081: checking if the $cf_ncuconfig_root package files work" >&5
6082echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6083 cf_have_ncuconfig=unknown
6084
6085 cf_save_CPPFLAGS="$CPPFLAGS"
6086 cf_save_LIBS="$LIBS"
6087
6088 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6089
6090cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6091# Filter out duplicates - this happens with badly-designed ".pc" files...
6092for cf_add_1lib in $LIBS
6093do
6094 for cf_add_2lib in $cf_add_libs
6095 do
6096 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6097 then
6098 cf_add_1lib=
6099 break
6100 fi
6101 done
6102 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6103done
6104LIBS="$cf_add_libs"
6105
6106 cat >conftest.$ac_ext <<_ACEOF
6107#line 6107 "configure"
6108#include "confdefs.h"
6109#include <${cf_cv_ncurses_header:-curses.h}>
6110int
6111main ()
6112{
6113initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6114 ;
6115 return 0;
6116}
6117_ACEOF
6118rm -f conftest.$ac_objext conftest$ac_exeext
6119if { (eval echo "$as_me:6119: \"$ac_link\"") >&5
6120 (eval $ac_link) 2>&5
6121 ac_status=$?
6122 echo "$as_me:6122: \$? = $ac_status" >&5
6123 (exit $ac_status); } &&
6124 { ac_try='test -s conftest$ac_exeext'
6125 { (eval echo "$as_me:6125: \"$ac_try\"") >&5
6126 (eval $ac_try) 2>&5
6127 ac_status=$?
6128 echo "$as_me:6128: \$? = $ac_status" >&5
6129 (exit $ac_status); }; }; then
6130 if test "$cross_compiling" = yes; then
6131 cf_have_ncuconfig=maybe
6132else
6133 cat >conftest.$ac_ext <<_ACEOF
6134#line 6134 "configure"
6135#include "confdefs.h"
6136#include <${cf_cv_ncurses_header:-curses.h}>
6137 int main(void)
6138 { char *xx = curses_version(); return (xx == 0); }
6139_ACEOF
6140rm -f conftest$ac_exeext
6141if { (eval echo "$as_me:6141: \"$ac_link\"") >&5
6142 (eval $ac_link) 2>&5
6143 ac_status=$?
6144 echo "$as_me:6144: \$? = $ac_status" >&5
6145 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6146 { (eval echo "$as_me:6146: \"$ac_try\"") >&5
6147 (eval $ac_try) 2>&5
6148 ac_status=$?
6149 echo "$as_me:6149: \$? = $ac_status" >&5
6150 (exit $ac_status); }; }; then
6151 cf_have_ncuconfig=yes
6152else
6153 echo "$as_me: program exited with status $ac_status" >&5
6154echo "$as_me: failed program was:" >&5
6155cat conftest.$ac_ext >&5
6156cf_have_ncuconfig=no
6157fi
6158rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6159fi
6160else
6161 echo "$as_me: failed program was:" >&5
6162cat conftest.$ac_ext >&5
6163cf_have_ncuconfig=no
6164fi
6165rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6166 echo "$as_me:6166: result: $cf_have_ncuconfig" >&5
6167echo "${ECHO_T}$cf_have_ncuconfig" >&6
6168 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6169 if test "$cf_have_ncuconfig" != "yes"
6170 then
6171 CPPFLAGS="$cf_save_CPPFLAGS"
6172 LIBS="$cf_save_LIBS"
6173 NCURSES_CONFIG_PKG=none
6174 else
6175
6176cat >>confdefs.h <<\EOF
6177#define NCURSES 1
6178EOF
6179
6180 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6181 fi
6182
6183 else
6184 echo "$as_me:6184: result: no" >&5
6185echo "${ECHO_T}no" >&6
6186 NCURSES_CONFIG_PKG=none
6187 fi
6188else
6189 NCURSES_CONFIG_PKG=none
6190fi
6191
6192if test "x$cf_have_ncuconfig" = "xno"; then
6193 echo "Looking for ${cf_ncuconfig_root}-config"
6194
6195if test -n "$ac_tool_prefix"; then
6196 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6197 do
6198 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6199set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6200echo "$as_me:6200: checking for $ac_word" >&5
6201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6202if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6203 echo $ECHO_N "(cached) $ECHO_C" >&6
6204else
6205 if test -n "$NCURSES_CONFIG"; then
6206 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6207else
6208 ac_save_IFS=$IFS; IFS=$ac_path_separator
6209ac_dummy="$PATH"
6210for ac_dir in $ac_dummy; do
6211 IFS=$ac_save_IFS
6212 test -z "$ac_dir" && ac_dir=.
6213 $as_executable_p "$ac_dir/$ac_word" || continue
6214ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6215echo "$as_me:6215: found $ac_dir/$ac_word" >&5
6216break
6217done
6218
6219fi
6220fi
6221NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6222if test -n "$NCURSES_CONFIG"; then
6223 echo "$as_me:6223: result: $NCURSES_CONFIG" >&5
6224echo "${ECHO_T}$NCURSES_CONFIG" >&6
6225else
6226 echo "$as_me:6226: result: no" >&5
6227echo "${ECHO_T}no" >&6
6228fi
6229
6230 test -n "$NCURSES_CONFIG" && break
6231 done
6232fi
6233if test -z "$NCURSES_CONFIG"; then
6234 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6235 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6236do
6237 # Extract the first word of "$ac_prog", so it can be a program name with args.
6238set dummy $ac_prog; ac_word=$2
6239echo "$as_me:6239: checking for $ac_word" >&5
6240echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6241if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6242 echo $ECHO_N "(cached) $ECHO_C" >&6
6243else
6244 if test -n "$ac_ct_NCURSES_CONFIG"; then
6245 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6246else
6247 ac_save_IFS=$IFS; IFS=$ac_path_separator
6248ac_dummy="$PATH"
6249for ac_dir in $ac_dummy; do
6250 IFS=$ac_save_IFS
6251 test -z "$ac_dir" && ac_dir=.
6252 $as_executable_p "$ac_dir/$ac_word" || continue
6253ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6254echo "$as_me:6254: found $ac_dir/$ac_word" >&5
6255break
6256done
6257
6258fi
6259fi
6260ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6261if test -n "$ac_ct_NCURSES_CONFIG"; then
6262 echo "$as_me:6262: result: $ac_ct_NCURSES_CONFIG" >&5
6263echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6264else
6265 echo "$as_me:6265: result: no" >&5
6266echo "${ECHO_T}no" >&6
6267fi
6268
6269 test -n "$ac_ct_NCURSES_CONFIG" && break
6270done
6271test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6272
6273 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6274fi
6275
6276 if test "$NCURSES_CONFIG" != none ; then
6277
6278 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6279
6280cf_add_libs="`$NCURSES_CONFIG --libs`"
6281# Filter out duplicates - this happens with badly-designed ".pc" files...
6282for cf_add_1lib in $LIBS
6283do
6284 for cf_add_2lib in $cf_add_libs
6285 do
6286 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6287 then
6288 cf_add_1lib=
6289 break
6290 fi
6291 done
6292 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6293done
6294LIBS="$cf_add_libs"
6295
6296 # even with config script, some packages use no-override for curses.h
6297
6298echo "$as_me:6298: checking if we have identified curses headers" >&5
6299echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6300if test "${cf_cv_ncurses_header+set}" = set; then
6301 echo $ECHO_N "(cached) $ECHO_C" >&6
6302else
6303
6304cf_cv_ncurses_header=none
6305for cf_header in \
6306 ncurses.h $cf_cv_screen/ncurses.h \
6307 curses.h $cf_cv_screen/curses.h
6308do
6309cat >conftest.$ac_ext <<_ACEOF
6310#line 6310 "configure"
6311#include "confdefs.h"
6312#include <${cf_header}>
6313int
6314main ()
6315{
6316initscr(); tgoto("?", 0,0)
6317 ;
6318 return 0;
6319}
6320_ACEOF
6321rm -f conftest.$ac_objext
6322if { (eval echo "$as_me:6322: \"$ac_compile\"") >&5
6323 (eval $ac_compile) 2>&5
6324 ac_status=$?
6325 echo "$as_me:6325: \$? = $ac_status" >&5
6326 (exit $ac_status); } &&
6327 { ac_try='test -s conftest.$ac_objext'
6328 { (eval echo "$as_me:6328: \"$ac_try\"") >&5
6329 (eval $ac_try) 2>&5
6330 ac_status=$?
6331 echo "$as_me:6331: \$? = $ac_status" >&5
6332 (exit $ac_status); }; }; then
6333 cf_cv_ncurses_header=$cf_header; break
6334else
6335 echo "$as_me: failed program was:" >&5
6336cat conftest.$ac_ext >&5
6337fi
6338rm -f conftest.$ac_objext conftest.$ac_ext
6339done
6340
6341fi
6342echo "$as_me:6342: result: $cf_cv_ncurses_header" >&5
6343echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6344
6345if test "$cf_cv_ncurses_header" = none ; then
6346 { { echo "$as_me:6346: error: No curses header-files found" >&5
6347echo "$as_me: error: No curses header-files found" >&2;}
6348 { (exit 1); exit 1; }; }
6349fi
6350
6351# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6352
6353for ac_header in $cf_cv_ncurses_header
6354do
6355as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6356echo "$as_me:6356: checking for $ac_header" >&5
6357echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6358if eval "test \"\${$as_ac_Header+set}\" = set"; then
6359 echo $ECHO_N "(cached) $ECHO_C" >&6
6360else
6361 cat >conftest.$ac_ext <<_ACEOF
6362#line 6362 "configure"
6363#include "confdefs.h"
6364#include <$ac_header>
6365_ACEOF
6366if { (eval echo "$as_me:6366: \"$ac_cpp conftest.$ac_ext\"") >&5
6367 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6368 ac_status=$?
6369 egrep -v '^ *\+' conftest.er1 >conftest.err
6370 rm -f conftest.er1
6371 cat conftest.err >&5
6372 echo "$as_me:6372: \$? = $ac_status" >&5
6373 (exit $ac_status); } >/dev/null; then
6374 if test -s conftest.err; then
6375 ac_cpp_err=$ac_c_preproc_warn_flag
6376 else
6377 ac_cpp_err=
6378 fi
6379else
6380 ac_cpp_err=yes
6381fi
6382if test -z "$ac_cpp_err"; then
6383 eval "$as_ac_Header=yes"
6384else
6385 echo "$as_me: failed program was:" >&5
6386 cat conftest.$ac_ext >&5
6387 eval "$as_ac_Header=no"
6388fi
6389rm -f conftest.err conftest.$ac_ext
6390fi
6391echo "$as_me:6391: result: `eval echo '${'$as_ac_Header'}'`" >&5
6392echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6393if test `eval echo '${'$as_ac_Header'}'` = yes; then
6394 cat >>confdefs.h <<EOF
6395#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6396EOF
6397
6398fi
6399done
6400
6401cat >>confdefs.h <<\EOF
6402#define NCURSES 1
6403EOF
6404
6405cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6406
6407 cat >>confdefs.h <<EOF
6408#define $cf_nculib_ROOT 1
6409EOF
6410
6411 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6412
6413 else
6414
6415cf_ncuhdr_root=$cf_cv_screen
6416
6417test -n "$cf_cv_curses_dir" && \
6418test "$cf_cv_curses_dir" != "no" && { \
6419
6420if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6421 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6422 do
6423 while test $cf_add_incdir != /usr/include
6424 do
6425 if test -d $cf_add_incdir
6426 then
6427 cf_have_incdir=no
6428 if test -n "$CFLAGS$CPPFLAGS" ; then
6429 # a loop is needed to ensure we can add subdirs of existing dirs
6430 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6431 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6432 cf_have_incdir=yes; break
6433 fi
6434 done
6435 fi
6436
6437 if test "$cf_have_incdir" = no ; then
6438 if test "$cf_add_incdir" = /usr/local/include ; then
6439 if test "$GCC" = yes
6440 then
6441 cf_save_CPPFLAGS=$CPPFLAGS
6442 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6443 cat >conftest.$ac_ext <<_ACEOF
6444#line 6444 "configure"
6445#include "confdefs.h"
6446#include <stdio.h>
6447int
6448main ()
6449{
6450printf("Hello")
6451 ;
6452 return 0;
6453}
6454_ACEOF
6455rm -f conftest.$ac_objext
6456if { (eval echo "$as_me:6456: \"$ac_compile\"") >&5
6457 (eval $ac_compile) 2>&5
6458 ac_status=$?
6459 echo "$as_me:6459: \$? = $ac_status" >&5
6460 (exit $ac_status); } &&
6461 { ac_try='test -s conftest.$ac_objext'
6462 { (eval echo "$as_me:6462: \"$ac_try\"") >&5
6463 (eval $ac_try) 2>&5
6464 ac_status=$?
6465 echo "$as_me:6465: \$? = $ac_status" >&5
6466 (exit $ac_status); }; }; then
6467 :
6468else
6469 echo "$as_me: failed program was:" >&5
6470cat conftest.$ac_ext >&5
6471cf_have_incdir=yes
6472fi
6473rm -f conftest.$ac_objext conftest.$ac_ext
6474 CPPFLAGS=$cf_save_CPPFLAGS
6475 fi
6476 fi
6477 fi
6478
6479 if test "$cf_have_incdir" = no ; then
6480 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6481
6482echo "${as_me:-configure}:6482: testing adding $cf_add_incdir to include-path ..." 1>&5
6483
6484 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6485
6486 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6487 test "$cf_top_incdir" = "$cf_add_incdir" && break
6488 cf_add_incdir="$cf_top_incdir"
6489 else
6490 break
6491 fi
6492 else
6493 break
6494 fi
6495 done
6496 done
6497fi
6498
6499}
6500
6501echo "$as_me:6501: checking for $cf_ncuhdr_root header in include-path" >&5
6502echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6503if test "${cf_cv_ncurses_h+set}" = set; then
6504 echo $ECHO_N "(cached) $ECHO_C" >&6
6505else
6506
6507 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6508 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6509 for cf_header in $cf_header_list
6510 do
6511
6512 cat >conftest.$ac_ext <<_ACEOF
6513#line 6513 "configure"
6514#include "confdefs.h"
6515
6516#include <$cf_header>
6517int
6518main ()
6519{
6520
6521#ifdef NCURSES_VERSION
6522
6523printf("%s\n", NCURSES_VERSION);
6524#else
6525#ifdef __NCURSES_H
6526printf("old\n");
6527#else
6528 make an error
6529#endif
6530#endif
6531
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536rm -f conftest.$ac_objext
6537if { (eval echo "$as_me:6537: \"$ac_compile\"") >&5
6538 (eval $ac_compile) 2>&5
6539 ac_status=$?
6540 echo "$as_me:6540: \$? = $ac_status" >&5
6541 (exit $ac_status); } &&
6542 { ac_try='test -s conftest.$ac_objext'
6543 { (eval echo "$as_me:6543: \"$ac_try\"") >&5
6544 (eval $ac_try) 2>&5
6545 ac_status=$?
6546 echo "$as_me:6546: \$? = $ac_status" >&5
6547 (exit $ac_status); }; }; then
6548 cf_cv_ncurses_h=$cf_header
6549
6550else
6551 echo "$as_me: failed program was:" >&5
6552cat conftest.$ac_ext >&5
6553cf_cv_ncurses_h=no
6554fi
6555rm -f conftest.$ac_objext conftest.$ac_ext
6556
6557 test "$cf_cv_ncurses_h" != no && break
6558 done
6559
6560fi
6561echo "$as_me:6561: result: $cf_cv_ncurses_h" >&5
6562echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6563
6564if test "$cf_cv_ncurses_h" != no ; then
6565 cf_cv_ncurses_header=$cf_cv_ncurses_h
6566else
6567
6568echo "$as_me:6568: checking for $cf_ncuhdr_root include-path" >&5
6569echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6570if test "${cf_cv_ncurses_h2+set}" = set; then
6571 echo $ECHO_N "(cached) $ECHO_C" >&6
6572else
6573
6574 test -n "$verbose" && echo
6575
6576cf_search=
6577
6578# collect the current set of include-directories from compiler flags
6579cf_header_path_list=""
6580if test -n "${CFLAGS}${CPPFLAGS}" ; then
6581 for cf_header_path in $CPPFLAGS $CFLAGS
6582 do
6583 case $cf_header_path in
6584 (-I*)
6585 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6586
6587test "x$cf_header_path" != "xNONE" && \
6588test -d "$cf_header_path" && \
6589 {
6590 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6591 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6592 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6593 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6594 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6595 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"
6596}
6597
6598 cf_header_path_list="$cf_header_path_list $cf_search"
6599 ;;
6600 esac
6601 done
6602fi
6603
6604# add the variations for the package we are looking for
6605
6606cf_search=
6607
6608test "x$prefix" != "xNONE" && \
6609test -d "$prefix" && \
6610 {
6611 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6612 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6613 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6614 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6615 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6616 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6617}
6618
6619for cf_subdir_prefix in \
6620 /usr \
6621 /usr/local \
6622 /usr/pkg \
6623 /opt \
6624 /opt/local \
6625 $HOME
6626do
6627
6628test "x$cf_subdir_prefix" != "x$prefix" && \
6629test -d "$cf_subdir_prefix" && \
6630(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6631 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6632 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6633 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6634 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6635 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6636 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"
6637}
6638
6639done
6640
6641test "$includedir" != NONE && \
6642test "$includedir" != "/usr/include" && \
6643test -d "$includedir" && {
6644 test -d $includedir && cf_search="$cf_search $includedir"
6645 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6646}
6647
6648test "$oldincludedir" != NONE && \
6649test "$oldincludedir" != "/usr/include" && \
6650test -d "$oldincludedir" && {
6651 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6652 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6653}
6654
6655cf_search="$cf_search $cf_header_path_list"
6656
6657 test -n "$verbose" && echo search path $cf_search
6658 cf_save2_CPPFLAGS="$CPPFLAGS"
6659 for cf_incdir in $cf_search
6660 do
6661
6662if test -n "$cf_incdir" ; then
6663 for cf_add_incdir in $cf_incdir
6664 do
6665 while test $cf_add_incdir != /usr/include
6666 do
6667 if test -d $cf_add_incdir
6668 then
6669 cf_have_incdir=no
6670 if test -n "$CFLAGS$CPPFLAGS" ; then
6671 # a loop is needed to ensure we can add subdirs of existing dirs
6672 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6673 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6674 cf_have_incdir=yes; break
6675 fi
6676 done
6677 fi
6678
6679 if test "$cf_have_incdir" = no ; then
6680 if test "$cf_add_incdir" = /usr/local/include ; then
6681 if test "$GCC" = yes
6682 then
6683 cf_save_CPPFLAGS=$CPPFLAGS
6684 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6685 cat >conftest.$ac_ext <<_ACEOF
6686#line 6686 "configure"
6687#include "confdefs.h"
6688#include <stdio.h>
6689int
6690main ()
6691{
6692printf("Hello")
6693 ;
6694 return 0;
6695}
6696_ACEOF
6697rm -f conftest.$ac_objext
6698if { (eval echo "$as_me:6698: \"$ac_compile\"") >&5
6699 (eval $ac_compile) 2>&5
6700 ac_status=$?
6701 echo "$as_me:6701: \$? = $ac_status" >&5
6702 (exit $ac_status); } &&
6703 { ac_try='test -s conftest.$ac_objext'
6704 { (eval echo "$as_me:6704: \"$ac_try\"") >&5
6705 (eval $ac_try) 2>&5
6706 ac_status=$?
6707 echo "$as_me:6707: \$? = $ac_status" >&5
6708 (exit $ac_status); }; }; then
6709 :
6710else
6711 echo "$as_me: failed program was:" >&5
6712cat conftest.$ac_ext >&5
6713cf_have_incdir=yes
6714fi
6715rm -f conftest.$ac_objext conftest.$ac_ext
6716 CPPFLAGS=$cf_save_CPPFLAGS
6717 fi
6718 fi
6719 fi
6720
6721 if test "$cf_have_incdir" = no ; then
6722 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6723
6724echo "${as_me:-configure}:6724: testing adding $cf_add_incdir to include-path ..." 1>&5
6725
6726 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6727
6728 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6729 test "$cf_top_incdir" = "$cf_add_incdir" && break
6730 cf_add_incdir="$cf_top_incdir"
6731 else
6732 break
6733 fi
6734 else
6735 break
6736 fi
6737 done
6738 done
6739fi
6740
6741 for cf_header in \
6742 ncurses.h \
6743 curses.h
6744 do
6745
6746 cat >conftest.$ac_ext <<_ACEOF
6747#line 6747 "configure"
6748#include "confdefs.h"
6749
6750#include <$cf_header>
6751int
6752main ()
6753{
6754
6755#ifdef NCURSES_VERSION
6756
6757printf("%s\n", NCURSES_VERSION);
6758#else
6759#ifdef __NCURSES_H
6760printf("old\n");
6761#else
6762 make an error
6763#endif
6764#endif
6765
6766 ;
6767 return 0;
6768}
6769_ACEOF
6770rm -f conftest.$ac_objext
6771if { (eval echo "$as_me:6771: \"$ac_compile\"") >&5
6772 (eval $ac_compile) 2>&5
6773 ac_status=$?
6774 echo "$as_me:6774: \$? = $ac_status" >&5
6775 (exit $ac_status); } &&
6776 { ac_try='test -s conftest.$ac_objext'
6777 { (eval echo "$as_me:6777: \"$ac_try\"") >&5
6778 (eval $ac_try) 2>&5
6779 ac_status=$?
6780 echo "$as_me:6780: \$? = $ac_status" >&5
6781 (exit $ac_status); }; }; then
6782 cf_cv_ncurses_h2=$cf_header
6783
6784else
6785 echo "$as_me: failed program was:" >&5
6786cat conftest.$ac_ext >&5
6787cf_cv_ncurses_h2=no
6788fi
6789rm -f conftest.$ac_objext conftest.$ac_ext
6790
6791 if test "$cf_cv_ncurses_h2" != no ; then
6792 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6793 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6794 break
6795 fi
6796 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6797 done
6798 CPPFLAGS="$cf_save2_CPPFLAGS"
6799 test "$cf_cv_ncurses_h2" != no && break
6800 done
6801 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6801: error: not found" >&5
6802echo "$as_me: error: not found" >&2;}
6803 { (exit 1); exit 1; }; }
6804
6805fi
6806echo "$as_me:6806: result: $cf_cv_ncurses_h2" >&5
6807echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6808
6809 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6810 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6811 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6812 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6813 fi
6814
6815if test -n "$cf_1st_incdir" ; then
6816 for cf_add_incdir in $cf_1st_incdir
6817 do
6818 while test $cf_add_incdir != /usr/include
6819 do
6820 if test -d $cf_add_incdir
6821 then
6822 cf_have_incdir=no
6823 if test -n "$CFLAGS$CPPFLAGS" ; then
6824 # a loop is needed to ensure we can add subdirs of existing dirs
6825 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6826 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6827 cf_have_incdir=yes; break
6828 fi
6829 done
6830 fi
6831
6832 if test "$cf_have_incdir" = no ; then
6833 if test "$cf_add_incdir" = /usr/local/include ; then
6834 if test "$GCC" = yes
6835 then
6836 cf_save_CPPFLAGS=$CPPFLAGS
6837 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6838 cat >conftest.$ac_ext <<_ACEOF
6839#line 6839 "configure"
6840#include "confdefs.h"
6841#include <stdio.h>
6842int
6843main ()
6844{
6845printf("Hello")
6846 ;
6847 return 0;
6848}
6849_ACEOF
6850rm -f conftest.$ac_objext
6851if { (eval echo "$as_me:6851: \"$ac_compile\"") >&5
6852 (eval $ac_compile) 2>&5
6853 ac_status=$?
6854 echo "$as_me:6854: \$? = $ac_status" >&5
6855 (exit $ac_status); } &&
6856 { ac_try='test -s conftest.$ac_objext'
6857 { (eval echo "$as_me:6857: \"$ac_try\"") >&5
6858 (eval $ac_try) 2>&5
6859 ac_status=$?
6860 echo "$as_me:6860: \$? = $ac_status" >&5
6861 (exit $ac_status); }; }; then
6862 :
6863else
6864 echo "$as_me: failed program was:" >&5
6865cat conftest.$ac_ext >&5
6866cf_have_incdir=yes
6867fi
6868rm -f conftest.$ac_objext conftest.$ac_ext
6869 CPPFLAGS=$cf_save_CPPFLAGS
6870 fi
6871 fi
6872 fi
6873
6874 if test "$cf_have_incdir" = no ; then
6875 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6876
6877echo "${as_me:-configure}:6877: testing adding $cf_add_incdir to include-path ..." 1>&5
6878
6879 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6880
6881 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6882 test "$cf_top_incdir" = "$cf_add_incdir" && break
6883 cf_add_incdir="$cf_top_incdir"
6884 else
6885 break
6886 fi
6887 else
6888 break
6889 fi
6890 done
6891 done
6892fi
6893
6894fi
6895
6896# Set definitions to allow ifdef'ing for ncurses.h
6897
6898case $cf_cv_ncurses_header in
6899(*ncurses.h)
6900
6901cat >>confdefs.h <<\EOF
6902#define HAVE_NCURSES_H 1
6903EOF
6904
6905 ;;
6906esac
6907
6908case $cf_cv_ncurses_header in
6909(ncurses/curses.h|ncurses/ncurses.h)
6910
6911cat >>confdefs.h <<\EOF
6912#define HAVE_NCURSES_NCURSES_H 1
6913EOF
6914
6915 ;;
6916(ncursesw/curses.h|ncursesw/ncurses.h)
6917
6918cat >>confdefs.h <<\EOF
6919#define HAVE_NCURSESW_NCURSES_H 1
6920EOF
6921
6922 ;;
6923esac
6924
6925echo "$as_me:6925: checking for terminfo header" >&5
6926echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6927if test "${cf_cv_term_header+set}" = set; then
6928 echo $ECHO_N "(cached) $ECHO_C" >&6
6929else
6930
6931case ${cf_cv_ncurses_header} in
6932(*/ncurses.h|*/ncursesw.h)
6933 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6934 ;;
6935(*)
6936 cf_term_header=term.h
6937 ;;
6938esac
6939
6940for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6941do
6942cat >conftest.$ac_ext <<_ACEOF
6943#line 6943 "configure"
6944#include "confdefs.h"
6945#include <stdio.h>
6946#include <${cf_cv_ncurses_header:-curses.h}>
6947#include <$cf_test>
6948
6949int
6950main ()
6951{
6952int x = auto_left_margin
6953 ;
6954 return 0;
6955}
6956_ACEOF
6957rm -f conftest.$ac_objext
6958if { (eval echo "$as_me:6958: \"$ac_compile\"") >&5
6959 (eval $ac_compile) 2>&5
6960 ac_status=$?
6961 echo "$as_me:6961: \$? = $ac_status" >&5
6962 (exit $ac_status); } &&
6963 { ac_try='test -s conftest.$ac_objext'
6964 { (eval echo "$as_me:6964: \"$ac_try\"") >&5
6965 (eval $ac_try) 2>&5
6966 ac_status=$?
6967 echo "$as_me:6967: \$? = $ac_status" >&5
6968 (exit $ac_status); }; }; then
6969
6970 cf_cv_term_header="$cf_test"
6971else
6972 echo "$as_me: failed program was:" >&5
6973cat conftest.$ac_ext >&5
6974
6975 cf_cv_term_header=unknown
6976
6977fi
6978rm -f conftest.$ac_objext conftest.$ac_ext
6979 test "$cf_cv_term_header" != unknown && break
6980done
6981
6982fi
6983echo "$as_me:6983: result: $cf_cv_term_header" >&5
6984echo "${ECHO_T}$cf_cv_term_header" >&6
6985
6986# Set definitions to allow ifdef'ing to accommodate subdirectories
6987
6988case $cf_cv_term_header in
6989(*term.h)
6990
6991cat >>confdefs.h <<\EOF
6992#define HAVE_TERM_H 1
6993EOF
6994
6995 ;;
6996esac
6997
6998case $cf_cv_term_header in
6999(ncurses/term.h)
7000
7001cat >>confdefs.h <<\EOF
7002#define HAVE_NCURSES_TERM_H 1
7003EOF
7004
7005 ;;
7006(ncursesw/term.h)
7007
7008cat >>confdefs.h <<\EOF
7009#define HAVE_NCURSESW_TERM_H 1
7010EOF
7011
7012 ;;
7013esac
7014
7015# some applications need this, but should check for NCURSES_VERSION
7016
7017cat >>confdefs.h <<\EOF
7018#define NCURSES 1
7019EOF
7020
7021echo "$as_me:7021: checking for ncurses version" >&5
7022echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7023if test "${cf_cv_ncurses_version+set}" = set; then
7024 echo $ECHO_N "(cached) $ECHO_C" >&6
7025else
7026
7027 cf_cv_ncurses_version=no
7028 cf_tempfile=out$$
7029 rm -f $cf_tempfile
7030 if test "$cross_compiling" = yes; then
7031
7032 # This will not work if the preprocessor splits the line after the
7033 # Autoconf token. The 'unproto' program does that.
7034 cat > conftest.$ac_ext <<EOF
7035#include <${cf_cv_ncurses_header:-curses.h}>
7036#undef Autoconf
7037#ifdef NCURSES_VERSION
7038Autoconf NCURSES_VERSION
7039#else
7040#ifdef __NCURSES_H
7041Autoconf "old"
7042#endif
7043;
7044#endif
7045EOF
7046 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7047 { (eval echo "$as_me:7047: \"$cf_try\"") >&5
7048 (eval $cf_try) 2>&5
7049 ac_status=$?
7050 echo "$as_me:7050: \$? = $ac_status" >&5
7051 (exit $ac_status); }
7052 if test -f conftest.out ; then
7053 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7054 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7055 rm -f conftest.out
7056 fi
7057
7058else
7059 cat >conftest.$ac_ext <<_ACEOF
7060#line 7060 "configure"
7061#include "confdefs.h"
7062
7063#include <${cf_cv_ncurses_header:-curses.h}>
7064#include <stdio.h>
7065int main()
7066{
7067 FILE *fp = fopen("$cf_tempfile", "w");
7068#ifdef NCURSES_VERSION
7069# ifdef NCURSES_VERSION_PATCH
7070 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7071# else
7072 fprintf(fp, "%s\n", NCURSES_VERSION);
7073# endif
7074#else
7075# ifdef __NCURSES_H
7076 fprintf(fp, "old\n");
7077# else
7078 make an error
7079# endif
7080#endif
7081 ${cf_cv_main_return:-return}(0);
7082}
7083_ACEOF
7084rm -f conftest$ac_exeext
7085if { (eval echo "$as_me:7085: \"$ac_link\"") >&5
7086 (eval $ac_link) 2>&5
7087 ac_status=$?
7088 echo "$as_me:7088: \$? = $ac_status" >&5
7089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7090 { (eval echo "$as_me:7090: \"$ac_try\"") >&5
7091 (eval $ac_try) 2>&5
7092 ac_status=$?
7093 echo "$as_me:7093: \$? = $ac_status" >&5
7094 (exit $ac_status); }; }; then
7095
7096 cf_cv_ncurses_version=`cat $cf_tempfile`
7097else
7098 echo "$as_me: program exited with status $ac_status" >&5
7099echo "$as_me: failed program was:" >&5
7100cat conftest.$ac_ext >&5
7101fi
7102rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7103fi
7104 rm -f $cf_tempfile
7105
7106fi
7107echo "$as_me:7107: result: $cf_cv_ncurses_version" >&5
7108echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7109test "$cf_cv_ncurses_version" = no ||
7110cat >>confdefs.h <<\EOF
7111#define NCURSES 1
7112EOF
7113
7114cf_nculib_root=$cf_cv_screen
7115 # This works, except for the special case where we find gpm, but
7116 # ncurses is in a nonstandard location via $LIBS, and we really want
7117 # to link gpm.
7118cf_ncurses_LIBS=""
7119cf_ncurses_SAVE="$LIBS"
7120echo "$as_me:7120: checking for Gpm_Open in -lgpm" >&5
7121echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7122if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7123 echo $ECHO_N "(cached) $ECHO_C" >&6
7124else
7125 ac_check_lib_save_LIBS=$LIBS
7126LIBS="-lgpm $LIBS"
7127cat >conftest.$ac_ext <<_ACEOF
7128#line 7128 "configure"
7129#include "confdefs.h"
7130
7131/* Override any gcc2 internal prototype to avoid an error. */
7132#ifdef __cplusplus
7133extern "C"
7134#endif
7135/* We use char because int might match the return type of a gcc2
7136 builtin and then its argument prototype would still apply. */
7137char Gpm_Open ();
7138int
7139main ()
7140{
7141Gpm_Open ();
7142 ;
7143 return 0;
7144}
7145_ACEOF
7146rm -f conftest.$ac_objext conftest$ac_exeext
7147if { (eval echo "$as_me:7147: \"$ac_link\"") >&5
7148 (eval $ac_link) 2>&5
7149 ac_status=$?
7150 echo "$as_me:7150: \$? = $ac_status" >&5
7151 (exit $ac_status); } &&
7152 { ac_try='test -s conftest$ac_exeext'
7153 { (eval echo "$as_me:7153: \"$ac_try\"") >&5
7154 (eval $ac_try) 2>&5
7155 ac_status=$?
7156 echo "$as_me:7156: \$? = $ac_status" >&5
7157 (exit $ac_status); }; }; then
7158 ac_cv_lib_gpm_Gpm_Open=yes
7159else
7160 echo "$as_me: failed program was:" >&5
7161cat conftest.$ac_ext >&5
7162ac_cv_lib_gpm_Gpm_Open=no
7163fi
7164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7165LIBS=$ac_check_lib_save_LIBS
7166fi
7167echo "$as_me:7167: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7168echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7169if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7170 echo "$as_me:7170: checking for initscr in -lgpm" >&5
7171echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7172if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7173 echo $ECHO_N "(cached) $ECHO_C" >&6
7174else
7175 ac_check_lib_save_LIBS=$LIBS
7176LIBS="-lgpm $LIBS"
7177cat >conftest.$ac_ext <<_ACEOF
7178#line 7178 "configure"
7179#include "confdefs.h"
7180
7181/* Override any gcc2 internal prototype to avoid an error. */
7182#ifdef __cplusplus
7183extern "C"
7184#endif
7185/* We use char because int might match the return type of a gcc2
7186 builtin and then its argument prototype would still apply. */
7187char initscr ();
7188int
7189main ()
7190{
7191initscr ();
7192 ;
7193 return 0;
7194}
7195_ACEOF
7196rm -f conftest.$ac_objext conftest$ac_exeext
7197if { (eval echo "$as_me:7197: \"$ac_link\"") >&5
7198 (eval $ac_link) 2>&5
7199 ac_status=$?
7200 echo "$as_me:7200: \$? = $ac_status" >&5
7201 (exit $ac_status); } &&
7202 { ac_try='test -s conftest$ac_exeext'
7203 { (eval echo "$as_me:7203: \"$ac_try\"") >&5
7204 (eval $ac_try) 2>&5
7205 ac_status=$?
7206 echo "$as_me:7206: \$? = $ac_status" >&5
7207 (exit $ac_status); }; }; then
7208 ac_cv_lib_gpm_initscr=yes
7209else
7210 echo "$as_me: failed program was:" >&5
7211cat conftest.$ac_ext >&5
7212ac_cv_lib_gpm_initscr=no
7213fi
7214rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7215LIBS=$ac_check_lib_save_LIBS
7216fi
7217echo "$as_me:7217: result: $ac_cv_lib_gpm_initscr" >&5
7218echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7219if test $ac_cv_lib_gpm_initscr = yes; then
7220 LIBS="$cf_ncurses_SAVE"
7221else
7222 cf_ncurses_LIBS="-lgpm"
7223fi
7224
7225fi
7226
7227case $host_os in
7228(freebsd*)
7229 # This is only necessary if you are linking against an obsolete
7230 # version of ncurses (but it should do no harm, since it's static).
7231 if test "$cf_nculib_root" = ncurses ; then
7232 echo "$as_me:7232: checking for tgoto in -lmytinfo" >&5
7233echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7234if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7235 echo $ECHO_N "(cached) $ECHO_C" >&6
7236else
7237 ac_check_lib_save_LIBS=$LIBS
7238LIBS="-lmytinfo $LIBS"
7239cat >conftest.$ac_ext <<_ACEOF
7240#line 7240 "configure"
7241#include "confdefs.h"
7242
7243/* Override any gcc2 internal prototype to avoid an error. */
7244#ifdef __cplusplus
7245extern "C"
7246#endif
7247/* We use char because int might match the return type of a gcc2
7248 builtin and then its argument prototype would still apply. */
7249char tgoto ();
7250int
7251main ()
7252{
7253tgoto ();
7254 ;
7255 return 0;
7256}
7257_ACEOF
7258rm -f conftest.$ac_objext conftest$ac_exeext
7259if { (eval echo "$as_me:7259: \"$ac_link\"") >&5
7260 (eval $ac_link) 2>&5
7261 ac_status=$?
7262 echo "$as_me:7262: \$? = $ac_status" >&5
7263 (exit $ac_status); } &&
7264 { ac_try='test -s conftest$ac_exeext'
7265 { (eval echo "$as_me:7265: \"$ac_try\"") >&5
7266 (eval $ac_try) 2>&5
7267 ac_status=$?
7268 echo "$as_me:7268: \$? = $ac_status" >&5
7269 (exit $ac_status); }; }; then
7270 ac_cv_lib_mytinfo_tgoto=yes
7271else
7272 echo "$as_me: failed program was:" >&5
7273cat conftest.$ac_ext >&5
7274ac_cv_lib_mytinfo_tgoto=no
7275fi
7276rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7277LIBS=$ac_check_lib_save_LIBS
7278fi
7279echo "$as_me:7279: result: $ac_cv_lib_mytinfo_tgoto" >&5
7280echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7281if test $ac_cv_lib_mytinfo_tgoto = yes; then
7282 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7283fi
7284
7285 fi
7286 ;;
7287esac
7288
7289cf_add_libs="$cf_ncurses_LIBS"
7290# Filter out duplicates - this happens with badly-designed ".pc" files...
7291for cf_add_1lib in $LIBS
7292do
7293 for cf_add_2lib in $cf_add_libs
7294 do
7295 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7296 then
7297 cf_add_1lib=
7298 break
7299 fi
7300 done
7301 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7302done
7303LIBS="$cf_add_libs"
7304
7305if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7306then
7307
7308cf_add_libs="-l$cf_nculib_root"
7309# Filter out duplicates - this happens with badly-designed ".pc" files...
7310for cf_add_1lib in $LIBS
7311do
7312 for cf_add_2lib in $cf_add_libs
7313 do
7314 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7315 then
7316 cf_add_1lib=
7317 break
7318 fi
7319 done
7320 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7321done
7322LIBS="$cf_add_libs"
7323
7324else
7325
7326 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7327 cf_libdir=""
7328 echo "$as_me:7328: checking for initscr" >&5
7329echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7330if test "${ac_cv_func_initscr+set}" = set; then
7331 echo $ECHO_N "(cached) $ECHO_C" >&6
7332else
7333 cat >conftest.$ac_ext <<_ACEOF
7334#line 7334 "configure"
7335#include "confdefs.h"
7336/* System header to define __stub macros and hopefully few prototypes,
7337 which can conflict with char initscr (); below. */
7338#include <assert.h>
7339/* Override any gcc2 internal prototype to avoid an error. */
7340#ifdef __cplusplus
7341extern "C"
7342#endif
7343/* We use char because int might match the return type of a gcc2
7344 builtin and then its argument prototype would still apply. */
7345char initscr ();
7346char (*f) ();
7347
7348int
7349main ()
7350{
7351/* The GNU C library defines this for functions which it implements
7352 to always fail with ENOSYS. Some functions are actually named
7353 something starting with __ and the normal name is an alias. */
7354#if defined (__stub_initscr) || defined (__stub___initscr)
7355choke me
7356#else
7357f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7358#endif
7359
7360 ;
7361 return 0;
7362}
7363_ACEOF
7364rm -f conftest.$ac_objext conftest$ac_exeext
7365if { (eval echo "$as_me:7365: \"$ac_link\"") >&5
7366 (eval $ac_link) 2>&5
7367 ac_status=$?
7368 echo "$as_me:7368: \$? = $ac_status" >&5
7369 (exit $ac_status); } &&
7370 { ac_try='test -s conftest$ac_exeext'
7371 { (eval echo "$as_me:7371: \"$ac_try\"") >&5
7372 (eval $ac_try) 2>&5
7373 ac_status=$?
7374 echo "$as_me:7374: \$? = $ac_status" >&5
7375 (exit $ac_status); }; }; then
7376 ac_cv_func_initscr=yes
7377else
7378 echo "$as_me: failed program was:" >&5
7379cat conftest.$ac_ext >&5
7380ac_cv_func_initscr=no
7381fi
7382rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7383fi
7384echo "$as_me:7384: result: $ac_cv_func_initscr" >&5
7385echo "${ECHO_T}$ac_cv_func_initscr" >&6
7386if test $ac_cv_func_initscr = yes; then
7387 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7388else
7389
7390 cf_save_LIBS="$LIBS"
7391 echo "$as_me:7391: checking for initscr in -l$cf_nculib_root" >&5
7392echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7393 LIBS="-l$cf_nculib_root $LIBS"
7394 cat >conftest.$ac_ext <<_ACEOF
7395#line 7395 "configure"
7396#include "confdefs.h"
7397#include <${cf_cv_ncurses_header:-curses.h}>
7398int
7399main ()
7400{
7401initscr()
7402 ;
7403 return 0;
7404}
7405_ACEOF
7406rm -f conftest.$ac_objext conftest$ac_exeext
7407if { (eval echo "$as_me:7407: \"$ac_link\"") >&5
7408 (eval $ac_link) 2>&5
7409 ac_status=$?
7410 echo "$as_me:7410: \$? = $ac_status" >&5
7411 (exit $ac_status); } &&
7412 { ac_try='test -s conftest$ac_exeext'
7413 { (eval echo "$as_me:7413: \"$ac_try\"") >&5
7414 (eval $ac_try) 2>&5
7415 ac_status=$?
7416 echo "$as_me:7416: \$? = $ac_status" >&5
7417 (exit $ac_status); }; }; then
7418 echo "$as_me:7418: result: yes" >&5
7419echo "${ECHO_T}yes" >&6
7420 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7421
7422else
7423 echo "$as_me: failed program was:" >&5
7424cat conftest.$ac_ext >&5
7425echo "$as_me:7425: result: no" >&5
7426echo "${ECHO_T}no" >&6
7427
7428cf_search=
7429cf_library_path_list=""
7430if test -n "${LDFLAGS}${LIBS}" ; then
7431 for cf_library_path in $LDFLAGS $LIBS
7432 do
7433 case $cf_library_path in
7434 (-L*)
7435 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7436
7437test "x$cf_library_path" != "xNONE" && \
7438test -d "$cf_library_path" && \
7439 {
7440 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7441 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7442 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7443 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7444 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7445 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"
7446}
7447
7448 cf_library_path_list="$cf_library_path_list $cf_search"
7449 ;;
7450 esac
7451 done
7452fi
7453
7454cf_search=
7455
7456test "x$prefix" != "xNONE" && \
7457test -d "$prefix" && \
7458 {
7459 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7460 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7461 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7462 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7463 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7464 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7465}
7466
7467for cf_subdir_prefix in \
7468 /usr \
7469 /usr/local \
7470 /usr/pkg \
7471 /opt \
7472 /opt/local \
7473 $HOME
7474do
7475
7476test "x$cf_subdir_prefix" != "x$prefix" && \
7477test -d "$cf_subdir_prefix" && \
7478(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7479 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7480 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7481 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7482 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7483 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7484 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"
7485}
7486
7487done
7488
7489cf_search="$cf_library_path_list $cf_search"
7490
7491 for cf_libdir in $cf_search
7492 do
7493 echo "$as_me:7493: checking for -l$cf_nculib_root in $cf_libdir" >&5
7494echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7495 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7496 cat >conftest.$ac_ext <<_ACEOF
7497#line 7497 "configure"
7498#include "confdefs.h"
7499#include <${cf_cv_ncurses_header:-curses.h}>
7500int
7501main ()
7502{
7503initscr()
7504 ;
7505 return 0;
7506}
7507_ACEOF
7508rm -f conftest.$ac_objext conftest$ac_exeext
7509if { (eval echo "$as_me:7509: \"$ac_link\"") >&5
7510 (eval $ac_link) 2>&5
7511 ac_status=$?
7512 echo "$as_me:7512: \$? = $ac_status" >&5
7513 (exit $ac_status); } &&
7514 { ac_try='test -s conftest$ac_exeext'
7515 { (eval echo "$as_me:7515: \"$ac_try\"") >&5
7516 (eval $ac_try) 2>&5
7517 ac_status=$?
7518 echo "$as_me:7518: \$? = $ac_status" >&5
7519 (exit $ac_status); }; }; then
7520 echo "$as_me:7520: result: yes" >&5
7521echo "${ECHO_T}yes" >&6
7522 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7523 break
7524else
7525 echo "$as_me: failed program was:" >&5
7526cat conftest.$ac_ext >&5
7527echo "$as_me:7527: result: no" >&5
7528echo "${ECHO_T}no" >&6
7529 LIBS="$cf_save_LIBS"
7530fi
7531rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7532 done
7533
7534fi
7535rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7536
7537fi
7538
7539eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7540
7541if test $cf_found_library = no ; then
7542 { { echo "$as_me:7542: error: Cannot link $cf_nculib_root library" >&5
7543echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7544 { (exit 1); exit 1; }; }
7545fi
7546
7547fi
7548
7549if test -n "$cf_ncurses_LIBS" ; then
7550 echo "$as_me:7550: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7551echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7552 cf_ncurses_SAVE="$LIBS"
7553 for p in $cf_ncurses_LIBS ; do
7554 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7555 if test "$q" != "$LIBS" ; then
7556 LIBS="$q"
7557 fi
7558 done
7559 cat >conftest.$ac_ext <<_ACEOF
7560#line 7560 "configure"
7561#include "confdefs.h"
7562#include <${cf_cv_ncurses_header:-curses.h}>
7563int
7564main ()
7565{
7566initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7567 ;
7568 return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext conftest$ac_exeext
7572if { (eval echo "$as_me:7572: \"$ac_link\"") >&5
7573 (eval $ac_link) 2>&5
7574 ac_status=$?
7575 echo "$as_me:7575: \$? = $ac_status" >&5
7576 (exit $ac_status); } &&
7577 { ac_try='test -s conftest$ac_exeext'
7578 { (eval echo "$as_me:7578: \"$ac_try\"") >&5
7579 (eval $ac_try) 2>&5
7580 ac_status=$?
7581 echo "$as_me:7581: \$? = $ac_status" >&5
7582 (exit $ac_status); }; }; then
7583 echo "$as_me:7583: result: yes" >&5
7584echo "${ECHO_T}yes" >&6
7585else
7586 echo "$as_me: failed program was:" >&5
7587cat conftest.$ac_ext >&5
7588echo "$as_me:7588: result: no" >&5
7589echo "${ECHO_T}no" >&6
7590 LIBS="$cf_ncurses_SAVE"
7591fi
7592rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7593fi
7594
7595cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7596
7597cat >>confdefs.h <<EOF
7598#define $cf_nculib_ROOT 1
7599EOF
7600
7601 fi
7602else
7603 NCURSES_CONFIG=none
7604fi
7605
7606 ;;
7607(ncurses*)
7608
7609cf_ncuconfig_root=$cf_cv_screen
7610cf_have_ncuconfig=no
7611
7612if test "x${PKG_CONFIG:=none}" != xnone; then
7613 echo "$as_me:7613: checking pkg-config for $cf_ncuconfig_root" >&5
7614echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7615 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7616 echo "$as_me:7616: result: yes" >&5
7617echo "${ECHO_T}yes" >&6
7618
7619 echo "$as_me:7619: checking if the $cf_ncuconfig_root package files work" >&5
7620echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7621 cf_have_ncuconfig=unknown
7622
7623 cf_save_CPPFLAGS="$CPPFLAGS"
7624 cf_save_LIBS="$LIBS"
7625
7626 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7627
7628cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7629# Filter out duplicates - this happens with badly-designed ".pc" files...
7630for cf_add_1lib in $LIBS
7631do
7632 for cf_add_2lib in $cf_add_libs
7633 do
7634 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7635 then
7636 cf_add_1lib=
7637 break
7638 fi
7639 done
7640 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7641done
7642LIBS="$cf_add_libs"
7643
7644 cat >conftest.$ac_ext <<_ACEOF
7645#line 7645 "configure"
7646#include "confdefs.h"
7647#include <${cf_cv_ncurses_header:-curses.h}>
7648int
7649main ()
7650{
7651initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7652 ;
7653 return 0;
7654}
7655_ACEOF
7656rm -f conftest.$ac_objext conftest$ac_exeext
7657if { (eval echo "$as_me:7657: \"$ac_link\"") >&5
7658 (eval $ac_link) 2>&5
7659 ac_status=$?
7660 echo "$as_me:7660: \$? = $ac_status" >&5
7661 (exit $ac_status); } &&
7662 { ac_try='test -s conftest$ac_exeext'
7663 { (eval echo "$as_me:7663: \"$ac_try\"") >&5
7664 (eval $ac_try) 2>&5
7665 ac_status=$?
7666 echo "$as_me:7666: \$? = $ac_status" >&5
7667 (exit $ac_status); }; }; then
7668 if test "$cross_compiling" = yes; then
7669 cf_have_ncuconfig=maybe
7670else
7671 cat >conftest.$ac_ext <<_ACEOF
7672#line 7672 "configure"
7673#include "confdefs.h"
7674#include <${cf_cv_ncurses_header:-curses.h}>
7675 int main(void)
7676 { char *xx = curses_version(); return (xx == 0); }
7677_ACEOF
7678rm -f conftest$ac_exeext
7679if { (eval echo "$as_me:7679: \"$ac_link\"") >&5
7680 (eval $ac_link) 2>&5
7681 ac_status=$?
7682 echo "$as_me:7682: \$? = $ac_status" >&5
7683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7684 { (eval echo "$as_me:7684: \"$ac_try\"") >&5
7685 (eval $ac_try) 2>&5
7686 ac_status=$?
7687 echo "$as_me:7687: \$? = $ac_status" >&5
7688 (exit $ac_status); }; }; then
7689 cf_have_ncuconfig=yes
7690else
7691 echo "$as_me: program exited with status $ac_status" >&5
7692echo "$as_me: failed program was:" >&5
7693cat conftest.$ac_ext >&5
7694cf_have_ncuconfig=no
7695fi
7696rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7697fi
7698else
7699 echo "$as_me: failed program was:" >&5
7700cat conftest.$ac_ext >&5
7701cf_have_ncuconfig=no
7702fi
7703rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7704 echo "$as_me:7704: result: $cf_have_ncuconfig" >&5
7705echo "${ECHO_T}$cf_have_ncuconfig" >&6
7706 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7707 if test "$cf_have_ncuconfig" != "yes"
7708 then
7709 CPPFLAGS="$cf_save_CPPFLAGS"
7710 LIBS="$cf_save_LIBS"
7711 NCURSES_CONFIG_PKG=none
7712 else
7713
7714cat >>confdefs.h <<\EOF
7715#define NCURSES 1
7716EOF
7717
7718 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7719 fi
7720
7721 else
7722 echo "$as_me:7722: result: no" >&5
7723echo "${ECHO_T}no" >&6
7724 NCURSES_CONFIG_PKG=none
7725 fi
7726else
7727 NCURSES_CONFIG_PKG=none
7728fi
7729
7730if test "x$cf_have_ncuconfig" = "xno"; then
7731 echo "Looking for ${cf_ncuconfig_root}-config"
7732
7733if test -n "$ac_tool_prefix"; then
7734 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7735 do
7736 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7738echo "$as_me:7738: checking for $ac_word" >&5
7739echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7740if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7741 echo $ECHO_N "(cached) $ECHO_C" >&6
7742else
7743 if test -n "$NCURSES_CONFIG"; then
7744 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7745else
7746 ac_save_IFS=$IFS; IFS=$ac_path_separator
7747ac_dummy="$PATH"
7748for ac_dir in $ac_dummy; do
7749 IFS=$ac_save_IFS
7750 test -z "$ac_dir" && ac_dir=.
7751 $as_executable_p "$ac_dir/$ac_word" || continue
7752ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7753echo "$as_me:7753: found $ac_dir/$ac_word" >&5
7754break
7755done
7756
7757fi
7758fi
7759NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7760if test -n "$NCURSES_CONFIG"; then
7761 echo "$as_me:7761: result: $NCURSES_CONFIG" >&5
7762echo "${ECHO_T}$NCURSES_CONFIG" >&6
7763else
7764 echo "$as_me:7764: result: no" >&5
7765echo "${ECHO_T}no" >&6
7766fi
7767
7768 test -n "$NCURSES_CONFIG" && break
7769 done
7770fi
7771if test -z "$NCURSES_CONFIG"; then
7772 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7773 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7774do
7775 # Extract the first word of "$ac_prog", so it can be a program name with args.
7776set dummy $ac_prog; ac_word=$2
7777echo "$as_me:7777: checking for $ac_word" >&5
7778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7779if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7780 echo $ECHO_N "(cached) $ECHO_C" >&6
7781else
7782 if test -n "$ac_ct_NCURSES_CONFIG"; then
7783 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7784else
7785 ac_save_IFS=$IFS; IFS=$ac_path_separator
7786ac_dummy="$PATH"
7787for ac_dir in $ac_dummy; do
7788 IFS=$ac_save_IFS
7789 test -z "$ac_dir" && ac_dir=.
7790 $as_executable_p "$ac_dir/$ac_word" || continue
7791ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7792echo "$as_me:7792: found $ac_dir/$ac_word" >&5
7793break
7794done
7795
7796fi
7797fi
7798ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7799if test -n "$ac_ct_NCURSES_CONFIG"; then
7800 echo "$as_me:7800: result: $ac_ct_NCURSES_CONFIG" >&5
7801echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7802else
7803 echo "$as_me:7803: result: no" >&5
7804echo "${ECHO_T}no" >&6
7805fi
7806
7807 test -n "$ac_ct_NCURSES_CONFIG" && break
7808done
7809test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7810
7811 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7812fi
7813
7814 if test "$NCURSES_CONFIG" != none ; then
7815
7816 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7817
7818cf_add_libs="`$NCURSES_CONFIG --libs`"
7819# Filter out duplicates - this happens with badly-designed ".pc" files...
7820for cf_add_1lib in $LIBS
7821do
7822 for cf_add_2lib in $cf_add_libs
7823 do
7824 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7825 then
7826 cf_add_1lib=
7827 break
7828 fi
7829 done
7830 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7831done
7832LIBS="$cf_add_libs"
7833
7834 # even with config script, some packages use no-override for curses.h
7835
7836echo "$as_me:7836: checking if we have identified curses headers" >&5
7837echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7838if test "${cf_cv_ncurses_header+set}" = set; then
7839 echo $ECHO_N "(cached) $ECHO_C" >&6
7840else
7841
7842cf_cv_ncurses_header=none
7843for cf_header in \
7844 ncurses.h $cf_cv_screen/ncurses.h \
7845 curses.h $cf_cv_screen/curses.h
7846do
7847cat >conftest.$ac_ext <<_ACEOF
7848#line 7848 "configure"
7849#include "confdefs.h"
7850#include <${cf_header}>
7851int
7852main ()
7853{
7854initscr(); tgoto("?", 0,0)
7855 ;
7856 return 0;
7857}
7858_ACEOF
7859rm -f conftest.$ac_objext
7860if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
7861 (eval $ac_compile) 2>&5
7862 ac_status=$?
7863 echo "$as_me:7863: \$? = $ac_status" >&5
7864 (exit $ac_status); } &&
7865 { ac_try='test -s conftest.$ac_objext'
7866 { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7867 (eval $ac_try) 2>&5
7868 ac_status=$?
7869 echo "$as_me:7869: \$? = $ac_status" >&5
7870 (exit $ac_status); }; }; then
7871 cf_cv_ncurses_header=$cf_header; break
7872else
7873 echo "$as_me: failed program was:" >&5
7874cat conftest.$ac_ext >&5
7875fi
7876rm -f conftest.$ac_objext conftest.$ac_ext
7877done
7878
7879fi
7880echo "$as_me:7880: result: $cf_cv_ncurses_header" >&5
7881echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7882
7883if test "$cf_cv_ncurses_header" = none ; then
7884 { { echo "$as_me:7884: error: No curses header-files found" >&5
7885echo "$as_me: error: No curses header-files found" >&2;}
7886 { (exit 1); exit 1; }; }
7887fi
7888
7889# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7890
7891for ac_header in $cf_cv_ncurses_header
7892do
7893as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7894echo "$as_me:7894: checking for $ac_header" >&5
7895echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7896if eval "test \"\${$as_ac_Header+set}\" = set"; then
7897 echo $ECHO_N "(cached) $ECHO_C" >&6
7898else
7899 cat >conftest.$ac_ext <<_ACEOF
7900#line 7900 "configure"
7901#include "confdefs.h"
7902#include <$ac_header>
7903_ACEOF
7904if { (eval echo "$as_me:7904: \"$ac_cpp conftest.$ac_ext\"") >&5
7905 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7906 ac_status=$?
7907 egrep -v '^ *\+' conftest.er1 >conftest.err
7908 rm -f conftest.er1
7909 cat conftest.err >&5
7910 echo "$as_me:7910: \$? = $ac_status" >&5
7911 (exit $ac_status); } >/dev/null; then
7912 if test -s conftest.err; then
7913 ac_cpp_err=$ac_c_preproc_warn_flag
7914 else
7915 ac_cpp_err=
7916 fi
7917else
7918 ac_cpp_err=yes
7919fi
7920if test -z "$ac_cpp_err"; then
7921 eval "$as_ac_Header=yes"
7922else
7923 echo "$as_me: failed program was:" >&5
7924 cat conftest.$ac_ext >&5
7925 eval "$as_ac_Header=no"
7926fi
7927rm -f conftest.err conftest.$ac_ext
7928fi
7929echo "$as_me:7929: result: `eval echo '${'$as_ac_Header'}'`" >&5
7930echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7931if test `eval echo '${'$as_ac_Header'}'` = yes; then
7932 cat >>confdefs.h <<EOF
7933#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7934EOF
7935
7936fi
7937done
7938
7939cat >>confdefs.h <<\EOF
7940#define NCURSES 1
7941EOF
7942
7943cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7944
7945 cat >>confdefs.h <<EOF
7946#define $cf_nculib_ROOT 1
7947EOF
7948
7949 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7950
7951 else
7952
7953cf_ncuhdr_root=$cf_cv_screen
7954
7955test -n "$cf_cv_curses_dir" && \
7956test "$cf_cv_curses_dir" != "no" && { \
7957
7958if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7959 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7960 do
7961 while test $cf_add_incdir != /usr/include
7962 do
7963 if test -d $cf_add_incdir
7964 then
7965 cf_have_incdir=no
7966 if test -n "$CFLAGS$CPPFLAGS" ; then
7967 # a loop is needed to ensure we can add subdirs of existing dirs
7968 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7969 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7970 cf_have_incdir=yes; break
7971 fi
7972 done
7973 fi
7974
7975 if test "$cf_have_incdir" = no ; then
7976 if test "$cf_add_incdir" = /usr/local/include ; then
7977 if test "$GCC" = yes
7978 then
7979 cf_save_CPPFLAGS=$CPPFLAGS
7980 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7981 cat >conftest.$ac_ext <<_ACEOF
7982#line 7982 "configure"
7983#include "confdefs.h"
7984#include <stdio.h>
7985int
7986main ()
7987{
7988printf("Hello")
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993rm -f conftest.$ac_objext
7994if { (eval echo "$as_me:7994: \"$ac_compile\"") >&5
7995 (eval $ac_compile) 2>&5
7996 ac_status=$?
7997 echo "$as_me:7997: \$? = $ac_status" >&5
7998 (exit $ac_status); } &&
7999 { ac_try='test -s conftest.$ac_objext'
8000 { (eval echo "$as_me:8000: \"$ac_try\"") >&5
8001 (eval $ac_try) 2>&5
8002 ac_status=$?
8003 echo "$as_me:8003: \$? = $ac_status" >&5
8004 (exit $ac_status); }; }; then
8005 :
8006else
8007 echo "$as_me: failed program was:" >&5
8008cat conftest.$ac_ext >&5
8009cf_have_incdir=yes
8010fi
8011rm -f conftest.$ac_objext conftest.$ac_ext
8012 CPPFLAGS=$cf_save_CPPFLAGS
8013 fi
8014 fi
8015 fi
8016
8017 if test "$cf_have_incdir" = no ; then
8018 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8019
8020echo "${as_me:-configure}:8020: testing adding $cf_add_incdir to include-path ..." 1>&5
8021
8022 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8023
8024 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8025 test "$cf_top_incdir" = "$cf_add_incdir" && break
8026 cf_add_incdir="$cf_top_incdir"
8027 else
8028 break
8029 fi
8030 else
8031 break
8032 fi
8033 done
8034 done
8035fi
8036
8037}
8038
8039echo "$as_me:8039: checking for $cf_ncuhdr_root header in include-path" >&5
8040echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8041if test "${cf_cv_ncurses_h+set}" = set; then
8042 echo $ECHO_N "(cached) $ECHO_C" >&6
8043else
8044
8045 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8046 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8047 for cf_header in $cf_header_list
8048 do
8049
8050 cat >conftest.$ac_ext <<_ACEOF
8051#line 8051 "configure"
8052#include "confdefs.h"
8053
8054#include <$cf_header>
8055int
8056main ()
8057{
8058
8059#ifdef NCURSES_VERSION
8060
8061printf("%s\n", NCURSES_VERSION);
8062#else
8063#ifdef __NCURSES_H
8064printf("old\n");
8065#else
8066 make an error
8067#endif
8068#endif
8069
8070 ;
8071 return 0;
8072}
8073_ACEOF
8074rm -f conftest.$ac_objext
8075if { (eval echo "$as_me:8075: \"$ac_compile\"") >&5
8076 (eval $ac_compile) 2>&5
8077 ac_status=$?
8078 echo "$as_me:8078: \$? = $ac_status" >&5
8079 (exit $ac_status); } &&
8080 { ac_try='test -s conftest.$ac_objext'
8081 { (eval echo "$as_me:8081: \"$ac_try\"") >&5
8082 (eval $ac_try) 2>&5
8083 ac_status=$?
8084 echo "$as_me:8084: \$? = $ac_status" >&5
8085 (exit $ac_status); }; }; then
8086 cf_cv_ncurses_h=$cf_header
8087
8088else
8089 echo "$as_me: failed program was:" >&5
8090cat conftest.$ac_ext >&5
8091cf_cv_ncurses_h=no
8092fi
8093rm -f conftest.$ac_objext conftest.$ac_ext
8094
8095 test "$cf_cv_ncurses_h" != no && break
8096 done
8097
8098fi
8099echo "$as_me:8099: result: $cf_cv_ncurses_h" >&5
8100echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8101
8102if test "$cf_cv_ncurses_h" != no ; then
8103 cf_cv_ncurses_header=$cf_cv_ncurses_h
8104else
8105
8106echo "$as_me:8106: checking for $cf_ncuhdr_root include-path" >&5
8107echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8108if test "${cf_cv_ncurses_h2+set}" = set; then
8109 echo $ECHO_N "(cached) $ECHO_C" >&6
8110else
8111
8112 test -n "$verbose" && echo
8113
8114cf_search=
8115
8116# collect the current set of include-directories from compiler flags
8117cf_header_path_list=""
8118if test -n "${CFLAGS}${CPPFLAGS}" ; then
8119 for cf_header_path in $CPPFLAGS $CFLAGS
8120 do
8121 case $cf_header_path in
8122 (-I*)
8123 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8124
8125test "x$cf_header_path" != "xNONE" && \
8126test -d "$cf_header_path" && \
8127 {
8128 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8129 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8130 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8131 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8132 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8133 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"
8134}
8135
8136 cf_header_path_list="$cf_header_path_list $cf_search"
8137 ;;
8138 esac
8139 done
8140fi
8141
8142# add the variations for the package we are looking for
8143
8144cf_search=
8145
8146test "x$prefix" != "xNONE" && \
8147test -d "$prefix" && \
8148 {
8149 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8150 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8151 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8152 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8153 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8154 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8155}
8156
8157for cf_subdir_prefix in \
8158 /usr \
8159 /usr/local \
8160 /usr/pkg \
8161 /opt \
8162 /opt/local \
8163 $HOME
8164do
8165
8166test "x$cf_subdir_prefix" != "x$prefix" && \
8167test -d "$cf_subdir_prefix" && \
8168(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8169 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8170 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8171 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8172 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8173 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8174 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"
8175}
8176
8177done
8178
8179test "$includedir" != NONE && \
8180test "$includedir" != "/usr/include" && \
8181test -d "$includedir" && {
8182 test -d $includedir && cf_search="$cf_search $includedir"
8183 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8184}
8185
8186test "$oldincludedir" != NONE && \
8187test "$oldincludedir" != "/usr/include" && \
8188test -d "$oldincludedir" && {
8189 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8190 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8191}
8192
8193cf_search="$cf_search $cf_header_path_list"
8194
8195 test -n "$verbose" && echo search path $cf_search
8196 cf_save2_CPPFLAGS="$CPPFLAGS"
8197 for cf_incdir in $cf_search
8198 do
8199
8200if test -n "$cf_incdir" ; then
8201 for cf_add_incdir in $cf_incdir
8202 do
8203 while test $cf_add_incdir != /usr/include
8204 do
8205 if test -d $cf_add_incdir
8206 then
8207 cf_have_incdir=no
8208 if test -n "$CFLAGS$CPPFLAGS" ; then
8209 # a loop is needed to ensure we can add subdirs of existing dirs
8210 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8211 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8212 cf_have_incdir=yes; break
8213 fi
8214 done
8215 fi
8216
8217 if test "$cf_have_incdir" = no ; then
8218 if test "$cf_add_incdir" = /usr/local/include ; then
8219 if test "$GCC" = yes
8220 then
8221 cf_save_CPPFLAGS=$CPPFLAGS
8222 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8223 cat >conftest.$ac_ext <<_ACEOF
8224#line 8224 "configure"
8225#include "confdefs.h"
8226#include <stdio.h>
8227int
8228main ()
8229{
8230printf("Hello")
8231 ;
8232 return 0;
8233}
8234_ACEOF
8235rm -f conftest.$ac_objext
8236if { (eval echo "$as_me:8236: \"$ac_compile\"") >&5
8237 (eval $ac_compile) 2>&5
8238 ac_status=$?
8239 echo "$as_me:8239: \$? = $ac_status" >&5
8240 (exit $ac_status); } &&
8241 { ac_try='test -s conftest.$ac_objext'
8242 { (eval echo "$as_me:8242: \"$ac_try\"") >&5
8243 (eval $ac_try) 2>&5
8244 ac_status=$?
8245 echo "$as_me:8245: \$? = $ac_status" >&5
8246 (exit $ac_status); }; }; then
8247 :
8248else
8249 echo "$as_me: failed program was:" >&5
8250cat conftest.$ac_ext >&5
8251cf_have_incdir=yes
8252fi
8253rm -f conftest.$ac_objext conftest.$ac_ext
8254 CPPFLAGS=$cf_save_CPPFLAGS
8255 fi
8256 fi
8257 fi
8258
8259 if test "$cf_have_incdir" = no ; then
8260 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8261
8262echo "${as_me:-configure}:8262: testing adding $cf_add_incdir to include-path ..." 1>&5
8263
8264 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8265
8266 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8267 test "$cf_top_incdir" = "$cf_add_incdir" && break
8268 cf_add_incdir="$cf_top_incdir"
8269 else
8270 break
8271 fi
8272 else
8273 break
8274 fi
8275 done
8276 done
8277fi
8278
8279 for cf_header in \
8280 ncurses.h \
8281 curses.h
8282 do
8283
8284 cat >conftest.$ac_ext <<_ACEOF
8285#line 8285 "configure"
8286#include "confdefs.h"
8287
8288#include <$cf_header>
8289int
8290main ()
8291{
8292
8293#ifdef NCURSES_VERSION
8294
8295printf("%s\n", NCURSES_VERSION);
8296#else
8297#ifdef __NCURSES_H
8298printf("old\n");
8299#else
8300 make an error
8301#endif
8302#endif
8303
8304 ;
8305 return 0;
8306}
8307_ACEOF
8308rm -f conftest.$ac_objext
8309if { (eval echo "$as_me:8309: \"$ac_compile\"") >&5
8310 (eval $ac_compile) 2>&5
8311 ac_status=$?
8312 echo "$as_me:8312: \$? = $ac_status" >&5
8313 (exit $ac_status); } &&
8314 { ac_try='test -s conftest.$ac_objext'
8315 { (eval echo "$as_me:8315: \"$ac_try\"") >&5
8316 (eval $ac_try) 2>&5
8317 ac_status=$?
8318 echo "$as_me:8318: \$? = $ac_status" >&5
8319 (exit $ac_status); }; }; then
8320 cf_cv_ncurses_h2=$cf_header
8321
8322else
8323 echo "$as_me: failed program was:" >&5
8324cat conftest.$ac_ext >&5
8325cf_cv_ncurses_h2=no
8326fi
8327rm -f conftest.$ac_objext conftest.$ac_ext
8328
8329 if test "$cf_cv_ncurses_h2" != no ; then
8330 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8331 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8332 break
8333 fi
8334 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8335 done
8336 CPPFLAGS="$cf_save2_CPPFLAGS"
8337 test "$cf_cv_ncurses_h2" != no && break
8338 done
8339 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8339: error: not found" >&5
8340echo "$as_me: error: not found" >&2;}
8341 { (exit 1); exit 1; }; }
8342
8343fi
8344echo "$as_me:8344: result: $cf_cv_ncurses_h2" >&5
8345echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8346
8347 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8348 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8349 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8350 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8351 fi
8352
8353if test -n "$cf_1st_incdir" ; then
8354 for cf_add_incdir in $cf_1st_incdir
8355 do
8356 while test $cf_add_incdir != /usr/include
8357 do
8358 if test -d $cf_add_incdir
8359 then
8360 cf_have_incdir=no
8361 if test -n "$CFLAGS$CPPFLAGS" ; then
8362 # a loop is needed to ensure we can add subdirs of existing dirs
8363 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8364 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8365 cf_have_incdir=yes; break
8366 fi
8367 done
8368 fi
8369
8370 if test "$cf_have_incdir" = no ; then
8371 if test "$cf_add_incdir" = /usr/local/include ; then
8372 if test "$GCC" = yes
8373 then
8374 cf_save_CPPFLAGS=$CPPFLAGS
8375 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8376 cat >conftest.$ac_ext <<_ACEOF
8377#line 8377 "configure"
8378#include "confdefs.h"
8379#include <stdio.h>
8380int
8381main ()
8382{
8383printf("Hello")
8384 ;
8385 return 0;
8386}
8387_ACEOF
8388rm -f conftest.$ac_objext
8389if { (eval echo "$as_me:8389: \"$ac_compile\"") >&5
8390 (eval $ac_compile) 2>&5
8391 ac_status=$?
8392 echo "$as_me:8392: \$? = $ac_status" >&5
8393 (exit $ac_status); } &&
8394 { ac_try='test -s conftest.$ac_objext'
8395 { (eval echo "$as_me:8395: \"$ac_try\"") >&5
8396 (eval $ac_try) 2>&5
8397 ac_status=$?
8398 echo "$as_me:8398: \$? = $ac_status" >&5
8399 (exit $ac_status); }; }; then
8400 :
8401else
8402 echo "$as_me: failed program was:" >&5
8403cat conftest.$ac_ext >&5
8404cf_have_incdir=yes
8405fi
8406rm -f conftest.$ac_objext conftest.$ac_ext
8407 CPPFLAGS=$cf_save_CPPFLAGS
8408 fi
8409 fi
8410 fi
8411
8412 if test "$cf_have_incdir" = no ; then
8413 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8414
8415echo "${as_me:-configure}:8415: testing adding $cf_add_incdir to include-path ..." 1>&5
8416
8417 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8418
8419 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8420 test "$cf_top_incdir" = "$cf_add_incdir" && break
8421 cf_add_incdir="$cf_top_incdir"
8422 else
8423 break
8424 fi
8425 else
8426 break
8427 fi
8428 done
8429 done
8430fi
8431
8432fi
8433
8434# Set definitions to allow ifdef'ing for ncurses.h
8435
8436case $cf_cv_ncurses_header in
8437(*ncurses.h)
8438
8439cat >>confdefs.h <<\EOF
8440#define HAVE_NCURSES_H 1
8441EOF
8442
8443 ;;
8444esac
8445
8446case $cf_cv_ncurses_header in
8447(ncurses/curses.h|ncurses/ncurses.h)
8448
8449cat >>confdefs.h <<\EOF
8450#define HAVE_NCURSES_NCURSES_H 1
8451EOF
8452
8453 ;;
8454(ncursesw/curses.h|ncursesw/ncurses.h)
8455
8456cat >>confdefs.h <<\EOF
8457#define HAVE_NCURSESW_NCURSES_H 1
8458EOF
8459
8460 ;;
8461esac
8462
8463echo "$as_me:8463: checking for terminfo header" >&5
8464echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8465if test "${cf_cv_term_header+set}" = set; then
8466 echo $ECHO_N "(cached) $ECHO_C" >&6
8467else
8468
8469case ${cf_cv_ncurses_header} in
8470(*/ncurses.h|*/ncursesw.h)
8471 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8472 ;;
8473(*)
8474 cf_term_header=term.h
8475 ;;
8476esac
8477
8478for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8479do
8480cat >conftest.$ac_ext <<_ACEOF
8481#line 8481 "configure"
8482#include "confdefs.h"
8483#include <stdio.h>
8484#include <${cf_cv_ncurses_header:-curses.h}>
8485#include <$cf_test>
8486
8487int
8488main ()
8489{
8490int x = auto_left_margin
8491 ;
8492 return 0;
8493}
8494_ACEOF
8495rm -f conftest.$ac_objext
8496if { (eval echo "$as_me:8496: \"$ac_compile\"") >&5
8497 (eval $ac_compile) 2>&5
8498 ac_status=$?
8499 echo "$as_me:8499: \$? = $ac_status" >&5
8500 (exit $ac_status); } &&
8501 { ac_try='test -s conftest.$ac_objext'
8502 { (eval echo "$as_me:8502: \"$ac_try\"") >&5
8503 (eval $ac_try) 2>&5
8504 ac_status=$?
8505 echo "$as_me:8505: \$? = $ac_status" >&5
8506 (exit $ac_status); }; }; then
8507
8508 cf_cv_term_header="$cf_test"
8509else
8510 echo "$as_me: failed program was:" >&5
8511cat conftest.$ac_ext >&5
8512
8513 cf_cv_term_header=unknown
8514
8515fi
8516rm -f conftest.$ac_objext conftest.$ac_ext
8517 test "$cf_cv_term_header" != unknown && break
8518done
8519
8520fi
8521echo "$as_me:8521: result: $cf_cv_term_header" >&5
8522echo "${ECHO_T}$cf_cv_term_header" >&6
8523
8524# Set definitions to allow ifdef'ing to accommodate subdirectories
8525
8526case $cf_cv_term_header in
8527(*term.h)
8528
8529cat >>confdefs.h <<\EOF
8530#define HAVE_TERM_H 1
8531EOF
8532
8533 ;;
8534esac
8535
8536case $cf_cv_term_header in
8537(ncurses/term.h)
8538
8539cat >>confdefs.h <<\EOF
8540#define HAVE_NCURSES_TERM_H 1
8541EOF
8542
8543 ;;
8544(ncursesw/term.h)
8545
8546cat >>confdefs.h <<\EOF
8547#define HAVE_NCURSESW_TERM_H 1
8548EOF
8549
8550 ;;
8551esac
8552
8553# some applications need this, but should check for NCURSES_VERSION
8554
8555cat >>confdefs.h <<\EOF
8556#define NCURSES 1
8557EOF
8558
8559echo "$as_me:8559: checking for ncurses version" >&5
8560echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8561if test "${cf_cv_ncurses_version+set}" = set; then
8562 echo $ECHO_N "(cached) $ECHO_C" >&6
8563else
8564
8565 cf_cv_ncurses_version=no
8566 cf_tempfile=out$$
8567 rm -f $cf_tempfile
8568 if test "$cross_compiling" = yes; then
8569
8570 # This will not work if the preprocessor splits the line after the
8571 # Autoconf token. The 'unproto' program does that.
8572 cat > conftest.$ac_ext <<EOF
8573#include <${cf_cv_ncurses_header:-curses.h}>
8574#undef Autoconf
8575#ifdef NCURSES_VERSION
8576Autoconf NCURSES_VERSION
8577#else
8578#ifdef __NCURSES_H
8579Autoconf "old"
8580#endif
8581;
8582#endif
8583EOF
8584 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8585 { (eval echo "$as_me:8585: \"$cf_try\"") >&5
8586 (eval $cf_try) 2>&5
8587 ac_status=$?
8588 echo "$as_me:8588: \$? = $ac_status" >&5
8589 (exit $ac_status); }
8590 if test -f conftest.out ; then
8591 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8592 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8593 rm -f conftest.out
8594 fi
8595
8596else
8597 cat >conftest.$ac_ext <<_ACEOF
8598#line 8598 "configure"
8599#include "confdefs.h"
8600
8601#include <${cf_cv_ncurses_header:-curses.h}>
8602#include <stdio.h>
8603int main()
8604{
8605 FILE *fp = fopen("$cf_tempfile", "w");
8606#ifdef NCURSES_VERSION
8607# ifdef NCURSES_VERSION_PATCH
8608 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8609# else
8610 fprintf(fp, "%s\n", NCURSES_VERSION);
8611# endif
8612#else
8613# ifdef __NCURSES_H
8614 fprintf(fp, "old\n");
8615# else
8616 make an error
8617# endif
8618#endif
8619 ${cf_cv_main_return:-return}(0);
8620}
8621_ACEOF
8622rm -f conftest$ac_exeext
8623if { (eval echo "$as_me:8623: \"$ac_link\"") >&5
8624 (eval $ac_link) 2>&5
8625 ac_status=$?
8626 echo "$as_me:8626: \$? = $ac_status" >&5
8627 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8628 { (eval echo "$as_me:8628: \"$ac_try\"") >&5
8629 (eval $ac_try) 2>&5
8630 ac_status=$?
8631 echo "$as_me:8631: \$? = $ac_status" >&5
8632 (exit $ac_status); }; }; then
8633
8634 cf_cv_ncurses_version=`cat $cf_tempfile`
8635else
8636 echo "$as_me: program exited with status $ac_status" >&5
8637echo "$as_me: failed program was:" >&5
8638cat conftest.$ac_ext >&5
8639fi
8640rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8641fi
8642 rm -f $cf_tempfile
8643
8644fi
8645echo "$as_me:8645: result: $cf_cv_ncurses_version" >&5
8646echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8647test "$cf_cv_ncurses_version" = no ||
8648cat >>confdefs.h <<\EOF
8649#define NCURSES 1
8650EOF
8651
8652cf_nculib_root=$cf_cv_screen
8653 # This works, except for the special case where we find gpm, but
8654 # ncurses is in a nonstandard location via $LIBS, and we really want
8655 # to link gpm.
8656cf_ncurses_LIBS=""
8657cf_ncurses_SAVE="$LIBS"
8658echo "$as_me:8658: checking for Gpm_Open in -lgpm" >&5
8659echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8660if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8661 echo $ECHO_N "(cached) $ECHO_C" >&6
8662else
8663 ac_check_lib_save_LIBS=$LIBS
8664LIBS="-lgpm $LIBS"
8665cat >conftest.$ac_ext <<_ACEOF
8666#line 8666 "configure"
8667#include "confdefs.h"
8668
8669/* Override any gcc2 internal prototype to avoid an error. */
8670#ifdef __cplusplus
8671extern "C"
8672#endif
8673/* We use char because int might match the return type of a gcc2
8674 builtin and then its argument prototype would still apply. */
8675char Gpm_Open ();
8676int
8677main ()
8678{
8679Gpm_Open ();
8680 ;
8681 return 0;
8682}
8683_ACEOF
8684rm -f conftest.$ac_objext conftest$ac_exeext
8685if { (eval echo "$as_me:8685: \"$ac_link\"") >&5
8686 (eval $ac_link) 2>&5
8687 ac_status=$?
8688 echo "$as_me:8688: \$? = $ac_status" >&5
8689 (exit $ac_status); } &&
8690 { ac_try='test -s conftest$ac_exeext'
8691 { (eval echo "$as_me:8691: \"$ac_try\"") >&5
8692 (eval $ac_try) 2>&5
8693 ac_status=$?
8694 echo "$as_me:8694: \$? = $ac_status" >&5
8695 (exit $ac_status); }; }; then
8696 ac_cv_lib_gpm_Gpm_Open=yes
8697else
8698 echo "$as_me: failed program was:" >&5
8699cat conftest.$ac_ext >&5
8700ac_cv_lib_gpm_Gpm_Open=no
8701fi
8702rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8703LIBS=$ac_check_lib_save_LIBS
8704fi
8705echo "$as_me:8705: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8706echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8707if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8708 echo "$as_me:8708: checking for initscr in -lgpm" >&5
8709echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8710if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8711 echo $ECHO_N "(cached) $ECHO_C" >&6
8712else
8713 ac_check_lib_save_LIBS=$LIBS
8714LIBS="-lgpm $LIBS"
8715cat >conftest.$ac_ext <<_ACEOF
8716#line 8716 "configure"
8717#include "confdefs.h"
8718
8719/* Override any gcc2 internal prototype to avoid an error. */
8720#ifdef __cplusplus
8721extern "C"
8722#endif
8723/* We use char because int might match the return type of a gcc2
8724 builtin and then its argument prototype would still apply. */
8725char initscr ();
8726int
8727main ()
8728{
8729initscr ();
8730 ;
8731 return 0;
8732}
8733_ACEOF
8734rm -f conftest.$ac_objext conftest$ac_exeext
8735if { (eval echo "$as_me:8735: \"$ac_link\"") >&5
8736 (eval $ac_link) 2>&5
8737 ac_status=$?
8738 echo "$as_me:8738: \$? = $ac_status" >&5
8739 (exit $ac_status); } &&
8740 { ac_try='test -s conftest$ac_exeext'
8741 { (eval echo "$as_me:8741: \"$ac_try\"") >&5
8742 (eval $ac_try) 2>&5
8743 ac_status=$?
8744 echo "$as_me:8744: \$? = $ac_status" >&5
8745 (exit $ac_status); }; }; then
8746 ac_cv_lib_gpm_initscr=yes
8747else
8748 echo "$as_me: failed program was:" >&5
8749cat conftest.$ac_ext >&5
8750ac_cv_lib_gpm_initscr=no
8751fi
8752rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8753LIBS=$ac_check_lib_save_LIBS
8754fi
8755echo "$as_me:8755: result: $ac_cv_lib_gpm_initscr" >&5
8756echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8757if test $ac_cv_lib_gpm_initscr = yes; then
8758 LIBS="$cf_ncurses_SAVE"
8759else
8760 cf_ncurses_LIBS="-lgpm"
8761fi
8762
8763fi
8764
8765case $host_os in
8766(freebsd*)
8767 # This is only necessary if you are linking against an obsolete
8768 # version of ncurses (but it should do no harm, since it's static).
8769 if test "$cf_nculib_root" = ncurses ; then
8770 echo "$as_me:8770: checking for tgoto in -lmytinfo" >&5
8771echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8772if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8773 echo $ECHO_N "(cached) $ECHO_C" >&6
8774else
8775 ac_check_lib_save_LIBS=$LIBS
8776LIBS="-lmytinfo $LIBS"
8777cat >conftest.$ac_ext <<_ACEOF
8778#line 8778 "configure"
8779#include "confdefs.h"
8780
8781/* Override any gcc2 internal prototype to avoid an error. */
8782#ifdef __cplusplus
8783extern "C"
8784#endif
8785/* We use char because int might match the return type of a gcc2
8786 builtin and then its argument prototype would still apply. */
8787char tgoto ();
8788int
8789main ()
8790{
8791tgoto ();
8792 ;
8793 return 0;
8794}
8795_ACEOF
8796rm -f conftest.$ac_objext conftest$ac_exeext
8797if { (eval echo "$as_me:8797: \"$ac_link\"") >&5
8798 (eval $ac_link) 2>&5
8799 ac_status=$?
8800 echo "$as_me:8800: \$? = $ac_status" >&5
8801 (exit $ac_status); } &&
8802 { ac_try='test -s conftest$ac_exeext'
8803 { (eval echo "$as_me:8803: \"$ac_try\"") >&5
8804 (eval $ac_try) 2>&5
8805 ac_status=$?
8806 echo "$as_me:8806: \$? = $ac_status" >&5
8807 (exit $ac_status); }; }; then
8808 ac_cv_lib_mytinfo_tgoto=yes
8809else
8810 echo "$as_me: failed program was:" >&5
8811cat conftest.$ac_ext >&5
8812ac_cv_lib_mytinfo_tgoto=no
8813fi
8814rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8815LIBS=$ac_check_lib_save_LIBS
8816fi
8817echo "$as_me:8817: result: $ac_cv_lib_mytinfo_tgoto" >&5
8818echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8819if test $ac_cv_lib_mytinfo_tgoto = yes; then
8820 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8821fi
8822
8823 fi
8824 ;;
8825esac
8826
8827cf_add_libs="$cf_ncurses_LIBS"
8828# Filter out duplicates - this happens with badly-designed ".pc" files...
8829for cf_add_1lib in $LIBS
8830do
8831 for cf_add_2lib in $cf_add_libs
8832 do
8833 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8834 then
8835 cf_add_1lib=
8836 break
8837 fi
8838 done
8839 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8840done
8841LIBS="$cf_add_libs"
8842
8843if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8844then
8845
8846cf_add_libs="-l$cf_nculib_root"
8847# Filter out duplicates - this happens with badly-designed ".pc" files...
8848for cf_add_1lib in $LIBS
8849do
8850 for cf_add_2lib in $cf_add_libs
8851 do
8852 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8853 then
8854 cf_add_1lib=
8855 break
8856 fi
8857 done
8858 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8859done
8860LIBS="$cf_add_libs"
8861
8862else
8863
8864 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8865 cf_libdir=""
8866 echo "$as_me:8866: checking for initscr" >&5
8867echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8868if test "${ac_cv_func_initscr+set}" = set; then
8869 echo $ECHO_N "(cached) $ECHO_C" >&6
8870else
8871 cat >conftest.$ac_ext <<_ACEOF
8872#line 8872 "configure"
8873#include "confdefs.h"
8874/* System header to define __stub macros and hopefully few prototypes,
8875 which can conflict with char initscr (); below. */
8876#include <assert.h>
8877/* Override any gcc2 internal prototype to avoid an error. */
8878#ifdef __cplusplus
8879extern "C"
8880#endif
8881/* We use char because int might match the return type of a gcc2
8882 builtin and then its argument prototype would still apply. */
8883char initscr ();
8884char (*f) ();
8885
8886int
8887main ()
8888{
8889/* The GNU C library defines this for functions which it implements
8890 to always fail with ENOSYS. Some functions are actually named
8891 something starting with __ and the normal name is an alias. */
8892#if defined (__stub_initscr) || defined (__stub___initscr)
8893choke me
8894#else
8895f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8896#endif
8897
8898 ;
8899 return 0;
8900}
8901_ACEOF
8902rm -f conftest.$ac_objext conftest$ac_exeext
8903if { (eval echo "$as_me:8903: \"$ac_link\"") >&5
8904 (eval $ac_link) 2>&5
8905 ac_status=$?
8906 echo "$as_me:8906: \$? = $ac_status" >&5
8907 (exit $ac_status); } &&
8908 { ac_try='test -s conftest$ac_exeext'
8909 { (eval echo "$as_me:8909: \"$ac_try\"") >&5
8910 (eval $ac_try) 2>&5
8911 ac_status=$?
8912 echo "$as_me:8912: \$? = $ac_status" >&5
8913 (exit $ac_status); }; }; then
8914 ac_cv_func_initscr=yes
8915else
8916 echo "$as_me: failed program was:" >&5
8917cat conftest.$ac_ext >&5
8918ac_cv_func_initscr=no
8919fi
8920rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8921fi
8922echo "$as_me:8922: result: $ac_cv_func_initscr" >&5
8923echo "${ECHO_T}$ac_cv_func_initscr" >&6
8924if test $ac_cv_func_initscr = yes; then
8925 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8926else
8927
8928 cf_save_LIBS="$LIBS"
8929 echo "$as_me:8929: checking for initscr in -l$cf_nculib_root" >&5
8930echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8931 LIBS="-l$cf_nculib_root $LIBS"
8932 cat >conftest.$ac_ext <<_ACEOF
8933#line 8933 "configure"
8934#include "confdefs.h"
8935#include <${cf_cv_ncurses_header:-curses.h}>
8936int
8937main ()
8938{
8939initscr()
8940 ;
8941 return 0;
8942}
8943_ACEOF
8944rm -f conftest.$ac_objext conftest$ac_exeext
8945if { (eval echo "$as_me:8945: \"$ac_link\"") >&5
8946 (eval $ac_link) 2>&5
8947 ac_status=$?
8948 echo "$as_me:8948: \$? = $ac_status" >&5
8949 (exit $ac_status); } &&
8950 { ac_try='test -s conftest$ac_exeext'
8951 { (eval echo "$as_me:8951: \"$ac_try\"") >&5
8952 (eval $ac_try) 2>&5
8953 ac_status=$?
8954 echo "$as_me:8954: \$? = $ac_status" >&5
8955 (exit $ac_status); }; }; then
8956 echo "$as_me:8956: result: yes" >&5
8957echo "${ECHO_T}yes" >&6
8958 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8959
8960else
8961 echo "$as_me: failed program was:" >&5
8962cat conftest.$ac_ext >&5
8963echo "$as_me:8963: result: no" >&5
8964echo "${ECHO_T}no" >&6
8965
8966cf_search=
8967cf_library_path_list=""
8968if test -n "${LDFLAGS}${LIBS}" ; then
8969 for cf_library_path in $LDFLAGS $LIBS
8970 do
8971 case $cf_library_path in
8972 (-L*)
8973 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8974
8975test "x$cf_library_path" != "xNONE" && \
8976test -d "$cf_library_path" && \
8977 {
8978 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8979 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8980 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8981 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8982 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8983 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"
8984}
8985
8986 cf_library_path_list="$cf_library_path_list $cf_search"
8987 ;;
8988 esac
8989 done
8990fi
8991
8992cf_search=
8993
8994test "x$prefix" != "xNONE" && \
8995test -d "$prefix" && \
8996 {
8997 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8998 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8999 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9000 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9001 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9002 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9003}
9004
9005for cf_subdir_prefix in \
9006 /usr \
9007 /usr/local \
9008 /usr/pkg \
9009 /opt \
9010 /opt/local \
9011 $HOME
9012do
9013
9014test "x$cf_subdir_prefix" != "x$prefix" && \
9015test -d "$cf_subdir_prefix" && \
9016(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9017 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9018 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9019 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9020 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9021 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9022 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"
9023}
9024
9025done
9026
9027cf_search="$cf_library_path_list $cf_search"
9028
9029 for cf_libdir in $cf_search
9030 do
9031 echo "$as_me:9031: checking for -l$cf_nculib_root in $cf_libdir" >&5
9032echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9033 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9034 cat >conftest.$ac_ext <<_ACEOF
9035#line 9035 "configure"
9036#include "confdefs.h"
9037#include <${cf_cv_ncurses_header:-curses.h}>
9038int
9039main ()
9040{
9041initscr()
9042 ;
9043 return 0;
9044}
9045_ACEOF
9046rm -f conftest.$ac_objext conftest$ac_exeext
9047if { (eval echo "$as_me:9047: \"$ac_link\"") >&5
9048 (eval $ac_link) 2>&5
9049 ac_status=$?
9050 echo "$as_me:9050: \$? = $ac_status" >&5
9051 (exit $ac_status); } &&
9052 { ac_try='test -s conftest$ac_exeext'
9053 { (eval echo "$as_me:9053: \"$ac_try\"") >&5
9054 (eval $ac_try) 2>&5
9055 ac_status=$?
9056 echo "$as_me:9056: \$? = $ac_status" >&5
9057 (exit $ac_status); }; }; then
9058 echo "$as_me:9058: result: yes" >&5
9059echo "${ECHO_T}yes" >&6
9060 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9061 break
9062else
9063 echo "$as_me: failed program was:" >&5
9064cat conftest.$ac_ext >&5
9065echo "$as_me:9065: result: no" >&5
9066echo "${ECHO_T}no" >&6
9067 LIBS="$cf_save_LIBS"
9068fi
9069rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9070 done
9071
9072fi
9073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9074
9075fi
9076
9077eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9078
9079if test $cf_found_library = no ; then
9080 { { echo "$as_me:9080: error: Cannot link $cf_nculib_root library" >&5
9081echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9082 { (exit 1); exit 1; }; }
9083fi
9084
9085fi
9086
9087if test -n "$cf_ncurses_LIBS" ; then
9088 echo "$as_me:9088: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9089echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9090 cf_ncurses_SAVE="$LIBS"
9091 for p in $cf_ncurses_LIBS ; do
9092 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9093 if test "$q" != "$LIBS" ; then
9094 LIBS="$q"
9095 fi
9096 done
9097 cat >conftest.$ac_ext <<_ACEOF
9098#line 9098 "configure"
9099#include "confdefs.h"
9100#include <${cf_cv_ncurses_header:-curses.h}>
9101int
9102main ()
9103{
9104initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9105 ;
9106 return 0;
9107}
9108_ACEOF
9109rm -f conftest.$ac_objext conftest$ac_exeext
9110if { (eval echo "$as_me:9110: \"$ac_link\"") >&5
9111 (eval $ac_link) 2>&5
9112 ac_status=$?
9113 echo "$as_me:9113: \$? = $ac_status" >&5
9114 (exit $ac_status); } &&
9115 { ac_try='test -s conftest$ac_exeext'
9116 { (eval echo "$as_me:9116: \"$ac_try\"") >&5
9117 (eval $ac_try) 2>&5
9118 ac_status=$?
9119 echo "$as_me:9119: \$? = $ac_status" >&5
9120 (exit $ac_status); }; }; then
9121 echo "$as_me:9121: result: yes" >&5
9122echo "${ECHO_T}yes" >&6
9123else
9124 echo "$as_me: failed program was:" >&5
9125cat conftest.$ac_ext >&5
9126echo "$as_me:9126: result: no" >&5
9127echo "${ECHO_T}no" >&6
9128 LIBS="$cf_ncurses_SAVE"
9129fi
9130rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9131fi
9132
9133cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9134
9135cat >>confdefs.h <<EOF
9136#define $cf_nculib_ROOT 1
9137EOF
9138
9139 fi
9140else
9141 NCURSES_CONFIG=none
9142fi
9143
9144 ;;
9145(pdcurses)
9146 echo "$as_me:9146: checking for X" >&5
9147echo $ECHO_N "checking for X... $ECHO_C" >&6
9148
9149# Check whether --with-x or --without-x was given.
9150if test "${with_x+set}" = set; then
9151 withval="$with_x"
9152
9153fi;
9154# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9155if test "x$with_x" = xno; then
9156 # The user explicitly disabled X.
9157 have_x=disabled
9158else
9159 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9160 # Both variables are already set.
9161 have_x=yes
9162 else
9163 if test "${ac_cv_have_x+set}" = set; then
9164 echo $ECHO_N "(cached) $ECHO_C" >&6
9165else
9166 # One or both of the vars are not set, and there is no cached value.
9167ac_x_includes=no ac_x_libraries=no
9168rm -fr conftest.dir
9169if mkdir conftest.dir; then
9170 cd conftest.dir
9171 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9172 cat >Imakefile <<'EOF'
9173acfindx:
9174 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9175EOF
9176 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9177 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9178 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9179 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9180 for ac_extension in a so sl dylib dll; do
9181 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9182 test -f $ac_im_libdir/libX11.$ac_extension; then
9183 ac_im_usrlibdir=$ac_im_libdir; break
9184 fi
9185 done
9186 # Screen out bogus values from the imake configuration. They are
9187 # bogus both because they are the default anyway, and because
9188 # using them would break gcc on systems where it needs fixed includes.
9189 case $ac_im_incroot in
9190 /usr/include) ;;
9191 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9192 esac
9193 case $ac_im_usrlibdir in
9194 /usr/lib | /lib) ;;
9195 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9196 esac
9197 fi
9198 cd ..
9199 rm -fr conftest.dir
9200fi
9201
9202# Standard set of common directories for X headers.
9203# Check X11 before X11Rn because it is often a symlink to the current release.
9204ac_x_header_dirs='
9205/usr/X11/include
9206/usr/X11R6/include
9207/usr/X11R5/include
9208/usr/X11R4/include
9209
9210/usr/include/X11
9211/usr/include/X11R6
9212/usr/include/X11R5
9213/usr/include/X11R4
9214
9215/usr/local/X11/include
9216/usr/local/X11R6/include
9217/usr/local/X11R5/include
9218/usr/local/X11R4/include
9219
9220/usr/local/include/X11
9221/usr/local/include/X11R6
9222/usr/local/include/X11R5
9223/usr/local/include/X11R4
9224
9225/usr/X386/include
9226/usr/x386/include
9227/usr/XFree86/include/X11
9228
9229/usr/include
9230/usr/local/include
9231/usr/unsupported/include
9232/usr/athena/include
9233/usr/local/x11r5/include
9234/usr/lpp/Xamples/include
9235
9236/usr/openwin/include
9237/usr/openwin/share/include'
9238
9239if test "$ac_x_includes" = no; then
9240 # Guess where to find include files, by looking for Intrinsic.h.
9241 # First, try using that file with no special directory specified.
9242 cat >conftest.$ac_ext <<_ACEOF
9243#line 9243 "configure"
9244#include "confdefs.h"
9245#include <X11/Intrinsic.h>
9246_ACEOF
9247if { (eval echo "$as_me:9247: \"$ac_cpp conftest.$ac_ext\"") >&5
9248 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9249 ac_status=$?
9250 egrep -v '^ *\+' conftest.er1 >conftest.err
9251 rm -f conftest.er1
9252 cat conftest.err >&5
9253 echo "$as_me:9253: \$? = $ac_status" >&5
9254 (exit $ac_status); } >/dev/null; then
9255 if test -s conftest.err; then
9256 ac_cpp_err=$ac_c_preproc_warn_flag
9257 else
9258 ac_cpp_err=
9259 fi
9260else
9261 ac_cpp_err=yes
9262fi
9263if test -z "$ac_cpp_err"; then
9264 # We can compile using X headers with no special include directory.
9265ac_x_includes=
9266else
9267 echo "$as_me: failed program was:" >&5
9268 cat conftest.$ac_ext >&5
9269 for ac_dir in $ac_x_header_dirs; do
9270 if test -r "$ac_dir/X11/Intrinsic.h"; then
9271 ac_x_includes=$ac_dir
9272 break
9273 fi
9274done
9275fi
9276rm -f conftest.err conftest.$ac_ext
9277fi # $ac_x_includes = no
9278
9279if test "$ac_x_libraries" = no; then
9280 # Check for the libraries.
9281 # See if we find them without any special options.
9282 # Don't add to $LIBS permanently.
9283 ac_save_LIBS=$LIBS
9284 LIBS="-lXt $LIBS"
9285 cat >conftest.$ac_ext <<_ACEOF
9286#line 9286 "configure"
9287#include "confdefs.h"
9288#include <X11/Intrinsic.h>
9289int
9290main ()
9291{
9292XtMalloc (0)
9293 ;
9294 return 0;
9295}
9296_ACEOF
9297rm -f conftest.$ac_objext conftest$ac_exeext
9298if { (eval echo "$as_me:9298: \"$ac_link\"") >&5
9299 (eval $ac_link) 2>&5
9300 ac_status=$?
9301 echo "$as_me:9301: \$? = $ac_status" >&5
9302 (exit $ac_status); } &&
9303 { ac_try='test -s conftest$ac_exeext'
9304 { (eval echo "$as_me:9304: \"$ac_try\"") >&5
9305 (eval $ac_try) 2>&5
9306 ac_status=$?
9307 echo "$as_me:9307: \$? = $ac_status" >&5
9308 (exit $ac_status); }; }; then
9309 LIBS=$ac_save_LIBS
9310# We can link X programs with no special library path.
9311ac_x_libraries=
9312else
9313 echo "$as_me: failed program was:" >&5
9314cat conftest.$ac_ext >&5
9315LIBS=$ac_save_LIBS
9316for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9317do
9318 # Don't even attempt the hair of trying to link an X program!
9319 for ac_extension in a so sl dylib dll; do
9320 if test -r $ac_dir/libXt.$ac_extension; then
9321 ac_x_libraries=$ac_dir
9322 break 2
9323 fi
9324 done
9325done
9326fi
9327rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9328fi # $ac_x_libraries = no
9329
9330if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9331 # Didn't find X anywhere. Cache the known absence of X.
9332 ac_cv_have_x="have_x=no"
9333else
9334 # Record where we found X for the cache.
9335 ac_cv_have_x="have_x=yes \
9336 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9337fi
9338fi
9339
9340 fi
9341 eval "$ac_cv_have_x"
9342fi # $with_x != no
9343
9344if test "$have_x" != yes; then
9345 echo "$as_me:9345: result: $have_x" >&5
9346echo "${ECHO_T}$have_x" >&6
9347 no_x=yes
9348else
9349 # If each of the values was on the command line, it overrides each guess.
9350 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9351 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9352 # Update the cache value to reflect the command line values.
9353 ac_cv_have_x="have_x=yes \
9354 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9355 echo "$as_me:9355: result: libraries $x_libraries, headers $x_includes" >&5
9356echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9357fi
9358
9359if test "$no_x" = yes; then
9360 # Not all programs may use this symbol, but it does not hurt to define it.
9361
9362cat >>confdefs.h <<\EOF
9363#define X_DISPLAY_MISSING 1
9364EOF
9365
9366 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9367else
9368 if test -n "$x_includes"; then
9369 X_CFLAGS="$X_CFLAGS -I$x_includes"
9370 fi
9371
9372 # It would also be nice to do this for all -L options, not just this one.
9373 if test -n "$x_libraries"; then
9374 X_LIBS="$X_LIBS -L$x_libraries"
9375 # For Solaris; some versions of Sun CC require a space after -R and
9376 # others require no space. Words are not sufficient . . . .
9377 case `(uname -sr) 2>/dev/null` in
9378 "SunOS 5"*)
9379 echo "$as_me:9379: checking whether -R must be followed by a space" >&5
9380echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9381 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9382 cat >conftest.$ac_ext <<_ACEOF
9383#line 9383 "configure"
9384#include "confdefs.h"
9385
9386int
9387main ()
9388{
9389
9390 ;
9391 return 0;
9392}
9393_ACEOF
9394rm -f conftest.$ac_objext conftest$ac_exeext
9395if { (eval echo "$as_me:9395: \"$ac_link\"") >&5
9396 (eval $ac_link) 2>&5
9397 ac_status=$?
9398 echo "$as_me:9398: \$? = $ac_status" >&5
9399 (exit $ac_status); } &&
9400 { ac_try='test -s conftest$ac_exeext'
9401 { (eval echo "$as_me:9401: \"$ac_try\"") >&5
9402 (eval $ac_try) 2>&5
9403 ac_status=$?
9404 echo "$as_me:9404: \$? = $ac_status" >&5
9405 (exit $ac_status); }; }; then
9406 ac_R_nospace=yes
9407else
9408 echo "$as_me: failed program was:" >&5
9409cat conftest.$ac_ext >&5
9410ac_R_nospace=no
9411fi
9412rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9413 if test $ac_R_nospace = yes; then
9414 echo "$as_me:9414: result: no" >&5
9415echo "${ECHO_T}no" >&6
9416 X_LIBS="$X_LIBS -R$x_libraries"
9417 else
9418 LIBS="$ac_xsave_LIBS -R $x_libraries"
9419 cat >conftest.$ac_ext <<_ACEOF
9420#line 9420 "configure"
9421#include "confdefs.h"
9422
9423int
9424main ()
9425{
9426
9427 ;
9428 return 0;
9429}
9430_ACEOF
9431rm -f conftest.$ac_objext conftest$ac_exeext
9432if { (eval echo "$as_me:9432: \"$ac_link\"") >&5
9433 (eval $ac_link) 2>&5
9434 ac_status=$?
9435 echo "$as_me:9435: \$? = $ac_status" >&5
9436 (exit $ac_status); } &&
9437 { ac_try='test -s conftest$ac_exeext'
9438 { (eval echo "$as_me:9438: \"$ac_try\"") >&5
9439 (eval $ac_try) 2>&5
9440 ac_status=$?
9441 echo "$as_me:9441: \$? = $ac_status" >&5
9442 (exit $ac_status); }; }; then
9443 ac_R_space=yes
9444else
9445 echo "$as_me: failed program was:" >&5
9446cat conftest.$ac_ext >&5
9447ac_R_space=no
9448fi
9449rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9450 if test $ac_R_space = yes; then
9451 echo "$as_me:9451: result: yes" >&5
9452echo "${ECHO_T}yes" >&6
9453 X_LIBS="$X_LIBS -R $x_libraries"
9454 else
9455 echo "$as_me:9455: result: neither works" >&5
9456echo "${ECHO_T}neither works" >&6
9457 fi
9458 fi
9459 LIBS=$ac_xsave_LIBS
9460 esac
9461 fi
9462
9463 # Check for system-dependent libraries X programs must link with.
9464 # Do this before checking for the system-independent R6 libraries
9465 # (-lICE), since we may need -lsocket or whatever for X linking.
9466
9467 if test "$ISC" = yes; then
9468 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9469 else
9470 # Martyn Johnson says this is needed for Ultrix, if the X
9471 # libraries were built with DECnet support. And Karl Berry says
9472 # the Alpha needs dnet_stub (dnet does not exist).
9473 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9474 cat >conftest.$ac_ext <<_ACEOF
9475#line 9475 "configure"
9476#include "confdefs.h"
9477
9478/* Override any gcc2 internal prototype to avoid an error. */
9479#ifdef __cplusplus
9480extern "C"
9481#endif
9482/* We use char because int might match the return type of a gcc2
9483 builtin and then its argument prototype would still apply. */
9484char XOpenDisplay ();
9485int
9486main ()
9487{
9488XOpenDisplay ();
9489 ;
9490 return 0;
9491}
9492_ACEOF
9493rm -f conftest.$ac_objext conftest$ac_exeext
9494if { (eval echo "$as_me:9494: \"$ac_link\"") >&5
9495 (eval $ac_link) 2>&5
9496 ac_status=$?
9497 echo "$as_me:9497: \$? = $ac_status" >&5
9498 (exit $ac_status); } &&
9499 { ac_try='test -s conftest$ac_exeext'
9500 { (eval echo "$as_me:9500: \"$ac_try\"") >&5
9501 (eval $ac_try) 2>&5
9502 ac_status=$?
9503 echo "$as_me:9503: \$? = $ac_status" >&5
9504 (exit $ac_status); }; }; then
9505 :
9506else
9507 echo "$as_me: failed program was:" >&5
9508cat conftest.$ac_ext >&5
9509echo "$as_me:9509: checking for dnet_ntoa in -ldnet" >&5
9510echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9511if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9512 echo $ECHO_N "(cached) $ECHO_C" >&6
9513else
9514 ac_check_lib_save_LIBS=$LIBS
9515LIBS="-ldnet $LIBS"
9516cat >conftest.$ac_ext <<_ACEOF
9517#line 9517 "configure"
9518#include "confdefs.h"
9519
9520/* Override any gcc2 internal prototype to avoid an error. */
9521#ifdef __cplusplus
9522extern "C"
9523#endif
9524/* We use char because int might match the return type of a gcc2
9525 builtin and then its argument prototype would still apply. */
9526char dnet_ntoa ();
9527int
9528main ()
9529{
9530dnet_ntoa ();
9531 ;
9532 return 0;
9533}
9534_ACEOF
9535rm -f conftest.$ac_objext conftest$ac_exeext
9536if { (eval echo "$as_me:9536: \"$ac_link\"") >&5
9537 (eval $ac_link) 2>&5
9538 ac_status=$?
9539 echo "$as_me:9539: \$? = $ac_status" >&5
9540 (exit $ac_status); } &&
9541 { ac_try='test -s conftest$ac_exeext'
9542 { (eval echo "$as_me:9542: \"$ac_try\"") >&5
9543 (eval $ac_try) 2>&5
9544 ac_status=$?
9545 echo "$as_me:9545: \$? = $ac_status" >&5
9546 (exit $ac_status); }; }; then
9547 ac_cv_lib_dnet_dnet_ntoa=yes
9548else
9549 echo "$as_me: failed program was:" >&5
9550cat conftest.$ac_ext >&5
9551ac_cv_lib_dnet_dnet_ntoa=no
9552fi
9553rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9554LIBS=$ac_check_lib_save_LIBS
9555fi
9556echo "$as_me:9556: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9557echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9558if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9559 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9560fi
9561
9562 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9563 echo "$as_me:9563: checking for dnet_ntoa in -ldnet_stub" >&5
9564echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9565if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9566 echo $ECHO_N "(cached) $ECHO_C" >&6
9567else
9568 ac_check_lib_save_LIBS=$LIBS
9569LIBS="-ldnet_stub $LIBS"
9570cat >conftest.$ac_ext <<_ACEOF
9571#line 9571 "configure"
9572#include "confdefs.h"
9573
9574/* Override any gcc2 internal prototype to avoid an error. */
9575#ifdef __cplusplus
9576extern "C"
9577#endif
9578/* We use char because int might match the return type of a gcc2
9579 builtin and then its argument prototype would still apply. */
9580char dnet_ntoa ();
9581int
9582main ()
9583{
9584dnet_ntoa ();
9585 ;
9586 return 0;
9587}
9588_ACEOF
9589rm -f conftest.$ac_objext conftest$ac_exeext
9590if { (eval echo "$as_me:9590: \"$ac_link\"") >&5
9591 (eval $ac_link) 2>&5
9592 ac_status=$?
9593 echo "$as_me:9593: \$? = $ac_status" >&5
9594 (exit $ac_status); } &&
9595 { ac_try='test -s conftest$ac_exeext'
9596 { (eval echo "$as_me:9596: \"$ac_try\"") >&5
9597 (eval $ac_try) 2>&5
9598 ac_status=$?
9599 echo "$as_me:9599: \$? = $ac_status" >&5
9600 (exit $ac_status); }; }; then
9601 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9602else
9603 echo "$as_me: failed program was:" >&5
9604cat conftest.$ac_ext >&5
9605ac_cv_lib_dnet_stub_dnet_ntoa=no
9606fi
9607rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9608LIBS=$ac_check_lib_save_LIBS
9609fi
9610echo "$as_me:9610: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9611echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9612if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9613 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9614fi
9615
9616 fi
9617fi
9618rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9619 LIBS="$ac_xsave_LIBS"
9620
9621 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9622 # to get the SysV transport functions.
9623 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9624 # needs -lnsl.
9625 # The nsl library prevents programs from opening the X display
9626 # on Irix 5.2, according to T.E. Dickey.
9627 # The functions gethostbyname, getservbyname, and inet_addr are
9628 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9629 echo "$as_me:9629: checking for gethostbyname" >&5
9630echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9631if test "${ac_cv_func_gethostbyname+set}" = set; then
9632 echo $ECHO_N "(cached) $ECHO_C" >&6
9633else
9634 cat >conftest.$ac_ext <<_ACEOF
9635#line 9635 "configure"
9636#include "confdefs.h"
9637/* System header to define __stub macros and hopefully few prototypes,
9638 which can conflict with char gethostbyname (); below. */
9639#include <assert.h>
9640/* Override any gcc2 internal prototype to avoid an error. */
9641#ifdef __cplusplus
9642extern "C"
9643#endif
9644/* We use char because int might match the return type of a gcc2
9645 builtin and then its argument prototype would still apply. */
9646char gethostbyname ();
9647char (*f) ();
9648
9649int
9650main ()
9651{
9652/* The GNU C library defines this for functions which it implements
9653 to always fail with ENOSYS. Some functions are actually named
9654 something starting with __ and the normal name is an alias. */
9655#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9656choke me
9657#else
9658f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9659#endif
9660
9661 ;
9662 return 0;
9663}
9664_ACEOF
9665rm -f conftest.$ac_objext conftest$ac_exeext
9666if { (eval echo "$as_me:9666: \"$ac_link\"") >&5
9667 (eval $ac_link) 2>&5
9668 ac_status=$?
9669 echo "$as_me:9669: \$? = $ac_status" >&5
9670 (exit $ac_status); } &&
9671 { ac_try='test -s conftest$ac_exeext'
9672 { (eval echo "$as_me:9672: \"$ac_try\"") >&5
9673 (eval $ac_try) 2>&5
9674 ac_status=$?
9675 echo "$as_me:9675: \$? = $ac_status" >&5
9676 (exit $ac_status); }; }; then
9677 ac_cv_func_gethostbyname=yes
9678else
9679 echo "$as_me: failed program was:" >&5
9680cat conftest.$ac_ext >&5
9681ac_cv_func_gethostbyname=no
9682fi
9683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9684fi
9685echo "$as_me:9685: result: $ac_cv_func_gethostbyname" >&5
9686echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9687
9688 if test $ac_cv_func_gethostbyname = no; then
9689 echo "$as_me:9689: checking for gethostbyname in -lnsl" >&5
9690echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9691if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9692 echo $ECHO_N "(cached) $ECHO_C" >&6
9693else
9694 ac_check_lib_save_LIBS=$LIBS
9695LIBS="-lnsl $LIBS"
9696cat >conftest.$ac_ext <<_ACEOF
9697#line 9697 "configure"
9698#include "confdefs.h"
9699
9700/* Override any gcc2 internal prototype to avoid an error. */
9701#ifdef __cplusplus
9702extern "C"
9703#endif
9704/* We use char because int might match the return type of a gcc2
9705 builtin and then its argument prototype would still apply. */
9706char gethostbyname ();
9707int
9708main ()
9709{
9710gethostbyname ();
9711 ;
9712 return 0;
9713}
9714_ACEOF
9715rm -f conftest.$ac_objext conftest$ac_exeext
9716if { (eval echo "$as_me:9716: \"$ac_link\"") >&5
9717 (eval $ac_link) 2>&5
9718 ac_status=$?
9719 echo "$as_me:9719: \$? = $ac_status" >&5
9720 (exit $ac_status); } &&
9721 { ac_try='test -s conftest$ac_exeext'
9722 { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9723 (eval $ac_try) 2>&5
9724 ac_status=$?
9725 echo "$as_me:9725: \$? = $ac_status" >&5
9726 (exit $ac_status); }; }; then
9727 ac_cv_lib_nsl_gethostbyname=yes
9728else
9729 echo "$as_me: failed program was:" >&5
9730cat conftest.$ac_ext >&5
9731ac_cv_lib_nsl_gethostbyname=no
9732fi
9733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9734LIBS=$ac_check_lib_save_LIBS
9735fi
9736echo "$as_me:9736: result: $ac_cv_lib_nsl_gethostbyname" >&5
9737echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9738if test $ac_cv_lib_nsl_gethostbyname = yes; then
9739 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9740fi
9741
9742 if test $ac_cv_lib_nsl_gethostbyname = no; then
9743 echo "$as_me:9743: checking for gethostbyname in -lbsd" >&5
9744echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9745if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9746 echo $ECHO_N "(cached) $ECHO_C" >&6
9747else
9748 ac_check_lib_save_LIBS=$LIBS
9749LIBS="-lbsd $LIBS"
9750cat >conftest.$ac_ext <<_ACEOF
9751#line 9751 "configure"
9752#include "confdefs.h"
9753
9754/* Override any gcc2 internal prototype to avoid an error. */
9755#ifdef __cplusplus
9756extern "C"
9757#endif
9758/* We use char because int might match the return type of a gcc2
9759 builtin and then its argument prototype would still apply. */
9760char gethostbyname ();
9761int
9762main ()
9763{
9764gethostbyname ();
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769rm -f conftest.$ac_objext conftest$ac_exeext
9770if { (eval echo "$as_me:9770: \"$ac_link\"") >&5
9771 (eval $ac_link) 2>&5
9772 ac_status=$?
9773 echo "$as_me:9773: \$? = $ac_status" >&5
9774 (exit $ac_status); } &&
9775 { ac_try='test -s conftest$ac_exeext'
9776 { (eval echo "$as_me:9776: \"$ac_try\"") >&5
9777 (eval $ac_try) 2>&5
9778 ac_status=$?
9779 echo "$as_me:9779: \$? = $ac_status" >&5
9780 (exit $ac_status); }; }; then
9781 ac_cv_lib_bsd_gethostbyname=yes
9782else
9783 echo "$as_me: failed program was:" >&5
9784cat conftest.$ac_ext >&5
9785ac_cv_lib_bsd_gethostbyname=no
9786fi
9787rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9788LIBS=$ac_check_lib_save_LIBS
9789fi
9790echo "$as_me:9790: result: $ac_cv_lib_bsd_gethostbyname" >&5
9791echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9792if test $ac_cv_lib_bsd_gethostbyname = yes; then
9793 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9794fi
9795
9796 fi
9797 fi
9798
9799 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9800 # socket/setsockopt and other routines are undefined under SCO ODT
9801 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
9802 # on later versions), says Simon Leinen: it contains gethostby*
9803 # variants that don't use the nameserver (or something). -lsocket
9804 # must be given before -lnsl if both are needed. We assume that
9805 # if connect needs -lnsl, so does gethostbyname.
9806 echo "$as_me:9806: checking for connect" >&5
9807echo $ECHO_N "checking for connect... $ECHO_C" >&6
9808if test "${ac_cv_func_connect+set}" = set; then
9809 echo $ECHO_N "(cached) $ECHO_C" >&6
9810else
9811 cat >conftest.$ac_ext <<_ACEOF
9812#line 9812 "configure"
9813#include "confdefs.h"
9814/* System header to define __stub macros and hopefully few prototypes,
9815 which can conflict with char connect (); below. */
9816#include <assert.h>
9817/* Override any gcc2 internal prototype to avoid an error. */
9818#ifdef __cplusplus
9819extern "C"
9820#endif
9821/* We use char because int might match the return type of a gcc2
9822 builtin and then its argument prototype would still apply. */
9823char connect ();
9824char (*f) ();
9825
9826int
9827main ()
9828{
9829/* The GNU C library defines this for functions which it implements
9830 to always fail with ENOSYS. Some functions are actually named
9831 something starting with __ and the normal name is an alias. */
9832#if defined (__stub_connect) || defined (__stub___connect)
9833choke me
9834#else
9835f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9836#endif
9837
9838 ;
9839 return 0;
9840}
9841_ACEOF
9842rm -f conftest.$ac_objext conftest$ac_exeext
9843if { (eval echo "$as_me:9843: \"$ac_link\"") >&5
9844 (eval $ac_link) 2>&5
9845 ac_status=$?
9846 echo "$as_me:9846: \$? = $ac_status" >&5
9847 (exit $ac_status); } &&
9848 { ac_try='test -s conftest$ac_exeext'
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 ac_cv_func_connect=yes
9855else
9856 echo "$as_me: failed program was:" >&5
9857cat conftest.$ac_ext >&5
9858ac_cv_func_connect=no
9859fi
9860rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9861fi
9862echo "$as_me:9862: result: $ac_cv_func_connect" >&5
9863echo "${ECHO_T}$ac_cv_func_connect" >&6
9864
9865 if test $ac_cv_func_connect = no; then
9866 echo "$as_me:9866: checking for connect in -lsocket" >&5
9867echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9868if test "${ac_cv_lib_socket_connect+set}" = set; then
9869 echo $ECHO_N "(cached) $ECHO_C" >&6
9870else
9871 ac_check_lib_save_LIBS=$LIBS
9872LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9873cat >conftest.$ac_ext <<_ACEOF
9874#line 9874 "configure"
9875#include "confdefs.h"
9876
9877/* Override any gcc2 internal prototype to avoid an error. */
9878#ifdef __cplusplus
9879extern "C"
9880#endif
9881/* We use char because int might match the return type of a gcc2
9882 builtin and then its argument prototype would still apply. */
9883char connect ();
9884int
9885main ()
9886{
9887connect ();
9888 ;
9889 return 0;
9890}
9891_ACEOF
9892rm -f conftest.$ac_objext conftest$ac_exeext
9893if { (eval echo "$as_me:9893: \"$ac_link\"") >&5
9894 (eval $ac_link) 2>&5
9895 ac_status=$?
9896 echo "$as_me:9896: \$? = $ac_status" >&5
9897 (exit $ac_status); } &&
9898 { ac_try='test -s conftest$ac_exeext'
9899 { (eval echo "$as_me:9899: \"$ac_try\"") >&5
9900 (eval $ac_try) 2>&5
9901 ac_status=$?
9902 echo "$as_me:9902: \$? = $ac_status" >&5
9903 (exit $ac_status); }; }; then
9904 ac_cv_lib_socket_connect=yes
9905else
9906 echo "$as_me: failed program was:" >&5
9907cat conftest.$ac_ext >&5
9908ac_cv_lib_socket_connect=no
9909fi
9910rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9911LIBS=$ac_check_lib_save_LIBS
9912fi
9913echo "$as_me:9913: result: $ac_cv_lib_socket_connect" >&5
9914echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9915if test $ac_cv_lib_socket_connect = yes; then
9916 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9917fi
9918
9919 fi
9920
9921 # Guillermo Gomez says -lposix is necessary on A/UX.
9922 echo "$as_me:9922: checking for remove" >&5
9923echo $ECHO_N "checking for remove... $ECHO_C" >&6
9924if test "${ac_cv_func_remove+set}" = set; then
9925 echo $ECHO_N "(cached) $ECHO_C" >&6
9926else
9927 cat >conftest.$ac_ext <<_ACEOF
9928#line 9928 "configure"
9929#include "confdefs.h"
9930/* System header to define __stub macros and hopefully few prototypes,
9931 which can conflict with char remove (); below. */
9932#include <assert.h>
9933/* Override any gcc2 internal prototype to avoid an error. */
9934#ifdef __cplusplus
9935extern "C"
9936#endif
9937/* We use char because int might match the return type of a gcc2
9938 builtin and then its argument prototype would still apply. */
9939char remove ();
9940char (*f) ();
9941
9942int
9943main ()
9944{
9945/* The GNU C library defines this for functions which it implements
9946 to always fail with ENOSYS. Some functions are actually named
9947 something starting with __ and the normal name is an alias. */
9948#if defined (__stub_remove) || defined (__stub___remove)
9949choke me
9950#else
9951f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9952#endif
9953
9954 ;
9955 return 0;
9956}
9957_ACEOF
9958rm -f conftest.$ac_objext conftest$ac_exeext
9959if { (eval echo "$as_me:9959: \"$ac_link\"") >&5
9960 (eval $ac_link) 2>&5
9961 ac_status=$?
9962 echo "$as_me:9962: \$? = $ac_status" >&5
9963 (exit $ac_status); } &&
9964 { ac_try='test -s conftest$ac_exeext'
9965 { (eval echo "$as_me:9965: \"$ac_try\"") >&5
9966 (eval $ac_try) 2>&5
9967 ac_status=$?
9968 echo "$as_me:9968: \$? = $ac_status" >&5
9969 (exit $ac_status); }; }; then
9970 ac_cv_func_remove=yes
9971else
9972 echo "$as_me: failed program was:" >&5
9973cat conftest.$ac_ext >&5
9974ac_cv_func_remove=no
9975fi
9976rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9977fi
9978echo "$as_me:9978: result: $ac_cv_func_remove" >&5
9979echo "${ECHO_T}$ac_cv_func_remove" >&6
9980
9981 if test $ac_cv_func_remove = no; then
9982 echo "$as_me:9982: checking for remove in -lposix" >&5
9983echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9984if test "${ac_cv_lib_posix_remove+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
9986else
9987 ac_check_lib_save_LIBS=$LIBS
9988LIBS="-lposix $LIBS"
9989cat >conftest.$ac_ext <<_ACEOF
9990#line 9990 "configure"
9991#include "confdefs.h"
9992
9993/* Override any gcc2 internal prototype to avoid an error. */
9994#ifdef __cplusplus
9995extern "C"
9996#endif
9997/* We use char because int might match the return type of a gcc2
9998 builtin and then its argument prototype would still apply. */
9999char remove ();
10000int
10001main ()
10002{
10003remove ();
10004 ;
10005 return 0;
10006}
10007_ACEOF
10008rm -f conftest.$ac_objext conftest$ac_exeext
10009if { (eval echo "$as_me:10009: \"$ac_link\"") >&5
10010 (eval $ac_link) 2>&5
10011 ac_status=$?
10012 echo "$as_me:10012: \$? = $ac_status" >&5
10013 (exit $ac_status); } &&
10014 { ac_try='test -s conftest$ac_exeext'
10015 { (eval echo "$as_me:10015: \"$ac_try\"") >&5
10016 (eval $ac_try) 2>&5
10017 ac_status=$?
10018 echo "$as_me:10018: \$? = $ac_status" >&5
10019 (exit $ac_status); }; }; then
10020 ac_cv_lib_posix_remove=yes
10021else
10022 echo "$as_me: failed program was:" >&5
10023cat conftest.$ac_ext >&5
10024ac_cv_lib_posix_remove=no
10025fi
10026rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10027LIBS=$ac_check_lib_save_LIBS
10028fi
10029echo "$as_me:10029: result: $ac_cv_lib_posix_remove" >&5
10030echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10031if test $ac_cv_lib_posix_remove = yes; then
10032 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10033fi
10034
10035 fi
10036
10037 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10038 echo "$as_me:10038: checking for shmat" >&5
10039echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10040if test "${ac_cv_func_shmat+set}" = set; then
10041 echo $ECHO_N "(cached) $ECHO_C" >&6
10042else
10043 cat >conftest.$ac_ext <<_ACEOF
10044#line 10044 "configure"
10045#include "confdefs.h"
10046/* System header to define __stub macros and hopefully few prototypes,
10047 which can conflict with char shmat (); below. */
10048#include <assert.h>
10049/* Override any gcc2 internal prototype to avoid an error. */
10050#ifdef __cplusplus
10051extern "C"
10052#endif
10053/* We use char because int might match the return type of a gcc2
10054 builtin and then its argument prototype would still apply. */
10055char shmat ();
10056char (*f) ();
10057
10058int
10059main ()
10060{
10061/* The GNU C library defines this for functions which it implements
10062 to always fail with ENOSYS. Some functions are actually named
10063 something starting with __ and the normal name is an alias. */
10064#if defined (__stub_shmat) || defined (__stub___shmat)
10065choke me
10066#else
10067f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10068#endif
10069
10070 ;
10071 return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext conftest$ac_exeext
10075if { (eval echo "$as_me:10075: \"$ac_link\"") >&5
10076 (eval $ac_link) 2>&5
10077 ac_status=$?
10078 echo "$as_me:10078: \$? = $ac_status" >&5
10079 (exit $ac_status); } &&
10080 { ac_try='test -s conftest$ac_exeext'
10081 { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082 (eval $ac_try) 2>&5
10083 ac_status=$?
10084 echo "$as_me:10084: \$? = $ac_status" >&5
10085 (exit $ac_status); }; }; then
10086 ac_cv_func_shmat=yes
10087else
10088 echo "$as_me: failed program was:" >&5
10089cat conftest.$ac_ext >&5
10090ac_cv_func_shmat=no
10091fi
10092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10093fi
10094echo "$as_me:10094: result: $ac_cv_func_shmat" >&5
10095echo "${ECHO_T}$ac_cv_func_shmat" >&6
10096
10097 if test $ac_cv_func_shmat = no; then
10098 echo "$as_me:10098: checking for shmat in -lipc" >&5
10099echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10100if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10101 echo $ECHO_N "(cached) $ECHO_C" >&6
10102else
10103 ac_check_lib_save_LIBS=$LIBS
10104LIBS="-lipc $LIBS"
10105cat >conftest.$ac_ext <<_ACEOF
10106#line 10106 "configure"
10107#include "confdefs.h"
10108
10109/* Override any gcc2 internal prototype to avoid an error. */
10110#ifdef __cplusplus
10111extern "C"
10112#endif
10113/* We use char because int might match the return type of a gcc2
10114 builtin and then its argument prototype would still apply. */
10115char shmat ();
10116int
10117main ()
10118{
10119shmat ();
10120 ;
10121 return 0;
10122}
10123_ACEOF
10124rm -f conftest.$ac_objext conftest$ac_exeext
10125if { (eval echo "$as_me:10125: \"$ac_link\"") >&5
10126 (eval $ac_link) 2>&5
10127 ac_status=$?
10128 echo "$as_me:10128: \$? = $ac_status" >&5
10129 (exit $ac_status); } &&
10130 { ac_try='test -s conftest$ac_exeext'
10131 { (eval echo "$as_me:10131: \"$ac_try\"") >&5
10132 (eval $ac_try) 2>&5
10133 ac_status=$?
10134 echo "$as_me:10134: \$? = $ac_status" >&5
10135 (exit $ac_status); }; }; then
10136 ac_cv_lib_ipc_shmat=yes
10137else
10138 echo "$as_me: failed program was:" >&5
10139cat conftest.$ac_ext >&5
10140ac_cv_lib_ipc_shmat=no
10141fi
10142rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10143LIBS=$ac_check_lib_save_LIBS
10144fi
10145echo "$as_me:10145: result: $ac_cv_lib_ipc_shmat" >&5
10146echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10147if test $ac_cv_lib_ipc_shmat = yes; then
10148 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10149fi
10150
10151 fi
10152 fi
10153
10154 # Check for libraries that X11R6 Xt/Xaw programs need.
10155 ac_save_LDFLAGS=$LDFLAGS
10156 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10157 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10158 # check for ICE first), but we must link in the order -lSM -lICE or
10159 # we get undefined symbols. So assume we have SM if we have ICE.
10160 # These have to be linked with before -lX11, unlike the other
10161 # libraries we check for below, so use a different variable.
10162 # John Interrante, Karl Berry
10163 echo "$as_me:10163: checking for IceConnectionNumber in -lICE" >&5
10164echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10165if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10166 echo $ECHO_N "(cached) $ECHO_C" >&6
10167else
10168 ac_check_lib_save_LIBS=$LIBS
10169LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10170cat >conftest.$ac_ext <<_ACEOF
10171#line 10171 "configure"
10172#include "confdefs.h"
10173
10174/* Override any gcc2 internal prototype to avoid an error. */
10175#ifdef __cplusplus
10176extern "C"
10177#endif
10178/* We use char because int might match the return type of a gcc2
10179 builtin and then its argument prototype would still apply. */
10180char IceConnectionNumber ();
10181int
10182main ()
10183{
10184IceConnectionNumber ();
10185 ;
10186 return 0;
10187}
10188_ACEOF
10189rm -f conftest.$ac_objext conftest$ac_exeext
10190if { (eval echo "$as_me:10190: \"$ac_link\"") >&5
10191 (eval $ac_link) 2>&5
10192 ac_status=$?
10193 echo "$as_me:10193: \$? = $ac_status" >&5
10194 (exit $ac_status); } &&
10195 { ac_try='test -s conftest$ac_exeext'
10196 { (eval echo "$as_me:10196: \"$ac_try\"") >&5
10197 (eval $ac_try) 2>&5
10198 ac_status=$?
10199 echo "$as_me:10199: \$? = $ac_status" >&5
10200 (exit $ac_status); }; }; then
10201 ac_cv_lib_ICE_IceConnectionNumber=yes
10202else
10203 echo "$as_me: failed program was:" >&5
10204cat conftest.$ac_ext >&5
10205ac_cv_lib_ICE_IceConnectionNumber=no
10206fi
10207rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10208LIBS=$ac_check_lib_save_LIBS
10209fi
10210echo "$as_me:10210: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10211echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10212if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10213 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10214fi
10215
10216 LDFLAGS=$ac_save_LDFLAGS
10217
10218fi
10219
10220cf_x_athena=${cf_x_athena:-Xaw}
10221
10222echo "$as_me:10222: checking if you want to link with Xaw 3d library" >&5
10223echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10224withval=
10225
10226# Check whether --with-Xaw3d or --without-Xaw3d was given.
10227if test "${with_Xaw3d+set}" = set; then
10228 withval="$with_Xaw3d"
10229
10230fi;
10231if test "$withval" = yes ; then
10232 cf_x_athena=Xaw3d
10233 echo "$as_me:10233: result: yes" >&5
10234echo "${ECHO_T}yes" >&6
10235else
10236 echo "$as_me:10236: result: no" >&5
10237echo "${ECHO_T}no" >&6
10238fi
10239
10240echo "$as_me:10240: checking if you want to link with Xaw 3d xft library" >&5
10241echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10242withval=
10243
10244# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10245if test "${with_Xaw3dxft+set}" = set; then
10246 withval="$with_Xaw3dxft"
10247
10248fi;
10249if test "$withval" = yes ; then
10250 cf_x_athena=Xaw3dxft
10251 echo "$as_me:10251: result: yes" >&5
10252echo "${ECHO_T}yes" >&6
10253else
10254 echo "$as_me:10254: result: no" >&5
10255echo "${ECHO_T}no" >&6
10256fi
10257
10258echo "$as_me:10258: checking if you want to link with neXT Athena library" >&5
10259echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10260withval=
10261
10262# Check whether --with-neXtaw or --without-neXtaw was given.
10263if test "${with_neXtaw+set}" = set; then
10264 withval="$with_neXtaw"
10265
10266fi;
10267if test "$withval" = yes ; then
10268 cf_x_athena=neXtaw
10269 echo "$as_me:10269: result: yes" >&5
10270echo "${ECHO_T}yes" >&6
10271else
10272 echo "$as_me:10272: result: no" >&5
10273echo "${ECHO_T}no" >&6
10274fi
10275
10276echo "$as_me:10276: checking if you want to link with Athena-Plus library" >&5
10277echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10278withval=
10279
10280# Check whether --with-XawPlus or --without-XawPlus was given.
10281if test "${with_XawPlus+set}" = set; then
10282 withval="$with_XawPlus"
10283
10284fi;
10285if test "$withval" = yes ; then
10286 cf_x_athena=XawPlus
10287 echo "$as_me:10287: result: yes" >&5
10288echo "${ECHO_T}yes" >&6
10289else
10290 echo "$as_me:10290: result: no" >&5
10291echo "${ECHO_T}no" >&6
10292fi
10293
10294cf_x_athena_lib=""
10295
10296if test "$PKG_CONFIG" != none ; then
10297 cf_athena_list=
10298 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10299 for cf_athena_pkg in \
10300 $cf_athena_list \
10301 ${cf_x_athena} \
10302 ${cf_x_athena}-devel \
10303 lib${cf_x_athena} \
10304 lib${cf_x_athena}-devel
10305 do
10306
10307if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10308 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10309
10310echo "${as_me:-configure}:10310: testing found package $cf_athena_pkg ..." 1>&5
10311
10312 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10313 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10314 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10315
10316echo "${as_me:-configure}:10316: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10317
10318 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10319
10320echo "${as_me:-configure}:10320: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10321
10322cf_fix_cppflags=no
10323cf_new_cflags=
10324cf_new_cppflags=
10325cf_new_extra_cppflags=
10326
10327for cf_add_cflags in $cf_pkgconfig_incs
10328do
10329case $cf_fix_cppflags in
10330(no)
10331 case $cf_add_cflags in
10332 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10333 case $cf_add_cflags in
10334 (-D*)
10335 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10336
10337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10338 && test -z "${cf_tst_cflags}" \
10339 && cf_fix_cppflags=yes
10340
10341 if test $cf_fix_cppflags = yes ; then
10342 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10343 continue
10344 elif test "${cf_tst_cflags}" = "\"'" ; then
10345 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10346 continue
10347 fi
10348 ;;
10349 esac
10350 case "$CPPFLAGS" in
10351 (*$cf_add_cflags)
10352 ;;
10353 (*)
10354 case $cf_add_cflags in
10355 (-D*)
10356 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10357
10358CPPFLAGS=`echo "$CPPFLAGS" | \
10359 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10360 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10361
10362 ;;
10363 esac
10364 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10365 ;;
10366 esac
10367 ;;
10368 (*)
10369 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10370 ;;
10371 esac
10372 ;;
10373(yes)
10374 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10375
10376 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10377
10378 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10379 && test -z "${cf_tst_cflags}" \
10380 && cf_fix_cppflags=no
10381 ;;
10382esac
10383done
10384
10385if test -n "$cf_new_cflags" ; then
10386
10387 CFLAGS="$CFLAGS $cf_new_cflags"
10388fi
10389
10390if test -n "$cf_new_cppflags" ; then
10391
10392 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10393fi
10394
10395if test -n "$cf_new_extra_cppflags" ; then
10396
10397 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10398fi
10399
10400cf_add_libs="$cf_pkgconfig_libs"
10401# Filter out duplicates - this happens with badly-designed ".pc" files...
10402for cf_add_1lib in $LIBS
10403do
10404 for cf_add_2lib in $cf_add_libs
10405 do
10406 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10407 then
10408 cf_add_1lib=
10409 break
10410 fi
10411 done
10412 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10413done
10414LIBS="$cf_add_libs"
10415
10416 cf_x_athena_lib="$cf_pkgconfig_libs"
10417
10418cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10419
10420 cat >>confdefs.h <<EOF
10421#define $cf_x_athena_LIBS 1
10422EOF
10423
10424 for cf_trim_lib in Xmu Xt X11
10425 do
10426 case "$LIBS" in
10427 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10428 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10429 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10430
10431echo "${as_me:-configure}:10431: testing ..trimmed $LIBS ..." 1>&5
10432
10433 ;;
10434 esac
10435 done
10436
10437echo "$as_me:10437: checking for usable $cf_x_athena/Xmu package" >&5
10438echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10439if test "${cf_cv_xaw_compat+set}" = set; then
10440 echo $ECHO_N "(cached) $ECHO_C" >&6
10441else
10442
10443cat >conftest.$ac_ext <<_ACEOF
10444#line 10444 "configure"
10445#include "confdefs.h"
10446
10447#include <X11/Xmu/CharSet.h>
10448
10449int
10450main ()
10451{
10452
10453int check = XmuCompareISOLatin1("big", "small")
10454
10455 ;
10456 return 0;
10457}
10458_ACEOF
10459rm -f conftest.$ac_objext conftest$ac_exeext
10460if { (eval echo "$as_me:10460: \"$ac_link\"") >&5
10461 (eval $ac_link) 2>&5
10462 ac_status=$?
10463 echo "$as_me:10463: \$? = $ac_status" >&5
10464 (exit $ac_status); } &&
10465 { ac_try='test -s conftest$ac_exeext'
10466 { (eval echo "$as_me:10466: \"$ac_try\"") >&5
10467 (eval $ac_try) 2>&5
10468 ac_status=$?
10469 echo "$as_me:10469: \$? = $ac_status" >&5
10470 (exit $ac_status); }; }; then
10471 cf_cv_xaw_compat=yes
10472else
10473 echo "$as_me: failed program was:" >&5
10474cat conftest.$ac_ext >&5
10475cf_cv_xaw_compat=no
10476fi
10477rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10478fi
10479echo "$as_me:10479: result: $cf_cv_xaw_compat" >&5
10480echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10481
10482 if test "$cf_cv_xaw_compat" = no
10483 then
10484 # workaround for broken ".pc" files...
10485 case "$cf_x_athena_lib" in
10486 (*-lXmu*)
10487 ;;
10488 (*)
10489 test -n "$verbose" && echo " work around broken package" 1>&6
10490
10491echo "${as_me:-configure}:10491: testing work around broken package ..." 1>&5
10492
10493 cf_save_xmu="$LIBS"
10494 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
10495
10496if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10497 test -n "$verbose" && echo " found package xmu" 1>&6
10498
10499echo "${as_me:-configure}:10499: testing found package xmu ..." 1>&5
10500
10501 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10502 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
10503 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10504
10505echo "${as_me:-configure}:10505: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10506
10507 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10508
10509echo "${as_me:-configure}:10509: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10510
10511cf_fix_cppflags=no
10512cf_new_cflags=
10513cf_new_cppflags=
10514cf_new_extra_cppflags=
10515
10516for cf_add_cflags in $cf_pkgconfig_incs
10517do
10518case $cf_fix_cppflags in
10519(no)
10520 case $cf_add_cflags in
10521 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10522 case $cf_add_cflags in
10523 (-D*)
10524 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10525
10526 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10527 && test -z "${cf_tst_cflags}" \
10528 && cf_fix_cppflags=yes
10529
10530 if test $cf_fix_cppflags = yes ; then
10531 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10532 continue
10533 elif test "${cf_tst_cflags}" = "\"'" ; then
10534 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10535 continue
10536 fi
10537 ;;
10538 esac
10539 case "$CPPFLAGS" in
10540 (*$cf_add_cflags)
10541 ;;
10542 (*)
10543 case $cf_add_cflags in
10544 (-D*)
10545 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10546
10547CPPFLAGS=`echo "$CPPFLAGS" | \
10548 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10549 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10550
10551 ;;
10552 esac
10553 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10554 ;;
10555 esac
10556 ;;
10557 (*)
10558 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10559 ;;
10560 esac
10561 ;;
10562(yes)
10563 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10564
10565 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10566
10567 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10568 && test -z "${cf_tst_cflags}" \
10569 && cf_fix_cppflags=no
10570 ;;
10571esac
10572done
10573
10574if test -n "$cf_new_cflags" ; then
10575
10576 CFLAGS="$CFLAGS $cf_new_cflags"
10577fi
10578
10579if test -n "$cf_new_cppflags" ; then
10580
10581 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10582fi
10583
10584if test -n "$cf_new_extra_cppflags" ; then
10585
10586 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10587fi
10588
10589cf_add_libs="$cf_pkgconfig_libs"
10590# Filter out duplicates - this happens with badly-designed ".pc" files...
10591for cf_add_1lib in $LIBS
10592do
10593 for cf_add_2lib in $cf_add_libs
10594 do
10595 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10596 then
10597 cf_add_1lib=
10598 break
10599 fi
10600 done
10601 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10602done
10603LIBS="$cf_add_libs"
10604
10605 LIBS="$cf_save_xmu"
10606
10607test -n "$verbose" && echo " ...before $LIBS" 1>&6
10608
10609echo "${as_me:-configure}:10609: testing ...before $LIBS ..." 1>&5
10610
10611LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
10612test -n "$verbose" && echo " ...after $LIBS" 1>&6
10613
10614echo "${as_me:-configure}:10614: testing ...after $LIBS ..." 1>&5
10615
10616else
10617 cf_pkgconfig_incs=
10618 cf_pkgconfig_libs=
10619
10620test -n "$verbose" && echo " ...before $LIBS" 1>&6
10621
10622echo "${as_me:-configure}:10622: testing ...before $LIBS ..." 1>&5
10623
10624LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
10625test -n "$verbose" && echo " ...after $LIBS" 1>&6
10626
10627echo "${as_me:-configure}:10627: testing ...after $LIBS ..." 1>&5
10628
10629fi
10630
10631 for cf_trim_lib in Xmu Xt X11
10632 do
10633 case "$LIBS" in
10634 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10635 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10636 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
10637
10638echo "${as_me:-configure}:10638: testing ..trimmed $LIBS ..." 1>&5
10639
10640 ;;
10641 esac
10642 done
10643
10644 ;;
10645 esac
10646 fi
10647
10648 break
10649else
10650 cf_pkgconfig_incs=
10651 cf_pkgconfig_libs=
10652 :
10653fi
10654
10655 done
10656fi
10657
10658if test -z "$cf_x_athena_lib" ; then
10659
10660if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10661 test -n "$verbose" && echo " found package Xext" 1>&6
10662
10663echo "${as_me:-configure}:10663: testing found package Xext ..." 1>&5
10664
10665 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10666 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
10667 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10668
10669echo "${as_me:-configure}:10669: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10670
10671 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10672
10673echo "${as_me:-configure}:10673: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10674
10675cf_fix_cppflags=no
10676cf_new_cflags=
10677cf_new_cppflags=
10678cf_new_extra_cppflags=
10679
10680for cf_add_cflags in $cf_pkgconfig_incs
10681do
10682case $cf_fix_cppflags in
10683(no)
10684 case $cf_add_cflags in
10685 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10686 case $cf_add_cflags in
10687 (-D*)
10688 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10689
10690 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10691 && test -z "${cf_tst_cflags}" \
10692 && cf_fix_cppflags=yes
10693
10694 if test $cf_fix_cppflags = yes ; then
10695 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10696 continue
10697 elif test "${cf_tst_cflags}" = "\"'" ; then
10698 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10699 continue
10700 fi
10701 ;;
10702 esac
10703 case "$CPPFLAGS" in
10704 (*$cf_add_cflags)
10705 ;;
10706 (*)
10707 case $cf_add_cflags in
10708 (-D*)
10709 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10710
10711CPPFLAGS=`echo "$CPPFLAGS" | \
10712 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10713 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10714
10715 ;;
10716 esac
10717 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10718 ;;
10719 esac
10720 ;;
10721 (*)
10722 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10723 ;;
10724 esac
10725 ;;
10726(yes)
10727 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10728
10729 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10730
10731 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10732 && test -z "${cf_tst_cflags}" \
10733 && cf_fix_cppflags=no
10734 ;;
10735esac
10736done
10737
10738if test -n "$cf_new_cflags" ; then
10739
10740 CFLAGS="$CFLAGS $cf_new_cflags"
10741fi
10742
10743if test -n "$cf_new_cppflags" ; then
10744
10745 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10746fi
10747
10748if test -n "$cf_new_extra_cppflags" ; then
10749
10750 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10751fi
10752
10753cf_add_libs="$cf_pkgconfig_libs"
10754# Filter out duplicates - this happens with badly-designed ".pc" files...
10755for cf_add_1lib in $LIBS
10756do
10757 for cf_add_2lib in $cf_add_libs
10758 do
10759 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10760 then
10761 cf_add_1lib=
10762 break
10763 fi
10764 done
10765 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10766done
10767LIBS="$cf_add_libs"
10768
10769 :
10770else
10771 cf_pkgconfig_incs=
10772 cf_pkgconfig_libs=
10773
10774 echo "$as_me:10774: checking for XextCreateExtension in -lXext" >&5
10775echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10776if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10777 echo $ECHO_N "(cached) $ECHO_C" >&6
10778else
10779 ac_check_lib_save_LIBS=$LIBS
10780LIBS="-lXext $LIBS"
10781cat >conftest.$ac_ext <<_ACEOF
10782#line 10782 "configure"
10783#include "confdefs.h"
10784
10785/* Override any gcc2 internal prototype to avoid an error. */
10786#ifdef __cplusplus
10787extern "C"
10788#endif
10789/* We use char because int might match the return type of a gcc2
10790 builtin and then its argument prototype would still apply. */
10791char XextCreateExtension ();
10792int
10793main ()
10794{
10795XextCreateExtension ();
10796 ;
10797 return 0;
10798}
10799_ACEOF
10800rm -f conftest.$ac_objext conftest$ac_exeext
10801if { (eval echo "$as_me:10801: \"$ac_link\"") >&5
10802 (eval $ac_link) 2>&5
10803 ac_status=$?
10804 echo "$as_me:10804: \$? = $ac_status" >&5
10805 (exit $ac_status); } &&
10806 { ac_try='test -s conftest$ac_exeext'
10807 { (eval echo "$as_me:10807: \"$ac_try\"") >&5
10808 (eval $ac_try) 2>&5
10809 ac_status=$?
10810 echo "$as_me:10810: \$? = $ac_status" >&5
10811 (exit $ac_status); }; }; then
10812 ac_cv_lib_Xext_XextCreateExtension=yes
10813else
10814 echo "$as_me: failed program was:" >&5
10815cat conftest.$ac_ext >&5
10816ac_cv_lib_Xext_XextCreateExtension=no
10817fi
10818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10819LIBS=$ac_check_lib_save_LIBS
10820fi
10821echo "$as_me:10821: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10822echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10823if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10824
10825cf_add_libs="-lXext"
10826# Filter out duplicates - this happens with badly-designed ".pc" files...
10827for cf_add_1lib in $LIBS
10828do
10829 for cf_add_2lib in $cf_add_libs
10830 do
10831 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10832 then
10833 cf_add_1lib=
10834 break
10835 fi
10836 done
10837 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10838done
10839LIBS="$cf_add_libs"
10840
10841fi
10842
10843fi
10844
10845# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
10846# in some cases has installed dummy files in the former, other cases replaced
10847# it with a link to the new location). This complicates the configure script.
10848# Check for that pitfall, and recover using pkg-config
10849#
10850# If none of these are set, the configuration is almost certainly broken.
10851if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10852then
10853
10854if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
10855 test -n "$verbose" && echo " found package x11" 1>&6
10856
10857echo "${as_me:-configure}:10857: testing found package x11 ..." 1>&5
10858
10859 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
10860 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
10861 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10862
10863echo "${as_me:-configure}:10863: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10864
10865 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10866
10867echo "${as_me:-configure}:10867: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10868
10869cf_fix_cppflags=no
10870cf_new_cflags=
10871cf_new_cppflags=
10872cf_new_extra_cppflags=
10873
10874for cf_add_cflags in $cf_pkgconfig_incs
10875do
10876case $cf_fix_cppflags in
10877(no)
10878 case $cf_add_cflags in
10879 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10880 case $cf_add_cflags in
10881 (-D*)
10882 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10883
10884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10885 && test -z "${cf_tst_cflags}" \
10886 && cf_fix_cppflags=yes
10887
10888 if test $cf_fix_cppflags = yes ; then
10889 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10890 continue
10891 elif test "${cf_tst_cflags}" = "\"'" ; then
10892 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10893 continue
10894 fi
10895 ;;
10896 esac
10897 case "$CPPFLAGS" in
10898 (*$cf_add_cflags)
10899 ;;
10900 (*)
10901 case $cf_add_cflags in
10902 (-D*)
10903 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10904
10905CPPFLAGS=`echo "$CPPFLAGS" | \
10906 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10907 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10908
10909 ;;
10910 esac
10911 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10912 ;;
10913 esac
10914 ;;
10915 (*)
10916 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10917 ;;
10918 esac
10919 ;;
10920(yes)
10921 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10922
10923 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10924
10925 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10926 && test -z "${cf_tst_cflags}" \
10927 && cf_fix_cppflags=no
10928 ;;
10929esac
10930done
10931
10932if test -n "$cf_new_cflags" ; then
10933
10934 CFLAGS="$CFLAGS $cf_new_cflags"
10935fi
10936
10937if test -n "$cf_new_cppflags" ; then
10938
10939 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10940fi
10941
10942if test -n "$cf_new_extra_cppflags" ; then
10943
10944 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10945fi
10946
10947cf_add_libs="$cf_pkgconfig_libs"
10948# Filter out duplicates - this happens with badly-designed ".pc" files...
10949for cf_add_1lib in $LIBS
10950do
10951 for cf_add_2lib in $cf_add_libs
10952 do
10953 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10954 then
10955 cf_add_1lib=
10956 break
10957 fi
10958 done
10959 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10960done
10961LIBS="$cf_add_libs"
10962
10963 :
10964else
10965 cf_pkgconfig_incs=
10966 cf_pkgconfig_libs=
10967 { echo "$as_me:10967: WARNING: unable to find X11 library" >&5
10968echo "$as_me: WARNING: unable to find X11 library" >&2;}
10969fi
10970
10971if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10972 test -n "$verbose" && echo " found package ice" 1>&6
10973
10974echo "${as_me:-configure}:10974: testing found package ice ..." 1>&5
10975
10976 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10977 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
10978 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10979
10980echo "${as_me:-configure}:10980: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10981
10982 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
10983
10984echo "${as_me:-configure}:10984: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10985
10986cf_fix_cppflags=no
10987cf_new_cflags=
10988cf_new_cppflags=
10989cf_new_extra_cppflags=
10990
10991for cf_add_cflags in $cf_pkgconfig_incs
10992do
10993case $cf_fix_cppflags in
10994(no)
10995 case $cf_add_cflags in
10996 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10997 case $cf_add_cflags in
10998 (-D*)
10999 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11000
11001 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11002 && test -z "${cf_tst_cflags}" \
11003 && cf_fix_cppflags=yes
11004
11005 if test $cf_fix_cppflags = yes ; then
11006 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11007 continue
11008 elif test "${cf_tst_cflags}" = "\"'" ; then
11009 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11010 continue
11011 fi
11012 ;;
11013 esac
11014 case "$CPPFLAGS" in
11015 (*$cf_add_cflags)
11016 ;;
11017 (*)
11018 case $cf_add_cflags in
11019 (-D*)
11020 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11021
11022CPPFLAGS=`echo "$CPPFLAGS" | \
11023 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11024 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11025
11026 ;;
11027 esac
11028 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11029 ;;
11030 esac
11031 ;;
11032 (*)
11033 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11034 ;;
11035 esac
11036 ;;
11037(yes)
11038 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11039
11040 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11041
11042 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11043 && test -z "${cf_tst_cflags}" \
11044 && cf_fix_cppflags=no
11045 ;;
11046esac
11047done
11048
11049if test -n "$cf_new_cflags" ; then
11050
11051 CFLAGS="$CFLAGS $cf_new_cflags"
11052fi
11053
11054if test -n "$cf_new_cppflags" ; then
11055
11056 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11057fi
11058
11059if test -n "$cf_new_extra_cppflags" ; then
11060
11061 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11062fi
11063
11064cf_add_libs="$cf_pkgconfig_libs"
11065# Filter out duplicates - this happens with badly-designed ".pc" files...
11066for cf_add_1lib in $LIBS
11067do
11068 for cf_add_2lib in $cf_add_libs
11069 do
11070 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11071 then
11072 cf_add_1lib=
11073 break
11074 fi
11075 done
11076 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11077done
11078LIBS="$cf_add_libs"
11079
11080 :
11081else
11082 cf_pkgconfig_incs=
11083 cf_pkgconfig_libs=
11084 { echo "$as_me:11084: WARNING: unable to find ICE library" >&5
11085echo "$as_me: WARNING: unable to find ICE library" >&2;}
11086fi
11087
11088if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11089 test -n "$verbose" && echo " found package sm" 1>&6
11090
11091echo "${as_me:-configure}:11091: testing found package sm ..." 1>&5
11092
11093 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11094 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11095 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11096
11097echo "${as_me:-configure}:11097: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11098
11099 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11100
11101echo "${as_me:-configure}:11101: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11102
11103cf_fix_cppflags=no
11104cf_new_cflags=
11105cf_new_cppflags=
11106cf_new_extra_cppflags=
11107
11108for cf_add_cflags in $cf_pkgconfig_incs
11109do
11110case $cf_fix_cppflags in
11111(no)
11112 case $cf_add_cflags in
11113 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11114 case $cf_add_cflags in
11115 (-D*)
11116 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11117
11118 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11119 && test -z "${cf_tst_cflags}" \
11120 && cf_fix_cppflags=yes
11121
11122 if test $cf_fix_cppflags = yes ; then
11123 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11124 continue
11125 elif test "${cf_tst_cflags}" = "\"'" ; then
11126 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11127 continue
11128 fi
11129 ;;
11130 esac
11131 case "$CPPFLAGS" in
11132 (*$cf_add_cflags)
11133 ;;
11134 (*)
11135 case $cf_add_cflags in
11136 (-D*)
11137 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11138
11139CPPFLAGS=`echo "$CPPFLAGS" | \
11140 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11141 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11142
11143 ;;
11144 esac
11145 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11146 ;;
11147 esac
11148 ;;
11149 (*)
11150 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11151 ;;
11152 esac
11153 ;;
11154(yes)
11155 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11156
11157 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11158
11159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11160 && test -z "${cf_tst_cflags}" \
11161 && cf_fix_cppflags=no
11162 ;;
11163esac
11164done
11165
11166if test -n "$cf_new_cflags" ; then
11167
11168 CFLAGS="$CFLAGS $cf_new_cflags"
11169fi
11170
11171if test -n "$cf_new_cppflags" ; then
11172
11173 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11174fi
11175
11176if test -n "$cf_new_extra_cppflags" ; then
11177
11178 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11179fi
11180
11181cf_add_libs="$cf_pkgconfig_libs"
11182# Filter out duplicates - this happens with badly-designed ".pc" files...
11183for cf_add_1lib in $LIBS
11184do
11185 for cf_add_2lib in $cf_add_libs
11186 do
11187 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11188 then
11189 cf_add_1lib=
11190 break
11191 fi
11192 done
11193 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11194done
11195LIBS="$cf_add_libs"
11196
11197 :
11198else
11199 cf_pkgconfig_incs=
11200 cf_pkgconfig_libs=
11201 { echo "$as_me:11201: WARNING: unable to find SM library" >&5
11202echo "$as_me: WARNING: unable to find SM library" >&2;}
11203fi
11204
11205if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11206 test -n "$verbose" && echo " found package xt" 1>&6
11207
11208echo "${as_me:-configure}:11208: testing found package xt ..." 1>&5
11209
11210 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11211 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11212 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11213
11214echo "${as_me:-configure}:11214: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11215
11216 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11217
11218echo "${as_me:-configure}:11218: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11219
11220cf_fix_cppflags=no
11221cf_new_cflags=
11222cf_new_cppflags=
11223cf_new_extra_cppflags=
11224
11225for cf_add_cflags in $cf_pkgconfig_incs
11226do
11227case $cf_fix_cppflags in
11228(no)
11229 case $cf_add_cflags in
11230 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11231 case $cf_add_cflags in
11232 (-D*)
11233 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11234
11235 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11236 && test -z "${cf_tst_cflags}" \
11237 && cf_fix_cppflags=yes
11238
11239 if test $cf_fix_cppflags = yes ; then
11240 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11241 continue
11242 elif test "${cf_tst_cflags}" = "\"'" ; then
11243 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11244 continue
11245 fi
11246 ;;
11247 esac
11248 case "$CPPFLAGS" in
11249 (*$cf_add_cflags)
11250 ;;
11251 (*)
11252 case $cf_add_cflags in
11253 (-D*)
11254 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11255
11256CPPFLAGS=`echo "$CPPFLAGS" | \
11257 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11258 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11259
11260 ;;
11261 esac
11262 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11263 ;;
11264 esac
11265 ;;
11266 (*)
11267 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11268 ;;
11269 esac
11270 ;;
11271(yes)
11272 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11273
11274 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11275
11276 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11277 && test -z "${cf_tst_cflags}" \
11278 && cf_fix_cppflags=no
11279 ;;
11280esac
11281done
11282
11283if test -n "$cf_new_cflags" ; then
11284
11285 CFLAGS="$CFLAGS $cf_new_cflags"
11286fi
11287
11288if test -n "$cf_new_cppflags" ; then
11289
11290 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11291fi
11292
11293if test -n "$cf_new_extra_cppflags" ; then
11294
11295 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11296fi
11297
11298cf_add_libs="$cf_pkgconfig_libs"
11299# Filter out duplicates - this happens with badly-designed ".pc" files...
11300for cf_add_1lib in $LIBS
11301do
11302 for cf_add_2lib in $cf_add_libs
11303 do
11304 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11305 then
11306 cf_add_1lib=
11307 break
11308 fi
11309 done
11310 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11311done
11312LIBS="$cf_add_libs"
11313
11314 :
11315else
11316 cf_pkgconfig_incs=
11317 cf_pkgconfig_libs=
11318 { echo "$as_me:11318: WARNING: unable to find Xt library" >&5
11319echo "$as_me: WARNING: unable to find Xt library" >&2;}
11320fi
11321
11322fi
11323
11324cf_have_X_LIBS=no
11325
11326if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11327 test -n "$verbose" && echo " found package xt" 1>&6
11328
11329echo "${as_me:-configure}:11329: testing found package xt ..." 1>&5
11330
11331 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11332 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11333 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11334
11335echo "${as_me:-configure}:11335: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11336
11337 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11338
11339echo "${as_me:-configure}:11339: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11340
11341cf_fix_cppflags=no
11342cf_new_cflags=
11343cf_new_cppflags=
11344cf_new_extra_cppflags=
11345
11346for cf_add_cflags in $cf_pkgconfig_incs
11347do
11348case $cf_fix_cppflags in
11349(no)
11350 case $cf_add_cflags in
11351 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11352 case $cf_add_cflags in
11353 (-D*)
11354 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11355
11356 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11357 && test -z "${cf_tst_cflags}" \
11358 && cf_fix_cppflags=yes
11359
11360 if test $cf_fix_cppflags = yes ; then
11361 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11362 continue
11363 elif test "${cf_tst_cflags}" = "\"'" ; then
11364 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11365 continue
11366 fi
11367 ;;
11368 esac
11369 case "$CPPFLAGS" in
11370 (*$cf_add_cflags)
11371 ;;
11372 (*)
11373 case $cf_add_cflags in
11374 (-D*)
11375 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11376
11377CPPFLAGS=`echo "$CPPFLAGS" | \
11378 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11379 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11380
11381 ;;
11382 esac
11383 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11384 ;;
11385 esac
11386 ;;
11387 (*)
11388 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11389 ;;
11390 esac
11391 ;;
11392(yes)
11393 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11394
11395 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11396
11397 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11398 && test -z "${cf_tst_cflags}" \
11399 && cf_fix_cppflags=no
11400 ;;
11401esac
11402done
11403
11404if test -n "$cf_new_cflags" ; then
11405
11406 CFLAGS="$CFLAGS $cf_new_cflags"
11407fi
11408
11409if test -n "$cf_new_cppflags" ; then
11410
11411 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11412fi
11413
11414if test -n "$cf_new_extra_cppflags" ; then
11415
11416 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11417fi
11418
11419cf_add_libs="$cf_pkgconfig_libs"
11420# Filter out duplicates - this happens with badly-designed ".pc" files...
11421for cf_add_1lib in $LIBS
11422do
11423 for cf_add_2lib in $cf_add_libs
11424 do
11425 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11426 then
11427 cf_add_1lib=
11428 break
11429 fi
11430 done
11431 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11432done
11433LIBS="$cf_add_libs"
11434
11435 case "x$LIBS" in
11436 (*-lX11*)
11437 ;;
11438 (*)
11439# we have an "xt" package, but it may omit Xt's dependency on X11
11440echo "$as_me:11440: checking for usable X dependency" >&5
11441echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11442if test "${cf_cv_xt_x11_compat+set}" = set; then
11443 echo $ECHO_N "(cached) $ECHO_C" >&6
11444else
11445
11446cat >conftest.$ac_ext <<_ACEOF
11447#line 11447 "configure"
11448#include "confdefs.h"
11449
11450#include <X11/Xlib.h>
11451
11452int
11453main ()
11454{
11455
11456 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11457 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11458 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11459 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11460
11461 ;
11462 return 0;
11463}
11464_ACEOF
11465rm -f conftest.$ac_objext conftest$ac_exeext
11466if { (eval echo "$as_me:11466: \"$ac_link\"") >&5
11467 (eval $ac_link) 2>&5
11468 ac_status=$?
11469 echo "$as_me:11469: \$? = $ac_status" >&5
11470 (exit $ac_status); } &&
11471 { ac_try='test -s conftest$ac_exeext'
11472 { (eval echo "$as_me:11472: \"$ac_try\"") >&5
11473 (eval $ac_try) 2>&5
11474 ac_status=$?
11475 echo "$as_me:11475: \$? = $ac_status" >&5
11476 (exit $ac_status); }; }; then
11477 cf_cv_xt_x11_compat=yes
11478else
11479 echo "$as_me: failed program was:" >&5
11480cat conftest.$ac_ext >&5
11481cf_cv_xt_x11_compat=no
11482fi
11483rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11484fi
11485echo "$as_me:11485: result: $cf_cv_xt_x11_compat" >&5
11486echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11487 if test "$cf_cv_xt_x11_compat" = no
11488 then
11489 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11490
11491echo "${as_me:-configure}:11491: testing work around broken X11 dependency ..." 1>&5
11492
11493 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11494
11495if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11496 test -n "$verbose" && echo " found package x11" 1>&6
11497
11498echo "${as_me:-configure}:11498: testing found package x11 ..." 1>&5
11499
11500 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11501 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11502 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11503
11504echo "${as_me:-configure}:11504: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11505
11506 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11507
11508echo "${as_me:-configure}:11508: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11509
11510cf_fix_cppflags=no
11511cf_new_cflags=
11512cf_new_cppflags=
11513cf_new_extra_cppflags=
11514
11515for cf_add_cflags in $cf_pkgconfig_incs
11516do
11517case $cf_fix_cppflags in
11518(no)
11519 case $cf_add_cflags in
11520 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11521 case $cf_add_cflags in
11522 (-D*)
11523 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11524
11525 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11526 && test -z "${cf_tst_cflags}" \
11527 && cf_fix_cppflags=yes
11528
11529 if test $cf_fix_cppflags = yes ; then
11530 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11531 continue
11532 elif test "${cf_tst_cflags}" = "\"'" ; then
11533 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11534 continue
11535 fi
11536 ;;
11537 esac
11538 case "$CPPFLAGS" in
11539 (*$cf_add_cflags)
11540 ;;
11541 (*)
11542 case $cf_add_cflags in
11543 (-D*)
11544 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11545
11546CPPFLAGS=`echo "$CPPFLAGS" | \
11547 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11548 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11549
11550 ;;
11551 esac
11552 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11553 ;;
11554 esac
11555 ;;
11556 (*)
11557 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11558 ;;
11559 esac
11560 ;;
11561(yes)
11562 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11563
11564 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11565
11566 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11567 && test -z "${cf_tst_cflags}" \
11568 && cf_fix_cppflags=no
11569 ;;
11570esac
11571done
11572
11573if test -n "$cf_new_cflags" ; then
11574
11575 CFLAGS="$CFLAGS $cf_new_cflags"
11576fi
11577
11578if test -n "$cf_new_cppflags" ; then
11579
11580 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11581fi
11582
11583if test -n "$cf_new_extra_cppflags" ; then
11584
11585 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11586fi
11587
11588cf_add_libs="$cf_pkgconfig_libs"
11589# Filter out duplicates - this happens with badly-designed ".pc" files...
11590for cf_add_1lib in $LIBS
11591do
11592 for cf_add_2lib in $cf_add_libs
11593 do
11594 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11595 then
11596 cf_add_1lib=
11597 break
11598 fi
11599 done
11600 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11601done
11602LIBS="$cf_add_libs"
11603
11604 :
11605else
11606 cf_pkgconfig_incs=
11607 cf_pkgconfig_libs=
11608
11609test -n "$verbose" && echo " ...before $LIBS" 1>&6
11610
11611echo "${as_me:-configure}:11611: testing ...before $LIBS ..." 1>&5
11612
11613LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
11614test -n "$verbose" && echo " ...after $LIBS" 1>&6
11615
11616echo "${as_me:-configure}:11616: testing ...after $LIBS ..." 1>&5
11617
11618fi
11619
11620 fi
11621 ;;
11622 esac
11623
11624echo "$as_me:11624: checking for usable X Toolkit package" >&5
11625echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11626if test "${cf_cv_xt_ice_compat+set}" = set; then
11627 echo $ECHO_N "(cached) $ECHO_C" >&6
11628else
11629
11630cat >conftest.$ac_ext <<_ACEOF
11631#line 11631 "configure"
11632#include "confdefs.h"
11633
11634#include <X11/Shell.h>
11635
11636int
11637main ()
11638{
11639int num = IceConnectionNumber(0)
11640
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645rm -f conftest.$ac_objext conftest$ac_exeext
11646if { (eval echo "$as_me:11646: \"$ac_link\"") >&5
11647 (eval $ac_link) 2>&5
11648 ac_status=$?
11649 echo "$as_me:11649: \$? = $ac_status" >&5
11650 (exit $ac_status); } &&
11651 { ac_try='test -s conftest$ac_exeext'
11652 { (eval echo "$as_me:11652: \"$ac_try\"") >&5
11653 (eval $ac_try) 2>&5
11654 ac_status=$?
11655 echo "$as_me:11655: \$? = $ac_status" >&5
11656 (exit $ac_status); }; }; then
11657 cf_cv_xt_ice_compat=yes
11658else
11659 echo "$as_me: failed program was:" >&5
11660cat conftest.$ac_ext >&5
11661cf_cv_xt_ice_compat=no
11662fi
11663rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11664fi
11665echo "$as_me:11665: result: $cf_cv_xt_ice_compat" >&5
11666echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11667
11668 if test "$cf_cv_xt_ice_compat" = no
11669 then
11670 # workaround for broken ".pc" files used for X Toolkit.
11671 case "x$X_PRE_LIBS" in
11672 (*-lICE*)
11673 case "x$LIBS" in
11674 (*-lICE*)
11675 ;;
11676 (*)
11677 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11678
11679echo "${as_me:-configure}:11679: testing work around broken ICE dependency ..." 1>&5
11680
11681if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11682 test -n "$verbose" && echo " found package ice" 1>&6
11683
11684echo "${as_me:-configure}:11684: testing found package ice ..." 1>&5
11685
11686 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11687 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11688 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11689
11690echo "${as_me:-configure}:11690: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11691
11692 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11693
11694echo "${as_me:-configure}:11694: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11695
11696cf_fix_cppflags=no
11697cf_new_cflags=
11698cf_new_cppflags=
11699cf_new_extra_cppflags=
11700
11701for cf_add_cflags in $cf_pkgconfig_incs
11702do
11703case $cf_fix_cppflags in
11704(no)
11705 case $cf_add_cflags in
11706 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11707 case $cf_add_cflags in
11708 (-D*)
11709 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11710
11711 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11712 && test -z "${cf_tst_cflags}" \
11713 && cf_fix_cppflags=yes
11714
11715 if test $cf_fix_cppflags = yes ; then
11716 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11717 continue
11718 elif test "${cf_tst_cflags}" = "\"'" ; then
11719 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11720 continue
11721 fi
11722 ;;
11723 esac
11724 case "$CPPFLAGS" in
11725 (*$cf_add_cflags)
11726 ;;
11727 (*)
11728 case $cf_add_cflags in
11729 (-D*)
11730 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11731
11732CPPFLAGS=`echo "$CPPFLAGS" | \
11733 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11734 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11735
11736 ;;
11737 esac
11738 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11739 ;;
11740 esac
11741 ;;
11742 (*)
11743 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11744 ;;
11745 esac
11746 ;;
11747(yes)
11748 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11749
11750 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11751
11752 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11753 && test -z "${cf_tst_cflags}" \
11754 && cf_fix_cppflags=no
11755 ;;
11756esac
11757done
11758
11759if test -n "$cf_new_cflags" ; then
11760
11761 CFLAGS="$CFLAGS $cf_new_cflags"
11762fi
11763
11764if test -n "$cf_new_cppflags" ; then
11765
11766 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11767fi
11768
11769if test -n "$cf_new_extra_cppflags" ; then
11770
11771 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11772fi
11773
11774cf_add_libs="$cf_pkgconfig_libs"
11775# Filter out duplicates - this happens with badly-designed ".pc" files...
11776for cf_add_1lib in $LIBS
11777do
11778 for cf_add_2lib in $cf_add_libs
11779 do
11780 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11781 then
11782 cf_add_1lib=
11783 break
11784 fi
11785 done
11786 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11787done
11788LIBS="$cf_add_libs"
11789
11790if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11791 test -n "$verbose" && echo " found package sm" 1>&6
11792
11793echo "${as_me:-configure}:11793: testing found package sm ..." 1>&5
11794
11795 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11796 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11797 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11798
11799echo "${as_me:-configure}:11799: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11800
11801 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11802
11803echo "${as_me:-configure}:11803: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11804
11805cf_fix_cppflags=no
11806cf_new_cflags=
11807cf_new_cppflags=
11808cf_new_extra_cppflags=
11809
11810for cf_add_cflags in $cf_pkgconfig_incs
11811do
11812case $cf_fix_cppflags in
11813(no)
11814 case $cf_add_cflags in
11815 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11816 case $cf_add_cflags in
11817 (-D*)
11818 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11819
11820 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11821 && test -z "${cf_tst_cflags}" \
11822 && cf_fix_cppflags=yes
11823
11824 if test $cf_fix_cppflags = yes ; then
11825 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11826 continue
11827 elif test "${cf_tst_cflags}" = "\"'" ; then
11828 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11829 continue
11830 fi
11831 ;;
11832 esac
11833 case "$CPPFLAGS" in
11834 (*$cf_add_cflags)
11835 ;;
11836 (*)
11837 case $cf_add_cflags in
11838 (-D*)
11839 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11840
11841CPPFLAGS=`echo "$CPPFLAGS" | \
11842 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11843 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11844
11845 ;;
11846 esac
11847 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11848 ;;
11849 esac
11850 ;;
11851 (*)
11852 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11853 ;;
11854 esac
11855 ;;
11856(yes)
11857 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11858
11859 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11860
11861 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11862 && test -z "${cf_tst_cflags}" \
11863 && cf_fix_cppflags=no
11864 ;;
11865esac
11866done
11867
11868if test -n "$cf_new_cflags" ; then
11869
11870 CFLAGS="$CFLAGS $cf_new_cflags"
11871fi
11872
11873if test -n "$cf_new_cppflags" ; then
11874
11875 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11876fi
11877
11878if test -n "$cf_new_extra_cppflags" ; then
11879
11880 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11881fi
11882
11883cf_add_libs="$cf_pkgconfig_libs"
11884# Filter out duplicates - this happens with badly-designed ".pc" files...
11885for cf_add_1lib in $LIBS
11886do
11887 for cf_add_2lib in $cf_add_libs
11888 do
11889 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11890 then
11891 cf_add_1lib=
11892 break
11893 fi
11894 done
11895 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11896done
11897LIBS="$cf_add_libs"
11898
11899 :
11900else
11901 cf_pkgconfig_incs=
11902 cf_pkgconfig_libs=
11903 :
11904fi
11905
11906else
11907 cf_pkgconfig_incs=
11908 cf_pkgconfig_libs=
11909
11910test -n "$verbose" && echo " ...before $LIBS" 1>&6
11911
11912echo "${as_me:-configure}:11912: testing ...before $LIBS ..." 1>&5
11913
11914LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
11915test -n "$verbose" && echo " ...after $LIBS" 1>&6
11916
11917echo "${as_me:-configure}:11917: testing ...after $LIBS ..." 1>&5
11918
11919fi
11920
11921 ;;
11922 esac
11923 ;;
11924 esac
11925 fi
11926
11927 cf_have_X_LIBS=yes
11928
11929else
11930 cf_pkgconfig_incs=
11931 cf_pkgconfig_libs=
11932
11933 LDFLAGS="$X_LIBS $LDFLAGS"
11934
11935test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
11936
11937echo "${as_me:-configure}:11937: testing checking additions to CFLAGS ..." 1>&5
11938
11939cf_check_cflags="$CFLAGS"
11940cf_check_cppflags="$CPPFLAGS"
11941
11942cf_fix_cppflags=no
11943cf_new_cflags=
11944cf_new_cppflags=
11945cf_new_extra_cppflags=
11946
11947for cf_add_cflags in $X_CFLAGS
11948do
11949case $cf_fix_cppflags in
11950(no)
11951 case $cf_add_cflags in
11952 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11953 case $cf_add_cflags in
11954 (-D*)
11955 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11956
11957 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11958 && test -z "${cf_tst_cflags}" \
11959 && cf_fix_cppflags=yes
11960
11961 if test $cf_fix_cppflags = yes ; then
11962 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11963 continue
11964 elif test "${cf_tst_cflags}" = "\"'" ; then
11965 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11966 continue
11967 fi
11968 ;;
11969 esac
11970 case "$CPPFLAGS" in
11971 (*$cf_add_cflags)
11972 ;;
11973 (*)
11974 case $cf_add_cflags in
11975 (-D*)
11976 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11977
11978CPPFLAGS=`echo "$CPPFLAGS" | \
11979 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11980 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11981
11982 ;;
11983 esac
11984 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11985 ;;
11986 esac
11987 ;;
11988 (*)
11989 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11990 ;;
11991 esac
11992 ;;
11993(yes)
11994 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11995
11996 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11997
11998 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11999 && test -z "${cf_tst_cflags}" \
12000 && cf_fix_cppflags=no
12001 ;;
12002esac
12003done
12004
12005if test -n "$cf_new_cflags" ; then
12006 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12007
12008echo "${as_me:-configure}:12008: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12009
12010 CFLAGS="$CFLAGS $cf_new_cflags"
12011fi
12012
12013if test -n "$cf_new_cppflags" ; then
12014 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12015
12016echo "${as_me:-configure}:12016: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12017
12018 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12019fi
12020
12021if test -n "$cf_new_extra_cppflags" ; then
12022 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12023
12024echo "${as_me:-configure}:12024: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12025
12026 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12027fi
12028
12029if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12030cat >conftest.$ac_ext <<_ACEOF
12031#line 12031 "configure"
12032#include "confdefs.h"
12033#include <stdio.h>
12034int
12035main ()
12036{
12037printf("Hello world");
12038 ;
12039 return 0;
12040}
12041_ACEOF
12042rm -f conftest.$ac_objext conftest$ac_exeext
12043if { (eval echo "$as_me:12043: \"$ac_link\"") >&5
12044 (eval $ac_link) 2>&5
12045 ac_status=$?
12046 echo "$as_me:12046: \$? = $ac_status" >&5
12047 (exit $ac_status); } &&
12048 { ac_try='test -s conftest$ac_exeext'
12049 { (eval echo "$as_me:12049: \"$ac_try\"") >&5
12050 (eval $ac_try) 2>&5
12051 ac_status=$?
12052 echo "$as_me:12052: \$? = $ac_status" >&5
12053 (exit $ac_status); }; }; then
12054 :
12055else
12056 echo "$as_me: failed program was:" >&5
12057cat conftest.$ac_ext >&5
12058test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12059
12060echo "${as_me:-configure}:12060: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12061
12062 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12063 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12064
12065echo "${as_me:-configure}:12065: testing but keeping change to \$CPPFLAGS ..." 1>&5
12066
12067 fi
12068 CFLAGS="$cf_check_flags"
12069fi
12070rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12071fi
12072
12073 echo "$as_me:12073: checking for XOpenDisplay" >&5
12074echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12075if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12076 echo $ECHO_N "(cached) $ECHO_C" >&6
12077else
12078 cat >conftest.$ac_ext <<_ACEOF
12079#line 12079 "configure"
12080#include "confdefs.h"
12081/* System header to define __stub macros and hopefully few prototypes,
12082 which can conflict with char XOpenDisplay (); below. */
12083#include <assert.h>
12084/* Override any gcc2 internal prototype to avoid an error. */
12085#ifdef __cplusplus
12086extern "C"
12087#endif
12088/* We use char because int might match the return type of a gcc2
12089 builtin and then its argument prototype would still apply. */
12090char XOpenDisplay ();
12091char (*f) ();
12092
12093int
12094main ()
12095{
12096/* The GNU C library defines this for functions which it implements
12097 to always fail with ENOSYS. Some functions are actually named
12098 something starting with __ and the normal name is an alias. */
12099#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12100choke me
12101#else
12102f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12103#endif
12104
12105 ;
12106 return 0;
12107}
12108_ACEOF
12109rm -f conftest.$ac_objext conftest$ac_exeext
12110if { (eval echo "$as_me:12110: \"$ac_link\"") >&5
12111 (eval $ac_link) 2>&5
12112 ac_status=$?
12113 echo "$as_me:12113: \$? = $ac_status" >&5
12114 (exit $ac_status); } &&
12115 { ac_try='test -s conftest$ac_exeext'
12116 { (eval echo "$as_me:12116: \"$ac_try\"") >&5
12117 (eval $ac_try) 2>&5
12118 ac_status=$?
12119 echo "$as_me:12119: \$? = $ac_status" >&5
12120 (exit $ac_status); }; }; then
12121 ac_cv_func_XOpenDisplay=yes
12122else
12123 echo "$as_me: failed program was:" >&5
12124cat conftest.$ac_ext >&5
12125ac_cv_func_XOpenDisplay=no
12126fi
12127rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12128fi
12129echo "$as_me:12129: result: $ac_cv_func_XOpenDisplay" >&5
12130echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12131if test $ac_cv_func_XOpenDisplay = yes; then
12132 :
12133else
12134
12135 echo "$as_me:12135: checking for XOpenDisplay in -lX11" >&5
12136echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12137if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12138 echo $ECHO_N "(cached) $ECHO_C" >&6
12139else
12140 ac_check_lib_save_LIBS=$LIBS
12141LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12142cat >conftest.$ac_ext <<_ACEOF
12143#line 12143 "configure"
12144#include "confdefs.h"
12145
12146/* Override any gcc2 internal prototype to avoid an error. */
12147#ifdef __cplusplus
12148extern "C"
12149#endif
12150/* We use char because int might match the return type of a gcc2
12151 builtin and then its argument prototype would still apply. */
12152char XOpenDisplay ();
12153int
12154main ()
12155{
12156XOpenDisplay ();
12157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext conftest$ac_exeext
12162if { (eval echo "$as_me:12162: \"$ac_link\"") >&5
12163 (eval $ac_link) 2>&5
12164 ac_status=$?
12165 echo "$as_me:12165: \$? = $ac_status" >&5
12166 (exit $ac_status); } &&
12167 { ac_try='test -s conftest$ac_exeext'
12168 { (eval echo "$as_me:12168: \"$ac_try\"") >&5
12169 (eval $ac_try) 2>&5
12170 ac_status=$?
12171 echo "$as_me:12171: \$? = $ac_status" >&5
12172 (exit $ac_status); }; }; then
12173 ac_cv_lib_X11_XOpenDisplay=yes
12174else
12175 echo "$as_me: failed program was:" >&5
12176cat conftest.$ac_ext >&5
12177ac_cv_lib_X11_XOpenDisplay=no
12178fi
12179rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12180LIBS=$ac_check_lib_save_LIBS
12181fi
12182echo "$as_me:12182: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12183echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12184if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12185
12186cf_add_libs="-lX11"
12187# Filter out duplicates - this happens with badly-designed ".pc" files...
12188for cf_add_1lib in $LIBS
12189do
12190 for cf_add_2lib in $cf_add_libs
12191 do
12192 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12193 then
12194 cf_add_1lib=
12195 break
12196 fi
12197 done
12198 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12199done
12200LIBS="$cf_add_libs"
12201
12202fi
12203
12204fi
12205
12206 echo "$as_me:12206: checking for XtAppInitialize" >&5
12207echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12208if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12209 echo $ECHO_N "(cached) $ECHO_C" >&6
12210else
12211 cat >conftest.$ac_ext <<_ACEOF
12212#line 12212 "configure"
12213#include "confdefs.h"
12214/* System header to define __stub macros and hopefully few prototypes,
12215 which can conflict with char XtAppInitialize (); below. */
12216#include <assert.h>
12217/* Override any gcc2 internal prototype to avoid an error. */
12218#ifdef __cplusplus
12219extern "C"
12220#endif
12221/* We use char because int might match the return type of a gcc2
12222 builtin and then its argument prototype would still apply. */
12223char XtAppInitialize ();
12224char (*f) ();
12225
12226int
12227main ()
12228{
12229/* The GNU C library defines this for functions which it implements
12230 to always fail with ENOSYS. Some functions are actually named
12231 something starting with __ and the normal name is an alias. */
12232#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12233choke me
12234#else
12235f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12236#endif
12237
12238 ;
12239 return 0;
12240}
12241_ACEOF
12242rm -f conftest.$ac_objext conftest$ac_exeext
12243if { (eval echo "$as_me:12243: \"$ac_link\"") >&5
12244 (eval $ac_link) 2>&5
12245 ac_status=$?
12246 echo "$as_me:12246: \$? = $ac_status" >&5
12247 (exit $ac_status); } &&
12248 { ac_try='test -s conftest$ac_exeext'
12249 { (eval echo "$as_me:12249: \"$ac_try\"") >&5
12250 (eval $ac_try) 2>&5
12251 ac_status=$?
12252 echo "$as_me:12252: \$? = $ac_status" >&5
12253 (exit $ac_status); }; }; then
12254 ac_cv_func_XtAppInitialize=yes
12255else
12256 echo "$as_me: failed program was:" >&5
12257cat conftest.$ac_ext >&5
12258ac_cv_func_XtAppInitialize=no
12259fi
12260rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12261fi
12262echo "$as_me:12262: result: $ac_cv_func_XtAppInitialize" >&5
12263echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12264if test $ac_cv_func_XtAppInitialize = yes; then
12265 :
12266else
12267
12268 echo "$as_me:12268: checking for XtAppInitialize in -lXt" >&5
12269echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12270if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12271 echo $ECHO_N "(cached) $ECHO_C" >&6
12272else
12273 ac_check_lib_save_LIBS=$LIBS
12274LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12275cat >conftest.$ac_ext <<_ACEOF
12276#line 12276 "configure"
12277#include "confdefs.h"
12278
12279/* Override any gcc2 internal prototype to avoid an error. */
12280#ifdef __cplusplus
12281extern "C"
12282#endif
12283/* We use char because int might match the return type of a gcc2
12284 builtin and then its argument prototype would still apply. */
12285char XtAppInitialize ();
12286int
12287main ()
12288{
12289XtAppInitialize ();
12290 ;
12291 return 0;
12292}
12293_ACEOF
12294rm -f conftest.$ac_objext conftest$ac_exeext
12295if { (eval echo "$as_me:12295: \"$ac_link\"") >&5
12296 (eval $ac_link) 2>&5
12297 ac_status=$?
12298 echo "$as_me:12298: \$? = $ac_status" >&5
12299 (exit $ac_status); } &&
12300 { ac_try='test -s conftest$ac_exeext'
12301 { (eval echo "$as_me:12301: \"$ac_try\"") >&5
12302 (eval $ac_try) 2>&5
12303 ac_status=$?
12304 echo "$as_me:12304: \$? = $ac_status" >&5
12305 (exit $ac_status); }; }; then
12306 ac_cv_lib_Xt_XtAppInitialize=yes
12307else
12308 echo "$as_me: failed program was:" >&5
12309cat conftest.$ac_ext >&5
12310ac_cv_lib_Xt_XtAppInitialize=no
12311fi
12312rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12313LIBS=$ac_check_lib_save_LIBS
12314fi
12315echo "$as_me:12315: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12316echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12317if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12318
12319cat >>confdefs.h <<\EOF
12320#define HAVE_LIBXT 1
12321EOF
12322
12323 cf_have_X_LIBS=Xt
12324 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12325fi
12326
12327fi
12328
12329fi
12330
12331if test $cf_have_X_LIBS = no ; then
12332 { echo "$as_me:12332: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12333test program. You will have to check and add the proper libraries by hand
12334to makefile." >&5
12335echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12336test program. You will have to check and add the proper libraries by hand
12337to makefile." >&2;}
12338fi
12339
12340cf_x_athena_root=$cf_x_athena
12341cf_x_athena_inc=""
12342
12343for cf_path in default \
12344 /usr/contrib/X11R6 \
12345 /usr/contrib/X11R5 \
12346 /usr/lib/X11R5 \
12347 /usr/local
12348do
12349 if test -z "$cf_x_athena_inc" ; then
12350 cf_save="$CPPFLAGS"
12351 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12352 if test $cf_path != default ; then
12353 CPPFLAGS="$cf_save -I$cf_path/include"
12354 echo "$as_me:12354: checking for $cf_test in $cf_path" >&5
12355echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12356 else
12357 echo "$as_me:12357: checking for $cf_test" >&5
12358echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12359 fi
12360 cat >conftest.$ac_ext <<_ACEOF
12361#line 12361 "configure"
12362#include "confdefs.h"
12363
12364#include <X11/Intrinsic.h>
12365#include <$cf_test>
12366int
12367main ()
12368{
12369
12370 ;
12371 return 0;
12372}
12373_ACEOF
12374rm -f conftest.$ac_objext
12375if { (eval echo "$as_me:12375: \"$ac_compile\"") >&5
12376 (eval $ac_compile) 2>&5
12377 ac_status=$?
12378 echo "$as_me:12378: \$? = $ac_status" >&5
12379 (exit $ac_status); } &&
12380 { ac_try='test -s conftest.$ac_objext'
12381 { (eval echo "$as_me:12381: \"$ac_try\"") >&5
12382 (eval $ac_try) 2>&5
12383 ac_status=$?
12384 echo "$as_me:12384: \$? = $ac_status" >&5
12385 (exit $ac_status); }; }; then
12386 cf_result=yes
12387else
12388 echo "$as_me: failed program was:" >&5
12389cat conftest.$ac_ext >&5
12390cf_result=no
12391fi
12392rm -f conftest.$ac_objext conftest.$ac_ext
12393 echo "$as_me:12393: result: $cf_result" >&5
12394echo "${ECHO_T}$cf_result" >&6
12395 if test "$cf_result" = yes ; then
12396 cf_x_athena_inc=$cf_path
12397 break
12398 else
12399 CPPFLAGS="$cf_save"
12400 fi
12401 fi
12402done
12403
12404if test -z "$cf_x_athena_inc" ; then
12405 { echo "$as_me:12405: WARNING: Unable to successfully find Athena header files with test program" >&5
12406echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12407elif test "$cf_x_athena_inc" != default ; then
12408 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12409fi
12410
12411cf_x_athena_root=$cf_x_athena
12412cf_x_athena_lib=""
12413
12414for cf_path in default \
12415 /usr/contrib/X11R6 \
12416 /usr/contrib/X11R5 \
12417 /usr/lib/X11R5 \
12418 /usr/local
12419do
12420 for cf_lib in \
12421 ${cf_x_athena_root} \
12422 ${cf_x_athena_root}7 \
12423 ${cf_x_athena_root}6
12424 do
12425 for cf_libs in \
12426 "-l$cf_lib -lXmu" \
12427 "-l$cf_lib -lXpm -lXmu" \
12428 "-l${cf_lib}_s -lXmu_s"
12429 do
12430 if test -z "$cf_x_athena_lib" ; then
12431 cf_save="$LIBS"
12432 cf_test=XawSimpleMenuAddGlobalActions
12433 if test $cf_path != default ; then
12434
12435cf_add_libs="-L$cf_path/lib $cf_libs"
12436# Filter out duplicates - this happens with badly-designed ".pc" files...
12437for cf_add_1lib in $LIBS
12438do
12439 for cf_add_2lib in $cf_add_libs
12440 do
12441 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12442 then
12443 cf_add_1lib=
12444 break
12445 fi
12446 done
12447 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12448done
12449LIBS="$cf_add_libs"
12450
12451 echo "$as_me:12451: checking for $cf_libs in $cf_path" >&5
12452echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12453 else
12454
12455cf_add_libs="$cf_libs"
12456# Filter out duplicates - this happens with badly-designed ".pc" files...
12457for cf_add_1lib in $LIBS
12458do
12459 for cf_add_2lib in $cf_add_libs
12460 do
12461 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12462 then
12463 cf_add_1lib=
12464 break
12465 fi
12466 done
12467 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12468done
12469LIBS="$cf_add_libs"
12470
12471 echo "$as_me:12471: checking for $cf_test in $cf_libs" >&5
12472echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12473 fi
12474 cat >conftest.$ac_ext <<_ACEOF
12475#line 12475 "configure"
12476#include "confdefs.h"
12477
12478#include <X11/Intrinsic.h>
12479#include <X11/$cf_x_athena_root/SimpleMenu.h>
12480
12481int
12482main ()
12483{
12484
12485$cf_test((XtAppContext) 0)
12486 ;
12487 return 0;
12488}
12489_ACEOF
12490rm -f conftest.$ac_objext conftest$ac_exeext
12491if { (eval echo "$as_me:12491: \"$ac_link\"") >&5
12492 (eval $ac_link) 2>&5
12493 ac_status=$?
12494 echo "$as_me:12494: \$? = $ac_status" >&5
12495 (exit $ac_status); } &&
12496 { ac_try='test -s conftest$ac_exeext'
12497 { (eval echo "$as_me:12497: \"$ac_try\"") >&5
12498 (eval $ac_try) 2>&5
12499 ac_status=$?
12500 echo "$as_me:12500: \$? = $ac_status" >&5
12501 (exit $ac_status); }; }; then
12502 cf_result=yes
12503else
12504 echo "$as_me: failed program was:" >&5
12505cat conftest.$ac_ext >&5
12506cf_result=no
12507fi
12508rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12509 echo "$as_me:12509: result: $cf_result" >&5
12510echo "${ECHO_T}$cf_result" >&6
12511 if test "$cf_result" = yes ; then
12512 cf_x_athena_lib="$cf_libs"
12513 break
12514 fi
12515 LIBS="$cf_save"
12516 fi
12517 done # cf_libs
12518 test -n "$cf_x_athena_lib" && break
12519 done # cf_lib
12520done
12521
12522if test -z "$cf_x_athena_lib" ; then
12523 { { echo "$as_me:12523: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12524echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12525 { (exit 1); exit 1; }; }
12526fi
12527
12528cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12529
12530cat >>confdefs.h <<EOF
12531#define $cf_x_athena_LIBS 1
12532EOF
12533
12534fi
12535
12536if test -n "$ac_tool_prefix"; then
12537 for ac_prog in xcurses-config
12538 do
12539 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12540set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12541echo "$as_me:12541: checking for $ac_word" >&5
12542echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12543if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12544 echo $ECHO_N "(cached) $ECHO_C" >&6
12545else
12546 if test -n "$XCURSES_CONFIG"; then
12547 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12548else
12549 ac_save_IFS=$IFS; IFS=$ac_path_separator
12550ac_dummy="$PATH"
12551for ac_dir in $ac_dummy; do
12552 IFS=$ac_save_IFS
12553 test -z "$ac_dir" && ac_dir=.
12554 $as_executable_p "$ac_dir/$ac_word" || continue
12555ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12556echo "$as_me:12556: found $ac_dir/$ac_word" >&5
12557break
12558done
12559
12560fi
12561fi
12562XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12563if test -n "$XCURSES_CONFIG"; then
12564 echo "$as_me:12564: result: $XCURSES_CONFIG" >&5
12565echo "${ECHO_T}$XCURSES_CONFIG" >&6
12566else
12567 echo "$as_me:12567: result: no" >&5
12568echo "${ECHO_T}no" >&6
12569fi
12570
12571 test -n "$XCURSES_CONFIG" && break
12572 done
12573fi
12574if test -z "$XCURSES_CONFIG"; then
12575 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12576 for ac_prog in xcurses-config
12577do
12578 # Extract the first word of "$ac_prog", so it can be a program name with args.
12579set dummy $ac_prog; ac_word=$2
12580echo "$as_me:12580: checking for $ac_word" >&5
12581echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12582if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12583 echo $ECHO_N "(cached) $ECHO_C" >&6
12584else
12585 if test -n "$ac_ct_XCURSES_CONFIG"; then
12586 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12587else
12588 ac_save_IFS=$IFS; IFS=$ac_path_separator
12589ac_dummy="$PATH"
12590for ac_dir in $ac_dummy; do
12591 IFS=$ac_save_IFS
12592 test -z "$ac_dir" && ac_dir=.
12593 $as_executable_p "$ac_dir/$ac_word" || continue
12594ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12595echo "$as_me:12595: found $ac_dir/$ac_word" >&5
12596break
12597done
12598
12599fi
12600fi
12601ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12602if test -n "$ac_ct_XCURSES_CONFIG"; then
12603 echo "$as_me:12603: result: $ac_ct_XCURSES_CONFIG" >&5
12604echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12605else
12606 echo "$as_me:12606: result: no" >&5
12607echo "${ECHO_T}no" >&6
12608fi
12609
12610 test -n "$ac_ct_XCURSES_CONFIG" && break
12611done
12612test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12613
12614 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12615fi
12616
12617if test "$XCURSES_CONFIG" != none ; then
12618
12619CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12620
12621cf_add_libs="`$XCURSES_CONFIG --libs`"
12622# Filter out duplicates - this happens with badly-designed ".pc" files...
12623for cf_add_1lib in $LIBS
12624do
12625 for cf_add_2lib in $cf_add_libs
12626 do
12627 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12628 then
12629 cf_add_1lib=
12630 break
12631 fi
12632 done
12633 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12634done
12635LIBS="$cf_add_libs"
12636
12637cf_cv_lib_XCurses=yes
12638
12639else
12640
12641LDFLAGS="$LDFLAGS $X_LIBS"
12642
12643test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12644
12645echo "${as_me:-configure}:12645: testing checking additions to CFLAGS ..." 1>&5
12646
12647cf_check_cflags="$CFLAGS"
12648cf_check_cppflags="$CPPFLAGS"
12649
12650cf_fix_cppflags=no
12651cf_new_cflags=
12652cf_new_cppflags=
12653cf_new_extra_cppflags=
12654
12655for cf_add_cflags in $X_CFLAGS
12656do
12657case $cf_fix_cppflags in
12658(no)
12659 case $cf_add_cflags in
12660 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12661 case $cf_add_cflags in
12662 (-D*)
12663 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12664
12665 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12666 && test -z "${cf_tst_cflags}" \
12667 && cf_fix_cppflags=yes
12668
12669 if test $cf_fix_cppflags = yes ; then
12670 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12671 continue
12672 elif test "${cf_tst_cflags}" = "\"'" ; then
12673 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12674 continue
12675 fi
12676 ;;
12677 esac
12678 case "$CPPFLAGS" in
12679 (*$cf_add_cflags)
12680 ;;
12681 (*)
12682 case $cf_add_cflags in
12683 (-D*)
12684 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12685
12686CPPFLAGS=`echo "$CPPFLAGS" | \
12687 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12688 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12689
12690 ;;
12691 esac
12692 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12693 ;;
12694 esac
12695 ;;
12696 (*)
12697 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12698 ;;
12699 esac
12700 ;;
12701(yes)
12702 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12703
12704 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12705
12706 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12707 && test -z "${cf_tst_cflags}" \
12708 && cf_fix_cppflags=no
12709 ;;
12710esac
12711done
12712
12713if test -n "$cf_new_cflags" ; then
12714 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12715
12716echo "${as_me:-configure}:12716: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12717
12718 CFLAGS="$CFLAGS $cf_new_cflags"
12719fi
12720
12721if test -n "$cf_new_cppflags" ; then
12722 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12723
12724echo "${as_me:-configure}:12724: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12725
12726 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12727fi
12728
12729if test -n "$cf_new_extra_cppflags" ; then
12730 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12731
12732echo "${as_me:-configure}:12732: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12733
12734 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12735fi
12736
12737if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12738cat >conftest.$ac_ext <<_ACEOF
12739#line 12739 "configure"
12740#include "confdefs.h"
12741#include <stdio.h>
12742int
12743main ()
12744{
12745printf("Hello world");
12746 ;
12747 return 0;
12748}
12749_ACEOF
12750rm -f conftest.$ac_objext conftest$ac_exeext
12751if { (eval echo "$as_me:12751: \"$ac_link\"") >&5
12752 (eval $ac_link) 2>&5
12753 ac_status=$?
12754 echo "$as_me:12754: \$? = $ac_status" >&5
12755 (exit $ac_status); } &&
12756 { ac_try='test -s conftest$ac_exeext'
12757 { (eval echo "$as_me:12757: \"$ac_try\"") >&5
12758 (eval $ac_try) 2>&5
12759 ac_status=$?
12760 echo "$as_me:12760: \$? = $ac_status" >&5
12761 (exit $ac_status); }; }; then
12762 :
12763else
12764 echo "$as_me: failed program was:" >&5
12765cat conftest.$ac_ext >&5
12766test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12767
12768echo "${as_me:-configure}:12768: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12769
12770 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12771 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12772
12773echo "${as_me:-configure}:12773: testing but keeping change to \$CPPFLAGS ..." 1>&5
12774
12775 fi
12776 CFLAGS="$cf_check_flags"
12777fi
12778rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12779fi
12780
12781echo "$as_me:12781: checking for XOpenDisplay in -lX11" >&5
12782echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12783if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12784 echo $ECHO_N "(cached) $ECHO_C" >&6
12785else
12786 ac_check_lib_save_LIBS=$LIBS
12787LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12788cat >conftest.$ac_ext <<_ACEOF
12789#line 12789 "configure"
12790#include "confdefs.h"
12791
12792/* Override any gcc2 internal prototype to avoid an error. */
12793#ifdef __cplusplus
12794extern "C"
12795#endif
12796/* We use char because int might match the return type of a gcc2
12797 builtin and then its argument prototype would still apply. */
12798char XOpenDisplay ();
12799int
12800main ()
12801{
12802XOpenDisplay ();
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext conftest$ac_exeext
12808if { (eval echo "$as_me:12808: \"$ac_link\"") >&5
12809 (eval $ac_link) 2>&5
12810 ac_status=$?
12811 echo "$as_me:12811: \$? = $ac_status" >&5
12812 (exit $ac_status); } &&
12813 { ac_try='test -s conftest$ac_exeext'
12814 { (eval echo "$as_me:12814: \"$ac_try\"") >&5
12815 (eval $ac_try) 2>&5
12816 ac_status=$?
12817 echo "$as_me:12817: \$? = $ac_status" >&5
12818 (exit $ac_status); }; }; then
12819 ac_cv_lib_X11_XOpenDisplay=yes
12820else
12821 echo "$as_me: failed program was:" >&5
12822cat conftest.$ac_ext >&5
12823ac_cv_lib_X11_XOpenDisplay=no
12824fi
12825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12826LIBS=$ac_check_lib_save_LIBS
12827fi
12828echo "$as_me:12828: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12829echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12830if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12831
12832cf_add_libs="-lX11"
12833# Filter out duplicates - this happens with badly-designed ".pc" files...
12834for cf_add_1lib in $LIBS
12835do
12836 for cf_add_2lib in $cf_add_libs
12837 do
12838 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12839 then
12840 cf_add_1lib=
12841 break
12842 fi
12843 done
12844 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12845done
12846LIBS="$cf_add_libs"
12847
12848fi
12849
12850echo "$as_me:12850: checking for XCurses library" >&5
12851echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12852if test "${cf_cv_lib_XCurses+set}" = set; then
12853 echo $ECHO_N "(cached) $ECHO_C" >&6
12854else
12855
12856cf_add_libs="-lXCurses"
12857# Filter out duplicates - this happens with badly-designed ".pc" files...
12858for cf_add_1lib in $LIBS
12859do
12860 for cf_add_2lib in $cf_add_libs
12861 do
12862 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12863 then
12864 cf_add_1lib=
12865 break
12866 fi
12867 done
12868 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12869done
12870LIBS="$cf_add_libs"
12871
12872cat >conftest.$ac_ext <<_ACEOF
12873#line 12873 "configure"
12874#include "confdefs.h"
12875
12876#include <xcurses.h>
12877char *XCursesProgramName = "test";
12878
12879int
12880main ()
12881{
12882XCursesExit();
12883 ;
12884 return 0;
12885}
12886_ACEOF
12887rm -f conftest.$ac_objext conftest$ac_exeext
12888if { (eval echo "$as_me:12888: \"$ac_link\"") >&5
12889 (eval $ac_link) 2>&5
12890 ac_status=$?
12891 echo "$as_me:12891: \$? = $ac_status" >&5
12892 (exit $ac_status); } &&
12893 { ac_try='test -s conftest$ac_exeext'
12894 { (eval echo "$as_me:12894: \"$ac_try\"") >&5
12895 (eval $ac_try) 2>&5
12896 ac_status=$?
12897 echo "$as_me:12897: \$? = $ac_status" >&5
12898 (exit $ac_status); }; }; then
12899 cf_cv_lib_XCurses=yes
12900else
12901 echo "$as_me: failed program was:" >&5
12902cat conftest.$ac_ext >&5
12903cf_cv_lib_XCurses=no
12904fi
12905rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12906
12907fi
12908echo "$as_me:12908: result: $cf_cv_lib_XCurses" >&5
12909echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12910
12911fi
12912
12913if test $cf_cv_lib_XCurses = yes ; then
12914
12915cat >>confdefs.h <<\EOF
12916#define UNIX 1
12917EOF
12918
12919cat >>confdefs.h <<\EOF
12920#define XCURSES 1
12921EOF
12922
12923 echo "$as_me:12923: checking for xcurses.h" >&5
12924echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12925if test "${ac_cv_header_xcurses_h+set}" = set; then
12926 echo $ECHO_N "(cached) $ECHO_C" >&6
12927else
12928 cat >conftest.$ac_ext <<_ACEOF
12929#line 12929 "configure"
12930#include "confdefs.h"
12931#include <xcurses.h>
12932_ACEOF
12933if { (eval echo "$as_me:12933: \"$ac_cpp conftest.$ac_ext\"") >&5
12934 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12935 ac_status=$?
12936 egrep -v '^ *\+' conftest.er1 >conftest.err
12937 rm -f conftest.er1
12938 cat conftest.err >&5
12939 echo "$as_me:12939: \$? = $ac_status" >&5
12940 (exit $ac_status); } >/dev/null; then
12941 if test -s conftest.err; then
12942 ac_cpp_err=$ac_c_preproc_warn_flag
12943 else
12944 ac_cpp_err=
12945 fi
12946else
12947 ac_cpp_err=yes
12948fi
12949if test -z "$ac_cpp_err"; then
12950 ac_cv_header_xcurses_h=yes
12951else
12952 echo "$as_me: failed program was:" >&5
12953 cat conftest.$ac_ext >&5
12954 ac_cv_header_xcurses_h=no
12955fi
12956rm -f conftest.err conftest.$ac_ext
12957fi
12958echo "$as_me:12958: result: $ac_cv_header_xcurses_h" >&5
12959echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12960if test $ac_cv_header_xcurses_h = yes; then
12961
12962cat >>confdefs.h <<\EOF
12963#define HAVE_XCURSES 1
12964EOF
12965
12966fi
12967
12968else
12969 { { echo "$as_me:12969: error: Cannot link with XCurses" >&5
12970echo "$as_me: error: Cannot link with XCurses" >&2;}
12971 { (exit 1); exit 1; }; }
12972fi
12973
12974 ;;
12975(*)
12976 { { echo "$as_me:12976: error: unexpected screen-value: $cf_cv_screen" >&5
12977echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
12978 { (exit 1); exit 1; }; }
12979 ;;
12980esac
12981
12982case $cf_cv_screen in
12983(ncurses*)
12984 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
12985 ;;
12986(curses|curses_*)
12987
12988echo "$as_me:12988: checking for NetBSD form.h" >&5
12989echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
12990if test "${cf_cv_netbsd_form_h+set}" = set; then
12991 echo $ECHO_N "(cached) $ECHO_C" >&6
12992else
12993
12994cat >conftest.$ac_ext <<_ACEOF
12995#line 12995 "configure"
12996#include "confdefs.h"
12997
12998#include <${cf_cv_ncurses_header:-curses.h}>
12999#include <form.h>
13000
13001int
13002main ()
13003{
13004
13005 FORM *form;
13006 int y = current_field(form)->cursor_ypos;
13007 int x = current_field(form)->cursor_xpos;
13008
13009 ;
13010 return 0;
13011}
13012_ACEOF
13013rm -f conftest.$ac_objext
13014if { (eval echo "$as_me:13014: \"$ac_compile\"") >&5
13015 (eval $ac_compile) 2>&5
13016 ac_status=$?
13017 echo "$as_me:13017: \$? = $ac_status" >&5
13018 (exit $ac_status); } &&
13019 { ac_try='test -s conftest.$ac_objext'
13020 { (eval echo "$as_me:13020: \"$ac_try\"") >&5
13021 (eval $ac_try) 2>&5
13022 ac_status=$?
13023 echo "$as_me:13023: \$? = $ac_status" >&5
13024 (exit $ac_status); }; }; then
13025 cf_cv_netbsd_form_h=yes
13026
13027else
13028 echo "$as_me: failed program was:" >&5
13029cat conftest.$ac_ext >&5
13030cf_cv_netbsd_form_h=no
13031fi
13032rm -f conftest.$ac_objext conftest.$ac_ext
13033
13034fi
13035echo "$as_me:13035: result: $cf_cv_netbsd_form_h" >&5
13036echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13037
13038test "$cf_cv_netbsd_form_h" = yes &&
13039cat >>confdefs.h <<\EOF
13040#define HAVE_NETBSD_FORM_H 1
13041EOF
13042
13043echo "$as_me:13043: checking for NetBSD menu.h" >&5
13044echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13045if test "${cf_cv_netbsd_menu_h+set}" = set; then
13046 echo $ECHO_N "(cached) $ECHO_C" >&6
13047else
13048
13049cat >conftest.$ac_ext <<_ACEOF
13050#line 13050 "configure"
13051#include "confdefs.h"
13052
13053#include <${cf_cv_ncurses_header:-curses.h}>
13054#include <menu.h>
13055
13056int
13057main ()
13058{
13059
13060 MENU *menu;
13061 int y = menu->max_item_width;
13062
13063 ;
13064 return 0;
13065}
13066_ACEOF
13067rm -f conftest.$ac_objext
13068if { (eval echo "$as_me:13068: \"$ac_compile\"") >&5
13069 (eval $ac_compile) 2>&5
13070 ac_status=$?
13071 echo "$as_me:13071: \$? = $ac_status" >&5
13072 (exit $ac_status); } &&
13073 { ac_try='test -s conftest.$ac_objext'
13074 { (eval echo "$as_me:13074: \"$ac_try\"") >&5
13075 (eval $ac_try) 2>&5
13076 ac_status=$?
13077 echo "$as_me:13077: \$? = $ac_status" >&5
13078 (exit $ac_status); }; }; then
13079 cf_cv_netbsd_menu_h=yes
13080
13081else
13082 echo "$as_me: failed program was:" >&5
13083cat conftest.$ac_ext >&5
13084cf_cv_netbsd_menu_h=no
13085fi
13086rm -f conftest.$ac_objext conftest.$ac_ext
13087
13088fi
13089echo "$as_me:13089: result: $cf_cv_netbsd_menu_h" >&5
13090echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13091
13092test "$cf_cv_netbsd_menu_h" = yes &&
13093cat >>confdefs.h <<\EOF
13094#define HAVE_NETBSD_MENU_H 1
13095EOF
13096
13097 ;;
13098esac
13099
13100case $cf_cv_screen in
13101(pdcurses)
13102 ;;
13103(*)
13104 # look for curses-related libraries
13105
13106as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13107echo "$as_me:13107: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13108echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13109if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13110 echo $ECHO_N "(cached) $ECHO_C" >&6
13111else
13112 ac_check_lib_save_LIBS=$LIBS
13113LIBS="-lpanel$cf_cv_libtype $LIBS"
13114cat >conftest.$ac_ext <<_ACEOF
13115#line 13115 "configure"
13116#include "confdefs.h"
13117
13118/* Override any gcc2 internal prototype to avoid an error. */
13119#ifdef __cplusplus
13120extern "C"
13121#endif
13122/* We use char because int might match the return type of a gcc2
13123 builtin and then its argument prototype would still apply. */
13124char new_panel ();
13125int
13126main ()
13127{
13128new_panel ();
13129 ;
13130 return 0;
13131}
13132_ACEOF
13133rm -f conftest.$ac_objext conftest$ac_exeext
13134if { (eval echo "$as_me:13134: \"$ac_link\"") >&5
13135 (eval $ac_link) 2>&5
13136 ac_status=$?
13137 echo "$as_me:13137: \$? = $ac_status" >&5
13138 (exit $ac_status); } &&
13139 { ac_try='test -s conftest$ac_exeext'
13140 { (eval echo "$as_me:13140: \"$ac_try\"") >&5
13141 (eval $ac_try) 2>&5
13142 ac_status=$?
13143 echo "$as_me:13143: \$? = $ac_status" >&5
13144 (exit $ac_status); }; }; then
13145 eval "$as_ac_Lib=yes"
13146else
13147 echo "$as_me: failed program was:" >&5
13148cat conftest.$ac_ext >&5
13149eval "$as_ac_Lib=no"
13150fi
13151rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13152LIBS=$ac_check_lib_save_LIBS
13153fi
13154echo "$as_me:13154: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13155echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13156if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13157
13158cf_upper=`echo "have_libpanel" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13159
13160cf_add_libs="-lpanel$cf_cv_libtype"
13161# Filter out duplicates - this happens with badly-designed ".pc" files...
13162for cf_add_1lib in $LIBS
13163do
13164 for cf_add_2lib in $cf_add_libs
13165 do
13166 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13167 then
13168 cf_add_1lib=
13169 break
13170 fi
13171 done
13172 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13173done
13174LIBS="$cf_add_libs"
13175
13176cat >>confdefs.h <<EOF
13177#define $cf_upper 1
13178EOF
13179
13180fi
13181
13182as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13183echo "$as_me:13183: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13184echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13185if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13186 echo $ECHO_N "(cached) $ECHO_C" >&6
13187else
13188 ac_check_lib_save_LIBS=$LIBS
13189LIBS="-lmenu$cf_cv_libtype $LIBS"
13190cat >conftest.$ac_ext <<_ACEOF
13191#line 13191 "configure"
13192#include "confdefs.h"
13193
13194/* Override any gcc2 internal prototype to avoid an error. */
13195#ifdef __cplusplus
13196extern "C"
13197#endif
13198/* We use char because int might match the return type of a gcc2
13199 builtin and then its argument prototype would still apply. */
13200char menu_driver ();
13201int
13202main ()
13203{
13204menu_driver ();
13205 ;
13206 return 0;
13207}
13208_ACEOF
13209rm -f conftest.$ac_objext conftest$ac_exeext
13210if { (eval echo "$as_me:13210: \"$ac_link\"") >&5
13211 (eval $ac_link) 2>&5
13212 ac_status=$?
13213 echo "$as_me:13213: \$? = $ac_status" >&5
13214 (exit $ac_status); } &&
13215 { ac_try='test -s conftest$ac_exeext'
13216 { (eval echo "$as_me:13216: \"$ac_try\"") >&5
13217 (eval $ac_try) 2>&5
13218 ac_status=$?
13219 echo "$as_me:13219: \$? = $ac_status" >&5
13220 (exit $ac_status); }; }; then
13221 eval "$as_ac_Lib=yes"
13222else
13223 echo "$as_me: failed program was:" >&5
13224cat conftest.$ac_ext >&5
13225eval "$as_ac_Lib=no"
13226fi
13227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13228LIBS=$ac_check_lib_save_LIBS
13229fi
13230echo "$as_me:13230: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13231echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13232if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13233
13234cf_upper=`echo "have_libmenu" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13235
13236cf_add_libs="-lmenu$cf_cv_libtype"
13237# Filter out duplicates - this happens with badly-designed ".pc" files...
13238for cf_add_1lib in $LIBS
13239do
13240 for cf_add_2lib in $cf_add_libs
13241 do
13242 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13243 then
13244 cf_add_1lib=
13245 break
13246 fi
13247 done
13248 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13249done
13250LIBS="$cf_add_libs"
13251
13252cat >>confdefs.h <<EOF
13253#define $cf_upper 1
13254EOF
13255
13256fi
13257
13258as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13259echo "$as_me:13259: checking for form_driver in -lform$cf_cv_libtype" >&5
13260echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13261if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13262 echo $ECHO_N "(cached) $ECHO_C" >&6
13263else
13264 ac_check_lib_save_LIBS=$LIBS
13265LIBS="-lform$cf_cv_libtype $LIBS"
13266cat >conftest.$ac_ext <<_ACEOF
13267#line 13267 "configure"
13268#include "confdefs.h"
13269
13270/* Override any gcc2 internal prototype to avoid an error. */
13271#ifdef __cplusplus
13272extern "C"
13273#endif
13274/* We use char because int might match the return type of a gcc2
13275 builtin and then its argument prototype would still apply. */
13276char form_driver ();
13277int
13278main ()
13279{
13280form_driver ();
13281 ;
13282 return 0;
13283}
13284_ACEOF
13285rm -f conftest.$ac_objext conftest$ac_exeext
13286if { (eval echo "$as_me:13286: \"$ac_link\"") >&5
13287 (eval $ac_link) 2>&5
13288 ac_status=$?
13289 echo "$as_me:13289: \$? = $ac_status" >&5
13290 (exit $ac_status); } &&
13291 { ac_try='test -s conftest$ac_exeext'
13292 { (eval echo "$as_me:13292: \"$ac_try\"") >&5
13293 (eval $ac_try) 2>&5
13294 ac_status=$?
13295 echo "$as_me:13295: \$? = $ac_status" >&5
13296 (exit $ac_status); }; }; then
13297 eval "$as_ac_Lib=yes"
13298else
13299 echo "$as_me: failed program was:" >&5
13300cat conftest.$ac_ext >&5
13301eval "$as_ac_Lib=no"
13302fi
13303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13304LIBS=$ac_check_lib_save_LIBS
13305fi
13306echo "$as_me:13306: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13307echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13308if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13309
13310cf_upper=`echo "have_libform" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13311
13312cf_add_libs="-lform$cf_cv_libtype"
13313# Filter out duplicates - this happens with badly-designed ".pc" files...
13314for cf_add_1lib in $LIBS
13315do
13316 for cf_add_2lib in $cf_add_libs
13317 do
13318 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13319 then
13320 cf_add_1lib=
13321 break
13322 fi
13323 done
13324 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13325done
13326LIBS="$cf_add_libs"
13327
13328cat >>confdefs.h <<EOF
13329#define $cf_upper 1
13330EOF
13331
13332fi
13333
13334 # look for curses-related headers
13335
13336for ac_header in \
13337 nc_alloc.h \
13338 nomacros.h \
13339 form.h \
13340 menu.h \
13341 panel.h \
13342 term_entry.h \
13343
13344do
13345as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13346echo "$as_me:13346: checking for $ac_header" >&5
13347echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13348if eval "test \"\${$as_ac_Header+set}\" = set"; then
13349 echo $ECHO_N "(cached) $ECHO_C" >&6
13350else
13351 cat >conftest.$ac_ext <<_ACEOF
13352#line 13352 "configure"
13353#include "confdefs.h"
13354#include <$ac_header>
13355_ACEOF
13356if { (eval echo "$as_me:13356: \"$ac_cpp conftest.$ac_ext\"") >&5
13357 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13358 ac_status=$?
13359 egrep -v '^ *\+' conftest.er1 >conftest.err
13360 rm -f conftest.er1
13361 cat conftest.err >&5
13362 echo "$as_me:13362: \$? = $ac_status" >&5
13363 (exit $ac_status); } >/dev/null; then
13364 if test -s conftest.err; then
13365 ac_cpp_err=$ac_c_preproc_warn_flag
13366 else
13367 ac_cpp_err=
13368 fi
13369else
13370 ac_cpp_err=yes
13371fi
13372if test -z "$ac_cpp_err"; then
13373 eval "$as_ac_Header=yes"
13374else
13375 echo "$as_me: failed program was:" >&5
13376 cat conftest.$ac_ext >&5
13377 eval "$as_ac_Header=no"
13378fi
13379rm -f conftest.err conftest.$ac_ext
13380fi
13381echo "$as_me:13381: result: `eval echo '${'$as_ac_Header'}'`" >&5
13382echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13383if test `eval echo '${'$as_ac_Header'}'` = yes; then
13384 cat >>confdefs.h <<EOF
13385#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13386EOF
13387
13388fi
13389done
13390
13391 ;;
13392esac
13393
13394echo "$as_me:13394: checking for ANSI C header files" >&5
13395echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13396if test "${ac_cv_header_stdc+set}" = set; then
13397 echo $ECHO_N "(cached) $ECHO_C" >&6
13398else
13399 cat >conftest.$ac_ext <<_ACEOF
13400#line 13400 "configure"
13401#include "confdefs.h"
13402#include <stdlib.h>
13403#include <stdarg.h>
13404#include <string.h>
13405#include <float.h>
13406
13407_ACEOF
13408if { (eval echo "$as_me:13408: \"$ac_cpp conftest.$ac_ext\"") >&5
13409 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13410 ac_status=$?
13411 egrep -v '^ *\+' conftest.er1 >conftest.err
13412 rm -f conftest.er1
13413 cat conftest.err >&5
13414 echo "$as_me:13414: \$? = $ac_status" >&5
13415 (exit $ac_status); } >/dev/null; then
13416 if test -s conftest.err; then
13417 ac_cpp_err=$ac_c_preproc_warn_flag
13418 else
13419 ac_cpp_err=
13420 fi
13421else
13422 ac_cpp_err=yes
13423fi
13424if test -z "$ac_cpp_err"; then
13425 ac_cv_header_stdc=yes
13426else
13427 echo "$as_me: failed program was:" >&5
13428 cat conftest.$ac_ext >&5
13429 ac_cv_header_stdc=no
13430fi
13431rm -f conftest.err conftest.$ac_ext
13432
13433if test $ac_cv_header_stdc = yes; then
13434 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13435 cat >conftest.$ac_ext <<_ACEOF
13436#line 13436 "configure"
13437#include "confdefs.h"
13438#include <string.h>
13439
13440_ACEOF
13441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13442 egrep "memchr" >/dev/null 2>&1; then
13443 :
13444else
13445 ac_cv_header_stdc=no
13446fi
13447rm -rf conftest*
13448
13449fi
13450
13451if test $ac_cv_header_stdc = yes; then
13452 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13453 cat >conftest.$ac_ext <<_ACEOF
13454#line 13454 "configure"
13455#include "confdefs.h"
13456#include <stdlib.h>
13457
13458_ACEOF
13459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13460 egrep "free" >/dev/null 2>&1; then
13461 :
13462else
13463 ac_cv_header_stdc=no
13464fi
13465rm -rf conftest*
13466
13467fi
13468
13469if test $ac_cv_header_stdc = yes; then
13470 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13471 if test "$cross_compiling" = yes; then
13472 :
13473else
13474 cat >conftest.$ac_ext <<_ACEOF
13475#line 13475 "configure"
13476#include "confdefs.h"
13477#include <ctype.h>
13478#if ((' ' & 0x0FF) == 0x020)
13479# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13480# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13481#else
13482# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13483 || ('j' <= (c) && (c) <= 'r') \
13484 || ('s' <= (c) && (c) <= 'z'))
13485# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13486#endif
13487
13488#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13489int
13490main ()
13491{
13492 int i;
13493 for (i = 0; i < 256; i++)
13494 if (XOR (islower (i), ISLOWER (i))
13495 || toupper (i) != TOUPPER (i))
13496 $ac_main_return(2);
13497 $ac_main_return (0);
13498}
13499_ACEOF
13500rm -f conftest$ac_exeext
13501if { (eval echo "$as_me:13501: \"$ac_link\"") >&5
13502 (eval $ac_link) 2>&5
13503 ac_status=$?
13504 echo "$as_me:13504: \$? = $ac_status" >&5
13505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13506 { (eval echo "$as_me:13506: \"$ac_try\"") >&5
13507 (eval $ac_try) 2>&5
13508 ac_status=$?
13509 echo "$as_me:13509: \$? = $ac_status" >&5
13510 (exit $ac_status); }; }; then
13511 :
13512else
13513 echo "$as_me: program exited with status $ac_status" >&5
13514echo "$as_me: failed program was:" >&5
13515cat conftest.$ac_ext >&5
13516ac_cv_header_stdc=no
13517fi
13518rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13519fi
13520fi
13521fi
13522echo "$as_me:13522: result: $ac_cv_header_stdc" >&5
13523echo "${ECHO_T}$ac_cv_header_stdc" >&6
13524if test $ac_cv_header_stdc = yes; then
13525
13526cat >>confdefs.h <<\EOF
13527#define STDC_HEADERS 1
13528EOF
13529
13530fi
13531
13532echo "$as_me:13532: checking whether time.h and sys/time.h may both be included" >&5
13533echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13534if test "${ac_cv_header_time+set}" = set; then
13535 echo $ECHO_N "(cached) $ECHO_C" >&6
13536else
13537 cat >conftest.$ac_ext <<_ACEOF
13538#line 13538 "configure"
13539#include "confdefs.h"
13540#include <sys/types.h>
13541#include <sys/time.h>
13542#include <time.h>
13543
13544int
13545main ()
13546{
13547if ((struct tm *) 0)
13548return 0;
13549 ;
13550 return 0;
13551}
13552_ACEOF
13553rm -f conftest.$ac_objext
13554if { (eval echo "$as_me:13554: \"$ac_compile\"") >&5
13555 (eval $ac_compile) 2>&5
13556 ac_status=$?
13557 echo "$as_me:13557: \$? = $ac_status" >&5
13558 (exit $ac_status); } &&
13559 { ac_try='test -s conftest.$ac_objext'
13560 { (eval echo "$as_me:13560: \"$ac_try\"") >&5
13561 (eval $ac_try) 2>&5
13562 ac_status=$?
13563 echo "$as_me:13563: \$? = $ac_status" >&5
13564 (exit $ac_status); }; }; then
13565 ac_cv_header_time=yes
13566else
13567 echo "$as_me: failed program was:" >&5
13568cat conftest.$ac_ext >&5
13569ac_cv_header_time=no
13570fi
13571rm -f conftest.$ac_objext conftest.$ac_ext
13572fi
13573echo "$as_me:13573: result: $ac_cv_header_time" >&5
13574echo "${ECHO_T}$ac_cv_header_time" >&6
13575if test $ac_cv_header_time = yes; then
13576
13577cat >>confdefs.h <<\EOF
13578#define TIME_WITH_SYS_TIME 1
13579EOF
13580
13581fi
13582
13583for ac_header in \
13584getopt.h \
13585locale.h \
13586math.h \
13587stdarg.h \
13588sys/ioctl.h \
13589sys/select.h \
13590sys/time.h \
13591termios.h \
13592unistd.h \
13593
13594do
13595as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13596echo "$as_me:13596: checking for $ac_header" >&5
13597echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13598if eval "test \"\${$as_ac_Header+set}\" = set"; then
13599 echo $ECHO_N "(cached) $ECHO_C" >&6
13600else
13601 cat >conftest.$ac_ext <<_ACEOF
13602#line 13602 "configure"
13603#include "confdefs.h"
13604#include <$ac_header>
13605_ACEOF
13606if { (eval echo "$as_me:13606: \"$ac_cpp conftest.$ac_ext\"") >&5
13607 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13608 ac_status=$?
13609 egrep -v '^ *\+' conftest.er1 >conftest.err
13610 rm -f conftest.er1
13611 cat conftest.err >&5
13612 echo "$as_me:13612: \$? = $ac_status" >&5
13613 (exit $ac_status); } >/dev/null; then
13614 if test -s conftest.err; then
13615 ac_cpp_err=$ac_c_preproc_warn_flag
13616 else
13617 ac_cpp_err=
13618 fi
13619else
13620 ac_cpp_err=yes
13621fi
13622if test -z "$ac_cpp_err"; then
13623 eval "$as_ac_Header=yes"
13624else
13625 echo "$as_me: failed program was:" >&5
13626 cat conftest.$ac_ext >&5
13627 eval "$as_ac_Header=no"
13628fi
13629rm -f conftest.err conftest.$ac_ext
13630fi
13631echo "$as_me:13631: result: `eval echo '${'$as_ac_Header'}'`" >&5
13632echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13633if test `eval echo '${'$as_ac_Header'}'` = yes; then
13634 cat >>confdefs.h <<EOF
13635#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13636EOF
13637
13638fi
13639done
13640
13641for ac_header in unistd.h getopt.h
13642do
13643as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13644echo "$as_me:13644: checking for $ac_header" >&5
13645echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13646if eval "test \"\${$as_ac_Header+set}\" = set"; then
13647 echo $ECHO_N "(cached) $ECHO_C" >&6
13648else
13649 cat >conftest.$ac_ext <<_ACEOF
13650#line 13650 "configure"
13651#include "confdefs.h"
13652#include <$ac_header>
13653_ACEOF
13654if { (eval echo "$as_me:13654: \"$ac_cpp conftest.$ac_ext\"") >&5
13655 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13656 ac_status=$?
13657 egrep -v '^ *\+' conftest.er1 >conftest.err
13658 rm -f conftest.er1
13659 cat conftest.err >&5
13660 echo "$as_me:13660: \$? = $ac_status" >&5
13661 (exit $ac_status); } >/dev/null; then
13662 if test -s conftest.err; then
13663 ac_cpp_err=$ac_c_preproc_warn_flag
13664 else
13665 ac_cpp_err=
13666 fi
13667else
13668 ac_cpp_err=yes
13669fi
13670if test -z "$ac_cpp_err"; then
13671 eval "$as_ac_Header=yes"
13672else
13673 echo "$as_me: failed program was:" >&5
13674 cat conftest.$ac_ext >&5
13675 eval "$as_ac_Header=no"
13676fi
13677rm -f conftest.err conftest.$ac_ext
13678fi
13679echo "$as_me:13679: result: `eval echo '${'$as_ac_Header'}'`" >&5
13680echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13681if test `eval echo '${'$as_ac_Header'}'` = yes; then
13682 cat >>confdefs.h <<EOF
13683#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13684EOF
13685
13686fi
13687done
13688
13689echo "$as_me:13689: checking for header declaring getopt variables" >&5
13690echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13691if test "${cf_cv_getopt_header+set}" = set; then
13692 echo $ECHO_N "(cached) $ECHO_C" >&6
13693else
13694
13695cf_cv_getopt_header=none
13696for cf_header in stdio.h stdlib.h unistd.h getopt.h
13697do
13698cat >conftest.$ac_ext <<_ACEOF
13699#line 13699 "configure"
13700#include "confdefs.h"
13701
13702#include <$cf_header>
13703int
13704main ()
13705{
13706int x = optind; char *y = optarg
13707 ;
13708 return 0;
13709}
13710_ACEOF
13711rm -f conftest.$ac_objext
13712if { (eval echo "$as_me:13712: \"$ac_compile\"") >&5
13713 (eval $ac_compile) 2>&5
13714 ac_status=$?
13715 echo "$as_me:13715: \$? = $ac_status" >&5
13716 (exit $ac_status); } &&
13717 { ac_try='test -s conftest.$ac_objext'
13718 { (eval echo "$as_me:13718: \"$ac_try\"") >&5
13719 (eval $ac_try) 2>&5
13720 ac_status=$?
13721 echo "$as_me:13721: \$? = $ac_status" >&5
13722 (exit $ac_status); }; }; then
13723 cf_cv_getopt_header=$cf_header
13724 break
13725else
13726 echo "$as_me: failed program was:" >&5
13727cat conftest.$ac_ext >&5
13728fi
13729rm -f conftest.$ac_objext conftest.$ac_ext
13730done
13731
13732fi
13733echo "$as_me:13733: result: $cf_cv_getopt_header" >&5
13734echo "${ECHO_T}$cf_cv_getopt_header" >&6
13735if test $cf_cv_getopt_header != none ; then
13736
13737cat >>confdefs.h <<\EOF
13738#define HAVE_GETOPT_HEADER 1
13739EOF
13740
13741fi
13742if test $cf_cv_getopt_header = getopt.h ; then
13743
13744cat >>confdefs.h <<\EOF
13745#define NEED_GETOPT_H 1
13746EOF
13747
13748fi
13749
13750for ac_func in \
13751getopt \
13752gettimeofday \
13753
13754do
13755as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13756echo "$as_me:13756: checking for $ac_func" >&5
13757echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13758if eval "test \"\${$as_ac_var+set}\" = set"; then
13759 echo $ECHO_N "(cached) $ECHO_C" >&6
13760else
13761 cat >conftest.$ac_ext <<_ACEOF
13762#line 13762 "configure"
13763#include "confdefs.h"
13764/* System header to define __stub macros and hopefully few prototypes,
13765 which can conflict with char $ac_func (); below. */
13766#include <assert.h>
13767/* Override any gcc2 internal prototype to avoid an error. */
13768#ifdef __cplusplus
13769extern "C"
13770#endif
13771/* We use char because int might match the return type of a gcc2
13772 builtin and then its argument prototype would still apply. */
13773char $ac_func ();
13774char (*f) ();
13775
13776int
13777main ()
13778{
13779/* The GNU C library defines this for functions which it implements
13780 to always fail with ENOSYS. Some functions are actually named
13781 something starting with __ and the normal name is an alias. */
13782#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13783choke me
13784#else
13785f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13786#endif
13787
13788 ;
13789 return 0;
13790}
13791_ACEOF
13792rm -f conftest.$ac_objext conftest$ac_exeext
13793if { (eval echo "$as_me:13793: \"$ac_link\"") >&5
13794 (eval $ac_link) 2>&5
13795 ac_status=$?
13796 echo "$as_me:13796: \$? = $ac_status" >&5
13797 (exit $ac_status); } &&
13798 { ac_try='test -s conftest$ac_exeext'
13799 { (eval echo "$as_me:13799: \"$ac_try\"") >&5
13800 (eval $ac_try) 2>&5
13801 ac_status=$?
13802 echo "$as_me:13802: \$? = $ac_status" >&5
13803 (exit $ac_status); }; }; then
13804 eval "$as_ac_var=yes"
13805else
13806 echo "$as_me: failed program was:" >&5
13807cat conftest.$ac_ext >&5
13808eval "$as_ac_var=no"
13809fi
13810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13811fi
13812echo "$as_me:13812: result: `eval echo '${'$as_ac_var'}'`" >&5
13813echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13814if test `eval echo '${'$as_ac_var'}'` = yes; then
13815 cat >>confdefs.h <<EOF
13816#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13817EOF
13818
13819fi
13820done
13821
13822if test "x$ac_cv_func_getopt" = xno; then
13823 { { echo "$as_me:13823: error: getopt is required for building programs" >&5
13824echo "$as_me: error: getopt is required for building programs" >&2;}
13825 { (exit 1); exit 1; }; }
13826fi
13827
13828if test "$cf_enable_widec" = yes; then
13829
13830for ac_func in \
13831mblen \
13832mbrlen \
13833mbrtowc \
13834mbsrtowcs \
13835mbstowcs \
13836mbtowc \
13837wcsrtombs \
13838wcstombs \
13839
13840do
13841as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13842echo "$as_me:13842: checking for $ac_func" >&5
13843echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13844if eval "test \"\${$as_ac_var+set}\" = set"; then
13845 echo $ECHO_N "(cached) $ECHO_C" >&6
13846else
13847 cat >conftest.$ac_ext <<_ACEOF
13848#line 13848 "configure"
13849#include "confdefs.h"
13850/* System header to define __stub macros and hopefully few prototypes,
13851 which can conflict with char $ac_func (); below. */
13852#include <assert.h>
13853/* Override any gcc2 internal prototype to avoid an error. */
13854#ifdef __cplusplus
13855extern "C"
13856#endif
13857/* We use char because int might match the return type of a gcc2
13858 builtin and then its argument prototype would still apply. */
13859char $ac_func ();
13860char (*f) ();
13861
13862int
13863main ()
13864{
13865/* The GNU C library defines this for functions which it implements
13866 to always fail with ENOSYS. Some functions are actually named
13867 something starting with __ and the normal name is an alias. */
13868#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13869choke me
13870#else
13871f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13872#endif
13873
13874 ;
13875 return 0;
13876}
13877_ACEOF
13878rm -f conftest.$ac_objext conftest$ac_exeext
13879if { (eval echo "$as_me:13879: \"$ac_link\"") >&5
13880 (eval $ac_link) 2>&5
13881 ac_status=$?
13882 echo "$as_me:13882: \$? = $ac_status" >&5
13883 (exit $ac_status); } &&
13884 { ac_try='test -s conftest$ac_exeext'
13885 { (eval echo "$as_me:13885: \"$ac_try\"") >&5
13886 (eval $ac_try) 2>&5
13887 ac_status=$?
13888 echo "$as_me:13888: \$? = $ac_status" >&5
13889 (exit $ac_status); }; }; then
13890 eval "$as_ac_var=yes"
13891else
13892 echo "$as_me: failed program was:" >&5
13893cat conftest.$ac_ext >&5
13894eval "$as_ac_var=no"
13895fi
13896rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13897fi
13898echo "$as_me:13898: result: `eval echo '${'$as_ac_var'}'`" >&5
13899echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13900if test `eval echo '${'$as_ac_var'}'` = yes; then
13901 cat >>confdefs.h <<EOF
13902#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13903EOF
13904
13905fi
13906done
13907
13908fi
13909
13910echo "$as_me:13910: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13911echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13912if test "${cf_cv_need_xopen_extension+set}" = set; then
13913 echo $ECHO_N "(cached) $ECHO_C" >&6
13914else
13915
13916cat >conftest.$ac_ext <<_ACEOF
13917#line 13917 "configure"
13918#include "confdefs.h"
13919
13920#include <stdlib.h>
13921#include <${cf_cv_ncurses_header:-curses.h}>
13922int
13923main ()
13924{
13925
13926#if defined(NCURSES_VERSION_PATCH)
13927#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13928 make an error
13929#endif
13930#endif
13931 long x = winnstr(stdscr, "", 0);
13932 int x1, y1;
13933 getbegyx(stdscr, y1, x1)
13934 ;
13935 return 0;
13936}
13937_ACEOF
13938rm -f conftest.$ac_objext conftest$ac_exeext
13939if { (eval echo "$as_me:13939: \"$ac_link\"") >&5
13940 (eval $ac_link) 2>&5
13941 ac_status=$?
13942 echo "$as_me:13942: \$? = $ac_status" >&5
13943 (exit $ac_status); } &&
13944 { ac_try='test -s conftest$ac_exeext'
13945 { (eval echo "$as_me:13945: \"$ac_try\"") >&5
13946 (eval $ac_try) 2>&5
13947 ac_status=$?
13948 echo "$as_me:13948: \$? = $ac_status" >&5
13949 (exit $ac_status); }; }; then
13950 cf_cv_need_xopen_extension=no
13951else
13952 echo "$as_me: failed program was:" >&5
13953cat conftest.$ac_ext >&5
13954cat >conftest.$ac_ext <<_ACEOF
13955#line 13955 "configure"
13956#include "confdefs.h"
13957
13958#define _XOPEN_SOURCE_EXTENDED
13959#include <stdlib.h>
13960#include <${cf_cv_ncurses_header:-curses.h}>
13961int
13962main ()
13963{
13964
13965#ifdef NCURSES_VERSION
13966 cchar_t check;
13967 int check2 = curs_set((int)sizeof(check));
13968#endif
13969 long x = winnstr(stdscr, "", 0);
13970 int x1, y1;
13971 getbegyx(stdscr, y1, x1)
13972 ;
13973 return 0;
13974}
13975_ACEOF
13976rm -f conftest.$ac_objext conftest$ac_exeext
13977if { (eval echo "$as_me:13977: \"$ac_link\"") >&5
13978 (eval $ac_link) 2>&5
13979 ac_status=$?
13980 echo "$as_me:13980: \$? = $ac_status" >&5
13981 (exit $ac_status); } &&
13982 { ac_try='test -s conftest$ac_exeext'
13983 { (eval echo "$as_me:13983: \"$ac_try\"") >&5
13984 (eval $ac_try) 2>&5
13985 ac_status=$?
13986 echo "$as_me:13986: \$? = $ac_status" >&5
13987 (exit $ac_status); }; }; then
13988 cf_cv_need_xopen_extension=yes
13989else
13990 echo "$as_me: failed program was:" >&5
13991cat conftest.$ac_ext >&5
13992cf_cv_need_xopen_extension=unknown
13993fi
13994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13995fi
13996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13997fi
13998echo "$as_me:13998: result: $cf_cv_need_xopen_extension" >&5
13999echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14000test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
14001
14002echo "$as_me:14002: checking for term.h" >&5
14003echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14004if test "${cf_cv_term_header+set}" = set; then
14005 echo $ECHO_N "(cached) $ECHO_C" >&6
14006else
14007
14008# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14009# for <term.h> if we do not find the variant.
14010
14011cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14012
14013case ${cf_cv_ncurses_header:-curses.h} in
14014(*/*)
14015 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14016 cf_header_list="$cf_header_item $cf_header_list"
14017 ;;
14018esac
14019
14020for cf_header in $cf_header_list
14021do
14022 cat >conftest.$ac_ext <<_ACEOF
14023#line 14023 "configure"
14024#include "confdefs.h"
14025
14026#include <${cf_cv_ncurses_header:-curses.h}>
14027#include <${cf_header}>
14028int
14029main ()
14030{
14031WINDOW *x
14032 ;
14033 return 0;
14034}
14035_ACEOF
14036rm -f conftest.$ac_objext
14037if { (eval echo "$as_me:14037: \"$ac_compile\"") >&5
14038 (eval $ac_compile) 2>&5
14039 ac_status=$?
14040 echo "$as_me:14040: \$? = $ac_status" >&5
14041 (exit $ac_status); } &&
14042 { ac_try='test -s conftest.$ac_objext'
14043 { (eval echo "$as_me:14043: \"$ac_try\"") >&5
14044 (eval $ac_try) 2>&5
14045 ac_status=$?
14046 echo "$as_me:14046: \$? = $ac_status" >&5
14047 (exit $ac_status); }; }; then
14048 cf_cv_term_header=$cf_header
14049 break
14050else
14051 echo "$as_me: failed program was:" >&5
14052cat conftest.$ac_ext >&5
14053cf_cv_term_header=no
14054fi
14055rm -f conftest.$ac_objext conftest.$ac_ext
14056done
14057
14058case $cf_cv_term_header in
14059(no)
14060 # If curses is ncurses, some packagers still mess it up by trying to make
14061 # us use GNU termcap. This handles the most common case.
14062 for cf_header in ncurses/term.h ncursesw/term.h
14063 do
14064 cat >conftest.$ac_ext <<_ACEOF
14065#line 14065 "configure"
14066#include "confdefs.h"
14067
14068#include <${cf_cv_ncurses_header:-curses.h}>
14069#ifdef NCURSES_VERSION
14070#include <${cf_header}>
14071#else
14072make an error
14073#endif
14074int
14075main ()
14076{
14077WINDOW *x
14078 ;
14079 return 0;
14080}
14081_ACEOF
14082rm -f conftest.$ac_objext
14083if { (eval echo "$as_me:14083: \"$ac_compile\"") >&5
14084 (eval $ac_compile) 2>&5
14085 ac_status=$?
14086 echo "$as_me:14086: \$? = $ac_status" >&5
14087 (exit $ac_status); } &&
14088 { ac_try='test -s conftest.$ac_objext'
14089 { (eval echo "$as_me:14089: \"$ac_try\"") >&5
14090 (eval $ac_try) 2>&5
14091 ac_status=$?
14092 echo "$as_me:14092: \$? = $ac_status" >&5
14093 (exit $ac_status); }; }; then
14094 cf_cv_term_header=$cf_header
14095 break
14096else
14097 echo "$as_me: failed program was:" >&5
14098cat conftest.$ac_ext >&5
14099cf_cv_term_header=no
14100fi
14101rm -f conftest.$ac_objext conftest.$ac_ext
14102 done
14103 ;;
14104esac
14105
14106fi
14107echo "$as_me:14107: result: $cf_cv_term_header" >&5
14108echo "${ECHO_T}$cf_cv_term_header" >&6
14109
14110case $cf_cv_term_header in
14111(term.h)
14112
14113cat >>confdefs.h <<\EOF
14114#define HAVE_TERM_H 1
14115EOF
14116
14117 ;;
14118(ncurses/term.h)
14119
14120cat >>confdefs.h <<\EOF
14121#define HAVE_NCURSES_TERM_H 1
14122EOF
14123
14124 ;;
14125(ncursesw/term.h)
14126
14127cat >>confdefs.h <<\EOF
14128#define HAVE_NCURSESW_TERM_H 1
14129EOF
14130
14131 ;;
14132esac
14133
14134echo "$as_me:14134: checking for unctrl.h" >&5
14135echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14136if test "${cf_cv_unctrl_header+set}" = set; then
14137 echo $ECHO_N "(cached) $ECHO_C" >&6
14138else
14139
14140# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14141# for <unctrl.h> if we do not find the variant.
14142
14143cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14144
14145case ${cf_cv_ncurses_header:-curses.h} in
14146(*/*)
14147 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14148 cf_header_list="$cf_header_item $cf_header_list"
14149 ;;
14150esac
14151
14152for cf_header in $cf_header_list
14153do
14154 cat >conftest.$ac_ext <<_ACEOF
14155#line 14155 "configure"
14156#include "confdefs.h"
14157
14158#include <${cf_cv_ncurses_header:-curses.h}>
14159#include <${cf_header}>
14160int
14161main ()
14162{
14163WINDOW *x
14164 ;
14165 return 0;
14166}
14167_ACEOF
14168rm -f conftest.$ac_objext
14169if { (eval echo "$as_me:14169: \"$ac_compile\"") >&5
14170 (eval $ac_compile) 2>&5
14171 ac_status=$?
14172 echo "$as_me:14172: \$? = $ac_status" >&5
14173 (exit $ac_status); } &&
14174 { ac_try='test -s conftest.$ac_objext'
14175 { (eval echo "$as_me:14175: \"$ac_try\"") >&5
14176 (eval $ac_try) 2>&5
14177 ac_status=$?
14178 echo "$as_me:14178: \$? = $ac_status" >&5
14179 (exit $ac_status); }; }; then
14180 cf_cv_unctrl_header=$cf_header
14181 break
14182else
14183 echo "$as_me: failed program was:" >&5
14184cat conftest.$ac_ext >&5
14185cf_cv_unctrl_header=no
14186fi
14187rm -f conftest.$ac_objext conftest.$ac_ext
14188done
14189
14190fi
14191echo "$as_me:14191: result: $cf_cv_unctrl_header" >&5
14192echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14193
14194case $cf_cv_unctrl_header in
14195(no)
14196 { echo "$as_me:14196: WARNING: unctrl.h header not found" >&5
14197echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14198 ;;
14199esac
14200
14201case $cf_cv_unctrl_header in
14202(unctrl.h)
14203
14204cat >>confdefs.h <<\EOF
14205#define HAVE_UNCTRL_H 1
14206EOF
14207
14208 ;;
14209(ncurses/unctrl.h)
14210
14211cat >>confdefs.h <<\EOF
14212#define HAVE_NCURSES_UNCTRL_H 1
14213EOF
14214
14215 ;;
14216(ncursesw/unctrl.h)
14217
14218cat >>confdefs.h <<\EOF
14219#define HAVE_NCURSESW_UNCTRL_H 1
14220EOF
14221
14222 ;;
14223esac
14224
14225for cf_func in \
14226assume_default_colors \
14227chgat \
14228color_set \
14229filter \
14230getbegx \
14231getcurx \
14232getmaxx \
14233getnstr \
14234getparx \
14235getwin \
14236mvvline \
14237mvwvline \
14238napms \
14239putwin \
14240resize_term \
14241resizeterm \
14242ripoffline \
14243scr_dump \
14244setupterm \
14245slk_color \
14246slk_init \
14247termattrs \
14248tgetent \
14249tigetnum \
14250tigetstr \
14251typeahead \
14252use_default_colors \
14253use_env \
14254use_extended_names \
14255use_screen \
14256use_window \
14257vid_puts \
14258vidputs \
14259vsscanf \
14260vw_printw \
14261wchgat \
14262winsstr \
14263wresize \
14264wsyncdown \
14265
14266do
14267
14268cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14269
14270 echo "$as_me:14270: checking for ${cf_func}" >&5
14271echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14272
14273echo "${as_me:-configure}:14273: testing ${cf_func} ..." 1>&5
14274
14275 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14276 echo $ECHO_N "(cached) $ECHO_C" >&6
14277else
14278
14279 eval cf_result='$ac_cv_func_'$cf_func
14280 if test ".$cf_result" != ".no"; then
14281 cat >conftest.$ac_ext <<_ACEOF
14282#line 14282 "configure"
14283#include "confdefs.h"
14284
14285#ifdef HAVE_XCURSES
14286#include <xcurses.h>
14287char * XCursesProgramName = "test";
14288#else
14289#include <${cf_cv_ncurses_header:-curses.h}>
14290#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14291#include <ncursesw/term.h>
14292#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14293#include <ncurses/term.h>
14294#elif defined(HAVE_TERM_H)
14295#include <term.h>
14296#endif
14297#endif
14298
14299int
14300main ()
14301{
14302
14303#ifndef ${cf_func}
14304long foo = (long)(&${cf_func});
14305fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14306if (foo + 1234 > 5678)
14307 ${cf_cv_main_return:-return}(foo);
14308#endif
14309
14310 ;
14311 return 0;
14312}
14313_ACEOF
14314rm -f conftest.$ac_objext conftest$ac_exeext
14315if { (eval echo "$as_me:14315: \"$ac_link\"") >&5
14316 (eval $ac_link) 2>&5
14317 ac_status=$?
14318 echo "$as_me:14318: \$? = $ac_status" >&5
14319 (exit $ac_status); } &&
14320 { ac_try='test -s conftest$ac_exeext'
14321 { (eval echo "$as_me:14321: \"$ac_try\"") >&5
14322 (eval $ac_try) 2>&5
14323 ac_status=$?
14324 echo "$as_me:14324: \$? = $ac_status" >&5
14325 (exit $ac_status); }; }; then
14326 cf_result=yes
14327else
14328 echo "$as_me: failed program was:" >&5
14329cat conftest.$ac_ext >&5
14330cf_result=no
14331fi
14332rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14333 fi
14334 eval 'cf_cv_func_'$cf_func'=$cf_result'
14335
14336fi
14337
14338 # use the computed/retrieved cache-value:
14339 eval 'cf_result=$cf_cv_func_'$cf_func
14340 echo "$as_me:14340: result: $cf_result" >&5
14341echo "${ECHO_T}$cf_result" >&6
14342 if test $cf_result != no; then
14343 cat >>confdefs.h <<EOF
14344#define HAVE_${cf_tr_func} 1
14345EOF
14346
14347 fi
14348done
14349
14350for cf_func in tputs
14351do
14352
14353cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14354
14355 echo "$as_me:14355: checking for ${cf_func}" >&5
14356echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14357
14358echo "${as_me:-configure}:14358: testing ${cf_func} ..." 1>&5
14359
14360 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14361 echo $ECHO_N "(cached) $ECHO_C" >&6
14362else
14363
14364 eval cf_result='$ac_cv_func_'$cf_func
14365 if test ".$cf_result" != ".no"; then
14366 cat >conftest.$ac_ext <<_ACEOF
14367#line 14367 "configure"
14368#include "confdefs.h"
14369
14370#ifdef HAVE_XCURSES
14371#include <xcurses.h>
14372char * XCursesProgramName = "test";
14373#else
14374#include <${cf_cv_ncurses_header:-curses.h}>
14375#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14376#include <ncursesw/term.h>
14377#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14378#include <ncurses/term.h>
14379#elif defined(HAVE_TERM_H)
14380#include <term.h>
14381#endif
14382#endif
14383
14384int
14385main ()
14386{
14387
14388#ifndef ${cf_func}
14389long foo = (long)(&${cf_func});
14390fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14391if (foo + 1234 > 5678)
14392 ${cf_cv_main_return:-return}(foo);
14393#endif
14394
14395 ;
14396 return 0;
14397}
14398_ACEOF
14399rm -f conftest.$ac_objext conftest$ac_exeext
14400if { (eval echo "$as_me:14400: \"$ac_link\"") >&5
14401 (eval $ac_link) 2>&5
14402 ac_status=$?
14403 echo "$as_me:14403: \$? = $ac_status" >&5
14404 (exit $ac_status); } &&
14405 { ac_try='test -s conftest$ac_exeext'
14406 { (eval echo "$as_me:14406: \"$ac_try\"") >&5
14407 (eval $ac_try) 2>&5
14408 ac_status=$?
14409 echo "$as_me:14409: \$? = $ac_status" >&5
14410 (exit $ac_status); }; }; then
14411 cf_result=yes
14412else
14413 echo "$as_me: failed program was:" >&5
14414cat conftest.$ac_ext >&5
14415cf_result=no
14416fi
14417rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14418 fi
14419 eval 'cf_cv_func_'$cf_func'=$cf_result'
14420
14421fi
14422
14423 # use the computed/retrieved cache-value:
14424 eval 'cf_result=$cf_cv_func_'$cf_func
14425 echo "$as_me:14425: result: $cf_result" >&5
14426echo "${ECHO_T}$cf_result" >&6
14427 if test $cf_result != no; then
14428 cat >>confdefs.h <<EOF
14429#define HAVE_${cf_tr_func} 1
14430EOF
14431
14432 fi
14433done
14434
14435if test x$cf_cv_func_tputs = xyes
14436then
14437 cf_done=no
14438 for cf_arg in int char
14439 do
14440 for cf_ret in int void
14441 do
14442 if test $cf_ret = void
14443 then
14444 cf_return="/* nothing */"
14445 else
14446 cf_return="return value"
14447 fi
14448 cat >conftest.$ac_ext <<_ACEOF
14449#line 14449 "configure"
14450#include "confdefs.h"
14451
14452#include <${cf_cv_ncurses_header:-curses.h}>
14453#include <$cf_cv_term_header>
14454
14455static $cf_ret outc($cf_arg value) { $cf_return; }
14456
14457int
14458main ()
14459{
14460
14461 tputs("hello", 0, outc);
14462 ${cf_cv_main_return:-return}(0);
14463
14464 ;
14465 return 0;
14466}
14467_ACEOF
14468rm -f conftest.$ac_objext
14469if { (eval echo "$as_me:14469: \"$ac_compile\"") >&5
14470 (eval $ac_compile) 2>&5
14471 ac_status=$?
14472 echo "$as_me:14472: \$? = $ac_status" >&5
14473 (exit $ac_status); } &&
14474 { ac_try='test -s conftest.$ac_objext'
14475 { (eval echo "$as_me:14475: \"$ac_try\"") >&5
14476 (eval $ac_try) 2>&5
14477 ac_status=$?
14478 echo "$as_me:14478: \$? = $ac_status" >&5
14479 (exit $ac_status); }; }; then
14480
14481 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14482
14483echo "${as_me:-configure}:14483: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14484
14485 cat >>confdefs.h <<EOF
14486#define TPUTS_ARG $cf_arg
14487#define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14488#define TPUTS_RETURN(value) $cf_return
14489EOF
14490 cf_done=yes
14491 break
14492
14493else
14494 echo "$as_me: failed program was:" >&5
14495cat conftest.$ac_ext >&5
14496fi
14497rm -f conftest.$ac_objext conftest.$ac_ext
14498 done
14499 test $cf_done = yes && break
14500 done
14501fi
14502
14503echo "$as_me:14503: checking for ncurses extended functions" >&5
14504echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14505if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14506 echo $ECHO_N "(cached) $ECHO_C" >&6
14507else
14508
14509cat >conftest.$ac_ext <<_ACEOF
14510#line 14510 "configure"
14511#include "confdefs.h"
14512
14513#include <${cf_cv_ncurses_header:-curses.h}>
14514int
14515main ()
14516{
14517
14518int x = NCURSES_EXT_FUNCS
14519
14520 ;
14521 return 0;
14522}
14523_ACEOF
14524rm -f conftest.$ac_objext
14525if { (eval echo "$as_me:14525: \"$ac_compile\"") >&5
14526 (eval $ac_compile) 2>&5
14527 ac_status=$?
14528 echo "$as_me:14528: \$? = $ac_status" >&5
14529 (exit $ac_status); } &&
14530 { ac_try='test -s conftest.$ac_objext'
14531 { (eval echo "$as_me:14531: \"$ac_try\"") >&5
14532 (eval $ac_try) 2>&5
14533 ac_status=$?
14534 echo "$as_me:14534: \$? = $ac_status" >&5
14535 (exit $ac_status); }; }; then
14536 cf_cv_ncurses_ext_funcs=defined
14537else
14538 echo "$as_me: failed program was:" >&5
14539cat conftest.$ac_ext >&5
14540
14541cat >conftest.$ac_ext <<_ACEOF
14542#line 14542 "configure"
14543#include "confdefs.h"
14544
14545#include <${cf_cv_ncurses_header:-curses.h}>
14546int
14547main ()
14548{
14549
14550 (void) assume_default_colors (0, 0);
14551 (void) curses_version ();
14552 (void) define_key (0, 0);
14553 (void) is_term_resized (0, 0);
14554 (void) key_defined (0);
14555 (void) keybound (0, 0);
14556 (void) keyok (0, 0);
14557 (void) resize_term (0, 0);
14558 (void) resizeterm (0, 0);
14559 (void) use_default_colors ();
14560 (void) use_extended_names (0);
14561 (void) wresize (0, 0, 0);
14562 ;
14563 return 0;
14564}
14565_ACEOF
14566rm -f conftest.$ac_objext conftest$ac_exeext
14567if { (eval echo "$as_me:14567: \"$ac_link\"") >&5
14568 (eval $ac_link) 2>&5
14569 ac_status=$?
14570 echo "$as_me:14570: \$? = $ac_status" >&5
14571 (exit $ac_status); } &&
14572 { ac_try='test -s conftest$ac_exeext'
14573 { (eval echo "$as_me:14573: \"$ac_try\"") >&5
14574 (eval $ac_try) 2>&5
14575 ac_status=$?
14576 echo "$as_me:14576: \$? = $ac_status" >&5
14577 (exit $ac_status); }; }; then
14578 cf_cv_ncurses_ext_funcs=yes
14579else
14580 echo "$as_me: failed program was:" >&5
14581cat conftest.$ac_ext >&5
14582cf_cv_ncurses_ext_funcs=no
14583fi
14584rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14585
14586fi
14587rm -f conftest.$ac_objext conftest.$ac_ext
14588
14589fi
14590echo "$as_me:14590: result: $cf_cv_ncurses_ext_funcs" >&5
14591echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14592test "$cf_cv_ncurses_ext_funcs" = yes &&
14593cat >>confdefs.h <<\EOF
14594#define NCURSES_EXT_FUNCS 1
14595EOF
14596
14597if test "$cf_enable_widec" = yes
14598then
14599 # workaround for systems with ncurses before 20111029, due to change of
14600 # feature test macro from _XPG5 to _XOPEN_SOURCE
14601 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14602 then
14603 cf_define_xpg5=no
14604 echo "$as_me:14604: checking if _XPG5 should be defined to enable wide-characters" >&5
14605echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14606
14607 cat >conftest.$ac_ext <<_ACEOF
14608#line 14608 "configure"
14609#include "confdefs.h"
14610
14611#include <${cf_cv_ncurses_header:-curses.h}>
14612int
14613main ()
14614{
14615int x = _XPG5
14616 ;
14617 return 0;
14618}
14619_ACEOF
14620rm -f conftest.$ac_objext
14621if { (eval echo "$as_me:14621: \"$ac_compile\"") >&5
14622 (eval $ac_compile) 2>&5
14623 ac_status=$?
14624 echo "$as_me:14624: \$? = $ac_status" >&5
14625 (exit $ac_status); } &&
14626 { ac_try='test -s conftest.$ac_objext'
14627 { (eval echo "$as_me:14627: \"$ac_try\"") >&5
14628 (eval $ac_try) 2>&5
14629 ac_status=$?
14630 echo "$as_me:14630: \$? = $ac_status" >&5
14631 (exit $ac_status); }; }; then
14632 :
14633else
14634 echo "$as_me: failed program was:" >&5
14635cat conftest.$ac_ext >&5
14636cf_save_cppflags="$CPPFLAGS"
14637 CPPFLAGS="$CPPFLAGS -D_XPG5"
14638 cat >conftest.$ac_ext <<_ACEOF
14639#line 14639 "configure"
14640#include "confdefs.h"
14641
14642#include <${cf_cv_ncurses_header:-curses.h}>
14643int
14644main ()
14645{
14646int x = _XPG5
14647 ;
14648 return 0;
14649}
14650_ACEOF
14651rm -f conftest.$ac_objext
14652if { (eval echo "$as_me:14652: \"$ac_compile\"") >&5
14653 (eval $ac_compile) 2>&5
14654 ac_status=$?
14655 echo "$as_me:14655: \$? = $ac_status" >&5
14656 (exit $ac_status); } &&
14657 { ac_try='test -s conftest.$ac_objext'
14658 { (eval echo "$as_me:14658: \"$ac_try\"") >&5
14659 (eval $ac_try) 2>&5
14660 ac_status=$?
14661 echo "$as_me:14661: \$? = $ac_status" >&5
14662 (exit $ac_status); }; }; then
14663 cf_define_xpg5=yes
14664else
14665 echo "$as_me: failed program was:" >&5
14666cat conftest.$ac_ext >&5
14667fi
14668rm -f conftest.$ac_objext conftest.$ac_ext
14669 CPPFLAGS="$cf_save_cppflags"
14670fi
14671rm -f conftest.$ac_objext conftest.$ac_ext
14672 echo "$as_me:14672: result: $cf_define_xpg5" >&5
14673echo "${ECHO_T}$cf_define_xpg5" >&6
14674
14675 if test "$cf_define_xpg5" = yes
14676 then
14677 CPPFLAGS="$CPPFLAGS -D_XPG5"
14678 fi
14679 fi
14680
14681 echo "$as_me:14681: checking for wide-character functions" >&5
14682echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14683if test "${cf_cv_widechar_funcs+set}" = set; then
14684 echo $ECHO_N "(cached) $ECHO_C" >&6
14685else
14686
14687 cat >conftest.$ac_ext <<_ACEOF
14688#line 14688 "configure"
14689#include "confdefs.h"
14690
14691#include <${cf_cv_ncurses_header:-curses.h}>
14692int
14693main ()
14694{
14695
14696 static wchar_t src_wchar[2];
14697 static cchar_t dst_cchar;
14698 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14699
14700 ;
14701 return 0;
14702}
14703_ACEOF
14704rm -f conftest.$ac_objext conftest$ac_exeext
14705if { (eval echo "$as_me:14705: \"$ac_link\"") >&5
14706 (eval $ac_link) 2>&5
14707 ac_status=$?
14708 echo "$as_me:14708: \$? = $ac_status" >&5
14709 (exit $ac_status); } &&
14710 { ac_try='test -s conftest$ac_exeext'
14711 { (eval echo "$as_me:14711: \"$ac_try\"") >&5
14712 (eval $ac_try) 2>&5
14713 ac_status=$?
14714 echo "$as_me:14714: \$? = $ac_status" >&5
14715 (exit $ac_status); }; }; then
14716 cf_cv_widechar_funcs=yes
14717else
14718 echo "$as_me: failed program was:" >&5
14719cat conftest.$ac_ext >&5
14720cf_cv_widechar_funcs=no
14721fi
14722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14723
14724fi
14725echo "$as_me:14725: result: $cf_cv_widechar_funcs" >&5
14726echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14727 if test "$cf_cv_widechar_funcs" != no ; then
14728
14729cat >>confdefs.h <<\EOF
14730#define USE_WIDEC_SUPPORT 1
14731EOF
14732
14733 else
14734 cat >>confdefs.h <<\EOF
14735#define USE_WIDEC_SUPPORT 0
14736EOF
14737
14738 fi
14739else
14740 cat >>confdefs.h <<\EOF
14741#define USE_WIDEC_SUPPORT 0
14742EOF
14743
14744fi
14745
14746echo "$as_me:14746: checking if $cf_cv_screen library uses pthreads" >&5
14747echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
14748if test "${cf_cv_use_pthreads+set}" = set; then
14749 echo $ECHO_N "(cached) $ECHO_C" >&6
14750else
14751
14752cat >conftest.$ac_ext <<_ACEOF
14753#line 14753 "configure"
14754#include "confdefs.h"
14755
14756#include <${cf_cv_ncurses_header:-curses.h}>
14757extern void _nc_init_pthreads(void);
14758
14759int
14760main ()
14761{
14762
14763 initscr();
14764 _nc_init_pthreads();
14765
14766 ;
14767 return 0;
14768}
14769_ACEOF
14770rm -f conftest.$ac_objext conftest$ac_exeext
14771if { (eval echo "$as_me:14771: \"$ac_link\"") >&5
14772 (eval $ac_link) 2>&5
14773 ac_status=$?
14774 echo "$as_me:14774: \$? = $ac_status" >&5
14775 (exit $ac_status); } &&
14776 { ac_try='test -s conftest$ac_exeext'
14777 { (eval echo "$as_me:14777: \"$ac_try\"") >&5
14778 (eval $ac_try) 2>&5
14779 ac_status=$?
14780 echo "$as_me:14780: \$? = $ac_status" >&5
14781 (exit $ac_status); }; }; then
14782 cf_cv_use_pthreads=yes
14783else
14784 echo "$as_me: failed program was:" >&5
14785cat conftest.$ac_ext >&5
14786cf_cv_use_pthreads=no
14787fi
14788rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14789
14790fi
14791echo "$as_me:14791: result: $cf_cv_use_pthreads" >&5
14792echo "${ECHO_T}$cf_cv_use_pthreads" >&6
14793test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
14794#define USE_PTHREADS 1
14795EOF
14796
14797echo "$as_me:14797: checking if sys/time.h works with sys/select.h" >&5
14798echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14799if test "${cf_cv_sys_time_select+set}" = set; then
14800 echo $ECHO_N "(cached) $ECHO_C" >&6
14801else
14802
14803cat >conftest.$ac_ext <<_ACEOF
14804#line 14804 "configure"
14805#include "confdefs.h"
14806
14807#include <sys/types.h>
14808#ifdef HAVE_SYS_TIME_H
14809#include <sys/time.h>
14810#endif
14811#ifdef HAVE_SYS_SELECT_H
14812#include <sys/select.h>
14813#endif
14814
14815int
14816main ()
14817{
14818
14819 ;
14820 return 0;
14821}
14822_ACEOF
14823rm -f conftest.$ac_objext
14824if { (eval echo "$as_me:14824: \"$ac_compile\"") >&5
14825 (eval $ac_compile) 2>&5
14826 ac_status=$?
14827 echo "$as_me:14827: \$? = $ac_status" >&5
14828 (exit $ac_status); } &&
14829 { ac_try='test -s conftest.$ac_objext'
14830 { (eval echo "$as_me:14830: \"$ac_try\"") >&5
14831 (eval $ac_try) 2>&5
14832 ac_status=$?
14833 echo "$as_me:14833: \$? = $ac_status" >&5
14834 (exit $ac_status); }; }; then
14835 cf_cv_sys_time_select=yes
14836else
14837 echo "$as_me: failed program was:" >&5
14838cat conftest.$ac_ext >&5
14839cf_cv_sys_time_select=no
14840fi
14841rm -f conftest.$ac_objext conftest.$ac_ext
14842
14843fi
14844
14845echo "$as_me:14845: result: $cf_cv_sys_time_select" >&5
14846echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14847test "$cf_cv_sys_time_select" = yes &&
14848cat >>confdefs.h <<\EOF
14849#define HAVE_SYS_TIME_SELECT 1
14850EOF
14851
14852echo "$as_me:14852: checking for function curses_version" >&5
14853echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14854if test "${cf_cv_func_curses_version+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
14856else
14857
14858if test "$cross_compiling" = yes; then
14859 cf_cv_func_curses_version=unknown
14860else
14861 cat >conftest.$ac_ext <<_ACEOF
14862#line 14862 "configure"
14863#include "confdefs.h"
14864
14865#include <${cf_cv_ncurses_header:-curses.h}>
14866int main()
14867{
14868 char temp[1024];
14869 sprintf(temp, "%s\n", curses_version());
14870 ${cf_cv_main_return:-return}(0);
14871}
14872
14873_ACEOF
14874rm -f conftest$ac_exeext
14875if { (eval echo "$as_me:14875: \"$ac_link\"") >&5
14876 (eval $ac_link) 2>&5
14877 ac_status=$?
14878 echo "$as_me:14878: \$? = $ac_status" >&5
14879 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14880 { (eval echo "$as_me:14880: \"$ac_try\"") >&5
14881 (eval $ac_try) 2>&5
14882 ac_status=$?
14883 echo "$as_me:14883: \$? = $ac_status" >&5
14884 (exit $ac_status); }; }; then
14885 cf_cv_func_curses_version=yes
14886
14887else
14888 echo "$as_me: program exited with status $ac_status" >&5
14889echo "$as_me: failed program was:" >&5
14890cat conftest.$ac_ext >&5
14891cf_cv_func_curses_version=no
14892
14893fi
14894rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14895fi
14896rm -f core
14897fi
14898echo "$as_me:14898: result: $cf_cv_func_curses_version" >&5
14899echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14900test "$cf_cv_func_curses_version" = yes &&
14901cat >>confdefs.h <<\EOF
14902#define HAVE_CURSES_VERSION 1
14903EOF
14904
14905echo "$as_me:14905: checking for alternate character set array" >&5
14906echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14907if test "${cf_cv_curses_acs_map+set}" = set; then
14908 echo $ECHO_N "(cached) $ECHO_C" >&6
14909else
14910
14911cf_cv_curses_acs_map=unknown
14912for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14913do
14914cat >conftest.$ac_ext <<_ACEOF
14915#line 14915 "configure"
14916#include "confdefs.h"
14917
14918#include <${cf_cv_ncurses_header:-curses.h}>
14919
14920int
14921main ()
14922{
14923
14924$name['k'] = ACS_PLUS
14925
14926 ;
14927 return 0;
14928}
14929_ACEOF
14930rm -f conftest.$ac_objext conftest$ac_exeext
14931if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
14932 (eval $ac_link) 2>&5
14933 ac_status=$?
14934 echo "$as_me:14934: \$? = $ac_status" >&5
14935 (exit $ac_status); } &&
14936 { ac_try='test -s conftest$ac_exeext'
14937 { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14938 (eval $ac_try) 2>&5
14939 ac_status=$?
14940 echo "$as_me:14940: \$? = $ac_status" >&5
14941 (exit $ac_status); }; }; then
14942 cf_cv_curses_acs_map=$name; break
14943else
14944 echo "$as_me: failed program was:" >&5
14945cat conftest.$ac_ext >&5
14946fi
14947rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14948done
14949
14950fi
14951echo "$as_me:14951: result: $cf_cv_curses_acs_map" >&5
14952echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14953
14954test "$cf_cv_curses_acs_map" != unknown &&
14955cat >>confdefs.h <<EOF
14956#define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14957EOF
14958
14959if test "$cf_enable_widec" = yes; then
14960
14961echo "$as_me:14961: checking for wide alternate character set array" >&5
14962echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14963if test "${cf_cv_curses_wacs_map+set}" = set; then
14964 echo $ECHO_N "(cached) $ECHO_C" >&6
14965else
14966
14967 cf_cv_curses_wacs_map=unknown
14968 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14969 do
14970 cat >conftest.$ac_ext <<_ACEOF
14971#line 14971 "configure"
14972#include "confdefs.h"
14973
14974#ifndef _XOPEN_SOURCE_EXTENDED
14975#define _XOPEN_SOURCE_EXTENDED
14976#endif
14977#include <${cf_cv_ncurses_header:-curses.h}>
14978int
14979main ()
14980{
14981void *foo = &($name['k'])
14982 ;
14983 return 0;
14984}
14985_ACEOF
14986rm -f conftest.$ac_objext conftest$ac_exeext
14987if { (eval echo "$as_me:14987: \"$ac_link\"") >&5
14988 (eval $ac_link) 2>&5
14989 ac_status=$?
14990 echo "$as_me:14990: \$? = $ac_status" >&5
14991 (exit $ac_status); } &&
14992 { ac_try='test -s conftest$ac_exeext'
14993 { (eval echo "$as_me:14993: \"$ac_try\"") >&5
14994 (eval $ac_try) 2>&5
14995 ac_status=$?
14996 echo "$as_me:14996: \$? = $ac_status" >&5
14997 (exit $ac_status); }; }; then
14998 cf_cv_curses_wacs_map=$name
14999 break
15000else
15001 echo "$as_me: failed program was:" >&5
15002cat conftest.$ac_ext >&5
15003fi
15004rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15005 done
15006fi
15007echo "$as_me:15007: result: $cf_cv_curses_wacs_map" >&5
15008echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15009
15010test "$cf_cv_curses_wacs_map" != unknown &&
15011cat >>confdefs.h <<EOF
15012#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15013EOF
15014
15015echo "$as_me:15015: checking for wide alternate character constants" >&5
15016echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15017if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15018 echo $ECHO_N "(cached) $ECHO_C" >&6
15019else
15020
15021cf_cv_curses_wacs_symbols=no
15022if test "$cf_cv_curses_wacs_map" != unknown
15023then
15024 cat >conftest.$ac_ext <<_ACEOF
15025#line 15025 "configure"
15026#include "confdefs.h"
15027
15028#ifndef _XOPEN_SOURCE_EXTENDED
15029#define _XOPEN_SOURCE_EXTENDED
15030#endif
15031#include <${cf_cv_ncurses_header:-curses.h}>
15032int
15033main ()
15034{
15035cchar_t *foo = WACS_PLUS;
15036 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15037 ;
15038 return 0;
15039}
15040_ACEOF
15041rm -f conftest.$ac_objext conftest$ac_exeext
15042if { (eval echo "$as_me:15042: \"$ac_link\"") >&5
15043 (eval $ac_link) 2>&5
15044 ac_status=$?
15045 echo "$as_me:15045: \$? = $ac_status" >&5
15046 (exit $ac_status); } &&
15047 { ac_try='test -s conftest$ac_exeext'
15048 { (eval echo "$as_me:15048: \"$ac_try\"") >&5
15049 (eval $ac_try) 2>&5
15050 ac_status=$?
15051 echo "$as_me:15051: \$? = $ac_status" >&5
15052 (exit $ac_status); }; }; then
15053 cf_cv_curses_wacs_symbols=yes
15054else
15055 echo "$as_me: failed program was:" >&5
15056cat conftest.$ac_ext >&5
15057fi
15058rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15059else
15060 cat >conftest.$ac_ext <<_ACEOF
15061#line 15061 "configure"
15062#include "confdefs.h"
15063
15064#ifndef _XOPEN_SOURCE_EXTENDED
15065#define _XOPEN_SOURCE_EXTENDED
15066#endif
15067#include <${cf_cv_ncurses_header:-curses.h}>
15068int
15069main ()
15070{
15071cchar_t *foo = WACS_PLUS
15072 ;
15073 return 0;
15074}
15075_ACEOF
15076rm -f conftest.$ac_objext conftest$ac_exeext
15077if { (eval echo "$as_me:15077: \"$ac_link\"") >&5
15078 (eval $ac_link) 2>&5
15079 ac_status=$?
15080 echo "$as_me:15080: \$? = $ac_status" >&5
15081 (exit $ac_status); } &&
15082 { ac_try='test -s conftest$ac_exeext'
15083 { (eval echo "$as_me:15083: \"$ac_try\"") >&5
15084 (eval $ac_try) 2>&5
15085 ac_status=$?
15086 echo "$as_me:15086: \$? = $ac_status" >&5
15087 (exit $ac_status); }; }; then
15088 cf_cv_curses_wacs_symbols=yes
15089else
15090 echo "$as_me: failed program was:" >&5
15091cat conftest.$ac_ext >&5
15092fi
15093rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15094fi
15095
15096fi
15097echo "$as_me:15097: result: $cf_cv_curses_wacs_symbols" >&5
15098echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15099
15100test "$cf_cv_curses_wacs_symbols" != no &&
15101cat >>confdefs.h <<\EOF
15102#define CURSES_WACS_SYMBOLS 1
15103EOF
15104
15105fi
15106
15107echo "$as_me:15107: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15108echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15109cat >conftest.$ac_ext <<_ACEOF
15110#line 15110 "configure"
15111#include "confdefs.h"
15112
15113#ifndef _XOPEN_SOURCE_EXTENDED
15114#define _XOPEN_SOURCE_EXTENDED
15115#endif
15116#include <${cf_cv_ncurses_header:-curses.h}>
15117int
15118main ()
15119{
15120
15121attr_t foo
15122
15123 ;
15124 return 0;
15125}
15126_ACEOF
15127rm -f conftest.$ac_objext
15128if { (eval echo "$as_me:15128: \"$ac_compile\"") >&5
15129 (eval $ac_compile) 2>&5
15130 ac_status=$?
15131 echo "$as_me:15131: \$? = $ac_status" >&5
15132 (exit $ac_status); } &&
15133 { ac_try='test -s conftest.$ac_objext'
15134 { (eval echo "$as_me:15134: \"$ac_try\"") >&5
15135 (eval $ac_try) 2>&5
15136 ac_status=$?
15137 echo "$as_me:15137: \$? = $ac_status" >&5
15138 (exit $ac_status); }; }; then
15139 cf_result=yes
15140else
15141 echo "$as_me: failed program was:" >&5
15142cat conftest.$ac_ext >&5
15143cf_result=no
15144fi
15145rm -f conftest.$ac_objext conftest.$ac_ext
15146echo "$as_me:15146: result: $cf_result" >&5
15147echo "${ECHO_T}$cf_result" >&6
15148if test $cf_result = yes ; then
15149
15150cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15151
15152cat >>confdefs.h <<EOF
15153#define $cf_result 1
15154EOF
15155
15156else
15157
15158cat >>confdefs.h <<EOF
15159#define attr_t long
15160EOF
15161
15162fi
15163
15164if test "$cf_enable_widec" = yes; then
15165
15166# This is needed on Tru64 5.0 to declare mbstate_t
15167echo "$as_me:15167: checking if we must include wchar.h to declare mbstate_t" >&5
15168echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15169if test "${cf_cv_mbstate_t+set}" = set; then
15170 echo $ECHO_N "(cached) $ECHO_C" >&6
15171else
15172
15173cat >conftest.$ac_ext <<_ACEOF
15174#line 15174 "configure"
15175#include "confdefs.h"
15176
15177#include <stdlib.h>
15178#include <stdarg.h>
15179#include <stdio.h>
15180#ifdef HAVE_LIBUTF8_H
15181#include <libutf8.h>
15182#endif
15183int
15184main ()
15185{
15186mbstate_t state
15187 ;
15188 return 0;
15189}
15190_ACEOF
15191rm -f conftest.$ac_objext
15192if { (eval echo "$as_me:15192: \"$ac_compile\"") >&5
15193 (eval $ac_compile) 2>&5
15194 ac_status=$?
15195 echo "$as_me:15195: \$? = $ac_status" >&5
15196 (exit $ac_status); } &&
15197 { ac_try='test -s conftest.$ac_objext'
15198 { (eval echo "$as_me:15198: \"$ac_try\"") >&5
15199 (eval $ac_try) 2>&5
15200 ac_status=$?
15201 echo "$as_me:15201: \$? = $ac_status" >&5
15202 (exit $ac_status); }; }; then
15203 cf_cv_mbstate_t=no
15204else
15205 echo "$as_me: failed program was:" >&5
15206cat conftest.$ac_ext >&5
15207cat >conftest.$ac_ext <<_ACEOF
15208#line 15208 "configure"
15209#include "confdefs.h"
15210
15211#include <stdlib.h>
15212#include <stdarg.h>
15213#include <stdio.h>
15214#include <wchar.h>
15215#ifdef HAVE_LIBUTF8_H
15216#include <libutf8.h>
15217#endif
15218int
15219main ()
15220{
15221mbstate_t value
15222 ;
15223 return 0;
15224}
15225_ACEOF
15226rm -f conftest.$ac_objext
15227if { (eval echo "$as_me:15227: \"$ac_compile\"") >&5
15228 (eval $ac_compile) 2>&5
15229 ac_status=$?
15230 echo "$as_me:15230: \$? = $ac_status" >&5
15231 (exit $ac_status); } &&
15232 { ac_try='test -s conftest.$ac_objext'
15233 { (eval echo "$as_me:15233: \"$ac_try\"") >&5
15234 (eval $ac_try) 2>&5
15235 ac_status=$?
15236 echo "$as_me:15236: \$? = $ac_status" >&5
15237 (exit $ac_status); }; }; then
15238 cf_cv_mbstate_t=yes
15239else
15240 echo "$as_me: failed program was:" >&5
15241cat conftest.$ac_ext >&5
15242cf_cv_mbstate_t=unknown
15243fi
15244rm -f conftest.$ac_objext conftest.$ac_ext
15245fi
15246rm -f conftest.$ac_objext conftest.$ac_ext
15247fi
15248echo "$as_me:15248: result: $cf_cv_mbstate_t" >&5
15249echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15250
15251if test "$cf_cv_mbstate_t" = yes ; then
15252
15253cat >>confdefs.h <<\EOF
15254#define NEED_WCHAR_H 1
15255EOF
15256
15257 NEED_WCHAR_H=1
15258fi
15259
15260# if we do not find mbstate_t in either place, use substitution to provide a fallback.
15261if test "$cf_cv_mbstate_t" = unknown ; then
15262 NCURSES_MBSTATE_T=1
15263fi
15264
15265# if we find mbstate_t in either place, use substitution to provide a fallback.
15266if test "$cf_cv_mbstate_t" != unknown ; then
15267 NCURSES_OK_MBSTATE_T=1
15268fi
15269
15270# This is needed on Tru64 5.0 to declare wchar_t
15271echo "$as_me:15271: checking if we must include wchar.h to declare wchar_t" >&5
15272echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15273if test "${cf_cv_wchar_t+set}" = set; then
15274 echo $ECHO_N "(cached) $ECHO_C" >&6
15275else
15276
15277cat >conftest.$ac_ext <<_ACEOF
15278#line 15278 "configure"
15279#include "confdefs.h"
15280
15281#include <stdlib.h>
15282#include <stdarg.h>
15283#include <stdio.h>
15284#ifdef HAVE_LIBUTF8_H
15285#include <libutf8.h>
15286#endif
15287int
15288main ()
15289{
15290wchar_t state
15291 ;
15292 return 0;
15293}
15294_ACEOF
15295rm -f conftest.$ac_objext
15296if { (eval echo "$as_me:15296: \"$ac_compile\"") >&5
15297 (eval $ac_compile) 2>&5
15298 ac_status=$?
15299 echo "$as_me:15299: \$? = $ac_status" >&5
15300 (exit $ac_status); } &&
15301 { ac_try='test -s conftest.$ac_objext'
15302 { (eval echo "$as_me:15302: \"$ac_try\"") >&5
15303 (eval $ac_try) 2>&5
15304 ac_status=$?
15305 echo "$as_me:15305: \$? = $ac_status" >&5
15306 (exit $ac_status); }; }; then
15307 cf_cv_wchar_t=no
15308else
15309 echo "$as_me: failed program was:" >&5
15310cat conftest.$ac_ext >&5
15311cat >conftest.$ac_ext <<_ACEOF
15312#line 15312 "configure"
15313#include "confdefs.h"
15314
15315#include <stdlib.h>
15316#include <stdarg.h>
15317#include <stdio.h>
15318#include <wchar.h>
15319#ifdef HAVE_LIBUTF8_H
15320#include <libutf8.h>
15321#endif
15322int
15323main ()
15324{
15325wchar_t value
15326 ;
15327 return 0;
15328}
15329_ACEOF
15330rm -f conftest.$ac_objext
15331if { (eval echo "$as_me:15331: \"$ac_compile\"") >&5
15332 (eval $ac_compile) 2>&5
15333 ac_status=$?
15334 echo "$as_me:15334: \$? = $ac_status" >&5
15335 (exit $ac_status); } &&
15336 { ac_try='test -s conftest.$ac_objext'
15337 { (eval echo "$as_me:15337: \"$ac_try\"") >&5
15338 (eval $ac_try) 2>&5
15339 ac_status=$?
15340 echo "$as_me:15340: \$? = $ac_status" >&5
15341 (exit $ac_status); }; }; then
15342 cf_cv_wchar_t=yes
15343else
15344 echo "$as_me: failed program was:" >&5
15345cat conftest.$ac_ext >&5
15346cf_cv_wchar_t=unknown
15347fi
15348rm -f conftest.$ac_objext conftest.$ac_ext
15349fi
15350rm -f conftest.$ac_objext conftest.$ac_ext
15351fi
15352echo "$as_me:15352: result: $cf_cv_wchar_t" >&5
15353echo "${ECHO_T}$cf_cv_wchar_t" >&6
15354
15355if test "$cf_cv_wchar_t" = yes ; then
15356
15357cat >>confdefs.h <<\EOF
15358#define NEED_WCHAR_H 1
15359EOF
15360
15361 NEED_WCHAR_H=1
15362fi
15363
15364# if we do not find wchar_t in either place, use substitution to provide a fallback.
15365if test "$cf_cv_wchar_t" = unknown ; then
15366 NCURSES_WCHAR_T=1
15367fi
15368
15369# if we find wchar_t in either place, use substitution to provide a fallback.
15370if test "$cf_cv_wchar_t" != unknown ; then
15371 NCURSES_OK_WCHAR_T=1
15372fi
15373
15374# This is needed on Tru64 5.0 to declare wint_t
15375echo "$as_me:15375: checking if we must include wchar.h to declare wint_t" >&5
15376echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15377if test "${cf_cv_wint_t+set}" = set; then
15378 echo $ECHO_N "(cached) $ECHO_C" >&6
15379else
15380
15381cat >conftest.$ac_ext <<_ACEOF
15382#line 15382 "configure"
15383#include "confdefs.h"
15384
15385#include <stdlib.h>
15386#include <stdarg.h>
15387#include <stdio.h>
15388#ifdef HAVE_LIBUTF8_H
15389#include <libutf8.h>
15390#endif
15391int
15392main ()
15393{
15394wint_t state
15395 ;
15396 return 0;
15397}
15398_ACEOF
15399rm -f conftest.$ac_objext
15400if { (eval echo "$as_me:15400: \"$ac_compile\"") >&5
15401 (eval $ac_compile) 2>&5
15402 ac_status=$?
15403 echo "$as_me:15403: \$? = $ac_status" >&5
15404 (exit $ac_status); } &&
15405 { ac_try='test -s conftest.$ac_objext'
15406 { (eval echo "$as_me:15406: \"$ac_try\"") >&5
15407 (eval $ac_try) 2>&5
15408 ac_status=$?
15409 echo "$as_me:15409: \$? = $ac_status" >&5
15410 (exit $ac_status); }; }; then
15411 cf_cv_wint_t=no
15412else
15413 echo "$as_me: failed program was:" >&5
15414cat conftest.$ac_ext >&5
15415cat >conftest.$ac_ext <<_ACEOF
15416#line 15416 "configure"
15417#include "confdefs.h"
15418
15419#include <stdlib.h>
15420#include <stdarg.h>
15421#include <stdio.h>
15422#include <wchar.h>
15423#ifdef HAVE_LIBUTF8_H
15424#include <libutf8.h>
15425#endif
15426int
15427main ()
15428{
15429wint_t value
15430 ;
15431 return 0;
15432}
15433_ACEOF
15434rm -f conftest.$ac_objext
15435if { (eval echo "$as_me:15435: \"$ac_compile\"") >&5
15436 (eval $ac_compile) 2>&5
15437 ac_status=$?
15438 echo "$as_me:15438: \$? = $ac_status" >&5
15439 (exit $ac_status); } &&
15440 { ac_try='test -s conftest.$ac_objext'
15441 { (eval echo "$as_me:15441: \"$ac_try\"") >&5
15442 (eval $ac_try) 2>&5
15443 ac_status=$?
15444 echo "$as_me:15444: \$? = $ac_status" >&5
15445 (exit $ac_status); }; }; then
15446 cf_cv_wint_t=yes
15447else
15448 echo "$as_me: failed program was:" >&5
15449cat conftest.$ac_ext >&5
15450cf_cv_wint_t=unknown
15451fi
15452rm -f conftest.$ac_objext conftest.$ac_ext
15453fi
15454rm -f conftest.$ac_objext conftest.$ac_ext
15455fi
15456echo "$as_me:15456: result: $cf_cv_wint_t" >&5
15457echo "${ECHO_T}$cf_cv_wint_t" >&6
15458
15459if test "$cf_cv_wint_t" = yes ; then
15460
15461cat >>confdefs.h <<\EOF
15462#define NEED_WCHAR_H 1
15463EOF
15464
15465 NEED_WCHAR_H=1
15466fi
15467
15468# if we do not find wint_t in either place, use substitution to provide a fallback.
15469if test "$cf_cv_wint_t" = unknown ; then
15470 NCURSES_WINT_T=1
15471fi
15472
15473# if we find wint_t in either place, use substitution to provide a fallback.
15474if test "$cf_cv_wint_t" != unknown ; then
15475 NCURSES_OK_WINT_T=1
15476fi
15477
15478 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15479
15480echo "$as_me:15480: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15481echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15482cat >conftest.$ac_ext <<_ACEOF
15483#line 15483 "configure"
15484#include "confdefs.h"
15485
15486#ifndef _XOPEN_SOURCE_EXTENDED
15487#define _XOPEN_SOURCE_EXTENDED
15488#endif
15489#include <${cf_cv_ncurses_header:-curses.h}>
15490int
15491main ()
15492{
15493
15494mbstate_t foo
15495
15496 ;
15497 return 0;
15498}
15499_ACEOF
15500rm -f conftest.$ac_objext
15501if { (eval echo "$as_me:15501: \"$ac_compile\"") >&5
15502 (eval $ac_compile) 2>&5
15503 ac_status=$?
15504 echo "$as_me:15504: \$? = $ac_status" >&5
15505 (exit $ac_status); } &&
15506 { ac_try='test -s conftest.$ac_objext'
15507 { (eval echo "$as_me:15507: \"$ac_try\"") >&5
15508 (eval $ac_try) 2>&5
15509 ac_status=$?
15510 echo "$as_me:15510: \$? = $ac_status" >&5
15511 (exit $ac_status); }; }; then
15512 cf_result=yes
15513else
15514 echo "$as_me: failed program was:" >&5
15515cat conftest.$ac_ext >&5
15516cf_result=no
15517fi
15518rm -f conftest.$ac_objext conftest.$ac_ext
15519echo "$as_me:15519: result: $cf_result" >&5
15520echo "${ECHO_T}$cf_result" >&6
15521if test $cf_result = yes ; then
15522
15523cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15524
15525cat >>confdefs.h <<EOF
15526#define $cf_result 1
15527EOF
15528
15529else
15530
15531cat >>confdefs.h <<EOF
15532#define mbstate_t long
15533EOF
15534
15535fi
15536
15537 fi
15538
15539 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15540
15541echo "$as_me:15541: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15542echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15543cat >conftest.$ac_ext <<_ACEOF
15544#line 15544 "configure"
15545#include "confdefs.h"
15546
15547#ifndef _XOPEN_SOURCE_EXTENDED
15548#define _XOPEN_SOURCE_EXTENDED
15549#endif
15550#include <${cf_cv_ncurses_header:-curses.h}>
15551int
15552main ()
15553{
15554
15555wchar_t foo
15556
15557 ;
15558 return 0;
15559}
15560_ACEOF
15561rm -f conftest.$ac_objext
15562if { (eval echo "$as_me:15562: \"$ac_compile\"") >&5
15563 (eval $ac_compile) 2>&5
15564 ac_status=$?
15565 echo "$as_me:15565: \$? = $ac_status" >&5
15566 (exit $ac_status); } &&
15567 { ac_try='test -s conftest.$ac_objext'
15568 { (eval echo "$as_me:15568: \"$ac_try\"") >&5
15569 (eval $ac_try) 2>&5
15570 ac_status=$?
15571 echo "$as_me:15571: \$? = $ac_status" >&5
15572 (exit $ac_status); }; }; then
15573 cf_result=yes
15574else
15575 echo "$as_me: failed program was:" >&5
15576cat conftest.$ac_ext >&5
15577cf_result=no
15578fi
15579rm -f conftest.$ac_objext conftest.$ac_ext
15580echo "$as_me:15580: result: $cf_result" >&5
15581echo "${ECHO_T}$cf_result" >&6
15582if test $cf_result = yes ; then
15583
15584cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15585
15586cat >>confdefs.h <<EOF
15587#define $cf_result 1
15588EOF
15589
15590else
15591
15592cat >>confdefs.h <<EOF
15593#define wchar_t long
15594EOF
15595
15596fi
15597
15598 fi
15599
15600 if test "$NCURSES_OK_WINT_T" = 0 ; then
15601
15602echo "$as_me:15602: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15603echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15604cat >conftest.$ac_ext <<_ACEOF
15605#line 15605 "configure"
15606#include "confdefs.h"
15607
15608#ifndef _XOPEN_SOURCE_EXTENDED
15609#define _XOPEN_SOURCE_EXTENDED
15610#endif
15611#include <${cf_cv_ncurses_header:-curses.h}>
15612int
15613main ()
15614{
15615
15616wint_t foo
15617
15618 ;
15619 return 0;
15620}
15621_ACEOF
15622rm -f conftest.$ac_objext
15623if { (eval echo "$as_me:15623: \"$ac_compile\"") >&5
15624 (eval $ac_compile) 2>&5
15625 ac_status=$?
15626 echo "$as_me:15626: \$? = $ac_status" >&5
15627 (exit $ac_status); } &&
15628 { ac_try='test -s conftest.$ac_objext'
15629 { (eval echo "$as_me:15629: \"$ac_try\"") >&5
15630 (eval $ac_try) 2>&5
15631 ac_status=$?
15632 echo "$as_me:15632: \$? = $ac_status" >&5
15633 (exit $ac_status); }; }; then
15634 cf_result=yes
15635else
15636 echo "$as_me: failed program was:" >&5
15637cat conftest.$ac_ext >&5
15638cf_result=no
15639fi
15640rm -f conftest.$ac_objext conftest.$ac_ext
15641echo "$as_me:15641: result: $cf_result" >&5
15642echo "${ECHO_T}$cf_result" >&6
15643if test $cf_result = yes ; then
15644
15645cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15646
15647cat >>confdefs.h <<EOF
15648#define $cf_result 1
15649EOF
15650
15651else
15652
15653cat >>confdefs.h <<EOF
15654#define wint_t long
15655EOF
15656
15657fi
15658
15659 fi
15660fi
15661
15662echo "$as_me:15662: checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15663echo $ECHO_N "checking for data ospeed declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15664
15665cat >conftest.$ac_ext <<_ACEOF
15666#line 15666 "configure"
15667#include "confdefs.h"
15668
15669#ifdef HAVE_XCURSES
15670#include <xcurses.h>
15671char * XCursesProgramName = "test";
15672#else
15673#include <${cf_cv_ncurses_header:-curses.h}>
15674#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15675#include <ncursesw/term.h>
15676#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15677#include <ncurses/term.h>
15678#elif defined(HAVE_TERM_H)
15679#include <term.h>
15680#endif
15681#endif
15682
15683int
15684main ()
15685{
15686
15687void *foo = &(ospeed)
15688
15689 ;
15690 return 0;
15691}
15692_ACEOF
15693rm -f conftest.$ac_objext
15694if { (eval echo "$as_me:15694: \"$ac_compile\"") >&5
15695 (eval $ac_compile) 2>&5
15696 ac_status=$?
15697 echo "$as_me:15697: \$? = $ac_status" >&5
15698 (exit $ac_status); } &&
15699 { ac_try='test -s conftest.$ac_objext'
15700 { (eval echo "$as_me:15700: \"$ac_try\"") >&5
15701 (eval $ac_try) 2>&5
15702 ac_status=$?
15703 echo "$as_me:15703: \$? = $ac_status" >&5
15704 (exit $ac_status); }; }; then
15705 cf_result=yes
15706else
15707 echo "$as_me: failed program was:" >&5
15708cat conftest.$ac_ext >&5
15709cf_result=no
15710fi
15711rm -f conftest.$ac_objext conftest.$ac_ext
15712echo "$as_me:15712: result: $cf_result" >&5
15713echo "${ECHO_T}$cf_result" >&6
15714
15715if test $cf_result = yes ; then
15716
15717cf_result=`echo "have_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15718
15719 cat >>confdefs.h <<EOF
15720#define $cf_result 1
15721EOF
15722
15723else
15724 echo "$as_me:15724: checking for data ospeed in library" >&5
15725echo $ECHO_N "checking for data ospeed in library... $ECHO_C" >&6
15726 # BSD linkers insist on making weak linkage, but resolve at runtime.
15727 if test "$cross_compiling" = yes; then
15728
15729 # cross-compiling
15730 cat >conftest.$ac_ext <<_ACEOF
15731#line 15731 "configure"
15732#include "confdefs.h"
15733
15734#ifdef HAVE_XCURSES
15735#include <xcurses.h>
15736char * XCursesProgramName = "test";
15737#else
15738#include <${cf_cv_ncurses_header:-curses.h}>
15739#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15740#include <ncursesw/term.h>
15741#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15742#include <ncurses/term.h>
15743#elif defined(HAVE_TERM_H)
15744#include <term.h>
15745#endif
15746#endif
15747
15748extern char ospeed;
15749int
15750main ()
15751{
15752
15753 do {
15754 void *foo = &(ospeed);
15755 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
15756 ${cf_cv_main_return:-return}(foo == 0);
15757 } while (0)
15758
15759 ;
15760 return 0;
15761}
15762_ACEOF
15763rm -f conftest.$ac_objext conftest$ac_exeext
15764if { (eval echo "$as_me:15764: \"$ac_link\"") >&5
15765 (eval $ac_link) 2>&5
15766 ac_status=$?
15767 echo "$as_me:15767: \$? = $ac_status" >&5
15768 (exit $ac_status); } &&
15769 { ac_try='test -s conftest$ac_exeext'
15770 { (eval echo "$as_me:15770: \"$ac_try\"") >&5
15771 (eval $ac_try) 2>&5
15772 ac_status=$?
15773 echo "$as_me:15773: \$? = $ac_status" >&5
15774 (exit $ac_status); }; }; then
15775 cf_result=yes
15776else
15777 echo "$as_me: failed program was:" >&5
15778cat conftest.$ac_ext >&5
15779cf_result=no
15780fi
15781rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15782
15783else
15784 cat >conftest.$ac_ext <<_ACEOF
15785#line 15785 "configure"
15786#include "confdefs.h"
15787
15788#ifdef HAVE_XCURSES
15789#include <xcurses.h>
15790char * XCursesProgramName = "test";
15791#else
15792#include <${cf_cv_ncurses_header:-curses.h}>
15793#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15794#include <ncursesw/term.h>
15795#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15796#include <ncurses/term.h>
15797#elif defined(HAVE_TERM_H)
15798#include <term.h>
15799#endif
15800#endif
15801
15802extern char ospeed;
15803int main(void)
15804{
15805 void *foo = &(ospeed);
15806 fprintf(stderr, "testing linkage of ospeed:%p\n", foo);
15807 ${cf_cv_main_return:-return}(foo == 0);
15808}
15809_ACEOF
15810rm -f conftest$ac_exeext
15811if { (eval echo "$as_me:15811: \"$ac_link\"") >&5
15812 (eval $ac_link) 2>&5
15813 ac_status=$?
15814 echo "$as_me:15814: \$? = $ac_status" >&5
15815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15816 { (eval echo "$as_me:15816: \"$ac_try\"") >&5
15817 (eval $ac_try) 2>&5
15818 ac_status=$?
15819 echo "$as_me:15819: \$? = $ac_status" >&5
15820 (exit $ac_status); }; }; then
15821 cf_result=yes
15822else
15823 echo "$as_me: program exited with status $ac_status" >&5
15824echo "$as_me: failed program was:" >&5
15825cat conftest.$ac_ext >&5
15826cf_result=no
15827fi
15828rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15829fi
15830 echo "$as_me:15830: result: $cf_result" >&5
15831echo "${ECHO_T}$cf_result" >&6
15832 if test $cf_result = yes ; then
15833
15834cf_result=`echo "decl_curses_data_ospeed" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15835
15836 cat >>confdefs.h <<EOF
15837#define $cf_result 1
15838EOF
15839
15840 fi
15841fi
15842
15843echo "$as_me:15843: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15844echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15845
15846cat >conftest.$ac_ext <<_ACEOF
15847#line 15847 "configure"
15848#include "confdefs.h"
15849
15850#ifdef HAVE_XCURSES
15851#include <xcurses.h>
15852char * XCursesProgramName = "test";
15853#else
15854#include <${cf_cv_ncurses_header:-curses.h}>
15855#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15856#include <ncursesw/term.h>
15857#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15858#include <ncurses/term.h>
15859#elif defined(HAVE_TERM_H)
15860#include <term.h>
15861#endif
15862#endif
15863
15864int
15865main ()
15866{
15867
15868void *foo = &(boolnames)
15869
15870 ;
15871 return 0;
15872}
15873_ACEOF
15874rm -f conftest.$ac_objext
15875if { (eval echo "$as_me:15875: \"$ac_compile\"") >&5
15876 (eval $ac_compile) 2>&5
15877 ac_status=$?
15878 echo "$as_me:15878: \$? = $ac_status" >&5
15879 (exit $ac_status); } &&
15880 { ac_try='test -s conftest.$ac_objext'
15881 { (eval echo "$as_me:15881: \"$ac_try\"") >&5
15882 (eval $ac_try) 2>&5
15883 ac_status=$?
15884 echo "$as_me:15884: \$? = $ac_status" >&5
15885 (exit $ac_status); }; }; then
15886 cf_result=yes
15887else
15888 echo "$as_me: failed program was:" >&5
15889cat conftest.$ac_ext >&5
15890cf_result=no
15891fi
15892rm -f conftest.$ac_objext conftest.$ac_ext
15893echo "$as_me:15893: result: $cf_result" >&5
15894echo "${ECHO_T}$cf_result" >&6
15895
15896if test $cf_result = yes ; then
15897
15898cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15899
15900 cat >>confdefs.h <<EOF
15901#define $cf_result 1
15902EOF
15903
15904else
15905 echo "$as_me:15905: checking for data boolnames in library" >&5
15906echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15907 # BSD linkers insist on making weak linkage, but resolve at runtime.
15908 if test "$cross_compiling" = yes; then
15909
15910 # cross-compiling
15911 cat >conftest.$ac_ext <<_ACEOF
15912#line 15912 "configure"
15913#include "confdefs.h"
15914
15915#ifdef HAVE_XCURSES
15916#include <xcurses.h>
15917char * XCursesProgramName = "test";
15918#else
15919#include <${cf_cv_ncurses_header:-curses.h}>
15920#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15921#include <ncursesw/term.h>
15922#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15923#include <ncurses/term.h>
15924#elif defined(HAVE_TERM_H)
15925#include <term.h>
15926#endif
15927#endif
15928
15929extern char boolnames;
15930int
15931main ()
15932{
15933
15934 do {
15935 void *foo = &(boolnames);
15936 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15937 ${cf_cv_main_return:-return}(foo == 0);
15938 } while (0)
15939
15940 ;
15941 return 0;
15942}
15943_ACEOF
15944rm -f conftest.$ac_objext conftest$ac_exeext
15945if { (eval echo "$as_me:15945: \"$ac_link\"") >&5
15946 (eval $ac_link) 2>&5
15947 ac_status=$?
15948 echo "$as_me:15948: \$? = $ac_status" >&5
15949 (exit $ac_status); } &&
15950 { ac_try='test -s conftest$ac_exeext'
15951 { (eval echo "$as_me:15951: \"$ac_try\"") >&5
15952 (eval $ac_try) 2>&5
15953 ac_status=$?
15954 echo "$as_me:15954: \$? = $ac_status" >&5
15955 (exit $ac_status); }; }; then
15956 cf_result=yes
15957else
15958 echo "$as_me: failed program was:" >&5
15959cat conftest.$ac_ext >&5
15960cf_result=no
15961fi
15962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15963
15964else
15965 cat >conftest.$ac_ext <<_ACEOF
15966#line 15966 "configure"
15967#include "confdefs.h"
15968
15969#ifdef HAVE_XCURSES
15970#include <xcurses.h>
15971char * XCursesProgramName = "test";
15972#else
15973#include <${cf_cv_ncurses_header:-curses.h}>
15974#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15975#include <ncursesw/term.h>
15976#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15977#include <ncurses/term.h>
15978#elif defined(HAVE_TERM_H)
15979#include <term.h>
15980#endif
15981#endif
15982
15983extern char boolnames;
15984int main(void)
15985{
15986 void *foo = &(boolnames);
15987 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15988 ${cf_cv_main_return:-return}(foo == 0);
15989}
15990_ACEOF
15991rm -f conftest$ac_exeext
15992if { (eval echo "$as_me:15992: \"$ac_link\"") >&5
15993 (eval $ac_link) 2>&5
15994 ac_status=$?
15995 echo "$as_me:15995: \$? = $ac_status" >&5
15996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15997 { (eval echo "$as_me:15997: \"$ac_try\"") >&5
15998 (eval $ac_try) 2>&5
15999 ac_status=$?
16000 echo "$as_me:16000: \$? = $ac_status" >&5
16001 (exit $ac_status); }; }; then
16002 cf_result=yes
16003else
16004 echo "$as_me: program exited with status $ac_status" >&5
16005echo "$as_me: failed program was:" >&5
16006cat conftest.$ac_ext >&5
16007cf_result=no
16008fi
16009rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16010fi
16011 echo "$as_me:16011: result: $cf_result" >&5
16012echo "${ECHO_T}$cf_result" >&6
16013 if test $cf_result = yes ; then
16014
16015cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16016
16017 cat >>confdefs.h <<EOF
16018#define $cf_result 1
16019EOF
16020
16021 fi
16022fi
16023
16024echo "$as_me:16024: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
16025echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
16026
16027cat >conftest.$ac_ext <<_ACEOF
16028#line 16028 "configure"
16029#include "confdefs.h"
16030
16031#ifdef HAVE_XCURSES
16032#include <xcurses.h>
16033char * XCursesProgramName = "test";
16034#else
16035#include <${cf_cv_ncurses_header:-curses.h}>
16036#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16037#include <ncursesw/term.h>
16038#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16039#include <ncurses/term.h>
16040#elif defined(HAVE_TERM_H)
16041#include <term.h>
16042#endif
16043#endif
16044
16045int
16046main ()
16047{
16048
16049void *foo = &(boolfnames)
16050
16051 ;
16052 return 0;
16053}
16054_ACEOF
16055rm -f conftest.$ac_objext
16056if { (eval echo "$as_me:16056: \"$ac_compile\"") >&5
16057 (eval $ac_compile) 2>&5
16058 ac_status=$?
16059 echo "$as_me:16059: \$? = $ac_status" >&5
16060 (exit $ac_status); } &&
16061 { ac_try='test -s conftest.$ac_objext'
16062 { (eval echo "$as_me:16062: \"$ac_try\"") >&5
16063 (eval $ac_try) 2>&5
16064 ac_status=$?
16065 echo "$as_me:16065: \$? = $ac_status" >&5
16066 (exit $ac_status); }; }; then
16067 cf_result=yes
16068else
16069 echo "$as_me: failed program was:" >&5
16070cat conftest.$ac_ext >&5
16071cf_result=no
16072fi
16073rm -f conftest.$ac_objext conftest.$ac_ext
16074echo "$as_me:16074: result: $cf_result" >&5
16075echo "${ECHO_T}$cf_result" >&6
16076
16077if test $cf_result = yes ; then
16078
16079cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16080
16081 cat >>confdefs.h <<EOF
16082#define $cf_result 1
16083EOF
16084
16085else
16086 echo "$as_me:16086: checking for data boolfnames in library" >&5
16087echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
16088 # BSD linkers insist on making weak linkage, but resolve at runtime.
16089 if test "$cross_compiling" = yes; then
16090
16091 # cross-compiling
16092 cat >conftest.$ac_ext <<_ACEOF
16093#line 16093 "configure"
16094#include "confdefs.h"
16095
16096#ifdef HAVE_XCURSES
16097#include <xcurses.h>
16098char * XCursesProgramName = "test";
16099#else
16100#include <${cf_cv_ncurses_header:-curses.h}>
16101#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16102#include <ncursesw/term.h>
16103#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16104#include <ncurses/term.h>
16105#elif defined(HAVE_TERM_H)
16106#include <term.h>
16107#endif
16108#endif
16109
16110extern char boolfnames;
16111int
16112main ()
16113{
16114
16115 do {
16116 void *foo = &(boolfnames);
16117 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16118 ${cf_cv_main_return:-return}(foo == 0);
16119 } while (0)
16120
16121 ;
16122 return 0;
16123}
16124_ACEOF
16125rm -f conftest.$ac_objext conftest$ac_exeext
16126if { (eval echo "$as_me:16126: \"$ac_link\"") >&5
16127 (eval $ac_link) 2>&5
16128 ac_status=$?
16129 echo "$as_me:16129: \$? = $ac_status" >&5
16130 (exit $ac_status); } &&
16131 { ac_try='test -s conftest$ac_exeext'
16132 { (eval echo "$as_me:16132: \"$ac_try\"") >&5
16133 (eval $ac_try) 2>&5
16134 ac_status=$?
16135 echo "$as_me:16135: \$? = $ac_status" >&5
16136 (exit $ac_status); }; }; then
16137 cf_result=yes
16138else
16139 echo "$as_me: failed program was:" >&5
16140cat conftest.$ac_ext >&5
16141cf_result=no
16142fi
16143rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16144
16145else
16146 cat >conftest.$ac_ext <<_ACEOF
16147#line 16147 "configure"
16148#include "confdefs.h"
16149
16150#ifdef HAVE_XCURSES
16151#include <xcurses.h>
16152char * XCursesProgramName = "test";
16153#else
16154#include <${cf_cv_ncurses_header:-curses.h}>
16155#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
16156#include <ncursesw/term.h>
16157#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
16158#include <ncurses/term.h>
16159#elif defined(HAVE_TERM_H)
16160#include <term.h>
16161#endif
16162#endif
16163
16164extern char boolfnames;
16165int main(void)
16166{
16167 void *foo = &(boolfnames);
16168 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
16169 ${cf_cv_main_return:-return}(foo == 0);
16170}
16171_ACEOF
16172rm -f conftest$ac_exeext
16173if { (eval echo "$as_me:16173: \"$ac_link\"") >&5
16174 (eval $ac_link) 2>&5
16175 ac_status=$?
16176 echo "$as_me:16176: \$? = $ac_status" >&5
16177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16178 { (eval echo "$as_me:16178: \"$ac_try\"") >&5
16179 (eval $ac_try) 2>&5
16180 ac_status=$?
16181 echo "$as_me:16181: \$? = $ac_status" >&5
16182 (exit $ac_status); }; }; then
16183 cf_result=yes
16184else
16185 echo "$as_me: program exited with status $ac_status" >&5
16186echo "$as_me: failed program was:" >&5
16187cat conftest.$ac_ext >&5
16188cf_result=no
16189fi
16190rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16191fi
16192 echo "$as_me:16192: result: $cf_result" >&5
16193echo "${ECHO_T}$cf_result" >&6
16194 if test $cf_result = yes ; then
16195
16196cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16197
16198 cat >>confdefs.h <<EOF
16199#define $cf_result 1
16200EOF
16201
16202 fi
16203fi
16204
16205if ( test "$GCC" = yes || test "$GXX" = yes )
16206then
16207echo "$as_me:16207: checking if you want to turn on gcc warnings" >&5
16208echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16209
16210# Check whether --enable-warnings or --disable-warnings was given.
16211if test "${enable_warnings+set}" = set; then
16212 enableval="$enable_warnings"
16213 test "$enableval" != yes && enableval=no
16214 if test "$enableval" != "no" ; then
16215 with_warnings=yes
16216 else
16217 with_warnings=no
16218 fi
16219else
16220 enableval=no
16221 with_warnings=no
16222
16223fi;
16224echo "$as_me:16224: result: $with_warnings" >&5
16225echo "${ECHO_T}$with_warnings" >&6
16226if test "$with_warnings" = "yes"
16227then
16228
16229if test "$GCC" = yes
16230then
16231cat > conftest.i <<EOF
16232#ifndef GCC_PRINTF
16233#define GCC_PRINTF 0
16234#endif
16235#ifndef GCC_SCANF
16236#define GCC_SCANF 0
16237#endif
16238#ifndef GCC_NORETURN
16239#define GCC_NORETURN /* nothing */
16240#endif
16241#ifndef GCC_UNUSED
16242#define GCC_UNUSED /* nothing */
16243#endif
16244EOF
16245if test "$GCC" = yes
16246then
16247 { echo "$as_me:16247: checking for $CC __attribute__ directives..." >&5
16248echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16249cat > conftest.$ac_ext <<EOF
16250#line 16250 "${as_me:-configure}"
16251#include "confdefs.h"
16252#include "conftest.h"
16253#include "conftest.i"
16254#if GCC_PRINTF
16255#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16256#else
16257#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16258#endif
16259#if GCC_SCANF
16260#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16261#else
16262#define GCC_SCANFLIKE(fmt,var) /*nothing*/
16263#endif
16264extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16265extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16266extern void foo(void) GCC_NORETURN;
16267int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
16268EOF
16269 cf_printf_attribute=no
16270 cf_scanf_attribute=no
16271 for cf_attribute in scanf printf unused noreturn
16272 do
16273
16274cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16275
16276 cf_directive="__attribute__(($cf_attribute))"
16277 echo "checking for $CC $cf_directive" 1>&5
16278
16279 case $cf_attribute in
16280 (printf)
16281 cf_printf_attribute=yes
16282 cat >conftest.h <<EOF
16283#define GCC_$cf_ATTRIBUTE 1
16284EOF
16285 ;;
16286 (scanf)
16287 cf_scanf_attribute=yes
16288 cat >conftest.h <<EOF
16289#define GCC_$cf_ATTRIBUTE 1
16290EOF
16291 ;;
16292 (*)
16293 cat >conftest.h <<EOF
16294#define GCC_$cf_ATTRIBUTE $cf_directive
16295EOF
16296 ;;
16297 esac
16298
16299 if { (eval echo "$as_me:16299: \"$ac_compile\"") >&5
16300 (eval $ac_compile) 2>&5
16301 ac_status=$?
16302 echo "$as_me:16302: \$? = $ac_status" >&5
16303 (exit $ac_status); }; then
16304 test -n "$verbose" && echo "$as_me:16304: result: ... $cf_attribute" >&5
16305echo "${ECHO_T}... $cf_attribute" >&6
16306 cat conftest.h >>confdefs.h
16307 case $cf_attribute in
16308 (noreturn)
16309
16310cat >>confdefs.h <<EOF
16311#define GCC_NORETURN $cf_directive
16312EOF
16313
16314 ;;
16315 (printf)
16316 cf_value='/* nothing */'
16317 if test "$cf_printf_attribute" != no ; then
16318 cf_value='__attribute__((format(printf,fmt,var)))'
16319
16320cat >>confdefs.h <<\EOF
16321#define GCC_PRINTF 1
16322EOF
16323
16324 fi
16325
16326cat >>confdefs.h <<EOF
16327#define GCC_PRINTFLIKE(fmt,var) $cf_value
16328EOF
16329
16330 ;;
16331 (scanf)
16332 cf_value='/* nothing */'
16333 if test "$cf_scanf_attribute" != no ; then
16334 cf_value='__attribute__((format(scanf,fmt,var)))'
16335
16336cat >>confdefs.h <<\EOF
16337#define GCC_SCANF 1
16338EOF
16339
16340 fi
16341
16342cat >>confdefs.h <<EOF
16343#define GCC_SCANFLIKE(fmt,var) $cf_value
16344EOF
16345
16346 ;;
16347 (unused)
16348
16349cat >>confdefs.h <<EOF
16350#define GCC_UNUSED $cf_directive
16351EOF
16352
16353 ;;
16354 esac
16355 fi
16356 done
16357else
16358 fgrep define conftest.i >>confdefs.h
16359fi
16360rm -rf conftest*
16361fi
16362
16363INTEL_COMPILER=no
16364
16365if test "$GCC" = yes ; then
16366 case $host_os in
16367 (linux*|gnu*)
16368 echo "$as_me:16368: checking if this is really Intel C compiler" >&5
16369echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
16370 cf_save_CFLAGS="$CFLAGS"
16371 CFLAGS="$CFLAGS -no-gcc"
16372 cat >conftest.$ac_ext <<_ACEOF
16373#line 16373 "configure"
16374#include "confdefs.h"
16375
16376int
16377main ()
16378{
16379
16380#ifdef __INTEL_COMPILER
16381#else
16382make an error
16383#endif
16384
16385 ;
16386 return 0;
16387}
16388_ACEOF
16389rm -f conftest.$ac_objext
16390if { (eval echo "$as_me:16390: \"$ac_compile\"") >&5
16391 (eval $ac_compile) 2>&5
16392 ac_status=$?
16393 echo "$as_me:16393: \$? = $ac_status" >&5
16394 (exit $ac_status); } &&
16395 { ac_try='test -s conftest.$ac_objext'
16396 { (eval echo "$as_me:16396: \"$ac_try\"") >&5
16397 (eval $ac_try) 2>&5
16398 ac_status=$?
16399 echo "$as_me:16399: \$? = $ac_status" >&5
16400 (exit $ac_status); }; }; then
16401 INTEL_COMPILER=yes
16402cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16403
16404else
16405 echo "$as_me: failed program was:" >&5
16406cat conftest.$ac_ext >&5
16407fi
16408rm -f conftest.$ac_objext conftest.$ac_ext
16409 CFLAGS="$cf_save_CFLAGS"
16410 echo "$as_me:16410: result: $INTEL_COMPILER" >&5
16411echo "${ECHO_T}$INTEL_COMPILER" >&6
16412 ;;
16413 esac
16414fi
16415
16416CLANG_COMPILER=no
16417
16418if test "$GCC" = yes ; then
16419 echo "$as_me:16419: checking if this is really Clang C compiler" >&5
16420echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
16421 cf_save_CFLAGS="$CFLAGS"
16422 CFLAGS="$CFLAGS -Qunused-arguments"
16423 cat >conftest.$ac_ext <<_ACEOF
16424#line 16424 "configure"
16425#include "confdefs.h"
16426
16427int
16428main ()
16429{
16430
16431#ifdef __clang__
16432#else
16433make an error
16434#endif
16435
16436 ;
16437 return 0;
16438}
16439_ACEOF
16440rm -f conftest.$ac_objext
16441if { (eval echo "$as_me:16441: \"$ac_compile\"") >&5
16442 (eval $ac_compile) 2>&5
16443 ac_status=$?
16444 echo "$as_me:16444: \$? = $ac_status" >&5
16445 (exit $ac_status); } &&
16446 { ac_try='test -s conftest.$ac_objext'
16447 { (eval echo "$as_me:16447: \"$ac_try\"") >&5
16448 (eval $ac_try) 2>&5
16449 ac_status=$?
16450 echo "$as_me:16450: \$? = $ac_status" >&5
16451 (exit $ac_status); }; }; then
16452 CLANG_COMPILER=yes
16453cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16454
16455else
16456 echo "$as_me: failed program was:" >&5
16457cat conftest.$ac_ext >&5
16458fi
16459rm -f conftest.$ac_objext conftest.$ac_ext
16460 CFLAGS="$cf_save_CFLAGS"
16461 echo "$as_me:16461: result: $CLANG_COMPILER" >&5
16462echo "${ECHO_T}$CLANG_COMPILER" >&6
16463fi
16464
16465cat > conftest.$ac_ext <<EOF
16466#line 16466 "${as_me:-configure}"
16467int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16468EOF
16469
16470if test "$INTEL_COMPILER" = yes
16471then
16472# The "-wdXXX" options suppress warnings:
16473# remark #1419: external declaration in primary source file
16474# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16475# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16476# remark #193: zero used for undefined preprocessing identifier
16477# remark #593: variable "curs_sb_left_arrow" was set but never used
16478# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16479# remark #869: parameter "tw" was never referenced
16480# remark #981: operands are evaluated in unspecified order
16481# warning #279: controlling expression is constant
16482
16483 { echo "$as_me:16483: checking for $CC warning options..." >&5
16484echo "$as_me: checking for $CC warning options..." >&6;}
16485 cf_save_CFLAGS="$CFLAGS"
16486 EXTRA_CFLAGS="-Wall"
16487 for cf_opt in \
16488 wd1419 \
16489 wd1683 \
16490 wd1684 \
16491 wd193 \
16492 wd593 \
16493 wd279 \
16494 wd810 \
16495 wd869 \
16496 wd981
16497 do
16498 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16499 if { (eval echo "$as_me:16499: \"$ac_compile\"") >&5
16500 (eval $ac_compile) 2>&5
16501 ac_status=$?
16502 echo "$as_me:16502: \$? = $ac_status" >&5
16503 (exit $ac_status); }; then
16504 test -n "$verbose" && echo "$as_me:16504: result: ... -$cf_opt" >&5
16505echo "${ECHO_T}... -$cf_opt" >&6
16506 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16507 fi
16508 done
16509 CFLAGS="$cf_save_CFLAGS"
16510
16511elif test "$GCC" = yes
16512then
16513 { echo "$as_me:16513: checking for $CC warning options..." >&5
16514echo "$as_me: checking for $CC warning options..." >&6;}
16515 cf_save_CFLAGS="$CFLAGS"
16516 EXTRA_CFLAGS=
16517 cf_warn_CONST=""
16518 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16519 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16520 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16521 for cf_opt in W Wall \
16522 Wbad-function-cast \
16523 Wcast-align \
16524 Wcast-qual \
16525 Wdeclaration-after-statement \
16526 Wextra \
16527 Winline \
16528 Wmissing-declarations \
16529 Wmissing-prototypes \
16530 Wnested-externs \
16531 Wpointer-arith \
16532 Wshadow \
16533 Wstrict-prototypes \
16534 Wundef $cf_gcc_warnings $cf_warn_CONST
16535 do
16536 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16537 if { (eval echo "$as_me:16537: \"$ac_compile\"") >&5
16538 (eval $ac_compile) 2>&5
16539 ac_status=$?
16540 echo "$as_me:16540: \$? = $ac_status" >&5
16541 (exit $ac_status); }; then
16542 test -n "$verbose" && echo "$as_me:16542: result: ... -$cf_opt" >&5
16543echo "${ECHO_T}... -$cf_opt" >&6
16544 case $cf_opt in
16545 (Wcast-qual)
16546 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
16547 ;;
16548 (Winline)
16549 case $GCC_VERSION in
16550 ([34].*)
16551 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16552
16553echo "${as_me:-configure}:16553: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16554
16555 continue;;
16556 esac
16557 ;;
16558 (Wpointer-arith)
16559 case $GCC_VERSION in
16560 ([12].*)
16561 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16562
16563echo "${as_me:-configure}:16563: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16564
16565 continue;;
16566 esac
16567 ;;
16568 esac
16569 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16570 fi
16571 done
16572 CFLAGS="$cf_save_CFLAGS"
16573fi
16574rm -rf conftest*
16575
16576fi
16577fi
16578
16579echo "$as_me:16579: checking if you want to use dmalloc for testing" >&5
16580echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16581
16582# Check whether --with-dmalloc or --without-dmalloc was given.
16583if test "${with_dmalloc+set}" = set; then
16584 withval="$with_dmalloc"
16585
16586cat >>confdefs.h <<EOF
16587#define USE_DMALLOC 1
16588EOF
16589
16590 : ${with_cflags:=-g}
16591 : ${with_no_leaks:=yes}
16592 with_dmalloc=yes
16593else
16594 with_dmalloc=
16595fi;
16596echo "$as_me:16596: result: ${with_dmalloc:-no}" >&5
16597echo "${ECHO_T}${with_dmalloc:-no}" >&6
16598
16599case .$with_cflags in
16600(.*-g*)
16601 case .$CFLAGS in
16602 (.*-g*)
16603 ;;
16604 (*)
16605
16606cf_fix_cppflags=no
16607cf_new_cflags=
16608cf_new_cppflags=
16609cf_new_extra_cppflags=
16610
16611for cf_add_cflags in -g
16612do
16613case $cf_fix_cppflags in
16614(no)
16615 case $cf_add_cflags in
16616 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16617 case $cf_add_cflags in
16618 (-D*)
16619 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16620
16621 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16622 && test -z "${cf_tst_cflags}" \
16623 && cf_fix_cppflags=yes
16624
16625 if test $cf_fix_cppflags = yes ; then
16626 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16627 continue
16628 elif test "${cf_tst_cflags}" = "\"'" ; then
16629 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16630 continue
16631 fi
16632 ;;
16633 esac
16634 case "$CPPFLAGS" in
16635 (*$cf_add_cflags)
16636 ;;
16637 (*)
16638 case $cf_add_cflags in
16639 (-D*)
16640 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16641
16642CPPFLAGS=`echo "$CPPFLAGS" | \
16643 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16644 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16645
16646 ;;
16647 esac
16648 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16649 ;;
16650 esac
16651 ;;
16652 (*)
16653 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16654 ;;
16655 esac
16656 ;;
16657(yes)
16658 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16659
16660 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16661
16662 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16663 && test -z "${cf_tst_cflags}" \
16664 && cf_fix_cppflags=no
16665 ;;
16666esac
16667done
16668
16669if test -n "$cf_new_cflags" ; then
16670
16671 CFLAGS="$CFLAGS $cf_new_cflags"
16672fi
16673
16674if test -n "$cf_new_cppflags" ; then
16675
16676 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16677fi
16678
16679if test -n "$cf_new_extra_cppflags" ; then
16680
16681 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16682fi
16683
16684 ;;
16685 esac
16686 ;;
16687esac
16688
16689if test "$with_dmalloc" = yes ; then
16690 echo "$as_me:16690: checking for dmalloc.h" >&5
16691echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16692if test "${ac_cv_header_dmalloc_h+set}" = set; then
16693 echo $ECHO_N "(cached) $ECHO_C" >&6
16694else
16695 cat >conftest.$ac_ext <<_ACEOF
16696#line 16696 "configure"
16697#include "confdefs.h"
16698#include <dmalloc.h>
16699_ACEOF
16700if { (eval echo "$as_me:16700: \"$ac_cpp conftest.$ac_ext\"") >&5
16701 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16702 ac_status=$?
16703 egrep -v '^ *\+' conftest.er1 >conftest.err
16704 rm -f conftest.er1
16705 cat conftest.err >&5
16706 echo "$as_me:16706: \$? = $ac_status" >&5
16707 (exit $ac_status); } >/dev/null; then
16708 if test -s conftest.err; then
16709 ac_cpp_err=$ac_c_preproc_warn_flag
16710 else
16711 ac_cpp_err=
16712 fi
16713else
16714 ac_cpp_err=yes
16715fi
16716if test -z "$ac_cpp_err"; then
16717 ac_cv_header_dmalloc_h=yes
16718else
16719 echo "$as_me: failed program was:" >&5
16720 cat conftest.$ac_ext >&5
16721 ac_cv_header_dmalloc_h=no
16722fi
16723rm -f conftest.err conftest.$ac_ext
16724fi
16725echo "$as_me:16725: result: $ac_cv_header_dmalloc_h" >&5
16726echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16727if test $ac_cv_header_dmalloc_h = yes; then
16728
16729echo "$as_me:16729: checking for dmalloc_debug in -ldmalloc" >&5
16730echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16731if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16732 echo $ECHO_N "(cached) $ECHO_C" >&6
16733else
16734 ac_check_lib_save_LIBS=$LIBS
16735LIBS="-ldmalloc $LIBS"
16736cat >conftest.$ac_ext <<_ACEOF
16737#line 16737 "configure"
16738#include "confdefs.h"
16739
16740/* Override any gcc2 internal prototype to avoid an error. */
16741#ifdef __cplusplus
16742extern "C"
16743#endif
16744/* We use char because int might match the return type of a gcc2
16745 builtin and then its argument prototype would still apply. */
16746char dmalloc_debug ();
16747int
16748main ()
16749{
16750dmalloc_debug ();
16751 ;
16752 return 0;
16753}
16754_ACEOF
16755rm -f conftest.$ac_objext conftest$ac_exeext
16756if { (eval echo "$as_me:16756: \"$ac_link\"") >&5
16757 (eval $ac_link) 2>&5
16758 ac_status=$?
16759 echo "$as_me:16759: \$? = $ac_status" >&5
16760 (exit $ac_status); } &&
16761 { ac_try='test -s conftest$ac_exeext'
16762 { (eval echo "$as_me:16762: \"$ac_try\"") >&5
16763 (eval $ac_try) 2>&5
16764 ac_status=$?
16765 echo "$as_me:16765: \$? = $ac_status" >&5
16766 (exit $ac_status); }; }; then
16767 ac_cv_lib_dmalloc_dmalloc_debug=yes
16768else
16769 echo "$as_me: failed program was:" >&5
16770cat conftest.$ac_ext >&5
16771ac_cv_lib_dmalloc_dmalloc_debug=no
16772fi
16773rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16774LIBS=$ac_check_lib_save_LIBS
16775fi
16776echo "$as_me:16776: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16777echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16778if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16779 cat >>confdefs.h <<EOF
16780#define HAVE_LIBDMALLOC 1
16781EOF
16782
16783 LIBS="-ldmalloc $LIBS"
16784
16785fi
16786
16787fi
16788
16789fi
16790
16791echo "$as_me:16791: checking if you want to use dbmalloc for testing" >&5
16792echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16793
16794# Check whether --with-dbmalloc or --without-dbmalloc was given.
16795if test "${with_dbmalloc+set}" = set; then
16796 withval="$with_dbmalloc"
16797
16798cat >>confdefs.h <<EOF
16799#define USE_DBMALLOC 1
16800EOF
16801
16802 : ${with_cflags:=-g}
16803 : ${with_no_leaks:=yes}
16804 with_dbmalloc=yes
16805else
16806 with_dbmalloc=
16807fi;
16808echo "$as_me:16808: result: ${with_dbmalloc:-no}" >&5
16809echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16810
16811case .$with_cflags in
16812(.*-g*)
16813 case .$CFLAGS in
16814 (.*-g*)
16815 ;;
16816 (*)
16817
16818cf_fix_cppflags=no
16819cf_new_cflags=
16820cf_new_cppflags=
16821cf_new_extra_cppflags=
16822
16823for cf_add_cflags in -g
16824do
16825case $cf_fix_cppflags in
16826(no)
16827 case $cf_add_cflags in
16828 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16829 case $cf_add_cflags in
16830 (-D*)
16831 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16832
16833 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16834 && test -z "${cf_tst_cflags}" \
16835 && cf_fix_cppflags=yes
16836
16837 if test $cf_fix_cppflags = yes ; then
16838 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16839 continue
16840 elif test "${cf_tst_cflags}" = "\"'" ; then
16841 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16842 continue
16843 fi
16844 ;;
16845 esac
16846 case "$CPPFLAGS" in
16847 (*$cf_add_cflags)
16848 ;;
16849 (*)
16850 case $cf_add_cflags in
16851 (-D*)
16852 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16853
16854CPPFLAGS=`echo "$CPPFLAGS" | \
16855 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16856 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16857
16858 ;;
16859 esac
16860 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16861 ;;
16862 esac
16863 ;;
16864 (*)
16865 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16866 ;;
16867 esac
16868 ;;
16869(yes)
16870 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16871
16872 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16873
16874 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16875 && test -z "${cf_tst_cflags}" \
16876 && cf_fix_cppflags=no
16877 ;;
16878esac
16879done
16880
16881if test -n "$cf_new_cflags" ; then
16882
16883 CFLAGS="$CFLAGS $cf_new_cflags"
16884fi
16885
16886if test -n "$cf_new_cppflags" ; then
16887
16888 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16889fi
16890
16891if test -n "$cf_new_extra_cppflags" ; then
16892
16893 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16894fi
16895
16896 ;;
16897 esac
16898 ;;
16899esac
16900
16901if test "$with_dbmalloc" = yes ; then
16902 echo "$as_me:16902: checking for dbmalloc.h" >&5
16903echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16904if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16905 echo $ECHO_N "(cached) $ECHO_C" >&6
16906else
16907 cat >conftest.$ac_ext <<_ACEOF
16908#line 16908 "configure"
16909#include "confdefs.h"
16910#include <dbmalloc.h>
16911_ACEOF
16912if { (eval echo "$as_me:16912: \"$ac_cpp conftest.$ac_ext\"") >&5
16913 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16914 ac_status=$?
16915 egrep -v '^ *\+' conftest.er1 >conftest.err
16916 rm -f conftest.er1
16917 cat conftest.err >&5
16918 echo "$as_me:16918: \$? = $ac_status" >&5
16919 (exit $ac_status); } >/dev/null; then
16920 if test -s conftest.err; then
16921 ac_cpp_err=$ac_c_preproc_warn_flag
16922 else
16923 ac_cpp_err=
16924 fi
16925else
16926 ac_cpp_err=yes
16927fi
16928if test -z "$ac_cpp_err"; then
16929 ac_cv_header_dbmalloc_h=yes
16930else
16931 echo "$as_me: failed program was:" >&5
16932 cat conftest.$ac_ext >&5
16933 ac_cv_header_dbmalloc_h=no
16934fi
16935rm -f conftest.err conftest.$ac_ext
16936fi
16937echo "$as_me:16937: result: $ac_cv_header_dbmalloc_h" >&5
16938echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16939if test $ac_cv_header_dbmalloc_h = yes; then
16940
16941echo "$as_me:16941: checking for debug_malloc in -ldbmalloc" >&5
16942echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16943if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16944 echo $ECHO_N "(cached) $ECHO_C" >&6
16945else
16946 ac_check_lib_save_LIBS=$LIBS
16947LIBS="-ldbmalloc $LIBS"
16948cat >conftest.$ac_ext <<_ACEOF
16949#line 16949 "configure"
16950#include "confdefs.h"
16951
16952/* Override any gcc2 internal prototype to avoid an error. */
16953#ifdef __cplusplus
16954extern "C"
16955#endif
16956/* We use char because int might match the return type of a gcc2
16957 builtin and then its argument prototype would still apply. */
16958char debug_malloc ();
16959int
16960main ()
16961{
16962debug_malloc ();
16963 ;
16964 return 0;
16965}
16966_ACEOF
16967rm -f conftest.$ac_objext conftest$ac_exeext
16968if { (eval echo "$as_me:16968: \"$ac_link\"") >&5
16969 (eval $ac_link) 2>&5
16970 ac_status=$?
16971 echo "$as_me:16971: \$? = $ac_status" >&5
16972 (exit $ac_status); } &&
16973 { ac_try='test -s conftest$ac_exeext'
16974 { (eval echo "$as_me:16974: \"$ac_try\"") >&5
16975 (eval $ac_try) 2>&5
16976 ac_status=$?
16977 echo "$as_me:16977: \$? = $ac_status" >&5
16978 (exit $ac_status); }; }; then
16979 ac_cv_lib_dbmalloc_debug_malloc=yes
16980else
16981 echo "$as_me: failed program was:" >&5
16982cat conftest.$ac_ext >&5
16983ac_cv_lib_dbmalloc_debug_malloc=no
16984fi
16985rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16986LIBS=$ac_check_lib_save_LIBS
16987fi
16988echo "$as_me:16988: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16989echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16990if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16991 cat >>confdefs.h <<EOF
16992#define HAVE_LIBDBMALLOC 1
16993EOF
16994
16995 LIBS="-ldbmalloc $LIBS"
16996
16997fi
16998
16999fi
17000
17001fi
17002
17003echo "$as_me:17003: checking if you want to use valgrind for testing" >&5
17004echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17005
17006# Check whether --with-valgrind or --without-valgrind was given.
17007if test "${with_valgrind+set}" = set; then
17008 withval="$with_valgrind"
17009
17010cat >>confdefs.h <<EOF
17011#define USE_VALGRIND 1
17012EOF
17013
17014 : ${with_cflags:=-g}
17015 : ${with_no_leaks:=yes}
17016 with_valgrind=yes
17017else
17018 with_valgrind=
17019fi;
17020echo "$as_me:17020: result: ${with_valgrind:-no}" >&5
17021echo "${ECHO_T}${with_valgrind:-no}" >&6
17022
17023case .$with_cflags in
17024(.*-g*)
17025 case .$CFLAGS in
17026 (.*-g*)
17027 ;;
17028 (*)
17029
17030cf_fix_cppflags=no
17031cf_new_cflags=
17032cf_new_cppflags=
17033cf_new_extra_cppflags=
17034
17035for cf_add_cflags in -g
17036do
17037case $cf_fix_cppflags in
17038(no)
17039 case $cf_add_cflags in
17040 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17041 case $cf_add_cflags in
17042 (-D*)
17043 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17044
17045 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17046 && test -z "${cf_tst_cflags}" \
17047 && cf_fix_cppflags=yes
17048
17049 if test $cf_fix_cppflags = yes ; then
17050 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17051 continue
17052 elif test "${cf_tst_cflags}" = "\"'" ; then
17053 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17054 continue
17055 fi
17056 ;;
17057 esac
17058 case "$CPPFLAGS" in
17059 (*$cf_add_cflags)
17060 ;;
17061 (*)
17062 case $cf_add_cflags in
17063 (-D*)
17064 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17065
17066CPPFLAGS=`echo "$CPPFLAGS" | \
17067 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17068 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17069
17070 ;;
17071 esac
17072 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17073 ;;
17074 esac
17075 ;;
17076 (*)
17077 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17078 ;;
17079 esac
17080 ;;
17081(yes)
17082 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17083
17084 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17085
17086 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17087 && test -z "${cf_tst_cflags}" \
17088 && cf_fix_cppflags=no
17089 ;;
17090esac
17091done
17092
17093if test -n "$cf_new_cflags" ; then
17094
17095 CFLAGS="$CFLAGS $cf_new_cflags"
17096fi
17097
17098if test -n "$cf_new_cppflags" ; then
17099
17100 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17101fi
17102
17103if test -n "$cf_new_extra_cppflags" ; then
17104
17105 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17106fi
17107
17108 ;;
17109 esac
17110 ;;
17111esac
17112
17113echo "$as_me:17113: checking if you want to perform memory-leak testing" >&5
17114echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17115
17116# Check whether --enable-leaks or --disable-leaks was given.
17117if test "${enable_leaks+set}" = set; then
17118 enableval="$enable_leaks"
17119 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17120else
17121 : ${with_no_leaks:=no}
17122fi;
17123echo "$as_me:17123: result: $with_no_leaks" >&5
17124echo "${ECHO_T}$with_no_leaks" >&6
17125
17126if test "$with_no_leaks" = yes ; then
17127
17128cat >>confdefs.h <<\EOF
17129#define NO_LEAKS 1
17130EOF
17131
17132cat >>confdefs.h <<\EOF
17133#define YY_NO_LEAKS 1
17134EOF
17135
17136fi
17137
17138LD_RPATH_OPT=
17139echo "$as_me:17139: checking for an rpath option" >&5
17140echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
17141case $cf_cv_system_name in
17142(irix*)
17143 if test "$GCC" = yes; then
17144 LD_RPATH_OPT="-Wl,-rpath,"
17145 else
17146 LD_RPATH_OPT="-rpath "
17147 fi
17148 ;;
17149(linux*|gnu*|k*bsd*-gnu)
17150 LD_RPATH_OPT="-Wl,-rpath,"
17151 ;;
17152(openbsd[2-9].*|mirbsd*)
17153 LD_RPATH_OPT="-Wl,-rpath,"
17154 ;;
17155(dragonfly*|freebsd*)
17156 LD_RPATH_OPT="-rpath "
17157 ;;
17158(netbsd*)
17159 LD_RPATH_OPT="-Wl,-rpath,"
17160 ;;
17161(osf*|mls+*)
17162 LD_RPATH_OPT="-rpath "
17163 ;;
17164(solaris2*)
17165 LD_RPATH_OPT="-R"
17166 ;;
17167(*)
17168 ;;
17169esac
17170echo "$as_me:17170: result: $LD_RPATH_OPT" >&5
17171echo "${ECHO_T}$LD_RPATH_OPT" >&6
17172
17173case "x$LD_RPATH_OPT" in
17174(x-R*)
17175 echo "$as_me:17175: checking if we need a space after rpath option" >&5
17176echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
17177 cf_save_LIBS="$LIBS"
17178
17179cf_add_libs="${LD_RPATH_OPT}$libdir"
17180# Filter out duplicates - this happens with badly-designed ".pc" files...
17181for cf_add_1lib in $LIBS
17182do
17183 for cf_add_2lib in $cf_add_libs
17184 do
17185 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17186 then
17187 cf_add_1lib=
17188 break
17189 fi
17190 done
17191 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17192done
17193LIBS="$cf_add_libs"
17194
17195 cat >conftest.$ac_ext <<_ACEOF
17196#line 17196 "configure"
17197#include "confdefs.h"
17198
17199int
17200main ()
17201{
17202
17203 ;
17204 return 0;
17205}
17206_ACEOF
17207rm -f conftest.$ac_objext conftest$ac_exeext
17208if { (eval echo "$as_me:17208: \"$ac_link\"") >&5
17209 (eval $ac_link) 2>&5
17210 ac_status=$?
17211 echo "$as_me:17211: \$? = $ac_status" >&5
17212 (exit $ac_status); } &&
17213 { ac_try='test -s conftest$ac_exeext'
17214 { (eval echo "$as_me:17214: \"$ac_try\"") >&5
17215 (eval $ac_try) 2>&5
17216 ac_status=$?
17217 echo "$as_me:17217: \$? = $ac_status" >&5
17218 (exit $ac_status); }; }; then
17219 cf_rpath_space=no
17220else
17221 echo "$as_me: failed program was:" >&5
17222cat conftest.$ac_ext >&5
17223cf_rpath_space=yes
17224fi
17225rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17226 LIBS="$cf_save_LIBS"
17227 echo "$as_me:17227: result: $cf_rpath_space" >&5
17228echo "${ECHO_T}$cf_rpath_space" >&6
17229 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
17230 ;;
17231esac
17232
17233echo "$as_me:17233: checking if rpath-hack should be disabled" >&5
17234echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
17235
17236# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
17237if test "${enable_rpath_hack+set}" = set; then
17238 enableval="$enable_rpath_hack"
17239 test "$enableval" != no && enableval=yes
17240 if test "$enableval" != "yes" ; then
17241 cf_disable_rpath_hack=yes
17242 else
17243 cf_disable_rpath_hack=no
17244 fi
17245else
17246 enableval=yes
17247 cf_disable_rpath_hack=no
17248
17249fi;
17250echo "$as_me:17250: result: $cf_disable_rpath_hack" >&5
17251echo "${ECHO_T}$cf_disable_rpath_hack" >&6
17252if test "$cf_disable_rpath_hack" = no ; then
17253
17254echo "$as_me:17254: checking for updated LDFLAGS" >&5
17255echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17256if test -n "$LD_RPATH_OPT" ; then
17257 echo "$as_me:17257: result: maybe" >&5
17258echo "${ECHO_T}maybe" >&6
17259
17260 for ac_prog in ldd
17261do
17262 # Extract the first word of "$ac_prog", so it can be a program name with args.
17263set dummy $ac_prog; ac_word=$2
17264echo "$as_me:17264: checking for $ac_word" >&5
17265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17266if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
17267 echo $ECHO_N "(cached) $ECHO_C" >&6
17268else
17269 if test -n "$cf_ldd_prog"; then
17270 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
17271else
17272 ac_save_IFS=$IFS; IFS=$ac_path_separator
17273ac_dummy="$PATH"
17274for ac_dir in $ac_dummy; do
17275 IFS=$ac_save_IFS
17276 test -z "$ac_dir" && ac_dir=.
17277 $as_executable_p "$ac_dir/$ac_word" || continue
17278ac_cv_prog_cf_ldd_prog="$ac_prog"
17279echo "$as_me:17279: found $ac_dir/$ac_word" >&5
17280break
17281done
17282
17283fi
17284fi
17285cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
17286if test -n "$cf_ldd_prog"; then
17287 echo "$as_me:17287: result: $cf_ldd_prog" >&5
17288echo "${ECHO_T}$cf_ldd_prog" >&6
17289else
17290 echo "$as_me:17290: result: no" >&5
17291echo "${ECHO_T}no" >&6
17292fi
17293
17294 test -n "$cf_ldd_prog" && break
17295done
17296test -n "$cf_ldd_prog" || cf_ldd_prog="no"
17297
17298 cf_rpath_list="/usr/lib /lib"
17299 if test "$cf_ldd_prog" != no
17300 then
17301 cf_rpath_oops=
17302
17303cat >conftest.$ac_ext <<_ACEOF
17304#line 17304 "configure"
17305#include "confdefs.h"
17306#include <stdio.h>
17307int
17308main ()
17309{
17310printf("Hello");
17311 ;
17312 return 0;
17313}
17314_ACEOF
17315rm -f conftest.$ac_objext conftest$ac_exeext
17316if { (eval echo "$as_me:17316: \"$ac_link\"") >&5
17317 (eval $ac_link) 2>&5
17318 ac_status=$?
17319 echo "$as_me:17319: \$? = $ac_status" >&5
17320 (exit $ac_status); } &&
17321 { ac_try='test -s conftest$ac_exeext'
17322 { (eval echo "$as_me:17322: \"$ac_try\"") >&5
17323 (eval $ac_try) 2>&5
17324 ac_status=$?
17325 echo "$as_me:17325: \$? = $ac_status" >&5
17326 (exit $ac_status); }; }; then
17327 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
17328 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
17329else
17330 echo "$as_me: failed program was:" >&5
17331cat conftest.$ac_ext >&5
17332fi
17333rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17334
17335 # If we passed the link-test, but get a "not found" on a given library,
17336 # this could be due to inept reconfiguration of gcc to make it only
17337 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
17338 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
17339 # /usr/local libraries.
17340 if test -n "$cf_rpath_oops"
17341 then
17342 for cf_rpath_src in $cf_rpath_oops
17343 do
17344 for cf_rpath_dir in \
17345 /usr/local \
17346 /usr/pkg \
17347 /opt/sfw
17348 do
17349 if test -f $cf_rpath_dir/lib/$cf_rpath_src
17350 then
17351 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
17352
17353echo "${as_me:-configure}:17353: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
17354
17355 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
17356 break
17357 fi
17358 done
17359 done
17360 fi
17361 fi
17362
17363 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17364
17365echo "${as_me:-configure}:17365: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17366
17367test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
17368
17369echo "${as_me:-configure}:17369: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17370
17371cf_rpath_dst=
17372for cf_rpath_src in $LDFLAGS
17373do
17374 case $cf_rpath_src in
17375 (-L*)
17376
17377 # check if this refers to a directory which we will ignore
17378 cf_rpath_skip=no
17379 if test -n "$cf_rpath_list"
17380 then
17381 for cf_rpath_item in $cf_rpath_list
17382 do
17383 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
17384 then
17385 cf_rpath_skip=yes
17386 break
17387 fi
17388 done
17389 fi
17390
17391 if test "$cf_rpath_skip" = no
17392 then
17393 # transform the option
17394 if test "$LD_RPATH_OPT" = "-R " ; then
17395 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
17396 else
17397 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
17398 fi
17399
17400 # if we have not already added this, add it now
17401 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
17402 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
17403 then
17404 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
17405
17406echo "${as_me:-configure}:17406: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
17407
17408 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17409 fi
17410 fi
17411 ;;
17412 esac
17413 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17414done
17415LDFLAGS=$cf_rpath_dst
17416
17417test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
17418
17419echo "${as_me:-configure}:17419: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17420
17421test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
17422
17423echo "${as_me:-configure}:17423: testing ...checking LIBS $LIBS ..." 1>&5
17424
17425cf_rpath_dst=
17426for cf_rpath_src in $LIBS
17427do
17428 case $cf_rpath_src in
17429 (-L*)
17430
17431 # check if this refers to a directory which we will ignore
17432 cf_rpath_skip=no
17433 if test -n "$cf_rpath_list"
17434 then
17435 for cf_rpath_item in $cf_rpath_list
17436 do
17437 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
17438 then
17439 cf_rpath_skip=yes
17440 break
17441 fi
17442 done
17443 fi
17444
17445 if test "$cf_rpath_skip" = no
17446 then
17447 # transform the option
17448 if test "$LD_RPATH_OPT" = "-R " ; then
17449 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
17450 else
17451 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
17452 fi
17453
17454 # if we have not already added this, add it now
17455 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
17456 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
17457 then
17458 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
17459
17460echo "${as_me:-configure}:17460: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
17461
17462 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17463 fi
17464 fi
17465 ;;
17466 esac
17467 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17468done
17469LIBS=$cf_rpath_dst
17470
17471test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
17472
17473echo "${as_me:-configure}:17473: testing ...checked LIBS $LIBS ..." 1>&5
17474
17475 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17476
17477echo "${as_me:-configure}:17477: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17478
17479else
17480 echo "$as_me:17480: result: no" >&5
17481echo "${ECHO_T}no" >&6
17482fi
17483
17484fi
17485
17486TEST_ARGS="$LIBS"
17487LIBS=
17488
17489ac_config_files="$ac_config_files Makefile"
17490ac_config_commands="$ac_config_commands default"
17491cat >confcache <<\_ACEOF
17492# This file is a shell script that caches the results of configure
17493# tests run on this system so they can be shared between configure
17494# scripts and configure runs, see configure's option --config-cache.
17495# It is not useful on other systems. If it contains results you don't
17496# want to keep, you may remove or edit it.
17497#
17498# config.status only pays attention to the cache file if you give it
17499# the --recheck option to rerun configure.
17500#
17501# `ac_cv_env_foo' variables (set or unset) will be overriden when
17502# loading this file, other *unset* `ac_cv_foo' will be assigned the
17503# following values.
17504
17505_ACEOF
17506
17507# The following way of writing the cache mishandles newlines in values,
17508# but we know of no workaround that is simple, portable, and efficient.
17509# So, don't put newlines in cache variables' values.
17510# Ultrix sh set writes to stderr and can't be redirected directly,
17511# and sets the high bit in the cache file unless we assign to the vars.
17512{
17513 (set) 2>&1 |
17514 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17515 *ac_space=\ *)
17516 # `set' does not quote correctly, so add quotes (double-quote
17517 # substitution turns \\\\ into \\, and sed turns \\ into \).
17518 sed -n \
17519 "s/'/'\\\\''/g;
17520 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17521 ;;
17522 *)
17523 # `set' quotes correctly as required by POSIX, so do not add quotes.
17524 sed -n \
17525 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17526 ;;
17527 esac;
17528} |
17529 sed '
17530 t clear
17531 : clear
17532 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17533 t end
17534 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17535 : end' >>confcache
17536if cmp -s $cache_file confcache; then :; else
17537 if test -w $cache_file; then
17538 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17539 cat confcache >$cache_file
17540 else
17541 echo "not updating unwritable cache $cache_file"
17542 fi
17543fi
17544rm -f confcache
17545
17546test "x$prefix" = xNONE && prefix=$ac_default_prefix
17547# Let make expand exec_prefix.
17548test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17549
17550# VPATH may cause trouble with some makes, so we remove $(srcdir),
17551# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17552# trailing colons and then remove the whole line if VPATH becomes empty
17553# (actually we leave an empty line to preserve line numbers).
17554if test "x$srcdir" = x.; then
17555 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17556s/:*\$(srcdir):*/:/;
17557s/:*\${srcdir}:*/:/;
17558s/:*@srcdir@:*/:/;
17559s/^\([^=]*=[ ]*\):*/\1/;
17560s/:*$//;
17561s/^[^=]*=[ ]*$//;
17562}'
17563fi
17564
17565DEFS=-DHAVE_CONFIG_H
17566
17567: ${CONFIG_STATUS=./config.status}
17568ac_clean_files_save=$ac_clean_files
17569ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17570{ echo "$as_me:17570: creating $CONFIG_STATUS" >&5
17571echo "$as_me: creating $CONFIG_STATUS" >&6;}
17572cat >$CONFIG_STATUS <<_ACEOF
17573#! $SHELL
17574# Generated automatically by configure.
17575# Run this file to recreate the current configuration.
17576# Compiler output produced by configure, useful for debugging
17577# configure, is in config.log if it exists.
17578
17579debug=false
17580SHELL=\${CONFIG_SHELL-$SHELL}
17581ac_cs_invocation="\$0 \$@"
17582
17583_ACEOF
17584
17585cat >>$CONFIG_STATUS <<\_ACEOF
17586# Be Bourne compatible
17587if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17588 emulate sh
17589 NULLCMD=:
17590elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17591 set -o posix
17592fi
17593
17594# Name of the executable.
17595as_me=`echo "$0" |sed 's,.*[\\/],,'`
17596
17597if expr a : '\(a\)' >/dev/null 2>&1; then
17598 as_expr=expr
17599else
17600 as_expr=false
17601fi
17602
17603rm -f conf$$ conf$$.exe conf$$.file
17604echo >conf$$.file
17605if ln -s conf$$.file conf$$ 2>/dev/null; then
17606 # We could just check for DJGPP; but this test a) works b) is more generic
17607 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17608 if test -f conf$$.exe; then
17609 # Don't use ln at all; we don't have any links
17610 as_ln_s='cp -p'
17611 else
17612 as_ln_s='ln -s'
17613 fi
17614elif ln conf$$.file conf$$ 2>/dev/null; then
17615 as_ln_s=ln
17616else
17617 as_ln_s='cp -p'
17618fi
17619rm -f conf$$ conf$$.exe conf$$.file
17620
17621as_executable_p="test -f"
17622
17623# Support unset when possible.
17624if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17625 as_unset=unset
17626else
17627 as_unset=false
17628fi
17629
17630# NLS nuisances.
17631$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17632$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17633$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17634$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17635$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17636$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17637$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17638$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17639
17640# IFS
17641# We need space, tab and new line, in precisely that order.
17642as_nl='
17643'
17644IFS=" $as_nl"
17645
17646# CDPATH.
17647$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17648
17649exec 6>&1
17650
17651_ACEOF
17652
17653# Files that config.status was made for.
17654if test -n "$ac_config_files"; then
17655 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17656fi
17657
17658if test -n "$ac_config_headers"; then
17659 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17660fi
17661
17662if test -n "$ac_config_links"; then
17663 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17664fi
17665
17666if test -n "$ac_config_commands"; then
17667 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17668fi
17669
17670cat >>$CONFIG_STATUS <<\EOF
17671
17672ac_cs_usage="\
17673\`$as_me' instantiates files from templates according to the
17674current configuration.
17675
17676Usage: $0 [OPTIONS] [FILE]...
17677
17678 -h, --help print this help, then exit
17679 -V, --version print version number, then exit
17680 -d, --debug don't remove temporary files
17681 --recheck update $as_me by reconfiguring in the same conditions
17682 --file=FILE[:TEMPLATE]
17683 instantiate the configuration file FILE
17684 --header=FILE[:TEMPLATE]
17685 instantiate the configuration header FILE
17686
17687Configuration files:
17688$config_files
17689
17690Configuration headers:
17691$config_headers
17692
17693Configuration commands:
17694$config_commands
17695
17696Report bugs to <dickey@invisible-island.net>."
17697EOF
17698
17699cat >>$CONFIG_STATUS <<EOF
17700ac_cs_version="\\
17701config.status
17702configured by $0, generated by GNU Autoconf 2.52.20141204,
17703 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17704
17705Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17706Free Software Foundation, Inc.
17707This config.status script is free software; the Free Software Foundation
17708gives unlimited permission to copy, distribute and modify it."
17709srcdir=$srcdir
17710INSTALL="$INSTALL"
17711EOF
17712
17713cat >>$CONFIG_STATUS <<\EOF
17714# If no file are specified by the user, then we need to provide default
17715# value. By we need to know if files were specified by the user.
17716ac_need_defaults=:
17717while test $# != 0
17718do
17719 case $1 in
17720 --*=*)
17721 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17722 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17723 shift
17724 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17725 shift
17726 ;;
17727 -*);;
17728 *) # This is not an option, so the user has probably given explicit
17729 # arguments.
17730 ac_need_defaults=false;;
17731 esac
17732
17733 case $1 in
17734 # Handling of the options.
17735EOF
17736cat >>$CONFIG_STATUS <<EOF
17737 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17738 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17739 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17740EOF
17741cat >>$CONFIG_STATUS <<\EOF
17742 --version | --vers* | -V )
17743 echo "$ac_cs_version"; exit 0 ;;
17744 --he | --h)
17745 # Conflict between --help and --header
17746 { { echo "$as_me:17746: error: ambiguous option: $1
17747Try \`$0 --help' for more information." >&5
17748echo "$as_me: error: ambiguous option: $1
17749Try \`$0 --help' for more information." >&2;}
17750 { (exit 1); exit 1; }; };;
17751 --help | --hel | -h )
17752 echo "$ac_cs_usage"; exit 0 ;;
17753 --debug | --d* | -d )
17754 debug=: ;;
17755 --file | --fil | --fi | --f )
17756 shift
17757 CONFIG_FILES="$CONFIG_FILES $1"
17758 ac_need_defaults=false;;
17759 --header | --heade | --head | --hea )
17760 shift
17761 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17762 ac_need_defaults=false;;
17763
17764 # This is an error.
17765 -*) { { echo "$as_me:17765: error: unrecognized option: $1
17766Try \`$0 --help' for more information." >&5
17767echo "$as_me: error: unrecognized option: $1
17768Try \`$0 --help' for more information." >&2;}
17769 { (exit 1); exit 1; }; } ;;
17770
17771 *) ac_config_targets="$ac_config_targets $1" ;;
17772
17773 esac
17774 shift
17775done
17776
17777exec 5>>config.log
17778cat >&5 << _ACEOF
17779
17780## ----------------------- ##
17781## Running config.status. ##
17782## ----------------------- ##
17783
17784This file was extended by $as_me 2.52.20141204, executed with
17785 CONFIG_FILES = $CONFIG_FILES
17786 CONFIG_HEADERS = $CONFIG_HEADERS
17787 CONFIG_LINKS = $CONFIG_LINKS
17788 CONFIG_COMMANDS = $CONFIG_COMMANDS
17789 > $ac_cs_invocation
17790on `(hostname || uname -n) 2>/dev/null | sed 1q`
17791
17792_ACEOF
17793EOF
17794
17795cat >>$CONFIG_STATUS <<EOF
17796#
17797# INIT-COMMANDS section.
17798#
17799
17800AWK="$AWK"
17801ECHO_CC="$ECHO_CC"
17802ECHO_LD="$ECHO_LD"
17803SHOW_CC="$SHOW_LD"
17804
17805EOF
17806
17807cat >>$CONFIG_STATUS <<\EOF
17808for ac_config_target in $ac_config_targets
17809do
17810 case "$ac_config_target" in
17811 # Handling of arguments.
17812 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17813 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17814 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
17815 *) { { echo "$as_me:17815: error: invalid argument: $ac_config_target" >&5
17816echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17817 { (exit 1); exit 1; }; };;
17818 esac
17819done
17820
17821# If the user did not use the arguments to specify the items to instantiate,
17822# then the envvar interface is used. Set only those that are not.
17823# We use the long form for the default assignment because of an extremely
17824# bizarre bug on SunOS 4.1.3.
17825if $ac_need_defaults; then
17826 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17827 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17828 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17829fi
17830
17831# Create a temporary directory, and hook for its removal unless debugging.
17832$debug ||
17833{
17834 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17835 trap '{ (exit 1); exit 1; }' 1 2 13 15
17836}
17837
17838# Create a (secure) tmp directory for tmp files.
17839: ${TMPDIR=/tmp}
17840{
17841 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17842 test -n "$tmp" && test -d "$tmp"
17843} ||
17844{
17845 tmp=$TMPDIR/cs$$-$RANDOM
17846 (umask 077 && mkdir $tmp)
17847} ||
17848{
17849 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17850 { (exit 1); exit 1; }
17851}
17852
17853EOF
17854
17855cat >>$CONFIG_STATUS <<EOF
17856
17857#
17858# CONFIG_FILES section.
17859#
17860
17861# No need to generate the scripts if there are no CONFIG_FILES.
17862# This happens for instance when ./config.status config.h
17863if test -n "\$CONFIG_FILES"; then
17864 # Protect against being on the right side of a sed subst in config.status.
17865 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17866 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17867s,@SHELL@,$SHELL,;t t
17868s,@exec_prefix@,$exec_prefix,;t t
17869s,@prefix@,$prefix,;t t
17870s,@program_transform_name@,$program_transform_name,;t t
17871s,@bindir@,$bindir,;t t
17872s,@sbindir@,$sbindir,;t t
17873s,@libexecdir@,$libexecdir,;t t
17874s,@datarootdir@,$datarootdir,;t t
17875s,@datadir@,$datadir,;t t
17876s,@sysconfdir@,$sysconfdir,;t t
17877s,@sharedstatedir@,$sharedstatedir,;t t
17878s,@localstatedir@,$localstatedir,;t t
17879s,@libdir@,$libdir,;t t
17880s,@includedir@,$includedir,;t t
17881s,@oldincludedir@,$oldincludedir,;t t
17882s,@infodir@,$infodir,;t t
17883s,@mandir@,$mandir,;t t
17884s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17885s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17886s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17887s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17888s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17889s,@build_alias@,$build_alias,;t t
17890s,@host_alias@,$host_alias,;t t
17891s,@target_alias@,$target_alias,;t t
17892s,@ECHO_C@,$ECHO_C,;t t
17893s,@ECHO_N@,$ECHO_N,;t t
17894s,@ECHO_T@,$ECHO_T,;t t
17895s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17896s,@DEFS@,$DEFS,;t t
17897s,@LIBS@,$LIBS,;t t
17898s,@build@,$build,;t t
17899s,@build_cpu@,$build_cpu,;t t
17900s,@build_vendor@,$build_vendor,;t t
17901s,@build_os@,$build_os,;t t
17902s,@host@,$host,;t t
17903s,@host_cpu@,$host_cpu,;t t
17904s,@host_vendor@,$host_vendor,;t t
17905s,@host_os@,$host_os,;t t
17906s,@SET_MAKE@,$SET_MAKE,;t t
17907s,@CC@,$CC,;t t
17908s,@CFLAGS@,$CFLAGS,;t t
17909s,@LDFLAGS@,$LDFLAGS,;t t
17910s,@CPPFLAGS@,$CPPFLAGS,;t t
17911s,@ac_ct_CC@,$ac_ct_CC,;t t
17912s,@EXEEXT@,$EXEEXT,;t t
17913s,@OBJEXT@,$OBJEXT,;t t
17914s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17915s,@CPP@,$CPP,;t t
17916s,@AWK@,$AWK,;t t
17917s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17918s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17919s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17920s,@LINT@,$LINT,;t t
17921s,@LINT_OPTS@,$LINT_OPTS,;t t
17922s,@CTAGS@,$CTAGS,;t t
17923s,@ETAGS@,$ETAGS,;t t
17924s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17925s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17926s,@MATH_LIB@,$MATH_LIB,;t t
17927s,@top_builddir@,$top_builddir,;t t
17928s,@CC_G_OPT@,$CC_G_OPT,;t t
17929s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17930s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17931s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17932s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17933s,@LD@,$LD,;t t
17934s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17935s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17936s,@LD_MODEL@,$LD_MODEL,;t t
17937s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17938s,@LIBTOOL@,$LIBTOOL,;t t
17939s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17940s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17941s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17942s,@LIB_LINK@,$LIB_LINK,;t t
17943s,@LINK_TESTS@,$LINK_TESTS,;t t
17944s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17945s,@PACKAGE@,$PACKAGE,;t t
17946s,@PTHREAD@,$PTHREAD,;t t
17947s,@TEST_ARGS@,$TEST_ARGS,;t t
17948s,@TEST_DEPS@,$TEST_DEPS,;t t
17949s,@TEST_LIBS@,$TEST_LIBS,;t t
17950s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
17951s,@TINFO_LIBS@,$TINFO_LIBS,;t t
17952s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17953s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17954s,@includesubdir@,$includesubdir,;t t
17955s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17956s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17957s,@ECHO_LT@,$ECHO_LT,;t t
17958s,@ECHO_LD@,$ECHO_LD,;t t
17959s,@RULE_CC@,$RULE_CC,;t t
17960s,@SHOW_CC@,$SHOW_CC,;t t
17961s,@ECHO_CC@,$ECHO_CC,;t t
17962s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17963s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17964s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17965s,@X_CFLAGS@,$X_CFLAGS,;t t
17966s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
17967s,@X_LIBS@,$X_LIBS,;t t
17968s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
17969s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
17970s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
17971s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17972s,@cf_ldd_prog@,$cf_ldd_prog,;t t
17973s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17974CEOF
17975
17976EOF
17977
17978 cat >>$CONFIG_STATUS <<\EOF
17979 # Split the substitutions into bite-sized pieces for seds with
17980 # small command number limits, like on Digital OSF/1 and HP-UX.
17981 ac_max_sed_lines=48
17982 ac_sed_frag=1 # Number of current file.
17983 ac_beg=1 # First line for current file.
17984 ac_end=$ac_max_sed_lines # Line after last line for current file.
17985 ac_more_lines=:
17986 ac_sed_cmds=
17987 while $ac_more_lines; do
17988 if test $ac_beg -gt 1; then
17989 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17990 else
17991 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17992 fi
17993 if test ! -s $tmp/subs.frag; then
17994 ac_more_lines=false
17995 else
17996 # The purpose of the label and of the branching condition is to
17997 # speed up the sed processing (if there are no `@' at all, there
17998 # is no need to browse any of the substitutions).
17999 # These are the two extra sed commands mentioned above.
18000 (echo ':t
18001 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18002 if test -z "$ac_sed_cmds"; then
18003 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18004 else
18005 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18006 fi
18007 ac_sed_frag=`expr $ac_sed_frag + 1`
18008 ac_beg=$ac_end
18009 ac_end=`expr $ac_end + $ac_max_sed_lines`
18010 fi
18011 done
18012 if test -z "$ac_sed_cmds"; then
18013 ac_sed_cmds=cat
18014 fi
18015fi # test -n "$CONFIG_FILES"
18016
18017EOF
18018cat >>$CONFIG_STATUS <<\EOF
18019for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18020 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18021 case $ac_file in
18022 - | *:- | *:-:* ) # input from stdin
18023 cat >$tmp/stdin
18024 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18025 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18026 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18027 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18028 * ) ac_file_in=$ac_file.in ;;
18029 esac
18030
18031 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18032 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18033 X"$ac_file" : 'X\(//\)[^/]' \| \
18034 X"$ac_file" : 'X\(//\)$' \| \
18035 X"$ac_file" : 'X\(/\)' \| \
18036 . : '\(.\)' 2>/dev/null ||
18037echo X"$ac_file" |
18038 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18039 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18040 /^X\(\/\/\)$/{ s//\1/; q; }
18041 /^X\(\/\).*/{ s//\1/; q; }
18042 s/.*/./; q'`
18043 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18044 { case "$ac_dir" in
18045 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18046 *) as_incr_dir=.;;
18047esac
18048as_dummy="$ac_dir"
18049for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18050 case $as_mkdir_dir in
18051 # Skip DOS drivespec
18052 ?:) as_incr_dir=$as_mkdir_dir ;;
18053 *)
18054 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18055 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18056 ;;
18057 esac
18058done; }
18059
18060 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18061 # A "../" for each directory in $ac_dir_suffix.
18062 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18063 else
18064 ac_dir_suffix= ac_dots=
18065 fi
18066
18067 case $srcdir in
18068 .) ac_srcdir=.
18069 if test -z "$ac_dots"; then
18070 ac_top_srcdir=.
18071 else
18072 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18073 fi ;;
18074 [\\/]* | ?:[\\/]* )
18075 ac_srcdir=$srcdir$ac_dir_suffix;
18076 ac_top_srcdir=$srcdir ;;
18077 *) # Relative path.
18078 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18079 ac_top_srcdir=$ac_dots$srcdir ;;
18080 esac
18081
18082 case $INSTALL in
18083 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18084 *) ac_INSTALL=$ac_dots$INSTALL ;;
18085 esac
18086
18087 if test x"$ac_file" != x-; then
18088 { echo "$as_me:18088: creating $ac_file" >&5
18089echo "$as_me: creating $ac_file" >&6;}
18090 rm -f "$ac_file"
18091 fi
18092 # Let's still pretend it is `configure' which instantiates (i.e., don't
18093 # use $as_me), people would be surprised to read:
18094 # /* config.h. Generated automatically by config.status. */
18095 configure_input="Generated automatically from `echo $ac_file_in |
18096 sed 's,.*/,,'` by configure."
18097
18098 # First look for the input files in the build tree, otherwise in the
18099 # src tree.
18100 ac_file_inputs=`IFS=:
18101 for f in $ac_file_in; do
18102 case $f in
18103 -) echo $tmp/stdin ;;
18104 [\\/$]*)
18105 # Absolute (can't be DOS-style, as IFS=:)
18106 test -f "$f" || { { echo "$as_me:18106: error: cannot find input file: $f" >&5
18107echo "$as_me: error: cannot find input file: $f" >&2;}
18108 { (exit 1); exit 1; }; }
18109 echo $f;;
18110 *) # Relative
18111 if test -f "$f"; then
18112 # Build tree
18113 echo $f
18114 elif test -f "$srcdir/$f"; then
18115 # Source tree
18116 echo $srcdir/$f
18117 else
18118 # /dev/null tree
18119 { { echo "$as_me:18119: error: cannot find input file: $f" >&5
18120echo "$as_me: error: cannot find input file: $f" >&2;}
18121 { (exit 1); exit 1; }; }
18122 fi;;
18123 esac
18124 done` || { (exit 1); exit 1; }
18125EOF
18126cat >>$CONFIG_STATUS <<\EOF
18127 ac_warn_datarootdir=no
18128 if test x"$ac_file" != x-; then
18129 for ac_item in $ac_file_inputs
18130 do
18131 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18132 if test -n "$ac_seen"; then
18133 ac_used=`grep '@datarootdir@' $ac_item`
18134 if test -z "$ac_used"; then
18135 { echo "$as_me:18135: WARNING: datarootdir was used implicitly but not set:
18136$ac_seen" >&5
18137echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18138$ac_seen" >&2;}
18139 ac_warn_datarootdir=yes
18140 fi
18141 fi
18142 ac_seen=`grep '${datarootdir}' $ac_item`
18143 if test -n "$ac_seen"; then
18144 { echo "$as_me:18144: WARNING: datarootdir was used explicitly but not set:
18145$ac_seen" >&5
18146echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18147$ac_seen" >&2;}
18148 ac_warn_datarootdir=yes
18149 fi
18150 done
18151 fi
18152
18153if test "x$ac_warn_datarootdir" = xyes; then
18154 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18155fi
18156
18157EOF
18158cat >>$CONFIG_STATUS <<EOF
18159 sed "$ac_vpsub
18160$extrasub
18161EOF
18162cat >>$CONFIG_STATUS <<\EOF
18163:t
18164/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18165s,@configure_input@,$configure_input,;t t
18166s,@srcdir@,$ac_srcdir,;t t
18167s,@top_srcdir@,$ac_top_srcdir,;t t
18168s,@INSTALL@,$ac_INSTALL,;t t
18169" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18170 rm -f $tmp/stdin
18171 if test x"$ac_file" != x-; then
18172 cp $tmp/out $ac_file
18173
18174 for ac_name in prefix exec_prefix datarootdir
18175 do
18176 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18177 if test -n "$ac_seen"; then
18178 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18179 if test -z "$ac_init"; then
18180 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18181 { echo "$as_me:18181: WARNING: Variable $ac_name is used but was not set:
18182$ac_seen" >&5
18183echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18184$ac_seen" >&2;}
18185 fi
18186 fi
18187 done
18188 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18189 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18190 if test -s $tmp/out; then
18191 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18192 { echo "$as_me:18192: WARNING: Some variables may not be substituted:
18193$ac_seen" >&5
18194echo "$as_me: WARNING: Some variables may not be substituted:
18195$ac_seen" >&2;}
18196 fi
18197 else
18198 cat $tmp/out
18199 fi
18200 rm -f $tmp/out
18201
18202done
18203EOF
18204cat >>$CONFIG_STATUS <<\EOF
18205
18206#
18207# CONFIG_HEADER section.
18208#
18209
18210# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18211# NAME is the cpp macro being defined and VALUE is the value it is being given.
18212#
18213# ac_d sets the value in "#define NAME VALUE" lines.
18214ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18215ac_dB='[ ].*$,\1#\2'
18216ac_dC=' '
18217ac_dD=',;t'
18218# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18219ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18220ac_iB='\([ ]\),\1#\2define\3'
18221ac_iC=' '
18222ac_iD='\4,;t'
18223# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18224ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18225ac_uB='$,\1#\2define\3'
18226ac_uC=' '
18227ac_uD=',;t'
18228
18229for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18230 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18231 case $ac_file in
18232 - | *:- | *:-:* ) # input from stdin
18233 cat >$tmp/stdin
18234 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18235 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18236 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18237 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18238 * ) ac_file_in=$ac_file.in ;;
18239 esac
18240
18241 test x"$ac_file" != x- && { echo "$as_me:18241: creating $ac_file" >&5
18242echo "$as_me: creating $ac_file" >&6;}
18243
18244 # First look for the input files in the build tree, otherwise in the
18245 # src tree.
18246 ac_file_inputs=`IFS=:
18247 for f in $ac_file_in; do
18248 case $f in
18249 -) echo $tmp/stdin ;;
18250 [\\/$]*)
18251 # Absolute (can't be DOS-style, as IFS=:)
18252 test -f "$f" || { { echo "$as_me:18252: error: cannot find input file: $f" >&5
18253echo "$as_me: error: cannot find input file: $f" >&2;}
18254 { (exit 1); exit 1; }; }
18255 echo $f;;
18256 *) # Relative
18257 if test -f "$f"; then
18258 # Build tree
18259 echo $f
18260 elif test -f "$srcdir/$f"; then
18261 # Source tree
18262 echo $srcdir/$f
18263 else
18264 # /dev/null tree
18265 { { echo "$as_me:18265: error: cannot find input file: $f" >&5
18266echo "$as_me: error: cannot find input file: $f" >&2;}
18267 { (exit 1); exit 1; }; }
18268 fi;;
18269 esac
18270 done` || { (exit 1); exit 1; }
18271 # Remove the trailing spaces.
18272 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18273
18274EOF
18275
18276# Transform confdefs.h into a list of #define's. We won't use it as a sed
18277# script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18278# be either 'cat' or 'sort'.
18279cat confdefs.h | uniq >conftest.vals
18280
18281# Break up conftest.vals because some shells have a limit on
18282# the size of here documents, and old seds have small limits too.
18283
18284rm -f conftest.tail
18285echo ' rm -f conftest.frag' >> $CONFIG_STATUS
18286while grep . conftest.vals >/dev/null
18287do
18288 # Write chunks of a limited-size here document to conftest.frag.
18289 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18290 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18291 echo 'CEOF' >> $CONFIG_STATUS
18292 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18293 rm -f conftest.vals
18294 mv conftest.tail conftest.vals
18295done
18296rm -f conftest.vals
18297
18298# Run sed to substitute the contents of conftest.frag into $tmp/in at the
18299# marker @DEFS@.
18300echo ' cat >> conftest.edit <<CEOF
18301/@DEFS@/r conftest.frag
18302/@DEFS@/d
18303CEOF
18304sed -f conftest.edit $tmp/in > $tmp/out
18305rm -f $tmp/in
18306mv $tmp/out $tmp/in
18307rm -f conftest.edit conftest.frag
18308' >> $CONFIG_STATUS
18309
18310cat >>$CONFIG_STATUS <<\EOF
18311 # Let's still pretend it is `configure' which instantiates (i.e., don't
18312 # use $as_me), people would be surprised to read:
18313 # /* config.h. Generated automatically by config.status. */
18314 if test x"$ac_file" = x-; then
18315 echo "/* Generated automatically by configure. */" >$tmp/config.h
18316 else
18317 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18318 fi
18319 cat $tmp/in >>$tmp/config.h
18320 rm -f $tmp/in
18321 if test x"$ac_file" != x-; then
18322 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18323 { echo "$as_me:18323: $ac_file is unchanged" >&5
18324echo "$as_me: $ac_file is unchanged" >&6;}
18325 else
18326 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18327 X"$ac_file" : 'X\(//\)[^/]' \| \
18328 X"$ac_file" : 'X\(//\)$' \| \
18329 X"$ac_file" : 'X\(/\)' \| \
18330 . : '\(.\)' 2>/dev/null ||
18331echo X"$ac_file" |
18332 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18333 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18334 /^X\(\/\/\)$/{ s//\1/; q; }
18335 /^X\(\/\).*/{ s//\1/; q; }
18336 s/.*/./; q'`
18337 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18338 { case "$ac_dir" in
18339 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18340 *) as_incr_dir=.;;
18341esac
18342as_dummy="$ac_dir"
18343for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18344 case $as_mkdir_dir in
18345 # Skip DOS drivespec
18346 ?:) as_incr_dir=$as_mkdir_dir ;;
18347 *)
18348 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18349 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18350 ;;
18351 esac
18352done; }
18353
18354 fi
18355 rm -f $ac_file
18356 mv $tmp/config.h $ac_file
18357 fi
18358 else
18359 cat $tmp/config.h
18360 rm -f $tmp/config.h
18361 fi
18362done
18363EOF
18364cat >>$CONFIG_STATUS <<\EOF
18365#
18366# CONFIG_COMMANDS section.
18367#
18368for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18369 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18370 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18371
18372 case $ac_dest in
18373 default )
18374
18375for cf_dir in .
18376do
18377 if test ! -d $srcdir/$cf_dir; then
18378 continue
18379 elif test -f $srcdir/$cf_dir/programs; then
18380 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18381 fi
18382done
18383
18384 cat >>Makefile <<TEST_EOF
18385
18386# These rules are generated so we do not rely on suffix rules, which do not
18387# work consistently for different make-programs (the '\$(MODEL)/' confuses
18388# some, and the '\$x' confuses others).
18389TEST_EOF
18390
18391LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
18392for N in $LIST
18393do
18394 cat >>Makefile <<TEST_EOF
18395
18396\$(MODEL)/$N.o : \$(srcdir)/$N.c \\
18397 \$(srcdir)/test.priv.h \\
18398 ncurses_cfg.h
18399 $SHOW_CC
18400 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
18401TEST_EOF
18402done
18403
18404if test -f ../config.guess && test -f ../config.sub
18405then
18406 cat >>Makefile <<TEST_EOF
18407
18408# if we used CF_INHERIT for getting these files, we can remove them
18409distclean::
18410 rm -f config.guess config.sub
18411TEST_EOF
18412fi
18413 ;;
18414 esac
18415done
18416EOF
18417
18418cat >>$CONFIG_STATUS <<\EOF
18419
18420{ (exit 0); exit 0; }
18421EOF
18422chmod +x $CONFIG_STATUS
18423ac_clean_files=$ac_clean_files_save
18424
18425# configure is writing to config.log, and then calls config.status.
18426# config.status does its own redirection, appending to config.log.
18427# Unfortunately, on DOS this fails, as config.log is still kept open
18428# by configure, so config.status won't be able to write to it; its
18429# output is simply discarded. So we exec the FD to /dev/null,
18430# effectively closing config.log, so it can be properly (re)opened and
18431# appended to by config.status. When coming back to configure, we
18432# need to make the FD available again.
18433if test "$no_create" != yes; then
18434 ac_cs_success=:
18435 exec 5>/dev/null
18436 $SHELL $CONFIG_STATUS || ac_cs_success=false
18437 exec 5>>config.log
18438 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18439 # would make configure fail if this is the last instruction.
18440 $ac_cs_success || { (exit 1); exit 1; }
18441fi
18442