Debian Codegraph @

test/configure

raw
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20260412.
4 #
5 # Copyright 2003-2025,2026 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26 emulate sh
27 NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29 set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36 as_expr="expr"
37 else
38 as_expr="false"
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
48 as_ln_s='cp -p'
49 else
50 as_ln_s='ln -s'
51 fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53 as_ln_s='ln'
54 else
55 as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63 as_unset="unset"
64 else
65 as_unset="false"
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS=" $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS=
101 MAKEFLAGS=
102 SHELL=${CONFIG_SHELL-/bin/sh}
103
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
108
109 ac_unique_file="ncurses.c"
110 # Factoring default headers for most tests.
111 ac_includes_default="\
112 #include <stdio.h>
113 #if HAVE_SYS_TYPES_H
114 # include <sys/types.h>
115 #endif
116 #if HAVE_SYS_STAT_H
117 # include <sys/stat.h>
118 #endif
119 #if STDC_HEADERS
120 # include <stdlib.h>
121 # include <stddef.h>
122 #else
123 # if HAVE_STDLIB_H
124 # include <stdlib.h>
125 # endif
126 #endif
127 #if HAVE_STRING_H
128 # if !STDC_HEADERS && HAVE_MEMORY_H
129 # include <memory.h>
130 # endif
131 # include <string.h>
132 #endif
133 #if HAVE_STRINGS_H
134 # include <strings.h>
135 #endif
136 #if HAVE_INTTYPES_H
137 # include <inttypes.h>
138 #else
139 # if HAVE_STDINT_H
140 # include <stdint.h>
141 # endif
142 #endif
143 #if HAVE_UNISTD_H
144 # include <unistd.h>
145 #endif"
146
147 # Initialize some variables set by options.
148 ac_init_help=
149 ac_init_version=false
150 # The variables have the same names as the options, with
151 # dashes changed to underlines.
152 cache_file=/dev/null
153 exec_prefix=NONE
154 no_create=
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 verbose=
164 x_includes=NONE
165 x_libraries=NONE
166
167 # Installation directory options.
168 # These are left unexpanded so users can "make install exec_prefix=/foo"
169 # and all the variables that are supposed to be based on exec_prefix
170 # by default will actually change.
171 # Use braces instead of parens because sh, perl, etc. also accept them.
172 bindir='${exec_prefix}/bin'
173 sbindir='${exec_prefix}/sbin'
174 libexecdir='${exec_prefix}/libexec'
175 datarootdir='${prefix}/share'
176 datadir='${datarootdir}'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 runstatedir='${localstatedir}/run'
181 libdir='${exec_prefix}/lib'
182 includedir='${prefix}/include'
183 oldincludedir='/usr/include'
184 infodir='${datarootdir}/info'
185 mandir='${datarootdir}/man'
186
187 # Identity of this package.
188 PACKAGE_NAME=
189 PACKAGE_TARNAME=
190 PACKAGE_VERSION=
191 PACKAGE_STRING=
192 PACKAGE_BUGREPORT=
193
194 ac_prev=
195 for ac_option
196 do
197 # If the previous option needs an argument, assign it.
198 if test -n "$ac_prev"; then
199 eval "$ac_prev=\$ac_option"
200 ac_prev=
201 continue
202 fi
203
204 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205
206 # Accept the important Cygnus configure options, so we can diagnose typos.
207
208 case "$ac_option" in
209
210 -bindir | --bindir | --bindi | --bind | --bin | --bi)
211 ac_prev=bindir ;;
212 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213 bindir=$ac_optarg ;;
214
215 -build | --build | --buil | --bui | --bu)
216 ac_prev=build_alias ;;
217 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218 build_alias=$ac_optarg ;;
219
220 -cache-file | --cache-file | --cache-fil | --cache-fi \
221 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222 ac_prev=cache_file ;;
223 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225 cache_file=$ac_optarg ;;
226
227 --config-cache | -C)
228 cache_file=config.cache ;;
229
230 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231 ac_prev=datadir ;;
232 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233 | --da=*)
234 datadir=$ac_optarg ;;
235
236 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237 | --dataroo | --dataro | --datar)
238 ac_prev=datarootdir ;;
239 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241 datarootdir=$ac_optarg ;;
242
243 -disable-* | --disable-*)
244 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245 # Reject names that are not valid shell variable names.
246 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248 { (exit 1); exit 1; }; }
249 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250 eval "enable_$ac_feature=no" ;;
251
252 -enable-* | --enable-*)
253 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254 # Reject names that are not valid shell variable names.
255 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257 { (exit 1); exit 1; }; }
258 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
259 case "$ac_option" in
260 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261 *) ac_optarg=yes ;;
262 esac
263 eval "enable_$ac_feature='$ac_optarg'" ;;
264
265 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267 | --exec | --exe | --ex)
268 ac_prev=exec_prefix ;;
269 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271 | --exec=* | --exe=* | --ex=*)
272 exec_prefix=$ac_optarg ;;
273
274 -gas | --gas | --ga | --g)
275 # Obsolete; use --with-gas.
276 with_gas=yes ;;
277
278 -help | --help | --hel | --he | -h)
279 ac_init_help=long ;;
280 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281 ac_init_help=recursive ;;
282 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283 ac_init_help=short ;;
284
285 -host | --host | --hos | --ho)
286 ac_prev=host_alias ;;
287 -host=* | --host=* | --hos=* | --ho=*)
288 host_alias=$ac_optarg ;;
289
290 -includedir | --includedir | --includedi | --included | --include \
291 | --includ | --inclu | --incl | --inc)
292 ac_prev=includedir ;;
293 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294 | --includ=* | --inclu=* | --incl=* | --inc=*)
295 includedir=$ac_optarg ;;
296
297 -infodir | --infodir | --infodi | --infod | --info | --inf)
298 ac_prev=infodir ;;
299 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300 infodir=$ac_optarg ;;
301
302 -libdir | --libdir | --libdi | --libd)
303 ac_prev=libdir ;;
304 -libdir=* | --libdir=* | --libdi=* | --libd=*)
305 libdir=$ac_optarg ;;
306
307 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308 | --libexe | --libex | --libe)
309 ac_prev=libexecdir ;;
310 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311 | --libexe=* | --libex=* | --libe=*)
312 libexecdir=$ac_optarg ;;
313
314 -localstatedir | --localstatedir | --localstatedi | --localstated \
315 | --localstate | --localstat | --localsta | --localst \
316 | --locals | --local | --loca | --loc | --lo)
317 ac_prev=localstatedir ;;
318 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321 localstatedir=$ac_optarg ;;
322
323 -runstatedir | --runstatedir | --runstatedi | --runstated \
324 | --runstate | --runstat | --runsta | --runst \
325 | --runs | --run | --ru)
326 ac_prev=runstatedir ;;
327 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329 | --runs=* | --run=* | --ru=*)
330 runstatedir=$ac_optarg ;;
331
332 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333 ac_prev=mandir ;;
334 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335 mandir=$ac_optarg ;;
336
337 -nfp | --nfp | --nf)
338 # Obsolete; use --without-fp.
339 with_fp=no ;;
340
341 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342 | --no-cr | --no-c)
343 no_create=yes ;;
344
345 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347 no_recursion=yes ;;
348
349 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351 | --oldin | --oldi | --old | --ol | --o)
352 ac_prev=oldincludedir ;;
353 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356 oldincludedir=$ac_optarg ;;
357
358 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359 ac_prev=prefix ;;
360 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361 prefix=$ac_optarg ;;
362
363 -program-prefix | --program-prefix | --program-prefi | --program-pref \
364 | --program-pre | --program-pr | --program-p)
365 ac_prev=program_prefix ;;
366 -program-prefix=* | --program-prefix=* | --program-prefi=* \
367 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368 program_prefix=$ac_optarg ;;
369
370 -program-suffix | --program-suffix | --program-suffi | --program-suff \
371 | --program-suf | --program-su | --program-s)
372 ac_prev=program_suffix ;;
373 -program-suffix=* | --program-suffix=* | --program-suffi=* \
374 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375 program_suffix=$ac_optarg ;;
376
377 -program-transform-name | --program-transform-name \
378 | --program-transform-nam | --program-transform-na \
379 | --program-transform-n | --program-transform- \
380 | --program-transform | --program-transfor \
381 | --program-transfo | --program-transf \
382 | --program-trans | --program-tran \
383 | --progr-tra | --program-tr | --program-t)
384 ac_prev=program_transform_name ;;
385 -program-transform-name=* | --program-transform-name=* \
386 | --program-transform-nam=* | --program-transform-na=* \
387 | --program-transform-n=* | --program-transform-=* \
388 | --program-transform=* | --program-transfor=* \
389 | --program-transfo=* | --program-transf=* \
390 | --program-trans=* | --program-tran=* \
391 | --progr-tra=* | --program-tr=* | --program-t=*)
392 program_transform_name=$ac_optarg ;;
393
394 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395 | -silent | --silent | --silen | --sile | --sil)
396 silent=yes ;;
397
398 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399 ac_prev=sbindir ;;
400 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401 | --sbi=* | --sb=*)
402 sbindir=$ac_optarg ;;
403
404 -sharedstatedir | --sharedstatedir | --sharedstatedi \
405 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406 | --sharedst | --shareds | --shared | --share | --shar \
407 | --sha | --sh)
408 ac_prev=sharedstatedir ;;
409 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412 | --sha=* | --sh=*)
413 sharedstatedir=$ac_optarg ;;
414
415 -site | --site | --sit)
416 ac_prev=site ;;
417 -site=* | --site=* | --sit=*)
418 site=$ac_optarg ;;
419
420 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421 ac_prev=srcdir ;;
422 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423 srcdir=$ac_optarg ;;
424
425 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426 | --syscon | --sysco | --sysc | --sys | --sy)
427 ac_prev=sysconfdir ;;
428 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430 sysconfdir=$ac_optarg ;;
431
432 -target | --target | --targe | --targ | --tar | --ta | --t)
433 ac_prev=target_alias ;;
434 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435 target_alias=$ac_optarg ;;
436
437 -v | -verbose | --verbose | --verbos | --verbo | --verb)
438 verbose=yes ;;
439
440 -version | --version | --versio | --versi | --vers | -V)
441 ac_init_version=: ;;
442
443 -with-* | --with-*)
444 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445 # Reject names that are not valid shell variable names.
446 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447 { echo "$as_me: error: invalid package name: $ac_package" >&2
448 { (exit 1); exit 1; }; }
449 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
450 case "$ac_option" in
451 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
452 *) ac_optarg=yes ;;
453 esac
454 eval "with_$ac_package='$ac_optarg'" ;;
455
456 -without-* | --without-*)
457 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458 # Reject names that are not valid shell variable names.
459 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460 { echo "$as_me: error: invalid package name: $ac_package" >&2
461 { (exit 1); exit 1; }; }
462 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463 eval "with_$ac_package=no" ;;
464
465 --x)
466 # Obsolete; use --with-x.
467 with_x=yes ;;
468
469 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470 | --x-incl | --x-inc | --x-in | --x-i)
471 ac_prev=x_includes ;;
472 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474 x_includes=$ac_optarg ;;
475
476 -x-libraries | --x-libraries | --x-librarie | --x-librari \
477 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478 ac_prev=x_libraries ;;
479 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481 x_libraries=$ac_optarg ;;
482
483 -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
484 echo "$as_me: WARNING: unsupported option: $ac_option" >&2
485 ;;
486
487 -*) { echo "$as_me: error: unrecognized option: $ac_option
488 Try \`$0 --help' for more information." >&2
489 { (exit 1); exit 1; }; }
490 ;;
491
492 *=*)
493 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
494 # Reject names that are not valid shell variable names.
495 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
496 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
497 { (exit 1); exit 1; }; }
498 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
499 eval "$ac_envvar='$ac_optarg'"
500 export "$ac_envvar" ;;
501
502 *)
503 # FIXME: should be removed in autoconf 3.0.
504 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
505 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
506 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
507 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
508 ;;
509
510 esac
511 done
512
513 if test -n "$ac_prev"; then
514 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
515 { echo "$as_me: error: missing argument to $ac_option" >&2
516 { (exit 1); exit 1; }; }
517 fi
518
519 # Be sure to have absolute paths.
520 for ac_var in exec_prefix prefix
521 do
522 eval ac_val=$`echo "$ac_var"`
523 case "$ac_val" in
524 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
525 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
526 { (exit 1); exit 1; }; };;
527 esac
528 done
529
530 # Be sure to have absolute paths.
531 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
532 localstatedir libdir includedir oldincludedir infodir mandir
533 do
534 eval ac_val=$`echo "$ac_var"`
535 case "$ac_val" in
536 [\\/$]* | ?:[\\/]* ) ;;
537 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
538 { (exit 1); exit 1; }; };;
539 esac
540 done
541
542 # There might be people who depend on the old broken behavior: `$host'
543 # used to hold the argument of --host etc.
544 build=$build_alias
545 host=$host_alias
546 target=$target_alias
547
548 # FIXME: should be removed in autoconf 3.0.
549 if test "x$host_alias" != x; then
550 if test "x$build_alias" = x; then
551 cross_compiling=maybe
552 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
553 If a cross compiler is detected then cross compile mode will be used." >&2
554 elif test "x$build_alias" != "x$host_alias"; then
555 cross_compiling=yes
556 fi
557 fi
558
559 ac_tool_prefix=
560 test -n "$host_alias" && ac_tool_prefix=$host_alias-
561
562 test "$silent" = yes && exec 6>/dev/null
563
564 # Find the source files, if location was not specified.
565 if test -z "$srcdir"; then
566 ac_srcdir_defaulted=yes
567 # Try the directory containing this script, then its parent.
568 ac_prog=$0
569 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
570 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
571 srcdir=$ac_confdir
572 if test ! -r "$srcdir/$ac_unique_file"; then
573 srcdir=..
574 fi
575 else
576 ac_srcdir_defaulted=no
577 fi
578 if test ! -r "$srcdir/$ac_unique_file"; then
579 if test "$ac_srcdir_defaulted" = yes; then
580 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
581 { (exit 1); exit 1; }; }
582 else
583 { echo "$as_me: error: cannot find sources in $srcdir" >&2
584 { (exit 1); exit 1; }; }
585 fi
586 fi
587 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
588 ac_env_build_alias_set=${build_alias+set}
589 ac_env_build_alias_value=$build_alias
590 ac_cv_env_build_alias_set=${build_alias+set}
591 ac_cv_env_build_alias_value=$build_alias
592 ac_env_host_alias_set=${host_alias+set}
593 ac_env_host_alias_value=$host_alias
594 ac_cv_env_host_alias_set=${host_alias+set}
595 ac_cv_env_host_alias_value=$host_alias
596 ac_env_target_alias_set=${target_alias+set}
597 ac_env_target_alias_value=$target_alias
598 ac_cv_env_target_alias_set=${target_alias+set}
599 ac_cv_env_target_alias_value=$target_alias
600 ac_env_CC_set=${CC+set}
601 ac_env_CC_value=$CC
602 ac_cv_env_CC_set=${CC+set}
603 ac_cv_env_CC_value=$CC
604 ac_env_CFLAGS_set=${CFLAGS+set}
605 ac_env_CFLAGS_value=$CFLAGS
606 ac_cv_env_CFLAGS_set=${CFLAGS+set}
607 ac_cv_env_CFLAGS_value=$CFLAGS
608 ac_env_LDFLAGS_set=${LDFLAGS+set}
609 ac_env_LDFLAGS_value=$LDFLAGS
610 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
611 ac_cv_env_LDFLAGS_value=$LDFLAGS
612 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
613 ac_env_CPPFLAGS_value=$CPPFLAGS
614 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
615 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
616 ac_env_CPP_set=${CPP+set}
617 ac_env_CPP_value=$CPP
618 ac_cv_env_CPP_set=${CPP+set}
619 ac_cv_env_CPP_value=$CPP
620
621 #
622 # Report the --help message.
623 #
624 if test "$ac_init_help" = "long"; then
625 # Omit some internal or obsolete options to make the list less imposing.
626 # This message is too long to be a string in the A/UX 3.1 sh.
627 cat <<EOF
628 \`configure' configures this package to adapt to many kinds of systems.
629
630 Usage: $0 [OPTION]... [VAR=VALUE]...
631
632 To assign environment variables (e.g., CC, CFLAGS...), specify them as
633 VAR=VALUE. See below for descriptions of some of the useful variables.
634
635 Defaults for the options are specified in brackets.
636
637 Configuration:
638 -h, --help display this help and exit
639 --help=short display options specific to this package
640 --help=recursive display the short help of all the included packages
641 -V, --version display version information and exit
642 -q, --quiet, --silent do not print \`checking...' messages
643 --cache-file=FILE cache test results in FILE [disabled]
644 -C, --config-cache alias for \`--cache-file=config.cache'
645 -n, --no-create do not create output files
646 --srcdir=DIR find the sources in DIR [configure dir or \`..']
647
648 EOF
649
650 cat <<EOF
651 Installation directories:
652 --prefix=PREFIX install architecture-independent files in PREFIX
653 [$ac_default_prefix]
654 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
655 [PREFIX]
656
657 By default, \`make install' will install all the files in
658 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
659 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
660 for instance \`--prefix=\$HOME'.
661
662 For better control, use the options below.
663
664 Fine tuning of the installation directories:
665 --bindir=DIR user executables [EPREFIX/bin]
666 --sbindir=DIR system admin executables [EPREFIX/sbin]
667 --libexecdir=DIR program executables [EPREFIX/libexec]
668 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
669 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
670 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
671 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
672 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
673 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
674 --libdir=DIR object code libraries [EPREFIX/lib]
675 --includedir=DIR C header files [PREFIX/include]
676 --oldincludedir=DIR C header files for non-gcc [/usr/include]
677 --infodir=DIR info documentation [DATAROOTDIR/info]
678 --mandir=DIR man documentation [DATAROOTDIR/man]
679 EOF
680
681 cat <<\EOF
682
683 X features:
684 --x-includes=DIR X include files are in DIR
685 --x-libraries=DIR X library files are in DIR
686
687 System types:
688 --build=BUILD configure for building on BUILD [guessed]
689 --host=HOST build programs to run on HOST [BUILD]
690 --target=TARGET configure for building compilers for TARGET [HOST]
691 EOF
692 fi
693
694 if test -n "$ac_init_help"; then
695
696 cat <<\EOF
697
698 Optional Packages:
699 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
700 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701
702 Optional Features:
703 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
704 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705
706 General Options:
707 --with-system-type=XXX test: override derived host system-type
708 --disable-stripping do not strip (debug info) installed executables
709 --with-strip-program=XX specify program to use when stripping in install
710 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
711 --enable-string-hacks work around bogus compiler/loader warnings
712 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
713 --disable-echo do not display "compiling" commands
714 --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
715 --enable-install-prefix merge DESTDIR with installation prefix
716 Curses Version-dependent Options:
717 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
718 --disable-widec disable checks for wide-character functions
719 --with-curses-dir=DIR directory in which (n)curses is installed
720 --with-screen=XXX use specified curses-libraries
721 --with-ncursesw use wide ncurses-libraries
722 --with-ncurses use ncurses-libraries
723 --with-pdcurses compile/link with pdcurses X11 library
724 --with-curses-colr compile/link with HPUX 10.x color-curses
725 --with-curses-5lib compile/link with SunOS 5lib curses
726 --with-Xaw3d link with Xaw 3d library
727 --with-Xaw3dxft link with Xaw 3d xft library
728 --with-neXtaw link with neXT Athena library
729 --with-XawPlus link with Athena-Plus library
730 --with-x use the X Window System
731 --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
732 --with-form-libname[=XXX] override ifelse(,,form,) basename of library
733 --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library
734 --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library
735 --disable-panel disable checks for panel functions
736 --disable-menu disable checks for menu functions
737 --disable-form disable checks for form functions
738 Testing/development Options:
739 --enable-warnings test: turn on gcc compiler warnings
740 --with-dmalloc test: use Gray Watson's dmalloc library
741 --with-dbmalloc test: use Conor Cahill's dbmalloc library
742 --with-valgrind test: use valgrind
743 --disable-leaks test: free permanent memory, analyze leaks
744 --disable-rpath-hack don't add rpath options for additional libraries
745
746 Some influential environment variables:
747 CC C compiler command
748 CFLAGS C compiler flags
749 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
750 nonstandard directory <lib dir>
751 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
752 headers in a nonstandard directory <include dir>
753 CPP C preprocessor
754
755 Use these variables to override the choices made by `configure' or to help
756 it to find libraries and programs with nonstandard names/locations.
757
758 EOF
759 fi
760
761 if test "$ac_init_help" = "recursive"; then
762 # If there are subdirs, report their specific --help.
763 ac_popdir=`pwd`
764 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
765 cd "$ac_subdir"
766 # A "../" for each directory in /$ac_subdir.
767 ac_dots=`echo "$ac_subdir" |
768 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
769
770 case "$srcdir" in
771 .) # No --srcdir option. We are building in place.
772 ac_sub_srcdir="$srcdir" ;;
773 [\\/]* | ?:[\\/]* ) # Absolute path.
774 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
775 *) # Relative path.
776 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
777 esac
778
779 # Check for guested configure; otherwise get Cygnus style configure.
780 if test -f "$ac_sub_srcdir/configure.gnu"; then
781 echo
782 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
783 elif test -f "$ac_sub_srcdir/configure"; then
784 echo
785 $SHELL "$ac_sub_srcdir/configure" --help=recursive
786 elif test -f "$ac_sub_srcdir/configure.ac" ||
787 test -f "$ac_sub_srcdir/configure.in"; then
788 echo
789 "$ac_configure" --help
790 else
791 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
792 fi
793 cd "$ac_popdir"
794 done
795 fi
796
797 test -n "$ac_init_help" && exit 0
798 if "$ac_init_version"; then
799 cat <<\EOF
800
801 Copyright 2003-2025,2026 Thomas E. Dickey
802 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
803 Free Software Foundation, Inc.
804 This configure script is free software; the Free Software Foundation
805 gives unlimited permission to copy, distribute and modify it.
806 EOF
807 exit 0
808 fi
809 exec 5>config.log
810 cat >&5 <<EOF
811 This file contains any messages produced by compilers while
812 running configure, to aid debugging if configure makes a mistake.
813
814 It was created by $as_me, which was
815 generated by GNU Autoconf 2.52.20260412. Invocation command line was
816
817 $ $0 $@
818
819 EOF
820 {
821 cat <<_ASUNAME
822 ## ---------- ##
823 ## Platform. ##
824 ## ---------- ##
825
826 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
827 uname -m = `(uname -m) 2>/dev/null || echo unknown`
828 uname -r = `(uname -r) 2>/dev/null || echo unknown`
829 uname -s = `(uname -s) 2>/dev/null || echo unknown`
830 uname -v = `(uname -v) 2>/dev/null || echo unknown`
831
832 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
833 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
834
835 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
836 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
837 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
838 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
839 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
840 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
841 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
842
843 PATH = $PATH
844
845 _ASUNAME
846 } >&5
847
848 cat >&5 <<EOF
849 ## ------------ ##
850 ## Core tests. ##
851 ## ------------ ##
852
853 EOF
854
855 # Keep a trace of the command line.
856 # Strip out --no-create and --no-recursion so they do not pile up.
857 # Also quote any args containing shell meta-characters.
858 ac_configure_args=
859 ac_sep=
860 for ac_arg
861 do
862 case "$ac_arg" in
863 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
864 | --no-cr | --no-c) ;;
865 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
866 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
867 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
868 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
869 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
870 ac_sep=" " ;;
871 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
872 ac_sep=" " ;;
873 esac
874 # Get rid of the leading space.
875 done
876
877 # When interrupted or exit'd, cleanup temporary files, and complete
878 # config.log. We remove comments because anyway the quotes in there
879 # would cause problems or look ugly.
880 trap 'exit_status=$?
881 # Save into config.log some information that might help in debugging.
882 echo >&5
883 echo "## ----------------- ##" >&5
884 echo "## Cache variables. ##" >&5
885 echo "## ----------------- ##" >&5
886 echo >&5
887 # The following way of writing the cache mishandles newlines in values,
888 {
889 (set) 2>&1 |
890 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
891 *ac_space=\ *)
892 sed -n \
893 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
894 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
895 ;;
896 *)
897 sed -n \
898 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
899 ;;
900 esac;
901 } >&5
902 sed "/^$/d" confdefs.h >conftest.log
903 if test -s conftest.log; then
904 echo >&5
905 echo "## ------------ ##" >&5
906 echo "## confdefs.h. ##" >&5
907 echo "## ------------ ##" >&5
908 echo >&5
909 cat conftest.log >&5
910 fi
911 (echo; echo) >&5
912 test "$ac_signal" != 0 &&
913 echo "$as_me: caught signal $ac_signal" >&5
914 echo "$as_me: exit $exit_status" >&5
915 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
916 exit $exit_status
917 ' 0
918 for ac_signal in 1 2 13 15; do
919 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
920 done
921 ac_signal=0
922
923 # confdefs.h avoids OS command line length limits that DEFS can exceed.
924 rm -rf conftest* confdefs.h
925 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
926 echo >confdefs.h
927
928 # Let the site file select an alternate cache file if it wants to.
929 # Prefer explicitly selected file to automatically selected ones.
930 if test -z "$CONFIG_SITE"; then
931 if test "x$prefix" != xNONE; then
932 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
933 else
934 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
935 fi
936 fi
937 for ac_site_file in $CONFIG_SITE; do
938 if test -r "$ac_site_file"; then
939 { echo "$as_me:939: loading site script $ac_site_file" >&5
940 echo "$as_me: loading site script $ac_site_file" >&6;}
941 cat "$ac_site_file" >&5
942 . "$ac_site_file"
943 fi
944 done
945
946 if test -r "$cache_file"; then
947 # Some versions of bash will fail to source /dev/null (special
948 # files actually), so we avoid doing that.
949 if test -f "$cache_file"; then
950 { echo "$as_me:950: loading cache $cache_file" >&5
951 echo "$as_me: loading cache $cache_file" >&6;}
952 case $cache_file in
953 [\\/]* | ?:[\\/]* ) . $cache_file;;
954 *) . ./$cache_file;;
955 esac
956 fi
957 else
958 { echo "$as_me:958: creating cache $cache_file" >&5
959 echo "$as_me: creating cache $cache_file" >&6;}
960 >$cache_file
961 fi
962
963 # Check that the precious variables saved in the cache have kept the same
964 # value.
965 ac_cache_corrupted=false
966 for ac_var in `(set) 2>&1 |
967 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
968 eval ac_old_set=\$ac_cv_env_${ac_var}_set
969 eval ac_new_set=\$ac_env_${ac_var}_set
970 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
971 eval ac_new_val="\$ac_env_${ac_var}_value"
972 case "$ac_old_set,$ac_new_set" in
973 set,)
974 { echo "$as_me:974: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
975 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
976 ac_cache_corrupted=: ;;
977 ,set)
978 { echo "$as_me:978: error: \`$ac_var' was not set in the previous run" >&5
979 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
980 ac_cache_corrupted=: ;;
981 ,);;
982 *)
983 if test "x$ac_old_val" != "x$ac_new_val"; then
984 { echo "$as_me:984: error: \`$ac_var' has changed since the previous run:" >&5
985 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
986 { echo "$as_me:986: former value: $ac_old_val" >&5
987 echo "$as_me: former value: $ac_old_val" >&2;}
988 { echo "$as_me:988: current value: $ac_new_val" >&5
989 echo "$as_me: current value: $ac_new_val" >&2;}
990 ac_cache_corrupted=:
991 fi;;
992 esac
993 # Pass precious variables to config.status. It doesn't matter if
994 # we pass some twice (in addition to the command line arguments).
995 if test "$ac_new_set" = set; then
996 case "$ac_new_val" in
997 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
998 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
999 ac_configure_args="$ac_configure_args '$ac_arg'"
1000 ;;
1001 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1002 ;;
1003 esac
1004 fi
1005 done
1006 if "$ac_cache_corrupted"; then
1007 { echo "$as_me:1007: error: changes in the environment can compromise the build" >&5
1008 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1009 { { echo "$as_me:1009: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1010 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1011 { (exit 1); exit 1; }; }
1012 fi
1013
1014 ac_ext=c
1015 ac_cpp='$CPP $CPPFLAGS'
1016 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1017 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1019 ac_main_return="return"
1020
1021 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1022 *c*,-n*) ECHO_N=
1023 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1024 ECHO_T=' '
1025 ;;
1026 *c*,* ) ECHO_N=-n
1027 ECHO_C=
1028 ECHO_T=
1029 ;;
1030 *) ECHO_N=
1031 ECHO_C='\c'
1032 ECHO_T=
1033 ;;
1034 esac
1035 echo "#! $SHELL" >conftest.sh
1036 echo "exit 0" >>conftest.sh
1037 chmod +x conftest.sh
1038 if { (echo "$as_me:1038: PATH=\".;.\"; conftest.sh") >&5
1039 (PATH=".;."; conftest.sh) 2>&5
1040 ac_status=$?
1041 echo "$as_me:1041: \$? = $ac_status" >&5
1042 (exit "$ac_status"); }; then
1043 ac_path_separator=';'
1044 else
1045 ac_path_separator=:
1046 fi
1047 PATH_SEPARATOR="$ac_path_separator"
1048 rm -f conftest.sh
1049
1050 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1051
1052 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1053
1054 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1055
1056 ac_aux_dir=
1057 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1058 if test -f "$ac_dir/install-sh"; then
1059 ac_aux_dir=$ac_dir
1060 ac_install_sh="$ac_aux_dir/install-sh -c"
1061 break
1062 elif test -f "$ac_dir/install.sh"; then
1063 ac_aux_dir=$ac_dir
1064 ac_install_sh="$ac_aux_dir/install.sh -c"
1065 break
1066 elif test -f "$ac_dir/shtool"; then
1067 ac_aux_dir=$ac_dir
1068 ac_install_sh="$ac_aux_dir/shtool install -c"
1069 break
1070 fi
1071 done
1072 if test -z "$ac_aux_dir"; then
1073 { { echo "$as_me:1073: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1074 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1075 { (exit 1); exit 1; }; }
1076 fi
1077 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1078 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1079 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1080
1081 # Make sure we can run config.sub.
1082 $ac_config_sub sun4 >/dev/null 2>&1 ||
1083 { { echo "$as_me:1083: error: cannot run $ac_config_sub" >&5
1084 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1085 { (exit 1); exit 1; }; }
1086
1087 echo "$as_me:1087: checking build system type" >&5
1088 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1089 if test "${ac_cv_build+set}" = set; then
1090 echo $ECHO_N "(cached) $ECHO_C" >&6
1091 else
1092 ac_cv_build_alias=$build_alias
1093 test -z "$ac_cv_build_alias" &&
1094 ac_cv_build_alias=`$ac_config_guess`
1095 test -z "$ac_cv_build_alias" &&
1096 { { echo "$as_me:1096: error: cannot guess build type; you must specify one" >&5
1097 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1098 { (exit 1); exit 1; }; }
1099 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1100 { { echo "$as_me:1100: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1101 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1102 { (exit 1); exit 1; }; }
1103
1104 fi
1105 echo "$as_me:1105: result: $ac_cv_build" >&5
1106 echo "${ECHO_T}$ac_cv_build" >&6
1107 build=$ac_cv_build
1108 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1109 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1110 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1111
1112 echo "$as_me:1112: checking host system type" >&5
1113 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1114 if test "${ac_cv_host+set}" = set; then
1115 echo $ECHO_N "(cached) $ECHO_C" >&6
1116 else
1117 ac_cv_host_alias=$host_alias
1118 test -z "$ac_cv_host_alias" &&
1119 ac_cv_host_alias=$ac_cv_build_alias
1120 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1121 { { echo "$as_me:1121: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1122 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1123 { (exit 1); exit 1; }; }
1124
1125 fi
1126 echo "$as_me:1126: result: $ac_cv_host" >&5
1127 echo "${ECHO_T}$ac_cv_host" >&6
1128 host=$ac_cv_host
1129 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1130 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1131 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1132
1133 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1134 echo "$as_me:1134: checking target system type" >&5
1135 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1136 if test "${ac_cv_target+set}" = set; then
1137 echo $ECHO_N "(cached) $ECHO_C" >&6
1138 else
1139 ac_cv_target_alias=$target_alias
1140 test "x$ac_cv_target_alias" = "x" &&
1141 ac_cv_target_alias=$ac_cv_host_alias
1142 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1143 { { echo "$as_me:1143: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1144 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1145 { (exit 1); exit 1; }; }
1146
1147 fi
1148 echo "$as_me:1148: result: $ac_cv_target" >&5
1149 echo "${ECHO_T}$ac_cv_target" >&6
1150 target=$ac_cv_target
1151 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1152 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1153 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1154
1155 # The aliases save the names the user supplied, while $host etc.
1156 # will get canonicalized.
1157 test -n "$target_alias" &&
1158 test "$program_prefix$program_suffix$program_transform_name" = \
1159 NONENONEs,x,x, &&
1160 program_prefix=${target_alias}-
1161 system_name="$host_os"
1162 else
1163 system_name="`(uname -s -r) 2>/dev/null`"
1164 if test -z "$system_name" ; then
1165 system_name="`(hostname) 2>/dev/null`"
1166 fi
1167 fi
1168 test -n "$system_name" &&
1169 cat >>confdefs.h <<EOF
1170 #define SYSTEM_NAME "$system_name"
1171 EOF
1172
1173 if test "${cf_cv_system_name+set}" = set; then
1174 echo $ECHO_N "(cached) $ECHO_C" >&6
1175 else
1176 cf_cv_system_name="$system_name"
1177 fi
1178
1179 test -z "$system_name" && system_name="$cf_cv_system_name"
1180 test -n "$cf_cv_system_name" && echo "$as_me:1180: result: Configuring for $cf_cv_system_name" >&5
1181 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1182
1183 if test ".$system_name" != ".$cf_cv_system_name" ; then
1184 echo "$as_me:1184: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1185 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1186 { { echo "$as_me:1186: error: \"Please remove config.cache and try again.\"" >&5
1187 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1188 { (exit 1); exit 1; }; }
1189 fi
1190
1191 # Check whether --with-system-type or --without-system-type was given.
1192 if test "${with_system_type+set}" = set; then
1193 withval="$with_system_type"
1194 { echo "$as_me:1194: WARNING: overriding system type to $withval" >&5
1195 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1196 cf_cv_system_name=$withval
1197 host_os=$withval
1198
1199 fi;
1200
1201 echo "$as_me:1201: checking whether ${MAKE-make} sets \${MAKE}" >&5
1202 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1203 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1204 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1205 echo $ECHO_N "(cached) $ECHO_C" >&6
1206 else
1207 cat >conftest.make <<\EOF
1208 all:
1209 @echo 'ac_maketemp="${MAKE}"'
1210 EOF
1211 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1212 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1213 if test -n "$ac_maketemp"; then
1214 eval ac_cv_prog_make_${ac_make}_set=yes
1215 else
1216 eval ac_cv_prog_make_${ac_make}_set=no
1217 fi
1218 rm -f conftest.make
1219 fi
1220 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1221 echo "$as_me:1221: result: yes" >&5
1222 echo "${ECHO_T}yes" >&6
1223 SET_MAKE=
1224 else
1225 echo "$as_me:1225: result: no" >&5
1226 echo "${ECHO_T}no" >&6
1227 SET_MAKE="MAKE=${MAKE-make}"
1228 fi
1229
1230 ac_ext=c
1231 ac_cpp='$CPP $CPPFLAGS'
1232 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1233 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1235 ac_main_return="return"
1236 if test -n "$ac_tool_prefix"; then
1237 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1238 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1239 echo "$as_me:1239: checking for $ac_word" >&5
1240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1241 if test "${ac_cv_prog_CC+set}" = set; then
1242 echo $ECHO_N "(cached) $ECHO_C" >&6
1243 else
1244 if test -n "$CC"; then
1245 ac_cv_prog_CC="$CC" # Let the user override the test.
1246 else
1247 ac_save_IFS=$IFS; IFS=$ac_path_separator
1248 ac_dummy="$PATH"
1249 for ac_dir in $ac_dummy; do
1250 IFS=$ac_save_IFS
1251 test -z "$ac_dir" && ac_dir=.
1252 $as_executable_p "$ac_dir/$ac_word" || continue
1253 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1254 echo "$as_me:1254: found $ac_dir/$ac_word" >&5
1255 break
1256 done
1257
1258 fi
1259 fi
1260 CC=$ac_cv_prog_CC
1261 if test -n "$CC"; then
1262 echo "$as_me:1262: result: $CC" >&5
1263 echo "${ECHO_T}$CC" >&6
1264 else
1265 echo "$as_me:1265: result: no" >&5
1266 echo "${ECHO_T}no" >&6
1267 fi
1268
1269 fi
1270 if test -z "$ac_cv_prog_CC"; then
1271 ac_ct_CC=$CC
1272 # Extract the first word of "gcc", so it can be a program name with args.
1273 set dummy gcc; ac_word=$2
1274 echo "$as_me:1274: checking for $ac_word" >&5
1275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1276 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1277 echo $ECHO_N "(cached) $ECHO_C" >&6
1278 else
1279 if test -n "$ac_ct_CC"; then
1280 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1281 else
1282 ac_save_IFS=$IFS; IFS=$ac_path_separator
1283 ac_dummy="$PATH"
1284 for ac_dir in $ac_dummy; do
1285 IFS=$ac_save_IFS
1286 test -z "$ac_dir" && ac_dir=.
1287 $as_executable_p "$ac_dir/$ac_word" || continue
1288 ac_cv_prog_ac_ct_CC="gcc"
1289 echo "$as_me:1289: found $ac_dir/$ac_word" >&5
1290 break
1291 done
1292
1293 fi
1294 fi
1295 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1296 if test -n "$ac_ct_CC"; then
1297 echo "$as_me:1297: result: $ac_ct_CC" >&5
1298 echo "${ECHO_T}$ac_ct_CC" >&6
1299 else
1300 echo "$as_me:1300: result: no" >&5
1301 echo "${ECHO_T}no" >&6
1302 fi
1303
1304 CC=$ac_ct_CC
1305 else
1306 CC="$ac_cv_prog_CC"
1307 fi
1308
1309 if test -z "$CC"; then
1310 if test -n "$ac_tool_prefix"; then
1311 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1312 set dummy ${ac_tool_prefix}cc; ac_word=$2
1313 echo "$as_me:1313: checking for $ac_word" >&5
1314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1315 if test "${ac_cv_prog_CC+set}" = set; then
1316 echo $ECHO_N "(cached) $ECHO_C" >&6
1317 else
1318 if test -n "$CC"; then
1319 ac_cv_prog_CC="$CC" # Let the user override the test.
1320 else
1321 ac_save_IFS=$IFS; IFS=$ac_path_separator
1322 ac_dummy="$PATH"
1323 for ac_dir in $ac_dummy; do
1324 IFS=$ac_save_IFS
1325 test -z "$ac_dir" && ac_dir=.
1326 $as_executable_p "$ac_dir/$ac_word" || continue
1327 ac_cv_prog_CC="${ac_tool_prefix}cc"
1328 echo "$as_me:1328: found $ac_dir/$ac_word" >&5
1329 break
1330 done
1331
1332 fi
1333 fi
1334 CC=$ac_cv_prog_CC
1335 if test -n "$CC"; then
1336 echo "$as_me:1336: result: $CC" >&5
1337 echo "${ECHO_T}$CC" >&6
1338 else
1339 echo "$as_me:1339: result: no" >&5
1340 echo "${ECHO_T}no" >&6
1341 fi
1342
1343 fi
1344 if test -z "$ac_cv_prog_CC"; then
1345 ac_ct_CC=$CC
1346 # Extract the first word of "cc", so it can be a program name with args.
1347 set dummy cc; ac_word=$2
1348 echo "$as_me:1348: checking for $ac_word" >&5
1349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1350 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1351 echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353 if test -n "$ac_ct_CC"; then
1354 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1355 else
1356 ac_save_IFS=$IFS; IFS=$ac_path_separator
1357 ac_dummy="$PATH"
1358 for ac_dir in $ac_dummy; do
1359 IFS=$ac_save_IFS
1360 test -z "$ac_dir" && ac_dir=.
1361 $as_executable_p "$ac_dir/$ac_word" || continue
1362 ac_cv_prog_ac_ct_CC="cc"
1363 echo "$as_me:1363: found $ac_dir/$ac_word" >&5
1364 break
1365 done
1366
1367 fi
1368 fi
1369 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1370 if test -n "$ac_ct_CC"; then
1371 echo "$as_me:1371: result: $ac_ct_CC" >&5
1372 echo "${ECHO_T}$ac_ct_CC" >&6
1373 else
1374 echo "$as_me:1374: result: no" >&5
1375 echo "${ECHO_T}no" >&6
1376 fi
1377
1378 CC=$ac_ct_CC
1379 else
1380 CC="$ac_cv_prog_CC"
1381 fi
1382
1383 fi
1384 if test -z "$CC"; then
1385 # Extract the first word of "cc", so it can be a program name with args.
1386 set dummy cc; ac_word=$2
1387 echo "$as_me:1387: checking for $ac_word" >&5
1388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1389 if test "${ac_cv_prog_CC+set}" = set; then
1390 echo $ECHO_N "(cached) $ECHO_C" >&6
1391 else
1392 if test -n "$CC"; then
1393 ac_cv_prog_CC="$CC" # Let the user override the test.
1394 else
1395 ac_prog_rejected=no
1396 ac_save_IFS=$IFS; IFS=$ac_path_separator
1397 ac_dummy="$PATH"
1398 for ac_dir in $ac_dummy; do
1399 IFS=$ac_save_IFS
1400 test -z "$ac_dir" && ac_dir=.
1401 $as_executable_p "$ac_dir/$ac_word" || continue
1402 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1403 ac_prog_rejected=yes
1404 continue
1405 fi
1406 ac_cv_prog_CC="cc"
1407 echo "$as_me:1407: found $ac_dir/$ac_word" >&5
1408 break
1409 done
1410
1411 if test "$ac_prog_rejected" = yes; then
1412 # We found a bogon in the path, so make sure we never use it.
1413 set dummy $ac_cv_prog_CC
1414 shift
1415 if test $# != 0; then
1416 # We chose a different compiler from the bogus one.
1417 # However, it has the same basename, so the bogon will be chosen
1418 # first if we set CC to just the basename; use the full file name.
1419 shift
1420 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1421 shift
1422 ac_cv_prog_CC="$@"
1423 fi
1424 fi
1425 fi
1426 fi
1427 CC=$ac_cv_prog_CC
1428 if test -n "$CC"; then
1429 echo "$as_me:1429: result: $CC" >&5
1430 echo "${ECHO_T}$CC" >&6
1431 else
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1434 fi
1435
1436 fi
1437 if test -z "$CC"; then
1438 if test -n "$ac_tool_prefix"; then
1439 for ac_prog in cl
1440 do
1441 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1442 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1443 echo "$as_me:1443: checking for $ac_word" >&5
1444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1445 if test "${ac_cv_prog_CC+set}" = set; then
1446 echo $ECHO_N "(cached) $ECHO_C" >&6
1447 else
1448 if test -n "$CC"; then
1449 ac_cv_prog_CC="$CC" # Let the user override the test.
1450 else
1451 ac_save_IFS=$IFS; IFS=$ac_path_separator
1452 ac_dummy="$PATH"
1453 for ac_dir in $ac_dummy; do
1454 IFS=$ac_save_IFS
1455 test -z "$ac_dir" && ac_dir=.
1456 $as_executable_p "$ac_dir/$ac_word" || continue
1457 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1458 echo "$as_me:1458: found $ac_dir/$ac_word" >&5
1459 break
1460 done
1461
1462 fi
1463 fi
1464 CC=$ac_cv_prog_CC
1465 if test -n "$CC"; then
1466 echo "$as_me:1466: result: $CC" >&5
1467 echo "${ECHO_T}$CC" >&6
1468 else
1469 echo "$as_me:1469: result: no" >&5
1470 echo "${ECHO_T}no" >&6
1471 fi
1472
1473 test -n "$CC" && break
1474 done
1475 fi
1476 if test -z "$CC"; then
1477 ac_ct_CC=$CC
1478 for ac_prog in cl
1479 do
1480 # Extract the first word of "$ac_prog", so it can be a program name with args.
1481 set dummy $ac_prog; ac_word=$2
1482 echo "$as_me:1482: checking for $ac_word" >&5
1483 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1484 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1485 echo $ECHO_N "(cached) $ECHO_C" >&6
1486 else
1487 if test -n "$ac_ct_CC"; then
1488 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1489 else
1490 ac_save_IFS=$IFS; IFS=$ac_path_separator
1491 ac_dummy="$PATH"
1492 for ac_dir in $ac_dummy; do
1493 IFS=$ac_save_IFS
1494 test -z "$ac_dir" && ac_dir=.
1495 $as_executable_p "$ac_dir/$ac_word" || continue
1496 ac_cv_prog_ac_ct_CC="$ac_prog"
1497 echo "$as_me:1497: found $ac_dir/$ac_word" >&5
1498 break
1499 done
1500
1501 fi
1502 fi
1503 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1504 if test -n "$ac_ct_CC"; then
1505 echo "$as_me:1505: result: $ac_ct_CC" >&5
1506 echo "${ECHO_T}$ac_ct_CC" >&6
1507 else
1508 echo "$as_me:1508: result: no" >&5
1509 echo "${ECHO_T}no" >&6
1510 fi
1511
1512 test -n "$ac_ct_CC" && break
1513 done
1514
1515 CC=$ac_ct_CC
1516 fi
1517
1518 fi
1519
1520 test -z "$CC" && { { echo "$as_me:1520: error: no acceptable cc found in \$PATH" >&5
1521 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1522 { (exit 1); exit 1; }; }
1523
1524 # Provide some information about the compiler.
1525 echo "$as_me:1525:" \
1526 "checking for C compiler version" >&5
1527 ac_compiler=`set X $ac_compile; echo "$2"`
1528 { (eval echo "$as_me:1528: \"$ac_compiler --version </dev/null >&5\"") >&5
1529 (eval $ac_compiler --version </dev/null >&5) 2>&5
1530 ac_status=$?
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit "$ac_status"); }
1533 { (eval echo "$as_me:1533: \"$ac_compiler -v </dev/null >&5\"") >&5
1534 (eval $ac_compiler -v </dev/null >&5) 2>&5
1535 ac_status=$?
1536 echo "$as_me:1536: \$? = $ac_status" >&5
1537 (exit "$ac_status"); }
1538 { (eval echo "$as_me:1538: \"$ac_compiler -V </dev/null >&5\"") >&5
1539 (eval $ac_compiler -V </dev/null >&5) 2>&5
1540 ac_status=$?
1541 echo "$as_me:1541: \$? = $ac_status" >&5
1542 (exit "$ac_status"); }
1543
1544 cat >"conftest.$ac_ext" <<_ACEOF
1545 #line 1545 "configure"
1546 #include "confdefs.h"
1547
1548 int
1549 main (void)
1550 {
1551
1552 ;
1553 return 0;
1554 }
1555 _ACEOF
1556 ac_clean_files_save=$ac_clean_files
1557 ac_clean_files="$ac_clean_files a.out a.exe"
1558 # Try to create an executable without -o first, disregard a.out.
1559 # It will help us diagnose broken compilers, and finding out an intuition
1560 # of exeext.
1561 echo "$as_me:1561: checking for C compiler default output" >&5
1562 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1563 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1564 if { (eval echo "$as_me:1564: \"$ac_link_default\"") >&5
1565 (eval $ac_link_default) 2>&5
1566 ac_status=$?
1567 echo "$as_me:1567: \$? = $ac_status" >&5
1568 (exit "$ac_status"); }; then
1569 # Find the output, starting from the most likely. This scheme is
1570 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1571 # resort.
1572 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1573 ls a.out conftest 2>/dev/null;
1574 ls a.* conftest.* 2>/dev/null`; do
1575 case $ac_file in
1576 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1577 a.out ) # We found the default executable, but exeext='' is most
1578 # certainly right.
1579 break;;
1580 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1581 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1582 export ac_cv_exeext
1583 break;;
1584 * ) break;;
1585 esac
1586 done
1587 else
1588 echo "$as_me: failed program was:" >&5
1589 cat "conftest.$ac_ext" >&5
1590 { { echo "$as_me:1590: error: C compiler cannot create executables" >&5
1591 echo "$as_me: error: C compiler cannot create executables" >&2;}
1592 { (exit 77); exit 77; }; }
1593 fi
1594
1595 ac_exeext=$ac_cv_exeext
1596 echo "$as_me:1596: result: $ac_file" >&5
1597 echo "${ECHO_T}$ac_file" >&6
1598
1599 # Check the compiler produces executables we can run. If not, either
1600 # the compiler is broken, or we cross compile.
1601 echo "$as_me:1601: checking whether the C compiler works" >&5
1602 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1603 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1604 # If not cross compiling, check that we can run a simple program.
1605 if test "$cross_compiling" != yes; then
1606 if { ac_try='./$ac_file'
1607 { (eval echo "$as_me:1607: \"$ac_try\"") >&5
1608 (eval $ac_try) 2>&5
1609 ac_status=$?
1610 echo "$as_me:1610: \$? = $ac_status" >&5
1611 (exit "$ac_status"); }; }; then
1612 cross_compiling=no
1613 else
1614 if test "$cross_compiling" = maybe; then
1615 cross_compiling=yes
1616 else
1617 { { echo "$as_me:1617: error: cannot run C compiled programs.
1618 If you meant to cross compile, use \`--host'." >&5
1619 echo "$as_me: error: cannot run C compiled programs.
1620 If you meant to cross compile, use \`--host'." >&2;}
1621 { (exit 1); exit 1; }; }
1622 fi
1623 fi
1624 fi
1625 echo "$as_me:1625: result: yes" >&5
1626 echo "${ECHO_T}yes" >&6
1627
1628 rm -f a.out a.exe "conftest$ac_cv_exeext"
1629 ac_clean_files=$ac_clean_files_save
1630 # Check the compiler produces executables we can run. If not, either
1631 # the compiler is broken, or we cross compile.
1632 echo "$as_me:1632: checking whether we are cross compiling" >&5
1633 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1634 echo "$as_me:1634: result: $cross_compiling" >&5
1635 echo "${ECHO_T}$cross_compiling" >&6
1636
1637 echo "$as_me:1637: checking for executable suffix" >&5
1638 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1639 if { (eval echo "$as_me:1639: \"$ac_link\"") >&5
1640 (eval $ac_link) 2>&5
1641 ac_status=$?
1642 echo "$as_me:1642: \$? = $ac_status" >&5
1643 (exit "$ac_status"); }; then
1644 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1645 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1646 # work properly (i.e., refer to `conftest.exe'), while it won't with
1647 # `rm'.
1648 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1649 case $ac_file in
1650 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1651 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1652 export ac_cv_exeext
1653 break;;
1654 * ) break;;
1655 esac
1656 done
1657 else
1658 { { echo "$as_me:1658: error: cannot compute EXEEXT: cannot compile and link" >&5
1659 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1660 { (exit 1); exit 1; }; }
1661 fi
1662
1663 rm -f "conftest$ac_cv_exeext"
1664 echo "$as_me:1664: result: $ac_cv_exeext" >&5
1665 echo "${ECHO_T}$ac_cv_exeext" >&6
1666
1667 rm -f "conftest.$ac_ext"
1668 EXEEXT=$ac_cv_exeext
1669 ac_exeext=$EXEEXT
1670 echo "$as_me:1670: checking for object suffix" >&5
1671 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1672 if test "${ac_cv_objext+set}" = set; then
1673 echo $ECHO_N "(cached) $ECHO_C" >&6
1674 else
1675 cat >"conftest.$ac_ext" <<_ACEOF
1676 #line 1676 "configure"
1677 #include "confdefs.h"
1678
1679 int
1680 main (void)
1681 {
1682
1683 ;
1684 return 0;
1685 }
1686 _ACEOF
1687 rm -f conftest.o conftest.obj
1688 if { (eval echo "$as_me:1688: \"$ac_compile\"") >&5
1689 (eval $ac_compile) 2>&5
1690 ac_status=$?
1691 echo "$as_me:1691: \$? = $ac_status" >&5
1692 (exit "$ac_status"); }; then
1693 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1694 case $ac_file in
1695 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1696 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1697 break;;
1698 esac
1699 done
1700 else
1701 echo "$as_me: failed program was:" >&5
1702 cat "conftest.$ac_ext" >&5
1703 { { echo "$as_me:1703: error: cannot compute OBJEXT: cannot compile" >&5
1704 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1705 { (exit 1); exit 1; }; }
1706 fi
1707
1708 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1709 fi
1710 echo "$as_me:1710: result: $ac_cv_objext" >&5
1711 echo "${ECHO_T}$ac_cv_objext" >&6
1712 OBJEXT=$ac_cv_objext
1713 ac_objext=$OBJEXT
1714 echo "$as_me:1714: checking whether we are using the GNU C compiler" >&5
1715 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1716 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1717 echo $ECHO_N "(cached) $ECHO_C" >&6
1718 else
1719 cat >"conftest.$ac_ext" <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main (void)
1725 {
1726 #ifndef __GNUC__
1727 choke me
1728 #endif
1729
1730 ;
1731 return 0;
1732 }
1733 _ACEOF
1734 rm -f "conftest.$ac_objext"
1735 if { (eval echo "$as_me:1735: \"$ac_compile\"") >&5
1736 (eval $ac_compile) 2>&5
1737 ac_status=$?
1738 echo "$as_me:1738: \$? = $ac_status" >&5
1739 (exit "$ac_status"); } &&
1740 { ac_try='test -s "conftest.$ac_objext"'
1741 { (eval echo "$as_me:1741: \"$ac_try\"") >&5
1742 (eval $ac_try) 2>&5
1743 ac_status=$?
1744 echo "$as_me:1744: \$? = $ac_status" >&5
1745 (exit "$ac_status"); }; }; then
1746 ac_compiler_gnu=yes
1747 else
1748 echo "$as_me: failed program was:" >&5
1749 cat "conftest.$ac_ext" >&5
1750 ac_compiler_gnu=no
1751 fi
1752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1753 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1754
1755 fi
1756 echo "$as_me:1756: result: $ac_cv_c_compiler_gnu" >&5
1757 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1758 GCC=`test $ac_compiler_gnu = yes && echo yes`
1759 ac_test_CFLAGS=${CFLAGS+set}
1760 ac_save_CFLAGS=$CFLAGS
1761 CFLAGS="-g"
1762 echo "$as_me:1762: checking whether $CC accepts -g" >&5
1763 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1764 if test "${ac_cv_prog_cc_g+set}" = set; then
1765 echo $ECHO_N "(cached) $ECHO_C" >&6
1766 else
1767 cat >"conftest.$ac_ext" <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1770
1771 int
1772 main (void)
1773 {
1774
1775 ;
1776 return 0;
1777 }
1778 _ACEOF
1779 rm -f "conftest.$ac_objext"
1780 if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
1781 (eval $ac_compile) 2>&5
1782 ac_status=$?
1783 echo "$as_me:1783: \$? = $ac_status" >&5
1784 (exit "$ac_status"); } &&
1785 { ac_try='test -s "conftest.$ac_objext"'
1786 { (eval echo "$as_me:1786: \"$ac_try\"") >&5
1787 (eval $ac_try) 2>&5
1788 ac_status=$?
1789 echo "$as_me:1789: \$? = $ac_status" >&5
1790 (exit "$ac_status"); }; }; then
1791 ac_cv_prog_cc_g=yes
1792 else
1793 echo "$as_me: failed program was:" >&5
1794 cat "conftest.$ac_ext" >&5
1795 ac_cv_prog_cc_g=no
1796 fi
1797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1798 fi
1799 echo "$as_me:1799: result: $ac_cv_prog_cc_g" >&5
1800 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1801 if test "$ac_test_CFLAGS" = set; then
1802 CFLAGS=$ac_save_CFLAGS
1803 elif test $ac_cv_prog_cc_g = yes; then
1804 if test "$GCC" = yes; then
1805 CFLAGS="-g -O2"
1806 else
1807 CFLAGS="-g"
1808 fi
1809 else
1810 if test "$GCC" = yes; then
1811 CFLAGS="-O2"
1812 else
1813 CFLAGS=
1814 fi
1815 fi
1816 # Some people use a C++ compiler to compile C. Since we use `exit',
1817 # in C++ we need to declare it. In case someone uses the same compiler
1818 # for both compiling C and C++ we need to have the C++ compiler decide
1819 # the declaration of exit, since it's the most demanding environment.
1820 cat >"conftest.$ac_ext" <<_ACEOF
1821 #ifndef __cplusplus
1822 choke me
1823 #endif
1824 _ACEOF
1825 rm -f "conftest.$ac_objext"
1826 if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5
1827 (eval $ac_compile) 2>&5
1828 ac_status=$?
1829 echo "$as_me:1829: \$? = $ac_status" >&5
1830 (exit "$ac_status"); } &&
1831 { ac_try='test -s "conftest.$ac_objext"'
1832 { (eval echo "$as_me:1832: \"$ac_try\"") >&5
1833 (eval $ac_try) 2>&5
1834 ac_status=$?
1835 echo "$as_me:1835: \$? = $ac_status" >&5
1836 (exit "$ac_status"); }; }; then
1837 for ac_declaration in \
1838 ''\
1839 '#include <stdlib.h>' \
1840 'extern "C" void std::exit (int) throw (); using std::exit;' \
1841 'extern "C" void std::exit (int); using std::exit;' \
1842 'extern "C" void exit (int) throw ();' \
1843 'extern "C" void exit (int);' \
1844 'void exit (int);'
1845 do
1846 cat >"conftest.$ac_ext" <<_ACEOF
1847 #line 1847 "configure"
1848 #include "confdefs.h"
1849 #include <stdlib.h>
1850 $ac_declaration
1851 int
1852 main (void)
1853 {
1854 exit (42);
1855 ;
1856 return 0;
1857 }
1858 _ACEOF
1859 rm -f "conftest.$ac_objext"
1860 if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5
1861 (eval $ac_compile) 2>&5
1862 ac_status=$?
1863 echo "$as_me:1863: \$? = $ac_status" >&5
1864 (exit "$ac_status"); } &&
1865 { ac_try='test -s "conftest.$ac_objext"'
1866 { (eval echo "$as_me:1866: \"$ac_try\"") >&5
1867 (eval $ac_try) 2>&5
1868 ac_status=$?
1869 echo "$as_me:1869: \$? = $ac_status" >&5
1870 (exit "$ac_status"); }; }; then
1871 :
1872 else
1873 echo "$as_me: failed program was:" >&5
1874 cat "conftest.$ac_ext" >&5
1875 continue
1876 fi
1877 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1878 cat >"conftest.$ac_ext" <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881 $ac_declaration
1882 int
1883 main (void)
1884 {
1885 exit (42);
1886 ;
1887 return 0;
1888 }
1889 _ACEOF
1890 rm -f "conftest.$ac_objext"
1891 if { (eval echo "$as_me:1891: \"$ac_compile\"") >&5
1892 (eval $ac_compile) 2>&5
1893 ac_status=$?
1894 echo "$as_me:1894: \$? = $ac_status" >&5
1895 (exit "$ac_status"); } &&
1896 { ac_try='test -s "conftest.$ac_objext"'
1897 { (eval echo "$as_me:1897: \"$ac_try\"") >&5
1898 (eval $ac_try) 2>&5
1899 ac_status=$?
1900 echo "$as_me:1900: \$? = $ac_status" >&5
1901 (exit "$ac_status"); }; }; then
1902 break
1903 else
1904 echo "$as_me: failed program was:" >&5
1905 cat "conftest.$ac_ext" >&5
1906 fi
1907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1908 done
1909 rm -rf conftest*
1910 if test -n "$ac_declaration"; then
1911 echo '#ifdef __cplusplus' >>confdefs.h
1912 echo "$ac_declaration" >>confdefs.h
1913 echo '#endif' >>confdefs.h
1914 fi
1915
1916 else
1917 echo "$as_me: failed program was:" >&5
1918 cat "conftest.$ac_ext" >&5
1919 fi
1920 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1921 ac_ext=c
1922 ac_cpp='$CPP $CPPFLAGS'
1923 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1924 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1925 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1926 ac_main_return="return"
1927
1928 GCC_VERSION=none
1929 if test "$GCC" = yes ; then
1930 echo "$as_me:1930: checking version of $CC" >&5
1931 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1932 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1933 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1934 echo "$as_me:1934: result: $GCC_VERSION" >&5
1935 echo "${ECHO_T}$GCC_VERSION" >&6
1936 fi
1937
1938 INTEL_COMPILER=no
1939
1940 if test "$GCC" = yes ; then
1941 case "$host_os" in
1942 (linux*|gnu*)
1943 echo "$as_me:1943: checking if this is really Intel C compiler" >&5
1944 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1945 cf_save_CFLAGS="$CFLAGS"
1946 CFLAGS="$CFLAGS -no-gcc"
1947 cat >"conftest.$ac_ext" <<_ACEOF
1948 #line 1948 "configure"
1949 #include "confdefs.h"
1950
1951 int
1952 main (void)
1953 {
1954
1955 #ifdef __INTEL_COMPILER
1956 #else
1957 #error __INTEL_COMPILER is not defined
1958 #endif
1959
1960 ;
1961 return 0;
1962 }
1963 _ACEOF
1964 rm -f "conftest.$ac_objext"
1965 if { (eval echo "$as_me:1965: \"$ac_compile\"") >&5
1966 (eval $ac_compile) 2>&5
1967 ac_status=$?
1968 echo "$as_me:1968: \$? = $ac_status" >&5
1969 (exit "$ac_status"); } &&
1970 { ac_try='test -s "conftest.$ac_objext"'
1971 { (eval echo "$as_me:1971: \"$ac_try\"") >&5
1972 (eval $ac_try) 2>&5
1973 ac_status=$?
1974 echo "$as_me:1974: \$? = $ac_status" >&5
1975 (exit "$ac_status"); }; }; then
1976 INTEL_COMPILER=yes
1977 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1978
1979 else
1980 echo "$as_me: failed program was:" >&5
1981 cat "conftest.$ac_ext" >&5
1982 fi
1983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1984 CFLAGS="$cf_save_CFLAGS"
1985 echo "$as_me:1985: result: $INTEL_COMPILER" >&5
1986 echo "${ECHO_T}$INTEL_COMPILER" >&6
1987 ;;
1988 esac
1989 fi
1990
1991 CLANG_COMPILER=no
1992
1993 if test "$GCC" = yes ; then
1994 echo "$as_me:1994: checking if this is really Clang C compiler" >&5
1995 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1996 cf_save_CFLAGS="$CFLAGS"
1997 cat >"conftest.$ac_ext" <<_ACEOF
1998 #line 1998 "configure"
1999 #include "confdefs.h"
2000
2001 int
2002 main (void)
2003 {
2004
2005 #ifdef __clang__
2006 #else
2007 #error __clang__ is not defined
2008 #endif
2009
2010 ;
2011 return 0;
2012 }
2013 _ACEOF
2014 rm -f "conftest.$ac_objext"
2015 if { (eval echo "$as_me:2015: \"$ac_compile\"") >&5
2016 (eval $ac_compile) 2>&5
2017 ac_status=$?
2018 echo "$as_me:2018: \$? = $ac_status" >&5
2019 (exit "$ac_status"); } &&
2020 { ac_try='test -s "conftest.$ac_objext"'
2021 { (eval echo "$as_me:2021: \"$ac_try\"") >&5
2022 (eval $ac_try) 2>&5
2023 ac_status=$?
2024 echo "$as_me:2024: \$? = $ac_status" >&5
2025 (exit "$ac_status"); }; }; then
2026 CLANG_COMPILER=yes
2027
2028 else
2029 echo "$as_me: failed program was:" >&5
2030 cat "conftest.$ac_ext" >&5
2031 fi
2032 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2033 CFLAGS="$cf_save_CFLAGS"
2034 echo "$as_me:2034: result: $CLANG_COMPILER" >&5
2035 echo "${ECHO_T}$CLANG_COMPILER" >&6
2036 fi
2037
2038 CLANG_VERSION=none
2039
2040 if test "x$CLANG_COMPILER" = "xyes" ; then
2041 case "$CC" in
2042 (c[1-9][0-9]|*/c[1-9][0-9])
2043 { echo "$as_me:2043: WARNING: replacing broken compiler alias $CC" >&5
2044 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2045 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2046 CC=clang
2047 ;;
2048 esac
2049
2050 echo "$as_me:2050: checking version of $CC" >&5
2051 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2052 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2053 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2054 echo "$as_me:2054: result: $CLANG_VERSION" >&5
2055 echo "${ECHO_T}$CLANG_VERSION" >&6
2056
2057 for cf_clang_opt in \
2058 -Qunused-arguments \
2059 -Wno-error=implicit-function-declaration
2060 do
2061 echo "$as_me:2061: checking if option $cf_clang_opt works" >&5
2062 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2063 cf_save_CFLAGS="$CFLAGS"
2064 CFLAGS="$CFLAGS $cf_clang_opt"
2065 cat >"conftest.$ac_ext" <<_ACEOF
2066 #line 2066 "configure"
2067 #include "confdefs.h"
2068
2069 #include <stdio.h>
2070 int
2071 main (void)
2072 {
2073
2074 printf("hello!\\n");
2075 ;
2076 return 0;
2077 }
2078 _ACEOF
2079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2080 if { (eval echo "$as_me:2080: \"$ac_link\"") >&5
2081 (eval $ac_link) 2>&5
2082 ac_status=$?
2083 echo "$as_me:2083: \$? = $ac_status" >&5
2084 (exit "$ac_status"); } &&
2085 { ac_try='test -s "conftest$ac_exeext"'
2086 { (eval echo "$as_me:2086: \"$ac_try\"") >&5
2087 (eval $ac_try) 2>&5
2088 ac_status=$?
2089 echo "$as_me:2089: \$? = $ac_status" >&5
2090 (exit "$ac_status"); }; }; then
2091
2092 cf_clang_optok=yes
2093 else
2094 echo "$as_me: failed program was:" >&5
2095 cat "conftest.$ac_ext" >&5
2096
2097 cf_clang_optok=no
2098 fi
2099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2100 echo "$as_me:2100: result: $cf_clang_optok" >&5
2101 echo "${ECHO_T}$cf_clang_optok" >&6
2102 CFLAGS="$cf_save_CFLAGS"
2103 if test "$cf_clang_optok" = yes; then
2104 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2105
2106 echo "${as_me:-configure}:2106: testing adding option $cf_clang_opt ..." 1>&5
2107
2108 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2109 CFLAGS="${CFLAGS}$cf_clang_opt"
2110
2111 fi
2112 done
2113 fi
2114
2115 echo "$as_me:2115: checking for $CC option to accept ANSI C" >&5
2116 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2117 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2118 echo $ECHO_N "(cached) $ECHO_C" >&6
2119 else
2120 ac_cv_prog_cc_stdc=no
2121 ac_save_CC=$CC
2122 cat >"conftest.$ac_ext" <<_ACEOF
2123 #line 2123 "configure"
2124 #include "confdefs.h"
2125 #include <stdarg.h>
2126 #include <stdio.h>
2127 #include <sys/types.h>
2128 #include <sys/stat.h>
2129 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2130 struct buf { int x; };
2131 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2132 static char *e (char **p, int i)
2133 {
2134 return p[i];
2135 }
2136 static char *f (char * (*g) (char **, int), char **p, ...)
2137 {
2138 char *s;
2139 va_list v;
2140 va_start (v,p);
2141 s = g (p, va_arg (v,int));
2142 va_end (v);
2143 return s;
2144 }
2145 int test (int i, double x);
2146 struct s1 {int (*f) (int a);};
2147 struct s2 {int (*f) (double a);};
2148 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2149 int argc;
2150 int
2151 main (void)
2152 {
2153 char *argv[3];
2154 static char first_arg[] = "first";
2155 static char other_arg[] = "other";
2156 argv[0] = first_arg;
2157 argv[1] = other_arg;
2158 argv[2] = NULL;
2159 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2160 ;
2161 return 0;
2162 }
2163 _ACEOF
2164 # Don't try gcc -ansi; that turns off useful extensions and
2165 # breaks some systems' header files.
2166 # AIX -qlanglvl=ansi
2167 # Ultrix and OSF/1 -std1
2168 # HP-UX 10.20 and later -Ae
2169 # HP-UX older versions -Aa -D_HPUX_SOURCE
2170 # SVR4 -Xc -D__EXTENSIONS__
2171 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2172 do
2173 CC="$ac_save_CC $ac_arg"
2174 rm -f "conftest.$ac_objext"
2175 if { (eval echo "$as_me:2175: \"$ac_compile\"") >&5
2176 (eval $ac_compile) 2>&5
2177 ac_status=$?
2178 echo "$as_me:2178: \$? = $ac_status" >&5
2179 (exit "$ac_status"); } &&
2180 { ac_try='test -s "conftest.$ac_objext"'
2181 { (eval echo "$as_me:2181: \"$ac_try\"") >&5
2182 (eval $ac_try) 2>&5
2183 ac_status=$?
2184 echo "$as_me:2184: \$? = $ac_status" >&5
2185 (exit "$ac_status"); }; }; then
2186 ac_cv_prog_cc_stdc=$ac_arg
2187 break
2188 else
2189 echo "$as_me: failed program was:" >&5
2190 cat "conftest.$ac_ext" >&5
2191 fi
2192 rm -f "conftest.$ac_objext"
2193 done
2194 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2195 CC=$ac_save_CC
2196
2197 fi
2198
2199 case "x$ac_cv_prog_cc_stdc" in
2200 x|xno)
2201 echo "$as_me:2201: result: none needed" >&5
2202 echo "${ECHO_T}none needed" >&6 ;;
2203 *)
2204 echo "$as_me:2204: result: $ac_cv_prog_cc_stdc" >&5
2205 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2206 CC="$CC $ac_cv_prog_cc_stdc" ;;
2207 esac
2208
2209 # This should have been defined by AC_PROG_CC
2210 : "${CC:=cc}"
2211
2212 echo "$as_me:2212: checking \$CFLAGS variable" >&5
2213 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2214 case "x$CFLAGS" in
2215 (*-[IUD]*)
2216 echo "$as_me:2216: result: broken" >&5
2217 echo "${ECHO_T}broken" >&6
2218 { echo "$as_me:2218: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2219 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2220 cf_flags="$CFLAGS"
2221 CFLAGS=
2222 for cf_arg in $cf_flags
2223 do
2224
2225 cf_fix_cppflags=no
2226 cf_new_cflags=
2227 cf_new_cppflags=
2228 cf_new_extra_cppflags=
2229
2230 for cf_add_cflags in $cf_arg
2231 do
2232 case "$cf_fix_cppflags" in
2233 (no)
2234 case "$cf_add_cflags" in
2235 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2236 case "$cf_add_cflags" in
2237 (-D*)
2238 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2239
2240 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2241 && test -z "${cf_tst_cflags}" \
2242 && cf_fix_cppflags=yes
2243
2244 if test "$cf_fix_cppflags" = yes ; then
2245
2246 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2247 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2248
2249 continue
2250 elif test "${cf_tst_cflags}" = "\"'" ; then
2251
2252 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2253 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2254
2255 continue
2256 fi
2257 ;;
2258 esac
2259 case "$CPPFLAGS" in
2260 (*$cf_add_cflags)
2261 ;;
2262 (*)
2263 case "$cf_add_cflags" in
2264 (-D*)
2265 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2266
2267 CPPFLAGS=`echo "$CPPFLAGS" | \
2268 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2269 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2270
2271 ;;
2272 esac
2273
2274 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2275 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2276
2277 ;;
2278 esac
2279 ;;
2280 (*)
2281
2282 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2283 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2284
2285 ;;
2286 esac
2287 ;;
2288 (yes)
2289
2290 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2291 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292
2293 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2294
2295 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2296 && test -z "${cf_tst_cflags}" \
2297 && cf_fix_cppflags=no
2298 ;;
2299 esac
2300 done
2301
2302 if test -n "$cf_new_cflags" ; then
2303
2304 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2305 CFLAGS="${CFLAGS}$cf_new_cflags"
2306
2307 fi
2308
2309 if test -n "$cf_new_cppflags" ; then
2310
2311 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2312 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2313
2314 fi
2315
2316 if test -n "$cf_new_extra_cppflags" ; then
2317
2318 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2319 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2320
2321 fi
2322
2323 done
2324 ;;
2325 (*)
2326 echo "$as_me:2326: result: ok" >&5
2327 echo "${ECHO_T}ok" >&6
2328 ;;
2329 esac
2330
2331 echo "$as_me:2331: checking \$CC variable" >&5
2332 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2333 case "$CC" in
2334 (*[\ \ ]-*)
2335 echo "$as_me:2335: result: broken" >&5
2336 echo "${ECHO_T}broken" >&6
2337 { echo "$as_me:2337: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2338 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2339 # humor him...
2340 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2341 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2342 CC="$cf_prog"
2343 for cf_arg in $cf_flags
2344 do
2345 case "x$cf_arg" in
2346 (x-[IUDfgOW]*)
2347
2348 cf_fix_cppflags=no
2349 cf_new_cflags=
2350 cf_new_cppflags=
2351 cf_new_extra_cppflags=
2352
2353 for cf_add_cflags in $cf_arg
2354 do
2355 case "$cf_fix_cppflags" in
2356 (no)
2357 case "$cf_add_cflags" in
2358 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2359 case "$cf_add_cflags" in
2360 (-D*)
2361 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2362
2363 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2364 && test -z "${cf_tst_cflags}" \
2365 && cf_fix_cppflags=yes
2366
2367 if test "$cf_fix_cppflags" = yes ; then
2368
2369 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2370 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2371
2372 continue
2373 elif test "${cf_tst_cflags}" = "\"'" ; then
2374
2375 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2376 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2377
2378 continue
2379 fi
2380 ;;
2381 esac
2382 case "$CPPFLAGS" in
2383 (*$cf_add_cflags)
2384 ;;
2385 (*)
2386 case "$cf_add_cflags" in
2387 (-D*)
2388 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2389
2390 CPPFLAGS=`echo "$CPPFLAGS" | \
2391 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2392 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2393
2394 ;;
2395 esac
2396
2397 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2398 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2399
2400 ;;
2401 esac
2402 ;;
2403 (*)
2404
2405 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2406 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2407
2408 ;;
2409 esac
2410 ;;
2411 (yes)
2412
2413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2415
2416 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2417
2418 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2419 && test -z "${cf_tst_cflags}" \
2420 && cf_fix_cppflags=no
2421 ;;
2422 esac
2423 done
2424
2425 if test -n "$cf_new_cflags" ; then
2426
2427 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2428 CFLAGS="${CFLAGS}$cf_new_cflags"
2429
2430 fi
2431
2432 if test -n "$cf_new_cppflags" ; then
2433
2434 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2435 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2436
2437 fi
2438
2439 if test -n "$cf_new_extra_cppflags" ; then
2440
2441 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2442 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2443
2444 fi
2445
2446 ;;
2447 (*)
2448 CC="$CC $cf_arg"
2449 ;;
2450 esac
2451 done
2452 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2453
2454 echo "${as_me:-configure}:2454: testing resulting CC: '$CC' ..." 1>&5
2455
2456 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2457
2458 echo "${as_me:-configure}:2458: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2459
2460 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2461
2462 echo "${as_me:-configure}:2462: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2463
2464 ;;
2465 (*)
2466 echo "$as_me:2466: result: ok" >&5
2467 echo "${ECHO_T}ok" >&6
2468 ;;
2469 esac
2470
2471 echo "$as_me:2471: checking for inline" >&5
2472 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2473 if test "${ac_cv_c_inline+set}" = set; then
2474 echo $ECHO_N "(cached) $ECHO_C" >&6
2475 else
2476 ac_cv_c_inline=no
2477 for ac_kw in inline __inline__ __inline; do
2478 cat >"conftest.$ac_ext" <<_ACEOF
2479 #line 2479 "configure"
2480 #include "confdefs.h"
2481 #ifndef __cplusplus
2482 static $ac_kw int static_foo (void) {return 0; }
2483 $ac_kw int foo (void) {return 0; }
2484 #endif
2485
2486 _ACEOF
2487 rm -f "conftest.$ac_objext"
2488 if { (eval echo "$as_me:2488: \"$ac_compile\"") >&5
2489 (eval $ac_compile) 2>&5
2490 ac_status=$?
2491 echo "$as_me:2491: \$? = $ac_status" >&5
2492 (exit "$ac_status"); } &&
2493 { ac_try='test -s "conftest.$ac_objext"'
2494 { (eval echo "$as_me:2494: \"$ac_try\"") >&5
2495 (eval $ac_try) 2>&5
2496 ac_status=$?
2497 echo "$as_me:2497: \$? = $ac_status" >&5
2498 (exit "$ac_status"); }; }; then
2499 ac_cv_c_inline=$ac_kw; break
2500 else
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 fi
2504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2505 done
2506
2507 fi
2508 echo "$as_me:2508: result: $ac_cv_c_inline" >&5
2509 echo "${ECHO_T}$ac_cv_c_inline" >&6
2510 case $ac_cv_c_inline in
2511 inline | yes) ;;
2512 no)
2513 cat >>confdefs.h <<\EOF
2514 #define inline
2515 EOF
2516 ;;
2517 *) cat >>confdefs.h <<EOF
2518 #define inline $ac_cv_c_inline
2519 EOF
2520 ;;
2521 esac
2522
2523 for ac_prog in ggrep grep
2524 do
2525 # Extract the first word of "$ac_prog", so it can be a program name with args.
2526 set dummy $ac_prog; ac_word=$2
2527 echo "$as_me:2527: checking for $ac_word" >&5
2528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2529 if test "${ac_cv_prog_GREP+set}" = set; then
2530 echo $ECHO_N "(cached) $ECHO_C" >&6
2531 else
2532 if test -n "$GREP"; then
2533 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2534 else
2535 ac_save_IFS=$IFS; IFS=$ac_path_separator
2536 ac_dummy="$PATH"
2537 for ac_dir in $ac_dummy; do
2538 IFS=$ac_save_IFS
2539 test -z "$ac_dir" && ac_dir=.
2540 $as_executable_p "$ac_dir/$ac_word" || continue
2541 ac_cv_prog_GREP="$ac_prog"
2542 echo "$as_me:2542: found $ac_dir/$ac_word" >&5
2543 break
2544 done
2545
2546 fi
2547 fi
2548 GREP=$ac_cv_prog_GREP
2549 if test -n "$GREP"; then
2550 echo "$as_me:2550: result: $GREP" >&5
2551 echo "${ECHO_T}$GREP" >&6
2552 else
2553 echo "$as_me:2553: result: no" >&5
2554 echo "${ECHO_T}no" >&6
2555 fi
2556
2557 test -n "$GREP" && break
2558 done
2559 test -n "$GREP" || GREP=": "
2560
2561 echo "$as_me:2561: checking for egrep" >&5
2562 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2563 if test "${ac_cv_path_EGREP+set}" = set; then
2564 echo $ECHO_N "(cached) $ECHO_C" >&6
2565 else
2566 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2567 then ac_cv_path_EGREP="$GREP -E"
2568 else
2569 for ac_prog in gegrep egrep
2570 do
2571 # Extract the first word of "$ac_prog", so it can be a program name with args.
2572 set dummy $ac_prog; ac_word=$2
2573 echo "$as_me:2573: checking for $ac_word" >&5
2574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2575 if test "${ac_cv_path_EGREP+set}" = set; then
2576 echo $ECHO_N "(cached) $ECHO_C" >&6
2577 else
2578 case $EGREP in
2579 [\\/]* | ?:[\\/]*)
2580 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2581 ;;
2582 *)
2583 ac_save_IFS=$IFS; IFS=$ac_path_separator
2584 ac_dummy="$PATH"
2585 for ac_dir in $ac_dummy; do
2586 IFS=$ac_save_IFS
2587 test -z "$ac_dir" && ac_dir=.
2588 if $as_executable_p "$ac_dir/$ac_word"; then
2589 ac_cv_path_EGREP="$ac_dir/$ac_word"
2590 echo "$as_me:2590: found $ac_dir/$ac_word" >&5
2591 break
2592 fi
2593 done
2594
2595 ;;
2596 esac
2597 fi
2598 EGREP=$ac_cv_path_EGREP
2599
2600 if test -n "$EGREP"; then
2601 echo "$as_me:2601: result: $EGREP" >&5
2602 echo "${ECHO_T}$EGREP" >&6
2603 else
2604 echo "$as_me:2604: result: no" >&5
2605 echo "${ECHO_T}no" >&6
2606 fi
2607
2608 test -n "$EGREP" && break
2609 done
2610 test -n "$EGREP" || EGREP=": "
2611
2612 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2612: error: cannot find workable egrep" >&5
2613 echo "$as_me: error: cannot find workable egrep" >&2;}
2614 { (exit 1); exit 1; }; }
2615 fi
2616 fi
2617 echo "$as_me:2617: result: $ac_cv_path_EGREP" >&5
2618 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2619 EGREP="$ac_cv_path_EGREP"
2620
2621 ac_ext=c
2622 ac_cpp='$CPP $CPPFLAGS'
2623 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2624 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2625 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2626 ac_main_return="return"
2627 echo "$as_me:2627: checking how to run the C preprocessor" >&5
2628 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2629 # On Suns, sometimes $CPP names a directory.
2630 if test -n "$CPP" && test -d "$CPP"; then
2631 CPP=
2632 fi
2633 if test -z "$CPP"; then
2634 if test "${ac_cv_prog_CPP+set}" = set; then
2635 echo $ECHO_N "(cached) $ECHO_C" >&6
2636 else
2637 # Double quotes because CPP needs to be expanded
2638 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2639 do
2640 ac_preproc_ok=false
2641 for ac_c_preproc_warn_flag in '' yes
2642 do
2643 # Use a header file that comes with gcc, so configuring glibc
2644 # with a fresh cross-compiler works.
2645 # On the NeXT, cc -E runs the code through the compiler's parser,
2646 # not just through cpp. "Syntax error" is here to catch this case.
2647 cat >"conftest.$ac_ext" <<_ACEOF
2648 #line 2648 "configure"
2649 #include "confdefs.h"
2650 #include <assert.h>
2651 Syntax error
2652 _ACEOF
2653 if { (eval echo "$as_me:2653: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2654 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2655 ac_status=$?
2656 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2657 rm -f conftest.er1
2658 cat conftest.err >&5
2659 echo "$as_me:2659: \$? = $ac_status" >&5
2660 (exit "$ac_status"); } >/dev/null; then
2661 if test -s conftest.err; then
2662 ac_cpp_err=$ac_c_preproc_warn_flag
2663 else
2664 ac_cpp_err=
2665 fi
2666 else
2667 ac_cpp_err=yes
2668 fi
2669 if test -z "$ac_cpp_err"; then
2670 :
2671 else
2672 echo "$as_me: failed program was:" >&5
2673 cat "conftest.$ac_ext" >&5
2674 # Broken: fails on valid input.
2675 continue
2676 fi
2677 rm -f conftest.err "conftest.$ac_ext"
2678
2679 # OK, works on sane cases. Now check whether non-existent headers
2680 # can be detected and how.
2681 cat >"conftest.$ac_ext" <<_ACEOF
2682 #line 2682 "configure"
2683 #include "confdefs.h"
2684 #include <ac_nonexistent.h>
2685 _ACEOF
2686 if { (eval echo "$as_me:2686: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2687 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2688 ac_status=$?
2689 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2690 rm -f conftest.er1
2691 cat conftest.err >&5
2692 echo "$as_me:2692: \$? = $ac_status" >&5
2693 (exit "$ac_status"); } >/dev/null; then
2694 if test -s conftest.err; then
2695 ac_cpp_err=$ac_c_preproc_warn_flag
2696 else
2697 ac_cpp_err=
2698 fi
2699 else
2700 ac_cpp_err=yes
2701 fi
2702 if test -z "$ac_cpp_err"; then
2703 # Broken: success on invalid input.
2704 continue
2705 else
2706 echo "$as_me: failed program was:" >&5
2707 cat "conftest.$ac_ext" >&5
2708 # Passes both tests.
2709 ac_preproc_ok=:
2710 break
2711 fi
2712 rm -f conftest.err "conftest.$ac_ext"
2713
2714 done
2715 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2716 rm -f conftest.err "conftest.$ac_ext"
2717 if $ac_preproc_ok; then
2718 break
2719 fi
2720
2721 done
2722 ac_cv_prog_CPP=$CPP
2723
2724 fi
2725 CPP=$ac_cv_prog_CPP
2726 else
2727 ac_cv_prog_CPP=$CPP
2728 fi
2729 echo "$as_me:2729: result: $CPP" >&5
2730 echo "${ECHO_T}$CPP" >&6
2731 ac_preproc_ok=false
2732 for ac_c_preproc_warn_flag in '' yes
2733 do
2734 # Use a header file that comes with gcc, so configuring glibc
2735 # with a fresh cross-compiler works.
2736 # On the NeXT, cc -E runs the code through the compiler's parser,
2737 # not just through cpp. "Syntax error" is here to catch this case.
2738 cat >"conftest.$ac_ext" <<_ACEOF
2739 #line 2739 "configure"
2740 #include "confdefs.h"
2741 #include <assert.h>
2742 Syntax error
2743 _ACEOF
2744 if { (eval echo "$as_me:2744: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2745 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2746 ac_status=$?
2747 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2748 rm -f conftest.er1
2749 cat conftest.err >&5
2750 echo "$as_me:2750: \$? = $ac_status" >&5
2751 (exit "$ac_status"); } >/dev/null; then
2752 if test -s conftest.err; then
2753 ac_cpp_err=$ac_c_preproc_warn_flag
2754 else
2755 ac_cpp_err=
2756 fi
2757 else
2758 ac_cpp_err=yes
2759 fi
2760 if test -z "$ac_cpp_err"; then
2761 :
2762 else
2763 echo "$as_me: failed program was:" >&5
2764 cat "conftest.$ac_ext" >&5
2765 # Broken: fails on valid input.
2766 continue
2767 fi
2768 rm -f conftest.err "conftest.$ac_ext"
2769
2770 # OK, works on sane cases. Now check whether non-existent headers
2771 # can be detected and how.
2772 cat >"conftest.$ac_ext" <<_ACEOF
2773 #line 2773 "configure"
2774 #include "confdefs.h"
2775 #include <ac_nonexistent.h>
2776 _ACEOF
2777 if { (eval echo "$as_me:2777: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2778 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2779 ac_status=$?
2780 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2781 rm -f conftest.er1
2782 cat conftest.err >&5
2783 echo "$as_me:2783: \$? = $ac_status" >&5
2784 (exit "$ac_status"); } >/dev/null; then
2785 if test -s conftest.err; then
2786 ac_cpp_err=$ac_c_preproc_warn_flag
2787 else
2788 ac_cpp_err=
2789 fi
2790 else
2791 ac_cpp_err=yes
2792 fi
2793 if test -z "$ac_cpp_err"; then
2794 # Broken: success on invalid input.
2795 continue
2796 else
2797 echo "$as_me: failed program was:" >&5
2798 cat "conftest.$ac_ext" >&5
2799 # Passes both tests.
2800 ac_preproc_ok=:
2801 break
2802 fi
2803 rm -f conftest.err "conftest.$ac_ext"
2804
2805 done
2806 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2807 rm -f conftest.err "conftest.$ac_ext"
2808 if $ac_preproc_ok; then
2809 :
2810 else
2811 { { echo "$as_me:2811: error: C preprocessor \"$CPP\" fails sanity check" >&5
2812 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2813 { (exit 1); exit 1; }; }
2814 fi
2815
2816 ac_ext=c
2817 ac_cpp='$CPP $CPPFLAGS'
2818 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2819 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2820 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2821 ac_main_return="return"
2822
2823 for ac_prog in mawk gawk nawk awk
2824 do
2825 # Extract the first word of "$ac_prog", so it can be a program name with args.
2826 set dummy $ac_prog; ac_word=$2
2827 echo "$as_me:2827: checking for $ac_word" >&5
2828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2829 if test "${ac_cv_prog_AWK+set}" = set; then
2830 echo $ECHO_N "(cached) $ECHO_C" >&6
2831 else
2832 if test -n "$AWK"; then
2833 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2834 else
2835 ac_save_IFS=$IFS; IFS=$ac_path_separator
2836 ac_dummy="$PATH"
2837 for ac_dir in $ac_dummy; do
2838 IFS=$ac_save_IFS
2839 test -z "$ac_dir" && ac_dir=.
2840 $as_executable_p "$ac_dir/$ac_word" || continue
2841 ac_cv_prog_AWK="$ac_prog"
2842 echo "$as_me:2842: found $ac_dir/$ac_word" >&5
2843 break
2844 done
2845
2846 fi
2847 fi
2848 AWK=$ac_cv_prog_AWK
2849 if test -n "$AWK"; then
2850 echo "$as_me:2850: result: $AWK" >&5
2851 echo "${ECHO_T}$AWK" >&6
2852 else
2853 echo "$as_me:2853: result: no" >&5
2854 echo "${ECHO_T}no" >&6
2855 fi
2856
2857 test -n "$AWK" && break
2858 done
2859
2860 case "$cf_cv_system_name" in
2861 (cygwin*|msys*|mingw32*|mingw64|os2*)
2862 GLOB_FULLPATH_POSIX='/*'
2863 GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
2864 ;;
2865 (*)
2866 GLOB_FULLPATH_POSIX='/*'
2867 GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
2868 ;;
2869 esac
2870
2871 # Find a good install program. We prefer a C program (faster),
2872 # so one script is as good as another. But avoid the broken or
2873 # incompatible versions:
2874 # SysV /etc/install, /usr/sbin/install
2875 # SunOS /usr/etc/install
2876 # IRIX /sbin/install
2877 # AIX /bin/install
2878 # AmigaOS /C/install, which installs bootblocks on floppy discs
2879 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2880 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2881 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2882 # ./install, which can be erroneously created by make from ./install.sh.
2883 echo "$as_me:2883: checking for a BSD compatible install" >&5
2884 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2885 if test -z "$INSTALL"; then
2886 if test "${ac_cv_path_install+set}" = set; then
2887 echo $ECHO_N "(cached) $ECHO_C" >&6
2888 else
2889 ac_save_IFS=$IFS; IFS=$ac_path_separator
2890 for ac_dir in $PATH; do
2891 IFS=$ac_save_IFS
2892 # Account for people who put trailing slashes in PATH elements.
2893 case $ac_dir/ in
2894 / | ./ | .// | /cC/* \
2895 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2896 | /usr/ucb/* ) ;;
2897 *)
2898 # OSF1 and SCO ODT 3.0 have their own names for install.
2899 # Don't use installbsd from OSF since it installs stuff as root
2900 # by default.
2901 for ac_prog in ginstall scoinst install; do
2902 if $as_executable_p "$ac_dir/$ac_prog"; then
2903 if test $ac_prog = install &&
2904 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2905 # AIX install. It has an incompatible calling convention.
2906 :
2907 elif test $ac_prog = install &&
2908 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2909 # program-specific install script used by HP pwplus--don't use.
2910 :
2911 else
2912 ac_cv_path_install="$ac_dir/$ac_prog -c"
2913 break 2
2914 fi
2915 fi
2916 done
2917 ;;
2918 esac
2919 done
2920
2921 fi
2922 if test "${ac_cv_path_install+set}" = set; then
2923 INSTALL=$ac_cv_path_install
2924 else
2925 # As a last resort, use the slow shell script. We don't cache a
2926 # path for INSTALL within a source directory, because that will
2927 # break other packages using the cache if that directory is
2928 # removed, or if the path is relative.
2929 INSTALL=$ac_install_sh
2930 fi
2931 fi
2932 echo "$as_me:2932: result: $INSTALL" >&5
2933 echo "${ECHO_T}$INSTALL" >&6
2934
2935 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2936 # It thinks the first close brace ends the variable substitution.
2937 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2938
2939 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2940
2941 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2942
2943 if test "x$INSTALL" = "x./install-sh -c"; then
2944 if test -f /usr/sbin/install ; then
2945 case "$host_os" in
2946 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
2947 INSTALL=/usr/sbin/install
2948 ;;
2949 esac
2950 fi
2951 fi
2952 case x$INSTALL in
2953 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
2954 ;;
2955 (*)
2956 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2957 test -z "$cf_dir" && cf_dir=.
2958 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2959 ;;
2960 esac
2961
2962 echo "$as_me:2962: checking if you want to install stripped executables" >&5
2963 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2964
2965 # Check whether --enable-stripping or --disable-stripping was given.
2966 if test "${enable_stripping+set}" = set; then
2967 enableval="$enable_stripping"
2968 test "$enableval" != no && enableval=yes
2969 if test "$enableval" != "yes" ; then
2970 enable_stripping=no
2971 else
2972 enable_stripping=yes
2973 fi
2974 else
2975 enableval=yes
2976 enable_stripping=yes
2977
2978 fi;
2979 echo "$as_me:2979: result: $enable_stripping" >&5
2980 echo "${ECHO_T}$enable_stripping" >&6
2981
2982 if test "$enable_stripping" = yes
2983 then
2984 INSTALL_OPT_S="-s"
2985 else
2986 INSTALL_OPT_S=
2987 fi
2988
2989 : "${INSTALL:=install}"
2990 echo "$as_me:2990: checking if install accepts -p option" >&5
2991 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2992 if test "${cf_cv_install_p+set}" = set; then
2993 echo $ECHO_N "(cached) $ECHO_C" >&6
2994 else
2995
2996 rm -rf ./conftest*
2997 date >conftest.in
2998 mkdir conftest.out
2999 sleep 3
3000 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3001 then
3002 if test -f conftest.out/conftest.in
3003 then
3004 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3005 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3006 if test -s conftest.err
3007 then
3008 cf_cv_install_p=no
3009 else
3010 cf_cv_install_p=yes
3011 fi
3012 else
3013 cf_cv_install_p=no
3014 fi
3015 else
3016 cf_cv_install_p=no
3017 fi
3018 rm -rf ./conftest*
3019
3020 fi
3021 echo "$as_me:3021: result: $cf_cv_install_p" >&5
3022 echo "${ECHO_T}$cf_cv_install_p" >&6
3023
3024 echo "$as_me:3024: checking if install needs to be told about ownership" >&5
3025 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3026 case `$ac_config_guess` in
3027 (*minix)
3028 with_install_o=yes
3029 ;;
3030 (*)
3031 with_install_o=no
3032 ;;
3033 esac
3034
3035 echo "$as_me:3035: result: $with_install_o" >&5
3036 echo "${ECHO_T}$with_install_o" >&6
3037 if test "x$with_install_o" = xyes
3038 then
3039 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3040 else
3041 INSTALL_OPT_O=
3042 fi
3043
3044 if test -n "$INSTALL_OPT_S"
3045 then
3046 echo "$as_me:3046: checking if you want to specify strip-program" >&5
3047 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
3048
3049 # Check whether --with-strip-program or --without-strip-program was given.
3050 if test "${with_strip_program+set}" = set; then
3051 withval="$with_strip_program"
3052 with_strip_program=$withval
3053 else
3054 with_strip_program=no
3055 fi;
3056 echo "$as_me:3056: result: $with_strip_program" >&5
3057 echo "${ECHO_T}$with_strip_program" >&6
3058 if test "$with_strip_program" != no
3059 then
3060 echo "$as_me:3060: checking if strip-program is supported with this installer" >&5
3061 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
3062 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
3063 check_install_strip=no
3064 if test -f "$cf_install_program"
3065 then
3066 check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
3067 if test -n "$check_install_version"
3068 then
3069 check_install_strip="option"
3070 else
3071 for check_strip_variable in STRIPBIN STRIP
3072 do
3073 if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
3074 then
3075 check_install_strip="environ"
3076 break
3077 fi
3078 done
3079 fi
3080 fi
3081 echo "$as_me:3081: result: $check_install_strip" >&5
3082 echo "${ECHO_T}$check_install_strip" >&6
3083 case "$check_install_strip" in
3084 (no)
3085 { echo "$as_me:3085: WARNING: $cf_install_program does not support strip program option" >&5
3086 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
3087 with_strip_program=no
3088 ;;
3089 (environ)
3090 cat >install.tmp <<-CF_EOF
3091 #! $SHELL
3092 STRIPBIN="$with_strip_program" \\
3093 STRIP="$with_strip_program" \\
3094 $INSTALL "$@"
3095 CF_EOF
3096 INSTALL="`pwd`/install.tmp"
3097 chmod +x "$INSTALL"
3098 test -n "$verbose" && echo " created $INSTALL" 1>&6
3099
3100 echo "${as_me:-configure}:3100: testing created $INSTALL ..." 1>&5
3101
3102 ;;
3103 (option)
3104 INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
3105 ;;
3106 esac
3107 fi
3108 fi
3109
3110 for ac_prog in lint cppcheck splint
3111 do
3112 # Extract the first word of "$ac_prog", so it can be a program name with args.
3113 set dummy $ac_prog; ac_word=$2
3114 echo "$as_me:3114: checking for $ac_word" >&5
3115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3116 if test "${ac_cv_prog_LINT+set}" = set; then
3117 echo $ECHO_N "(cached) $ECHO_C" >&6
3118 else
3119 if test -n "$LINT"; then
3120 ac_cv_prog_LINT="$LINT" # Let the user override the test.
3121 else
3122 ac_save_IFS=$IFS; IFS=$ac_path_separator
3123 ac_dummy="$PATH"
3124 for ac_dir in $ac_dummy; do
3125 IFS=$ac_save_IFS
3126 test -z "$ac_dir" && ac_dir=.
3127 $as_executable_p "$ac_dir/$ac_word" || continue
3128 ac_cv_prog_LINT="$ac_prog"
3129 echo "$as_me:3129: found $ac_dir/$ac_word" >&5
3130 break
3131 done
3132
3133 fi
3134 fi
3135 LINT=$ac_cv_prog_LINT
3136 if test -n "$LINT"; then
3137 echo "$as_me:3137: result: $LINT" >&5
3138 echo "${ECHO_T}$LINT" >&6
3139 else
3140 echo "$as_me:3140: result: no" >&5
3141 echo "${ECHO_T}no" >&6
3142 fi
3143
3144 test -n "$LINT" && break
3145 done
3146
3147 case "x$LINT" in
3148 (xlint|x*/lint) # NetBSD 10
3149 test -z "$LINT_OPTS" && LINT_OPTS="-chapbrxzgFS -v -Ac11"
3150 ;;
3151 (xcppcheck|x*/cppcheck)
3152 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all -D__CPPCHECK__"
3153 ;;
3154 esac
3155
3156 echo "$as_me:3156: checking for \".PHONY\" make-support" >&5
3157 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3158 if test "${cf_cv_make_PHONY+set}" = set; then
3159 echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161
3162 rm -rf conftest*
3163 (
3164 mkdir conftest || exit 1
3165 cd conftest
3166 cat >makefile <<'CF_EOF'
3167 .PHONY: always
3168 DATA=0
3169 always: always.out
3170 @echo "** making $@ $(DATA)"
3171 once: once.out
3172 @echo "** making $@ $(DATA)"
3173 always.out:
3174 @echo "** making $@ $(DATA)"
3175 echo $(DATA) > $@
3176 once.out:
3177 @echo "** making $@ $(DATA)"
3178 echo $(DATA) > $@
3179 CF_EOF
3180 for cf_data in 1 2 3
3181 do
3182 ${MAKE:-make} always DATA=$cf_data
3183 ${MAKE:-make} once DATA=$cf_data
3184 ${MAKE:-make} -t always once
3185 if test -f always ; then
3186 echo "no (case 1)" > ../conftest.tmp
3187 elif test ! -f always.out ; then
3188 echo "no (case 2)" > ../conftest.tmp
3189 elif test ! -f once.out ; then
3190 echo "no (case 3)" > ../conftest.tmp
3191 elif ! cmp -s always.out once.out ; then
3192 echo "no (case 4)" > ../conftest.tmp
3193 diff always.out once.out
3194 else
3195 cf_check="`cat always.out`"
3196 if test "x$cf_check" != "x$cf_data" ; then
3197 echo "no (case 5)" > ../conftest.tmp
3198 else
3199 echo yes > ../conftest.tmp
3200 rm -f ./*.out
3201 continue
3202 fi
3203 fi
3204 break
3205 done
3206 ) >&5 2>&1
3207 cf_cv_make_PHONY="`cat conftest.tmp`"
3208 rm -rf conftest*
3209
3210 fi
3211 echo "$as_me:3211: result: $cf_cv_make_PHONY" >&5
3212 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3213 MAKE_NO_PHONY="#"
3214 MAKE_PHONY="#"
3215 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3216 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3217
3218 echo "$as_me:3218: checking if filesystem supports mixed-case filenames" >&5
3219 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3220 if test "${cf_cv_mixedcase+set}" = set; then
3221 echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223
3224 if test "$cross_compiling" = yes ; then
3225 case "$target_alias" in
3226 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3227 cf_cv_mixedcase=no
3228 ;;
3229 (*)
3230 cf_cv_mixedcase=yes
3231 ;;
3232 esac
3233 else
3234 rm -f conftest CONFTEST
3235 echo test >conftest
3236 if test -f CONFTEST ; then
3237 cf_cv_mixedcase=no
3238 else
3239 cf_cv_mixedcase=yes
3240 fi
3241 rm -f conftest CONFTEST
3242 fi
3243
3244 fi
3245 echo "$as_me:3245: result: $cf_cv_mixedcase" >&5
3246 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3247 test "$cf_cv_mixedcase" = yes &&
3248 cat >>confdefs.h <<\EOF
3249 #define MIXEDCASE_FILENAMES 1
3250 EOF
3251
3252 for ac_prog in exctags ctags
3253 do
3254 # Extract the first word of "$ac_prog", so it can be a program name with args.
3255 set dummy $ac_prog; ac_word=$2
3256 echo "$as_me:3256: checking for $ac_word" >&5
3257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3258 if test "${ac_cv_prog_CTAGS+set}" = set; then
3259 echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261 if test -n "$CTAGS"; then
3262 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3263 else
3264 ac_save_IFS=$IFS; IFS=$ac_path_separator
3265 ac_dummy="$PATH"
3266 for ac_dir in $ac_dummy; do
3267 IFS=$ac_save_IFS
3268 test -z "$ac_dir" && ac_dir=.
3269 $as_executable_p "$ac_dir/$ac_word" || continue
3270 ac_cv_prog_CTAGS="$ac_prog"
3271 echo "$as_me:3271: found $ac_dir/$ac_word" >&5
3272 break
3273 done
3274
3275 fi
3276 fi
3277 CTAGS=$ac_cv_prog_CTAGS
3278 if test -n "$CTAGS"; then
3279 echo "$as_me:3279: result: $CTAGS" >&5
3280 echo "${ECHO_T}$CTAGS" >&6
3281 else
3282 echo "$as_me:3282: result: no" >&5
3283 echo "${ECHO_T}no" >&6
3284 fi
3285
3286 test -n "$CTAGS" && break
3287 done
3288
3289 for ac_prog in exetags etags
3290 do
3291 # Extract the first word of "$ac_prog", so it can be a program name with args.
3292 set dummy $ac_prog; ac_word=$2
3293 echo "$as_me:3293: checking for $ac_word" >&5
3294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3295 if test "${ac_cv_prog_ETAGS+set}" = set; then
3296 echo $ECHO_N "(cached) $ECHO_C" >&6
3297 else
3298 if test -n "$ETAGS"; then
3299 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3300 else
3301 ac_save_IFS=$IFS; IFS=$ac_path_separator
3302 ac_dummy="$PATH"
3303 for ac_dir in $ac_dummy; do
3304 IFS=$ac_save_IFS
3305 test -z "$ac_dir" && ac_dir=.
3306 $as_executable_p "$ac_dir/$ac_word" || continue
3307 ac_cv_prog_ETAGS="$ac_prog"
3308 echo "$as_me:3308: found $ac_dir/$ac_word" >&5
3309 break
3310 done
3311
3312 fi
3313 fi
3314 ETAGS=$ac_cv_prog_ETAGS
3315 if test -n "$ETAGS"; then
3316 echo "$as_me:3316: result: $ETAGS" >&5
3317 echo "${ECHO_T}$ETAGS" >&6
3318 else
3319 echo "$as_me:3319: result: no" >&5
3320 echo "${ECHO_T}no" >&6
3321 fi
3322
3323 test -n "$ETAGS" && break
3324 done
3325
3326 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3327 set dummy ${CTAGS:-ctags}; ac_word=$2
3328 echo "$as_me:3328: checking for $ac_word" >&5
3329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3330 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3331 echo $ECHO_N "(cached) $ECHO_C" >&6
3332 else
3333 if test -n "$MAKE_LOWER_TAGS"; then
3334 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3335 else
3336 ac_save_IFS=$IFS; IFS=$ac_path_separator
3337 ac_dummy="$PATH"
3338 for ac_dir in $ac_dummy; do
3339 IFS=$ac_save_IFS
3340 test -z "$ac_dir" && ac_dir=.
3341 $as_executable_p "$ac_dir/$ac_word" || continue
3342 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3343 echo "$as_me:3343: found $ac_dir/$ac_word" >&5
3344 break
3345 done
3346
3347 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3348 fi
3349 fi
3350 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3351 if test -n "$MAKE_LOWER_TAGS"; then
3352 echo "$as_me:3352: result: $MAKE_LOWER_TAGS" >&5
3353 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3354 else
3355 echo "$as_me:3355: result: no" >&5
3356 echo "${ECHO_T}no" >&6
3357 fi
3358
3359 if test "$cf_cv_mixedcase" = yes ; then
3360 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3361 set dummy ${ETAGS:-etags}; ac_word=$2
3362 echo "$as_me:3362: checking for $ac_word" >&5
3363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3364 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3365 echo $ECHO_N "(cached) $ECHO_C" >&6
3366 else
3367 if test -n "$MAKE_UPPER_TAGS"; then
3368 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3369 else
3370 ac_save_IFS=$IFS; IFS=$ac_path_separator
3371 ac_dummy="$PATH"
3372 for ac_dir in $ac_dummy; do
3373 IFS=$ac_save_IFS
3374 test -z "$ac_dir" && ac_dir=.
3375 $as_executable_p "$ac_dir/$ac_word" || continue
3376 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3377 echo "$as_me:3377: found $ac_dir/$ac_word" >&5
3378 break
3379 done
3380
3381 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3382 fi
3383 fi
3384 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3385 if test -n "$MAKE_UPPER_TAGS"; then
3386 echo "$as_me:3386: result: $MAKE_UPPER_TAGS" >&5
3387 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3388 else
3389 echo "$as_me:3389: result: no" >&5
3390 echo "${ECHO_T}no" >&6
3391 fi
3392
3393 else
3394 MAKE_UPPER_TAGS=no
3395 fi
3396
3397 if test "$MAKE_UPPER_TAGS" = yes ; then
3398 MAKE_UPPER_TAGS=
3399 else
3400 MAKE_UPPER_TAGS="#"
3401 fi
3402
3403 if test "$MAKE_LOWER_TAGS" = yes ; then
3404 MAKE_LOWER_TAGS=
3405 else
3406 MAKE_LOWER_TAGS="#"
3407 fi
3408
3409 echo "$as_me:3409: checking if -lm needed for math functions" >&5
3410 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3411 if test "${cf_cv_need_libm+set}" = set; then
3412 echo $ECHO_N "(cached) $ECHO_C" >&6
3413 else
3414
3415 cat >"conftest.$ac_ext" <<_ACEOF
3416 #line 3416 "configure"
3417 #include "confdefs.h"
3418
3419 #include <stdio.h>
3420 #include <stdlib.h>
3421 #include <math.h>
3422
3423 int
3424 main (void)
3425 {
3426 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3427 ;
3428 return 0;
3429 }
3430 _ACEOF
3431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3432 if { (eval echo "$as_me:3432: \"$ac_link\"") >&5
3433 (eval $ac_link) 2>&5
3434 ac_status=$?
3435 echo "$as_me:3435: \$? = $ac_status" >&5
3436 (exit "$ac_status"); } &&
3437 { ac_try='test -s "conftest$ac_exeext"'
3438 { (eval echo "$as_me:3438: \"$ac_try\"") >&5
3439 (eval $ac_try) 2>&5
3440 ac_status=$?
3441 echo "$as_me:3441: \$? = $ac_status" >&5
3442 (exit "$ac_status"); }; }; then
3443 cf_cv_need_libm=no
3444 else
3445 echo "$as_me: failed program was:" >&5
3446 cat "conftest.$ac_ext" >&5
3447 cf_cv_need_libm=yes
3448 fi
3449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3450 fi
3451 echo "$as_me:3451: result: $cf_cv_need_libm" >&5
3452 echo "${ECHO_T}$cf_cv_need_libm" >&6
3453
3454 if test "$cf_cv_need_libm" = yes
3455 then
3456
3457 cf_save_LIBS="$LIBS"
3458 LIBS="$LIBS -lm"
3459 echo "$as_me:3459: checking if -lm is available for math functions" >&5
3460 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
3461 if test "${cf_cv_have_libm+set}" = set; then
3462 echo $ECHO_N "(cached) $ECHO_C" >&6
3463 else
3464
3465 cat >"conftest.$ac_ext" <<_ACEOF
3466 #line 3466 "configure"
3467 #include "confdefs.h"
3468
3469 #include <stdio.h>
3470 #include <stdlib.h>
3471 #include <math.h>
3472
3473 int
3474 main (void)
3475 {
3476 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3477 ;
3478 return 0;
3479 }
3480 _ACEOF
3481 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3482 if { (eval echo "$as_me:3482: \"$ac_link\"") >&5
3483 (eval $ac_link) 2>&5
3484 ac_status=$?
3485 echo "$as_me:3485: \$? = $ac_status" >&5
3486 (exit "$ac_status"); } &&
3487 { ac_try='test -s "conftest$ac_exeext"'
3488 { (eval echo "$as_me:3488: \"$ac_try\"") >&5
3489 (eval $ac_try) 2>&5
3490 ac_status=$?
3491 echo "$as_me:3491: \$? = $ac_status" >&5
3492 (exit "$ac_status"); }; }; then
3493 cf_cv_have_libm=yes
3494 else
3495 echo "$as_me: failed program was:" >&5
3496 cat "conftest.$ac_ext" >&5
3497 cf_cv_have_libm=no
3498 fi
3499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3500 fi
3501 echo "$as_me:3501: result: $cf_cv_have_libm" >&5
3502 echo "${ECHO_T}$cf_cv_have_libm" >&6
3503 LIBS="$cf_save_LIBS"
3504
3505 if test "$cf_cv_have_libm" = yes
3506 then
3507 MATH_LIB=-lm
3508 fi
3509 else
3510 cf_cv_have_libm=yes
3511 fi
3512
3513 if test "$cf_cv_have_libm" = yes
3514 then
3515
3516 cat >>confdefs.h <<\EOF
3517 #define HAVE_MATH_FUNCS 1
3518 EOF
3519
3520 fi
3521
3522 top_builddir=`pwd`
3523
3524 CC_G_OPT="-g"
3525 CC_SHARED_OPTS=unknown
3526 CPPFLAGS="$CPPFLAGS"
3527 DFT_DEP_SUFFIX=""
3528 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3529 DFT_UPR_MODEL="NORMAL"
3530 LD="ld"
3531 LDFLAGS_SHARED=""
3532 LDFLAGS_STATIC=""
3533 LD_MODEL=""
3534 LD_SHARED_OPTS=""
3535 LIBTOOL=""
3536 LIBTOOL_OPTS=""
3537 LIB_CLEAN=""
3538 LIB_COMPILE=""
3539 LIB_LINK='${CC}'
3540 LINK_TESTS=""
3541 LOCAL_LDFLAGS=""
3542 PACKAGE="ncurses-examples"
3543 PTHREAD="-lm"
3544 TEST_ARGS=""
3545 TEST_DEPS=""
3546 TEST_LIBS=""
3547 TINFO_LDFLAGS=''
3548 TINFO_LIBS='$(LIBS_CURSES)'
3549 cf_cv_abi_version=""
3550 cf_cv_rel_version=""
3551 includesubdir=""
3552
3553 cf_cv_screen=curses
3554 cf_cv_libtype=
3555
3556 echo "$as_me:3556: checking for fgrep" >&5
3557 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3558 if test "${ac_cv_path_FGREP+set}" = set; then
3559 echo $ECHO_N "(cached) $ECHO_C" >&6
3560 else
3561 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3562 then ac_cv_path_FGREP="$GREP -F"
3563 else
3564 for ac_prog in gfgrep fgrep
3565 do
3566 # Extract the first word of "$ac_prog", so it can be a program name with args.
3567 set dummy $ac_prog; ac_word=$2
3568 echo "$as_me:3568: checking for $ac_word" >&5
3569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3570 if test "${ac_cv_path_FGREP+set}" = set; then
3571 echo $ECHO_N "(cached) $ECHO_C" >&6
3572 else
3573 case $FGREP in
3574 [\\/]* | ?:[\\/]*)
3575 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3576 ;;
3577 *)
3578 ac_save_IFS=$IFS; IFS=$ac_path_separator
3579 ac_dummy="$PATH"
3580 for ac_dir in $ac_dummy; do
3581 IFS=$ac_save_IFS
3582 test -z "$ac_dir" && ac_dir=.
3583 if $as_executable_p "$ac_dir/$ac_word"; then
3584 ac_cv_path_FGREP="$ac_dir/$ac_word"
3585 echo "$as_me:3585: found $ac_dir/$ac_word" >&5
3586 break
3587 fi
3588 done
3589
3590 ;;
3591 esac
3592 fi
3593 FGREP=$ac_cv_path_FGREP
3594
3595 if test -n "$FGREP"; then
3596 echo "$as_me:3596: result: $FGREP" >&5
3597 echo "${ECHO_T}$FGREP" >&6
3598 else
3599 echo "$as_me:3599: result: no" >&5
3600 echo "${ECHO_T}no" >&6
3601 fi
3602
3603 test -n "$FGREP" && break
3604 done
3605 test -n "$FGREP" || FGREP=": "
3606
3607 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3607: error: cannot find workable fgrep" >&5
3608 echo "$as_me: error: cannot find workable fgrep" >&2;}
3609 { (exit 1); exit 1; }; }
3610 fi
3611 fi
3612 echo "$as_me:3612: result: $ac_cv_path_FGREP" >&5
3613 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3614 FGREP="$ac_cv_path_FGREP"
3615
3616 echo "$as_me:3616: checking if you want to use C11 _Noreturn feature" >&5
3617 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3618
3619 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3620 if test "${enable_stdnoreturn+set}" = set; then
3621 enableval="$enable_stdnoreturn"
3622 test "$enableval" != yes && enableval=no
3623 if test "$enableval" != "no" ; then
3624 enable_stdnoreturn=yes
3625 else
3626 enable_stdnoreturn=no
3627 fi
3628 else
3629 enableval=no
3630 enable_stdnoreturn=no
3631
3632 fi;
3633 echo "$as_me:3633: result: $enable_stdnoreturn" >&5
3634 echo "${ECHO_T}$enable_stdnoreturn" >&6
3635
3636 if test $enable_stdnoreturn = yes; then
3637 echo "$as_me:3637: checking for C11 _Noreturn feature" >&5
3638 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3639 if test "${cf_cv_c11_noreturn+set}" = set; then
3640 echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642 cat >"conftest.$ac_ext" <<_ACEOF
3643 #line 3643 "configure"
3644 #include "confdefs.h"
3645
3646 $ac_includes_default
3647 #include <stdnoreturn.h>
3648 static _Noreturn void giveup(void) { exit(0); }
3649
3650 int
3651 main (void)
3652 {
3653 if (feof(stdin)) giveup()
3654 ;
3655 return 0;
3656 }
3657 _ACEOF
3658 rm -f "conftest.$ac_objext"
3659 if { (eval echo "$as_me:3659: \"$ac_compile\"") >&5
3660 (eval $ac_compile) 2>&5
3661 ac_status=$?
3662 echo "$as_me:3662: \$? = $ac_status" >&5
3663 (exit "$ac_status"); } &&
3664 { ac_try='test -s "conftest.$ac_objext"'
3665 { (eval echo "$as_me:3665: \"$ac_try\"") >&5
3666 (eval $ac_try) 2>&5
3667 ac_status=$?
3668 echo "$as_me:3668: \$? = $ac_status" >&5
3669 (exit "$ac_status"); }; }; then
3670 cf_cv_c11_noreturn=yes
3671 else
3672 echo "$as_me: failed program was:" >&5
3673 cat "conftest.$ac_ext" >&5
3674 cf_cv_c11_noreturn=no
3675 fi
3676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3677
3678 fi
3679 echo "$as_me:3679: result: $cf_cv_c11_noreturn" >&5
3680 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3681 else
3682 cf_cv_c11_noreturn=no,
3683 fi
3684
3685 if test "$cf_cv_c11_noreturn" = yes; then
3686
3687 cat >>confdefs.h <<\EOF
3688 #define HAVE_STDNORETURN_H 1
3689 EOF
3690
3691 cat >>confdefs.h <<EOF
3692 #define STDC_NORETURN _Noreturn
3693 EOF
3694
3695 HAVE_STDNORETURN_H=1
3696 else
3697 HAVE_STDNORETURN_H=0
3698 fi
3699
3700 if test "$GCC" = yes || test "$GXX" = yes
3701 then
3702 cat > conftest.i <<EOF
3703 #ifndef GCC_PRINTF
3704 #define GCC_PRINTF 0
3705 #endif
3706 #ifndef GCC_SCANF
3707 #define GCC_SCANF 0
3708 #endif
3709 #ifndef GCC_NORETURN
3710 #define GCC_NORETURN /* nothing */
3711 #endif
3712 #ifndef GCC_UNUSED
3713 #define GCC_UNUSED /* nothing */
3714 #endif
3715 EOF
3716 if test "$GCC" = yes
3717 then
3718 echo "$as_me:3718: checking for $CC __attribute__ directives" >&5
3719 echo $ECHO_N "checking for $CC __attribute__ directives... $ECHO_C" >&6
3720 test -n "$verbose" && echo "$as_me:3720: result: " >&5
3721 echo "${ECHO_T}" >&6
3722 cat > "conftest.$ac_ext" <<EOF
3723 #line 3723 "${as_me:-configure}"
3724 #include <stdio.h>
3725 #include "confdefs.h"
3726 #include "conftest.h"
3727 #include "conftest.i"
3728 #if GCC_PRINTF
3729 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3730 #else
3731 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3732 #endif
3733 #if GCC_SCANF
3734 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3735 #else
3736 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3737 #endif
3738 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3739 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3740 extern GCC_NORETURN void foo(void);
3741 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3742 EOF
3743 cf_printf_attribute=no
3744 cf_scanf_attribute=no
3745 for cf_attribute in scanf printf unused noreturn
3746 do
3747
3748 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3749
3750 cf_directive="__attribute__(($cf_attribute))"
3751 echo "checking for $CC $cf_directive" 1>&5
3752
3753 case "$cf_attribute" in
3754 (printf)
3755 cf_printf_attribute=yes
3756 cat >conftest.h <<EOF
3757 #define GCC_$cf_ATTRIBUTE 1
3758 EOF
3759 ;;
3760 (scanf)
3761 cf_scanf_attribute=yes
3762 cat >conftest.h <<EOF
3763 #define GCC_$cf_ATTRIBUTE 1
3764 EOF
3765 ;;
3766 (*)
3767 cat >conftest.h <<EOF
3768 #define GCC_$cf_ATTRIBUTE $cf_directive
3769 EOF
3770 ;;
3771 esac
3772
3773 if { (eval echo "$as_me:3773: \"$ac_compile\"") >&5
3774 (eval $ac_compile) 2>&5
3775 ac_status=$?
3776 echo "$as_me:3776: \$? = $ac_status" >&5
3777 (exit "$ac_status"); }; then
3778 test -n "$verbose" && echo "$as_me:3778: result: ... $cf_attribute" >&5
3779 echo "${ECHO_T}... $cf_attribute" >&6
3780 cat conftest.h >>confdefs.h
3781 case "$cf_attribute" in
3782 (noreturn)
3783
3784 cat >>confdefs.h <<EOF
3785 #define GCC_NORETURN $cf_directive
3786 EOF
3787
3788 ;;
3789 (printf)
3790 cf_value='/* nothing */'
3791 if test "$cf_printf_attribute" != no ; then
3792 cf_value='__attribute__((format(printf,fmt,var)))'
3793
3794 cat >>confdefs.h <<\EOF
3795 #define GCC_PRINTF 1
3796 EOF
3797
3798 fi
3799
3800 cat >>confdefs.h <<EOF
3801 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3802 EOF
3803
3804 ;;
3805 (scanf)
3806 cf_value='/* nothing */'
3807 if test "$cf_scanf_attribute" != no ; then
3808 cf_value='__attribute__((format(scanf,fmt,var)))'
3809
3810 cat >>confdefs.h <<\EOF
3811 #define GCC_SCANF 1
3812 EOF
3813
3814 fi
3815
3816 cat >>confdefs.h <<EOF
3817 #define GCC_SCANFLIKE(fmt,var) $cf_value
3818 EOF
3819
3820 ;;
3821 (unused)
3822
3823 cat >>confdefs.h <<EOF
3824 #define GCC_UNUSED $cf_directive
3825 EOF
3826
3827 ;;
3828 esac
3829 fi
3830 done
3831 else
3832 ${FGREP-fgrep} define conftest.i >>confdefs.h
3833 fi
3834 rm -rf ./conftest*
3835 fi
3836
3837 echo "$as_me:3837: checking if you want to work around bogus compiler/loader warnings" >&5
3838 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3839
3840 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3841 if test "${enable_string_hacks+set}" = set; then
3842 enableval="$enable_string_hacks"
3843 enable_string_hacks=$enableval
3844 else
3845 enable_string_hacks=no
3846 fi;
3847 echo "$as_me:3847: result: $enable_string_hacks" >&5
3848 echo "${ECHO_T}$enable_string_hacks" >&6
3849
3850 if test "x$enable_string_hacks" = "xyes"; then
3851
3852 cat >>confdefs.h <<\EOF
3853 #define USE_STRING_HACKS 1
3854 EOF
3855
3856 { echo "$as_me:3856: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3857 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3858 echo "$as_me:3858: checking for strlcat" >&5
3859 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3860 if test "${ac_cv_func_strlcat+set}" = set; then
3861 echo $ECHO_N "(cached) $ECHO_C" >&6
3862 else
3863 cat >"conftest.$ac_ext" <<_ACEOF
3864 #line 3864 "configure"
3865 #include "confdefs.h"
3866 #define strlcat autoconf_temporary
3867 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3868 #undef strlcat
3869
3870 #ifdef __cplusplus
3871 extern "C"
3872 #endif
3873
3874 /* We use char because int might match the return type of a gcc2
3875 builtin and then its argument prototype would still apply. */
3876 char strlcat (void);
3877
3878 int
3879 main (void)
3880 {
3881
3882 /* The GNU C library defines stubs for functions which it implements
3883 to always fail with ENOSYS. Some functions are actually named
3884 something starting with __ and the normal name is an alias. */
3885 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3886 #error found stub for strlcat
3887 #endif
3888
3889 return strlcat ();
3890 ;
3891 return 0;
3892 }
3893 _ACEOF
3894 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3895 if { (eval echo "$as_me:3895: \"$ac_link\"") >&5
3896 (eval $ac_link) 2>&5
3897 ac_status=$?
3898 echo "$as_me:3898: \$? = $ac_status" >&5
3899 (exit "$ac_status"); } &&
3900 { ac_try='test -s "conftest$ac_exeext"'
3901 { (eval echo "$as_me:3901: \"$ac_try\"") >&5
3902 (eval $ac_try) 2>&5
3903 ac_status=$?
3904 echo "$as_me:3904: \$? = $ac_status" >&5
3905 (exit "$ac_status"); }; }; then
3906 ac_cv_func_strlcat=yes
3907 else
3908 echo "$as_me: failed program was:" >&5
3909 cat "conftest.$ac_ext" >&5
3910 ac_cv_func_strlcat=no
3911 fi
3912 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3913 fi
3914 echo "$as_me:3914: result: $ac_cv_func_strlcat" >&5
3915 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3916 if test "$ac_cv_func_strlcat" = yes; then
3917
3918 cat >>confdefs.h <<\EOF
3919 #define HAVE_STRLCAT 1
3920 EOF
3921
3922 else
3923
3924 echo "$as_me:3924: checking for strlcat in -lbsd" >&5
3925 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3926 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3927 echo $ECHO_N "(cached) $ECHO_C" >&6
3928 else
3929 ac_check_lib_save_LIBS=$LIBS
3930 LIBS="-lbsd $LIBS"
3931 cat >"conftest.$ac_ext" <<_ACEOF
3932 #line 3932 "configure"
3933 #include "confdefs.h"
3934
3935 /* Override any gcc2 internal prototype to avoid an error. */
3936 #ifdef __cplusplus
3937 extern "C"
3938 #endif
3939 /* We use char because int might match the return type of a gcc2
3940 builtin and then its argument prototype would still apply. */
3941 char strlcat (void);
3942 int
3943 main (void)
3944 {
3945 strlcat ();
3946 ;
3947 return 0;
3948 }
3949 _ACEOF
3950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3951 if { (eval echo "$as_me:3951: \"$ac_link\"") >&5
3952 (eval $ac_link) 2>&5
3953 ac_status=$?
3954 echo "$as_me:3954: \$? = $ac_status" >&5
3955 (exit "$ac_status"); } &&
3956 { ac_try='test -s "conftest$ac_exeext"'
3957 { (eval echo "$as_me:3957: \"$ac_try\"") >&5
3958 (eval $ac_try) 2>&5
3959 ac_status=$?
3960 echo "$as_me:3960: \$? = $ac_status" >&5
3961 (exit "$ac_status"); }; }; then
3962 ac_cv_lib_bsd_strlcat=yes
3963 else
3964 echo "$as_me: failed program was:" >&5
3965 cat "conftest.$ac_ext" >&5
3966 ac_cv_lib_bsd_strlcat=no
3967 fi
3968 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3969 LIBS=$ac_check_lib_save_LIBS
3970 fi
3971 echo "$as_me:3971: result: $ac_cv_lib_bsd_strlcat" >&5
3972 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3973 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3974
3975 cf_add_libs="$LIBS"
3976 # reverse order
3977 cf_add_0lib=
3978 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3979 # filter duplicates
3980 for cf_add_1lib in $cf_add_0lib; do
3981 for cf_add_2lib in $cf_add_libs; do
3982 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3983 cf_add_1lib=
3984 break
3985 fi
3986 done
3987 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3988 done
3989 LIBS="$cf_add_libs"
3990
3991 for ac_header in bsd/string.h
3992 do
3993 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3994 echo "$as_me:3994: checking for $ac_header" >&5
3995 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3996 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3997 echo $ECHO_N "(cached) $ECHO_C" >&6
3998 else
3999 cat >"conftest.$ac_ext" <<_ACEOF
4000 #line 4000 "configure"
4001 #include "confdefs.h"
4002 #include <$ac_header>
4003 _ACEOF
4004 if { (eval echo "$as_me:4004: \"$ac_cpp "conftest.$ac_ext"\"") >&5
4005 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
4006 ac_status=$?
4007 $EGREP -v '^ *\+' conftest.er1 >conftest.err
4008 rm -f conftest.er1
4009 cat conftest.err >&5
4010 echo "$as_me:4010: \$? = $ac_status" >&5
4011 (exit "$ac_status"); } >/dev/null; then
4012 if test -s conftest.err; then
4013 ac_cpp_err=$ac_c_preproc_warn_flag
4014 else
4015 ac_cpp_err=
4016 fi
4017 else
4018 ac_cpp_err=yes
4019 fi
4020 if test -z "$ac_cpp_err"; then
4021 eval "$as_ac_Header=yes"
4022 else
4023 echo "$as_me: failed program was:" >&5
4024 cat "conftest.$ac_ext" >&5
4025 eval "$as_ac_Header=no"
4026 fi
4027 rm -f conftest.err "conftest.$ac_ext"
4028 fi
4029 echo "$as_me:4029: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
4030 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
4031 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
4032 cat >>confdefs.h <<EOF
4033 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4034 EOF
4035
4036 fi
4037 done
4038
4039 cat >>confdefs.h <<\EOF
4040 #define HAVE_STRLCAT 1
4041 EOF
4042
4043 fi
4044
4045 fi
4046
4047 for ac_func in strlcpy snprintf
4048 do
4049 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4050 echo "$as_me:4050: checking for $ac_func" >&5
4051 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4052 if eval "test \"\${$as_ac_var+set}\" = set"; then
4053 echo $ECHO_N "(cached) $ECHO_C" >&6
4054 else
4055 cat >"conftest.$ac_ext" <<_ACEOF
4056 #line 4056 "configure"
4057 #include "confdefs.h"
4058 #define $ac_func autoconf_temporary
4059 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
4060 #undef $ac_func
4061
4062 #ifdef __cplusplus
4063 extern "C"
4064 #endif
4065
4066 /* We use char because int might match the return type of a gcc2
4067 builtin and then its argument prototype would still apply. */
4068 char $ac_func (void);
4069
4070 int
4071 main (void)
4072 {
4073
4074 /* The GNU C library defines stubs for functions which it implements
4075 to always fail with ENOSYS. Some functions are actually named
4076 something starting with __ and the normal name is an alias. */
4077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4078 #error found stub for $ac_func
4079 #endif
4080
4081 return $ac_func ();
4082 ;
4083 return 0;
4084 }
4085 _ACEOF
4086 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4087 if { (eval echo "$as_me:4087: \"$ac_link\"") >&5
4088 (eval $ac_link) 2>&5
4089 ac_status=$?
4090 echo "$as_me:4090: \$? = $ac_status" >&5
4091 (exit "$ac_status"); } &&
4092 { ac_try='test -s "conftest$ac_exeext"'
4093 { (eval echo "$as_me:4093: \"$ac_try\"") >&5
4094 (eval $ac_try) 2>&5
4095 ac_status=$?
4096 echo "$as_me:4096: \$? = $ac_status" >&5
4097 (exit "$ac_status"); }; }; then
4098 eval "$as_ac_var=yes"
4099 else
4100 echo "$as_me: failed program was:" >&5
4101 cat "conftest.$ac_ext" >&5
4102 eval "$as_ac_var=no"
4103 fi
4104 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4105 fi
4106 echo "$as_me:4106: result: `eval echo '${'"$as_ac_var"'}'`" >&5
4107 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
4108 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
4109 cat >>confdefs.h <<EOF
4110 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4111 EOF
4112
4113 fi
4114 done
4115
4116 fi
4117
4118 echo "$as_me:4118: checking if the POSIX test-macros are already defined" >&5
4119 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
4120 if test "${cf_cv_posix_visible+set}" = set; then
4121 echo $ECHO_N "(cached) $ECHO_C" >&6
4122 else
4123
4124 cat >"conftest.$ac_ext" <<_ACEOF
4125 #line 4125 "configure"
4126 #include "confdefs.h"
4127 #include <stdio.h>
4128 int
4129 main (void)
4130 {
4131
4132 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
4133 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
4134 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
4135 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
4136 #error conflicting symbols found
4137 #endif
4138
4139 ;
4140 return 0;
4141 }
4142 _ACEOF
4143 rm -f "conftest.$ac_objext"
4144 if { (eval echo "$as_me:4144: \"$ac_compile\"") >&5
4145 (eval $ac_compile) 2>&5
4146 ac_status=$?
4147 echo "$as_me:4147: \$? = $ac_status" >&5
4148 (exit "$ac_status"); } &&
4149 { ac_try='test -s "conftest.$ac_objext"'
4150 { (eval echo "$as_me:4150: \"$ac_try\"") >&5
4151 (eval $ac_try) 2>&5
4152 ac_status=$?
4153 echo "$as_me:4153: \$? = $ac_status" >&5
4154 (exit "$ac_status"); }; }; then
4155 cf_cv_posix_visible=no
4156 else
4157 echo "$as_me: failed program was:" >&5
4158 cat "conftest.$ac_ext" >&5
4159 cf_cv_posix_visible=yes
4160 fi
4161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4162
4163 fi
4164 echo "$as_me:4164: result: $cf_cv_posix_visible" >&5
4165 echo "${ECHO_T}$cf_cv_posix_visible" >&6
4166
4167 if test "$cf_cv_posix_visible" = no; then
4168
4169 cf_XOPEN_SOURCE=600
4170 cf_POSIX_C_SOURCE=199506L
4171 cf_xopen_source=
4172
4173 case "$host_os" in
4174 (aix[4-7]*)
4175 cf_xopen_source="-D_ALL_SOURCE"
4176 ;;
4177 (darwin[0-8].*)
4178 cf_xopen_source="-D_APPLE_C_SOURCE"
4179 ;;
4180 (darwin*)
4181 cf_xopen_source="-D_DARWIN_C_SOURCE"
4182 cf_XOPEN_SOURCE=
4183 ;;
4184 (freebsd*|dragonfly*|midnightbsd*)
4185 # 5.x headers associate
4186 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
4187 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
4188 cf_POSIX_C_SOURCE=200112L
4189 cf_XOPEN_SOURCE=600
4190 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4191 ;;
4192 (hpux11*)
4193 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
4194 ;;
4195 (hpux*)
4196 cf_xopen_source="-D_HPUX_SOURCE"
4197 ;;
4198 (irix[56].*)
4199 cf_xopen_source="-D_SGI_SOURCE"
4200 cf_XOPEN_SOURCE=
4201 ;;
4202 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
4203
4204 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
4205
4206 echo "$as_me:4206: checking if this is the GNU C library" >&5
4207 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
4208 if test "${cf_cv_gnu_library+set}" = set; then
4209 echo $ECHO_N "(cached) $ECHO_C" >&6
4210 else
4211
4212 cat >"conftest.$ac_ext" <<_ACEOF
4213 #line 4213 "configure"
4214 #include "confdefs.h"
4215 #include <sys/types.h>
4216 int
4217 main (void)
4218 {
4219
4220 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
4221 return 0;
4222 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
4223 return 0;
4224 #else
4225 # error not GNU C library
4226 #endif
4227 ;
4228 return 0;
4229 }
4230 _ACEOF
4231 rm -f "conftest.$ac_objext"
4232 if { (eval echo "$as_me:4232: \"$ac_compile\"") >&5
4233 (eval $ac_compile) 2>&5
4234 ac_status=$?
4235 echo "$as_me:4235: \$? = $ac_status" >&5
4236 (exit "$ac_status"); } &&
4237 { ac_try='test -s "conftest.$ac_objext"'
4238 { (eval echo "$as_me:4238: \"$ac_try\"") >&5
4239 (eval $ac_try) 2>&5
4240 ac_status=$?
4241 echo "$as_me:4241: \$? = $ac_status" >&5
4242 (exit "$ac_status"); }; }; then
4243 cf_cv_gnu_library=yes
4244 else
4245 echo "$as_me: failed program was:" >&5
4246 cat "conftest.$ac_ext" >&5
4247 cf_cv_gnu_library=no
4248 fi
4249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4250
4251 fi
4252 echo "$as_me:4252: result: $cf_cv_gnu_library" >&5
4253 echo "${ECHO_T}$cf_cv_gnu_library" >&6
4254
4255 if test x$cf_cv_gnu_library = xyes; then
4256
4257 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
4258 # was changed to help a little. newlib incorporated the change about 4
4259 # years later.
4260 echo "$as_me:4260: checking if _DEFAULT_SOURCE can be used as a basis" >&5
4261 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
4262 if test "${cf_cv_gnu_library_219+set}" = set; then
4263 echo $ECHO_N "(cached) $ECHO_C" >&6
4264 else
4265
4266 cf_save="$CPPFLAGS"
4267
4268 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4269 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4270
4271 cat >"conftest.$ac_ext" <<_ACEOF
4272 #line 4272 "configure"
4273 #include "confdefs.h"
4274 #include <sys/types.h>
4275 int
4276 main (void)
4277 {
4278
4279 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4280 return 0;
4281 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4282 return 0;
4283 #else
4284 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4285 #endif
4286 ;
4287 return 0;
4288 }
4289 _ACEOF
4290 rm -f "conftest.$ac_objext"
4291 if { (eval echo "$as_me:4291: \"$ac_compile\"") >&5
4292 (eval $ac_compile) 2>&5
4293 ac_status=$?
4294 echo "$as_me:4294: \$? = $ac_status" >&5
4295 (exit "$ac_status"); } &&
4296 { ac_try='test -s "conftest.$ac_objext"'
4297 { (eval echo "$as_me:4297: \"$ac_try\"") >&5
4298 (eval $ac_try) 2>&5
4299 ac_status=$?
4300 echo "$as_me:4300: \$? = $ac_status" >&5
4301 (exit "$ac_status"); }; }; then
4302 cf_cv_gnu_library_219=yes
4303 else
4304 echo "$as_me: failed program was:" >&5
4305 cat "conftest.$ac_ext" >&5
4306 cf_cv_gnu_library_219=no
4307 fi
4308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4309 CPPFLAGS="$cf_save"
4310
4311 fi
4312 echo "$as_me:4312: result: $cf_cv_gnu_library_219" >&5
4313 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4314
4315 if test "x$cf_cv_gnu_library_219" = xyes; then
4316 cf_save="$CPPFLAGS"
4317 echo "$as_me:4317: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4318 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4319 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4320 echo $ECHO_N "(cached) $ECHO_C" >&6
4321 else
4322
4323 cf_fix_cppflags=no
4324 cf_new_cflags=
4325 cf_new_cppflags=
4326 cf_new_extra_cppflags=
4327
4328 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4329 do
4330 case "$cf_fix_cppflags" in
4331 (no)
4332 case "$cf_add_cflags" in
4333 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4334 case "$cf_add_cflags" in
4335 (-D*)
4336 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4337
4338 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4339 && test -z "${cf_tst_cflags}" \
4340 && cf_fix_cppflags=yes
4341
4342 if test "$cf_fix_cppflags" = yes ; then
4343
4344 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4345 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4346
4347 continue
4348 elif test "${cf_tst_cflags}" = "\"'" ; then
4349
4350 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4351 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4352
4353 continue
4354 fi
4355 ;;
4356 esac
4357 case "$CPPFLAGS" in
4358 (*$cf_add_cflags)
4359 ;;
4360 (*)
4361 case "$cf_add_cflags" in
4362 (-D*)
4363 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4364
4365 CPPFLAGS=`echo "$CPPFLAGS" | \
4366 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4367 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4368
4369 ;;
4370 esac
4371
4372 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4373 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4374
4375 ;;
4376 esac
4377 ;;
4378 (*)
4379
4380 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4381 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4382
4383 ;;
4384 esac
4385 ;;
4386 (yes)
4387
4388 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4389 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4390
4391 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4392
4393 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4394 && test -z "${cf_tst_cflags}" \
4395 && cf_fix_cppflags=no
4396 ;;
4397 esac
4398 done
4399
4400 if test -n "$cf_new_cflags" ; then
4401
4402 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4403 CFLAGS="${CFLAGS}$cf_new_cflags"
4404
4405 fi
4406
4407 if test -n "$cf_new_cppflags" ; then
4408
4409 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4410 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4411
4412 fi
4413
4414 if test -n "$cf_new_extra_cppflags" ; then
4415
4416 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4417 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4418
4419 fi
4420
4421 cat >"conftest.$ac_ext" <<_ACEOF
4422 #line 4422 "configure"
4423 #include "confdefs.h"
4424
4425 #include <limits.h>
4426 #include <sys/types.h>
4427
4428 int
4429 main (void)
4430 {
4431
4432 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4433 return 0;
4434 #else
4435 # error GNU C library is too old
4436 #endif
4437 ;
4438 return 0;
4439 }
4440 _ACEOF
4441 rm -f "conftest.$ac_objext"
4442 if { (eval echo "$as_me:4442: \"$ac_compile\"") >&5
4443 (eval $ac_compile) 2>&5
4444 ac_status=$?
4445 echo "$as_me:4445: \$? = $ac_status" >&5
4446 (exit "$ac_status"); } &&
4447 { ac_try='test -s "conftest.$ac_objext"'
4448 { (eval echo "$as_me:4448: \"$ac_try\"") >&5
4449 (eval $ac_try) 2>&5
4450 ac_status=$?
4451 echo "$as_me:4451: \$? = $ac_status" >&5
4452 (exit "$ac_status"); }; }; then
4453 cf_cv_gnu_dftsrc_219=yes
4454 else
4455 echo "$as_me: failed program was:" >&5
4456 cat "conftest.$ac_ext" >&5
4457 cf_cv_gnu_dftsrc_219=no
4458 fi
4459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4460
4461 fi
4462 echo "$as_me:4462: result: $cf_cv_gnu_dftsrc_219" >&5
4463 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4464 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4465 else
4466 cf_cv_gnu_dftsrc_219=maybe
4467 fi
4468
4469 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4470
4471 echo "$as_me:4471: checking if we must define _GNU_SOURCE" >&5
4472 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4473 if test "${cf_cv_gnu_source+set}" = set; then
4474 echo $ECHO_N "(cached) $ECHO_C" >&6
4475 else
4476
4477 cat >"conftest.$ac_ext" <<_ACEOF
4478 #line 4478 "configure"
4479 #include "confdefs.h"
4480 #include <sys/types.h>
4481 int
4482 main (void)
4483 {
4484
4485 #ifndef _XOPEN_SOURCE
4486 #error expected _XOPEN_SOURCE to be defined
4487 #endif
4488 ;
4489 return 0;
4490 }
4491 _ACEOF
4492 rm -f "conftest.$ac_objext"
4493 if { (eval echo "$as_me:4493: \"$ac_compile\"") >&5
4494 (eval $ac_compile) 2>&5
4495 ac_status=$?
4496 echo "$as_me:4496: \$? = $ac_status" >&5
4497 (exit "$ac_status"); } &&
4498 { ac_try='test -s "conftest.$ac_objext"'
4499 { (eval echo "$as_me:4499: \"$ac_try\"") >&5
4500 (eval $ac_try) 2>&5
4501 ac_status=$?
4502 echo "$as_me:4502: \$? = $ac_status" >&5
4503 (exit "$ac_status"); }; }; then
4504 cf_cv_gnu_source=no
4505 else
4506 echo "$as_me: failed program was:" >&5
4507 cat "conftest.$ac_ext" >&5
4508 cf_save="$CPPFLAGS"
4509
4510 cf_fix_cppflags=no
4511 cf_new_cflags=
4512 cf_new_cppflags=
4513 cf_new_extra_cppflags=
4514
4515 for cf_add_cflags in -D_GNU_SOURCE
4516 do
4517 case "$cf_fix_cppflags" in
4518 (no)
4519 case "$cf_add_cflags" in
4520 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4521 case "$cf_add_cflags" in
4522 (-D*)
4523 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4524
4525 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4526 && test -z "${cf_tst_cflags}" \
4527 && cf_fix_cppflags=yes
4528
4529 if test "$cf_fix_cppflags" = yes ; then
4530
4531 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4532 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4533
4534 continue
4535 elif test "${cf_tst_cflags}" = "\"'" ; then
4536
4537 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4538 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4539
4540 continue
4541 fi
4542 ;;
4543 esac
4544 case "$CPPFLAGS" in
4545 (*$cf_add_cflags)
4546 ;;
4547 (*)
4548 case "$cf_add_cflags" in
4549 (-D*)
4550 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4551
4552 CPPFLAGS=`echo "$CPPFLAGS" | \
4553 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4554 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4555
4556 ;;
4557 esac
4558
4559 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4560 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4561
4562 ;;
4563 esac
4564 ;;
4565 (*)
4566
4567 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4568 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4569
4570 ;;
4571 esac
4572 ;;
4573 (yes)
4574
4575 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4576 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4577
4578 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4579
4580 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4581 && test -z "${cf_tst_cflags}" \
4582 && cf_fix_cppflags=no
4583 ;;
4584 esac
4585 done
4586
4587 if test -n "$cf_new_cflags" ; then
4588
4589 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4590 CFLAGS="${CFLAGS}$cf_new_cflags"
4591
4592 fi
4593
4594 if test -n "$cf_new_cppflags" ; then
4595
4596 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4597 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4598
4599 fi
4600
4601 if test -n "$cf_new_extra_cppflags" ; then
4602
4603 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4604 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4605
4606 fi
4607
4608 cat >"conftest.$ac_ext" <<_ACEOF
4609 #line 4609 "configure"
4610 #include "confdefs.h"
4611 #include <sys/types.h>
4612 int
4613 main (void)
4614 {
4615
4616 #ifdef _XOPEN_SOURCE
4617 #error expected _XOPEN_SOURCE to be undefined
4618 #endif
4619 ;
4620 return 0;
4621 }
4622 _ACEOF
4623 rm -f "conftest.$ac_objext"
4624 if { (eval echo "$as_me:4624: \"$ac_compile\"") >&5
4625 (eval $ac_compile) 2>&5
4626 ac_status=$?
4627 echo "$as_me:4627: \$? = $ac_status" >&5
4628 (exit "$ac_status"); } &&
4629 { ac_try='test -s "conftest.$ac_objext"'
4630 { (eval echo "$as_me:4630: \"$ac_try\"") >&5
4631 (eval $ac_try) 2>&5
4632 ac_status=$?
4633 echo "$as_me:4633: \$? = $ac_status" >&5
4634 (exit "$ac_status"); }; }; then
4635 cf_cv_gnu_source=no
4636 else
4637 echo "$as_me: failed program was:" >&5
4638 cat "conftest.$ac_ext" >&5
4639 cf_cv_gnu_source=yes
4640 fi
4641 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4642 CPPFLAGS="$cf_save"
4643
4644 fi
4645 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4646
4647 fi
4648 echo "$as_me:4648: result: $cf_cv_gnu_source" >&5
4649 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4650
4651 if test "$cf_cv_gnu_source" = yes
4652 then
4653 echo "$as_me:4653: checking if we should also define _DEFAULT_SOURCE" >&5
4654 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4655 if test "${cf_cv_default_source+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657 else
4658
4659 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4660 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4661
4662 cat >"conftest.$ac_ext" <<_ACEOF
4663 #line 4663 "configure"
4664 #include "confdefs.h"
4665 #include <sys/types.h>
4666 int
4667 main (void)
4668 {
4669
4670 #ifdef _DEFAULT_SOURCE
4671 #error expected _DEFAULT_SOURCE to be undefined
4672 #endif
4673 ;
4674 return 0;
4675 }
4676 _ACEOF
4677 rm -f "conftest.$ac_objext"
4678 if { (eval echo "$as_me:4678: \"$ac_compile\"") >&5
4679 (eval $ac_compile) 2>&5
4680 ac_status=$?
4681 echo "$as_me:4681: \$? = $ac_status" >&5
4682 (exit "$ac_status"); } &&
4683 { ac_try='test -s "conftest.$ac_objext"'
4684 { (eval echo "$as_me:4684: \"$ac_try\"") >&5
4685 (eval $ac_try) 2>&5
4686 ac_status=$?
4687 echo "$as_me:4687: \$? = $ac_status" >&5
4688 (exit "$ac_status"); }; }; then
4689 cf_cv_default_source=no
4690 else
4691 echo "$as_me: failed program was:" >&5
4692 cat "conftest.$ac_ext" >&5
4693 cf_cv_default_source=yes
4694 fi
4695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4696
4697 fi
4698 echo "$as_me:4698: result: $cf_cv_default_source" >&5
4699 echo "${ECHO_T}$cf_cv_default_source" >&6
4700 if test "$cf_cv_default_source" = yes
4701 then
4702
4703 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4704 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4705
4706 fi
4707 fi
4708 fi
4709
4710 fi
4711
4712 ;;
4713 linux*musl)
4714 cf_xopen_source="-D_BSD_SOURCE"
4715 ;;
4716 (minix*)
4717 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4718 ;;
4719 (mirbsd*)
4720 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4721 cf_XOPEN_SOURCE=
4722
4723 if test "$cf_cv_posix_visible" = no; then
4724
4725 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4726
4727 cf_save_CFLAGS="$CFLAGS"
4728 cf_save_CPPFLAGS="$CPPFLAGS"
4729
4730 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4731 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4732 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4733
4734 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4735 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4736 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4737
4738 echo "$as_me:4738: checking if we should define _POSIX_C_SOURCE" >&5
4739 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4740 if test "${cf_cv_posix_c_source+set}" = set; then
4741 echo $ECHO_N "(cached) $ECHO_C" >&6
4742 else
4743
4744 echo "${as_me:-configure}:4744: testing if the symbol is already defined go no further ..." 1>&5
4745
4746 cat >"conftest.$ac_ext" <<_ACEOF
4747 #line 4747 "configure"
4748 #include "confdefs.h"
4749 #include <sys/types.h>
4750 int
4751 main (void)
4752 {
4753
4754 #ifndef _POSIX_C_SOURCE
4755 #error _POSIX_C_SOURCE is not defined
4756 #endif
4757 ;
4758 return 0;
4759 }
4760 _ACEOF
4761 rm -f "conftest.$ac_objext"
4762 if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5
4763 (eval $ac_compile) 2>&5
4764 ac_status=$?
4765 echo "$as_me:4765: \$? = $ac_status" >&5
4766 (exit "$ac_status"); } &&
4767 { ac_try='test -s "conftest.$ac_objext"'
4768 { (eval echo "$as_me:4768: \"$ac_try\"") >&5
4769 (eval $ac_try) 2>&5
4770 ac_status=$?
4771 echo "$as_me:4771: \$? = $ac_status" >&5
4772 (exit "$ac_status"); }; }; then
4773 cf_cv_posix_c_source=no
4774 else
4775 echo "$as_me: failed program was:" >&5
4776 cat "conftest.$ac_ext" >&5
4777 cf_want_posix_source=no
4778 case .$cf_POSIX_C_SOURCE in
4779 (.[12]??*)
4780 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4781 ;;
4782 (.2)
4783 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4784 cf_want_posix_source=yes
4785 ;;
4786 (.*)
4787 cf_want_posix_source=yes
4788 ;;
4789 esac
4790 if test "$cf_want_posix_source" = yes ; then
4791 cat >"conftest.$ac_ext" <<_ACEOF
4792 #line 4792 "configure"
4793 #include "confdefs.h"
4794 #include <sys/types.h>
4795 int
4796 main (void)
4797 {
4798
4799 #ifdef _POSIX_SOURCE
4800 #error _POSIX_SOURCE is defined
4801 #endif
4802 ;
4803 return 0;
4804 }
4805 _ACEOF
4806 rm -f "conftest.$ac_objext"
4807 if { (eval echo "$as_me:4807: \"$ac_compile\"") >&5
4808 (eval $ac_compile) 2>&5
4809 ac_status=$?
4810 echo "$as_me:4810: \$? = $ac_status" >&5
4811 (exit "$ac_status"); } &&
4812 { ac_try='test -s "conftest.$ac_objext"'
4813 { (eval echo "$as_me:4813: \"$ac_try\"") >&5
4814 (eval $ac_try) 2>&5
4815 ac_status=$?
4816 echo "$as_me:4816: \$? = $ac_status" >&5
4817 (exit "$ac_status"); }; }; then
4818 :
4819 else
4820 echo "$as_me: failed program was:" >&5
4821 cat "conftest.$ac_ext" >&5
4822 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4823 fi
4824 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4825 fi
4826
4827 echo "${as_me:-configure}:4827: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4828
4829 CFLAGS="$cf_trim_CFLAGS"
4830 CPPFLAGS="$cf_trim_CPPFLAGS"
4831
4832 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4833 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4834
4835 echo "${as_me:-configure}:4835: testing if the second compile does not leave our definition intact error ..." 1>&5
4836
4837 cat >"conftest.$ac_ext" <<_ACEOF
4838 #line 4838 "configure"
4839 #include "confdefs.h"
4840 #include <sys/types.h>
4841 int
4842 main (void)
4843 {
4844
4845 #ifndef _POSIX_C_SOURCE
4846 #error _POSIX_C_SOURCE is not defined
4847 #endif
4848 ;
4849 return 0;
4850 }
4851 _ACEOF
4852 rm -f "conftest.$ac_objext"
4853 if { (eval echo "$as_me:4853: \"$ac_compile\"") >&5
4854 (eval $ac_compile) 2>&5
4855 ac_status=$?
4856 echo "$as_me:4856: \$? = $ac_status" >&5
4857 (exit "$ac_status"); } &&
4858 { ac_try='test -s "conftest.$ac_objext"'
4859 { (eval echo "$as_me:4859: \"$ac_try\"") >&5
4860 (eval $ac_try) 2>&5
4861 ac_status=$?
4862 echo "$as_me:4862: \$? = $ac_status" >&5
4863 (exit "$ac_status"); }; }; then
4864 :
4865 else
4866 echo "$as_me: failed program was:" >&5
4867 cat "conftest.$ac_ext" >&5
4868 cf_cv_posix_c_source=no
4869 fi
4870 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4871 CFLAGS="$cf_save_CFLAGS"
4872 CPPFLAGS="$cf_save_CPPFLAGS"
4873
4874 fi
4875 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4876
4877 fi
4878 echo "$as_me:4878: result: $cf_cv_posix_c_source" >&5
4879 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4880
4881 if test "$cf_cv_posix_c_source" != no ; then
4882 CFLAGS="$cf_trim_CFLAGS"
4883 CPPFLAGS="$cf_trim_CPPFLAGS"
4884
4885 cf_fix_cppflags=no
4886 cf_new_cflags=
4887 cf_new_cppflags=
4888 cf_new_extra_cppflags=
4889
4890 for cf_add_cflags in $cf_cv_posix_c_source
4891 do
4892 case "$cf_fix_cppflags" in
4893 (no)
4894 case "$cf_add_cflags" in
4895 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4896 case "$cf_add_cflags" in
4897 (-D*)
4898 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4899
4900 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4901 && test -z "${cf_tst_cflags}" \
4902 && cf_fix_cppflags=yes
4903
4904 if test "$cf_fix_cppflags" = yes ; then
4905
4906 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4907 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4908
4909 continue
4910 elif test "${cf_tst_cflags}" = "\"'" ; then
4911
4912 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4913 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4914
4915 continue
4916 fi
4917 ;;
4918 esac
4919 case "$CPPFLAGS" in
4920 (*$cf_add_cflags)
4921 ;;
4922 (*)
4923 case "$cf_add_cflags" in
4924 (-D*)
4925 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4926
4927 CPPFLAGS=`echo "$CPPFLAGS" | \
4928 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4929 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4930
4931 ;;
4932 esac
4933
4934 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4935 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4936
4937 ;;
4938 esac
4939 ;;
4940 (*)
4941
4942 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4943 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4944
4945 ;;
4946 esac
4947 ;;
4948 (yes)
4949
4950 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4951 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4952
4953 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4954
4955 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4956 && test -z "${cf_tst_cflags}" \
4957 && cf_fix_cppflags=no
4958 ;;
4959 esac
4960 done
4961
4962 if test -n "$cf_new_cflags" ; then
4963
4964 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4965 CFLAGS="${CFLAGS}$cf_new_cflags"
4966
4967 fi
4968
4969 if test -n "$cf_new_cppflags" ; then
4970
4971 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4972 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4973
4974 fi
4975
4976 if test -n "$cf_new_extra_cppflags" ; then
4977
4978 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4979 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4980
4981 fi
4982
4983 fi
4984
4985 fi # cf_cv_posix_visible
4986
4987 ;;
4988 (netbsd*)
4989 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4990 ;;
4991 (openbsd[6-9]*)
4992 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4993 # see https://www.mail-archive.com/[email protected]/msg13200.html
4994 # Abusing the conformance level is a workaround.
4995 { echo "$as_me:4995: WARNING: this system does not provide usable locale support" >&5
4996 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4997 cf_xopen_source="-D_BSD_SOURCE"
4998 cf_XOPEN_SOURCE=700
4999 ;;
5000 (openbsd[4-5]*)
5001 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
5002 cf_xopen_source="-D_BSD_SOURCE"
5003 cf_XOPEN_SOURCE=600
5004 ;;
5005 (openbsd*)
5006 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
5007 ;;
5008 (osf[45]*)
5009 cf_xopen_source="-D_OSF_SOURCE"
5010 ;;
5011 (nto-qnx*)
5012 cf_xopen_source="-D_QNX_SOURCE"
5013 ;;
5014 (sco*)
5015 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
5016 ;;
5017 (solaris2.*)
5018 cf_xopen_source="-D__EXTENSIONS__"
5019 cf_cv_xopen_source=broken
5020 ;;
5021 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
5022 cf_XOPEN_SOURCE=
5023 cf_POSIX_C_SOURCE=
5024 ;;
5025 (*)
5026
5027 echo "$as_me:5027: checking if we should define _XOPEN_SOURCE" >&5
5028 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5029 if test "${cf_cv_xopen_source+set}" = set; then
5030 echo $ECHO_N "(cached) $ECHO_C" >&6
5031 else
5032
5033 cat >"conftest.$ac_ext" <<_ACEOF
5034 #line 5034 "configure"
5035 #include "confdefs.h"
5036
5037 $ac_includes_default
5038
5039 int
5040 main (void)
5041 {
5042
5043 #ifndef _XOPEN_SOURCE
5044 #error _XOPEN_SOURCE is not defined
5045 #endif
5046
5047 ;
5048 return 0;
5049 }
5050 _ACEOF
5051 rm -f "conftest.$ac_objext"
5052 if { (eval echo "$as_me:5052: \"$ac_compile\"") >&5
5053 (eval $ac_compile) 2>&5
5054 ac_status=$?
5055 echo "$as_me:5055: \$? = $ac_status" >&5
5056 (exit "$ac_status"); } &&
5057 { ac_try='test -s "conftest.$ac_objext"'
5058 { (eval echo "$as_me:5058: \"$ac_try\"") >&5
5059 (eval $ac_try) 2>&5
5060 ac_status=$?
5061 echo "$as_me:5061: \$? = $ac_status" >&5
5062 (exit "$ac_status"); }; }; then
5063 cf_cv_xopen_source=no
5064 else
5065 echo "$as_me: failed program was:" >&5
5066 cat "conftest.$ac_ext" >&5
5067 cf_save="$CPPFLAGS"
5068
5069 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5070 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5071
5072 cat >"conftest.$ac_ext" <<_ACEOF
5073 #line 5073 "configure"
5074 #include "confdefs.h"
5075
5076 $ac_includes_default
5077
5078 int
5079 main (void)
5080 {
5081
5082 #ifndef _XOPEN_SOURCE
5083 #error _XOPEN_SOURCE is not defined
5084 #endif
5085
5086 ;
5087 return 0;
5088 }
5089 _ACEOF
5090 rm -f "conftest.$ac_objext"
5091 if { (eval echo "$as_me:5091: \"$ac_compile\"") >&5
5092 (eval $ac_compile) 2>&5
5093 ac_status=$?
5094 echo "$as_me:5094: \$? = $ac_status" >&5
5095 (exit "$ac_status"); } &&
5096 { ac_try='test -s "conftest.$ac_objext"'
5097 { (eval echo "$as_me:5097: \"$ac_try\"") >&5
5098 (eval $ac_try) 2>&5
5099 ac_status=$?
5100 echo "$as_me:5100: \$? = $ac_status" >&5
5101 (exit "$ac_status"); }; }; then
5102 cf_cv_xopen_source=no
5103 else
5104 echo "$as_me: failed program was:" >&5
5105 cat "conftest.$ac_ext" >&5
5106 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5107 fi
5108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5109 CPPFLAGS="$cf_save"
5110
5111 fi
5112 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5113
5114 fi
5115 echo "$as_me:5115: result: $cf_cv_xopen_source" >&5
5116 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5117
5118 if test "$cf_cv_xopen_source" != no ; then
5119
5120 CFLAGS=`echo "$CFLAGS" | \
5121 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5122 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5123
5124 CPPFLAGS=`echo "$CPPFLAGS" | \
5125 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5126 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5127
5128 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5129
5130 for cf_add_cflags in $cf_temp_xopen_source
5131 do
5132 case "x$cf_add_cflags" in
5133 (x-[DU]*)
5134
5135 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5136 while true
5137 do
5138 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5139 test "$CFLAGS" != "$cf_old_cflag" || break
5140
5141 CFLAGS="$cf_old_cflag"
5142 done
5143
5144 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5145 while true
5146 do
5147 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5148 test "$CPPFLAGS" != "$cf_old_cflag" || break
5149
5150 CPPFLAGS="$cf_old_cflag"
5151 done
5152
5153 ;;
5154 esac
5155
5156 cf_fix_cppflags=no
5157 cf_new_cflags=
5158 cf_new_cppflags=
5159 cf_new_extra_cppflags=
5160
5161 for cf_add_cflags in $cf_add_cflags
5162 do
5163 case "$cf_fix_cppflags" in
5164 (no)
5165 case "$cf_add_cflags" in
5166 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5167 case "$cf_add_cflags" in
5168 (-D*)
5169 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5170
5171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5172 && test -z "${cf_tst_cflags}" \
5173 && cf_fix_cppflags=yes
5174
5175 if test "$cf_fix_cppflags" = yes ; then
5176
5177 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5178 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5179
5180 continue
5181 elif test "${cf_tst_cflags}" = "\"'" ; then
5182
5183 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5184 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5185
5186 continue
5187 fi
5188 ;;
5189 esac
5190 case "$CPPFLAGS" in
5191 (*$cf_add_cflags)
5192 ;;
5193 (*)
5194 case "$cf_add_cflags" in
5195 (-D*)
5196 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5197
5198 CPPFLAGS=`echo "$CPPFLAGS" | \
5199 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5200 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5201
5202 ;;
5203 esac
5204
5205 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5206 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5207
5208 ;;
5209 esac
5210 ;;
5211 (*)
5212
5213 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5214 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5215
5216 ;;
5217 esac
5218 ;;
5219 (yes)
5220
5221 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5222 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5223
5224 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5225
5226 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5227 && test -z "${cf_tst_cflags}" \
5228 && cf_fix_cppflags=no
5229 ;;
5230 esac
5231 done
5232
5233 if test -n "$cf_new_cflags" ; then
5234
5235 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5236 CFLAGS="${CFLAGS}$cf_new_cflags"
5237
5238 fi
5239
5240 if test -n "$cf_new_cppflags" ; then
5241
5242 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5243 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5244
5245 fi
5246
5247 if test -n "$cf_new_extra_cppflags" ; then
5248
5249 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5250 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5251
5252 fi
5253
5254 done
5255
5256 fi
5257
5258 cf_save_xopen_cppflags="$CPPFLAGS"
5259
5260 if test "$cf_cv_posix_visible" = no; then
5261
5262 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
5263
5264 cf_save_CFLAGS="$CFLAGS"
5265 cf_save_CPPFLAGS="$CPPFLAGS"
5266
5267 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
5268 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5269 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5270
5271 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
5272 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5273 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5274
5275 echo "$as_me:5275: checking if we should define _POSIX_C_SOURCE" >&5
5276 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
5277 if test "${cf_cv_posix_c_source+set}" = set; then
5278 echo $ECHO_N "(cached) $ECHO_C" >&6
5279 else
5280
5281 echo "${as_me:-configure}:5281: testing if the symbol is already defined go no further ..." 1>&5
5282
5283 cat >"conftest.$ac_ext" <<_ACEOF
5284 #line 5284 "configure"
5285 #include "confdefs.h"
5286 #include <sys/types.h>
5287 int
5288 main (void)
5289 {
5290
5291 #ifndef _POSIX_C_SOURCE
5292 #error _POSIX_C_SOURCE is not defined
5293 #endif
5294 ;
5295 return 0;
5296 }
5297 _ACEOF
5298 rm -f "conftest.$ac_objext"
5299 if { (eval echo "$as_me:5299: \"$ac_compile\"") >&5
5300 (eval $ac_compile) 2>&5
5301 ac_status=$?
5302 echo "$as_me:5302: \$? = $ac_status" >&5
5303 (exit "$ac_status"); } &&
5304 { ac_try='test -s "conftest.$ac_objext"'
5305 { (eval echo "$as_me:5305: \"$ac_try\"") >&5
5306 (eval $ac_try) 2>&5
5307 ac_status=$?
5308 echo "$as_me:5308: \$? = $ac_status" >&5
5309 (exit "$ac_status"); }; }; then
5310 cf_cv_posix_c_source=no
5311 else
5312 echo "$as_me: failed program was:" >&5
5313 cat "conftest.$ac_ext" >&5
5314 cf_want_posix_source=no
5315 case .$cf_POSIX_C_SOURCE in
5316 (.[12]??*)
5317 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5318 ;;
5319 (.2)
5320 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5321 cf_want_posix_source=yes
5322 ;;
5323 (.*)
5324 cf_want_posix_source=yes
5325 ;;
5326 esac
5327 if test "$cf_want_posix_source" = yes ; then
5328 cat >"conftest.$ac_ext" <<_ACEOF
5329 #line 5329 "configure"
5330 #include "confdefs.h"
5331 #include <sys/types.h>
5332 int
5333 main (void)
5334 {
5335
5336 #ifdef _POSIX_SOURCE
5337 #error _POSIX_SOURCE is defined
5338 #endif
5339 ;
5340 return 0;
5341 }
5342 _ACEOF
5343 rm -f "conftest.$ac_objext"
5344 if { (eval echo "$as_me:5344: \"$ac_compile\"") >&5
5345 (eval $ac_compile) 2>&5
5346 ac_status=$?
5347 echo "$as_me:5347: \$? = $ac_status" >&5
5348 (exit "$ac_status"); } &&
5349 { ac_try='test -s "conftest.$ac_objext"'
5350 { (eval echo "$as_me:5350: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:5353: \$? = $ac_status" >&5
5354 (exit "$ac_status"); }; }; then
5355 :
5356 else
5357 echo "$as_me: failed program was:" >&5
5358 cat "conftest.$ac_ext" >&5
5359 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5360 fi
5361 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5362 fi
5363
5364 echo "${as_me:-configure}:5364: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5365
5366 CFLAGS="$cf_trim_CFLAGS"
5367 CPPFLAGS="$cf_trim_CPPFLAGS"
5368
5369 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5370 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5371
5372 echo "${as_me:-configure}:5372: testing if the second compile does not leave our definition intact error ..." 1>&5
5373
5374 cat >"conftest.$ac_ext" <<_ACEOF
5375 #line 5375 "configure"
5376 #include "confdefs.h"
5377 #include <sys/types.h>
5378 int
5379 main (void)
5380 {
5381
5382 #ifndef _POSIX_C_SOURCE
5383 #error _POSIX_C_SOURCE is not defined
5384 #endif
5385 ;
5386 return 0;
5387 }
5388 _ACEOF
5389 rm -f "conftest.$ac_objext"
5390 if { (eval echo "$as_me:5390: \"$ac_compile\"") >&5
5391 (eval $ac_compile) 2>&5
5392 ac_status=$?
5393 echo "$as_me:5393: \$? = $ac_status" >&5
5394 (exit "$ac_status"); } &&
5395 { ac_try='test -s "conftest.$ac_objext"'
5396 { (eval echo "$as_me:5396: \"$ac_try\"") >&5
5397 (eval $ac_try) 2>&5
5398 ac_status=$?
5399 echo "$as_me:5399: \$? = $ac_status" >&5
5400 (exit "$ac_status"); }; }; then
5401 :
5402 else
5403 echo "$as_me: failed program was:" >&5
5404 cat "conftest.$ac_ext" >&5
5405 cf_cv_posix_c_source=no
5406 fi
5407 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5408 CFLAGS="$cf_save_CFLAGS"
5409 CPPFLAGS="$cf_save_CPPFLAGS"
5410
5411 fi
5412 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5413
5414 fi
5415 echo "$as_me:5415: result: $cf_cv_posix_c_source" >&5
5416 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5417
5418 if test "$cf_cv_posix_c_source" != no ; then
5419 CFLAGS="$cf_trim_CFLAGS"
5420 CPPFLAGS="$cf_trim_CPPFLAGS"
5421
5422 cf_fix_cppflags=no
5423 cf_new_cflags=
5424 cf_new_cppflags=
5425 cf_new_extra_cppflags=
5426
5427 for cf_add_cflags in $cf_cv_posix_c_source
5428 do
5429 case "$cf_fix_cppflags" in
5430 (no)
5431 case "$cf_add_cflags" in
5432 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5433 case "$cf_add_cflags" in
5434 (-D*)
5435 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5436
5437 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5438 && test -z "${cf_tst_cflags}" \
5439 && cf_fix_cppflags=yes
5440
5441 if test "$cf_fix_cppflags" = yes ; then
5442
5443 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5444 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5445
5446 continue
5447 elif test "${cf_tst_cflags}" = "\"'" ; then
5448
5449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5451
5452 continue
5453 fi
5454 ;;
5455 esac
5456 case "$CPPFLAGS" in
5457 (*$cf_add_cflags)
5458 ;;
5459 (*)
5460 case "$cf_add_cflags" in
5461 (-D*)
5462 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5463
5464 CPPFLAGS=`echo "$CPPFLAGS" | \
5465 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5466 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5467
5468 ;;
5469 esac
5470
5471 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5472 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5473
5474 ;;
5475 esac
5476 ;;
5477 (*)
5478
5479 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5480 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5481
5482 ;;
5483 esac
5484 ;;
5485 (yes)
5486
5487 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5488 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5489
5490 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5491
5492 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5493 && test -z "${cf_tst_cflags}" \
5494 && cf_fix_cppflags=no
5495 ;;
5496 esac
5497 done
5498
5499 if test -n "$cf_new_cflags" ; then
5500
5501 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5502 CFLAGS="${CFLAGS}$cf_new_cflags"
5503
5504 fi
5505
5506 if test -n "$cf_new_cppflags" ; then
5507
5508 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5509 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5510
5511 fi
5512
5513 if test -n "$cf_new_extra_cppflags" ; then
5514
5515 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5516 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5517
5518 fi
5519
5520 fi
5521
5522 fi # cf_cv_posix_visible
5523
5524 # Some of these niche implementations use copy/paste, double-check...
5525 if test "$cf_cv_xopen_source" = no ; then
5526 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
5527
5528 echo "${as_me:-configure}:5528: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
5529
5530 cat >"conftest.$ac_ext" <<_ACEOF
5531 #line 5531 "configure"
5532 #include "confdefs.h"
5533
5534 $ac_includes_default
5535
5536 int
5537 main (void)
5538 {
5539
5540 #ifndef _XOPEN_SOURCE
5541 #error _XOPEN_SOURCE is not defined
5542 #endif
5543
5544 ;
5545 return 0;
5546 }
5547 _ACEOF
5548 rm -f "conftest.$ac_objext"
5549 if { (eval echo "$as_me:5549: \"$ac_compile\"") >&5
5550 (eval $ac_compile) 2>&5
5551 ac_status=$?
5552 echo "$as_me:5552: \$? = $ac_status" >&5
5553 (exit "$ac_status"); } &&
5554 { ac_try='test -s "conftest.$ac_objext"'
5555 { (eval echo "$as_me:5555: \"$ac_try\"") >&5
5556 (eval $ac_try) 2>&5
5557 ac_status=$?
5558 echo "$as_me:5558: \$? = $ac_status" >&5
5559 (exit "$ac_status"); }; }; then
5560 :
5561 else
5562 echo "$as_me: failed program was:" >&5
5563 cat "conftest.$ac_ext" >&5
5564
5565 { echo "$as_me:5565: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
5566 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
5567 CPPFLAGS="$cf_save_xopen_cppflags"
5568 fi
5569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5570 fi
5571 ;;
5572 esac
5573
5574 if test -n "$cf_xopen_source" ; then
5575
5576 for cf_add_cflags in $cf_xopen_source
5577 do
5578 case "x$cf_add_cflags" in
5579 (x-[DU]*)
5580
5581 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5582 while true
5583 do
5584 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5585 test "$CFLAGS" != "$cf_old_cflag" || break
5586 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
5587
5588 echo "${as_me:-configure}:5588: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
5589
5590 CFLAGS="$cf_old_cflag"
5591 done
5592
5593 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5594 while true
5595 do
5596 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5597 test "$CPPFLAGS" != "$cf_old_cflag" || break
5598 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
5599
5600 echo "${as_me:-configure}:5600: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
5601
5602 CPPFLAGS="$cf_old_cflag"
5603 done
5604
5605 ;;
5606 esac
5607
5608 cf_fix_cppflags=no
5609 cf_new_cflags=
5610 cf_new_cppflags=
5611 cf_new_extra_cppflags=
5612
5613 for cf_add_cflags in $cf_add_cflags
5614 do
5615 case "$cf_fix_cppflags" in
5616 (no)
5617 case "$cf_add_cflags" in
5618 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5619 case "$cf_add_cflags" in
5620 (-D*)
5621 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5622
5623 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5624 && test -z "${cf_tst_cflags}" \
5625 && cf_fix_cppflags=yes
5626
5627 if test "$cf_fix_cppflags" = yes ; then
5628
5629 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5630 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5631
5632 continue
5633 elif test "${cf_tst_cflags}" = "\"'" ; then
5634
5635 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5636 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5637
5638 continue
5639 fi
5640 ;;
5641 esac
5642 case "$CPPFLAGS" in
5643 (*$cf_add_cflags)
5644 ;;
5645 (*)
5646 case "$cf_add_cflags" in
5647 (-D*)
5648 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5649
5650 CPPFLAGS=`echo "$CPPFLAGS" | \
5651 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5652 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5653
5654 ;;
5655 esac
5656
5657 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5658 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5659
5660 ;;
5661 esac
5662 ;;
5663 (*)
5664
5665 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5666 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5667
5668 ;;
5669 esac
5670 ;;
5671 (yes)
5672
5673 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5674 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5675
5676 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5677
5678 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5679 && test -z "${cf_tst_cflags}" \
5680 && cf_fix_cppflags=no
5681 ;;
5682 esac
5683 done
5684
5685 if test -n "$cf_new_cflags" ; then
5686 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5687
5688 echo "${as_me:-configure}:5688: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5689
5690 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5691 CFLAGS="${CFLAGS}$cf_new_cflags"
5692
5693 fi
5694
5695 if test -n "$cf_new_cppflags" ; then
5696 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5697
5698 echo "${as_me:-configure}:5698: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5699
5700 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5701 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5702
5703 fi
5704
5705 if test -n "$cf_new_extra_cppflags" ; then
5706 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5707
5708 echo "${as_me:-configure}:5708: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5709
5710 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5711 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5712
5713 fi
5714
5715 done
5716
5717 fi
5718
5719 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5720 echo "$as_me:5720: checking if _XOPEN_SOURCE really is set" >&5
5721 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5722 cat >"conftest.$ac_ext" <<_ACEOF
5723 #line 5723 "configure"
5724 #include "confdefs.h"
5725 #include <stdlib.h>
5726 int
5727 main (void)
5728 {
5729
5730 #ifndef _XOPEN_SOURCE
5731 #error _XOPEN_SOURCE is not defined
5732 #endif
5733 ;
5734 return 0;
5735 }
5736 _ACEOF
5737 rm -f "conftest.$ac_objext"
5738 if { (eval echo "$as_me:5738: \"$ac_compile\"") >&5
5739 (eval $ac_compile) 2>&5
5740 ac_status=$?
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit "$ac_status"); } &&
5743 { ac_try='test -s "conftest.$ac_objext"'
5744 { (eval echo "$as_me:5744: \"$ac_try\"") >&5
5745 (eval $ac_try) 2>&5
5746 ac_status=$?
5747 echo "$as_me:5747: \$? = $ac_status" >&5
5748 (exit "$ac_status"); }; }; then
5749 cf_XOPEN_SOURCE_set=yes
5750 else
5751 echo "$as_me: failed program was:" >&5
5752 cat "conftest.$ac_ext" >&5
5753 cf_XOPEN_SOURCE_set=no
5754 fi
5755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5756 echo "$as_me:5756: result: $cf_XOPEN_SOURCE_set" >&5
5757 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5758 if test "$cf_XOPEN_SOURCE_set" = yes
5759 then
5760 cat >"conftest.$ac_ext" <<_ACEOF
5761 #line 5761 "configure"
5762 #include "confdefs.h"
5763 #include <stdlib.h>
5764 int
5765 main (void)
5766 {
5767
5768 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5769 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5770 #endif
5771 ;
5772 return 0;
5773 }
5774 _ACEOF
5775 rm -f "conftest.$ac_objext"
5776 if { (eval echo "$as_me:5776: \"$ac_compile\"") >&5
5777 (eval $ac_compile) 2>&5
5778 ac_status=$?
5779 echo "$as_me:5779: \$? = $ac_status" >&5
5780 (exit "$ac_status"); } &&
5781 { ac_try='test -s "conftest.$ac_objext"'
5782 { (eval echo "$as_me:5782: \"$ac_try\"") >&5
5783 (eval $ac_try) 2>&5
5784 ac_status=$?
5785 echo "$as_me:5785: \$? = $ac_status" >&5
5786 (exit "$ac_status"); }; }; then
5787 cf_XOPEN_SOURCE_set_ok=yes
5788 else
5789 echo "$as_me: failed program was:" >&5
5790 cat "conftest.$ac_ext" >&5
5791 cf_XOPEN_SOURCE_set_ok=no
5792 fi
5793 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5794 if test "$cf_XOPEN_SOURCE_set_ok" = no
5795 then
5796 { echo "$as_me:5796: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5797 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5798 fi
5799 else
5800
5801 echo "$as_me:5801: checking if we should define _XOPEN_SOURCE" >&5
5802 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5803 if test "${cf_cv_xopen_source+set}" = set; then
5804 echo $ECHO_N "(cached) $ECHO_C" >&6
5805 else
5806
5807 cat >"conftest.$ac_ext" <<_ACEOF
5808 #line 5808 "configure"
5809 #include "confdefs.h"
5810
5811 $ac_includes_default
5812
5813 int
5814 main (void)
5815 {
5816
5817 #ifndef _XOPEN_SOURCE
5818 #error _XOPEN_SOURCE is not defined
5819 #endif
5820
5821 ;
5822 return 0;
5823 }
5824 _ACEOF
5825 rm -f "conftest.$ac_objext"
5826 if { (eval echo "$as_me:5826: \"$ac_compile\"") >&5
5827 (eval $ac_compile) 2>&5
5828 ac_status=$?
5829 echo "$as_me:5829: \$? = $ac_status" >&5
5830 (exit "$ac_status"); } &&
5831 { ac_try='test -s "conftest.$ac_objext"'
5832 { (eval echo "$as_me:5832: \"$ac_try\"") >&5
5833 (eval $ac_try) 2>&5
5834 ac_status=$?
5835 echo "$as_me:5835: \$? = $ac_status" >&5
5836 (exit "$ac_status"); }; }; then
5837 cf_cv_xopen_source=no
5838 else
5839 echo "$as_me: failed program was:" >&5
5840 cat "conftest.$ac_ext" >&5
5841 cf_save="$CPPFLAGS"
5842
5843 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5844 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5845
5846 cat >"conftest.$ac_ext" <<_ACEOF
5847 #line 5847 "configure"
5848 #include "confdefs.h"
5849
5850 $ac_includes_default
5851
5852 int
5853 main (void)
5854 {
5855
5856 #ifndef _XOPEN_SOURCE
5857 #error _XOPEN_SOURCE is not defined
5858 #endif
5859
5860 ;
5861 return 0;
5862 }
5863 _ACEOF
5864 rm -f "conftest.$ac_objext"
5865 if { (eval echo "$as_me:5865: \"$ac_compile\"") >&5
5866 (eval $ac_compile) 2>&5
5867 ac_status=$?
5868 echo "$as_me:5868: \$? = $ac_status" >&5
5869 (exit "$ac_status"); } &&
5870 { ac_try='test -s "conftest.$ac_objext"'
5871 { (eval echo "$as_me:5871: \"$ac_try\"") >&5
5872 (eval $ac_try) 2>&5
5873 ac_status=$?
5874 echo "$as_me:5874: \$? = $ac_status" >&5
5875 (exit "$ac_status"); }; }; then
5876 cf_cv_xopen_source=no
5877 else
5878 echo "$as_me: failed program was:" >&5
5879 cat "conftest.$ac_ext" >&5
5880 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5881 fi
5882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5883 CPPFLAGS="$cf_save"
5884
5885 fi
5886 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5887
5888 fi
5889 echo "$as_me:5889: result: $cf_cv_xopen_source" >&5
5890 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5891
5892 if test "$cf_cv_xopen_source" != no ; then
5893
5894 CFLAGS=`echo "$CFLAGS" | \
5895 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5896 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5897
5898 CPPFLAGS=`echo "$CPPFLAGS" | \
5899 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5900 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5901
5902 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5903
5904 for cf_add_cflags in $cf_temp_xopen_source
5905 do
5906 case "x$cf_add_cflags" in
5907 (x-[DU]*)
5908
5909 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5910 while true
5911 do
5912 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5913 test "$CFLAGS" != "$cf_old_cflag" || break
5914
5915 CFLAGS="$cf_old_cflag"
5916 done
5917
5918 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5919 while true
5920 do
5921 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5922 test "$CPPFLAGS" != "$cf_old_cflag" || break
5923
5924 CPPFLAGS="$cf_old_cflag"
5925 done
5926
5927 ;;
5928 esac
5929
5930 cf_fix_cppflags=no
5931 cf_new_cflags=
5932 cf_new_cppflags=
5933 cf_new_extra_cppflags=
5934
5935 for cf_add_cflags in $cf_add_cflags
5936 do
5937 case "$cf_fix_cppflags" in
5938 (no)
5939 case "$cf_add_cflags" in
5940 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5941 case "$cf_add_cflags" in
5942 (-D*)
5943 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5944
5945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5946 && test -z "${cf_tst_cflags}" \
5947 && cf_fix_cppflags=yes
5948
5949 if test "$cf_fix_cppflags" = yes ; then
5950
5951 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5952 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5953
5954 continue
5955 elif test "${cf_tst_cflags}" = "\"'" ; then
5956
5957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5959
5960 continue
5961 fi
5962 ;;
5963 esac
5964 case "$CPPFLAGS" in
5965 (*$cf_add_cflags)
5966 ;;
5967 (*)
5968 case "$cf_add_cflags" in
5969 (-D*)
5970 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5971
5972 CPPFLAGS=`echo "$CPPFLAGS" | \
5973 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5974 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5975
5976 ;;
5977 esac
5978
5979 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5980 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5981
5982 ;;
5983 esac
5984 ;;
5985 (*)
5986
5987 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5988 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5989
5990 ;;
5991 esac
5992 ;;
5993 (yes)
5994
5995 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5996 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5997
5998 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5999
6000 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6001 && test -z "${cf_tst_cflags}" \
6002 && cf_fix_cppflags=no
6003 ;;
6004 esac
6005 done
6006
6007 if test -n "$cf_new_cflags" ; then
6008
6009 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6010 CFLAGS="${CFLAGS}$cf_new_cflags"
6011
6012 fi
6013
6014 if test -n "$cf_new_cppflags" ; then
6015
6016 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6017 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6018
6019 fi
6020
6021 if test -n "$cf_new_extra_cppflags" ; then
6022
6023 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6024 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6025
6026 fi
6027
6028 done
6029
6030 fi
6031
6032 fi
6033 fi
6034 fi # cf_cv_posix_visible
6035
6036 echo "$as_me:6036: checking for ANSI C header files" >&5
6037 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6038 if test "${ac_cv_header_stdc+set}" = set; then
6039 echo $ECHO_N "(cached) $ECHO_C" >&6
6040 else
6041 cat >"conftest.$ac_ext" <<_ACEOF
6042 #line 6042 "configure"
6043 #include "confdefs.h"
6044 #include <stdlib.h>
6045 #include <stdarg.h>
6046 #include <string.h>
6047 #include <float.h>
6048
6049 _ACEOF
6050 if { (eval echo "$as_me:6050: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6051 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6052 ac_status=$?
6053 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6054 rm -f conftest.er1
6055 cat conftest.err >&5
6056 echo "$as_me:6056: \$? = $ac_status" >&5
6057 (exit "$ac_status"); } >/dev/null; then
6058 if test -s conftest.err; then
6059 ac_cpp_err=$ac_c_preproc_warn_flag
6060 else
6061 ac_cpp_err=
6062 fi
6063 else
6064 ac_cpp_err=yes
6065 fi
6066 if test -z "$ac_cpp_err"; then
6067 ac_cv_header_stdc=yes
6068 else
6069 echo "$as_me: failed program was:" >&5
6070 cat "conftest.$ac_ext" >&5
6071 ac_cv_header_stdc=no
6072 fi
6073 rm -f conftest.err "conftest.$ac_ext"
6074
6075 if test $ac_cv_header_stdc = yes; then
6076 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6077 cat >"conftest.$ac_ext" <<_ACEOF
6078 #line 6078 "configure"
6079 #include "confdefs.h"
6080 #include <string.h>
6081
6082 _ACEOF
6083 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6084 $EGREP "memchr" >/dev/null 2>&1; then
6085 :
6086 else
6087 ac_cv_header_stdc=no
6088 fi
6089 rm -rf conftest*
6090
6091 fi
6092
6093 if test $ac_cv_header_stdc = yes; then
6094 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6095 cat >"conftest.$ac_ext" <<_ACEOF
6096 #line 6096 "configure"
6097 #include "confdefs.h"
6098 #include <stdlib.h>
6099
6100 _ACEOF
6101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6102 $EGREP "free" >/dev/null 2>&1; then
6103 :
6104 else
6105 ac_cv_header_stdc=no
6106 fi
6107 rm -rf conftest*
6108
6109 fi
6110
6111 if test $ac_cv_header_stdc = yes; then
6112 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6113 if test "$cross_compiling" = yes; then
6114 :
6115 else
6116 cat >"conftest.$ac_ext" <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6119 #include <ctype.h>
6120 #if ((' ' & 0x0FF) == 0x020)
6121 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6122 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6123 #else
6124 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6125 || ('j' <= (c) && (c) <= 'r') \
6126 || ('s' <= (c) && (c) <= 'z'))
6127 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6128 #endif
6129
6130 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6131 int
6132 main (void)
6133 {
6134 int i;
6135 for (i = 0; i < 256; i++)
6136 if (XOR (islower (i), ISLOWER (i))
6137 || toupper (i) != TOUPPER (i))
6138 $ac_main_return(2);
6139 $ac_main_return (0);
6140 }
6141 _ACEOF
6142 rm -f "conftest$ac_exeext"
6143 if { (eval echo "$as_me:6143: \"$ac_link\"") >&5
6144 (eval $ac_link) 2>&5
6145 ac_status=$?
6146 echo "$as_me:6146: \$? = $ac_status" >&5
6147 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6148 { (eval echo "$as_me:6148: \"$ac_try\"") >&5
6149 (eval $ac_try) 2>&5
6150 ac_status=$?
6151 echo "$as_me:6151: \$? = $ac_status" >&5
6152 (exit "$ac_status"); }; }; then
6153 :
6154 else
6155 echo "$as_me: program exited with status $ac_status" >&5
6156 echo "$as_me: failed program was:" >&5
6157 cat "conftest.$ac_ext" >&5
6158 ac_cv_header_stdc=no
6159 fi
6160 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6161 fi
6162 fi
6163 fi
6164 echo "$as_me:6164: result: $ac_cv_header_stdc" >&5
6165 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6166 if test $ac_cv_header_stdc = yes; then
6167
6168 cat >>confdefs.h <<\EOF
6169 #define STDC_HEADERS 1
6170 EOF
6171
6172 fi
6173
6174 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6175
6176 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6177 inttypes.h stdint.h unistd.h
6178 do
6179 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6180 echo "$as_me:6180: checking for $ac_header" >&5
6181 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6182 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6183 echo $ECHO_N "(cached) $ECHO_C" >&6
6184 else
6185 cat >"conftest.$ac_ext" <<_ACEOF
6186 #line 6186 "configure"
6187 #include "confdefs.h"
6188 $ac_includes_default
6189 #include <$ac_header>
6190 _ACEOF
6191 rm -f "conftest.$ac_objext"
6192 if { (eval echo "$as_me:6192: \"$ac_compile\"") >&5
6193 (eval $ac_compile) 2>&5
6194 ac_status=$?
6195 echo "$as_me:6195: \$? = $ac_status" >&5
6196 (exit "$ac_status"); } &&
6197 { ac_try='test -s "conftest.$ac_objext"'
6198 { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199 (eval $ac_try) 2>&5
6200 ac_status=$?
6201 echo "$as_me:6201: \$? = $ac_status" >&5
6202 (exit "$ac_status"); }; }; then
6203 eval "$as_ac_Header=yes"
6204 else
6205 echo "$as_me: failed program was:" >&5
6206 cat "conftest.$ac_ext" >&5
6207 eval "$as_ac_Header=no"
6208 fi
6209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6210 fi
6211 echo "$as_me:6211: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6212 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6213 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6214 cat >>confdefs.h <<EOF
6215 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6216 EOF
6217
6218 fi
6219 done
6220
6221 echo "$as_me:6221: checking whether exit is declared" >&5
6222 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6223 if test "${ac_cv_have_decl_exit+set}" = set; then
6224 echo $ECHO_N "(cached) $ECHO_C" >&6
6225 else
6226 cat >"conftest.$ac_ext" <<_ACEOF
6227 #line 6227 "configure"
6228 #include "confdefs.h"
6229 $ac_includes_default
6230 int
6231 main (void)
6232 {
6233 #ifndef exit
6234 (void) exit;
6235 #endif
6236
6237 ;
6238 return 0;
6239 }
6240 _ACEOF
6241 rm -f "conftest.$ac_objext"
6242 if { (eval echo "$as_me:6242: \"$ac_compile\"") >&5
6243 (eval $ac_compile) 2>&5
6244 ac_status=$?
6245 echo "$as_me:6245: \$? = $ac_status" >&5
6246 (exit "$ac_status"); } &&
6247 { ac_try='test -s "conftest.$ac_objext"'
6248 { (eval echo "$as_me:6248: \"$ac_try\"") >&5
6249 (eval $ac_try) 2>&5
6250 ac_status=$?
6251 echo "$as_me:6251: \$? = $ac_status" >&5
6252 (exit "$ac_status"); }; }; then
6253 ac_cv_have_decl_exit=yes
6254 else
6255 echo "$as_me: failed program was:" >&5
6256 cat "conftest.$ac_ext" >&5
6257 ac_cv_have_decl_exit=no
6258 fi
6259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6260 fi
6261 echo "$as_me:6261: result: $ac_cv_have_decl_exit" >&5
6262 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6263
6264 echo "$as_me:6264: checking for signal global datatype" >&5
6265 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
6266 if test "${cf_cv_sig_atomic_t+set}" = set; then
6267 echo $ECHO_N "(cached) $ECHO_C" >&6
6268 else
6269
6270 for cf_type in \
6271 "volatile sig_atomic_t" \
6272 "sig_atomic_t" \
6273 "int"
6274 do
6275 cat >"conftest.$ac_ext" <<_ACEOF
6276 #line 6276 "configure"
6277 #include "confdefs.h"
6278
6279 #include <sys/types.h>
6280 #include <signal.h>
6281 #include <stdio.h>
6282
6283 extern $cf_type x;
6284 $cf_type x;
6285 static void handler(int sig)
6286 {
6287 (void)sig;
6288 x = 5;
6289 }
6290 int
6291 main (void)
6292 {
6293 signal(SIGINT, handler);
6294 x = 1
6295 ;
6296 return 0;
6297 }
6298 _ACEOF
6299 rm -f "conftest.$ac_objext"
6300 if { (eval echo "$as_me:6300: \"$ac_compile\"") >&5
6301 (eval $ac_compile) 2>&5
6302 ac_status=$?
6303 echo "$as_me:6303: \$? = $ac_status" >&5
6304 (exit "$ac_status"); } &&
6305 { ac_try='test -s "conftest.$ac_objext"'
6306 { (eval echo "$as_me:6306: \"$ac_try\"") >&5
6307 (eval $ac_try) 2>&5
6308 ac_status=$?
6309 echo "$as_me:6309: \$? = $ac_status" >&5
6310 (exit "$ac_status"); }; }; then
6311 cf_cv_sig_atomic_t=$cf_type
6312 else
6313 echo "$as_me: failed program was:" >&5
6314 cat "conftest.$ac_ext" >&5
6315 cf_cv_sig_atomic_t=no
6316 fi
6317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6318 test "$cf_cv_sig_atomic_t" != no && break
6319 done
6320
6321 fi
6322
6323 echo "$as_me:6323: result: $cf_cv_sig_atomic_t" >&5
6324 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
6325 test "$cf_cv_sig_atomic_t" != no &&
6326 cat >>confdefs.h <<EOF
6327 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
6328 EOF
6329
6330 # Work around breakage on OS X
6331
6332 echo "$as_me:6332: checking if SIGWINCH is defined" >&5
6333 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6334 if test "${cf_cv_define_sigwinch+set}" = set; then
6335 echo $ECHO_N "(cached) $ECHO_C" >&6
6336 else
6337
6338 cat >"conftest.$ac_ext" <<_ACEOF
6339 #line 6339 "configure"
6340 #include "confdefs.h"
6341
6342 #include <sys/types.h>
6343 #include <sys/signal.h>
6344
6345 int
6346 main (void)
6347 {
6348 int x = SIGWINCH; (void)x
6349 ;
6350 return 0;
6351 }
6352 _ACEOF
6353 rm -f "conftest.$ac_objext"
6354 if { (eval echo "$as_me:6354: \"$ac_compile\"") >&5
6355 (eval $ac_compile) 2>&5
6356 ac_status=$?
6357 echo "$as_me:6357: \$? = $ac_status" >&5
6358 (exit "$ac_status"); } &&
6359 { ac_try='test -s "conftest.$ac_objext"'
6360 { (eval echo "$as_me:6360: \"$ac_try\"") >&5
6361 (eval $ac_try) 2>&5
6362 ac_status=$?
6363 echo "$as_me:6363: \$? = $ac_status" >&5
6364 (exit "$ac_status"); }; }; then
6365 cf_cv_define_sigwinch=yes
6366 else
6367 echo "$as_me: failed program was:" >&5
6368 cat "conftest.$ac_ext" >&5
6369 cat >"conftest.$ac_ext" <<_ACEOF
6370 #line 6370 "configure"
6371 #include "confdefs.h"
6372
6373 #undef _XOPEN_SOURCE
6374 #undef _POSIX_SOURCE
6375 #undef _POSIX_C_SOURCE
6376 #include <sys/types.h>
6377 #include <sys/signal.h>
6378
6379 int
6380 main (void)
6381 {
6382 int x = SIGWINCH; (void)x
6383 ;
6384 return 0;
6385 }
6386 _ACEOF
6387 rm -f "conftest.$ac_objext"
6388 if { (eval echo "$as_me:6388: \"$ac_compile\"") >&5
6389 (eval $ac_compile) 2>&5
6390 ac_status=$?
6391 echo "$as_me:6391: \$? = $ac_status" >&5
6392 (exit "$ac_status"); } &&
6393 { ac_try='test -s "conftest.$ac_objext"'
6394 { (eval echo "$as_me:6394: \"$ac_try\"") >&5
6395 (eval $ac_try) 2>&5
6396 ac_status=$?
6397 echo "$as_me:6397: \$? = $ac_status" >&5
6398 (exit "$ac_status"); }; }; then
6399 cf_cv_define_sigwinch=maybe
6400 else
6401 echo "$as_me: failed program was:" >&5
6402 cat "conftest.$ac_ext" >&5
6403 cf_cv_define_sigwinch=no
6404 fi
6405 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6406
6407 fi
6408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6409
6410 fi
6411 echo "$as_me:6411: result: $cf_cv_define_sigwinch" >&5
6412 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6413
6414 if test "$cf_cv_define_sigwinch" = maybe ; then
6415 echo "$as_me:6415: checking for actual SIGWINCH definition" >&5
6416 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6417 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6418 echo $ECHO_N "(cached) $ECHO_C" >&6
6419 else
6420
6421 cf_cv_fixup_sigwinch=unknown
6422 cf_sigwinch=32
6423 while test "$cf_sigwinch" != 1
6424 do
6425 cat >"conftest.$ac_ext" <<_ACEOF
6426 #line 6426 "configure"
6427 #include "confdefs.h"
6428
6429 #undef _XOPEN_SOURCE
6430 #undef _POSIX_SOURCE
6431 #undef _POSIX_C_SOURCE
6432 #include <sys/types.h>
6433 #include <sys/signal.h>
6434
6435 int
6436 main (void)
6437 {
6438
6439 #if SIGWINCH != $cf_sigwinch
6440 #error SIGWINCH is not $cf_sigwinch
6441 #endif
6442 int x = SIGWINCH; (void)x
6443 ;
6444 return 0;
6445 }
6446 _ACEOF
6447 rm -f "conftest.$ac_objext"
6448 if { (eval echo "$as_me:6448: \"$ac_compile\"") >&5
6449 (eval $ac_compile) 2>&5
6450 ac_status=$?
6451 echo "$as_me:6451: \$? = $ac_status" >&5
6452 (exit "$ac_status"); } &&
6453 { ac_try='test -s "conftest.$ac_objext"'
6454 { (eval echo "$as_me:6454: \"$ac_try\"") >&5
6455 (eval $ac_try) 2>&5
6456 ac_status=$?
6457 echo "$as_me:6457: \$? = $ac_status" >&5
6458 (exit "$ac_status"); }; }; then
6459 cf_cv_fixup_sigwinch=$cf_sigwinch
6460 break
6461 else
6462 echo "$as_me: failed program was:" >&5
6463 cat "conftest.$ac_ext" >&5
6464 fi
6465 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6466
6467 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
6468 done
6469
6470 fi
6471 echo "$as_me:6471: result: $cf_cv_fixup_sigwinch" >&5
6472 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6473
6474 if test "$cf_cv_fixup_sigwinch" != unknown ; then
6475 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6476 fi
6477 fi
6478
6479 # Checks for CODESET support.
6480
6481 echo "$as_me:6481: checking for nl_langinfo and CODESET" >&5
6482 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6483 if test "${am_cv_langinfo_codeset+set}" = set; then
6484 echo $ECHO_N "(cached) $ECHO_C" >&6
6485 else
6486 cat >"conftest.$ac_ext" <<_ACEOF
6487 #line 6487 "configure"
6488 #include "confdefs.h"
6489
6490 $ac_includes_default
6491 #include <langinfo.h>
6492 int
6493 main (void)
6494 {
6495 char* cs = nl_langinfo(CODESET); (void)cs
6496 ;
6497 return 0;
6498 }
6499 _ACEOF
6500 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6501 if { (eval echo "$as_me:6501: \"$ac_link\"") >&5
6502 (eval $ac_link) 2>&5
6503 ac_status=$?
6504 echo "$as_me:6504: \$? = $ac_status" >&5
6505 (exit "$ac_status"); } &&
6506 { ac_try='test -s "conftest$ac_exeext"'
6507 { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6508 (eval $ac_try) 2>&5
6509 ac_status=$?
6510 echo "$as_me:6510: \$? = $ac_status" >&5
6511 (exit "$ac_status"); }; }; then
6512 am_cv_langinfo_codeset=yes
6513 else
6514 echo "$as_me: failed program was:" >&5
6515 cat "conftest.$ac_ext" >&5
6516 am_cv_langinfo_codeset=no
6517 fi
6518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6519
6520 fi
6521 echo "$as_me:6521: result: $am_cv_langinfo_codeset" >&5
6522 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6523 if test "$am_cv_langinfo_codeset" = yes; then
6524
6525 cat >>confdefs.h <<\EOF
6526 #define HAVE_LANGINFO_CODESET 1
6527 EOF
6528
6529 fi
6530
6531 echo "$as_me:6531: checking if you want to use pkg-config" >&5
6532 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6533
6534 # Check whether --with-pkg-config or --without-pkg-config was given.
6535 if test "${with_pkg_config+set}" = set; then
6536 withval="$with_pkg_config"
6537 cf_pkg_config=$withval
6538 else
6539 cf_pkg_config=yes
6540 fi;
6541 echo "$as_me:6541: result: $cf_pkg_config" >&5
6542 echo "${ECHO_T}$cf_pkg_config" >&6
6543
6544 case "$cf_pkg_config" in
6545 (no)
6546 PKG_CONFIG=none
6547 ;;
6548 (yes)
6549
6550 if test -n "$ac_tool_prefix"; then
6551 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6552 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6553 echo "$as_me:6553: checking for $ac_word" >&5
6554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6555 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6556 echo $ECHO_N "(cached) $ECHO_C" >&6
6557 else
6558 case $PKG_CONFIG in
6559 [\\/]* | ?:[\\/]*)
6560 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6561 ;;
6562 *)
6563 ac_save_IFS=$IFS; IFS=$ac_path_separator
6564 ac_dummy="$PATH"
6565 for ac_dir in $ac_dummy; do
6566 IFS=$ac_save_IFS
6567 test -z "$ac_dir" && ac_dir=.
6568 if $as_executable_p "$ac_dir/$ac_word"; then
6569 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6570 echo "$as_me:6570: found $ac_dir/$ac_word" >&5
6571 break
6572 fi
6573 done
6574
6575 ;;
6576 esac
6577 fi
6578 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6579
6580 if test -n "$PKG_CONFIG"; then
6581 echo "$as_me:6581: result: $PKG_CONFIG" >&5
6582 echo "${ECHO_T}$PKG_CONFIG" >&6
6583 else
6584 echo "$as_me:6584: result: no" >&5
6585 echo "${ECHO_T}no" >&6
6586 fi
6587
6588 fi
6589 if test -z "$ac_cv_path_PKG_CONFIG"; then
6590 ac_pt_PKG_CONFIG=$PKG_CONFIG
6591 # Extract the first word of "pkg-config", so it can be a program name with args.
6592 set dummy pkg-config; ac_word=$2
6593 echo "$as_me:6593: checking for $ac_word" >&5
6594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6595 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6596 echo $ECHO_N "(cached) $ECHO_C" >&6
6597 else
6598 case $ac_pt_PKG_CONFIG in
6599 [\\/]* | ?:[\\/]*)
6600 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6601 ;;
6602 *)
6603 ac_save_IFS=$IFS; IFS=$ac_path_separator
6604 ac_dummy="$PATH"
6605 for ac_dir in $ac_dummy; do
6606 IFS=$ac_save_IFS
6607 test -z "$ac_dir" && ac_dir=.
6608 if $as_executable_p "$ac_dir/$ac_word"; then
6609 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6610 echo "$as_me:6610: found $ac_dir/$ac_word" >&5
6611 break
6612 fi
6613 done
6614
6615 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6616 ;;
6617 esac
6618 fi
6619 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6620
6621 if test -n "$ac_pt_PKG_CONFIG"; then
6622 echo "$as_me:6622: result: $ac_pt_PKG_CONFIG" >&5
6623 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6624 else
6625 echo "$as_me:6625: result: no" >&5
6626 echo "${ECHO_T}no" >&6
6627 fi
6628
6629 PKG_CONFIG=$ac_pt_PKG_CONFIG
6630 else
6631 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6632 fi
6633
6634 ;;
6635 (*)
6636 PKG_CONFIG=$withval
6637 ;;
6638 esac
6639
6640 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6641 if test "$PKG_CONFIG" != none ; then
6642
6643 if test "x$prefix" != xNONE; then
6644 cf_path_syntax="$prefix"
6645 else
6646 cf_path_syntax="$ac_default_prefix"
6647 fi
6648
6649 case "x$PKG_CONFIG" in
6650 (x\$\(*\)*|x\'*\'*)
6651 ;;
6652 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
6653 ;;
6654 (x\$\{*prefix\}*|x\$\{*dir\}*)
6655 eval PKG_CONFIG="$PKG_CONFIG"
6656 case "x$PKG_CONFIG" in
6657 (xNONE/*)
6658 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6659 ;;
6660 esac
6661 ;;
6662 (xno|xNONE/*)
6663 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6664 ;;
6665 (*)
6666 { { echo "$as_me:6666: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6667 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6668 { (exit 1); exit 1; }; }
6669 ;;
6670 esac
6671
6672 elif test "x$cf_pkg_config" != xno ; then
6673 { echo "$as_me:6673: WARNING: pkg-config is not installed" >&5
6674 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6675 fi
6676
6677 echo "$as_me:6677: checking if you want to see long compiling messages" >&5
6678 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6679
6680 # Check whether --enable-echo or --disable-echo was given.
6681 if test "${enable_echo+set}" = set; then
6682 enableval="$enable_echo"
6683 test "$enableval" != no && enableval=yes
6684 if test "$enableval" != "yes" ; then
6685
6686 ECHO_LT='--silent'
6687 ECHO_LD='@echo linking $@;'
6688 RULE_CC='@echo compiling $<'
6689 SHOW_CC='@echo compiling $@'
6690 ECHO_CC='@'
6691
6692 else
6693
6694 ECHO_LT=''
6695 ECHO_LD=''
6696 RULE_CC=''
6697 SHOW_CC=''
6698 ECHO_CC=''
6699
6700 fi
6701 else
6702 enableval=yes
6703
6704 ECHO_LT=''
6705 ECHO_LD=''
6706 RULE_CC=''
6707 SHOW_CC=''
6708 ECHO_CC=''
6709
6710 fi;
6711 echo "$as_me:6711: result: $enableval" >&5
6712 echo "${ECHO_T}$enableval" >&6
6713
6714 echo "$as_me:6714: checking for an installation directory prefix" >&5
6715 echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
6716
6717 # Check whether --with-install-prefix or --without-install-prefix was given.
6718 if test "${with_install_prefix+set}" = set; then
6719 withval="$with_install_prefix"
6720 case "x$withval" in
6721 (xyes|xno)
6722 ;;
6723 (*) DESTDIR="$withval"
6724 ;;
6725 esac
6726 fi;
6727 echo "$as_me:6727: result: ${DESTDIR:-(none)}" >&5
6728 echo "${ECHO_T}${DESTDIR:-(none)}" >&6
6729
6730 SET_DESTDIR=
6731 test -n "$DESTDIR" && SET_DESTDIR="DESTDIR=$DESTDIR"
6732
6733 echo "$as_me:6733: checking if installation directory prefix should be merged" >&5
6734 echo $ECHO_N "checking if installation directory prefix should be merged... $ECHO_C" >&6
6735
6736 # Check whether --enable-install-prefix or --disable-install-prefix was given.
6737 if test "${enable_install_prefix+set}" = set; then
6738 enableval="$enable_install_prefix"
6739 test "$enableval" != yes && enableval=no
6740 if test "$enableval" != "no" ; then
6741 cf_install_prefix=yes
6742 else
6743 cf_install_prefix=no
6744 fi
6745 else
6746 enableval=no
6747 cf_install_prefix=no
6748
6749 fi;
6750 echo "$as_me:6750: result: $cf_install_prefix" >&5
6751 echo "${ECHO_T}$cf_install_prefix" >&6
6752
6753 if test "$cf_install_prefix" = yes ; then
6754 MERGE_PREFIX=':$(prefix)%=%'
6755 else
6756 MERGE_PREFIX=''
6757 fi
6758
6759 echo "$as_me:6759: checking for ncurses wrap-prefix" >&5
6760 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6761
6762 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6763 if test "${with_ncurses_wrap_prefix+set}" = set; then
6764 withval="$with_ncurses_wrap_prefix"
6765 NCURSES_WRAP_PREFIX=$withval
6766 else
6767 NCURSES_WRAP_PREFIX=_nc_
6768 fi;
6769 echo "$as_me:6769: result: $NCURSES_WRAP_PREFIX" >&5
6770 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6771
6772 echo "$as_me:6772: checking if you want to check for wide-character functions" >&5
6773 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6774
6775 # Check whether --enable-widec or --disable-widec was given.
6776 if test "${enable_widec+set}" = set; then
6777 enableval="$enable_widec"
6778 test "$enableval" != no && enableval=yes
6779 if test "$enableval" != "yes" ; then
6780 cf_enable_widec=no
6781 else
6782 cf_enable_widec=yes
6783 fi
6784 else
6785 enableval=yes
6786 cf_enable_widec=yes
6787
6788 fi;
6789 echo "$as_me:6789: result: $cf_enable_widec" >&5
6790 echo "${ECHO_T}$cf_enable_widec" >&6
6791
6792 echo "$as_me:6792: checking for specific curses-directory" >&5
6793 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6794
6795 # Check whether --with-curses-dir or --without-curses-dir was given.
6796 if test "${with_curses_dir+set}" = set; then
6797 withval="$with_curses_dir"
6798 cf_cv_curses_dir=$withval
6799 else
6800 cf_cv_curses_dir=no
6801 fi;
6802 echo "$as_me:6802: result: $cf_cv_curses_dir" >&5
6803 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6804
6805 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6806 then
6807
6808 if test "x$prefix" != xNONE; then
6809 cf_path_syntax="$prefix"
6810 else
6811 cf_path_syntax="$ac_default_prefix"
6812 fi
6813
6814 case "x$withval" in
6815 (x\$\(*\)*|x\'*\'*)
6816 ;;
6817 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
6818 ;;
6819 (x\$\{*prefix\}*|x\$\{*dir\}*)
6820 eval withval="$withval"
6821 case "x$withval" in
6822 (xNONE/*)
6823 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6824 ;;
6825 esac
6826 ;;
6827 (xno|xNONE/*)
6828 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6829 ;;
6830 (*)
6831 { { echo "$as_me:6831: error: expected a pathname, not \"$withval\"" >&5
6832 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6833 { (exit 1); exit 1; }; }
6834 ;;
6835 esac
6836
6837 if test -d "$cf_cv_curses_dir"
6838 then
6839
6840 if test -n "$cf_cv_curses_dir/include" ; then
6841 for cf_add_incdir in $cf_cv_curses_dir/include
6842 do
6843 while test "$cf_add_incdir" != /usr/include
6844 do
6845 if test -d "$cf_add_incdir"
6846 then
6847 cf_have_incdir=no
6848 if test -n "$CFLAGS$CPPFLAGS" ; then
6849 # a loop is needed to ensure we can add subdirs of existing dirs
6850 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6851 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6852 cf_have_incdir=yes; break
6853 fi
6854 done
6855 fi
6856
6857 if test "$cf_have_incdir" = no ; then
6858 if test "$cf_add_incdir" = /usr/local/include ; then
6859 if test "$GCC" = yes
6860 then
6861 cf_save_CPPFLAGS=$CPPFLAGS
6862
6863 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6864 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6865
6866 cat >"conftest.$ac_ext" <<_ACEOF
6867 #line 6867 "configure"
6868 #include "confdefs.h"
6869 #include <stdio.h>
6870 int
6871 main (void)
6872 {
6873 printf("Hello")
6874 ;
6875 return 0;
6876 }
6877 _ACEOF
6878 rm -f "conftest.$ac_objext"
6879 if { (eval echo "$as_me:6879: \"$ac_compile\"") >&5
6880 (eval $ac_compile) 2>&5
6881 ac_status=$?
6882 echo "$as_me:6882: \$? = $ac_status" >&5
6883 (exit "$ac_status"); } &&
6884 { ac_try='test -s "conftest.$ac_objext"'
6885 { (eval echo "$as_me:6885: \"$ac_try\"") >&5
6886 (eval $ac_try) 2>&5
6887 ac_status=$?
6888 echo "$as_me:6888: \$? = $ac_status" >&5
6889 (exit "$ac_status"); }; }; then
6890 :
6891 else
6892 echo "$as_me: failed program was:" >&5
6893 cat "conftest.$ac_ext" >&5
6894 cf_have_incdir=yes
6895 fi
6896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6897 CPPFLAGS=$cf_save_CPPFLAGS
6898 fi
6899 fi
6900 fi
6901
6902 if test "$cf_have_incdir" = no ; then
6903 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6904
6905 echo "${as_me:-configure}:6905: testing adding $cf_add_incdir to include-path ..." 1>&5
6906
6907 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6908
6909 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6910 test "$cf_top_incdir" = "$cf_add_incdir" && break
6911 cf_add_incdir="$cf_top_incdir"
6912 else
6913 break
6914 fi
6915 else
6916 break
6917 fi
6918 done
6919 done
6920 fi
6921
6922 if test -n "$cf_cv_curses_dir/lib" ; then
6923 for cf_add_libdir in $cf_cv_curses_dir/lib
6924 do
6925 if test "$cf_add_libdir" = /usr/lib ; then
6926 :
6927 elif test -d "$cf_add_libdir"
6928 then
6929 cf_have_libdir=no
6930 if test -n "$LDFLAGS$LIBS" ; then
6931 # a loop is needed to ensure we can add subdirs of existing dirs
6932 for cf_test_libdir in $LDFLAGS $LIBS ; do
6933 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6934 cf_have_libdir=yes; break
6935 fi
6936 done
6937 fi
6938 if test "$cf_have_libdir" = no ; then
6939 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6940
6941 echo "${as_me:-configure}:6941: testing adding $cf_add_libdir to library-path ..." 1>&5
6942
6943 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6944 fi
6945 fi
6946 done
6947 fi
6948
6949 fi
6950 fi
6951
6952 cf_cv_screen=curses
6953
6954 echo "$as_me:6954: checking for specified curses library type" >&5
6955 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6956
6957 # Check whether --with-screen or --without-screen was given.
6958 if test "${with_screen+set}" = set; then
6959 withval="$with_screen"
6960 cf_cv_screen=$withval
6961 else
6962
6963 # Check whether --with-ncursesw or --without-ncursesw was given.
6964 if test "${with_ncursesw+set}" = set; then
6965 withval="$with_ncursesw"
6966 cf_cv_screen=ncursesw
6967 else
6968
6969 # Check whether --with-ncurses or --without-ncurses was given.
6970 if test "${with_ncurses+set}" = set; then
6971 withval="$with_ncurses"
6972 cf_cv_screen=ncurses
6973 else
6974
6975 # Check whether --with-pdcurses or --without-pdcurses was given.
6976 if test "${with_pdcurses+set}" = set; then
6977 withval="$with_pdcurses"
6978 cf_cv_screen=pdcurses
6979 else
6980
6981 # Check whether --with-curses-colr or --without-curses-colr was given.
6982 if test "${with_curses_colr+set}" = set; then
6983 withval="$with_curses_colr"
6984 cf_cv_screen=curses_colr
6985 else
6986
6987 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6988 if test "${with_curses_5lib+set}" = set; then
6989 withval="$with_curses_5lib"
6990 cf_cv_screen=curses_5lib
6991 fi;
6992 fi;
6993 fi;
6994 fi;
6995 fi;
6996 fi;
6997
6998 echo "$as_me:6998: result: $cf_cv_screen" >&5
6999 echo "${ECHO_T}$cf_cv_screen" >&6
7000
7001 case $cf_cv_screen in
7002 (curses|curses_*)
7003
7004 echo "$as_me:7004: checking for extra include directories" >&5
7005 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
7006 if test "${cf_cv_curses_incdir+set}" = set; then
7007 echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009
7010 cf_cv_curses_incdir=no
7011 case "$host_os" in
7012 (hpux10.*)
7013 if test "x$cf_cv_screen" = "xcurses_colr"
7014 then
7015 test -d /usr/include/curses_colr && \
7016 cf_cv_curses_incdir="-I/usr/include/curses_colr"
7017 fi
7018 ;;
7019 (sunos3*|sunos4*)
7020 if test "x$cf_cv_screen" = "xcurses_5lib"
7021 then
7022 test -d /usr/5lib && \
7023 test -d /usr/5include && \
7024 cf_cv_curses_incdir="-I/usr/5include"
7025 fi
7026 ;;
7027 esac
7028
7029 fi
7030 echo "$as_me:7030: result: $cf_cv_curses_incdir" >&5
7031 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
7032 if test "$cf_cv_curses_incdir" != no
7033 then
7034
7035 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7036 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
7037
7038 fi
7039
7040 echo "$as_me:7040: checking if we have identified curses headers" >&5
7041 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7042 if test "${cf_cv_ncurses_header+set}" = set; then
7043 echo $ECHO_N "(cached) $ECHO_C" >&6
7044 else
7045
7046 cf_cv_ncurses_header=none
7047 for cf_header in \
7048 ncurses.h \
7049 curses.h ncurses/ncurses.h ncurses/curses.h
7050 do
7051 cat >"conftest.$ac_ext" <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 #include <${cf_header}>
7055 int
7056 main (void)
7057 {
7058 initscr(); endwin()
7059 ;
7060 return 0;
7061 }
7062 _ACEOF
7063 rm -f "conftest.$ac_objext"
7064 if { (eval echo "$as_me:7064: \"$ac_compile\"") >&5
7065 (eval $ac_compile) 2>&5
7066 ac_status=$?
7067 echo "$as_me:7067: \$? = $ac_status" >&5
7068 (exit "$ac_status"); } &&
7069 { ac_try='test -s "conftest.$ac_objext"'
7070 { (eval echo "$as_me:7070: \"$ac_try\"") >&5
7071 (eval $ac_try) 2>&5
7072 ac_status=$?
7073 echo "$as_me:7073: \$? = $ac_status" >&5
7074 (exit "$ac_status"); }; }; then
7075 cf_cv_ncurses_header=$cf_header; break
7076 else
7077 echo "$as_me: failed program was:" >&5
7078 cat "conftest.$ac_ext" >&5
7079 fi
7080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7081 done
7082
7083 fi
7084 echo "$as_me:7084: result: $cf_cv_ncurses_header" >&5
7085 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7086
7087 if test "$cf_cv_ncurses_header" = none ; then
7088 { { echo "$as_me:7088: error: No curses header-files found" >&5
7089 echo "$as_me: error: No curses header-files found" >&2;}
7090 { (exit 1); exit 1; }; }
7091 fi
7092
7093 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7094
7095 for ac_header in $cf_cv_ncurses_header
7096 do
7097 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7098 echo "$as_me:7098: checking for $ac_header" >&5
7099 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7100 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7101 echo $ECHO_N "(cached) $ECHO_C" >&6
7102 else
7103 cat >"conftest.$ac_ext" <<_ACEOF
7104 #line 7104 "configure"
7105 #include "confdefs.h"
7106 #include <$ac_header>
7107 _ACEOF
7108 if { (eval echo "$as_me:7108: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7109 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7110 ac_status=$?
7111 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7112 rm -f conftest.er1
7113 cat conftest.err >&5
7114 echo "$as_me:7114: \$? = $ac_status" >&5
7115 (exit "$ac_status"); } >/dev/null; then
7116 if test -s conftest.err; then
7117 ac_cpp_err=$ac_c_preproc_warn_flag
7118 else
7119 ac_cpp_err=
7120 fi
7121 else
7122 ac_cpp_err=yes
7123 fi
7124 if test -z "$ac_cpp_err"; then
7125 eval "$as_ac_Header=yes"
7126 else
7127 echo "$as_me: failed program was:" >&5
7128 cat "conftest.$ac_ext" >&5
7129 eval "$as_ac_Header=no"
7130 fi
7131 rm -f conftest.err "conftest.$ac_ext"
7132 fi
7133 echo "$as_me:7133: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7134 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7135 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7136 cat >>confdefs.h <<EOF
7137 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7138 EOF
7139
7140 fi
7141 done
7142
7143 echo "$as_me:7143: checking for terminfo header" >&5
7144 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7145 if test "${cf_cv_term_header+set}" = set; then
7146 echo $ECHO_N "(cached) $ECHO_C" >&6
7147 else
7148
7149 case "${cf_cv_ncurses_header}" in
7150 (*/ncurses.h|*/ncursesw.h)
7151 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7152 ;;
7153 (*)
7154 cf_term_header=term.h
7155 ;;
7156 esac
7157
7158 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7159 do
7160 cat >"conftest.$ac_ext" <<_ACEOF
7161 #line 7161 "configure"
7162 #include "confdefs.h"
7163 #include <stdio.h>
7164 #include <${cf_cv_ncurses_header:-curses.h}>
7165 #include <$cf_test>
7166
7167 int
7168 main (void)
7169 {
7170 int x = auto_left_margin; (void)x
7171 ;
7172 return 0;
7173 }
7174 _ACEOF
7175 rm -f "conftest.$ac_objext"
7176 if { (eval echo "$as_me:7176: \"$ac_compile\"") >&5
7177 (eval $ac_compile) 2>&5
7178 ac_status=$?
7179 echo "$as_me:7179: \$? = $ac_status" >&5
7180 (exit "$ac_status"); } &&
7181 { ac_try='test -s "conftest.$ac_objext"'
7182 { (eval echo "$as_me:7182: \"$ac_try\"") >&5
7183 (eval $ac_try) 2>&5
7184 ac_status=$?
7185 echo "$as_me:7185: \$? = $ac_status" >&5
7186 (exit "$ac_status"); }; }; then
7187
7188 cf_cv_term_header="$cf_test"
7189 else
7190 echo "$as_me: failed program was:" >&5
7191 cat "conftest.$ac_ext" >&5
7192
7193 cf_cv_term_header=unknown
7194
7195 fi
7196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7197 test "$cf_cv_term_header" != unknown && break
7198 done
7199
7200 fi
7201 echo "$as_me:7201: result: $cf_cv_term_header" >&5
7202 echo "${ECHO_T}$cf_cv_term_header" >&6
7203
7204 # Set definitions to allow ifdef'ing to accommodate subdirectories
7205
7206 case "$cf_cv_term_header" in
7207 (*term.h)
7208
7209 cat >>confdefs.h <<\EOF
7210 #define HAVE_TERM_H 1
7211 EOF
7212
7213 ;;
7214 esac
7215
7216 case "$cf_cv_term_header" in
7217 (ncurses/term.h)
7218
7219 cat >>confdefs.h <<\EOF
7220 #define HAVE_NCURSES_TERM_H 1
7221 EOF
7222
7223 ;;
7224 (ncursesw/term.h)
7225
7226 cat >>confdefs.h <<\EOF
7227 #define HAVE_NCURSESW_TERM_H 1
7228 EOF
7229
7230 ;;
7231 esac
7232
7233 echo "$as_me:7233: checking for ncurses version" >&5
7234 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7235 if test "${cf_cv_ncurses_version+set}" = set; then
7236 echo $ECHO_N "(cached) $ECHO_C" >&6
7237 else
7238
7239 cf_cv_ncurses_version=no
7240 cf_tempfile=out$$
7241 rm -f "$cf_tempfile"
7242 if test "$cross_compiling" = yes; then
7243
7244 # This will not work if the preprocessor splits the line after the
7245 # Autoconf token. The 'unproto' program does that.
7246 cat > "conftest.$ac_ext" <<EOF
7247 #include <${cf_cv_ncurses_header:-curses.h}>
7248 #undef Autoconf
7249 #ifdef NCURSES_VERSION
7250 Autoconf NCURSES_VERSION
7251 #else
7252 #ifdef __NCURSES_H
7253 Autoconf "old"
7254 #endif
7255 ;
7256 #endif
7257 EOF
7258 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7259 { (eval echo "$as_me:7259: \"$cf_try\"") >&5
7260 (eval $cf_try) 2>&5
7261 ac_status=$?
7262 echo "$as_me:7262: \$? = $ac_status" >&5
7263 (exit "$ac_status"); }
7264 if test -f conftest.out ; then
7265 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
7266 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7267 rm -f conftest.out
7268 fi
7269
7270 else
7271 cat >"conftest.$ac_ext" <<_ACEOF
7272 #line 7272 "configure"
7273 #include "confdefs.h"
7274
7275 $ac_includes_default
7276
7277 #include <${cf_cv_ncurses_header:-curses.h}>
7278
7279 int main(void)
7280 {
7281 FILE *fp = fopen("$cf_tempfile", "w");
7282 #ifdef NCURSES_VERSION
7283 # ifdef NCURSES_VERSION_PATCH
7284 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7285 # else
7286 fprintf(fp, "%s\\n", NCURSES_VERSION);
7287 # endif
7288 #else
7289 # ifdef __NCURSES_H
7290 fprintf(fp, "old\\n");
7291 # else
7292 #error expected ncurses header to define __NCURSES_H
7293 # endif
7294 #endif
7295 ${cf_cv_main_return:-return}(0);
7296 }
7297 _ACEOF
7298 rm -f "conftest$ac_exeext"
7299 if { (eval echo "$as_me:7299: \"$ac_link\"") >&5
7300 (eval $ac_link) 2>&5
7301 ac_status=$?
7302 echo "$as_me:7302: \$? = $ac_status" >&5
7303 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7304 { (eval echo "$as_me:7304: \"$ac_try\"") >&5
7305 (eval $ac_try) 2>&5
7306 ac_status=$?
7307 echo "$as_me:7307: \$? = $ac_status" >&5
7308 (exit "$ac_status"); }; }; then
7309
7310 cf_cv_ncurses_version=`cat $cf_tempfile`
7311 else
7312 echo "$as_me: program exited with status $ac_status" >&5
7313 echo "$as_me: failed program was:" >&5
7314 cat "conftest.$ac_ext" >&5
7315 fi
7316 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7317 fi
7318 rm -f "$cf_tempfile"
7319
7320 fi
7321 echo "$as_me:7321: result: $cf_cv_ncurses_version" >&5
7322 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7323 test "$cf_cv_ncurses_version" = no ||
7324 cat >>confdefs.h <<\EOF
7325 #define NCURSES 1
7326 EOF
7327
7328 echo "$as_me:7328: checking if we have identified curses libraries" >&5
7329 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
7330 cat >"conftest.$ac_ext" <<_ACEOF
7331 #line 7331 "configure"
7332 #include "confdefs.h"
7333 #include <${cf_cv_ncurses_header:-curses.h}>
7334 int
7335 main (void)
7336 {
7337 initscr(); endwin()
7338 ;
7339 return 0;
7340 }
7341 _ACEOF
7342 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7343 if { (eval echo "$as_me:7343: \"$ac_link\"") >&5
7344 (eval $ac_link) 2>&5
7345 ac_status=$?
7346 echo "$as_me:7346: \$? = $ac_status" >&5
7347 (exit "$ac_status"); } &&
7348 { ac_try='test -s "conftest$ac_exeext"'
7349 { (eval echo "$as_me:7349: \"$ac_try\"") >&5
7350 (eval $ac_try) 2>&5
7351 ac_status=$?
7352 echo "$as_me:7352: \$? = $ac_status" >&5
7353 (exit "$ac_status"); }; }; then
7354 cf_result=yes
7355 else
7356 echo "$as_me: failed program was:" >&5
7357 cat "conftest.$ac_ext" >&5
7358 cf_result=no
7359 fi
7360 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7361 echo "$as_me:7361: result: $cf_result" >&5
7362 echo "${ECHO_T}$cf_result" >&6
7363
7364 if test "$cf_result" = no ; then
7365 case "$host_os" in
7366 (freebsd*)
7367 echo "$as_me:7367: checking for tgoto in -lmytinfo" >&5
7368 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7369 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7370 echo $ECHO_N "(cached) $ECHO_C" >&6
7371 else
7372 ac_check_lib_save_LIBS=$LIBS
7373 LIBS="-lmytinfo $LIBS"
7374 cat >"conftest.$ac_ext" <<_ACEOF
7375 #line 7375 "configure"
7376 #include "confdefs.h"
7377
7378 /* Override any gcc2 internal prototype to avoid an error. */
7379 #ifdef __cplusplus
7380 extern "C"
7381 #endif
7382 /* We use char because int might match the return type of a gcc2
7383 builtin and then its argument prototype would still apply. */
7384 char tgoto (void);
7385 int
7386 main (void)
7387 {
7388 tgoto ();
7389 ;
7390 return 0;
7391 }
7392 _ACEOF
7393 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7394 if { (eval echo "$as_me:7394: \"$ac_link\"") >&5
7395 (eval $ac_link) 2>&5
7396 ac_status=$?
7397 echo "$as_me:7397: \$? = $ac_status" >&5
7398 (exit "$ac_status"); } &&
7399 { ac_try='test -s "conftest$ac_exeext"'
7400 { (eval echo "$as_me:7400: \"$ac_try\"") >&5
7401 (eval $ac_try) 2>&5
7402 ac_status=$?
7403 echo "$as_me:7403: \$? = $ac_status" >&5
7404 (exit "$ac_status"); }; }; then
7405 ac_cv_lib_mytinfo_tgoto=yes
7406 else
7407 echo "$as_me: failed program was:" >&5
7408 cat "conftest.$ac_ext" >&5
7409 ac_cv_lib_mytinfo_tgoto=no
7410 fi
7411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7412 LIBS=$ac_check_lib_save_LIBS
7413 fi
7414 echo "$as_me:7414: result: $ac_cv_lib_mytinfo_tgoto" >&5
7415 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7416 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
7417
7418 cf_add_libs="$LIBS"
7419 # reverse order
7420 cf_add_0lib=
7421 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7422 # filter duplicates
7423 for cf_add_1lib in $cf_add_0lib; do
7424 for cf_add_2lib in $cf_add_libs; do
7425 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7426 cf_add_1lib=
7427 break
7428 fi
7429 done
7430 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7431 done
7432 LIBS="$cf_add_libs"
7433
7434 fi
7435
7436 ;;
7437 (hpux10.*)
7438 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
7439 # next (1998), and xcurses "newer" (2000). There is no header file for
7440 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
7441 # term.h) for cur_colr
7442 if test "x$cf_cv_screen" = "xcurses_colr"
7443 then
7444 echo "$as_me:7444: checking for initscr in -lcur_colr" >&5
7445 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
7446 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
7447 echo $ECHO_N "(cached) $ECHO_C" >&6
7448 else
7449 ac_check_lib_save_LIBS=$LIBS
7450 LIBS="-lcur_colr $LIBS"
7451 cat >"conftest.$ac_ext" <<_ACEOF
7452 #line 7452 "configure"
7453 #include "confdefs.h"
7454
7455 /* Override any gcc2 internal prototype to avoid an error. */
7456 #ifdef __cplusplus
7457 extern "C"
7458 #endif
7459 /* We use char because int might match the return type of a gcc2
7460 builtin and then its argument prototype would still apply. */
7461 char initscr (void);
7462 int
7463 main (void)
7464 {
7465 initscr ();
7466 ;
7467 return 0;
7468 }
7469 _ACEOF
7470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7471 if { (eval echo "$as_me:7471: \"$ac_link\"") >&5
7472 (eval $ac_link) 2>&5
7473 ac_status=$?
7474 echo "$as_me:7474: \$? = $ac_status" >&5
7475 (exit "$ac_status"); } &&
7476 { ac_try='test -s "conftest$ac_exeext"'
7477 { (eval echo "$as_me:7477: \"$ac_try\"") >&5
7478 (eval $ac_try) 2>&5
7479 ac_status=$?
7480 echo "$as_me:7480: \$? = $ac_status" >&5
7481 (exit "$ac_status"); }; }; then
7482 ac_cv_lib_cur_colr_initscr=yes
7483 else
7484 echo "$as_me: failed program was:" >&5
7485 cat "conftest.$ac_ext" >&5
7486 ac_cv_lib_cur_colr_initscr=no
7487 fi
7488 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7489 LIBS=$ac_check_lib_save_LIBS
7490 fi
7491 echo "$as_me:7491: result: $ac_cv_lib_cur_colr_initscr" >&5
7492 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
7493 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
7494
7495 cf_add_libs="$LIBS"
7496 # reverse order
7497 cf_add_0lib=
7498 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7499 # filter duplicates
7500 for cf_add_1lib in $cf_add_0lib; do
7501 for cf_add_2lib in $cf_add_libs; do
7502 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7503 cf_add_1lib=
7504 break
7505 fi
7506 done
7507 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7508 done
7509 LIBS="$cf_add_libs"
7510
7511 ac_cv_func_initscr=yes
7512
7513 else
7514
7515 echo "$as_me:7515: checking for initscr in -lHcurses" >&5
7516 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
7517 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
7518 echo $ECHO_N "(cached) $ECHO_C" >&6
7519 else
7520 ac_check_lib_save_LIBS=$LIBS
7521 LIBS="-lHcurses $LIBS"
7522 cat >"conftest.$ac_ext" <<_ACEOF
7523 #line 7523 "configure"
7524 #include "confdefs.h"
7525
7526 /* Override any gcc2 internal prototype to avoid an error. */
7527 #ifdef __cplusplus
7528 extern "C"
7529 #endif
7530 /* We use char because int might match the return type of a gcc2
7531 builtin and then its argument prototype would still apply. */
7532 char initscr (void);
7533 int
7534 main (void)
7535 {
7536 initscr ();
7537 ;
7538 return 0;
7539 }
7540 _ACEOF
7541 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7542 if { (eval echo "$as_me:7542: \"$ac_link\"") >&5
7543 (eval $ac_link) 2>&5
7544 ac_status=$?
7545 echo "$as_me:7545: \$? = $ac_status" >&5
7546 (exit "$ac_status"); } &&
7547 { ac_try='test -s "conftest$ac_exeext"'
7548 { (eval echo "$as_me:7548: \"$ac_try\"") >&5
7549 (eval $ac_try) 2>&5
7550 ac_status=$?
7551 echo "$as_me:7551: \$? = $ac_status" >&5
7552 (exit "$ac_status"); }; }; then
7553 ac_cv_lib_Hcurses_initscr=yes
7554 else
7555 echo "$as_me: failed program was:" >&5
7556 cat "conftest.$ac_ext" >&5
7557 ac_cv_lib_Hcurses_initscr=no
7558 fi
7559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7560 LIBS=$ac_check_lib_save_LIBS
7561 fi
7562 echo "$as_me:7562: result: $ac_cv_lib_Hcurses_initscr" >&5
7563 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
7564 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
7565
7566 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
7567
7568 cf_add_libs="$LIBS"
7569 # reverse order
7570 cf_add_0lib=
7571 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7572 # filter duplicates
7573 for cf_add_1lib in $cf_add_0lib; do
7574 for cf_add_2lib in $cf_add_libs; do
7575 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7576 cf_add_1lib=
7577 break
7578 fi
7579 done
7580 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7581 done
7582 LIBS="$cf_add_libs"
7583
7584 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7585 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
7586
7587 ac_cv_func_initscr=yes
7588
7589 fi
7590
7591 fi
7592
7593 fi
7594 ;;
7595 (linux*)
7596 case `arch 2>/dev/null` in
7597 (x86_64)
7598 if test -d /lib64
7599 then
7600
7601 if test -n "/lib64" ; then
7602 for cf_add_libdir in /lib64
7603 do
7604 if test "$cf_add_libdir" = /usr/lib ; then
7605 :
7606 elif test -d "$cf_add_libdir"
7607 then
7608 cf_have_libdir=no
7609 if test -n "$LDFLAGS$LIBS" ; then
7610 # a loop is needed to ensure we can add subdirs of existing dirs
7611 for cf_test_libdir in $LDFLAGS $LIBS ; do
7612 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7613 cf_have_libdir=yes; break
7614 fi
7615 done
7616 fi
7617 if test "$cf_have_libdir" = no ; then
7618 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7619
7620 echo "${as_me:-configure}:7620: testing adding $cf_add_libdir to library-path ..." 1>&5
7621
7622 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7623 fi
7624 fi
7625 done
7626 fi
7627
7628 else
7629
7630 if test -n "/lib" ; then
7631 for cf_add_libdir in /lib
7632 do
7633 if test "$cf_add_libdir" = /usr/lib ; then
7634 :
7635 elif test -d "$cf_add_libdir"
7636 then
7637 cf_have_libdir=no
7638 if test -n "$LDFLAGS$LIBS" ; then
7639 # a loop is needed to ensure we can add subdirs of existing dirs
7640 for cf_test_libdir in $LDFLAGS $LIBS ; do
7641 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7642 cf_have_libdir=yes; break
7643 fi
7644 done
7645 fi
7646 if test "$cf_have_libdir" = no ; then
7647 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7648
7649 echo "${as_me:-configure}:7649: testing adding $cf_add_libdir to library-path ..." 1>&5
7650
7651 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7652 fi
7653 fi
7654 done
7655 fi
7656
7657 fi
7658 ;;
7659 (*)
7660
7661 if test -n "/lib" ; then
7662 for cf_add_libdir in /lib
7663 do
7664 if test "$cf_add_libdir" = /usr/lib ; then
7665 :
7666 elif test -d "$cf_add_libdir"
7667 then
7668 cf_have_libdir=no
7669 if test -n "$LDFLAGS$LIBS" ; then
7670 # a loop is needed to ensure we can add subdirs of existing dirs
7671 for cf_test_libdir in $LDFLAGS $LIBS ; do
7672 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7673 cf_have_libdir=yes; break
7674 fi
7675 done
7676 fi
7677 if test "$cf_have_libdir" = no ; then
7678 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7679
7680 echo "${as_me:-configure}:7680: testing adding $cf_add_libdir to library-path ..." 1>&5
7681
7682 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7683 fi
7684 fi
7685 done
7686 fi
7687
7688 ;;
7689 esac
7690 ;;
7691 (sunos3*|sunos4*)
7692 if test "x$cf_cv_screen" = "xcurses_5lib"
7693 then
7694 if test -d /usr/5lib ; then
7695
7696 if test -n "/usr/5lib" ; then
7697 for cf_add_libdir in /usr/5lib
7698 do
7699 if test "$cf_add_libdir" = /usr/lib ; then
7700 :
7701 elif test -d "$cf_add_libdir"
7702 then
7703 cf_have_libdir=no
7704 if test -n "$LDFLAGS$LIBS" ; then
7705 # a loop is needed to ensure we can add subdirs of existing dirs
7706 for cf_test_libdir in $LDFLAGS $LIBS ; do
7707 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7708 cf_have_libdir=yes; break
7709 fi
7710 done
7711 fi
7712 if test "$cf_have_libdir" = no ; then
7713 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7714
7715 echo "${as_me:-configure}:7715: testing adding $cf_add_libdir to library-path ..." 1>&5
7716
7717 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7718 fi
7719 fi
7720 done
7721 fi
7722
7723 cf_add_libs="$LIBS"
7724 # reverse order
7725 cf_add_0lib=
7726 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7727 # filter duplicates
7728 for cf_add_1lib in $cf_add_0lib; do
7729 for cf_add_2lib in $cf_add_libs; do
7730 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7731 cf_add_1lib=
7732 break
7733 fi
7734 done
7735 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7736 done
7737 LIBS="$cf_add_libs"
7738
7739 fi
7740 fi
7741 ac_cv_func_initscr=yes
7742 ;;
7743 esac
7744
7745 if test ".$ac_cv_func_initscr" != .yes ; then
7746 cf_save_LIBS="$LIBS"
7747
7748 if test ".${cf_cv_ncurses_version:-no}" != .no
7749 then
7750 cf_check_list="ncurses curses cursesX"
7751 else
7752 cf_check_list="cursesX curses ncurses"
7753 fi
7754
7755 # Check for library containing tgoto. Do this before curses library
7756 # because it may be needed to link the test-case for initscr.
7757 if test "x$cf_term_lib" = x
7758 then
7759 echo "$as_me:7759: checking for tgoto" >&5
7760 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7761 if test "${ac_cv_func_tgoto+set}" = set; then
7762 echo $ECHO_N "(cached) $ECHO_C" >&6
7763 else
7764 cat >"conftest.$ac_ext" <<_ACEOF
7765 #line 7765 "configure"
7766 #include "confdefs.h"
7767 #define tgoto autoconf_temporary
7768 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7769 #undef tgoto
7770
7771 #ifdef __cplusplus
7772 extern "C"
7773 #endif
7774
7775 /* We use char because int might match the return type of a gcc2
7776 builtin and then its argument prototype would still apply. */
7777 char tgoto (void);
7778
7779 int
7780 main (void)
7781 {
7782
7783 /* The GNU C library defines stubs for functions which it implements
7784 to always fail with ENOSYS. Some functions are actually named
7785 something starting with __ and the normal name is an alias. */
7786 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7787 #error found stub for tgoto
7788 #endif
7789
7790 return tgoto ();
7791 ;
7792 return 0;
7793 }
7794 _ACEOF
7795 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7796 if { (eval echo "$as_me:7796: \"$ac_link\"") >&5
7797 (eval $ac_link) 2>&5
7798 ac_status=$?
7799 echo "$as_me:7799: \$? = $ac_status" >&5
7800 (exit "$ac_status"); } &&
7801 { ac_try='test -s "conftest$ac_exeext"'
7802 { (eval echo "$as_me:7802: \"$ac_try\"") >&5
7803 (eval $ac_try) 2>&5
7804 ac_status=$?
7805 echo "$as_me:7805: \$? = $ac_status" >&5
7806 (exit "$ac_status"); }; }; then
7807 ac_cv_func_tgoto=yes
7808 else
7809 echo "$as_me: failed program was:" >&5
7810 cat "conftest.$ac_ext" >&5
7811 ac_cv_func_tgoto=no
7812 fi
7813 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7814 fi
7815 echo "$as_me:7815: result: $ac_cv_func_tgoto" >&5
7816 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7817 if test "$ac_cv_func_tgoto" = yes; then
7818 cf_term_lib=predefined
7819 else
7820
7821 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7822 do
7823 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7824 echo "$as_me:7824: checking for tgoto in -l$cf_term_lib" >&5
7825 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7826 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7827 echo $ECHO_N "(cached) $ECHO_C" >&6
7828 else
7829 ac_check_lib_save_LIBS=$LIBS
7830 LIBS="-l$cf_term_lib $LIBS"
7831 cat >"conftest.$ac_ext" <<_ACEOF
7832 #line 7832 "configure"
7833 #include "confdefs.h"
7834
7835 /* Override any gcc2 internal prototype to avoid an error. */
7836 #ifdef __cplusplus
7837 extern "C"
7838 #endif
7839 /* We use char because int might match the return type of a gcc2
7840 builtin and then its argument prototype would still apply. */
7841 char tgoto (void);
7842 int
7843 main (void)
7844 {
7845 tgoto ();
7846 ;
7847 return 0;
7848 }
7849 _ACEOF
7850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7851 if { (eval echo "$as_me:7851: \"$ac_link\"") >&5
7852 (eval $ac_link) 2>&5
7853 ac_status=$?
7854 echo "$as_me:7854: \$? = $ac_status" >&5
7855 (exit "$ac_status"); } &&
7856 { ac_try='test -s "conftest$ac_exeext"'
7857 { (eval echo "$as_me:7857: \"$ac_try\"") >&5
7858 (eval $ac_try) 2>&5
7859 ac_status=$?
7860 echo "$as_me:7860: \$? = $ac_status" >&5
7861 (exit "$ac_status"); }; }; then
7862 eval "$as_ac_Lib=yes"
7863 else
7864 echo "$as_me: failed program was:" >&5
7865 cat "conftest.$ac_ext" >&5
7866 eval "$as_ac_Lib=no"
7867 fi
7868 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7869 LIBS=$ac_check_lib_save_LIBS
7870 fi
7871 echo "$as_me:7871: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7872 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7873 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7874
7875 : "${cf_nculib_root:=$cf_term_lib}"
7876 break
7877
7878 fi
7879
7880 done
7881
7882 fi
7883
7884 fi
7885
7886 # Check for library containing initscr
7887 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7888 if test "x$cf_curs_lib" = x
7889 then
7890 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7891 do
7892 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7893 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7894 echo "$as_me:7894: checking if we can link with $cf_curs_lib library" >&5
7895 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7896 cat >"conftest.$ac_ext" <<_ACEOF
7897 #line 7897 "configure"
7898 #include "confdefs.h"
7899 #include <${cf_cv_ncurses_header:-curses.h}>
7900 int
7901 main (void)
7902 {
7903 initscr()
7904 ;
7905 return 0;
7906 }
7907 _ACEOF
7908 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7909 if { (eval echo "$as_me:7909: \"$ac_link\"") >&5
7910 (eval $ac_link) 2>&5
7911 ac_status=$?
7912 echo "$as_me:7912: \$? = $ac_status" >&5
7913 (exit "$ac_status"); } &&
7914 { ac_try='test -s "conftest$ac_exeext"'
7915 { (eval echo "$as_me:7915: \"$ac_try\"") >&5
7916 (eval $ac_try) 2>&5
7917 ac_status=$?
7918 echo "$as_me:7918: \$? = $ac_status" >&5
7919 (exit "$ac_status"); }; }; then
7920 cf_result=yes
7921 else
7922 echo "$as_me: failed program was:" >&5
7923 cat "conftest.$ac_ext" >&5
7924 cf_result=no
7925 fi
7926 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7927 echo "$as_me:7927: result: $cf_result" >&5
7928 echo "${ECHO_T}$cf_result" >&6
7929 test "$cf_result" = yes && break
7930 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7931 cf_result=no
7932 elif test "$cf_term_lib" != predefined ; then
7933 echo "$as_me:7933: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7934 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7935 cat >"conftest.$ac_ext" <<_ACEOF
7936 #line 7936 "configure"
7937 #include "confdefs.h"
7938 #include <${cf_cv_ncurses_header:-curses.h}>
7939 int
7940 main (void)
7941 {
7942 initscr(); endwin();
7943 ;
7944 return 0;
7945 }
7946 _ACEOF
7947 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7948 if { (eval echo "$as_me:7948: \"$ac_link\"") >&5
7949 (eval $ac_link) 2>&5
7950 ac_status=$?
7951 echo "$as_me:7951: \$? = $ac_status" >&5
7952 (exit "$ac_status"); } &&
7953 { ac_try='test -s "conftest$ac_exeext"'
7954 { (eval echo "$as_me:7954: \"$ac_try\"") >&5
7955 (eval $ac_try) 2>&5
7956 ac_status=$?
7957 echo "$as_me:7957: \$? = $ac_status" >&5
7958 (exit "$ac_status"); }; }; then
7959 cf_result=no
7960 else
7961 echo "$as_me: failed program was:" >&5
7962 cat "conftest.$ac_ext" >&5
7963
7964 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7965 cat >"conftest.$ac_ext" <<_ACEOF
7966 #line 7966 "configure"
7967 #include "confdefs.h"
7968 #include <${cf_cv_ncurses_header:-curses.h}>
7969 int
7970 main (void)
7971 {
7972 initscr()
7973 ;
7974 return 0;
7975 }
7976 _ACEOF
7977 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7978 if { (eval echo "$as_me:7978: \"$ac_link\"") >&5
7979 (eval $ac_link) 2>&5
7980 ac_status=$?
7981 echo "$as_me:7981: \$? = $ac_status" >&5
7982 (exit "$ac_status"); } &&
7983 { ac_try='test -s "conftest$ac_exeext"'
7984 { (eval echo "$as_me:7984: \"$ac_try\"") >&5
7985 (eval $ac_try) 2>&5
7986 ac_status=$?
7987 echo "$as_me:7987: \$? = $ac_status" >&5
7988 (exit "$ac_status"); }; }; then
7989 cf_result=yes
7990 else
7991 echo "$as_me: failed program was:" >&5
7992 cat "conftest.$ac_ext" >&5
7993 cf_result=error
7994 fi
7995 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7996
7997 fi
7998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7999 echo "$as_me:7999: result: $cf_result" >&5
8000 echo "${ECHO_T}$cf_result" >&6
8001 test "$cf_result" != error && break
8002 fi
8003 done
8004 fi
8005 test "$cf_curs_lib" = unknown && { { echo "$as_me:8005: error: no curses library found" >&5
8006 echo "$as_me: error: no curses library found" >&2;}
8007 { (exit 1); exit 1; }; }
8008 fi
8009 fi
8010
8011 ;;
8012 (ncursesw*)
8013
8014 for ac_header in wchar.h
8015 do
8016 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8017 echo "$as_me:8017: checking for $ac_header" >&5
8018 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8019 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8020 echo $ECHO_N "(cached) $ECHO_C" >&6
8021 else
8022 cat >"conftest.$ac_ext" <<_ACEOF
8023 #line 8023 "configure"
8024 #include "confdefs.h"
8025 #include <$ac_header>
8026 _ACEOF
8027 if { (eval echo "$as_me:8027: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8028 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8029 ac_status=$?
8030 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8031 rm -f conftest.er1
8032 cat conftest.err >&5
8033 echo "$as_me:8033: \$? = $ac_status" >&5
8034 (exit "$ac_status"); } >/dev/null; then
8035 if test -s conftest.err; then
8036 ac_cpp_err=$ac_c_preproc_warn_flag
8037 else
8038 ac_cpp_err=
8039 fi
8040 else
8041 ac_cpp_err=yes
8042 fi
8043 if test -z "$ac_cpp_err"; then
8044 eval "$as_ac_Header=yes"
8045 else
8046 echo "$as_me: failed program was:" >&5
8047 cat "conftest.$ac_ext" >&5
8048 eval "$as_ac_Header=no"
8049 fi
8050 rm -f conftest.err "conftest.$ac_ext"
8051 fi
8052 echo "$as_me:8052: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8053 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8054 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8055 cat >>confdefs.h <<EOF
8056 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8057 EOF
8058
8059 fi
8060 done
8061
8062 echo "$as_me:8062: checking for multibyte character support" >&5
8063 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8064 if test "${cf_cv_utf8_lib+set}" = set; then
8065 echo $ECHO_N "(cached) $ECHO_C" >&6
8066 else
8067
8068 cf_save_LIBS="$LIBS"
8069 cat >"conftest.$ac_ext" <<_ACEOF
8070 #line 8070 "configure"
8071 #include "confdefs.h"
8072
8073 $ac_includes_default
8074 #ifdef HAVE_WCHAR_H
8075 #include <wchar.h>
8076 #endif
8077
8078 int
8079 main (void)
8080 {
8081 putwc(0,(FILE*)0);
8082 ;
8083 return 0;
8084 }
8085 _ACEOF
8086 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8087 if { (eval echo "$as_me:8087: \"$ac_link\"") >&5
8088 (eval $ac_link) 2>&5
8089 ac_status=$?
8090 echo "$as_me:8090: \$? = $ac_status" >&5
8091 (exit "$ac_status"); } &&
8092 { ac_try='test -s "conftest$ac_exeext"'
8093 { (eval echo "$as_me:8093: \"$ac_try\"") >&5
8094 (eval $ac_try) 2>&5
8095 ac_status=$?
8096 echo "$as_me:8096: \$? = $ac_status" >&5
8097 (exit "$ac_status"); }; }; then
8098 cf_cv_utf8_lib=yes
8099 else
8100 echo "$as_me: failed program was:" >&5
8101 cat "conftest.$ac_ext" >&5
8102
8103 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8104 # will be set on completion of the AC_LINK_IFELSE below.
8105 cf_cv_header_path_utf8=
8106 cf_cv_library_path_utf8=
8107
8108 echo "${as_me:-configure}:8108: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8109
8110 cf_save_LIBS="$LIBS"
8111
8112 cat >"conftest.$ac_ext" <<_ACEOF
8113 #line 8113 "configure"
8114 #include "confdefs.h"
8115
8116 #include <libutf8.h>
8117 int
8118 main (void)
8119 {
8120 putwc(0,(FILE*)0);
8121 ;
8122 return 0;
8123 }
8124 _ACEOF
8125 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8126 if { (eval echo "$as_me:8126: \"$ac_link\"") >&5
8127 (eval $ac_link) 2>&5
8128 ac_status=$?
8129 echo "$as_me:8129: \$? = $ac_status" >&5
8130 (exit "$ac_status"); } &&
8131 { ac_try='test -s "conftest$ac_exeext"'
8132 { (eval echo "$as_me:8132: \"$ac_try\"") >&5
8133 (eval $ac_try) 2>&5
8134 ac_status=$?
8135 echo "$as_me:8135: \$? = $ac_status" >&5
8136 (exit "$ac_status"); }; }; then
8137
8138 cf_cv_find_linkage_utf8=yes
8139 cf_cv_header_path_utf8=/usr/include
8140 cf_cv_library_path_utf8=/usr/lib
8141
8142 else
8143 echo "$as_me: failed program was:" >&5
8144 cat "conftest.$ac_ext" >&5
8145
8146 LIBS="-lutf8 $cf_save_LIBS"
8147
8148 cat >"conftest.$ac_ext" <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151
8152 #include <libutf8.h>
8153 int
8154 main (void)
8155 {
8156 putwc(0,(FILE*)0);
8157 ;
8158 return 0;
8159 }
8160 _ACEOF
8161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8162 if { (eval echo "$as_me:8162: \"$ac_link\"") >&5
8163 (eval $ac_link) 2>&5
8164 ac_status=$?
8165 echo "$as_me:8165: \$? = $ac_status" >&5
8166 (exit "$ac_status"); } &&
8167 { ac_try='test -s "conftest$ac_exeext"'
8168 { (eval echo "$as_me:8168: \"$ac_try\"") >&5
8169 (eval $ac_try) 2>&5
8170 ac_status=$?
8171 echo "$as_me:8171: \$? = $ac_status" >&5
8172 (exit "$ac_status"); }; }; then
8173
8174 cf_cv_find_linkage_utf8=yes
8175 cf_cv_header_path_utf8=/usr/include
8176 cf_cv_library_path_utf8=/usr/lib
8177 cf_cv_library_file_utf8="-lutf8"
8178
8179 else
8180 echo "$as_me: failed program was:" >&5
8181 cat "conftest.$ac_ext" >&5
8182
8183 cf_cv_find_linkage_utf8=no
8184 LIBS="$cf_save_LIBS"
8185
8186 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
8187
8188 echo "${as_me:-configure}:8188: testing find linkage for utf8 library ..." 1>&5
8189
8190 echo "${as_me:-configure}:8190: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8191
8192 cf_save_CPPFLAGS="$CPPFLAGS"
8193 cf_test_CPPFLAGS="$CPPFLAGS"
8194
8195 cf_search=
8196
8197 # collect the current set of include-directories from compiler flags
8198 cf_header_path_list=""
8199 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8200 for cf_header_path in $CPPFLAGS $CFLAGS
8201 do
8202 case "$cf_header_path" in
8203 (-I*)
8204 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8205
8206 test "x$cf_header_path" != "xNONE" && \
8207 test -d "$cf_header_path" && \
8208 {
8209 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8210 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8211 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
8212 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
8213 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
8214 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8215 }
8216
8217 cf_header_path_list="$cf_header_path_list $cf_search"
8218 ;;
8219 esac
8220 done
8221 fi
8222
8223 # add the variations for the package we are looking for
8224
8225 cf_search=
8226
8227 test "x$prefix" != "xNONE" && \
8228 test -d "$prefix" && \
8229 {
8230 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8231 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8232 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
8233 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
8234 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
8235 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
8236 }
8237
8238 for cf_subdir_prefix in \
8239 /usr \
8240 /usr/local \
8241 /usr/pkg \
8242 /opt \
8243 /opt/local \
8244 $HOME
8245 do
8246
8247 test "x$cf_subdir_prefix" != "x$prefix" && \
8248 test -d "$cf_subdir_prefix" && \
8249 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8250 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8251 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8252 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
8253 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
8254 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
8255 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
8256 }
8257
8258 done
8259
8260 test "$includedir" != NONE && \
8261 test "$includedir" != "/usr/include" && \
8262 test -d "$includedir" && {
8263 test -d "$includedir" && cf_search="$cf_search $includedir"
8264 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
8265 }
8266
8267 test "$oldincludedir" != NONE && \
8268 test "$oldincludedir" != "/usr/include" && \
8269 test -d "$oldincludedir" && {
8270 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8271 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
8272 }
8273
8274 cf_search="$cf_search $cf_header_path_list"
8275
8276 for cf_cv_header_path_utf8 in $cf_search
8277 do
8278 if test -d "$cf_cv_header_path_utf8" ; then
8279 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
8280
8281 echo "${as_me:-configure}:8281: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8282
8283 CPPFLAGS="$cf_save_CPPFLAGS"
8284
8285 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8286 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
8287
8288 cat >"conftest.$ac_ext" <<_ACEOF
8289 #line 8289 "configure"
8290 #include "confdefs.h"
8291
8292 #include <libutf8.h>
8293 int
8294 main (void)
8295 {
8296 putwc(0,(FILE*)0);
8297 ;
8298 return 0;
8299 }
8300 _ACEOF
8301 rm -f "conftest.$ac_objext"
8302 if { (eval echo "$as_me:8302: \"$ac_compile\"") >&5
8303 (eval $ac_compile) 2>&5
8304 ac_status=$?
8305 echo "$as_me:8305: \$? = $ac_status" >&5
8306 (exit "$ac_status"); } &&
8307 { ac_try='test -s "conftest.$ac_objext"'
8308 { (eval echo "$as_me:8308: \"$ac_try\"") >&5
8309 (eval $ac_try) 2>&5
8310 ac_status=$?
8311 echo "$as_me:8311: \$? = $ac_status" >&5
8312 (exit "$ac_status"); }; }; then
8313
8314 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8315
8316 echo "${as_me:-configure}:8316: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8317
8318 cf_cv_find_linkage_utf8=maybe
8319 cf_test_CPPFLAGS="$CPPFLAGS"
8320 break
8321 else
8322 echo "$as_me: failed program was:" >&5
8323 cat "conftest.$ac_ext" >&5
8324
8325 CPPFLAGS="$cf_save_CPPFLAGS"
8326
8327 fi
8328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8329 fi
8330 done
8331
8332 if test "$cf_cv_find_linkage_utf8" = maybe ; then
8333
8334 echo "${as_me:-configure}:8334: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8335
8336 cf_save_LIBS="$LIBS"
8337 cf_save_LDFLAGS="$LDFLAGS"
8338
8339 if test "$cf_cv_find_linkage_utf8" != yes ; then
8340
8341 cf_search=
8342 cf_library_path_list=""
8343 if test -n "${LDFLAGS}${LIBS}" ; then
8344 for cf_library_path in $LDFLAGS $LIBS
8345 do
8346 case "$cf_library_path" in
8347 (-L*)
8348 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8349
8350 test "x$cf_library_path" != "xNONE" && \
8351 test -d "$cf_library_path" && \
8352 {
8353 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8354 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8355 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
8356 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8357 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
8358 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8359 }
8360
8361 cf_library_path_list="$cf_library_path_list $cf_search"
8362 ;;
8363 esac
8364 done
8365 fi
8366
8367 cf_search=
8368
8369 test "x$prefix" != "xNONE" && \
8370 test -d "$prefix" && \
8371 {
8372 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8373 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
8374 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
8375 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
8376 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
8377 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
8378 }
8379
8380 for cf_subdir_prefix in \
8381 /usr \
8382 /usr/local \
8383 /usr/pkg \
8384 /opt \
8385 /opt/local \
8386 $HOME
8387 do
8388
8389 test "x$cf_subdir_prefix" != "x$prefix" && \
8390 test -d "$cf_subdir_prefix" && \
8391 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8392 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8393 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
8394 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
8395 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
8396 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
8397 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
8398 }
8399
8400 done
8401
8402 cf_search="$cf_library_path_list $cf_search"
8403
8404 for cf_cv_library_path_utf8 in $cf_search
8405 do
8406 if test -d "$cf_cv_library_path_utf8" ; then
8407 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
8408
8409 echo "${as_me:-configure}:8409: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8410
8411 CPPFLAGS="$cf_test_CPPFLAGS"
8412 LIBS="-lutf8 $cf_save_LIBS"
8413 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8414 cat >"conftest.$ac_ext" <<_ACEOF
8415 #line 8415 "configure"
8416 #include "confdefs.h"
8417
8418 #include <libutf8.h>
8419 int
8420 main (void)
8421 {
8422 putwc(0,(FILE*)0);
8423 ;
8424 return 0;
8425 }
8426 _ACEOF
8427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8428 if { (eval echo "$as_me:8428: \"$ac_link\"") >&5
8429 (eval $ac_link) 2>&5
8430 ac_status=$?
8431 echo "$as_me:8431: \$? = $ac_status" >&5
8432 (exit "$ac_status"); } &&
8433 { ac_try='test -s "conftest$ac_exeext"'
8434 { (eval echo "$as_me:8434: \"$ac_try\"") >&5
8435 (eval $ac_try) 2>&5
8436 ac_status=$?
8437 echo "$as_me:8437: \$? = $ac_status" >&5
8438 (exit "$ac_status"); }; }; then
8439
8440 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8441
8442 echo "${as_me:-configure}:8442: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8443
8444 cf_cv_find_linkage_utf8=yes
8445 cf_cv_library_file_utf8="-lutf8"
8446 break
8447 else
8448 echo "$as_me: failed program was:" >&5
8449 cat "conftest.$ac_ext" >&5
8450
8451 CPPFLAGS="$cf_save_CPPFLAGS"
8452 LIBS="$cf_save_LIBS"
8453 LDFLAGS="$cf_save_LDFLAGS"
8454
8455 fi
8456 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8457 fi
8458 done
8459 CPPFLAGS="$cf_save_CPPFLAGS"
8460 LDFLAGS="$cf_save_LDFLAGS"
8461 fi
8462
8463 else
8464 cf_cv_find_linkage_utf8=no
8465 fi
8466
8467 fi
8468 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8469
8470 fi
8471 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8472
8473 LIBS="$cf_save_LIBS"
8474
8475 if test "$cf_cv_find_linkage_utf8" = yes ; then
8476 cf_cv_utf8_lib=add-on
8477 else
8478 cf_cv_utf8_lib=no
8479 fi
8480
8481 fi
8482 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8483 fi
8484 echo "$as_me:8484: result: $cf_cv_utf8_lib" >&5
8485 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8486
8487 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8488 # ncurses/ncursesw:
8489 if test "$cf_cv_utf8_lib" = "add-on" ; then
8490
8491 cat >>confdefs.h <<\EOF
8492 #define HAVE_LIBUTF8_H 1
8493 EOF
8494
8495 if test -n "$cf_cv_header_path_utf8" ; then
8496 for cf_add_incdir in $cf_cv_header_path_utf8
8497 do
8498 while test "$cf_add_incdir" != /usr/include
8499 do
8500 if test -d "$cf_add_incdir"
8501 then
8502 cf_have_incdir=no
8503 if test -n "$CFLAGS$CPPFLAGS" ; then
8504 # a loop is needed to ensure we can add subdirs of existing dirs
8505 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8506 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8507 cf_have_incdir=yes; break
8508 fi
8509 done
8510 fi
8511
8512 if test "$cf_have_incdir" = no ; then
8513 if test "$cf_add_incdir" = /usr/local/include ; then
8514 if test "$GCC" = yes
8515 then
8516 cf_save_CPPFLAGS=$CPPFLAGS
8517
8518 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8519 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8520
8521 cat >"conftest.$ac_ext" <<_ACEOF
8522 #line 8522 "configure"
8523 #include "confdefs.h"
8524 #include <stdio.h>
8525 int
8526 main (void)
8527 {
8528 printf("Hello")
8529 ;
8530 return 0;
8531 }
8532 _ACEOF
8533 rm -f "conftest.$ac_objext"
8534 if { (eval echo "$as_me:8534: \"$ac_compile\"") >&5
8535 (eval $ac_compile) 2>&5
8536 ac_status=$?
8537 echo "$as_me:8537: \$? = $ac_status" >&5
8538 (exit "$ac_status"); } &&
8539 { ac_try='test -s "conftest.$ac_objext"'
8540 { (eval echo "$as_me:8540: \"$ac_try\"") >&5
8541 (eval $ac_try) 2>&5
8542 ac_status=$?
8543 echo "$as_me:8543: \$? = $ac_status" >&5
8544 (exit "$ac_status"); }; }; then
8545 :
8546 else
8547 echo "$as_me: failed program was:" >&5
8548 cat "conftest.$ac_ext" >&5
8549 cf_have_incdir=yes
8550 fi
8551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8552 CPPFLAGS=$cf_save_CPPFLAGS
8553 fi
8554 fi
8555 fi
8556
8557 if test "$cf_have_incdir" = no ; then
8558 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8559
8560 echo "${as_me:-configure}:8560: testing adding $cf_add_incdir to include-path ..." 1>&5
8561
8562 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8563
8564 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8565 test "$cf_top_incdir" = "$cf_add_incdir" && break
8566 cf_add_incdir="$cf_top_incdir"
8567 else
8568 break
8569 fi
8570 else
8571 break
8572 fi
8573 done
8574 done
8575 fi
8576
8577 if test -n "$cf_cv_library_path_utf8" ; then
8578 for cf_add_libdir in $cf_cv_library_path_utf8
8579 do
8580 if test "$cf_add_libdir" = /usr/lib ; then
8581 :
8582 elif test -d "$cf_add_libdir"
8583 then
8584 cf_have_libdir=no
8585 if test -n "$LDFLAGS$LIBS" ; then
8586 # a loop is needed to ensure we can add subdirs of existing dirs
8587 for cf_test_libdir in $LDFLAGS $LIBS ; do
8588 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8589 cf_have_libdir=yes; break
8590 fi
8591 done
8592 fi
8593 if test "$cf_have_libdir" = no ; then
8594 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8595
8596 echo "${as_me:-configure}:8596: testing adding $cf_add_libdir to library-path ..." 1>&5
8597
8598 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8599 fi
8600 fi
8601 done
8602 fi
8603
8604 cf_add_libs="$LIBS"
8605 # reverse order
8606 cf_add_0lib=
8607 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8608 # filter duplicates
8609 for cf_add_1lib in $cf_add_0lib; do
8610 for cf_add_2lib in $cf_add_libs; do
8611 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8612 cf_add_1lib=
8613 break
8614 fi
8615 done
8616 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8617 done
8618 LIBS="$cf_add_libs"
8619
8620 fi
8621
8622 cf_ncuconfig_root=$cf_cv_screen
8623 cf_have_ncuconfig=no
8624
8625 if test "x${PKG_CONFIG:=none}" != xnone; then
8626 echo "$as_me:8626: checking pkg-config for $cf_ncuconfig_root" >&5
8627 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8628 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8629 echo "$as_me:8629: result: yes" >&5
8630 echo "${ECHO_T}yes" >&6
8631
8632 echo "$as_me:8632: checking if the $cf_ncuconfig_root package files work" >&5
8633 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8634 cf_have_ncuconfig=unknown
8635
8636 cf_save_CFLAGS="$CFLAGS"
8637 cf_save_CPPFLAGS="$CPPFLAGS"
8638 cf_save_LIBS="$LIBS"
8639
8640 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8641 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8642
8643 # while -W for passing linker flags is prevalent, it is not "standard".
8644 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8645 # incompatible _and_ non-standard -W option which gives an error. Work
8646 # around that pitfall.
8647 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8648 (x*c[89]9@@*-W*)
8649
8650 cf_fix_cppflags=no
8651 cf_new_cflags=
8652 cf_new_cppflags=
8653 cf_new_extra_cppflags=
8654
8655 for cf_add_cflags in $cf_pkg_cflags
8656 do
8657 case "$cf_fix_cppflags" in
8658 (no)
8659 case "$cf_add_cflags" in
8660 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8661 case "$cf_add_cflags" in
8662 (-D*)
8663 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8664
8665 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8666 && test -z "${cf_tst_cflags}" \
8667 && cf_fix_cppflags=yes
8668
8669 if test "$cf_fix_cppflags" = yes ; then
8670
8671 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8672 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8673
8674 continue
8675 elif test "${cf_tst_cflags}" = "\"'" ; then
8676
8677 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8678 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8679
8680 continue
8681 fi
8682 ;;
8683 esac
8684 case "$CPPFLAGS" in
8685 (*$cf_add_cflags)
8686 ;;
8687 (*)
8688 case "$cf_add_cflags" in
8689 (-D*)
8690 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8691
8692 CPPFLAGS=`echo "$CPPFLAGS" | \
8693 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8694 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8695
8696 ;;
8697 esac
8698
8699 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8700 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8701
8702 ;;
8703 esac
8704 ;;
8705 (*)
8706
8707 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8708 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8709
8710 ;;
8711 esac
8712 ;;
8713 (yes)
8714
8715 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8716 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8717
8718 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8719
8720 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8721 && test -z "${cf_tst_cflags}" \
8722 && cf_fix_cppflags=no
8723 ;;
8724 esac
8725 done
8726
8727 if test -n "$cf_new_cflags" ; then
8728
8729 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8730 CFLAGS="${CFLAGS}$cf_new_cflags"
8731
8732 fi
8733
8734 if test -n "$cf_new_cppflags" ; then
8735
8736 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8737 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8738
8739 fi
8740
8741 if test -n "$cf_new_extra_cppflags" ; then
8742
8743 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8744 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8745
8746 fi
8747
8748 cf_add_libs="$LIBS"
8749 # reverse order
8750 cf_add_0lib=
8751 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8752 # filter duplicates
8753 for cf_add_1lib in $cf_add_0lib; do
8754 for cf_add_2lib in $cf_add_libs; do
8755 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8756 cf_add_1lib=
8757 break
8758 fi
8759 done
8760 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8761 done
8762 LIBS="$cf_add_libs"
8763
8764 cat >"conftest.$ac_ext" <<_ACEOF
8765 #line 8765 "configure"
8766 #include "confdefs.h"
8767 #include <${cf_cv_ncurses_header:-curses.h}>
8768 int
8769 main (void)
8770 {
8771 initscr(); mousemask(0,(mmask_t*)0); tigetstr((char *)0);
8772 ;
8773 return 0;
8774 }
8775 _ACEOF
8776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8777 if { (eval echo "$as_me:8777: \"$ac_link\"") >&5
8778 (eval $ac_link) 2>&5
8779 ac_status=$?
8780 echo "$as_me:8780: \$? = $ac_status" >&5
8781 (exit "$ac_status"); } &&
8782 { ac_try='test -s "conftest$ac_exeext"'
8783 { (eval echo "$as_me:8783: \"$ac_try\"") >&5
8784 (eval $ac_try) 2>&5
8785 ac_status=$?
8786 echo "$as_me:8786: \$? = $ac_status" >&5
8787 (exit "$ac_status"); }; }; then
8788 if test "$cross_compiling" = yes; then
8789 cf_test_ncuconfig=maybe
8790 else
8791 cat >"conftest.$ac_ext" <<_ACEOF
8792 #line 8792 "configure"
8793 #include "confdefs.h"
8794 #include <${cf_cv_ncurses_header:-curses.h}>
8795 int main(void)
8796 { const char *xx = curses_version(); return (xx == (const char*)0); }
8797 _ACEOF
8798 rm -f "conftest$ac_exeext"
8799 if { (eval echo "$as_me:8799: \"$ac_link\"") >&5
8800 (eval $ac_link) 2>&5
8801 ac_status=$?
8802 echo "$as_me:8802: \$? = $ac_status" >&5
8803 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8804 { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8805 (eval $ac_try) 2>&5
8806 ac_status=$?
8807 echo "$as_me:8807: \$? = $ac_status" >&5
8808 (exit "$ac_status"); }; }; then
8809 cf_test_ncuconfig=yes
8810 else
8811 echo "$as_me: program exited with status $ac_status" >&5
8812 echo "$as_me: failed program was:" >&5
8813 cat "conftest.$ac_ext" >&5
8814 cf_test_ncuconfig=no
8815 fi
8816 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8817 fi
8818 else
8819 echo "$as_me: failed program was:" >&5
8820 cat "conftest.$ac_ext" >&5
8821 cf_test_ncuconfig=no
8822 fi
8823 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8824
8825 CFLAGS="$cf_save_CFLAGS"
8826 CPPFLAGS="$cf_save_CPPFLAGS"
8827 LIBS="$cf_save_LIBS"
8828
8829 if test "x$cf_test_ncuconfig" != xyes; then
8830 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8831 cf_pkg_cflags="$cf_temp"
8832 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8833 cf_pkg_libs="$cf_temp"
8834 fi
8835 ;;
8836 esac
8837
8838 for cf_required in $cf_ncuconfig_root
8839 do
8840 # check for duplicates
8841 for cf_require_pkg in $REQUIRE_PKG
8842 do
8843 if test "$cf_required" = "$cf_require_pkg"
8844 then
8845 cf_required=
8846 break
8847 fi
8848 done
8849 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
8850 done
8851
8852 for cf_add_cflags in $cf_pkg_cflags
8853 do
8854 case "x$cf_add_cflags" in
8855 (x-[DU]*)
8856
8857 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8858 while true
8859 do
8860 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8861 test "$CFLAGS" != "$cf_old_cflag" || break
8862
8863 CFLAGS="$cf_old_cflag"
8864 done
8865
8866 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8867 while true
8868 do
8869 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8870 test "$CPPFLAGS" != "$cf_old_cflag" || break
8871
8872 CPPFLAGS="$cf_old_cflag"
8873 done
8874
8875 ;;
8876 esac
8877
8878 cf_fix_cppflags=no
8879 cf_new_cflags=
8880 cf_new_cppflags=
8881 cf_new_extra_cppflags=
8882
8883 for cf_add_cflags in $cf_add_cflags
8884 do
8885 case "$cf_fix_cppflags" in
8886 (no)
8887 case "$cf_add_cflags" in
8888 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8889 case "$cf_add_cflags" in
8890 (-D*)
8891 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8892
8893 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8894 && test -z "${cf_tst_cflags}" \
8895 && cf_fix_cppflags=yes
8896
8897 if test "$cf_fix_cppflags" = yes ; then
8898
8899 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8900 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8901
8902 continue
8903 elif test "${cf_tst_cflags}" = "\"'" ; then
8904
8905 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8906 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8907
8908 continue
8909 fi
8910 ;;
8911 esac
8912 case "$CPPFLAGS" in
8913 (*$cf_add_cflags)
8914 ;;
8915 (*)
8916 case "$cf_add_cflags" in
8917 (-D*)
8918 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8919
8920 CPPFLAGS=`echo "$CPPFLAGS" | \
8921 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8922 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8923
8924 ;;
8925 esac
8926
8927 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8928 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8929
8930 ;;
8931 esac
8932 ;;
8933 (*)
8934
8935 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8936 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8937
8938 ;;
8939 esac
8940 ;;
8941 (yes)
8942
8943 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8944 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8945
8946 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8947
8948 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8949 && test -z "${cf_tst_cflags}" \
8950 && cf_fix_cppflags=no
8951 ;;
8952 esac
8953 done
8954
8955 if test -n "$cf_new_cflags" ; then
8956
8957 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8958 CFLAGS="${CFLAGS}$cf_new_cflags"
8959
8960 fi
8961
8962 if test -n "$cf_new_cppflags" ; then
8963
8964 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8965 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8966
8967 fi
8968
8969 if test -n "$cf_new_extra_cppflags" ; then
8970
8971 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8972 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8973
8974 fi
8975
8976 done
8977
8978 cf_add_libs="$LIBS"
8979 # reverse order
8980 cf_add_0lib=
8981 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8982 # filter duplicates
8983 for cf_add_1lib in $cf_add_0lib; do
8984 for cf_add_2lib in $cf_add_libs; do
8985 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8986 cf_add_1lib=
8987 break
8988 fi
8989 done
8990 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8991 done
8992 LIBS="$cf_add_libs"
8993
8994 cat >"conftest.$ac_ext" <<_ACEOF
8995 #line 8995 "configure"
8996 #include "confdefs.h"
8997 #include <${cf_cv_ncurses_header:-curses.h}>
8998 int
8999 main (void)
9000 {
9001 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
9002 ;
9003 return 0;
9004 }
9005 _ACEOF
9006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9007 if { (eval echo "$as_me:9007: \"$ac_link\"") >&5
9008 (eval $ac_link) 2>&5
9009 ac_status=$?
9010 echo "$as_me:9010: \$? = $ac_status" >&5
9011 (exit "$ac_status"); } &&
9012 { ac_try='test -s "conftest$ac_exeext"'
9013 { (eval echo "$as_me:9013: \"$ac_try\"") >&5
9014 (eval $ac_try) 2>&5
9015 ac_status=$?
9016 echo "$as_me:9016: \$? = $ac_status" >&5
9017 (exit "$ac_status"); }; }; then
9018 if test "$cross_compiling" = yes; then
9019 cf_have_ncuconfig=maybe
9020 else
9021 cat >"conftest.$ac_ext" <<_ACEOF
9022 #line 9022 "configure"
9023 #include "confdefs.h"
9024 #include <${cf_cv_ncurses_header:-curses.h}>
9025 int main(void)
9026 { const char *xx = curses_version(); return (xx == (const char*)0); }
9027 _ACEOF
9028 rm -f "conftest$ac_exeext"
9029 if { (eval echo "$as_me:9029: \"$ac_link\"") >&5
9030 (eval $ac_link) 2>&5
9031 ac_status=$?
9032 echo "$as_me:9032: \$? = $ac_status" >&5
9033 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9034 { (eval echo "$as_me:9034: \"$ac_try\"") >&5
9035 (eval $ac_try) 2>&5
9036 ac_status=$?
9037 echo "$as_me:9037: \$? = $ac_status" >&5
9038 (exit "$ac_status"); }; }; then
9039 cf_have_ncuconfig=yes
9040 else
9041 echo "$as_me: program exited with status $ac_status" >&5
9042 echo "$as_me: failed program was:" >&5
9043 cat "conftest.$ac_ext" >&5
9044 cf_have_ncuconfig=no
9045 fi
9046 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9047 fi
9048 else
9049 echo "$as_me: failed program was:" >&5
9050 cat "conftest.$ac_ext" >&5
9051 cf_have_ncuconfig=no
9052 fi
9053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9054 echo "$as_me:9054: result: $cf_have_ncuconfig" >&5
9055 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9056 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9057 if test "$cf_have_ncuconfig" != "yes"
9058 then
9059 CPPFLAGS="$cf_save_CPPFLAGS"
9060 LIBS="$cf_save_LIBS"
9061 NCURSES_CONFIG_PKG=none
9062 else
9063
9064 cat >>confdefs.h <<\EOF
9065 #define NCURSES 1
9066 EOF
9067
9068 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9069
9070 echo "$as_me:9070: checking for terminfo header" >&5
9071 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9072 if test "${cf_cv_term_header+set}" = set; then
9073 echo $ECHO_N "(cached) $ECHO_C" >&6
9074 else
9075
9076 case "${cf_cv_ncurses_header}" in
9077 (*/ncurses.h|*/ncursesw.h)
9078 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9079 ;;
9080 (*)
9081 cf_term_header=term.h
9082 ;;
9083 esac
9084
9085 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9086 do
9087 cat >"conftest.$ac_ext" <<_ACEOF
9088 #line 9088 "configure"
9089 #include "confdefs.h"
9090 #include <stdio.h>
9091 #include <${cf_cv_ncurses_header:-curses.h}>
9092 #include <$cf_test>
9093
9094 int
9095 main (void)
9096 {
9097 int x = auto_left_margin; (void)x
9098 ;
9099 return 0;
9100 }
9101 _ACEOF
9102 rm -f "conftest.$ac_objext"
9103 if { (eval echo "$as_me:9103: \"$ac_compile\"") >&5
9104 (eval $ac_compile) 2>&5
9105 ac_status=$?
9106 echo "$as_me:9106: \$? = $ac_status" >&5
9107 (exit "$ac_status"); } &&
9108 { ac_try='test -s "conftest.$ac_objext"'
9109 { (eval echo "$as_me:9109: \"$ac_try\"") >&5
9110 (eval $ac_try) 2>&5
9111 ac_status=$?
9112 echo "$as_me:9112: \$? = $ac_status" >&5
9113 (exit "$ac_status"); }; }; then
9114
9115 cf_cv_term_header="$cf_test"
9116 else
9117 echo "$as_me: failed program was:" >&5
9118 cat "conftest.$ac_ext" >&5
9119
9120 cf_cv_term_header=unknown
9121
9122 fi
9123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9124 test "$cf_cv_term_header" != unknown && break
9125 done
9126
9127 fi
9128 echo "$as_me:9128: result: $cf_cv_term_header" >&5
9129 echo "${ECHO_T}$cf_cv_term_header" >&6
9130
9131 # Set definitions to allow ifdef'ing to accommodate subdirectories
9132
9133 case "$cf_cv_term_header" in
9134 (*term.h)
9135
9136 cat >>confdefs.h <<\EOF
9137 #define HAVE_TERM_H 1
9138 EOF
9139
9140 ;;
9141 esac
9142
9143 case "$cf_cv_term_header" in
9144 (ncurses/term.h)
9145
9146 cat >>confdefs.h <<\EOF
9147 #define HAVE_NCURSES_TERM_H 1
9148 EOF
9149
9150 ;;
9151 (ncursesw/term.h)
9152
9153 cat >>confdefs.h <<\EOF
9154 #define HAVE_NCURSESW_TERM_H 1
9155 EOF
9156
9157 ;;
9158 esac
9159
9160 fi
9161
9162 else
9163 echo "$as_me:9163: result: no" >&5
9164 echo "${ECHO_T}no" >&6
9165 NCURSES_CONFIG_PKG=none
9166 fi
9167 else
9168 NCURSES_CONFIG_PKG=none
9169 fi
9170
9171 if test "x$cf_have_ncuconfig" = "xno"; then
9172 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9173
9174 if test -n "$ac_tool_prefix"; then
9175 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9176 do
9177 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9178 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9179 echo "$as_me:9179: checking for $ac_word" >&5
9180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9181 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9182 echo $ECHO_N "(cached) $ECHO_C" >&6
9183 else
9184 if test -n "$NCURSES_CONFIG"; then
9185 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9186 else
9187 ac_save_IFS=$IFS; IFS=$ac_path_separator
9188 ac_dummy="$PATH"
9189 for ac_dir in $ac_dummy; do
9190 IFS=$ac_save_IFS
9191 test -z "$ac_dir" && ac_dir=.
9192 $as_executable_p "$ac_dir/$ac_word" || continue
9193 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9194 echo "$as_me:9194: found $ac_dir/$ac_word" >&5
9195 break
9196 done
9197
9198 fi
9199 fi
9200 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9201 if test -n "$NCURSES_CONFIG"; then
9202 echo "$as_me:9202: result: $NCURSES_CONFIG" >&5
9203 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9204 else
9205 echo "$as_me:9205: result: no" >&5
9206 echo "${ECHO_T}no" >&6
9207 fi
9208
9209 test -n "$NCURSES_CONFIG" && break
9210 done
9211 fi
9212 if test -z "$NCURSES_CONFIG"; then
9213 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9214 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9215 do
9216 # Extract the first word of "$ac_prog", so it can be a program name with args.
9217 set dummy $ac_prog; ac_word=$2
9218 echo "$as_me:9218: checking for $ac_word" >&5
9219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9220 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9221 echo $ECHO_N "(cached) $ECHO_C" >&6
9222 else
9223 if test -n "$ac_ct_NCURSES_CONFIG"; then
9224 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9225 else
9226 ac_save_IFS=$IFS; IFS=$ac_path_separator
9227 ac_dummy="$PATH"
9228 for ac_dir in $ac_dummy; do
9229 IFS=$ac_save_IFS
9230 test -z "$ac_dir" && ac_dir=.
9231 $as_executable_p "$ac_dir/$ac_word" || continue
9232 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9233 echo "$as_me:9233: found $ac_dir/$ac_word" >&5
9234 break
9235 done
9236
9237 fi
9238 fi
9239 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9240 if test -n "$ac_ct_NCURSES_CONFIG"; then
9241 echo "$as_me:9241: result: $ac_ct_NCURSES_CONFIG" >&5
9242 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9243 else
9244 echo "$as_me:9244: result: no" >&5
9245 echo "${ECHO_T}no" >&6
9246 fi
9247
9248 test -n "$ac_ct_NCURSES_CONFIG" && break
9249 done
9250 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9251
9252 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9253 fi
9254
9255 if test "$NCURSES_CONFIG" != none ; then
9256
9257 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9258 do
9259 case "x$cf_add_cflags" in
9260 (x-[DU]*)
9261
9262 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9263 while true
9264 do
9265 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9266 test "$CFLAGS" != "$cf_old_cflag" || break
9267
9268 CFLAGS="$cf_old_cflag"
9269 done
9270
9271 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9272 while true
9273 do
9274 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9275 test "$CPPFLAGS" != "$cf_old_cflag" || break
9276
9277 CPPFLAGS="$cf_old_cflag"
9278 done
9279
9280 ;;
9281 esac
9282
9283 cf_fix_cppflags=no
9284 cf_new_cflags=
9285 cf_new_cppflags=
9286 cf_new_extra_cppflags=
9287
9288 for cf_add_cflags in $cf_add_cflags
9289 do
9290 case "$cf_fix_cppflags" in
9291 (no)
9292 case "$cf_add_cflags" in
9293 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9294 case "$cf_add_cflags" in
9295 (-D*)
9296 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9297
9298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9299 && test -z "${cf_tst_cflags}" \
9300 && cf_fix_cppflags=yes
9301
9302 if test "$cf_fix_cppflags" = yes ; then
9303
9304 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9305 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9306
9307 continue
9308 elif test "${cf_tst_cflags}" = "\"'" ; then
9309
9310 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9311 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9312
9313 continue
9314 fi
9315 ;;
9316 esac
9317 case "$CPPFLAGS" in
9318 (*$cf_add_cflags)
9319 ;;
9320 (*)
9321 case "$cf_add_cflags" in
9322 (-D*)
9323 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9324
9325 CPPFLAGS=`echo "$CPPFLAGS" | \
9326 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9327 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9328
9329 ;;
9330 esac
9331
9332 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9333 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9334
9335 ;;
9336 esac
9337 ;;
9338 (*)
9339
9340 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9341 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9342
9343 ;;
9344 esac
9345 ;;
9346 (yes)
9347
9348 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9349 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9350
9351 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9352
9353 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9354 && test -z "${cf_tst_cflags}" \
9355 && cf_fix_cppflags=no
9356 ;;
9357 esac
9358 done
9359
9360 if test -n "$cf_new_cflags" ; then
9361
9362 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9363 CFLAGS="${CFLAGS}$cf_new_cflags"
9364
9365 fi
9366
9367 if test -n "$cf_new_cppflags" ; then
9368
9369 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9370 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9371
9372 fi
9373
9374 if test -n "$cf_new_extra_cppflags" ; then
9375
9376 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9377 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9378
9379 fi
9380
9381 done
9382
9383 cf_add_libs="$LIBS"
9384 # reverse order
9385 cf_add_0lib=
9386 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9387 # filter duplicates
9388 for cf_add_1lib in $cf_add_0lib; do
9389 for cf_add_2lib in $cf_add_libs; do
9390 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9391 cf_add_1lib=
9392 break
9393 fi
9394 done
9395 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9396 done
9397 LIBS="$cf_add_libs"
9398
9399 # even with config script, some packages use no-override for curses.h
9400
9401 echo "$as_me:9401: checking if we have identified curses headers" >&5
9402 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9403 if test "${cf_cv_ncurses_header+set}" = set; then
9404 echo $ECHO_N "(cached) $ECHO_C" >&6
9405 else
9406
9407 cf_cv_ncurses_header=none
9408 for cf_header in \
9409 ncurses.h $cf_cv_screen/ncurses.h \
9410 curses.h $cf_cv_screen/curses.h
9411 do
9412 cat >"conftest.$ac_ext" <<_ACEOF
9413 #line 9413 "configure"
9414 #include "confdefs.h"
9415 #include <${cf_header}>
9416 int
9417 main (void)
9418 {
9419 initscr(); endwin()
9420 ;
9421 return 0;
9422 }
9423 _ACEOF
9424 rm -f "conftest.$ac_objext"
9425 if { (eval echo "$as_me:9425: \"$ac_compile\"") >&5
9426 (eval $ac_compile) 2>&5
9427 ac_status=$?
9428 echo "$as_me:9428: \$? = $ac_status" >&5
9429 (exit "$ac_status"); } &&
9430 { ac_try='test -s "conftest.$ac_objext"'
9431 { (eval echo "$as_me:9431: \"$ac_try\"") >&5
9432 (eval $ac_try) 2>&5
9433 ac_status=$?
9434 echo "$as_me:9434: \$? = $ac_status" >&5
9435 (exit "$ac_status"); }; }; then
9436 cf_cv_ncurses_header=$cf_header; break
9437 else
9438 echo "$as_me: failed program was:" >&5
9439 cat "conftest.$ac_ext" >&5
9440 fi
9441 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9442 done
9443
9444 fi
9445 echo "$as_me:9445: result: $cf_cv_ncurses_header" >&5
9446 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9447
9448 if test "$cf_cv_ncurses_header" = none ; then
9449 { { echo "$as_me:9449: error: No curses header-files found" >&5
9450 echo "$as_me: error: No curses header-files found" >&2;}
9451 { (exit 1); exit 1; }; }
9452 fi
9453
9454 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9455
9456 for ac_header in $cf_cv_ncurses_header
9457 do
9458 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9459 echo "$as_me:9459: checking for $ac_header" >&5
9460 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9461 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9462 echo $ECHO_N "(cached) $ECHO_C" >&6
9463 else
9464 cat >"conftest.$ac_ext" <<_ACEOF
9465 #line 9465 "configure"
9466 #include "confdefs.h"
9467 #include <$ac_header>
9468 _ACEOF
9469 if { (eval echo "$as_me:9469: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9470 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9471 ac_status=$?
9472 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9473 rm -f conftest.er1
9474 cat conftest.err >&5
9475 echo "$as_me:9475: \$? = $ac_status" >&5
9476 (exit "$ac_status"); } >/dev/null; then
9477 if test -s conftest.err; then
9478 ac_cpp_err=$ac_c_preproc_warn_flag
9479 else
9480 ac_cpp_err=
9481 fi
9482 else
9483 ac_cpp_err=yes
9484 fi
9485 if test -z "$ac_cpp_err"; then
9486 eval "$as_ac_Header=yes"
9487 else
9488 echo "$as_me: failed program was:" >&5
9489 cat "conftest.$ac_ext" >&5
9490 eval "$as_ac_Header=no"
9491 fi
9492 rm -f conftest.err "conftest.$ac_ext"
9493 fi
9494 echo "$as_me:9494: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9495 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9496 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9497 cat >>confdefs.h <<EOF
9498 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9499 EOF
9500
9501 fi
9502 done
9503
9504 cat >>confdefs.h <<\EOF
9505 #define NCURSES 1
9506 EOF
9507
9508 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9509
9510 cat >>confdefs.h <<EOF
9511 #define $cf_nculib_ROOT 1
9512 EOF
9513
9514 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9515
9516 else
9517
9518 cf_ncuhdr_root=$cf_cv_screen
9519
9520 test -n "$cf_cv_curses_dir" && \
9521 test "$cf_cv_curses_dir" != "no" && { \
9522
9523 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9524 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9525 do
9526 while test "$cf_add_incdir" != /usr/include
9527 do
9528 if test -d "$cf_add_incdir"
9529 then
9530 cf_have_incdir=no
9531 if test -n "$CFLAGS$CPPFLAGS" ; then
9532 # a loop is needed to ensure we can add subdirs of existing dirs
9533 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9534 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9535 cf_have_incdir=yes; break
9536 fi
9537 done
9538 fi
9539
9540 if test "$cf_have_incdir" = no ; then
9541 if test "$cf_add_incdir" = /usr/local/include ; then
9542 if test "$GCC" = yes
9543 then
9544 cf_save_CPPFLAGS=$CPPFLAGS
9545
9546 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9547 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9548
9549 cat >"conftest.$ac_ext" <<_ACEOF
9550 #line 9550 "configure"
9551 #include "confdefs.h"
9552 #include <stdio.h>
9553 int
9554 main (void)
9555 {
9556 printf("Hello")
9557 ;
9558 return 0;
9559 }
9560 _ACEOF
9561 rm -f "conftest.$ac_objext"
9562 if { (eval echo "$as_me:9562: \"$ac_compile\"") >&5
9563 (eval $ac_compile) 2>&5
9564 ac_status=$?
9565 echo "$as_me:9565: \$? = $ac_status" >&5
9566 (exit "$ac_status"); } &&
9567 { ac_try='test -s "conftest.$ac_objext"'
9568 { (eval echo "$as_me:9568: \"$ac_try\"") >&5
9569 (eval $ac_try) 2>&5
9570 ac_status=$?
9571 echo "$as_me:9571: \$? = $ac_status" >&5
9572 (exit "$ac_status"); }; }; then
9573 :
9574 else
9575 echo "$as_me: failed program was:" >&5
9576 cat "conftest.$ac_ext" >&5
9577 cf_have_incdir=yes
9578 fi
9579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9580 CPPFLAGS=$cf_save_CPPFLAGS
9581 fi
9582 fi
9583 fi
9584
9585 if test "$cf_have_incdir" = no ; then
9586 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9587
9588 echo "${as_me:-configure}:9588: testing adding $cf_add_incdir to include-path ..." 1>&5
9589
9590 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9591
9592 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9593 test "$cf_top_incdir" = "$cf_add_incdir" && break
9594 cf_add_incdir="$cf_top_incdir"
9595 else
9596 break
9597 fi
9598 else
9599 break
9600 fi
9601 done
9602 done
9603 fi
9604
9605 }
9606
9607 echo "$as_me:9607: checking for $cf_ncuhdr_root header in include-path" >&5
9608 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9609 if test "${cf_cv_ncurses_h+set}" = set; then
9610 echo $ECHO_N "(cached) $ECHO_C" >&6
9611 else
9612
9613 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9614 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9615 for cf_header in $cf_header_list
9616 do
9617
9618 cat >"conftest.$ac_ext" <<_ACEOF
9619 #line 9619 "configure"
9620 #include "confdefs.h"
9621
9622 #include <$cf_header>
9623 int
9624 main (void)
9625 {
9626
9627 #ifdef NCURSES_VERSION
9628
9629 printf("%s\\n", NCURSES_VERSION);
9630 #else
9631 #ifdef __NCURSES_H
9632 printf("old\\n");
9633 #else
9634 #error __NCURSES_H is not defined
9635 #endif
9636 #endif
9637
9638 ;
9639 return 0;
9640 }
9641 _ACEOF
9642 rm -f "conftest.$ac_objext"
9643 if { (eval echo "$as_me:9643: \"$ac_compile\"") >&5
9644 (eval $ac_compile) 2>&5
9645 ac_status=$?
9646 echo "$as_me:9646: \$? = $ac_status" >&5
9647 (exit "$ac_status"); } &&
9648 { ac_try='test -s "conftest.$ac_objext"'
9649 { (eval echo "$as_me:9649: \"$ac_try\"") >&5
9650 (eval $ac_try) 2>&5
9651 ac_status=$?
9652 echo "$as_me:9652: \$? = $ac_status" >&5
9653 (exit "$ac_status"); }; }; then
9654 cf_cv_ncurses_h=$cf_header
9655
9656 else
9657 echo "$as_me: failed program was:" >&5
9658 cat "conftest.$ac_ext" >&5
9659 cf_cv_ncurses_h=no
9660 fi
9661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9662
9663 test "$cf_cv_ncurses_h" != no && break
9664 done
9665
9666 fi
9667 echo "$as_me:9667: result: $cf_cv_ncurses_h" >&5
9668 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9669
9670 if test "$cf_cv_ncurses_h" != no ; then
9671 cf_cv_ncurses_header=$cf_cv_ncurses_h
9672 else
9673
9674 echo "$as_me:9674: checking for $cf_ncuhdr_root include-path" >&5
9675 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9676 if test "${cf_cv_ncurses_h2+set}" = set; then
9677 echo $ECHO_N "(cached) $ECHO_C" >&6
9678 else
9679
9680 test -n "$verbose" && echo
9681
9682 cf_search=
9683
9684 # collect the current set of include-directories from compiler flags
9685 cf_header_path_list=""
9686 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9687 for cf_header_path in $CPPFLAGS $CFLAGS
9688 do
9689 case "$cf_header_path" in
9690 (-I*)
9691 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9692
9693 test "x$cf_header_path" != "xNONE" && \
9694 test -d "$cf_header_path" && \
9695 {
9696 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9697 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9698 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9699 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9700 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9701 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"
9702 }
9703
9704 cf_header_path_list="$cf_header_path_list $cf_search"
9705 ;;
9706 esac
9707 done
9708 fi
9709
9710 # add the variations for the package we are looking for
9711
9712 cf_search=
9713
9714 test "x$prefix" != "xNONE" && \
9715 test -d "$prefix" && \
9716 {
9717 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9718 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9719 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9720 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9721 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9722 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9723 }
9724
9725 for cf_subdir_prefix in \
9726 /usr \
9727 /usr/local \
9728 /usr/pkg \
9729 /opt \
9730 /opt/local \
9731 $HOME
9732 do
9733
9734 test "x$cf_subdir_prefix" != "x$prefix" && \
9735 test -d "$cf_subdir_prefix" && \
9736 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9737 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9738 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9739 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9740 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9741 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9742 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"
9743 }
9744
9745 done
9746
9747 test "$includedir" != NONE && \
9748 test "$includedir" != "/usr/include" && \
9749 test -d "$includedir" && {
9750 test -d "$includedir" && cf_search="$cf_search $includedir"
9751 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9752 }
9753
9754 test "$oldincludedir" != NONE && \
9755 test "$oldincludedir" != "/usr/include" && \
9756 test -d "$oldincludedir" && {
9757 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9758 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9759 }
9760
9761 cf_search="$cf_search $cf_header_path_list"
9762
9763 test -n "$verbose" && echo "search path $cf_search"
9764 cf_save2_CPPFLAGS="$CPPFLAGS"
9765 for cf_incdir in $cf_search
9766 do
9767
9768 if test -n "$cf_incdir" ; then
9769 for cf_add_incdir in $cf_incdir
9770 do
9771 while test "$cf_add_incdir" != /usr/include
9772 do
9773 if test -d "$cf_add_incdir"
9774 then
9775 cf_have_incdir=no
9776 if test -n "$CFLAGS$CPPFLAGS" ; then
9777 # a loop is needed to ensure we can add subdirs of existing dirs
9778 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9779 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9780 cf_have_incdir=yes; break
9781 fi
9782 done
9783 fi
9784
9785 if test "$cf_have_incdir" = no ; then
9786 if test "$cf_add_incdir" = /usr/local/include ; then
9787 if test "$GCC" = yes
9788 then
9789 cf_save_CPPFLAGS=$CPPFLAGS
9790
9791 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9792 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9793
9794 cat >"conftest.$ac_ext" <<_ACEOF
9795 #line 9795 "configure"
9796 #include "confdefs.h"
9797 #include <stdio.h>
9798 int
9799 main (void)
9800 {
9801 printf("Hello")
9802 ;
9803 return 0;
9804 }
9805 _ACEOF
9806 rm -f "conftest.$ac_objext"
9807 if { (eval echo "$as_me:9807: \"$ac_compile\"") >&5
9808 (eval $ac_compile) 2>&5
9809 ac_status=$?
9810 echo "$as_me:9810: \$? = $ac_status" >&5
9811 (exit "$ac_status"); } &&
9812 { ac_try='test -s "conftest.$ac_objext"'
9813 { (eval echo "$as_me:9813: \"$ac_try\"") >&5
9814 (eval $ac_try) 2>&5
9815 ac_status=$?
9816 echo "$as_me:9816: \$? = $ac_status" >&5
9817 (exit "$ac_status"); }; }; then
9818 :
9819 else
9820 echo "$as_me: failed program was:" >&5
9821 cat "conftest.$ac_ext" >&5
9822 cf_have_incdir=yes
9823 fi
9824 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9825 CPPFLAGS=$cf_save_CPPFLAGS
9826 fi
9827 fi
9828 fi
9829
9830 if test "$cf_have_incdir" = no ; then
9831 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9832
9833 echo "${as_me:-configure}:9833: testing adding $cf_add_incdir to include-path ..." 1>&5
9834
9835 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9836
9837 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9838 test "$cf_top_incdir" = "$cf_add_incdir" && break
9839 cf_add_incdir="$cf_top_incdir"
9840 else
9841 break
9842 fi
9843 else
9844 break
9845 fi
9846 done
9847 done
9848 fi
9849
9850 for cf_header in \
9851 ncurses.h \
9852 curses.h
9853 do
9854
9855 cat >"conftest.$ac_ext" <<_ACEOF
9856 #line 9856 "configure"
9857 #include "confdefs.h"
9858
9859 #include <$cf_header>
9860 int
9861 main (void)
9862 {
9863
9864 #ifdef NCURSES_VERSION
9865
9866 printf("%s\\n", NCURSES_VERSION);
9867 #else
9868 #ifdef __NCURSES_H
9869 printf("old\\n");
9870 #else
9871 #error __NCURSES_H is not defined
9872 #endif
9873 #endif
9874
9875 ;
9876 return 0;
9877 }
9878 _ACEOF
9879 rm -f "conftest.$ac_objext"
9880 if { (eval echo "$as_me:9880: \"$ac_compile\"") >&5
9881 (eval $ac_compile) 2>&5
9882 ac_status=$?
9883 echo "$as_me:9883: \$? = $ac_status" >&5
9884 (exit "$ac_status"); } &&
9885 { ac_try='test -s "conftest.$ac_objext"'
9886 { (eval echo "$as_me:9886: \"$ac_try\"") >&5
9887 (eval $ac_try) 2>&5
9888 ac_status=$?
9889 echo "$as_me:9889: \$? = $ac_status" >&5
9890 (exit "$ac_status"); }; }; then
9891 cf_cv_ncurses_h2=$cf_header
9892
9893 else
9894 echo "$as_me: failed program was:" >&5
9895 cat "conftest.$ac_ext" >&5
9896 cf_cv_ncurses_h2=no
9897 fi
9898 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9899
9900 if test "$cf_cv_ncurses_h2" != no ; then
9901 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9902 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9903 break
9904 fi
9905 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9906 done
9907 CPPFLAGS="$cf_save2_CPPFLAGS"
9908 test "$cf_cv_ncurses_h2" != no && break
9909 done
9910 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9910: error: not found" >&5
9911 echo "$as_me: error: not found" >&2;}
9912 { (exit 1); exit 1; }; }
9913
9914 fi
9915 echo "$as_me:9915: result: $cf_cv_ncurses_h2" >&5
9916 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9917
9918 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9919 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9920 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9921 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9922 fi
9923
9924 if test -n "$cf_1st_incdir" ; then
9925 for cf_add_incdir in $cf_1st_incdir
9926 do
9927 while test "$cf_add_incdir" != /usr/include
9928 do
9929 if test -d "$cf_add_incdir"
9930 then
9931 cf_have_incdir=no
9932 if test -n "$CFLAGS$CPPFLAGS" ; then
9933 # a loop is needed to ensure we can add subdirs of existing dirs
9934 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9935 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9936 cf_have_incdir=yes; break
9937 fi
9938 done
9939 fi
9940
9941 if test "$cf_have_incdir" = no ; then
9942 if test "$cf_add_incdir" = /usr/local/include ; then
9943 if test "$GCC" = yes
9944 then
9945 cf_save_CPPFLAGS=$CPPFLAGS
9946
9947 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9948 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9949
9950 cat >"conftest.$ac_ext" <<_ACEOF
9951 #line 9951 "configure"
9952 #include "confdefs.h"
9953 #include <stdio.h>
9954 int
9955 main (void)
9956 {
9957 printf("Hello")
9958 ;
9959 return 0;
9960 }
9961 _ACEOF
9962 rm -f "conftest.$ac_objext"
9963 if { (eval echo "$as_me:9963: \"$ac_compile\"") >&5
9964 (eval $ac_compile) 2>&5
9965 ac_status=$?
9966 echo "$as_me:9966: \$? = $ac_status" >&5
9967 (exit "$ac_status"); } &&
9968 { ac_try='test -s "conftest.$ac_objext"'
9969 { (eval echo "$as_me:9969: \"$ac_try\"") >&5
9970 (eval $ac_try) 2>&5
9971 ac_status=$?
9972 echo "$as_me:9972: \$? = $ac_status" >&5
9973 (exit "$ac_status"); }; }; then
9974 :
9975 else
9976 echo "$as_me: failed program was:" >&5
9977 cat "conftest.$ac_ext" >&5
9978 cf_have_incdir=yes
9979 fi
9980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9981 CPPFLAGS=$cf_save_CPPFLAGS
9982 fi
9983 fi
9984 fi
9985
9986 if test "$cf_have_incdir" = no ; then
9987 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9988
9989 echo "${as_me:-configure}:9989: testing adding $cf_add_incdir to include-path ..." 1>&5
9990
9991 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9992
9993 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9994 test "$cf_top_incdir" = "$cf_add_incdir" && break
9995 cf_add_incdir="$cf_top_incdir"
9996 else
9997 break
9998 fi
9999 else
10000 break
10001 fi
10002 done
10003 done
10004 fi
10005
10006 fi
10007
10008 # Set definitions to allow ifdef'ing for ncurses.h
10009
10010 case "$cf_cv_ncurses_header" in
10011 (*ncurses.h)
10012
10013 cat >>confdefs.h <<\EOF
10014 #define HAVE_NCURSES_H 1
10015 EOF
10016
10017 ;;
10018 esac
10019
10020 case "$cf_cv_ncurses_header" in
10021 (ncurses/curses.h|ncurses/ncurses.h)
10022
10023 cat >>confdefs.h <<\EOF
10024 #define HAVE_NCURSES_NCURSES_H 1
10025 EOF
10026
10027 ;;
10028 (ncursesw/curses.h|ncursesw/ncurses.h)
10029
10030 cat >>confdefs.h <<\EOF
10031 #define HAVE_NCURSESW_NCURSES_H 1
10032 EOF
10033
10034 ;;
10035 esac
10036
10037 echo "$as_me:10037: checking for terminfo header" >&5
10038 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10039 if test "${cf_cv_term_header+set}" = set; then
10040 echo $ECHO_N "(cached) $ECHO_C" >&6
10041 else
10042
10043 case "${cf_cv_ncurses_header}" in
10044 (*/ncurses.h|*/ncursesw.h)
10045 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10046 ;;
10047 (*)
10048 cf_term_header=term.h
10049 ;;
10050 esac
10051
10052 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10053 do
10054 cat >"conftest.$ac_ext" <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057 #include <stdio.h>
10058 #include <${cf_cv_ncurses_header:-curses.h}>
10059 #include <$cf_test>
10060
10061 int
10062 main (void)
10063 {
10064 int x = auto_left_margin; (void)x
10065 ;
10066 return 0;
10067 }
10068 _ACEOF
10069 rm -f "conftest.$ac_objext"
10070 if { (eval echo "$as_me:10070: \"$ac_compile\"") >&5
10071 (eval $ac_compile) 2>&5
10072 ac_status=$?
10073 echo "$as_me:10073: \$? = $ac_status" >&5
10074 (exit "$ac_status"); } &&
10075 { ac_try='test -s "conftest.$ac_objext"'
10076 { (eval echo "$as_me:10076: \"$ac_try\"") >&5
10077 (eval $ac_try) 2>&5
10078 ac_status=$?
10079 echo "$as_me:10079: \$? = $ac_status" >&5
10080 (exit "$ac_status"); }; }; then
10081
10082 cf_cv_term_header="$cf_test"
10083 else
10084 echo "$as_me: failed program was:" >&5
10085 cat "conftest.$ac_ext" >&5
10086
10087 cf_cv_term_header=unknown
10088
10089 fi
10090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10091 test "$cf_cv_term_header" != unknown && break
10092 done
10093
10094 fi
10095 echo "$as_me:10095: result: $cf_cv_term_header" >&5
10096 echo "${ECHO_T}$cf_cv_term_header" >&6
10097
10098 # Set definitions to allow ifdef'ing to accommodate subdirectories
10099
10100 case "$cf_cv_term_header" in
10101 (*term.h)
10102
10103 cat >>confdefs.h <<\EOF
10104 #define HAVE_TERM_H 1
10105 EOF
10106
10107 ;;
10108 esac
10109
10110 case "$cf_cv_term_header" in
10111 (ncurses/term.h)
10112
10113 cat >>confdefs.h <<\EOF
10114 #define HAVE_NCURSES_TERM_H 1
10115 EOF
10116
10117 ;;
10118 (ncursesw/term.h)
10119
10120 cat >>confdefs.h <<\EOF
10121 #define HAVE_NCURSESW_TERM_H 1
10122 EOF
10123
10124 ;;
10125 esac
10126
10127 # some applications need this, but should check for NCURSES_VERSION
10128
10129 cat >>confdefs.h <<\EOF
10130 #define NCURSES 1
10131 EOF
10132
10133 echo "$as_me:10133: checking for ncurses version" >&5
10134 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10135 if test "${cf_cv_ncurses_version+set}" = set; then
10136 echo $ECHO_N "(cached) $ECHO_C" >&6
10137 else
10138
10139 cf_cv_ncurses_version=no
10140 cf_tempfile=out$$
10141 rm -f "$cf_tempfile"
10142 if test "$cross_compiling" = yes; then
10143
10144 # This will not work if the preprocessor splits the line after the
10145 # Autoconf token. The 'unproto' program does that.
10146 cat > "conftest.$ac_ext" <<EOF
10147 #include <${cf_cv_ncurses_header:-curses.h}>
10148 #undef Autoconf
10149 #ifdef NCURSES_VERSION
10150 Autoconf NCURSES_VERSION
10151 #else
10152 #ifdef __NCURSES_H
10153 Autoconf "old"
10154 #endif
10155 ;
10156 #endif
10157 EOF
10158 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10159 { (eval echo "$as_me:10159: \"$cf_try\"") >&5
10160 (eval $cf_try) 2>&5
10161 ac_status=$?
10162 echo "$as_me:10162: \$? = $ac_status" >&5
10163 (exit "$ac_status"); }
10164 if test -f conftest.out ; then
10165 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10166 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10167 rm -f conftest.out
10168 fi
10169
10170 else
10171 cat >"conftest.$ac_ext" <<_ACEOF
10172 #line 10172 "configure"
10173 #include "confdefs.h"
10174
10175 $ac_includes_default
10176
10177 #include <${cf_cv_ncurses_header:-curses.h}>
10178
10179 int main(void)
10180 {
10181 FILE *fp = fopen("$cf_tempfile", "w");
10182 #ifdef NCURSES_VERSION
10183 # ifdef NCURSES_VERSION_PATCH
10184 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10185 # else
10186 fprintf(fp, "%s\\n", NCURSES_VERSION);
10187 # endif
10188 #else
10189 # ifdef __NCURSES_H
10190 fprintf(fp, "old\\n");
10191 # else
10192 #error expected ncurses header to define __NCURSES_H
10193 # endif
10194 #endif
10195 ${cf_cv_main_return:-return}(0);
10196 }
10197 _ACEOF
10198 rm -f "conftest$ac_exeext"
10199 if { (eval echo "$as_me:10199: \"$ac_link\"") >&5
10200 (eval $ac_link) 2>&5
10201 ac_status=$?
10202 echo "$as_me:10202: \$? = $ac_status" >&5
10203 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10204 { (eval echo "$as_me:10204: \"$ac_try\"") >&5
10205 (eval $ac_try) 2>&5
10206 ac_status=$?
10207 echo "$as_me:10207: \$? = $ac_status" >&5
10208 (exit "$ac_status"); }; }; then
10209
10210 cf_cv_ncurses_version=`cat $cf_tempfile`
10211 else
10212 echo "$as_me: program exited with status $ac_status" >&5
10213 echo "$as_me: failed program was:" >&5
10214 cat "conftest.$ac_ext" >&5
10215 fi
10216 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10217 fi
10218 rm -f "$cf_tempfile"
10219
10220 fi
10221 echo "$as_me:10221: result: $cf_cv_ncurses_version" >&5
10222 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10223 test "$cf_cv_ncurses_version" = no ||
10224 cat >>confdefs.h <<\EOF
10225 #define NCURSES 1
10226 EOF
10227
10228 cf_nculib_root=$cf_cv_screen
10229 # This works, except for the special case where we find gpm, but
10230 # ncurses is in a nonstandard location via $LIBS, and we really want
10231 # to link gpm.
10232 cf_ncurses_LIBS=""
10233 cf_ncurses_SAVE="$LIBS"
10234 echo "$as_me:10234: checking for Gpm_Open in -lgpm" >&5
10235 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10236 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10237 echo $ECHO_N "(cached) $ECHO_C" >&6
10238 else
10239 ac_check_lib_save_LIBS=$LIBS
10240 LIBS="-lgpm $LIBS"
10241 cat >"conftest.$ac_ext" <<_ACEOF
10242 #line 10242 "configure"
10243 #include "confdefs.h"
10244
10245 /* Override any gcc2 internal prototype to avoid an error. */
10246 #ifdef __cplusplus
10247 extern "C"
10248 #endif
10249 /* We use char because int might match the return type of a gcc2
10250 builtin and then its argument prototype would still apply. */
10251 char Gpm_Open (void);
10252 int
10253 main (void)
10254 {
10255 Gpm_Open ();
10256 ;
10257 return 0;
10258 }
10259 _ACEOF
10260 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10261 if { (eval echo "$as_me:10261: \"$ac_link\"") >&5
10262 (eval $ac_link) 2>&5
10263 ac_status=$?
10264 echo "$as_me:10264: \$? = $ac_status" >&5
10265 (exit "$ac_status"); } &&
10266 { ac_try='test -s "conftest$ac_exeext"'
10267 { (eval echo "$as_me:10267: \"$ac_try\"") >&5
10268 (eval $ac_try) 2>&5
10269 ac_status=$?
10270 echo "$as_me:10270: \$? = $ac_status" >&5
10271 (exit "$ac_status"); }; }; then
10272 ac_cv_lib_gpm_Gpm_Open=yes
10273 else
10274 echo "$as_me: failed program was:" >&5
10275 cat "conftest.$ac_ext" >&5
10276 ac_cv_lib_gpm_Gpm_Open=no
10277 fi
10278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10279 LIBS=$ac_check_lib_save_LIBS
10280 fi
10281 echo "$as_me:10281: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10282 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10283 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10284 echo "$as_me:10284: checking for initscr in -lgpm" >&5
10285 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10286 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10287 echo $ECHO_N "(cached) $ECHO_C" >&6
10288 else
10289 ac_check_lib_save_LIBS=$LIBS
10290 LIBS="-lgpm $LIBS"
10291 cat >"conftest.$ac_ext" <<_ACEOF
10292 #line 10292 "configure"
10293 #include "confdefs.h"
10294
10295 /* Override any gcc2 internal prototype to avoid an error. */
10296 #ifdef __cplusplus
10297 extern "C"
10298 #endif
10299 /* We use char because int might match the return type of a gcc2
10300 builtin and then its argument prototype would still apply. */
10301 char initscr (void);
10302 int
10303 main (void)
10304 {
10305 initscr ();
10306 ;
10307 return 0;
10308 }
10309 _ACEOF
10310 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10311 if { (eval echo "$as_me:10311: \"$ac_link\"") >&5
10312 (eval $ac_link) 2>&5
10313 ac_status=$?
10314 echo "$as_me:10314: \$? = $ac_status" >&5
10315 (exit "$ac_status"); } &&
10316 { ac_try='test -s "conftest$ac_exeext"'
10317 { (eval echo "$as_me:10317: \"$ac_try\"") >&5
10318 (eval $ac_try) 2>&5
10319 ac_status=$?
10320 echo "$as_me:10320: \$? = $ac_status" >&5
10321 (exit "$ac_status"); }; }; then
10322 ac_cv_lib_gpm_initscr=yes
10323 else
10324 echo "$as_me: failed program was:" >&5
10325 cat "conftest.$ac_ext" >&5
10326 ac_cv_lib_gpm_initscr=no
10327 fi
10328 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10329 LIBS=$ac_check_lib_save_LIBS
10330 fi
10331 echo "$as_me:10331: result: $ac_cv_lib_gpm_initscr" >&5
10332 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10333 if test "$ac_cv_lib_gpm_initscr" = yes; then
10334 LIBS="$cf_ncurses_SAVE"
10335 else
10336 cf_ncurses_LIBS="-lgpm"
10337 fi
10338
10339 fi
10340
10341 case "$host_os" in
10342 (freebsd*)
10343 # This is only necessary if you are linking against an obsolete
10344 # version of ncurses (but it should do no harm, since it is static).
10345 if test "$cf_nculib_root" = ncurses ; then
10346 echo "$as_me:10346: checking for tgoto in -lmytinfo" >&5
10347 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10348 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
10350 else
10351 ac_check_lib_save_LIBS=$LIBS
10352 LIBS="-lmytinfo $LIBS"
10353 cat >"conftest.$ac_ext" <<_ACEOF
10354 #line 10354 "configure"
10355 #include "confdefs.h"
10356
10357 /* Override any gcc2 internal prototype to avoid an error. */
10358 #ifdef __cplusplus
10359 extern "C"
10360 #endif
10361 /* We use char because int might match the return type of a gcc2
10362 builtin and then its argument prototype would still apply. */
10363 char tgoto (void);
10364 int
10365 main (void)
10366 {
10367 tgoto ();
10368 ;
10369 return 0;
10370 }
10371 _ACEOF
10372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10373 if { (eval echo "$as_me:10373: \"$ac_link\"") >&5
10374 (eval $ac_link) 2>&5
10375 ac_status=$?
10376 echo "$as_me:10376: \$? = $ac_status" >&5
10377 (exit "$ac_status"); } &&
10378 { ac_try='test -s "conftest$ac_exeext"'
10379 { (eval echo "$as_me:10379: \"$ac_try\"") >&5
10380 (eval $ac_try) 2>&5
10381 ac_status=$?
10382 echo "$as_me:10382: \$? = $ac_status" >&5
10383 (exit "$ac_status"); }; }; then
10384 ac_cv_lib_mytinfo_tgoto=yes
10385 else
10386 echo "$as_me: failed program was:" >&5
10387 cat "conftest.$ac_ext" >&5
10388 ac_cv_lib_mytinfo_tgoto=no
10389 fi
10390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10391 LIBS=$ac_check_lib_save_LIBS
10392 fi
10393 echo "$as_me:10393: result: $ac_cv_lib_mytinfo_tgoto" >&5
10394 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10395 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
10396 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10397 fi
10398
10399 fi
10400 ;;
10401 esac
10402
10403 cf_add_libs="$LIBS"
10404 # reverse order
10405 cf_add_0lib=
10406 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10407 # filter duplicates
10408 for cf_add_1lib in $cf_add_0lib; do
10409 for cf_add_2lib in $cf_add_libs; do
10410 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10411 cf_add_1lib=
10412 break
10413 fi
10414 done
10415 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10416 done
10417 LIBS="$cf_add_libs"
10418
10419 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
10420 then
10421
10422 cf_add_libs="$LIBS"
10423 # reverse order
10424 cf_add_0lib=
10425 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10426 # filter duplicates
10427 for cf_add_1lib in $cf_add_0lib; do
10428 for cf_add_2lib in $cf_add_libs; do
10429 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10430 cf_add_1lib=
10431 break
10432 fi
10433 done
10434 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10435 done
10436 LIBS="$cf_add_libs"
10437
10438 else
10439
10440 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10441 cf_libdir=""
10442 echo "$as_me:10442: checking for initscr" >&5
10443 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10444 if test "${ac_cv_func_initscr+set}" = set; then
10445 echo $ECHO_N "(cached) $ECHO_C" >&6
10446 else
10447 cat >"conftest.$ac_ext" <<_ACEOF
10448 #line 10448 "configure"
10449 #include "confdefs.h"
10450 #define initscr autoconf_temporary
10451 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10452 #undef initscr
10453
10454 #ifdef __cplusplus
10455 extern "C"
10456 #endif
10457
10458 /* We use char because int might match the return type of a gcc2
10459 builtin and then its argument prototype would still apply. */
10460 char initscr (void);
10461
10462 int
10463 main (void)
10464 {
10465
10466 /* The GNU C library defines stubs for functions which it implements
10467 to always fail with ENOSYS. Some functions are actually named
10468 something starting with __ and the normal name is an alias. */
10469 #if defined (__stub_initscr) || defined (__stub___initscr)
10470 #error found stub for initscr
10471 #endif
10472
10473 return initscr ();
10474 ;
10475 return 0;
10476 }
10477 _ACEOF
10478 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10479 if { (eval echo "$as_me:10479: \"$ac_link\"") >&5
10480 (eval $ac_link) 2>&5
10481 ac_status=$?
10482 echo "$as_me:10482: \$? = $ac_status" >&5
10483 (exit "$ac_status"); } &&
10484 { ac_try='test -s "conftest$ac_exeext"'
10485 { (eval echo "$as_me:10485: \"$ac_try\"") >&5
10486 (eval $ac_try) 2>&5
10487 ac_status=$?
10488 echo "$as_me:10488: \$? = $ac_status" >&5
10489 (exit "$ac_status"); }; }; then
10490 ac_cv_func_initscr=yes
10491 else
10492 echo "$as_me: failed program was:" >&5
10493 cat "conftest.$ac_ext" >&5
10494 ac_cv_func_initscr=no
10495 fi
10496 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10497 fi
10498 echo "$as_me:10498: result: $ac_cv_func_initscr" >&5
10499 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10500 if test "$ac_cv_func_initscr" = yes; then
10501 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10502 else
10503
10504 cf_save_LIBS="$LIBS"
10505 echo "$as_me:10505: checking for initscr in -l$cf_nculib_root" >&5
10506 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10507 LIBS="-l$cf_nculib_root $LIBS"
10508 cat >"conftest.$ac_ext" <<_ACEOF
10509 #line 10509 "configure"
10510 #include "confdefs.h"
10511 #include <${cf_cv_ncurses_header:-curses.h}>
10512 int
10513 main (void)
10514 {
10515 initscr()
10516 ;
10517 return 0;
10518 }
10519 _ACEOF
10520 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10521 if { (eval echo "$as_me:10521: \"$ac_link\"") >&5
10522 (eval $ac_link) 2>&5
10523 ac_status=$?
10524 echo "$as_me:10524: \$? = $ac_status" >&5
10525 (exit "$ac_status"); } &&
10526 { ac_try='test -s "conftest$ac_exeext"'
10527 { (eval echo "$as_me:10527: \"$ac_try\"") >&5
10528 (eval $ac_try) 2>&5
10529 ac_status=$?
10530 echo "$as_me:10530: \$? = $ac_status" >&5
10531 (exit "$ac_status"); }; }; then
10532 echo "$as_me:10532: result: yes" >&5
10533 echo "${ECHO_T}yes" >&6
10534 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10535
10536 else
10537 echo "$as_me: failed program was:" >&5
10538 cat "conftest.$ac_ext" >&5
10539 echo "$as_me:10539: result: no" >&5
10540 echo "${ECHO_T}no" >&6
10541
10542 cf_search=
10543 cf_library_path_list=""
10544 if test -n "${LDFLAGS}${LIBS}" ; then
10545 for cf_library_path in $LDFLAGS $LIBS
10546 do
10547 case "$cf_library_path" in
10548 (-L*)
10549 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10550
10551 test "x$cf_library_path" != "xNONE" && \
10552 test -d "$cf_library_path" && \
10553 {
10554 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10555 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10556 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10557 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10558 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10559 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"
10560 }
10561
10562 cf_library_path_list="$cf_library_path_list $cf_search"
10563 ;;
10564 esac
10565 done
10566 fi
10567
10568 cf_search=
10569
10570 test "x$prefix" != "xNONE" && \
10571 test -d "$prefix" && \
10572 {
10573 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10574 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10575 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10576 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10577 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10578 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10579 }
10580
10581 for cf_subdir_prefix in \
10582 /usr \
10583 /usr/local \
10584 /usr/pkg \
10585 /opt \
10586 /opt/local \
10587 $HOME
10588 do
10589
10590 test "x$cf_subdir_prefix" != "x$prefix" && \
10591 test -d "$cf_subdir_prefix" && \
10592 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10593 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10594 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10595 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10596 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10597 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10598 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"
10599 }
10600
10601 done
10602
10603 cf_search="$cf_library_path_list $cf_search"
10604
10605 for cf_libdir in $cf_search
10606 do
10607 echo "$as_me:10607: checking for -l$cf_nculib_root in $cf_libdir" >&5
10608 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10609 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10610 cat >"conftest.$ac_ext" <<_ACEOF
10611 #line 10611 "configure"
10612 #include "confdefs.h"
10613 #include <${cf_cv_ncurses_header:-curses.h}>
10614 int
10615 main (void)
10616 {
10617 initscr()
10618 ;
10619 return 0;
10620 }
10621 _ACEOF
10622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10623 if { (eval echo "$as_me:10623: \"$ac_link\"") >&5
10624 (eval $ac_link) 2>&5
10625 ac_status=$?
10626 echo "$as_me:10626: \$? = $ac_status" >&5
10627 (exit "$ac_status"); } &&
10628 { ac_try='test -s "conftest$ac_exeext"'
10629 { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630 (eval $ac_try) 2>&5
10631 ac_status=$?
10632 echo "$as_me:10632: \$? = $ac_status" >&5
10633 (exit "$ac_status"); }; }; then
10634 echo "$as_me:10634: result: yes" >&5
10635 echo "${ECHO_T}yes" >&6
10636 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10637 break
10638 else
10639 echo "$as_me: failed program was:" >&5
10640 cat "conftest.$ac_ext" >&5
10641 echo "$as_me:10641: result: no" >&5
10642 echo "${ECHO_T}no" >&6
10643 LIBS="$cf_save_LIBS"
10644 fi
10645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10646 done
10647
10648 fi
10649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10650
10651 fi
10652
10653 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10654
10655 if test "$cf_found_library" = no ; then
10656 { { echo "$as_me:10656: error: Cannot link $cf_nculib_root library" >&5
10657 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10658 { (exit 1); exit 1; }; }
10659 fi
10660
10661 fi
10662
10663 if test -n "$cf_ncurses_LIBS" ; then
10664 echo "$as_me:10664: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10665 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10666 cf_ncurses_SAVE="$LIBS"
10667 for p in $cf_ncurses_LIBS ; do
10668 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
10669 if test "$q" != "$LIBS" ; then
10670 LIBS="$q"
10671 fi
10672 done
10673 cat >"conftest.$ac_ext" <<_ACEOF
10674 #line 10674 "configure"
10675 #include "confdefs.h"
10676 #include <${cf_cv_ncurses_header:-curses.h}>
10677 int
10678 main (void)
10679 {
10680 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
10681 ;
10682 return 0;
10683 }
10684 _ACEOF
10685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10686 if { (eval echo "$as_me:10686: \"$ac_link\"") >&5
10687 (eval $ac_link) 2>&5
10688 ac_status=$?
10689 echo "$as_me:10689: \$? = $ac_status" >&5
10690 (exit "$ac_status"); } &&
10691 { ac_try='test -s "conftest$ac_exeext"'
10692 { (eval echo "$as_me:10692: \"$ac_try\"") >&5
10693 (eval $ac_try) 2>&5
10694 ac_status=$?
10695 echo "$as_me:10695: \$? = $ac_status" >&5
10696 (exit "$ac_status"); }; }; then
10697 echo "$as_me:10697: result: yes" >&5
10698 echo "${ECHO_T}yes" >&6
10699 else
10700 echo "$as_me: failed program was:" >&5
10701 cat "conftest.$ac_ext" >&5
10702 echo "$as_me:10702: result: no" >&5
10703 echo "${ECHO_T}no" >&6
10704 LIBS="$cf_ncurses_SAVE"
10705 fi
10706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10707 fi
10708
10709 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10710
10711 cat >>confdefs.h <<EOF
10712 #define $cf_nculib_ROOT 1
10713 EOF
10714
10715 fi
10716 else
10717 NCURSES_CONFIG=none
10718 fi
10719
10720 ;;
10721 (ncurses*)
10722
10723 cf_ncuconfig_root=$cf_cv_screen
10724 cf_have_ncuconfig=no
10725
10726 if test "x${PKG_CONFIG:=none}" != xnone; then
10727 echo "$as_me:10727: checking pkg-config for $cf_ncuconfig_root" >&5
10728 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10729 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10730 echo "$as_me:10730: result: yes" >&5
10731 echo "${ECHO_T}yes" >&6
10732
10733 echo "$as_me:10733: checking if the $cf_ncuconfig_root package files work" >&5
10734 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10735 cf_have_ncuconfig=unknown
10736
10737 cf_save_CFLAGS="$CFLAGS"
10738 cf_save_CPPFLAGS="$CPPFLAGS"
10739 cf_save_LIBS="$LIBS"
10740
10741 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10742 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10743
10744 # while -W for passing linker flags is prevalent, it is not "standard".
10745 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10746 # incompatible _and_ non-standard -W option which gives an error. Work
10747 # around that pitfall.
10748 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10749 (x*c[89]9@@*-W*)
10750
10751 cf_fix_cppflags=no
10752 cf_new_cflags=
10753 cf_new_cppflags=
10754 cf_new_extra_cppflags=
10755
10756 for cf_add_cflags in $cf_pkg_cflags
10757 do
10758 case "$cf_fix_cppflags" in
10759 (no)
10760 case "$cf_add_cflags" in
10761 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10762 case "$cf_add_cflags" in
10763 (-D*)
10764 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10765
10766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10767 && test -z "${cf_tst_cflags}" \
10768 && cf_fix_cppflags=yes
10769
10770 if test "$cf_fix_cppflags" = yes ; then
10771
10772 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10773 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10774
10775 continue
10776 elif test "${cf_tst_cflags}" = "\"'" ; then
10777
10778 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10779 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10780
10781 continue
10782 fi
10783 ;;
10784 esac
10785 case "$CPPFLAGS" in
10786 (*$cf_add_cflags)
10787 ;;
10788 (*)
10789 case "$cf_add_cflags" in
10790 (-D*)
10791 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10792
10793 CPPFLAGS=`echo "$CPPFLAGS" | \
10794 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10795 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10796
10797 ;;
10798 esac
10799
10800 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10801 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10802
10803 ;;
10804 esac
10805 ;;
10806 (*)
10807
10808 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10809 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10810
10811 ;;
10812 esac
10813 ;;
10814 (yes)
10815
10816 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10817 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10818
10819 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10820
10821 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10822 && test -z "${cf_tst_cflags}" \
10823 && cf_fix_cppflags=no
10824 ;;
10825 esac
10826 done
10827
10828 if test -n "$cf_new_cflags" ; then
10829
10830 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10831 CFLAGS="${CFLAGS}$cf_new_cflags"
10832
10833 fi
10834
10835 if test -n "$cf_new_cppflags" ; then
10836
10837 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10838 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10839
10840 fi
10841
10842 if test -n "$cf_new_extra_cppflags" ; then
10843
10844 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10845 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10846
10847 fi
10848
10849 cf_add_libs="$LIBS"
10850 # reverse order
10851 cf_add_0lib=
10852 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10853 # filter duplicates
10854 for cf_add_1lib in $cf_add_0lib; do
10855 for cf_add_2lib in $cf_add_libs; do
10856 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10857 cf_add_1lib=
10858 break
10859 fi
10860 done
10861 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10862 done
10863 LIBS="$cf_add_libs"
10864
10865 cat >"conftest.$ac_ext" <<_ACEOF
10866 #line 10866 "configure"
10867 #include "confdefs.h"
10868 #include <${cf_cv_ncurses_header:-curses.h}>
10869 int
10870 main (void)
10871 {
10872 initscr(); mousemask(0,(mmask_t*)0); tigetstr((char *)0);
10873 ;
10874 return 0;
10875 }
10876 _ACEOF
10877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10878 if { (eval echo "$as_me:10878: \"$ac_link\"") >&5
10879 (eval $ac_link) 2>&5
10880 ac_status=$?
10881 echo "$as_me:10881: \$? = $ac_status" >&5
10882 (exit "$ac_status"); } &&
10883 { ac_try='test -s "conftest$ac_exeext"'
10884 { (eval echo "$as_me:10884: \"$ac_try\"") >&5
10885 (eval $ac_try) 2>&5
10886 ac_status=$?
10887 echo "$as_me:10887: \$? = $ac_status" >&5
10888 (exit "$ac_status"); }; }; then
10889 if test "$cross_compiling" = yes; then
10890 cf_test_ncuconfig=maybe
10891 else
10892 cat >"conftest.$ac_ext" <<_ACEOF
10893 #line 10893 "configure"
10894 #include "confdefs.h"
10895 #include <${cf_cv_ncurses_header:-curses.h}>
10896 int main(void)
10897 { const char *xx = curses_version(); return (xx == (const char*)0); }
10898 _ACEOF
10899 rm -f "conftest$ac_exeext"
10900 if { (eval echo "$as_me:10900: \"$ac_link\"") >&5
10901 (eval $ac_link) 2>&5
10902 ac_status=$?
10903 echo "$as_me:10903: \$? = $ac_status" >&5
10904 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10905 { (eval echo "$as_me:10905: \"$ac_try\"") >&5
10906 (eval $ac_try) 2>&5
10907 ac_status=$?
10908 echo "$as_me:10908: \$? = $ac_status" >&5
10909 (exit "$ac_status"); }; }; then
10910 cf_test_ncuconfig=yes
10911 else
10912 echo "$as_me: program exited with status $ac_status" >&5
10913 echo "$as_me: failed program was:" >&5
10914 cat "conftest.$ac_ext" >&5
10915 cf_test_ncuconfig=no
10916 fi
10917 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10918 fi
10919 else
10920 echo "$as_me: failed program was:" >&5
10921 cat "conftest.$ac_ext" >&5
10922 cf_test_ncuconfig=no
10923 fi
10924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10925
10926 CFLAGS="$cf_save_CFLAGS"
10927 CPPFLAGS="$cf_save_CPPFLAGS"
10928 LIBS="$cf_save_LIBS"
10929
10930 if test "x$cf_test_ncuconfig" != xyes; then
10931 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10932 cf_pkg_cflags="$cf_temp"
10933 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10934 cf_pkg_libs="$cf_temp"
10935 fi
10936 ;;
10937 esac
10938
10939 for cf_required in $cf_ncuconfig_root
10940 do
10941 # check for duplicates
10942 for cf_require_pkg in $REQUIRE_PKG
10943 do
10944 if test "$cf_required" = "$cf_require_pkg"
10945 then
10946 cf_required=
10947 break
10948 fi
10949 done
10950 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
10951 done
10952
10953 for cf_add_cflags in $cf_pkg_cflags
10954 do
10955 case "x$cf_add_cflags" in
10956 (x-[DU]*)
10957
10958 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10959 while true
10960 do
10961 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10962 test "$CFLAGS" != "$cf_old_cflag" || break
10963
10964 CFLAGS="$cf_old_cflag"
10965 done
10966
10967 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10968 while true
10969 do
10970 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10971 test "$CPPFLAGS" != "$cf_old_cflag" || break
10972
10973 CPPFLAGS="$cf_old_cflag"
10974 done
10975
10976 ;;
10977 esac
10978
10979 cf_fix_cppflags=no
10980 cf_new_cflags=
10981 cf_new_cppflags=
10982 cf_new_extra_cppflags=
10983
10984 for cf_add_cflags in $cf_add_cflags
10985 do
10986 case "$cf_fix_cppflags" in
10987 (no)
10988 case "$cf_add_cflags" in
10989 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10990 case "$cf_add_cflags" in
10991 (-D*)
10992 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10993
10994 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10995 && test -z "${cf_tst_cflags}" \
10996 && cf_fix_cppflags=yes
10997
10998 if test "$cf_fix_cppflags" = yes ; then
10999
11000 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11001 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11002
11003 continue
11004 elif test "${cf_tst_cflags}" = "\"'" ; then
11005
11006 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11007 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11008
11009 continue
11010 fi
11011 ;;
11012 esac
11013 case "$CPPFLAGS" in
11014 (*$cf_add_cflags)
11015 ;;
11016 (*)
11017 case "$cf_add_cflags" in
11018 (-D*)
11019 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11020
11021 CPPFLAGS=`echo "$CPPFLAGS" | \
11022 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11023 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11024
11025 ;;
11026 esac
11027
11028 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11029 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11030
11031 ;;
11032 esac
11033 ;;
11034 (*)
11035
11036 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11037 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11038
11039 ;;
11040 esac
11041 ;;
11042 (yes)
11043
11044 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11045 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11046
11047 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11048
11049 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11050 && test -z "${cf_tst_cflags}" \
11051 && cf_fix_cppflags=no
11052 ;;
11053 esac
11054 done
11055
11056 if test -n "$cf_new_cflags" ; then
11057
11058 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11059 CFLAGS="${CFLAGS}$cf_new_cflags"
11060
11061 fi
11062
11063 if test -n "$cf_new_cppflags" ; then
11064
11065 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11066 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11067
11068 fi
11069
11070 if test -n "$cf_new_extra_cppflags" ; then
11071
11072 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11073 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11074
11075 fi
11076
11077 done
11078
11079 cf_add_libs="$LIBS"
11080 # reverse order
11081 cf_add_0lib=
11082 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11083 # filter duplicates
11084 for cf_add_1lib in $cf_add_0lib; do
11085 for cf_add_2lib in $cf_add_libs; do
11086 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11087 cf_add_1lib=
11088 break
11089 fi
11090 done
11091 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11092 done
11093 LIBS="$cf_add_libs"
11094
11095 cat >"conftest.$ac_ext" <<_ACEOF
11096 #line 11096 "configure"
11097 #include "confdefs.h"
11098 #include <${cf_cv_ncurses_header:-curses.h}>
11099 int
11100 main (void)
11101 {
11102 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
11103 ;
11104 return 0;
11105 }
11106 _ACEOF
11107 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11108 if { (eval echo "$as_me:11108: \"$ac_link\"") >&5
11109 (eval $ac_link) 2>&5
11110 ac_status=$?
11111 echo "$as_me:11111: \$? = $ac_status" >&5
11112 (exit "$ac_status"); } &&
11113 { ac_try='test -s "conftest$ac_exeext"'
11114 { (eval echo "$as_me:11114: \"$ac_try\"") >&5
11115 (eval $ac_try) 2>&5
11116 ac_status=$?
11117 echo "$as_me:11117: \$? = $ac_status" >&5
11118 (exit "$ac_status"); }; }; then
11119 if test "$cross_compiling" = yes; then
11120 cf_have_ncuconfig=maybe
11121 else
11122 cat >"conftest.$ac_ext" <<_ACEOF
11123 #line 11123 "configure"
11124 #include "confdefs.h"
11125 #include <${cf_cv_ncurses_header:-curses.h}>
11126 int main(void)
11127 { const char *xx = curses_version(); return (xx == (const char*)0); }
11128 _ACEOF
11129 rm -f "conftest$ac_exeext"
11130 if { (eval echo "$as_me:11130: \"$ac_link\"") >&5
11131 (eval $ac_link) 2>&5
11132 ac_status=$?
11133 echo "$as_me:11133: \$? = $ac_status" >&5
11134 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11135 { (eval echo "$as_me:11135: \"$ac_try\"") >&5
11136 (eval $ac_try) 2>&5
11137 ac_status=$?
11138 echo "$as_me:11138: \$? = $ac_status" >&5
11139 (exit "$ac_status"); }; }; then
11140 cf_have_ncuconfig=yes
11141 else
11142 echo "$as_me: program exited with status $ac_status" >&5
11143 echo "$as_me: failed program was:" >&5
11144 cat "conftest.$ac_ext" >&5
11145 cf_have_ncuconfig=no
11146 fi
11147 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11148 fi
11149 else
11150 echo "$as_me: failed program was:" >&5
11151 cat "conftest.$ac_ext" >&5
11152 cf_have_ncuconfig=no
11153 fi
11154 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11155 echo "$as_me:11155: result: $cf_have_ncuconfig" >&5
11156 echo "${ECHO_T}$cf_have_ncuconfig" >&6
11157 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
11158 if test "$cf_have_ncuconfig" != "yes"
11159 then
11160 CPPFLAGS="$cf_save_CPPFLAGS"
11161 LIBS="$cf_save_LIBS"
11162 NCURSES_CONFIG_PKG=none
11163 else
11164
11165 cat >>confdefs.h <<\EOF
11166 #define NCURSES 1
11167 EOF
11168
11169 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
11170
11171 echo "$as_me:11171: checking for terminfo header" >&5
11172 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11173 if test "${cf_cv_term_header+set}" = set; then
11174 echo $ECHO_N "(cached) $ECHO_C" >&6
11175 else
11176
11177 case "${cf_cv_ncurses_header}" in
11178 (*/ncurses.h|*/ncursesw.h)
11179 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11180 ;;
11181 (*)
11182 cf_term_header=term.h
11183 ;;
11184 esac
11185
11186 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11187 do
11188 cat >"conftest.$ac_ext" <<_ACEOF
11189 #line 11189 "configure"
11190 #include "confdefs.h"
11191 #include <stdio.h>
11192 #include <${cf_cv_ncurses_header:-curses.h}>
11193 #include <$cf_test>
11194
11195 int
11196 main (void)
11197 {
11198 int x = auto_left_margin; (void)x
11199 ;
11200 return 0;
11201 }
11202 _ACEOF
11203 rm -f "conftest.$ac_objext"
11204 if { (eval echo "$as_me:11204: \"$ac_compile\"") >&5
11205 (eval $ac_compile) 2>&5
11206 ac_status=$?
11207 echo "$as_me:11207: \$? = $ac_status" >&5
11208 (exit "$ac_status"); } &&
11209 { ac_try='test -s "conftest.$ac_objext"'
11210 { (eval echo "$as_me:11210: \"$ac_try\"") >&5
11211 (eval $ac_try) 2>&5
11212 ac_status=$?
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit "$ac_status"); }; }; then
11215
11216 cf_cv_term_header="$cf_test"
11217 else
11218 echo "$as_me: failed program was:" >&5
11219 cat "conftest.$ac_ext" >&5
11220
11221 cf_cv_term_header=unknown
11222
11223 fi
11224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11225 test "$cf_cv_term_header" != unknown && break
11226 done
11227
11228 fi
11229 echo "$as_me:11229: result: $cf_cv_term_header" >&5
11230 echo "${ECHO_T}$cf_cv_term_header" >&6
11231
11232 # Set definitions to allow ifdef'ing to accommodate subdirectories
11233
11234 case "$cf_cv_term_header" in
11235 (*term.h)
11236
11237 cat >>confdefs.h <<\EOF
11238 #define HAVE_TERM_H 1
11239 EOF
11240
11241 ;;
11242 esac
11243
11244 case "$cf_cv_term_header" in
11245 (ncurses/term.h)
11246
11247 cat >>confdefs.h <<\EOF
11248 #define HAVE_NCURSES_TERM_H 1
11249 EOF
11250
11251 ;;
11252 (ncursesw/term.h)
11253
11254 cat >>confdefs.h <<\EOF
11255 #define HAVE_NCURSESW_TERM_H 1
11256 EOF
11257
11258 ;;
11259 esac
11260
11261 fi
11262
11263 else
11264 echo "$as_me:11264: result: no" >&5
11265 echo "${ECHO_T}no" >&6
11266 NCURSES_CONFIG_PKG=none
11267 fi
11268 else
11269 NCURSES_CONFIG_PKG=none
11270 fi
11271
11272 if test "x$cf_have_ncuconfig" = "xno"; then
11273 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
11274
11275 if test -n "$ac_tool_prefix"; then
11276 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11277 do
11278 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11279 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11280 echo "$as_me:11280: checking for $ac_word" >&5
11281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11282 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
11283 echo $ECHO_N "(cached) $ECHO_C" >&6
11284 else
11285 if test -n "$NCURSES_CONFIG"; then
11286 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
11287 else
11288 ac_save_IFS=$IFS; IFS=$ac_path_separator
11289 ac_dummy="$PATH"
11290 for ac_dir in $ac_dummy; do
11291 IFS=$ac_save_IFS
11292 test -z "$ac_dir" && ac_dir=.
11293 $as_executable_p "$ac_dir/$ac_word" || continue
11294 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
11295 echo "$as_me:11295: found $ac_dir/$ac_word" >&5
11296 break
11297 done
11298
11299 fi
11300 fi
11301 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
11302 if test -n "$NCURSES_CONFIG"; then
11303 echo "$as_me:11303: result: $NCURSES_CONFIG" >&5
11304 echo "${ECHO_T}$NCURSES_CONFIG" >&6
11305 else
11306 echo "$as_me:11306: result: no" >&5
11307 echo "${ECHO_T}no" >&6
11308 fi
11309
11310 test -n "$NCURSES_CONFIG" && break
11311 done
11312 fi
11313 if test -z "$NCURSES_CONFIG"; then
11314 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
11315 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11316 do
11317 # Extract the first word of "$ac_prog", so it can be a program name with args.
11318 set dummy $ac_prog; ac_word=$2
11319 echo "$as_me:11319: checking for $ac_word" >&5
11320 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11321 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
11322 echo $ECHO_N "(cached) $ECHO_C" >&6
11323 else
11324 if test -n "$ac_ct_NCURSES_CONFIG"; then
11325 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
11326 else
11327 ac_save_IFS=$IFS; IFS=$ac_path_separator
11328 ac_dummy="$PATH"
11329 for ac_dir in $ac_dummy; do
11330 IFS=$ac_save_IFS
11331 test -z "$ac_dir" && ac_dir=.
11332 $as_executable_p "$ac_dir/$ac_word" || continue
11333 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
11334 echo "$as_me:11334: found $ac_dir/$ac_word" >&5
11335 break
11336 done
11337
11338 fi
11339 fi
11340 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
11341 if test -n "$ac_ct_NCURSES_CONFIG"; then
11342 echo "$as_me:11342: result: $ac_ct_NCURSES_CONFIG" >&5
11343 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
11344 else
11345 echo "$as_me:11345: result: no" >&5
11346 echo "${ECHO_T}no" >&6
11347 fi
11348
11349 test -n "$ac_ct_NCURSES_CONFIG" && break
11350 done
11351 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
11352
11353 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
11354 fi
11355
11356 if test "$NCURSES_CONFIG" != none ; then
11357
11358 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
11359 do
11360 case "x$cf_add_cflags" in
11361 (x-[DU]*)
11362
11363 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11364 while true
11365 do
11366 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11367 test "$CFLAGS" != "$cf_old_cflag" || break
11368
11369 CFLAGS="$cf_old_cflag"
11370 done
11371
11372 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11373 while true
11374 do
11375 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11376 test "$CPPFLAGS" != "$cf_old_cflag" || break
11377
11378 CPPFLAGS="$cf_old_cflag"
11379 done
11380
11381 ;;
11382 esac
11383
11384 cf_fix_cppflags=no
11385 cf_new_cflags=
11386 cf_new_cppflags=
11387 cf_new_extra_cppflags=
11388
11389 for cf_add_cflags in $cf_add_cflags
11390 do
11391 case "$cf_fix_cppflags" in
11392 (no)
11393 case "$cf_add_cflags" in
11394 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11395 case "$cf_add_cflags" in
11396 (-D*)
11397 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11398
11399 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11400 && test -z "${cf_tst_cflags}" \
11401 && cf_fix_cppflags=yes
11402
11403 if test "$cf_fix_cppflags" = yes ; then
11404
11405 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11406 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11407
11408 continue
11409 elif test "${cf_tst_cflags}" = "\"'" ; then
11410
11411 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11412 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11413
11414 continue
11415 fi
11416 ;;
11417 esac
11418 case "$CPPFLAGS" in
11419 (*$cf_add_cflags)
11420 ;;
11421 (*)
11422 case "$cf_add_cflags" in
11423 (-D*)
11424 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11425
11426 CPPFLAGS=`echo "$CPPFLAGS" | \
11427 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11428 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11429
11430 ;;
11431 esac
11432
11433 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11434 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11435
11436 ;;
11437 esac
11438 ;;
11439 (*)
11440
11441 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11442 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11443
11444 ;;
11445 esac
11446 ;;
11447 (yes)
11448
11449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11451
11452 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11453
11454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11455 && test -z "${cf_tst_cflags}" \
11456 && cf_fix_cppflags=no
11457 ;;
11458 esac
11459 done
11460
11461 if test -n "$cf_new_cflags" ; then
11462
11463 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11464 CFLAGS="${CFLAGS}$cf_new_cflags"
11465
11466 fi
11467
11468 if test -n "$cf_new_cppflags" ; then
11469
11470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11471 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11472
11473 fi
11474
11475 if test -n "$cf_new_extra_cppflags" ; then
11476
11477 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11478 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11479
11480 fi
11481
11482 done
11483
11484 cf_add_libs="$LIBS"
11485 # reverse order
11486 cf_add_0lib=
11487 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11488 # filter duplicates
11489 for cf_add_1lib in $cf_add_0lib; do
11490 for cf_add_2lib in $cf_add_libs; do
11491 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11492 cf_add_1lib=
11493 break
11494 fi
11495 done
11496 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11497 done
11498 LIBS="$cf_add_libs"
11499
11500 # even with config script, some packages use no-override for curses.h
11501
11502 echo "$as_me:11502: checking if we have identified curses headers" >&5
11503 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11504 if test "${cf_cv_ncurses_header+set}" = set; then
11505 echo $ECHO_N "(cached) $ECHO_C" >&6
11506 else
11507
11508 cf_cv_ncurses_header=none
11509 for cf_header in \
11510 ncurses.h $cf_cv_screen/ncurses.h \
11511 curses.h $cf_cv_screen/curses.h
11512 do
11513 cat >"conftest.$ac_ext" <<_ACEOF
11514 #line 11514 "configure"
11515 #include "confdefs.h"
11516 #include <${cf_header}>
11517 int
11518 main (void)
11519 {
11520 initscr(); endwin()
11521 ;
11522 return 0;
11523 }
11524 _ACEOF
11525 rm -f "conftest.$ac_objext"
11526 if { (eval echo "$as_me:11526: \"$ac_compile\"") >&5
11527 (eval $ac_compile) 2>&5
11528 ac_status=$?
11529 echo "$as_me:11529: \$? = $ac_status" >&5
11530 (exit "$ac_status"); } &&
11531 { ac_try='test -s "conftest.$ac_objext"'
11532 { (eval echo "$as_me:11532: \"$ac_try\"") >&5
11533 (eval $ac_try) 2>&5
11534 ac_status=$?
11535 echo "$as_me:11535: \$? = $ac_status" >&5
11536 (exit "$ac_status"); }; }; then
11537 cf_cv_ncurses_header=$cf_header; break
11538 else
11539 echo "$as_me: failed program was:" >&5
11540 cat "conftest.$ac_ext" >&5
11541 fi
11542 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11543 done
11544
11545 fi
11546 echo "$as_me:11546: result: $cf_cv_ncurses_header" >&5
11547 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11548
11549 if test "$cf_cv_ncurses_header" = none ; then
11550 { { echo "$as_me:11550: error: No curses header-files found" >&5
11551 echo "$as_me: error: No curses header-files found" >&2;}
11552 { (exit 1); exit 1; }; }
11553 fi
11554
11555 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11556
11557 for ac_header in $cf_cv_ncurses_header
11558 do
11559 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11560 echo "$as_me:11560: checking for $ac_header" >&5
11561 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11562 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11563 echo $ECHO_N "(cached) $ECHO_C" >&6
11564 else
11565 cat >"conftest.$ac_ext" <<_ACEOF
11566 #line 11566 "configure"
11567 #include "confdefs.h"
11568 #include <$ac_header>
11569 _ACEOF
11570 if { (eval echo "$as_me:11570: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11571 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11572 ac_status=$?
11573 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11574 rm -f conftest.er1
11575 cat conftest.err >&5
11576 echo "$as_me:11576: \$? = $ac_status" >&5
11577 (exit "$ac_status"); } >/dev/null; then
11578 if test -s conftest.err; then
11579 ac_cpp_err=$ac_c_preproc_warn_flag
11580 else
11581 ac_cpp_err=
11582 fi
11583 else
11584 ac_cpp_err=yes
11585 fi
11586 if test -z "$ac_cpp_err"; then
11587 eval "$as_ac_Header=yes"
11588 else
11589 echo "$as_me: failed program was:" >&5
11590 cat "conftest.$ac_ext" >&5
11591 eval "$as_ac_Header=no"
11592 fi
11593 rm -f conftest.err "conftest.$ac_ext"
11594 fi
11595 echo "$as_me:11595: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11596 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11597 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11598 cat >>confdefs.h <<EOF
11599 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11600 EOF
11601
11602 fi
11603 done
11604
11605 cat >>confdefs.h <<\EOF
11606 #define NCURSES 1
11607 EOF
11608
11609 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11610
11611 cat >>confdefs.h <<EOF
11612 #define $cf_nculib_ROOT 1
11613 EOF
11614
11615 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
11616
11617 else
11618
11619 cf_ncuhdr_root=$cf_cv_screen
11620
11621 test -n "$cf_cv_curses_dir" && \
11622 test "$cf_cv_curses_dir" != "no" && { \
11623
11624 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11625 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11626 do
11627 while test "$cf_add_incdir" != /usr/include
11628 do
11629 if test -d "$cf_add_incdir"
11630 then
11631 cf_have_incdir=no
11632 if test -n "$CFLAGS$CPPFLAGS" ; then
11633 # a loop is needed to ensure we can add subdirs of existing dirs
11634 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11635 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11636 cf_have_incdir=yes; break
11637 fi
11638 done
11639 fi
11640
11641 if test "$cf_have_incdir" = no ; then
11642 if test "$cf_add_incdir" = /usr/local/include ; then
11643 if test "$GCC" = yes
11644 then
11645 cf_save_CPPFLAGS=$CPPFLAGS
11646
11647 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11648 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11649
11650 cat >"conftest.$ac_ext" <<_ACEOF
11651 #line 11651 "configure"
11652 #include "confdefs.h"
11653 #include <stdio.h>
11654 int
11655 main (void)
11656 {
11657 printf("Hello")
11658 ;
11659 return 0;
11660 }
11661 _ACEOF
11662 rm -f "conftest.$ac_objext"
11663 if { (eval echo "$as_me:11663: \"$ac_compile\"") >&5
11664 (eval $ac_compile) 2>&5
11665 ac_status=$?
11666 echo "$as_me:11666: \$? = $ac_status" >&5
11667 (exit "$ac_status"); } &&
11668 { ac_try='test -s "conftest.$ac_objext"'
11669 { (eval echo "$as_me:11669: \"$ac_try\"") >&5
11670 (eval $ac_try) 2>&5
11671 ac_status=$?
11672 echo "$as_me:11672: \$? = $ac_status" >&5
11673 (exit "$ac_status"); }; }; then
11674 :
11675 else
11676 echo "$as_me: failed program was:" >&5
11677 cat "conftest.$ac_ext" >&5
11678 cf_have_incdir=yes
11679 fi
11680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11681 CPPFLAGS=$cf_save_CPPFLAGS
11682 fi
11683 fi
11684 fi
11685
11686 if test "$cf_have_incdir" = no ; then
11687 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11688
11689 echo "${as_me:-configure}:11689: testing adding $cf_add_incdir to include-path ..." 1>&5
11690
11691 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11692
11693 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11694 test "$cf_top_incdir" = "$cf_add_incdir" && break
11695 cf_add_incdir="$cf_top_incdir"
11696 else
11697 break
11698 fi
11699 else
11700 break
11701 fi
11702 done
11703 done
11704 fi
11705
11706 }
11707
11708 echo "$as_me:11708: checking for $cf_ncuhdr_root header in include-path" >&5
11709 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11710 if test "${cf_cv_ncurses_h+set}" = set; then
11711 echo $ECHO_N "(cached) $ECHO_C" >&6
11712 else
11713
11714 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11715 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
11716 for cf_header in $cf_header_list
11717 do
11718
11719 cat >"conftest.$ac_ext" <<_ACEOF
11720 #line 11720 "configure"
11721 #include "confdefs.h"
11722
11723 #include <$cf_header>
11724 int
11725 main (void)
11726 {
11727
11728 #ifdef NCURSES_VERSION
11729
11730 printf("%s\\n", NCURSES_VERSION);
11731 #else
11732 #ifdef __NCURSES_H
11733 printf("old\\n");
11734 #else
11735 #error __NCURSES_H is not defined
11736 #endif
11737 #endif
11738
11739 ;
11740 return 0;
11741 }
11742 _ACEOF
11743 rm -f "conftest.$ac_objext"
11744 if { (eval echo "$as_me:11744: \"$ac_compile\"") >&5
11745 (eval $ac_compile) 2>&5
11746 ac_status=$?
11747 echo "$as_me:11747: \$? = $ac_status" >&5
11748 (exit "$ac_status"); } &&
11749 { ac_try='test -s "conftest.$ac_objext"'
11750 { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751 (eval $ac_try) 2>&5
11752 ac_status=$?
11753 echo "$as_me:11753: \$? = $ac_status" >&5
11754 (exit "$ac_status"); }; }; then
11755 cf_cv_ncurses_h=$cf_header
11756
11757 else
11758 echo "$as_me: failed program was:" >&5
11759 cat "conftest.$ac_ext" >&5
11760 cf_cv_ncurses_h=no
11761 fi
11762 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11763
11764 test "$cf_cv_ncurses_h" != no && break
11765 done
11766
11767 fi
11768 echo "$as_me:11768: result: $cf_cv_ncurses_h" >&5
11769 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11770
11771 if test "$cf_cv_ncurses_h" != no ; then
11772 cf_cv_ncurses_header=$cf_cv_ncurses_h
11773 else
11774
11775 echo "$as_me:11775: checking for $cf_ncuhdr_root include-path" >&5
11776 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11777 if test "${cf_cv_ncurses_h2+set}" = set; then
11778 echo $ECHO_N "(cached) $ECHO_C" >&6
11779 else
11780
11781 test -n "$verbose" && echo
11782
11783 cf_search=
11784
11785 # collect the current set of include-directories from compiler flags
11786 cf_header_path_list=""
11787 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11788 for cf_header_path in $CPPFLAGS $CFLAGS
11789 do
11790 case "$cf_header_path" in
11791 (-I*)
11792 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11793
11794 test "x$cf_header_path" != "xNONE" && \
11795 test -d "$cf_header_path" && \
11796 {
11797 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11798 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11799 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11800 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11801 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11802 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"
11803 }
11804
11805 cf_header_path_list="$cf_header_path_list $cf_search"
11806 ;;
11807 esac
11808 done
11809 fi
11810
11811 # add the variations for the package we are looking for
11812
11813 cf_search=
11814
11815 test "x$prefix" != "xNONE" && \
11816 test -d "$prefix" && \
11817 {
11818 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11819 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11820 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11821 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11822 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11823 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11824 }
11825
11826 for cf_subdir_prefix in \
11827 /usr \
11828 /usr/local \
11829 /usr/pkg \
11830 /opt \
11831 /opt/local \
11832 $HOME
11833 do
11834
11835 test "x$cf_subdir_prefix" != "x$prefix" && \
11836 test -d "$cf_subdir_prefix" && \
11837 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11838 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11839 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11840 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11841 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11842 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11843 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"
11844 }
11845
11846 done
11847
11848 test "$includedir" != NONE && \
11849 test "$includedir" != "/usr/include" && \
11850 test -d "$includedir" && {
11851 test -d "$includedir" && cf_search="$cf_search $includedir"
11852 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11853 }
11854
11855 test "$oldincludedir" != NONE && \
11856 test "$oldincludedir" != "/usr/include" && \
11857 test -d "$oldincludedir" && {
11858 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11859 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11860 }
11861
11862 cf_search="$cf_search $cf_header_path_list"
11863
11864 test -n "$verbose" && echo "search path $cf_search"
11865 cf_save2_CPPFLAGS="$CPPFLAGS"
11866 for cf_incdir in $cf_search
11867 do
11868
11869 if test -n "$cf_incdir" ; then
11870 for cf_add_incdir in $cf_incdir
11871 do
11872 while test "$cf_add_incdir" != /usr/include
11873 do
11874 if test -d "$cf_add_incdir"
11875 then
11876 cf_have_incdir=no
11877 if test -n "$CFLAGS$CPPFLAGS" ; then
11878 # a loop is needed to ensure we can add subdirs of existing dirs
11879 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11880 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11881 cf_have_incdir=yes; break
11882 fi
11883 done
11884 fi
11885
11886 if test "$cf_have_incdir" = no ; then
11887 if test "$cf_add_incdir" = /usr/local/include ; then
11888 if test "$GCC" = yes
11889 then
11890 cf_save_CPPFLAGS=$CPPFLAGS
11891
11892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11893 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11894
11895 cat >"conftest.$ac_ext" <<_ACEOF
11896 #line 11896 "configure"
11897 #include "confdefs.h"
11898 #include <stdio.h>
11899 int
11900 main (void)
11901 {
11902 printf("Hello")
11903 ;
11904 return 0;
11905 }
11906 _ACEOF
11907 rm -f "conftest.$ac_objext"
11908 if { (eval echo "$as_me:11908: \"$ac_compile\"") >&5
11909 (eval $ac_compile) 2>&5
11910 ac_status=$?
11911 echo "$as_me:11911: \$? = $ac_status" >&5
11912 (exit "$ac_status"); } &&
11913 { ac_try='test -s "conftest.$ac_objext"'
11914 { (eval echo "$as_me:11914: \"$ac_try\"") >&5
11915 (eval $ac_try) 2>&5
11916 ac_status=$?
11917 echo "$as_me:11917: \$? = $ac_status" >&5
11918 (exit "$ac_status"); }; }; then
11919 :
11920 else
11921 echo "$as_me: failed program was:" >&5
11922 cat "conftest.$ac_ext" >&5
11923 cf_have_incdir=yes
11924 fi
11925 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11926 CPPFLAGS=$cf_save_CPPFLAGS
11927 fi
11928 fi
11929 fi
11930
11931 if test "$cf_have_incdir" = no ; then
11932 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11933
11934 echo "${as_me:-configure}:11934: testing adding $cf_add_incdir to include-path ..." 1>&5
11935
11936 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11937
11938 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11939 test "$cf_top_incdir" = "$cf_add_incdir" && break
11940 cf_add_incdir="$cf_top_incdir"
11941 else
11942 break
11943 fi
11944 else
11945 break
11946 fi
11947 done
11948 done
11949 fi
11950
11951 for cf_header in \
11952 ncurses.h \
11953 curses.h
11954 do
11955
11956 cat >"conftest.$ac_ext" <<_ACEOF
11957 #line 11957 "configure"
11958 #include "confdefs.h"
11959
11960 #include <$cf_header>
11961 int
11962 main (void)
11963 {
11964
11965 #ifdef NCURSES_VERSION
11966
11967 printf("%s\\n", NCURSES_VERSION);
11968 #else
11969 #ifdef __NCURSES_H
11970 printf("old\\n");
11971 #else
11972 #error __NCURSES_H is not defined
11973 #endif
11974 #endif
11975
11976 ;
11977 return 0;
11978 }
11979 _ACEOF
11980 rm -f "conftest.$ac_objext"
11981 if { (eval echo "$as_me:11981: \"$ac_compile\"") >&5
11982 (eval $ac_compile) 2>&5
11983 ac_status=$?
11984 echo "$as_me:11984: \$? = $ac_status" >&5
11985 (exit "$ac_status"); } &&
11986 { ac_try='test -s "conftest.$ac_objext"'
11987 { (eval echo "$as_me:11987: \"$ac_try\"") >&5
11988 (eval $ac_try) 2>&5
11989 ac_status=$?
11990 echo "$as_me:11990: \$? = $ac_status" >&5
11991 (exit "$ac_status"); }; }; then
11992 cf_cv_ncurses_h2=$cf_header
11993
11994 else
11995 echo "$as_me: failed program was:" >&5
11996 cat "conftest.$ac_ext" >&5
11997 cf_cv_ncurses_h2=no
11998 fi
11999 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12000
12001 if test "$cf_cv_ncurses_h2" != no ; then
12002 cf_cv_ncurses_h2=$cf_incdir/$cf_header
12003 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
12004 break
12005 fi
12006 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
12007 done
12008 CPPFLAGS="$cf_save2_CPPFLAGS"
12009 test "$cf_cv_ncurses_h2" != no && break
12010 done
12011 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:12011: error: not found" >&5
12012 echo "$as_me: error: not found" >&2;}
12013 { (exit 1); exit 1; }; }
12014
12015 fi
12016 echo "$as_me:12016: result: $cf_cv_ncurses_h2" >&5
12017 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
12018
12019 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
12020 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
12021 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
12022 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
12023 fi
12024
12025 if test -n "$cf_1st_incdir" ; then
12026 for cf_add_incdir in $cf_1st_incdir
12027 do
12028 while test "$cf_add_incdir" != /usr/include
12029 do
12030 if test -d "$cf_add_incdir"
12031 then
12032 cf_have_incdir=no
12033 if test -n "$CFLAGS$CPPFLAGS" ; then
12034 # a loop is needed to ensure we can add subdirs of existing dirs
12035 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12036 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12037 cf_have_incdir=yes; break
12038 fi
12039 done
12040 fi
12041
12042 if test "$cf_have_incdir" = no ; then
12043 if test "$cf_add_incdir" = /usr/local/include ; then
12044 if test "$GCC" = yes
12045 then
12046 cf_save_CPPFLAGS=$CPPFLAGS
12047
12048 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12049 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12050
12051 cat >"conftest.$ac_ext" <<_ACEOF
12052 #line 12052 "configure"
12053 #include "confdefs.h"
12054 #include <stdio.h>
12055 int
12056 main (void)
12057 {
12058 printf("Hello")
12059 ;
12060 return 0;
12061 }
12062 _ACEOF
12063 rm -f "conftest.$ac_objext"
12064 if { (eval echo "$as_me:12064: \"$ac_compile\"") >&5
12065 (eval $ac_compile) 2>&5
12066 ac_status=$?
12067 echo "$as_me:12067: \$? = $ac_status" >&5
12068 (exit "$ac_status"); } &&
12069 { ac_try='test -s "conftest.$ac_objext"'
12070 { (eval echo "$as_me:12070: \"$ac_try\"") >&5
12071 (eval $ac_try) 2>&5
12072 ac_status=$?
12073 echo "$as_me:12073: \$? = $ac_status" >&5
12074 (exit "$ac_status"); }; }; then
12075 :
12076 else
12077 echo "$as_me: failed program was:" >&5
12078 cat "conftest.$ac_ext" >&5
12079 cf_have_incdir=yes
12080 fi
12081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12082 CPPFLAGS=$cf_save_CPPFLAGS
12083 fi
12084 fi
12085 fi
12086
12087 if test "$cf_have_incdir" = no ; then
12088 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
12089
12090 echo "${as_me:-configure}:12090: testing adding $cf_add_incdir to include-path ..." 1>&5
12091
12092 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12093
12094 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12095 test "$cf_top_incdir" = "$cf_add_incdir" && break
12096 cf_add_incdir="$cf_top_incdir"
12097 else
12098 break
12099 fi
12100 else
12101 break
12102 fi
12103 done
12104 done
12105 fi
12106
12107 fi
12108
12109 # Set definitions to allow ifdef'ing for ncurses.h
12110
12111 case "$cf_cv_ncurses_header" in
12112 (*ncurses.h)
12113
12114 cat >>confdefs.h <<\EOF
12115 #define HAVE_NCURSES_H 1
12116 EOF
12117
12118 ;;
12119 esac
12120
12121 case "$cf_cv_ncurses_header" in
12122 (ncurses/curses.h|ncurses/ncurses.h)
12123
12124 cat >>confdefs.h <<\EOF
12125 #define HAVE_NCURSES_NCURSES_H 1
12126 EOF
12127
12128 ;;
12129 (ncursesw/curses.h|ncursesw/ncurses.h)
12130
12131 cat >>confdefs.h <<\EOF
12132 #define HAVE_NCURSESW_NCURSES_H 1
12133 EOF
12134
12135 ;;
12136 esac
12137
12138 echo "$as_me:12138: checking for terminfo header" >&5
12139 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12140 if test "${cf_cv_term_header+set}" = set; then
12141 echo $ECHO_N "(cached) $ECHO_C" >&6
12142 else
12143
12144 case "${cf_cv_ncurses_header}" in
12145 (*/ncurses.h|*/ncursesw.h)
12146 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12147 ;;
12148 (*)
12149 cf_term_header=term.h
12150 ;;
12151 esac
12152
12153 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12154 do
12155 cat >"conftest.$ac_ext" <<_ACEOF
12156 #line 12156 "configure"
12157 #include "confdefs.h"
12158 #include <stdio.h>
12159 #include <${cf_cv_ncurses_header:-curses.h}>
12160 #include <$cf_test>
12161
12162 int
12163 main (void)
12164 {
12165 int x = auto_left_margin; (void)x
12166 ;
12167 return 0;
12168 }
12169 _ACEOF
12170 rm -f "conftest.$ac_objext"
12171 if { (eval echo "$as_me:12171: \"$ac_compile\"") >&5
12172 (eval $ac_compile) 2>&5
12173 ac_status=$?
12174 echo "$as_me:12174: \$? = $ac_status" >&5
12175 (exit "$ac_status"); } &&
12176 { ac_try='test -s "conftest.$ac_objext"'
12177 { (eval echo "$as_me:12177: \"$ac_try\"") >&5
12178 (eval $ac_try) 2>&5
12179 ac_status=$?
12180 echo "$as_me:12180: \$? = $ac_status" >&5
12181 (exit "$ac_status"); }; }; then
12182
12183 cf_cv_term_header="$cf_test"
12184 else
12185 echo "$as_me: failed program was:" >&5
12186 cat "conftest.$ac_ext" >&5
12187
12188 cf_cv_term_header=unknown
12189
12190 fi
12191 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12192 test "$cf_cv_term_header" != unknown && break
12193 done
12194
12195 fi
12196 echo "$as_me:12196: result: $cf_cv_term_header" >&5
12197 echo "${ECHO_T}$cf_cv_term_header" >&6
12198
12199 # Set definitions to allow ifdef'ing to accommodate subdirectories
12200
12201 case "$cf_cv_term_header" in
12202 (*term.h)
12203
12204 cat >>confdefs.h <<\EOF
12205 #define HAVE_TERM_H 1
12206 EOF
12207
12208 ;;
12209 esac
12210
12211 case "$cf_cv_term_header" in
12212 (ncurses/term.h)
12213
12214 cat >>confdefs.h <<\EOF
12215 #define HAVE_NCURSES_TERM_H 1
12216 EOF
12217
12218 ;;
12219 (ncursesw/term.h)
12220
12221 cat >>confdefs.h <<\EOF
12222 #define HAVE_NCURSESW_TERM_H 1
12223 EOF
12224
12225 ;;
12226 esac
12227
12228 # some applications need this, but should check for NCURSES_VERSION
12229
12230 cat >>confdefs.h <<\EOF
12231 #define NCURSES 1
12232 EOF
12233
12234 echo "$as_me:12234: checking for ncurses version" >&5
12235 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
12236 if test "${cf_cv_ncurses_version+set}" = set; then
12237 echo $ECHO_N "(cached) $ECHO_C" >&6
12238 else
12239
12240 cf_cv_ncurses_version=no
12241 cf_tempfile=out$$
12242 rm -f "$cf_tempfile"
12243 if test "$cross_compiling" = yes; then
12244
12245 # This will not work if the preprocessor splits the line after the
12246 # Autoconf token. The 'unproto' program does that.
12247 cat > "conftest.$ac_ext" <<EOF
12248 #include <${cf_cv_ncurses_header:-curses.h}>
12249 #undef Autoconf
12250 #ifdef NCURSES_VERSION
12251 Autoconf NCURSES_VERSION
12252 #else
12253 #ifdef __NCURSES_H
12254 Autoconf "old"
12255 #endif
12256 ;
12257 #endif
12258 EOF
12259 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
12260 { (eval echo "$as_me:12260: \"$cf_try\"") >&5
12261 (eval $cf_try) 2>&5
12262 ac_status=$?
12263 echo "$as_me:12263: \$? = $ac_status" >&5
12264 (exit "$ac_status"); }
12265 if test -f conftest.out ; then
12266 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
12267 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
12268 rm -f conftest.out
12269 fi
12270
12271 else
12272 cat >"conftest.$ac_ext" <<_ACEOF
12273 #line 12273 "configure"
12274 #include "confdefs.h"
12275
12276 $ac_includes_default
12277
12278 #include <${cf_cv_ncurses_header:-curses.h}>
12279
12280 int main(void)
12281 {
12282 FILE *fp = fopen("$cf_tempfile", "w");
12283 #ifdef NCURSES_VERSION
12284 # ifdef NCURSES_VERSION_PATCH
12285 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
12286 # else
12287 fprintf(fp, "%s\\n", NCURSES_VERSION);
12288 # endif
12289 #else
12290 # ifdef __NCURSES_H
12291 fprintf(fp, "old\\n");
12292 # else
12293 #error expected ncurses header to define __NCURSES_H
12294 # endif
12295 #endif
12296 ${cf_cv_main_return:-return}(0);
12297 }
12298 _ACEOF
12299 rm -f "conftest$ac_exeext"
12300 if { (eval echo "$as_me:12300: \"$ac_link\"") >&5
12301 (eval $ac_link) 2>&5
12302 ac_status=$?
12303 echo "$as_me:12303: \$? = $ac_status" >&5
12304 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12305 { (eval echo "$as_me:12305: \"$ac_try\"") >&5
12306 (eval $ac_try) 2>&5
12307 ac_status=$?
12308 echo "$as_me:12308: \$? = $ac_status" >&5
12309 (exit "$ac_status"); }; }; then
12310
12311 cf_cv_ncurses_version=`cat $cf_tempfile`
12312 else
12313 echo "$as_me: program exited with status $ac_status" >&5
12314 echo "$as_me: failed program was:" >&5
12315 cat "conftest.$ac_ext" >&5
12316 fi
12317 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12318 fi
12319 rm -f "$cf_tempfile"
12320
12321 fi
12322 echo "$as_me:12322: result: $cf_cv_ncurses_version" >&5
12323 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12324 test "$cf_cv_ncurses_version" = no ||
12325 cat >>confdefs.h <<\EOF
12326 #define NCURSES 1
12327 EOF
12328
12329 cf_nculib_root=$cf_cv_screen
12330 # This works, except for the special case where we find gpm, but
12331 # ncurses is in a nonstandard location via $LIBS, and we really want
12332 # to link gpm.
12333 cf_ncurses_LIBS=""
12334 cf_ncurses_SAVE="$LIBS"
12335 echo "$as_me:12335: checking for Gpm_Open in -lgpm" >&5
12336 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
12337 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
12338 echo $ECHO_N "(cached) $ECHO_C" >&6
12339 else
12340 ac_check_lib_save_LIBS=$LIBS
12341 LIBS="-lgpm $LIBS"
12342 cat >"conftest.$ac_ext" <<_ACEOF
12343 #line 12343 "configure"
12344 #include "confdefs.h"
12345
12346 /* Override any gcc2 internal prototype to avoid an error. */
12347 #ifdef __cplusplus
12348 extern "C"
12349 #endif
12350 /* We use char because int might match the return type of a gcc2
12351 builtin and then its argument prototype would still apply. */
12352 char Gpm_Open (void);
12353 int
12354 main (void)
12355 {
12356 Gpm_Open ();
12357 ;
12358 return 0;
12359 }
12360 _ACEOF
12361 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12362 if { (eval echo "$as_me:12362: \"$ac_link\"") >&5
12363 (eval $ac_link) 2>&5
12364 ac_status=$?
12365 echo "$as_me:12365: \$? = $ac_status" >&5
12366 (exit "$ac_status"); } &&
12367 { ac_try='test -s "conftest$ac_exeext"'
12368 { (eval echo "$as_me:12368: \"$ac_try\"") >&5
12369 (eval $ac_try) 2>&5
12370 ac_status=$?
12371 echo "$as_me:12371: \$? = $ac_status" >&5
12372 (exit "$ac_status"); }; }; then
12373 ac_cv_lib_gpm_Gpm_Open=yes
12374 else
12375 echo "$as_me: failed program was:" >&5
12376 cat "conftest.$ac_ext" >&5
12377 ac_cv_lib_gpm_Gpm_Open=no
12378 fi
12379 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12380 LIBS=$ac_check_lib_save_LIBS
12381 fi
12382 echo "$as_me:12382: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12383 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
12384 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
12385 echo "$as_me:12385: checking for initscr in -lgpm" >&5
12386 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
12387 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
12388 echo $ECHO_N "(cached) $ECHO_C" >&6
12389 else
12390 ac_check_lib_save_LIBS=$LIBS
12391 LIBS="-lgpm $LIBS"
12392 cat >"conftest.$ac_ext" <<_ACEOF
12393 #line 12393 "configure"
12394 #include "confdefs.h"
12395
12396 /* Override any gcc2 internal prototype to avoid an error. */
12397 #ifdef __cplusplus
12398 extern "C"
12399 #endif
12400 /* We use char because int might match the return type of a gcc2
12401 builtin and then its argument prototype would still apply. */
12402 char initscr (void);
12403 int
12404 main (void)
12405 {
12406 initscr ();
12407 ;
12408 return 0;
12409 }
12410 _ACEOF
12411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12412 if { (eval echo "$as_me:12412: \"$ac_link\"") >&5
12413 (eval $ac_link) 2>&5
12414 ac_status=$?
12415 echo "$as_me:12415: \$? = $ac_status" >&5
12416 (exit "$ac_status"); } &&
12417 { ac_try='test -s "conftest$ac_exeext"'
12418 { (eval echo "$as_me:12418: \"$ac_try\"") >&5
12419 (eval $ac_try) 2>&5
12420 ac_status=$?
12421 echo "$as_me:12421: \$? = $ac_status" >&5
12422 (exit "$ac_status"); }; }; then
12423 ac_cv_lib_gpm_initscr=yes
12424 else
12425 echo "$as_me: failed program was:" >&5
12426 cat "conftest.$ac_ext" >&5
12427 ac_cv_lib_gpm_initscr=no
12428 fi
12429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12430 LIBS=$ac_check_lib_save_LIBS
12431 fi
12432 echo "$as_me:12432: result: $ac_cv_lib_gpm_initscr" >&5
12433 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
12434 if test "$ac_cv_lib_gpm_initscr" = yes; then
12435 LIBS="$cf_ncurses_SAVE"
12436 else
12437 cf_ncurses_LIBS="-lgpm"
12438 fi
12439
12440 fi
12441
12442 case "$host_os" in
12443 (freebsd*)
12444 # This is only necessary if you are linking against an obsolete
12445 # version of ncurses (but it should do no harm, since it is static).
12446 if test "$cf_nculib_root" = ncurses ; then
12447 echo "$as_me:12447: checking for tgoto in -lmytinfo" >&5
12448 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12449 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12450 echo $ECHO_N "(cached) $ECHO_C" >&6
12451 else
12452 ac_check_lib_save_LIBS=$LIBS
12453 LIBS="-lmytinfo $LIBS"
12454 cat >"conftest.$ac_ext" <<_ACEOF
12455 #line 12455 "configure"
12456 #include "confdefs.h"
12457
12458 /* Override any gcc2 internal prototype to avoid an error. */
12459 #ifdef __cplusplus
12460 extern "C"
12461 #endif
12462 /* We use char because int might match the return type of a gcc2
12463 builtin and then its argument prototype would still apply. */
12464 char tgoto (void);
12465 int
12466 main (void)
12467 {
12468 tgoto ();
12469 ;
12470 return 0;
12471 }
12472 _ACEOF
12473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12474 if { (eval echo "$as_me:12474: \"$ac_link\"") >&5
12475 (eval $ac_link) 2>&5
12476 ac_status=$?
12477 echo "$as_me:12477: \$? = $ac_status" >&5
12478 (exit "$ac_status"); } &&
12479 { ac_try='test -s "conftest$ac_exeext"'
12480 { (eval echo "$as_me:12480: \"$ac_try\"") >&5
12481 (eval $ac_try) 2>&5
12482 ac_status=$?
12483 echo "$as_me:12483: \$? = $ac_status" >&5
12484 (exit "$ac_status"); }; }; then
12485 ac_cv_lib_mytinfo_tgoto=yes
12486 else
12487 echo "$as_me: failed program was:" >&5
12488 cat "conftest.$ac_ext" >&5
12489 ac_cv_lib_mytinfo_tgoto=no
12490 fi
12491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12492 LIBS=$ac_check_lib_save_LIBS
12493 fi
12494 echo "$as_me:12494: result: $ac_cv_lib_mytinfo_tgoto" >&5
12495 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12496 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
12497 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12498 fi
12499
12500 fi
12501 ;;
12502 esac
12503
12504 cf_add_libs="$LIBS"
12505 # reverse order
12506 cf_add_0lib=
12507 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12508 # filter duplicates
12509 for cf_add_1lib in $cf_add_0lib; do
12510 for cf_add_2lib in $cf_add_libs; do
12511 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12512 cf_add_1lib=
12513 break
12514 fi
12515 done
12516 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12517 done
12518 LIBS="$cf_add_libs"
12519
12520 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
12521 then
12522
12523 cf_add_libs="$LIBS"
12524 # reverse order
12525 cf_add_0lib=
12526 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12527 # filter duplicates
12528 for cf_add_1lib in $cf_add_0lib; do
12529 for cf_add_2lib in $cf_add_libs; do
12530 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12531 cf_add_1lib=
12532 break
12533 fi
12534 done
12535 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12536 done
12537 LIBS="$cf_add_libs"
12538
12539 else
12540
12541 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
12542 cf_libdir=""
12543 echo "$as_me:12543: checking for initscr" >&5
12544 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12545 if test "${ac_cv_func_initscr+set}" = set; then
12546 echo $ECHO_N "(cached) $ECHO_C" >&6
12547 else
12548 cat >"conftest.$ac_ext" <<_ACEOF
12549 #line 12549 "configure"
12550 #include "confdefs.h"
12551 #define initscr autoconf_temporary
12552 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12553 #undef initscr
12554
12555 #ifdef __cplusplus
12556 extern "C"
12557 #endif
12558
12559 /* We use char because int might match the return type of a gcc2
12560 builtin and then its argument prototype would still apply. */
12561 char initscr (void);
12562
12563 int
12564 main (void)
12565 {
12566
12567 /* The GNU C library defines stubs for functions which it implements
12568 to always fail with ENOSYS. Some functions are actually named
12569 something starting with __ and the normal name is an alias. */
12570 #if defined (__stub_initscr) || defined (__stub___initscr)
12571 #error found stub for initscr
12572 #endif
12573
12574 return initscr ();
12575 ;
12576 return 0;
12577 }
12578 _ACEOF
12579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12580 if { (eval echo "$as_me:12580: \"$ac_link\"") >&5
12581 (eval $ac_link) 2>&5
12582 ac_status=$?
12583 echo "$as_me:12583: \$? = $ac_status" >&5
12584 (exit "$ac_status"); } &&
12585 { ac_try='test -s "conftest$ac_exeext"'
12586 { (eval echo "$as_me:12586: \"$ac_try\"") >&5
12587 (eval $ac_try) 2>&5
12588 ac_status=$?
12589 echo "$as_me:12589: \$? = $ac_status" >&5
12590 (exit "$ac_status"); }; }; then
12591 ac_cv_func_initscr=yes
12592 else
12593 echo "$as_me: failed program was:" >&5
12594 cat "conftest.$ac_ext" >&5
12595 ac_cv_func_initscr=no
12596 fi
12597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12598 fi
12599 echo "$as_me:12599: result: $ac_cv_func_initscr" >&5
12600 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12601 if test "$ac_cv_func_initscr" = yes; then
12602 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12603 else
12604
12605 cf_save_LIBS="$LIBS"
12606 echo "$as_me:12606: checking for initscr in -l$cf_nculib_root" >&5
12607 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12608 LIBS="-l$cf_nculib_root $LIBS"
12609 cat >"conftest.$ac_ext" <<_ACEOF
12610 #line 12610 "configure"
12611 #include "confdefs.h"
12612 #include <${cf_cv_ncurses_header:-curses.h}>
12613 int
12614 main (void)
12615 {
12616 initscr()
12617 ;
12618 return 0;
12619 }
12620 _ACEOF
12621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12622 if { (eval echo "$as_me:12622: \"$ac_link\"") >&5
12623 (eval $ac_link) 2>&5
12624 ac_status=$?
12625 echo "$as_me:12625: \$? = $ac_status" >&5
12626 (exit "$ac_status"); } &&
12627 { ac_try='test -s "conftest$ac_exeext"'
12628 { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629 (eval $ac_try) 2>&5
12630 ac_status=$?
12631 echo "$as_me:12631: \$? = $ac_status" >&5
12632 (exit "$ac_status"); }; }; then
12633 echo "$as_me:12633: result: yes" >&5
12634 echo "${ECHO_T}yes" >&6
12635 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12636
12637 else
12638 echo "$as_me: failed program was:" >&5
12639 cat "conftest.$ac_ext" >&5
12640 echo "$as_me:12640: result: no" >&5
12641 echo "${ECHO_T}no" >&6
12642
12643 cf_search=
12644 cf_library_path_list=""
12645 if test -n "${LDFLAGS}${LIBS}" ; then
12646 for cf_library_path in $LDFLAGS $LIBS
12647 do
12648 case "$cf_library_path" in
12649 (-L*)
12650 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12651
12652 test "x$cf_library_path" != "xNONE" && \
12653 test -d "$cf_library_path" && \
12654 {
12655 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
12656 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
12657 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12658 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12659 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12660 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"
12661 }
12662
12663 cf_library_path_list="$cf_library_path_list $cf_search"
12664 ;;
12665 esac
12666 done
12667 fi
12668
12669 cf_search=
12670
12671 test "x$prefix" != "xNONE" && \
12672 test -d "$prefix" && \
12673 {
12674 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
12675 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
12676 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12677 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12678 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12679 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12680 }
12681
12682 for cf_subdir_prefix in \
12683 /usr \
12684 /usr/local \
12685 /usr/pkg \
12686 /opt \
12687 /opt/local \
12688 $HOME
12689 do
12690
12691 test "x$cf_subdir_prefix" != "x$prefix" && \
12692 test -d "$cf_subdir_prefix" && \
12693 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12694 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
12695 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
12696 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
12697 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
12698 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
12699 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"
12700 }
12701
12702 done
12703
12704 cf_search="$cf_library_path_list $cf_search"
12705
12706 for cf_libdir in $cf_search
12707 do
12708 echo "$as_me:12708: checking for -l$cf_nculib_root in $cf_libdir" >&5
12709 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12710 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12711 cat >"conftest.$ac_ext" <<_ACEOF
12712 #line 12712 "configure"
12713 #include "confdefs.h"
12714 #include <${cf_cv_ncurses_header:-curses.h}>
12715 int
12716 main (void)
12717 {
12718 initscr()
12719 ;
12720 return 0;
12721 }
12722 _ACEOF
12723 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12724 if { (eval echo "$as_me:12724: \"$ac_link\"") >&5
12725 (eval $ac_link) 2>&5
12726 ac_status=$?
12727 echo "$as_me:12727: \$? = $ac_status" >&5
12728 (exit "$ac_status"); } &&
12729 { ac_try='test -s "conftest$ac_exeext"'
12730 { (eval echo "$as_me:12730: \"$ac_try\"") >&5
12731 (eval $ac_try) 2>&5
12732 ac_status=$?
12733 echo "$as_me:12733: \$? = $ac_status" >&5
12734 (exit "$ac_status"); }; }; then
12735 echo "$as_me:12735: result: yes" >&5
12736 echo "${ECHO_T}yes" >&6
12737 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12738 break
12739 else
12740 echo "$as_me: failed program was:" >&5
12741 cat "conftest.$ac_ext" >&5
12742 echo "$as_me:12742: result: no" >&5
12743 echo "${ECHO_T}no" >&6
12744 LIBS="$cf_save_LIBS"
12745 fi
12746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12747 done
12748
12749 fi
12750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12751
12752 fi
12753
12754 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
12755
12756 if test "$cf_found_library" = no ; then
12757 { { echo "$as_me:12757: error: Cannot link $cf_nculib_root library" >&5
12758 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12759 { (exit 1); exit 1; }; }
12760 fi
12761
12762 fi
12763
12764 if test -n "$cf_ncurses_LIBS" ; then
12765 echo "$as_me:12765: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12766 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12767 cf_ncurses_SAVE="$LIBS"
12768 for p in $cf_ncurses_LIBS ; do
12769 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
12770 if test "$q" != "$LIBS" ; then
12771 LIBS="$q"
12772 fi
12773 done
12774 cat >"conftest.$ac_ext" <<_ACEOF
12775 #line 12775 "configure"
12776 #include "confdefs.h"
12777 #include <${cf_cv_ncurses_header:-curses.h}>
12778 int
12779 main (void)
12780 {
12781 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
12782 ;
12783 return 0;
12784 }
12785 _ACEOF
12786 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12787 if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
12788 (eval $ac_link) 2>&5
12789 ac_status=$?
12790 echo "$as_me:12790: \$? = $ac_status" >&5
12791 (exit "$ac_status"); } &&
12792 { ac_try='test -s "conftest$ac_exeext"'
12793 { (eval echo "$as_me:12793: \"$ac_try\"") >&5
12794 (eval $ac_try) 2>&5
12795 ac_status=$?
12796 echo "$as_me:12796: \$? = $ac_status" >&5
12797 (exit "$ac_status"); }; }; then
12798 echo "$as_me:12798: result: yes" >&5
12799 echo "${ECHO_T}yes" >&6
12800 else
12801 echo "$as_me: failed program was:" >&5
12802 cat "conftest.$ac_ext" >&5
12803 echo "$as_me:12803: result: no" >&5
12804 echo "${ECHO_T}no" >&6
12805 LIBS="$cf_ncurses_SAVE"
12806 fi
12807 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12808 fi
12809
12810 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12811
12812 cat >>confdefs.h <<EOF
12813 #define $cf_nculib_ROOT 1
12814 EOF
12815
12816 fi
12817 else
12818 NCURSES_CONFIG=none
12819 fi
12820
12821 ;;
12822 (pdcurses*)
12823 echo "$as_me:12823: checking for X" >&5
12824 echo $ECHO_N "checking for X... $ECHO_C" >&6
12825
12826 # Check whether --with-x or --without-x was given.
12827 if test "${with_x+set}" = set; then
12828 withval="$with_x"
12829
12830 fi;
12831 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12832 if test "x$with_x" = xno; then
12833 # The user explicitly disabled X.
12834 have_x=disabled
12835 else
12836 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12837 # Both variables are already set.
12838 have_x=yes
12839 else
12840 if test "${ac_cv_have_x+set}" = set; then
12841 echo $ECHO_N "(cached) $ECHO_C" >&6
12842 else
12843 # One or both of the vars are not set, and there is no cached value.
12844 ac_x_includes=no ac_x_libraries=no
12845 rm -fr conftest.dir
12846 if mkdir conftest.dir; then
12847 cd conftest.dir
12848 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12849 cat >Imakefile <<'EOF'
12850 acfindx:
12851 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12852 EOF
12853 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12854 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12855 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12856 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12857 for ac_extension in a so sl dylib dll; do
12858 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12859 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12860 ac_im_usrlibdir=$ac_im_libdir; break
12861 fi
12862 done
12863 # Screen out bogus values from the imake configuration. They are
12864 # bogus both because they are the default anyway, and because
12865 # using them would break gcc on systems where it needs fixed includes.
12866 case $ac_im_incroot in
12867 /usr/include) ;;
12868 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12869 esac
12870 case $ac_im_usrlibdir in
12871 /usr/lib | /lib) ;;
12872 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12873 esac
12874 fi
12875 cd ..
12876 rm -fr conftest.dir
12877 fi
12878
12879 # Standard set of common directories for X headers.
12880 # Check X11 before X11Rn because it is often a symlink to the current release.
12881 ac_x_header_dirs='
12882 /usr/X11/include
12883 /usr/X11R7/include
12884 /usr/X11R6/include
12885 /usr/X11R5/include
12886 /usr/X11R4/include
12887
12888 /opt/local/include
12889 /opt/X11/include
12890
12891 /usr/include/X11
12892 /usr/include/X11R7
12893 /usr/include/X11R6
12894 /usr/include/X11R5
12895 /usr/include/X11R4
12896
12897 /usr/local/X11/include
12898 /usr/local/X11R7/include
12899 /usr/local/X11R6/include
12900 /usr/local/X11R5/include
12901 /usr/local/X11R4/include
12902
12903 /usr/local/include/X11
12904 /usr/local/include/X11R7
12905 /usr/local/include/X11R6
12906 /usr/local/include/X11R5
12907 /usr/local/include/X11R4
12908
12909 /usr/X386/include
12910 /usr/x386/include
12911 /usr/XFree86/include/X11
12912
12913 /usr/include
12914 /usr/local/include
12915 /usr/unsupported/include
12916 /usr/athena/include
12917 /usr/local/x11r5/include
12918 /usr/lpp/Xamples/include
12919
12920 /usr/openwin/include
12921 /usr/openwin/share/include'
12922
12923 if test "$ac_x_includes" = no; then
12924 # Guess where to find include files, by looking for Intrinsic.h.
12925 # First, try using that file with no special directory specified.
12926 cat >"conftest.$ac_ext" <<_ACEOF
12927 #line 12927 "configure"
12928 #include "confdefs.h"
12929 #include <X11/Intrinsic.h>
12930 _ACEOF
12931 if { (eval echo "$as_me:12931: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12932 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12933 ac_status=$?
12934 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12935 rm -f conftest.er1
12936 cat conftest.err >&5
12937 echo "$as_me:12937: \$? = $ac_status" >&5
12938 (exit "$ac_status"); } >/dev/null; then
12939 if test -s conftest.err; then
12940 ac_cpp_err=$ac_c_preproc_warn_flag
12941 else
12942 ac_cpp_err=
12943 fi
12944 else
12945 ac_cpp_err=yes
12946 fi
12947 if test -z "$ac_cpp_err"; then
12948 # We can compile using X headers with no special include directory.
12949 ac_x_includes=
12950 else
12951 echo "$as_me: failed program was:" >&5
12952 cat "conftest.$ac_ext" >&5
12953 for ac_dir in $ac_x_header_dirs; do
12954 if test -r "$ac_dir/X11/Intrinsic.h"; then
12955 ac_x_includes=$ac_dir
12956 break
12957 fi
12958 done
12959 fi
12960 rm -f conftest.err "conftest.$ac_ext"
12961 fi # $ac_x_includes = no
12962
12963 if test "$ac_x_libraries" = no; then
12964 # Check for the libraries.
12965 # See if we find them without any special options.
12966 # Don't add to $LIBS permanently.
12967 ac_save_LIBS=$LIBS
12968 LIBS="-lXt $LIBS"
12969 cat >"conftest.$ac_ext" <<_ACEOF
12970 #line 12970 "configure"
12971 #include "confdefs.h"
12972 #include <X11/Intrinsic.h>
12973 int
12974 main (void)
12975 {
12976 XtMalloc (0)
12977 ;
12978 return 0;
12979 }
12980 _ACEOF
12981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12982 if { (eval echo "$as_me:12982: \"$ac_link\"") >&5
12983 (eval $ac_link) 2>&5
12984 ac_status=$?
12985 echo "$as_me:12985: \$? = $ac_status" >&5
12986 (exit "$ac_status"); } &&
12987 { ac_try='test -s "conftest$ac_exeext"'
12988 { (eval echo "$as_me:12988: \"$ac_try\"") >&5
12989 (eval $ac_try) 2>&5
12990 ac_status=$?
12991 echo "$as_me:12991: \$? = $ac_status" >&5
12992 (exit "$ac_status"); }; }; then
12993 LIBS=$ac_save_LIBS
12994 # We can link X programs with no special library path.
12995 ac_x_libraries=
12996 else
12997 echo "$as_me: failed program was:" >&5
12998 cat "conftest.$ac_ext" >&5
12999 LIBS=$ac_save_LIBS
13000 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
13001 do
13002 # Don't even attempt the hair of trying to link an X program!
13003 for ac_extension in a so sl dylib dll; do
13004 if test -r "$ac_dir/libXt.$ac_extension"; then
13005 ac_x_libraries=$ac_dir
13006 break 2
13007 fi
13008 done
13009 done
13010 fi
13011 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13012 fi # $ac_x_libraries = no
13013
13014 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
13015 # Didn't find X anywhere. Cache the known absence of X.
13016 ac_cv_have_x="have_x=no"
13017 else
13018 # Record where we found X for the cache.
13019 ac_cv_have_x="have_x=yes \
13020 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
13021 fi
13022 fi
13023
13024 fi
13025 eval "$ac_cv_have_x"
13026 fi # $with_x != no
13027
13028 if test "$have_x" != yes; then
13029 echo "$as_me:13029: result: $have_x" >&5
13030 echo "${ECHO_T}$have_x" >&6
13031 no_x=yes
13032 else
13033 # If each of the values was on the command line, it overrides each guess.
13034 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
13035 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
13036 # Update the cache value to reflect the command line values.
13037 ac_cv_have_x="have_x=yes \
13038 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
13039 echo "$as_me:13039: result: libraries $x_libraries, headers $x_includes" >&5
13040 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
13041 fi
13042
13043 if test "$no_x" = yes; then
13044 # Not all programs may use this symbol, but it does not hurt to define it.
13045
13046 cat >>confdefs.h <<\EOF
13047 #define X_DISPLAY_MISSING 1
13048 EOF
13049
13050 X_CFLAGS=
13051 X_PRE_LIBS=
13052 X_LIBS=
13053 X_EXTRA_LIBS=
13054 else
13055 if test -n "$x_includes"; then
13056 X_CFLAGS="$X_CFLAGS -I$x_includes"
13057 fi
13058
13059 # It would also be nice to do this for all -L options, not just this one.
13060 if test -n "$x_libraries"; then
13061 X_LIBS="$X_LIBS -L$x_libraries"
13062 # For Solaris; some versions of Sun CC require a space after -R and
13063 # others require no space. Words are not sufficient . . . .
13064 case `(uname -sr) 2>/dev/null` in
13065 "SunOS 5"*)
13066 echo "$as_me:13066: checking whether -R must be followed by a space" >&5
13067 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
13068 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
13069 cat >"conftest.$ac_ext" <<_ACEOF
13070 #line 13070 "configure"
13071 #include "confdefs.h"
13072
13073 int
13074 main (void)
13075 {
13076
13077 ;
13078 return 0;
13079 }
13080 _ACEOF
13081 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13082 if { (eval echo "$as_me:13082: \"$ac_link\"") >&5
13083 (eval $ac_link) 2>&5
13084 ac_status=$?
13085 echo "$as_me:13085: \$? = $ac_status" >&5
13086 (exit "$ac_status"); } &&
13087 { ac_try='test -s "conftest$ac_exeext"'
13088 { (eval echo "$as_me:13088: \"$ac_try\"") >&5
13089 (eval $ac_try) 2>&5
13090 ac_status=$?
13091 echo "$as_me:13091: \$? = $ac_status" >&5
13092 (exit "$ac_status"); }; }; then
13093 ac_R_nospace=yes
13094 else
13095 echo "$as_me: failed program was:" >&5
13096 cat "conftest.$ac_ext" >&5
13097 ac_R_nospace=no
13098 fi
13099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13100 if test $ac_R_nospace = yes; then
13101 echo "$as_me:13101: result: no" >&5
13102 echo "${ECHO_T}no" >&6
13103 X_LIBS="$X_LIBS -R$x_libraries"
13104 else
13105 LIBS="$ac_xsave_LIBS -R $x_libraries"
13106 cat >"conftest.$ac_ext" <<_ACEOF
13107 #line 13107 "configure"
13108 #include "confdefs.h"
13109
13110 int
13111 main (void)
13112 {
13113
13114 ;
13115 return 0;
13116 }
13117 _ACEOF
13118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13119 if { (eval echo "$as_me:13119: \"$ac_link\"") >&5
13120 (eval $ac_link) 2>&5
13121 ac_status=$?
13122 echo "$as_me:13122: \$? = $ac_status" >&5
13123 (exit "$ac_status"); } &&
13124 { ac_try='test -s "conftest$ac_exeext"'
13125 { (eval echo "$as_me:13125: \"$ac_try\"") >&5
13126 (eval $ac_try) 2>&5
13127 ac_status=$?
13128 echo "$as_me:13128: \$? = $ac_status" >&5
13129 (exit "$ac_status"); }; }; then
13130 ac_R_space=yes
13131 else
13132 echo "$as_me: failed program was:" >&5
13133 cat "conftest.$ac_ext" >&5
13134 ac_R_space=no
13135 fi
13136 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13137 if test $ac_R_space = yes; then
13138 echo "$as_me:13138: result: yes" >&5
13139 echo "${ECHO_T}yes" >&6
13140 X_LIBS="$X_LIBS -R $x_libraries"
13141 else
13142 echo "$as_me:13142: result: neither works" >&5
13143 echo "${ECHO_T}neither works" >&6
13144 fi
13145 fi
13146 LIBS=$ac_xsave_LIBS
13147 esac
13148 fi
13149
13150 # Check for system-dependent libraries X programs must link with.
13151 # Do this before checking for the system-independent R6 libraries
13152 # (-lICE), since we may need -lsocket or whatever for X linking.
13153
13154 if test "$ISC" = yes; then
13155 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
13156 else
13157 # Martyn Johnson says this is needed for Ultrix, if the X
13158 # libraries were built with DECnet support. And Karl Berry says
13159 # the Alpha needs dnet_stub (dnet does not exist).
13160 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
13161 cat >"conftest.$ac_ext" <<_ACEOF
13162 #line 13162 "configure"
13163 #include "confdefs.h"
13164
13165 /* Override any gcc2 internal prototype to avoid an error. */
13166 #ifdef __cplusplus
13167 extern "C"
13168 #endif
13169 /* We use char because int might match the return type of a gcc2
13170 builtin and then its argument prototype would still apply. */
13171 char XOpenDisplay (void);
13172 int
13173 main (void)
13174 {
13175 XOpenDisplay ();
13176 ;
13177 return 0;
13178 }
13179 _ACEOF
13180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13181 if { (eval echo "$as_me:13181: \"$ac_link\"") >&5
13182 (eval $ac_link) 2>&5
13183 ac_status=$?
13184 echo "$as_me:13184: \$? = $ac_status" >&5
13185 (exit "$ac_status"); } &&
13186 { ac_try='test -s "conftest$ac_exeext"'
13187 { (eval echo "$as_me:13187: \"$ac_try\"") >&5
13188 (eval $ac_try) 2>&5
13189 ac_status=$?
13190 echo "$as_me:13190: \$? = $ac_status" >&5
13191 (exit "$ac_status"); }; }; then
13192 :
13193 else
13194 echo "$as_me: failed program was:" >&5
13195 cat "conftest.$ac_ext" >&5
13196 echo "$as_me:13196: checking for dnet_ntoa in -ldnet" >&5
13197 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
13198 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
13199 echo $ECHO_N "(cached) $ECHO_C" >&6
13200 else
13201 ac_check_lib_save_LIBS=$LIBS
13202 LIBS="-ldnet $LIBS"
13203 cat >"conftest.$ac_ext" <<_ACEOF
13204 #line 13204 "configure"
13205 #include "confdefs.h"
13206
13207 /* Override any gcc2 internal prototype to avoid an error. */
13208 #ifdef __cplusplus
13209 extern "C"
13210 #endif
13211 /* We use char because int might match the return type of a gcc2
13212 builtin and then its argument prototype would still apply. */
13213 char dnet_ntoa (void);
13214 int
13215 main (void)
13216 {
13217 dnet_ntoa ();
13218 ;
13219 return 0;
13220 }
13221 _ACEOF
13222 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13223 if { (eval echo "$as_me:13223: \"$ac_link\"") >&5
13224 (eval $ac_link) 2>&5
13225 ac_status=$?
13226 echo "$as_me:13226: \$? = $ac_status" >&5
13227 (exit "$ac_status"); } &&
13228 { ac_try='test -s "conftest$ac_exeext"'
13229 { (eval echo "$as_me:13229: \"$ac_try\"") >&5
13230 (eval $ac_try) 2>&5
13231 ac_status=$?
13232 echo "$as_me:13232: \$? = $ac_status" >&5
13233 (exit "$ac_status"); }; }; then
13234 ac_cv_lib_dnet_dnet_ntoa=yes
13235 else
13236 echo "$as_me: failed program was:" >&5
13237 cat "conftest.$ac_ext" >&5
13238 ac_cv_lib_dnet_dnet_ntoa=no
13239 fi
13240 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13241 LIBS=$ac_check_lib_save_LIBS
13242 fi
13243 echo "$as_me:13243: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
13244 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
13245 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
13246 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
13247 fi
13248
13249 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
13250 echo "$as_me:13250: checking for dnet_ntoa in -ldnet_stub" >&5
13251 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
13252 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
13253 echo $ECHO_N "(cached) $ECHO_C" >&6
13254 else
13255 ac_check_lib_save_LIBS=$LIBS
13256 LIBS="-ldnet_stub $LIBS"
13257 cat >"conftest.$ac_ext" <<_ACEOF
13258 #line 13258 "configure"
13259 #include "confdefs.h"
13260
13261 /* Override any gcc2 internal prototype to avoid an error. */
13262 #ifdef __cplusplus
13263 extern "C"
13264 #endif
13265 /* We use char because int might match the return type of a gcc2
13266 builtin and then its argument prototype would still apply. */
13267 char dnet_ntoa (void);
13268 int
13269 main (void)
13270 {
13271 dnet_ntoa ();
13272 ;
13273 return 0;
13274 }
13275 _ACEOF
13276 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13277 if { (eval echo "$as_me:13277: \"$ac_link\"") >&5
13278 (eval $ac_link) 2>&5
13279 ac_status=$?
13280 echo "$as_me:13280: \$? = $ac_status" >&5
13281 (exit "$ac_status"); } &&
13282 { ac_try='test -s "conftest$ac_exeext"'
13283 { (eval echo "$as_me:13283: \"$ac_try\"") >&5
13284 (eval $ac_try) 2>&5
13285 ac_status=$?
13286 echo "$as_me:13286: \$? = $ac_status" >&5
13287 (exit "$ac_status"); }; }; then
13288 ac_cv_lib_dnet_stub_dnet_ntoa=yes
13289 else
13290 echo "$as_me: failed program was:" >&5
13291 cat "conftest.$ac_ext" >&5
13292 ac_cv_lib_dnet_stub_dnet_ntoa=no
13293 fi
13294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13295 LIBS=$ac_check_lib_save_LIBS
13296 fi
13297 echo "$as_me:13297: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
13298 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
13299 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
13300 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
13301 fi
13302
13303 fi
13304 fi
13305 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13306 LIBS="$ac_xsave_LIBS"
13307
13308 # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
13309 # to get the SysV transport functions.
13310 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
13311 # needs -lnsl.
13312 # The nsl library prevents programs from opening the X display
13313 # on Irix 5.2, according to T.E. Dickey.
13314 # The functions gethostbyname, getservbyname, and inet_addr are
13315 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
13316 echo "$as_me:13316: checking for gethostbyname" >&5
13317 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
13318 if test "${ac_cv_func_gethostbyname+set}" = set; then
13319 echo $ECHO_N "(cached) $ECHO_C" >&6
13320 else
13321 cat >"conftest.$ac_ext" <<_ACEOF
13322 #line 13322 "configure"
13323 #include "confdefs.h"
13324 #define gethostbyname autoconf_temporary
13325 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13326 #undef gethostbyname
13327
13328 #ifdef __cplusplus
13329 extern "C"
13330 #endif
13331
13332 /* We use char because int might match the return type of a gcc2
13333 builtin and then its argument prototype would still apply. */
13334 char gethostbyname (void);
13335
13336 int
13337 main (void)
13338 {
13339
13340 /* The GNU C library defines stubs for functions which it implements
13341 to always fail with ENOSYS. Some functions are actually named
13342 something starting with __ and the normal name is an alias. */
13343 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
13344 #error found stub for gethostbyname
13345 #endif
13346
13347 return gethostbyname ();
13348 ;
13349 return 0;
13350 }
13351 _ACEOF
13352 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13353 if { (eval echo "$as_me:13353: \"$ac_link\"") >&5
13354 (eval $ac_link) 2>&5
13355 ac_status=$?
13356 echo "$as_me:13356: \$? = $ac_status" >&5
13357 (exit "$ac_status"); } &&
13358 { ac_try='test -s "conftest$ac_exeext"'
13359 { (eval echo "$as_me:13359: \"$ac_try\"") >&5
13360 (eval $ac_try) 2>&5
13361 ac_status=$?
13362 echo "$as_me:13362: \$? = $ac_status" >&5
13363 (exit "$ac_status"); }; }; then
13364 ac_cv_func_gethostbyname=yes
13365 else
13366 echo "$as_me: failed program was:" >&5
13367 cat "conftest.$ac_ext" >&5
13368 ac_cv_func_gethostbyname=no
13369 fi
13370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13371 fi
13372 echo "$as_me:13372: result: $ac_cv_func_gethostbyname" >&5
13373 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
13374
13375 if test $ac_cv_func_gethostbyname = no; then
13376 echo "$as_me:13376: checking for gethostbyname in -lnsl" >&5
13377 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
13378 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
13379 echo $ECHO_N "(cached) $ECHO_C" >&6
13380 else
13381 ac_check_lib_save_LIBS=$LIBS
13382 LIBS="-lnsl $LIBS"
13383 cat >"conftest.$ac_ext" <<_ACEOF
13384 #line 13384 "configure"
13385 #include "confdefs.h"
13386
13387 /* Override any gcc2 internal prototype to avoid an error. */
13388 #ifdef __cplusplus
13389 extern "C"
13390 #endif
13391 /* We use char because int might match the return type of a gcc2
13392 builtin and then its argument prototype would still apply. */
13393 char gethostbyname (void);
13394 int
13395 main (void)
13396 {
13397 gethostbyname ();
13398 ;
13399 return 0;
13400 }
13401 _ACEOF
13402 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13403 if { (eval echo "$as_me:13403: \"$ac_link\"") >&5
13404 (eval $ac_link) 2>&5
13405 ac_status=$?
13406 echo "$as_me:13406: \$? = $ac_status" >&5
13407 (exit "$ac_status"); } &&
13408 { ac_try='test -s "conftest$ac_exeext"'
13409 { (eval echo "$as_me:13409: \"$ac_try\"") >&5
13410 (eval $ac_try) 2>&5
13411 ac_status=$?
13412 echo "$as_me:13412: \$? = $ac_status" >&5
13413 (exit "$ac_status"); }; }; then
13414 ac_cv_lib_nsl_gethostbyname=yes
13415 else
13416 echo "$as_me: failed program was:" >&5
13417 cat "conftest.$ac_ext" >&5
13418 ac_cv_lib_nsl_gethostbyname=no
13419 fi
13420 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13421 LIBS=$ac_check_lib_save_LIBS
13422 fi
13423 echo "$as_me:13423: result: $ac_cv_lib_nsl_gethostbyname" >&5
13424 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
13425 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
13426 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
13427 fi
13428
13429 if test $ac_cv_lib_nsl_gethostbyname = no; then
13430 echo "$as_me:13430: checking for gethostbyname in -lbsd" >&5
13431 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
13432 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
13433 echo $ECHO_N "(cached) $ECHO_C" >&6
13434 else
13435 ac_check_lib_save_LIBS=$LIBS
13436 LIBS="-lbsd $LIBS"
13437 cat >"conftest.$ac_ext" <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440
13441 /* Override any gcc2 internal prototype to avoid an error. */
13442 #ifdef __cplusplus
13443 extern "C"
13444 #endif
13445 /* We use char because int might match the return type of a gcc2
13446 builtin and then its argument prototype would still apply. */
13447 char gethostbyname (void);
13448 int
13449 main (void)
13450 {
13451 gethostbyname ();
13452 ;
13453 return 0;
13454 }
13455 _ACEOF
13456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13457 if { (eval echo "$as_me:13457: \"$ac_link\"") >&5
13458 (eval $ac_link) 2>&5
13459 ac_status=$?
13460 echo "$as_me:13460: \$? = $ac_status" >&5
13461 (exit "$ac_status"); } &&
13462 { ac_try='test -s "conftest$ac_exeext"'
13463 { (eval echo "$as_me:13463: \"$ac_try\"") >&5
13464 (eval $ac_try) 2>&5
13465 ac_status=$?
13466 echo "$as_me:13466: \$? = $ac_status" >&5
13467 (exit "$ac_status"); }; }; then
13468 ac_cv_lib_bsd_gethostbyname=yes
13469 else
13470 echo "$as_me: failed program was:" >&5
13471 cat "conftest.$ac_ext" >&5
13472 ac_cv_lib_bsd_gethostbyname=no
13473 fi
13474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13475 LIBS=$ac_check_lib_save_LIBS
13476 fi
13477 echo "$as_me:13477: result: $ac_cv_lib_bsd_gethostbyname" >&5
13478 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
13479 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
13480 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
13481 fi
13482
13483 fi
13484 fi
13485
13486 # [email protected] says without -lsocket,
13487 # socket/setsockopt and other routines are undefined under SCO ODT
13488 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
13489 # on later versions), says Simon Leinen: it contains gethostby*
13490 # variants that don't use the nameserver (or something). -lsocket
13491 # must be given before -lnsl if both are needed. We assume that
13492 # if connect needs -lnsl, so does gethostbyname.
13493 echo "$as_me:13493: checking for connect" >&5
13494 echo $ECHO_N "checking for connect... $ECHO_C" >&6
13495 if test "${ac_cv_func_connect+set}" = set; then
13496 echo $ECHO_N "(cached) $ECHO_C" >&6
13497 else
13498 cat >"conftest.$ac_ext" <<_ACEOF
13499 #line 13499 "configure"
13500 #include "confdefs.h"
13501 #define connect autoconf_temporary
13502 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13503 #undef connect
13504
13505 #ifdef __cplusplus
13506 extern "C"
13507 #endif
13508
13509 /* We use char because int might match the return type of a gcc2
13510 builtin and then its argument prototype would still apply. */
13511 char connect (void);
13512
13513 int
13514 main (void)
13515 {
13516
13517 /* The GNU C library defines stubs for functions which it implements
13518 to always fail with ENOSYS. Some functions are actually named
13519 something starting with __ and the normal name is an alias. */
13520 #if defined (__stub_connect) || defined (__stub___connect)
13521 #error found stub for connect
13522 #endif
13523
13524 return connect ();
13525 ;
13526 return 0;
13527 }
13528 _ACEOF
13529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13530 if { (eval echo "$as_me:13530: \"$ac_link\"") >&5
13531 (eval $ac_link) 2>&5
13532 ac_status=$?
13533 echo "$as_me:13533: \$? = $ac_status" >&5
13534 (exit "$ac_status"); } &&
13535 { ac_try='test -s "conftest$ac_exeext"'
13536 { (eval echo "$as_me:13536: \"$ac_try\"") >&5
13537 (eval $ac_try) 2>&5
13538 ac_status=$?
13539 echo "$as_me:13539: \$? = $ac_status" >&5
13540 (exit "$ac_status"); }; }; then
13541 ac_cv_func_connect=yes
13542 else
13543 echo "$as_me: failed program was:" >&5
13544 cat "conftest.$ac_ext" >&5
13545 ac_cv_func_connect=no
13546 fi
13547 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13548 fi
13549 echo "$as_me:13549: result: $ac_cv_func_connect" >&5
13550 echo "${ECHO_T}$ac_cv_func_connect" >&6
13551
13552 if test $ac_cv_func_connect = no; then
13553 echo "$as_me:13553: checking for connect in -lsocket" >&5
13554 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
13555 if test "${ac_cv_lib_socket_connect+set}" = set; then
13556 echo $ECHO_N "(cached) $ECHO_C" >&6
13557 else
13558 ac_check_lib_save_LIBS=$LIBS
13559 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
13560 cat >"conftest.$ac_ext" <<_ACEOF
13561 #line 13561 "configure"
13562 #include "confdefs.h"
13563
13564 /* Override any gcc2 internal prototype to avoid an error. */
13565 #ifdef __cplusplus
13566 extern "C"
13567 #endif
13568 /* We use char because int might match the return type of a gcc2
13569 builtin and then its argument prototype would still apply. */
13570 char connect (void);
13571 int
13572 main (void)
13573 {
13574 connect ();
13575 ;
13576 return 0;
13577 }
13578 _ACEOF
13579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13580 if { (eval echo "$as_me:13580: \"$ac_link\"") >&5
13581 (eval $ac_link) 2>&5
13582 ac_status=$?
13583 echo "$as_me:13583: \$? = $ac_status" >&5
13584 (exit "$ac_status"); } &&
13585 { ac_try='test -s "conftest$ac_exeext"'
13586 { (eval echo "$as_me:13586: \"$ac_try\"") >&5
13587 (eval $ac_try) 2>&5
13588 ac_status=$?
13589 echo "$as_me:13589: \$? = $ac_status" >&5
13590 (exit "$ac_status"); }; }; then
13591 ac_cv_lib_socket_connect=yes
13592 else
13593 echo "$as_me: failed program was:" >&5
13594 cat "conftest.$ac_ext" >&5
13595 ac_cv_lib_socket_connect=no
13596 fi
13597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13598 LIBS=$ac_check_lib_save_LIBS
13599 fi
13600 echo "$as_me:13600: result: $ac_cv_lib_socket_connect" >&5
13601 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
13602 if test "$ac_cv_lib_socket_connect" = yes; then
13603 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
13604 fi
13605
13606 fi
13607
13608 # Guillermo Gomez says -lposix is necessary on A/UX.
13609 echo "$as_me:13609: checking for remove" >&5
13610 echo $ECHO_N "checking for remove... $ECHO_C" >&6
13611 if test "${ac_cv_func_remove+set}" = set; then
13612 echo $ECHO_N "(cached) $ECHO_C" >&6
13613 else
13614 cat >"conftest.$ac_ext" <<_ACEOF
13615 #line 13615 "configure"
13616 #include "confdefs.h"
13617 #define remove autoconf_temporary
13618 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13619 #undef remove
13620
13621 #ifdef __cplusplus
13622 extern "C"
13623 #endif
13624
13625 /* We use char because int might match the return type of a gcc2
13626 builtin and then its argument prototype would still apply. */
13627 char remove (void);
13628
13629 int
13630 main (void)
13631 {
13632
13633 /* The GNU C library defines stubs for functions which it implements
13634 to always fail with ENOSYS. Some functions are actually named
13635 something starting with __ and the normal name is an alias. */
13636 #if defined (__stub_remove) || defined (__stub___remove)
13637 #error found stub for remove
13638 #endif
13639
13640 return remove ();
13641 ;
13642 return 0;
13643 }
13644 _ACEOF
13645 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13646 if { (eval echo "$as_me:13646: \"$ac_link\"") >&5
13647 (eval $ac_link) 2>&5
13648 ac_status=$?
13649 echo "$as_me:13649: \$? = $ac_status" >&5
13650 (exit "$ac_status"); } &&
13651 { ac_try='test -s "conftest$ac_exeext"'
13652 { (eval echo "$as_me:13652: \"$ac_try\"") >&5
13653 (eval $ac_try) 2>&5
13654 ac_status=$?
13655 echo "$as_me:13655: \$? = $ac_status" >&5
13656 (exit "$ac_status"); }; }; then
13657 ac_cv_func_remove=yes
13658 else
13659 echo "$as_me: failed program was:" >&5
13660 cat "conftest.$ac_ext" >&5
13661 ac_cv_func_remove=no
13662 fi
13663 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13664 fi
13665 echo "$as_me:13665: result: $ac_cv_func_remove" >&5
13666 echo "${ECHO_T}$ac_cv_func_remove" >&6
13667
13668 if test $ac_cv_func_remove = no; then
13669 echo "$as_me:13669: checking for remove in -lposix" >&5
13670 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
13671 if test "${ac_cv_lib_posix_remove+set}" = set; then
13672 echo $ECHO_N "(cached) $ECHO_C" >&6
13673 else
13674 ac_check_lib_save_LIBS=$LIBS
13675 LIBS="-lposix $LIBS"
13676 cat >"conftest.$ac_ext" <<_ACEOF
13677 #line 13677 "configure"
13678 #include "confdefs.h"
13679
13680 /* Override any gcc2 internal prototype to avoid an error. */
13681 #ifdef __cplusplus
13682 extern "C"
13683 #endif
13684 /* We use char because int might match the return type of a gcc2
13685 builtin and then its argument prototype would still apply. */
13686 char remove (void);
13687 int
13688 main (void)
13689 {
13690 remove ();
13691 ;
13692 return 0;
13693 }
13694 _ACEOF
13695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13696 if { (eval echo "$as_me:13696: \"$ac_link\"") >&5
13697 (eval $ac_link) 2>&5
13698 ac_status=$?
13699 echo "$as_me:13699: \$? = $ac_status" >&5
13700 (exit "$ac_status"); } &&
13701 { ac_try='test -s "conftest$ac_exeext"'
13702 { (eval echo "$as_me:13702: \"$ac_try\"") >&5
13703 (eval $ac_try) 2>&5
13704 ac_status=$?
13705 echo "$as_me:13705: \$? = $ac_status" >&5
13706 (exit "$ac_status"); }; }; then
13707 ac_cv_lib_posix_remove=yes
13708 else
13709 echo "$as_me: failed program was:" >&5
13710 cat "conftest.$ac_ext" >&5
13711 ac_cv_lib_posix_remove=no
13712 fi
13713 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13714 LIBS=$ac_check_lib_save_LIBS
13715 fi
13716 echo "$as_me:13716: result: $ac_cv_lib_posix_remove" >&5
13717 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
13718 if test "$ac_cv_lib_posix_remove" = yes; then
13719 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
13720 fi
13721
13722 fi
13723
13724 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
13725 echo "$as_me:13725: checking for shmat" >&5
13726 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
13727 if test "${ac_cv_func_shmat+set}" = set; then
13728 echo $ECHO_N "(cached) $ECHO_C" >&6
13729 else
13730 cat >"conftest.$ac_ext" <<_ACEOF
13731 #line 13731 "configure"
13732 #include "confdefs.h"
13733 #define shmat autoconf_temporary
13734 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13735 #undef shmat
13736
13737 #ifdef __cplusplus
13738 extern "C"
13739 #endif
13740
13741 /* We use char because int might match the return type of a gcc2
13742 builtin and then its argument prototype would still apply. */
13743 char shmat (void);
13744
13745 int
13746 main (void)
13747 {
13748
13749 /* The GNU C library defines stubs for functions which it implements
13750 to always fail with ENOSYS. Some functions are actually named
13751 something starting with __ and the normal name is an alias. */
13752 #if defined (__stub_shmat) || defined (__stub___shmat)
13753 #error found stub for shmat
13754 #endif
13755
13756 return shmat ();
13757 ;
13758 return 0;
13759 }
13760 _ACEOF
13761 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13762 if { (eval echo "$as_me:13762: \"$ac_link\"") >&5
13763 (eval $ac_link) 2>&5
13764 ac_status=$?
13765 echo "$as_me:13765: \$? = $ac_status" >&5
13766 (exit "$ac_status"); } &&
13767 { ac_try='test -s "conftest$ac_exeext"'
13768 { (eval echo "$as_me:13768: \"$ac_try\"") >&5
13769 (eval $ac_try) 2>&5
13770 ac_status=$?
13771 echo "$as_me:13771: \$? = $ac_status" >&5
13772 (exit "$ac_status"); }; }; then
13773 ac_cv_func_shmat=yes
13774 else
13775 echo "$as_me: failed program was:" >&5
13776 cat "conftest.$ac_ext" >&5
13777 ac_cv_func_shmat=no
13778 fi
13779 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13780 fi
13781 echo "$as_me:13781: result: $ac_cv_func_shmat" >&5
13782 echo "${ECHO_T}$ac_cv_func_shmat" >&6
13783
13784 if test $ac_cv_func_shmat = no; then
13785 echo "$as_me:13785: checking for shmat in -lipc" >&5
13786 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
13787 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
13788 echo $ECHO_N "(cached) $ECHO_C" >&6
13789 else
13790 ac_check_lib_save_LIBS=$LIBS
13791 LIBS="-lipc $LIBS"
13792 cat >"conftest.$ac_ext" <<_ACEOF
13793 #line 13793 "configure"
13794 #include "confdefs.h"
13795
13796 /* Override any gcc2 internal prototype to avoid an error. */
13797 #ifdef __cplusplus
13798 extern "C"
13799 #endif
13800 /* We use char because int might match the return type of a gcc2
13801 builtin and then its argument prototype would still apply. */
13802 char shmat (void);
13803 int
13804 main (void)
13805 {
13806 shmat ();
13807 ;
13808 return 0;
13809 }
13810 _ACEOF
13811 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13812 if { (eval echo "$as_me:13812: \"$ac_link\"") >&5
13813 (eval $ac_link) 2>&5
13814 ac_status=$?
13815 echo "$as_me:13815: \$? = $ac_status" >&5
13816 (exit "$ac_status"); } &&
13817 { ac_try='test -s "conftest$ac_exeext"'
13818 { (eval echo "$as_me:13818: \"$ac_try\"") >&5
13819 (eval $ac_try) 2>&5
13820 ac_status=$?
13821 echo "$as_me:13821: \$? = $ac_status" >&5
13822 (exit "$ac_status"); }; }; then
13823 ac_cv_lib_ipc_shmat=yes
13824 else
13825 echo "$as_me: failed program was:" >&5
13826 cat "conftest.$ac_ext" >&5
13827 ac_cv_lib_ipc_shmat=no
13828 fi
13829 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13830 LIBS=$ac_check_lib_save_LIBS
13831 fi
13832 echo "$as_me:13832: result: $ac_cv_lib_ipc_shmat" >&5
13833 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
13834 if test "$ac_cv_lib_ipc_shmat" = yes; then
13835 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13836 fi
13837
13838 fi
13839 fi
13840
13841 # Check for libraries that X11R6 Xt/Xaw programs need.
13842 ac_save_LDFLAGS=$LDFLAGS
13843 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13844 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13845 # check for ICE first), but we must link in the order -lSM -lICE or
13846 # we get undefined symbols. So assume we have SM if we have ICE.
13847 # These have to be linked with before -lX11, unlike the other
13848 # libraries we check for below, so use a different variable.
13849 # John Interrante, Karl Berry
13850 echo "$as_me:13850: checking for IceConnectionNumber in -lICE" >&5
13851 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13852 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13853 echo $ECHO_N "(cached) $ECHO_C" >&6
13854 else
13855 ac_check_lib_save_LIBS=$LIBS
13856 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13857 cat >"conftest.$ac_ext" <<_ACEOF
13858 #line 13858 "configure"
13859 #include "confdefs.h"
13860
13861 /* Override any gcc2 internal prototype to avoid an error. */
13862 #ifdef __cplusplus
13863 extern "C"
13864 #endif
13865 /* We use char because int might match the return type of a gcc2
13866 builtin and then its argument prototype would still apply. */
13867 char IceConnectionNumber (void);
13868 int
13869 main (void)
13870 {
13871 IceConnectionNumber ();
13872 ;
13873 return 0;
13874 }
13875 _ACEOF
13876 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13877 if { (eval echo "$as_me:13877: \"$ac_link\"") >&5
13878 (eval $ac_link) 2>&5
13879 ac_status=$?
13880 echo "$as_me:13880: \$? = $ac_status" >&5
13881 (exit "$ac_status"); } &&
13882 { ac_try='test -s "conftest$ac_exeext"'
13883 { (eval echo "$as_me:13883: \"$ac_try\"") >&5
13884 (eval $ac_try) 2>&5
13885 ac_status=$?
13886 echo "$as_me:13886: \$? = $ac_status" >&5
13887 (exit "$ac_status"); }; }; then
13888 ac_cv_lib_ICE_IceConnectionNumber=yes
13889 else
13890 echo "$as_me: failed program was:" >&5
13891 cat "conftest.$ac_ext" >&5
13892 ac_cv_lib_ICE_IceConnectionNumber=no
13893 fi
13894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13895 LIBS=$ac_check_lib_save_LIBS
13896 fi
13897 echo "$as_me:13897: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13898 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13899 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13900 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13901 fi
13902
13903 LDFLAGS=$ac_save_LDFLAGS
13904
13905 fi
13906
13907 cf_x_athena=${cf_x_athena:-Xaw}
13908
13909 echo "$as_me:13909: checking if you want to link with Xaw 3d library" >&5
13910 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13911 withval=
13912
13913 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13914 if test "${with_Xaw3d+set}" = set; then
13915 withval="$with_Xaw3d"
13916
13917 fi;
13918 if test "$withval" = yes ; then
13919 cf_x_athena=Xaw3d
13920 echo "$as_me:13920: result: yes" >&5
13921 echo "${ECHO_T}yes" >&6
13922 else
13923 echo "$as_me:13923: result: no" >&5
13924 echo "${ECHO_T}no" >&6
13925 fi
13926
13927 echo "$as_me:13927: checking if you want to link with Xaw 3d xft library" >&5
13928 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13929 withval=
13930
13931 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13932 if test "${with_Xaw3dxft+set}" = set; then
13933 withval="$with_Xaw3dxft"
13934
13935 fi;
13936 if test "$withval" = yes ; then
13937 cf_x_athena=Xaw3dxft
13938 echo "$as_me:13938: result: yes" >&5
13939 echo "${ECHO_T}yes" >&6
13940 else
13941 echo "$as_me:13941: result: no" >&5
13942 echo "${ECHO_T}no" >&6
13943 fi
13944
13945 echo "$as_me:13945: checking if you want to link with neXT Athena library" >&5
13946 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13947 withval=
13948
13949 # Check whether --with-neXtaw or --without-neXtaw was given.
13950 if test "${with_neXtaw+set}" = set; then
13951 withval="$with_neXtaw"
13952
13953 fi;
13954 if test "$withval" = yes ; then
13955 cf_x_athena=neXtaw
13956 echo "$as_me:13956: result: yes" >&5
13957 echo "${ECHO_T}yes" >&6
13958 else
13959 echo "$as_me:13959: result: no" >&5
13960 echo "${ECHO_T}no" >&6
13961 fi
13962
13963 echo "$as_me:13963: checking if you want to link with Athena-Plus library" >&5
13964 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13965 withval=
13966
13967 # Check whether --with-XawPlus or --without-XawPlus was given.
13968 if test "${with_XawPlus+set}" = set; then
13969 withval="$with_XawPlus"
13970
13971 fi;
13972 if test "$withval" = yes ; then
13973 cf_x_athena=XawPlus
13974 echo "$as_me:13974: result: yes" >&5
13975 echo "${ECHO_T}yes" >&6
13976 else
13977 echo "$as_me:13977: result: no" >&5
13978 echo "${ECHO_T}no" >&6
13979 fi
13980
13981 cf_x_athena_lib=""
13982
13983 if test "$PKG_CONFIG" != none ; then
13984 cf_athena_list=
13985 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13986 for cf_athena_pkg in \
13987 $cf_athena_list \
13988 ${cf_x_athena} \
13989 ${cf_x_athena}-devel \
13990 lib${cf_x_athena} \
13991 lib${cf_x_athena}-devel
13992 do
13993
13994 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13995 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13996
13997 echo "${as_me:-configure}:13997: testing found package $cf_athena_pkg ..." 1>&5
13998
13999 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
14000 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
14001 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
14002
14003 echo "${as_me:-configure}:14003: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14004
14005 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
14006
14007 echo "${as_me:-configure}:14007: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
14008
14009 for cf_required in $cf_athena_pkg
14010 do
14011 # check for duplicates
14012 for cf_require_pkg in $REQUIRE_PKG
14013 do
14014 if test "$cf_required" = "$cf_require_pkg"
14015 then
14016 cf_required=
14017 break
14018 fi
14019 done
14020 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
14021 done
14022
14023 cf_fix_cppflags=no
14024 cf_new_cflags=
14025 cf_new_cppflags=
14026 cf_new_extra_cppflags=
14027
14028 for cf_add_cflags in $cf_pkgconfig_incs
14029 do
14030 case "$cf_fix_cppflags" in
14031 (no)
14032 case "$cf_add_cflags" in
14033 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14034 case "$cf_add_cflags" in
14035 (-D*)
14036 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14037
14038 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14039 && test -z "${cf_tst_cflags}" \
14040 && cf_fix_cppflags=yes
14041
14042 if test "$cf_fix_cppflags" = yes ; then
14043
14044 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14045 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14046
14047 continue
14048 elif test "${cf_tst_cflags}" = "\"'" ; then
14049
14050 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14051 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14052
14053 continue
14054 fi
14055 ;;
14056 esac
14057 case "$CPPFLAGS" in
14058 (*$cf_add_cflags)
14059 ;;
14060 (*)
14061 case "$cf_add_cflags" in
14062 (-D*)
14063 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14064
14065 CPPFLAGS=`echo "$CPPFLAGS" | \
14066 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14067 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14068
14069 ;;
14070 esac
14071
14072 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14073 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14074
14075 ;;
14076 esac
14077 ;;
14078 (*)
14079
14080 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14081 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14082
14083 ;;
14084 esac
14085 ;;
14086 (yes)
14087
14088 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14089 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14090
14091 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14092
14093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14094 && test -z "${cf_tst_cflags}" \
14095 && cf_fix_cppflags=no
14096 ;;
14097 esac
14098 done
14099
14100 if test -n "$cf_new_cflags" ; then
14101
14102 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14103 CFLAGS="${CFLAGS}$cf_new_cflags"
14104
14105 fi
14106
14107 if test -n "$cf_new_cppflags" ; then
14108
14109 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14110 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14111
14112 fi
14113
14114 if test -n "$cf_new_extra_cppflags" ; then
14115
14116 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14117 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14118
14119 fi
14120
14121 cf_add_libs="$LIBS"
14122 # reverse order
14123 cf_add_0lib=
14124 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14125 # filter duplicates
14126 for cf_add_1lib in $cf_add_0lib; do
14127 for cf_add_2lib in $cf_add_libs; do
14128 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14129 cf_add_1lib=
14130 break
14131 fi
14132 done
14133 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14134 done
14135 LIBS="$cf_add_libs"
14136
14137 cf_x_athena_lib="$cf_pkgconfig_libs"
14138
14139 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14140
14141 cat >>confdefs.h <<EOF
14142 #define $cf_x_athena_LIBS 1
14143 EOF
14144
14145 echo "$as_me:14145: checking for usable $cf_x_athena/Xmu package" >&5
14146 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
14147 if test "${cf_cv_xaw_compat+set}" = set; then
14148 echo $ECHO_N "(cached) $ECHO_C" >&6
14149 else
14150
14151 cat >"conftest.$ac_ext" <<_ACEOF
14152 #line 14152 "configure"
14153 #include "confdefs.h"
14154
14155 $ac_includes_default
14156 #include <X11/Xmu/CharSet.h>
14157
14158 int
14159 main (void)
14160 {
14161
14162 int check = XmuCompareISOLatin1("big", "small");
14163 (void)check;
14164
14165 ;
14166 return 0;
14167 }
14168 _ACEOF
14169 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14170 if { (eval echo "$as_me:14170: \"$ac_link\"") >&5
14171 (eval $ac_link) 2>&5
14172 ac_status=$?
14173 echo "$as_me:14173: \$? = $ac_status" >&5
14174 (exit "$ac_status"); } &&
14175 { ac_try='test -s "conftest$ac_exeext"'
14176 { (eval echo "$as_me:14176: \"$ac_try\"") >&5
14177 (eval $ac_try) 2>&5
14178 ac_status=$?
14179 echo "$as_me:14179: \$? = $ac_status" >&5
14180 (exit "$ac_status"); }; }; then
14181 cf_cv_xaw_compat=yes
14182 else
14183 echo "$as_me: failed program was:" >&5
14184 cat "conftest.$ac_ext" >&5
14185 cf_cv_xaw_compat=no
14186 fi
14187 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14188 fi
14189 echo "$as_me:14189: result: $cf_cv_xaw_compat" >&5
14190 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
14191
14192 if test "$cf_cv_xaw_compat" = no
14193 then
14194 # workaround for broken ".pc" files...
14195 case "$cf_x_athena_lib" in
14196 (*-lXmu*)
14197 ;;
14198 (*)
14199 test -n "$verbose" && echo " work around broken package" 1>&6
14200
14201 echo "${as_me:-configure}:14201: testing work around broken package ..." 1>&5
14202
14203 cf_save_xmu="$LIBS"
14204 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
14205
14206 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
14207 test -n "$verbose" && echo " found package xmu" 1>&6
14208
14209 echo "${as_me:-configure}:14209: testing found package xmu ..." 1>&5
14210
14211 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
14212 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
14213 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
14214
14215 echo "${as_me:-configure}:14215: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14216
14217 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
14218
14219 echo "${as_me:-configure}:14219: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
14220
14221 for cf_required in xmu
14222 do
14223 # check for duplicates
14224 for cf_require_pkg in $REQUIRE_PKG
14225 do
14226 if test "$cf_required" = "$cf_require_pkg"
14227 then
14228 cf_required=
14229 break
14230 fi
14231 done
14232 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
14233 done
14234
14235 cf_fix_cppflags=no
14236 cf_new_cflags=
14237 cf_new_cppflags=
14238 cf_new_extra_cppflags=
14239
14240 for cf_add_cflags in $cf_pkgconfig_incs
14241 do
14242 case "$cf_fix_cppflags" in
14243 (no)
14244 case "$cf_add_cflags" in
14245 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14246 case "$cf_add_cflags" in
14247 (-D*)
14248 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14249
14250 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14251 && test -z "${cf_tst_cflags}" \
14252 && cf_fix_cppflags=yes
14253
14254 if test "$cf_fix_cppflags" = yes ; then
14255
14256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14258
14259 continue
14260 elif test "${cf_tst_cflags}" = "\"'" ; then
14261
14262 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14263 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14264
14265 continue
14266 fi
14267 ;;
14268 esac
14269 case "$CPPFLAGS" in
14270 (*$cf_add_cflags)
14271 ;;
14272 (*)
14273 case "$cf_add_cflags" in
14274 (-D*)
14275 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14276
14277 CPPFLAGS=`echo "$CPPFLAGS" | \
14278 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14279 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14280
14281 ;;
14282 esac
14283
14284 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14285 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14286
14287 ;;
14288 esac
14289 ;;
14290 (*)
14291
14292 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14293 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14294
14295 ;;
14296 esac
14297 ;;
14298 (yes)
14299
14300 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14301 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14302
14303 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14304
14305 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14306 && test -z "${cf_tst_cflags}" \
14307 && cf_fix_cppflags=no
14308 ;;
14309 esac
14310 done
14311
14312 if test -n "$cf_new_cflags" ; then
14313
14314 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14315 CFLAGS="${CFLAGS}$cf_new_cflags"
14316
14317 fi
14318
14319 if test -n "$cf_new_cppflags" ; then
14320
14321 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14322 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14323
14324 fi
14325
14326 if test -n "$cf_new_extra_cppflags" ; then
14327
14328 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14329 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14330
14331 fi
14332
14333 cf_add_libs="$LIBS"
14334 # reverse order
14335 cf_add_0lib=
14336 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14337 # filter duplicates
14338 for cf_add_1lib in $cf_add_0lib; do
14339 for cf_add_2lib in $cf_add_libs; do
14340 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14341 cf_add_1lib=
14342 break
14343 fi
14344 done
14345 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14346 done
14347 LIBS="$cf_add_libs"
14348
14349 LIBS="$cf_save_xmu"
14350
14351 cf_add_libs="$LIBS"
14352 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
14353
14354 echo "${as_me:-configure}:14354: testing ...before $cf_add_libs ..." 1>&5
14355
14356 for cf_add_1lib in $cf_pkgconfig_libs; do
14357 # filter duplicates
14358 cf_found_2lib=no
14359 for cf_add_2lib in $cf_add_libs; do
14360 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14361 cf_found_2lib=yes
14362 break
14363 fi
14364 done
14365 # if not a duplicate, find the dependent library
14366 if test "$cf_found_2lib" = no
14367 then
14368 cf_found_2lib=no
14369 cf_add_2libs=
14370 for cf_add_2lib in $cf_add_libs
14371 do
14372 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
14373 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
14374 if test "x$cf_add_2lib" = "x$cf_first_lib"
14375 then
14376 cf_found_2lib=yes
14377 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
14378 fi
14379 done
14380 if test "$cf_found_2lib" = yes
14381 then
14382 cf_add_libs="$cf_add_2libs"
14383 else
14384 test -n "$verbose" && echo " ...missed $cf_first_lib" 1>&6
14385
14386 echo "${as_me:-configure}:14386: testing ...missed $cf_first_lib ..." 1>&5
14387
14388 fi
14389 fi
14390 done
14391 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
14392
14393 echo "${as_me:-configure}:14393: testing ...after $cf_add_libs ..." 1>&5
14394
14395 LIBS="$cf_add_libs"
14396
14397 else
14398 cf_pkgconfig_incs=
14399 cf_pkgconfig_libs=
14400
14401 cf_add_libs="$LIBS"
14402 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
14403
14404 echo "${as_me:-configure}:14404: testing ...before $cf_add_libs ..." 1>&5
14405
14406 for cf_add_1lib in -lXmu; do
14407 # filter duplicates
14408 cf_found_2lib=no
14409 for cf_add_2lib in $cf_add_libs; do
14410 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14411 cf_found_2lib=yes
14412 break
14413 fi
14414 done
14415 # if not a duplicate, find the dependent library
14416 if test "$cf_found_2lib" = no
14417 then
14418 cf_found_2lib=no
14419 cf_add_2libs=
14420 for cf_add_2lib in $cf_add_libs
14421 do
14422 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
14423 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
14424 if test "x$cf_add_2lib" = "x$cf_first_lib"
14425 then
14426 cf_found_2lib=yes
14427 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
14428 fi
14429 done
14430 if test "$cf_found_2lib" = yes
14431 then
14432 cf_add_libs="$cf_add_2libs"
14433 else
14434 test -n "$verbose" && echo " ...missed $cf_first_lib" 1>&6
14435
14436 echo "${as_me:-configure}:14436: testing ...missed $cf_first_lib ..." 1>&5
14437
14438 fi
14439 fi
14440 done
14441 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
14442
14443 echo "${as_me:-configure}:14443: testing ...after $cf_add_libs ..." 1>&5
14444
14445 LIBS="$cf_add_libs"
14446
14447 fi
14448
14449 ;;
14450 esac
14451 fi
14452
14453 break
14454 else
14455 cf_pkgconfig_incs=
14456 cf_pkgconfig_libs=
14457 :
14458 fi
14459
14460 done
14461 fi
14462
14463 if test -z "$cf_x_athena_lib" ; then
14464
14465 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
14466 test -n "$verbose" && echo " found package Xext" 1>&6
14467
14468 echo "${as_me:-configure}:14468: testing found package Xext ..." 1>&5
14469
14470 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
14471 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
14472 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
14473
14474 echo "${as_me:-configure}:14474: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14475
14476 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
14477
14478 echo "${as_me:-configure}:14478: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
14479
14480 for cf_required in Xext
14481 do
14482 # check for duplicates
14483 for cf_require_pkg in $REQUIRE_PKG
14484 do
14485 if test "$cf_required" = "$cf_require_pkg"
14486 then
14487 cf_required=
14488 break
14489 fi
14490 done
14491 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
14492 done
14493
14494 cf_fix_cppflags=no
14495 cf_new_cflags=
14496 cf_new_cppflags=
14497 cf_new_extra_cppflags=
14498
14499 for cf_add_cflags in $cf_pkgconfig_incs
14500 do
14501 case "$cf_fix_cppflags" in
14502 (no)
14503 case "$cf_add_cflags" in
14504 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14505 case "$cf_add_cflags" in
14506 (-D*)
14507 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14508
14509 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14510 && test -z "${cf_tst_cflags}" \
14511 && cf_fix_cppflags=yes
14512
14513 if test "$cf_fix_cppflags" = yes ; then
14514
14515 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14516 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14517
14518 continue
14519 elif test "${cf_tst_cflags}" = "\"'" ; then
14520
14521 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14522 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14523
14524 continue
14525 fi
14526 ;;
14527 esac
14528 case "$CPPFLAGS" in
14529 (*$cf_add_cflags)
14530 ;;
14531 (*)
14532 case "$cf_add_cflags" in
14533 (-D*)
14534 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14535
14536 CPPFLAGS=`echo "$CPPFLAGS" | \
14537 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14538 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14539
14540 ;;
14541 esac
14542
14543 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14544 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14545
14546 ;;
14547 esac
14548 ;;
14549 (*)
14550
14551 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14552 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14553
14554 ;;
14555 esac
14556 ;;
14557 (yes)
14558
14559 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14560 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14561
14562 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14563
14564 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14565 && test -z "${cf_tst_cflags}" \
14566 && cf_fix_cppflags=no
14567 ;;
14568 esac
14569 done
14570
14571 if test -n "$cf_new_cflags" ; then
14572
14573 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14574 CFLAGS="${CFLAGS}$cf_new_cflags"
14575
14576 fi
14577
14578 if test -n "$cf_new_cppflags" ; then
14579
14580 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14581 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14582
14583 fi
14584
14585 if test -n "$cf_new_extra_cppflags" ; then
14586
14587 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14588 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14589
14590 fi
14591
14592 cf_add_libs="$LIBS"
14593 # reverse order
14594 cf_add_0lib=
14595 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14596 # filter duplicates
14597 for cf_add_1lib in $cf_add_0lib; do
14598 for cf_add_2lib in $cf_add_libs; do
14599 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14600 cf_add_1lib=
14601 break
14602 fi
14603 done
14604 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14605 done
14606 LIBS="$cf_add_libs"
14607
14608 :
14609 else
14610 cf_pkgconfig_incs=
14611 cf_pkgconfig_libs=
14612
14613 echo "$as_me:14613: checking for XextCreateExtension in -lXext" >&5
14614 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
14615 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
14616 echo $ECHO_N "(cached) $ECHO_C" >&6
14617 else
14618 ac_check_lib_save_LIBS=$LIBS
14619 LIBS="-lXext $LIBS"
14620 cat >"conftest.$ac_ext" <<_ACEOF
14621 #line 14621 "configure"
14622 #include "confdefs.h"
14623
14624 /* Override any gcc2 internal prototype to avoid an error. */
14625 #ifdef __cplusplus
14626 extern "C"
14627 #endif
14628 /* We use char because int might match the return type of a gcc2
14629 builtin and then its argument prototype would still apply. */
14630 char XextCreateExtension (void);
14631 int
14632 main (void)
14633 {
14634 XextCreateExtension ();
14635 ;
14636 return 0;
14637 }
14638 _ACEOF
14639 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14640 if { (eval echo "$as_me:14640: \"$ac_link\"") >&5
14641 (eval $ac_link) 2>&5
14642 ac_status=$?
14643 echo "$as_me:14643: \$? = $ac_status" >&5
14644 (exit "$ac_status"); } &&
14645 { ac_try='test -s "conftest$ac_exeext"'
14646 { (eval echo "$as_me:14646: \"$ac_try\"") >&5
14647 (eval $ac_try) 2>&5
14648 ac_status=$?
14649 echo "$as_me:14649: \$? = $ac_status" >&5
14650 (exit "$ac_status"); }; }; then
14651 ac_cv_lib_Xext_XextCreateExtension=yes
14652 else
14653 echo "$as_me: failed program was:" >&5
14654 cat "conftest.$ac_ext" >&5
14655 ac_cv_lib_Xext_XextCreateExtension=no
14656 fi
14657 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14658 LIBS=$ac_check_lib_save_LIBS
14659 fi
14660 echo "$as_me:14660: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
14661 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
14662 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
14663
14664 cf_add_libs="$LIBS"
14665 # reverse order
14666 cf_add_0lib=
14667 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14668 # filter duplicates
14669 for cf_add_1lib in $cf_add_0lib; do
14670 for cf_add_2lib in $cf_add_libs; do
14671 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14672 cf_add_1lib=
14673 break
14674 fi
14675 done
14676 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14677 done
14678 LIBS="$cf_add_libs"
14679
14680 fi
14681
14682 fi
14683
14684 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
14685 # in some cases has installed dummy files in the former, other cases replaced
14686 # it with a link to the new location). This complicates the configure script.
14687 # Check for that pitfall, and recover using pkg-config
14688 #
14689 # If none of these are set, the configuration is almost certainly broken.
14690 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
14691 then
14692
14693 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14694 test -n "$verbose" && echo " found package x11" 1>&6
14695
14696 echo "${as_me:-configure}:14696: testing found package x11 ..." 1>&5
14697
14698 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14699 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14700 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14701
14702 echo "${as_me:-configure}:14702: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14703
14704 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14705
14706 echo "${as_me:-configure}:14706: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14707
14708 for cf_required in x11
14709 do
14710 # check for duplicates
14711 for cf_require_pkg in $REQUIRE_PKG
14712 do
14713 if test "$cf_required" = "$cf_require_pkg"
14714 then
14715 cf_required=
14716 break
14717 fi
14718 done
14719 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
14720 done
14721
14722 cf_fix_cppflags=no
14723 cf_new_cflags=
14724 cf_new_cppflags=
14725 cf_new_extra_cppflags=
14726
14727 for cf_add_cflags in $cf_pkgconfig_incs
14728 do
14729 case "$cf_fix_cppflags" in
14730 (no)
14731 case "$cf_add_cflags" in
14732 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14733 case "$cf_add_cflags" in
14734 (-D*)
14735 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14736
14737 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14738 && test -z "${cf_tst_cflags}" \
14739 && cf_fix_cppflags=yes
14740
14741 if test "$cf_fix_cppflags" = yes ; then
14742
14743 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14744 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14745
14746 continue
14747 elif test "${cf_tst_cflags}" = "\"'" ; then
14748
14749 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14750 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14751
14752 continue
14753 fi
14754 ;;
14755 esac
14756 case "$CPPFLAGS" in
14757 (*$cf_add_cflags)
14758 ;;
14759 (*)
14760 case "$cf_add_cflags" in
14761 (-D*)
14762 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14763
14764 CPPFLAGS=`echo "$CPPFLAGS" | \
14765 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14766 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14767
14768 ;;
14769 esac
14770
14771 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14772 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14773
14774 ;;
14775 esac
14776 ;;
14777 (*)
14778
14779 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14780 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14781
14782 ;;
14783 esac
14784 ;;
14785 (yes)
14786
14787 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14788 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14789
14790 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14791
14792 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14793 && test -z "${cf_tst_cflags}" \
14794 && cf_fix_cppflags=no
14795 ;;
14796 esac
14797 done
14798
14799 if test -n "$cf_new_cflags" ; then
14800
14801 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14802 CFLAGS="${CFLAGS}$cf_new_cflags"
14803
14804 fi
14805
14806 if test -n "$cf_new_cppflags" ; then
14807
14808 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14809 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14810
14811 fi
14812
14813 if test -n "$cf_new_extra_cppflags" ; then
14814
14815 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14816 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14817
14818 fi
14819
14820 cf_add_libs="$LIBS"
14821 # reverse order
14822 cf_add_0lib=
14823 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14824 # filter duplicates
14825 for cf_add_1lib in $cf_add_0lib; do
14826 for cf_add_2lib in $cf_add_libs; do
14827 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14828 cf_add_1lib=
14829 break
14830 fi
14831 done
14832 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14833 done
14834 LIBS="$cf_add_libs"
14835
14836 :
14837 else
14838 cf_pkgconfig_incs=
14839 cf_pkgconfig_libs=
14840 { echo "$as_me:14840: WARNING: unable to find X11 library" >&5
14841 echo "$as_me: WARNING: unable to find X11 library" >&2;}
14842 fi
14843
14844 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14845 test -n "$verbose" && echo " found package ice" 1>&6
14846
14847 echo "${as_me:-configure}:14847: testing found package ice ..." 1>&5
14848
14849 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14850 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14851 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14852
14853 echo "${as_me:-configure}:14853: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14854
14855 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14856
14857 echo "${as_me:-configure}:14857: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14858
14859 for cf_required in ice
14860 do
14861 # check for duplicates
14862 for cf_require_pkg in $REQUIRE_PKG
14863 do
14864 if test "$cf_required" = "$cf_require_pkg"
14865 then
14866 cf_required=
14867 break
14868 fi
14869 done
14870 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
14871 done
14872
14873 cf_fix_cppflags=no
14874 cf_new_cflags=
14875 cf_new_cppflags=
14876 cf_new_extra_cppflags=
14877
14878 for cf_add_cflags in $cf_pkgconfig_incs
14879 do
14880 case "$cf_fix_cppflags" in
14881 (no)
14882 case "$cf_add_cflags" in
14883 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14884 case "$cf_add_cflags" in
14885 (-D*)
14886 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14887
14888 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14889 && test -z "${cf_tst_cflags}" \
14890 && cf_fix_cppflags=yes
14891
14892 if test "$cf_fix_cppflags" = yes ; then
14893
14894 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14895 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14896
14897 continue
14898 elif test "${cf_tst_cflags}" = "\"'" ; then
14899
14900 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14901 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14902
14903 continue
14904 fi
14905 ;;
14906 esac
14907 case "$CPPFLAGS" in
14908 (*$cf_add_cflags)
14909 ;;
14910 (*)
14911 case "$cf_add_cflags" in
14912 (-D*)
14913 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14914
14915 CPPFLAGS=`echo "$CPPFLAGS" | \
14916 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14917 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14918
14919 ;;
14920 esac
14921
14922 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14923 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14924
14925 ;;
14926 esac
14927 ;;
14928 (*)
14929
14930 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14931 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14932
14933 ;;
14934 esac
14935 ;;
14936 (yes)
14937
14938 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14939 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14940
14941 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14942
14943 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14944 && test -z "${cf_tst_cflags}" \
14945 && cf_fix_cppflags=no
14946 ;;
14947 esac
14948 done
14949
14950 if test -n "$cf_new_cflags" ; then
14951
14952 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14953 CFLAGS="${CFLAGS}$cf_new_cflags"
14954
14955 fi
14956
14957 if test -n "$cf_new_cppflags" ; then
14958
14959 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14960 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14961
14962 fi
14963
14964 if test -n "$cf_new_extra_cppflags" ; then
14965
14966 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14967 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14968
14969 fi
14970
14971 cf_add_libs="$LIBS"
14972 # reverse order
14973 cf_add_0lib=
14974 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14975 # filter duplicates
14976 for cf_add_1lib in $cf_add_0lib; do
14977 for cf_add_2lib in $cf_add_libs; do
14978 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14979 cf_add_1lib=
14980 break
14981 fi
14982 done
14983 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14984 done
14985 LIBS="$cf_add_libs"
14986
14987 :
14988 else
14989 cf_pkgconfig_incs=
14990 cf_pkgconfig_libs=
14991 { echo "$as_me:14991: WARNING: unable to find ICE library" >&5
14992 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14993 fi
14994
14995 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14996 test -n "$verbose" && echo " found package sm" 1>&6
14997
14998 echo "${as_me:-configure}:14998: testing found package sm ..." 1>&5
14999
15000 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15001 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15002 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15003
15004 echo "${as_me:-configure}:15004: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15005
15006 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15007
15008 echo "${as_me:-configure}:15008: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15009
15010 for cf_required in sm
15011 do
15012 # check for duplicates
15013 for cf_require_pkg in $REQUIRE_PKG
15014 do
15015 if test "$cf_required" = "$cf_require_pkg"
15016 then
15017 cf_required=
15018 break
15019 fi
15020 done
15021 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
15022 done
15023
15024 cf_fix_cppflags=no
15025 cf_new_cflags=
15026 cf_new_cppflags=
15027 cf_new_extra_cppflags=
15028
15029 for cf_add_cflags in $cf_pkgconfig_incs
15030 do
15031 case "$cf_fix_cppflags" in
15032 (no)
15033 case "$cf_add_cflags" in
15034 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15035 case "$cf_add_cflags" in
15036 (-D*)
15037 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15038
15039 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15040 && test -z "${cf_tst_cflags}" \
15041 && cf_fix_cppflags=yes
15042
15043 if test "$cf_fix_cppflags" = yes ; then
15044
15045 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15046 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15047
15048 continue
15049 elif test "${cf_tst_cflags}" = "\"'" ; then
15050
15051 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15052 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15053
15054 continue
15055 fi
15056 ;;
15057 esac
15058 case "$CPPFLAGS" in
15059 (*$cf_add_cflags)
15060 ;;
15061 (*)
15062 case "$cf_add_cflags" in
15063 (-D*)
15064 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15065
15066 CPPFLAGS=`echo "$CPPFLAGS" | \
15067 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15068 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15069
15070 ;;
15071 esac
15072
15073 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15074 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15075
15076 ;;
15077 esac
15078 ;;
15079 (*)
15080
15081 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15082 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15083
15084 ;;
15085 esac
15086 ;;
15087 (yes)
15088
15089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15091
15092 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15093
15094 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15095 && test -z "${cf_tst_cflags}" \
15096 && cf_fix_cppflags=no
15097 ;;
15098 esac
15099 done
15100
15101 if test -n "$cf_new_cflags" ; then
15102
15103 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15104 CFLAGS="${CFLAGS}$cf_new_cflags"
15105
15106 fi
15107
15108 if test -n "$cf_new_cppflags" ; then
15109
15110 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15111 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15112
15113 fi
15114
15115 if test -n "$cf_new_extra_cppflags" ; then
15116
15117 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15118 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15119
15120 fi
15121
15122 cf_add_libs="$LIBS"
15123 # reverse order
15124 cf_add_0lib=
15125 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15126 # filter duplicates
15127 for cf_add_1lib in $cf_add_0lib; do
15128 for cf_add_2lib in $cf_add_libs; do
15129 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15130 cf_add_1lib=
15131 break
15132 fi
15133 done
15134 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15135 done
15136 LIBS="$cf_add_libs"
15137
15138 :
15139 else
15140 cf_pkgconfig_incs=
15141 cf_pkgconfig_libs=
15142 { echo "$as_me:15142: WARNING: unable to find SM library" >&5
15143 echo "$as_me: WARNING: unable to find SM library" >&2;}
15144 fi
15145
15146 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
15147 test -n "$verbose" && echo " found package xt" 1>&6
15148
15149 echo "${as_me:-configure}:15149: testing found package xt ..." 1>&5
15150
15151 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
15152 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
15153 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
15154
15155 echo "${as_me:-configure}:15155: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15156
15157 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
15158
15159 echo "${as_me:-configure}:15159: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
15160
15161 for cf_required in xt
15162 do
15163 # check for duplicates
15164 for cf_require_pkg in $REQUIRE_PKG
15165 do
15166 if test "$cf_required" = "$cf_require_pkg"
15167 then
15168 cf_required=
15169 break
15170 fi
15171 done
15172 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
15173 done
15174
15175 cf_fix_cppflags=no
15176 cf_new_cflags=
15177 cf_new_cppflags=
15178 cf_new_extra_cppflags=
15179
15180 for cf_add_cflags in $cf_pkgconfig_incs
15181 do
15182 case "$cf_fix_cppflags" in
15183 (no)
15184 case "$cf_add_cflags" in
15185 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15186 case "$cf_add_cflags" in
15187 (-D*)
15188 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15189
15190 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15191 && test -z "${cf_tst_cflags}" \
15192 && cf_fix_cppflags=yes
15193
15194 if test "$cf_fix_cppflags" = yes ; then
15195
15196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15198
15199 continue
15200 elif test "${cf_tst_cflags}" = "\"'" ; then
15201
15202 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15203 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15204
15205 continue
15206 fi
15207 ;;
15208 esac
15209 case "$CPPFLAGS" in
15210 (*$cf_add_cflags)
15211 ;;
15212 (*)
15213 case "$cf_add_cflags" in
15214 (-D*)
15215 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15216
15217 CPPFLAGS=`echo "$CPPFLAGS" | \
15218 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15219 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15220
15221 ;;
15222 esac
15223
15224 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15225 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15226
15227 ;;
15228 esac
15229 ;;
15230 (*)
15231
15232 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15233 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15234
15235 ;;
15236 esac
15237 ;;
15238 (yes)
15239
15240 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15241 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15242
15243 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15244
15245 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15246 && test -z "${cf_tst_cflags}" \
15247 && cf_fix_cppflags=no
15248 ;;
15249 esac
15250 done
15251
15252 if test -n "$cf_new_cflags" ; then
15253
15254 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15255 CFLAGS="${CFLAGS}$cf_new_cflags"
15256
15257 fi
15258
15259 if test -n "$cf_new_cppflags" ; then
15260
15261 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15262 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15263
15264 fi
15265
15266 if test -n "$cf_new_extra_cppflags" ; then
15267
15268 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15269 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15270
15271 fi
15272
15273 cf_add_libs="$LIBS"
15274 # reverse order
15275 cf_add_0lib=
15276 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15277 # filter duplicates
15278 for cf_add_1lib in $cf_add_0lib; do
15279 for cf_add_2lib in $cf_add_libs; do
15280 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15281 cf_add_1lib=
15282 break
15283 fi
15284 done
15285 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15286 done
15287 LIBS="$cf_add_libs"
15288
15289 :
15290 else
15291 cf_pkgconfig_incs=
15292 cf_pkgconfig_libs=
15293 { echo "$as_me:15293: WARNING: unable to find Xt library" >&5
15294 echo "$as_me: WARNING: unable to find Xt library" >&2;}
15295 fi
15296
15297 else
15298 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
15299 fi
15300
15301 cf_have_X_LIBS=no
15302
15303 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
15304 test -n "$verbose" && echo " found package xt" 1>&6
15305
15306 echo "${as_me:-configure}:15306: testing found package xt ..." 1>&5
15307
15308 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
15309 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
15310 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
15311
15312 echo "${as_me:-configure}:15312: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15313
15314 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
15315
15316 echo "${as_me:-configure}:15316: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
15317
15318 for cf_required in xt
15319 do
15320 # check for duplicates
15321 for cf_require_pkg in $REQUIRE_PKG
15322 do
15323 if test "$cf_required" = "$cf_require_pkg"
15324 then
15325 cf_required=
15326 break
15327 fi
15328 done
15329 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
15330 done
15331
15332 cf_fix_cppflags=no
15333 cf_new_cflags=
15334 cf_new_cppflags=
15335 cf_new_extra_cppflags=
15336
15337 for cf_add_cflags in $cf_pkgconfig_incs
15338 do
15339 case "$cf_fix_cppflags" in
15340 (no)
15341 case "$cf_add_cflags" in
15342 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15343 case "$cf_add_cflags" in
15344 (-D*)
15345 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15346
15347 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15348 && test -z "${cf_tst_cflags}" \
15349 && cf_fix_cppflags=yes
15350
15351 if test "$cf_fix_cppflags" = yes ; then
15352
15353 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15354 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15355
15356 continue
15357 elif test "${cf_tst_cflags}" = "\"'" ; then
15358
15359 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15360 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15361
15362 continue
15363 fi
15364 ;;
15365 esac
15366 case "$CPPFLAGS" in
15367 (*$cf_add_cflags)
15368 ;;
15369 (*)
15370 case "$cf_add_cflags" in
15371 (-D*)
15372 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15373
15374 CPPFLAGS=`echo "$CPPFLAGS" | \
15375 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15376 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15377
15378 ;;
15379 esac
15380
15381 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15382 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15383
15384 ;;
15385 esac
15386 ;;
15387 (*)
15388
15389 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15390 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15391
15392 ;;
15393 esac
15394 ;;
15395 (yes)
15396
15397 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15398 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15399
15400 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15401
15402 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15403 && test -z "${cf_tst_cflags}" \
15404 && cf_fix_cppflags=no
15405 ;;
15406 esac
15407 done
15408
15409 if test -n "$cf_new_cflags" ; then
15410
15411 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15412 CFLAGS="${CFLAGS}$cf_new_cflags"
15413
15414 fi
15415
15416 if test -n "$cf_new_cppflags" ; then
15417
15418 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15419 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15420
15421 fi
15422
15423 if test -n "$cf_new_extra_cppflags" ; then
15424
15425 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15426 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15427
15428 fi
15429
15430 cf_add_libs="$LIBS"
15431 # reverse order
15432 cf_add_0lib=
15433 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15434 # filter duplicates
15435 for cf_add_1lib in $cf_add_0lib; do
15436 for cf_add_2lib in $cf_add_libs; do
15437 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15438 cf_add_1lib=
15439 break
15440 fi
15441 done
15442 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15443 done
15444 LIBS="$cf_add_libs"
15445
15446 case "x$LIBS" in
15447 (*-lX11*)
15448 ;;
15449 (*)
15450 # we have an "xt" package, but it may omit Xt's dependency on X11
15451 echo "$as_me:15451: checking for usable X dependency" >&5
15452 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
15453 if test "${cf_cv_xt_x11_compat+set}" = set; then
15454 echo $ECHO_N "(cached) $ECHO_C" >&6
15455 else
15456
15457 cat >"conftest.$ac_ext" <<_ACEOF
15458 #line 15458 "configure"
15459 #include "confdefs.h"
15460
15461 $ac_includes_default
15462 #include <X11/Xlib.h>
15463
15464 int
15465 main (void)
15466 {
15467
15468 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
15469 int rc2 = XClearWindow((Display*) 0, (Window) 0);
15470 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
15471 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
15472
15473 ;
15474 return 0;
15475 }
15476 _ACEOF
15477 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15478 if { (eval echo "$as_me:15478: \"$ac_link\"") >&5
15479 (eval $ac_link) 2>&5
15480 ac_status=$?
15481 echo "$as_me:15481: \$? = $ac_status" >&5
15482 (exit "$ac_status"); } &&
15483 { ac_try='test -s "conftest$ac_exeext"'
15484 { (eval echo "$as_me:15484: \"$ac_try\"") >&5
15485 (eval $ac_try) 2>&5
15486 ac_status=$?
15487 echo "$as_me:15487: \$? = $ac_status" >&5
15488 (exit "$ac_status"); }; }; then
15489 cf_cv_xt_x11_compat=yes
15490 else
15491 echo "$as_me: failed program was:" >&5
15492 cat "conftest.$ac_ext" >&5
15493 cf_cv_xt_x11_compat=no
15494 fi
15495 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15496 fi
15497 echo "$as_me:15497: result: $cf_cv_xt_x11_compat" >&5
15498 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
15499 if test "$cf_cv_xt_x11_compat" = no
15500 then
15501 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
15502
15503 echo "${as_me:-configure}:15503: testing work around broken X11 dependency ..." 1>&5
15504
15505 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
15506
15507 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
15508 test -n "$verbose" && echo " found package x11" 1>&6
15509
15510 echo "${as_me:-configure}:15510: testing found package x11 ..." 1>&5
15511
15512 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
15513 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
15514 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
15515
15516 echo "${as_me:-configure}:15516: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15517
15518 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
15519
15520 echo "${as_me:-configure}:15520: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
15521
15522 for cf_required in x11
15523 do
15524 # check for duplicates
15525 for cf_require_pkg in $REQUIRE_PKG
15526 do
15527 if test "$cf_required" = "$cf_require_pkg"
15528 then
15529 cf_required=
15530 break
15531 fi
15532 done
15533 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
15534 done
15535
15536 cf_fix_cppflags=no
15537 cf_new_cflags=
15538 cf_new_cppflags=
15539 cf_new_extra_cppflags=
15540
15541 for cf_add_cflags in $cf_pkgconfig_incs
15542 do
15543 case "$cf_fix_cppflags" in
15544 (no)
15545 case "$cf_add_cflags" in
15546 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15547 case "$cf_add_cflags" in
15548 (-D*)
15549 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15550
15551 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15552 && test -z "${cf_tst_cflags}" \
15553 && cf_fix_cppflags=yes
15554
15555 if test "$cf_fix_cppflags" = yes ; then
15556
15557 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15558 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15559
15560 continue
15561 elif test "${cf_tst_cflags}" = "\"'" ; then
15562
15563 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15564 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15565
15566 continue
15567 fi
15568 ;;
15569 esac
15570 case "$CPPFLAGS" in
15571 (*$cf_add_cflags)
15572 ;;
15573 (*)
15574 case "$cf_add_cflags" in
15575 (-D*)
15576 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15577
15578 CPPFLAGS=`echo "$CPPFLAGS" | \
15579 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15580 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15581
15582 ;;
15583 esac
15584
15585 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15586 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15587
15588 ;;
15589 esac
15590 ;;
15591 (*)
15592
15593 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15594 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15595
15596 ;;
15597 esac
15598 ;;
15599 (yes)
15600
15601 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15602 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15603
15604 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15605
15606 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15607 && test -z "${cf_tst_cflags}" \
15608 && cf_fix_cppflags=no
15609 ;;
15610 esac
15611 done
15612
15613 if test -n "$cf_new_cflags" ; then
15614
15615 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15616 CFLAGS="${CFLAGS}$cf_new_cflags"
15617
15618 fi
15619
15620 if test -n "$cf_new_cppflags" ; then
15621
15622 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15623 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15624
15625 fi
15626
15627 if test -n "$cf_new_extra_cppflags" ; then
15628
15629 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15630 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15631
15632 fi
15633
15634 cf_add_libs="$LIBS"
15635 # reverse order
15636 cf_add_0lib=
15637 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15638 # filter duplicates
15639 for cf_add_1lib in $cf_add_0lib; do
15640 for cf_add_2lib in $cf_add_libs; do
15641 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15642 cf_add_1lib=
15643 break
15644 fi
15645 done
15646 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15647 done
15648 LIBS="$cf_add_libs"
15649
15650 :
15651 else
15652 cf_pkgconfig_incs=
15653 cf_pkgconfig_libs=
15654
15655 cf_add_libs="$LIBS"
15656 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
15657
15658 echo "${as_me:-configure}:15658: testing ...before $cf_add_libs ..." 1>&5
15659
15660 for cf_add_1lib in -lX11; do
15661 # filter duplicates
15662 cf_found_2lib=no
15663 for cf_add_2lib in $cf_add_libs; do
15664 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15665 cf_found_2lib=yes
15666 break
15667 fi
15668 done
15669 # if not a duplicate, find the dependent library
15670 if test "$cf_found_2lib" = no
15671 then
15672 cf_found_2lib=no
15673 cf_add_2libs=
15674 for cf_add_2lib in $cf_add_libs
15675 do
15676 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
15677 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
15678 if test "x$cf_add_2lib" = "x-lXt"
15679 then
15680 cf_found_2lib=yes
15681 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
15682 fi
15683 done
15684 if test "$cf_found_2lib" = yes
15685 then
15686 cf_add_libs="$cf_add_2libs"
15687 else
15688 test -n "$verbose" && echo " ...missed -lXt" 1>&6
15689
15690 echo "${as_me:-configure}:15690: testing ...missed -lXt ..." 1>&5
15691
15692 fi
15693 fi
15694 done
15695 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
15696
15697 echo "${as_me:-configure}:15697: testing ...after $cf_add_libs ..." 1>&5
15698
15699 LIBS="$cf_add_libs"
15700
15701 fi
15702
15703 fi
15704 ;;
15705 esac
15706
15707 echo "$as_me:15707: checking for usable X Toolkit package" >&5
15708 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
15709 if test "${cf_cv_xt_ice_compat+set}" = set; then
15710 echo $ECHO_N "(cached) $ECHO_C" >&6
15711 else
15712
15713 cat >"conftest.$ac_ext" <<_ACEOF
15714 #line 15714 "configure"
15715 #include "confdefs.h"
15716
15717 $ac_includes_default
15718 #include <X11/Shell.h>
15719
15720 int
15721 main (void)
15722 {
15723 int num = IceConnectionNumber(NULL); (void) num
15724
15725 ;
15726 return 0;
15727 }
15728 _ACEOF
15729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15730 if { (eval echo "$as_me:15730: \"$ac_link\"") >&5
15731 (eval $ac_link) 2>&5
15732 ac_status=$?
15733 echo "$as_me:15733: \$? = $ac_status" >&5
15734 (exit "$ac_status"); } &&
15735 { ac_try='test -s "conftest$ac_exeext"'
15736 { (eval echo "$as_me:15736: \"$ac_try\"") >&5
15737 (eval $ac_try) 2>&5
15738 ac_status=$?
15739 echo "$as_me:15739: \$? = $ac_status" >&5
15740 (exit "$ac_status"); }; }; then
15741 cf_cv_xt_ice_compat=yes
15742 else
15743 echo "$as_me: failed program was:" >&5
15744 cat "conftest.$ac_ext" >&5
15745 cf_cv_xt_ice_compat=no
15746 fi
15747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15748 fi
15749 echo "$as_me:15749: result: $cf_cv_xt_ice_compat" >&5
15750 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
15751
15752 if test "$cf_cv_xt_ice_compat" = no
15753 then
15754 # workaround for broken ".pc" files used for X Toolkit.
15755 case "x$X_PRE_LIBS" in
15756 (*-lICE*)
15757 case "x$LIBS" in
15758 (*-lICE*)
15759 ;;
15760 (*)
15761 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
15762
15763 echo "${as_me:-configure}:15763: testing work around broken ICE dependency ..." 1>&5
15764
15765 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
15766 test -n "$verbose" && echo " found package ice" 1>&6
15767
15768 echo "${as_me:-configure}:15768: testing found package ice ..." 1>&5
15769
15770 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
15771 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
15772 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
15773
15774 echo "${as_me:-configure}:15774: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15775
15776 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
15777
15778 echo "${as_me:-configure}:15778: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
15779
15780 for cf_required in ice
15781 do
15782 # check for duplicates
15783 for cf_require_pkg in $REQUIRE_PKG
15784 do
15785 if test "$cf_required" = "$cf_require_pkg"
15786 then
15787 cf_required=
15788 break
15789 fi
15790 done
15791 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
15792 done
15793
15794 cf_fix_cppflags=no
15795 cf_new_cflags=
15796 cf_new_cppflags=
15797 cf_new_extra_cppflags=
15798
15799 for cf_add_cflags in $cf_pkgconfig_incs
15800 do
15801 case "$cf_fix_cppflags" in
15802 (no)
15803 case "$cf_add_cflags" in
15804 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15805 case "$cf_add_cflags" in
15806 (-D*)
15807 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15808
15809 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15810 && test -z "${cf_tst_cflags}" \
15811 && cf_fix_cppflags=yes
15812
15813 if test "$cf_fix_cppflags" = yes ; then
15814
15815 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15816 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15817
15818 continue
15819 elif test "${cf_tst_cflags}" = "\"'" ; then
15820
15821 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15822 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15823
15824 continue
15825 fi
15826 ;;
15827 esac
15828 case "$CPPFLAGS" in
15829 (*$cf_add_cflags)
15830 ;;
15831 (*)
15832 case "$cf_add_cflags" in
15833 (-D*)
15834 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15835
15836 CPPFLAGS=`echo "$CPPFLAGS" | \
15837 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15838 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15839
15840 ;;
15841 esac
15842
15843 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15844 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15845
15846 ;;
15847 esac
15848 ;;
15849 (*)
15850
15851 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15852 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15853
15854 ;;
15855 esac
15856 ;;
15857 (yes)
15858
15859 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15860 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15861
15862 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15863
15864 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15865 && test -z "${cf_tst_cflags}" \
15866 && cf_fix_cppflags=no
15867 ;;
15868 esac
15869 done
15870
15871 if test -n "$cf_new_cflags" ; then
15872
15873 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15874 CFLAGS="${CFLAGS}$cf_new_cflags"
15875
15876 fi
15877
15878 if test -n "$cf_new_cppflags" ; then
15879
15880 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15881 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15882
15883 fi
15884
15885 if test -n "$cf_new_extra_cppflags" ; then
15886
15887 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15888 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15889
15890 fi
15891
15892 cf_add_libs="$LIBS"
15893 # reverse order
15894 cf_add_0lib=
15895 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15896 # filter duplicates
15897 for cf_add_1lib in $cf_add_0lib; do
15898 for cf_add_2lib in $cf_add_libs; do
15899 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15900 cf_add_1lib=
15901 break
15902 fi
15903 done
15904 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15905 done
15906 LIBS="$cf_add_libs"
15907
15908 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
15909 test -n "$verbose" && echo " found package sm" 1>&6
15910
15911 echo "${as_me:-configure}:15911: testing found package sm ..." 1>&5
15912
15913 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15914 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15915 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15916
15917 echo "${as_me:-configure}:15917: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15918
15919 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15920
15921 echo "${as_me:-configure}:15921: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15922
15923 for cf_required in sm
15924 do
15925 # check for duplicates
15926 for cf_require_pkg in $REQUIRE_PKG
15927 do
15928 if test "$cf_required" = "$cf_require_pkg"
15929 then
15930 cf_required=
15931 break
15932 fi
15933 done
15934 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
15935 done
15936
15937 cf_fix_cppflags=no
15938 cf_new_cflags=
15939 cf_new_cppflags=
15940 cf_new_extra_cppflags=
15941
15942 for cf_add_cflags in $cf_pkgconfig_incs
15943 do
15944 case "$cf_fix_cppflags" in
15945 (no)
15946 case "$cf_add_cflags" in
15947 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15948 case "$cf_add_cflags" in
15949 (-D*)
15950 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15951
15952 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15953 && test -z "${cf_tst_cflags}" \
15954 && cf_fix_cppflags=yes
15955
15956 if test "$cf_fix_cppflags" = yes ; then
15957
15958 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15959 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15960
15961 continue
15962 elif test "${cf_tst_cflags}" = "\"'" ; then
15963
15964 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15965 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15966
15967 continue
15968 fi
15969 ;;
15970 esac
15971 case "$CPPFLAGS" in
15972 (*$cf_add_cflags)
15973 ;;
15974 (*)
15975 case "$cf_add_cflags" in
15976 (-D*)
15977 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15978
15979 CPPFLAGS=`echo "$CPPFLAGS" | \
15980 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15981 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15982
15983 ;;
15984 esac
15985
15986 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15987 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15988
15989 ;;
15990 esac
15991 ;;
15992 (*)
15993
15994 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15995 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15996
15997 ;;
15998 esac
15999 ;;
16000 (yes)
16001
16002 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16003 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16004
16005 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16006
16007 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16008 && test -z "${cf_tst_cflags}" \
16009 && cf_fix_cppflags=no
16010 ;;
16011 esac
16012 done
16013
16014 if test -n "$cf_new_cflags" ; then
16015
16016 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16017 CFLAGS="${CFLAGS}$cf_new_cflags"
16018
16019 fi
16020
16021 if test -n "$cf_new_cppflags" ; then
16022
16023 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16024 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16025
16026 fi
16027
16028 if test -n "$cf_new_extra_cppflags" ; then
16029
16030 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16031 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16032
16033 fi
16034
16035 cf_add_libs="$LIBS"
16036 # reverse order
16037 cf_add_0lib=
16038 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16039 # filter duplicates
16040 for cf_add_1lib in $cf_add_0lib; do
16041 for cf_add_2lib in $cf_add_libs; do
16042 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16043 cf_add_1lib=
16044 break
16045 fi
16046 done
16047 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16048 done
16049 LIBS="$cf_add_libs"
16050
16051 :
16052 else
16053 cf_pkgconfig_incs=
16054 cf_pkgconfig_libs=
16055 :
16056 fi
16057
16058 else
16059 cf_pkgconfig_incs=
16060 cf_pkgconfig_libs=
16061
16062 cf_add_libs="$LIBS"
16063 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
16064
16065 echo "${as_me:-configure}:16065: testing ...before $cf_add_libs ..." 1>&5
16066
16067 for cf_add_1lib in $X_PRE_LIBS; do
16068 # filter duplicates
16069 cf_found_2lib=no
16070 for cf_add_2lib in $cf_add_libs; do
16071 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16072 cf_found_2lib=yes
16073 break
16074 fi
16075 done
16076 # if not a duplicate, find the dependent library
16077 if test "$cf_found_2lib" = no
16078 then
16079 cf_found_2lib=no
16080 cf_add_2libs=
16081 for cf_add_2lib in $cf_add_libs
16082 do
16083 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
16084 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
16085 if test "x$cf_add_2lib" = "x-lXt"
16086 then
16087 cf_found_2lib=yes
16088 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
16089 fi
16090 done
16091 if test "$cf_found_2lib" = yes
16092 then
16093 cf_add_libs="$cf_add_2libs"
16094 else
16095 test -n "$verbose" && echo " ...missed -lXt" 1>&6
16096
16097 echo "${as_me:-configure}:16097: testing ...missed -lXt ..." 1>&5
16098
16099 fi
16100 fi
16101 done
16102 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
16103
16104 echo "${as_me:-configure}:16104: testing ...after $cf_add_libs ..." 1>&5
16105
16106 LIBS="$cf_add_libs"
16107
16108 fi
16109
16110 ;;
16111 esac
16112 ;;
16113 esac
16114 fi
16115
16116 cf_have_X_LIBS=yes
16117
16118 else
16119 cf_pkgconfig_incs=
16120 cf_pkgconfig_libs=
16121
16122 LDFLAGS="$X_LIBS $LDFLAGS"
16123
16124 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
16125
16126 echo "${as_me:-configure}:16126: testing checking additions to CFLAGS ..." 1>&5
16127
16128 cf_check_cflags="$CFLAGS"
16129 cf_check_cppflags="$CPPFLAGS"
16130
16131 cf_fix_cppflags=no
16132 cf_new_cflags=
16133 cf_new_cppflags=
16134 cf_new_extra_cppflags=
16135
16136 for cf_add_cflags in $X_CFLAGS
16137 do
16138 case "$cf_fix_cppflags" in
16139 (no)
16140 case "$cf_add_cflags" in
16141 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16142 case "$cf_add_cflags" in
16143 (-D*)
16144 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16145
16146 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16147 && test -z "${cf_tst_cflags}" \
16148 && cf_fix_cppflags=yes
16149
16150 if test "$cf_fix_cppflags" = yes ; then
16151
16152 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16153 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16154
16155 continue
16156 elif test "${cf_tst_cflags}" = "\"'" ; then
16157
16158 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16159 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16160
16161 continue
16162 fi
16163 ;;
16164 esac
16165 case "$CPPFLAGS" in
16166 (*$cf_add_cflags)
16167 ;;
16168 (*)
16169 case "$cf_add_cflags" in
16170 (-D*)
16171 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16172
16173 CPPFLAGS=`echo "$CPPFLAGS" | \
16174 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16175 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16176
16177 ;;
16178 esac
16179
16180 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16181 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16182
16183 ;;
16184 esac
16185 ;;
16186 (*)
16187
16188 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16189 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16190
16191 ;;
16192 esac
16193 ;;
16194 (yes)
16195
16196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16198
16199 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16200
16201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16202 && test -z "${cf_tst_cflags}" \
16203 && cf_fix_cppflags=no
16204 ;;
16205 esac
16206 done
16207
16208 if test -n "$cf_new_cflags" ; then
16209 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
16210
16211 echo "${as_me:-configure}:16211: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
16212
16213 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16214 CFLAGS="${CFLAGS}$cf_new_cflags"
16215
16216 fi
16217
16218 if test -n "$cf_new_cppflags" ; then
16219 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
16220
16221 echo "${as_me:-configure}:16221: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
16222
16223 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16224 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16225
16226 fi
16227
16228 if test -n "$cf_new_extra_cppflags" ; then
16229 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
16230
16231 echo "${as_me:-configure}:16231: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
16232
16233 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16234 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16235
16236 fi
16237
16238 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
16239 cat >"conftest.$ac_ext" <<_ACEOF
16240 #line 16240 "configure"
16241 #include "confdefs.h"
16242 #include <stdio.h>
16243 int
16244 main (void)
16245 {
16246 printf("Hello world");
16247 ;
16248 return 0;
16249 }
16250 _ACEOF
16251 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16252 if { (eval echo "$as_me:16252: \"$ac_link\"") >&5
16253 (eval $ac_link) 2>&5
16254 ac_status=$?
16255 echo "$as_me:16255: \$? = $ac_status" >&5
16256 (exit "$ac_status"); } &&
16257 { ac_try='test -s "conftest$ac_exeext"'
16258 { (eval echo "$as_me:16258: \"$ac_try\"") >&5
16259 (eval $ac_try) 2>&5
16260 ac_status=$?
16261 echo "$as_me:16261: \$? = $ac_status" >&5
16262 (exit "$ac_status"); }; }; then
16263 :
16264 else
16265 echo "$as_me: failed program was:" >&5
16266 cat "conftest.$ac_ext" >&5
16267 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16268
16269 echo "${as_me:-configure}:16269: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16270
16271 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16272 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16273
16274 echo "${as_me:-configure}:16274: testing but keeping change to \$CPPFLAGS ..." 1>&5
16275
16276 fi
16277 CFLAGS="$cf_check_cflags"
16278 fi
16279 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16280 fi
16281
16282 echo "$as_me:16282: checking for XOpenDisplay" >&5
16283 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
16284 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
16285 echo $ECHO_N "(cached) $ECHO_C" >&6
16286 else
16287 cat >"conftest.$ac_ext" <<_ACEOF
16288 #line 16288 "configure"
16289 #include "confdefs.h"
16290 #define XOpenDisplay autoconf_temporary
16291 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16292 #undef XOpenDisplay
16293
16294 #ifdef __cplusplus
16295 extern "C"
16296 #endif
16297
16298 /* We use char because int might match the return type of a gcc2
16299 builtin and then its argument prototype would still apply. */
16300 char XOpenDisplay (void);
16301
16302 int
16303 main (void)
16304 {
16305
16306 /* The GNU C library defines stubs for functions which it implements
16307 to always fail with ENOSYS. Some functions are actually named
16308 something starting with __ and the normal name is an alias. */
16309 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
16310 #error found stub for XOpenDisplay
16311 #endif
16312
16313 return XOpenDisplay ();
16314 ;
16315 return 0;
16316 }
16317 _ACEOF
16318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16319 if { (eval echo "$as_me:16319: \"$ac_link\"") >&5
16320 (eval $ac_link) 2>&5
16321 ac_status=$?
16322 echo "$as_me:16322: \$? = $ac_status" >&5
16323 (exit "$ac_status"); } &&
16324 { ac_try='test -s "conftest$ac_exeext"'
16325 { (eval echo "$as_me:16325: \"$ac_try\"") >&5
16326 (eval $ac_try) 2>&5
16327 ac_status=$?
16328 echo "$as_me:16328: \$? = $ac_status" >&5
16329 (exit "$ac_status"); }; }; then
16330 ac_cv_func_XOpenDisplay=yes
16331 else
16332 echo "$as_me: failed program was:" >&5
16333 cat "conftest.$ac_ext" >&5
16334 ac_cv_func_XOpenDisplay=no
16335 fi
16336 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16337 fi
16338 echo "$as_me:16338: result: $ac_cv_func_XOpenDisplay" >&5
16339 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
16340 if test "$ac_cv_func_XOpenDisplay" = yes; then
16341 :
16342 else
16343
16344 echo "$as_me:16344: checking for XOpenDisplay in -lX11" >&5
16345 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16346 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16347 echo $ECHO_N "(cached) $ECHO_C" >&6
16348 else
16349 ac_check_lib_save_LIBS=$LIBS
16350 LIBS="-lX11 $LIBS"
16351 cat >"conftest.$ac_ext" <<_ACEOF
16352 #line 16352 "configure"
16353 #include "confdefs.h"
16354
16355 /* Override any gcc2 internal prototype to avoid an error. */
16356 #ifdef __cplusplus
16357 extern "C"
16358 #endif
16359 /* We use char because int might match the return type of a gcc2
16360 builtin and then its argument prototype would still apply. */
16361 char XOpenDisplay (void);
16362 int
16363 main (void)
16364 {
16365 XOpenDisplay ();
16366 ;
16367 return 0;
16368 }
16369 _ACEOF
16370 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16371 if { (eval echo "$as_me:16371: \"$ac_link\"") >&5
16372 (eval $ac_link) 2>&5
16373 ac_status=$?
16374 echo "$as_me:16374: \$? = $ac_status" >&5
16375 (exit "$ac_status"); } &&
16376 { ac_try='test -s "conftest$ac_exeext"'
16377 { (eval echo "$as_me:16377: \"$ac_try\"") >&5
16378 (eval $ac_try) 2>&5
16379 ac_status=$?
16380 echo "$as_me:16380: \$? = $ac_status" >&5
16381 (exit "$ac_status"); }; }; then
16382 ac_cv_lib_X11_XOpenDisplay=yes
16383 else
16384 echo "$as_me: failed program was:" >&5
16385 cat "conftest.$ac_ext" >&5
16386 ac_cv_lib_X11_XOpenDisplay=no
16387 fi
16388 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16389 LIBS=$ac_check_lib_save_LIBS
16390 fi
16391 echo "$as_me:16391: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16392 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16393 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16394
16395 cf_add_libs="$LIBS"
16396 # reverse order
16397 cf_add_0lib=
16398 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16399 # filter duplicates
16400 for cf_add_1lib in $cf_add_0lib; do
16401 for cf_add_2lib in $cf_add_libs; do
16402 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16403 cf_add_1lib=
16404 break
16405 fi
16406 done
16407 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16408 done
16409 LIBS="$cf_add_libs"
16410
16411 fi
16412
16413 fi
16414
16415 echo "$as_me:16415: checking for XtAppInitialize" >&5
16416 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
16417 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
16418 echo $ECHO_N "(cached) $ECHO_C" >&6
16419 else
16420 cat >"conftest.$ac_ext" <<_ACEOF
16421 #line 16421 "configure"
16422 #include "confdefs.h"
16423 #define XtAppInitialize autoconf_temporary
16424 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16425 #undef XtAppInitialize
16426
16427 #ifdef __cplusplus
16428 extern "C"
16429 #endif
16430
16431 /* We use char because int might match the return type of a gcc2
16432 builtin and then its argument prototype would still apply. */
16433 char XtAppInitialize (void);
16434
16435 int
16436 main (void)
16437 {
16438
16439 /* The GNU C library defines stubs for functions which it implements
16440 to always fail with ENOSYS. Some functions are actually named
16441 something starting with __ and the normal name is an alias. */
16442 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
16443 #error found stub for XtAppInitialize
16444 #endif
16445
16446 return XtAppInitialize ();
16447 ;
16448 return 0;
16449 }
16450 _ACEOF
16451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16452 if { (eval echo "$as_me:16452: \"$ac_link\"") >&5
16453 (eval $ac_link) 2>&5
16454 ac_status=$?
16455 echo "$as_me:16455: \$? = $ac_status" >&5
16456 (exit "$ac_status"); } &&
16457 { ac_try='test -s "conftest$ac_exeext"'
16458 { (eval echo "$as_me:16458: \"$ac_try\"") >&5
16459 (eval $ac_try) 2>&5
16460 ac_status=$?
16461 echo "$as_me:16461: \$? = $ac_status" >&5
16462 (exit "$ac_status"); }; }; then
16463 ac_cv_func_XtAppInitialize=yes
16464 else
16465 echo "$as_me: failed program was:" >&5
16466 cat "conftest.$ac_ext" >&5
16467 ac_cv_func_XtAppInitialize=no
16468 fi
16469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16470 fi
16471 echo "$as_me:16471: result: $ac_cv_func_XtAppInitialize" >&5
16472 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
16473 if test "$ac_cv_func_XtAppInitialize" = yes; then
16474 :
16475 else
16476
16477 echo "$as_me:16477: checking for XtAppInitialize in -lXt" >&5
16478 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
16479 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
16480 echo $ECHO_N "(cached) $ECHO_C" >&6
16481 else
16482 ac_check_lib_save_LIBS=$LIBS
16483 LIBS="-lXt $LIBS"
16484 cat >"conftest.$ac_ext" <<_ACEOF
16485 #line 16485 "configure"
16486 #include "confdefs.h"
16487
16488 /* Override any gcc2 internal prototype to avoid an error. */
16489 #ifdef __cplusplus
16490 extern "C"
16491 #endif
16492 /* We use char because int might match the return type of a gcc2
16493 builtin and then its argument prototype would still apply. */
16494 char XtAppInitialize (void);
16495 int
16496 main (void)
16497 {
16498 XtAppInitialize ();
16499 ;
16500 return 0;
16501 }
16502 _ACEOF
16503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16504 if { (eval echo "$as_me:16504: \"$ac_link\"") >&5
16505 (eval $ac_link) 2>&5
16506 ac_status=$?
16507 echo "$as_me:16507: \$? = $ac_status" >&5
16508 (exit "$ac_status"); } &&
16509 { ac_try='test -s "conftest$ac_exeext"'
16510 { (eval echo "$as_me:16510: \"$ac_try\"") >&5
16511 (eval $ac_try) 2>&5
16512 ac_status=$?
16513 echo "$as_me:16513: \$? = $ac_status" >&5
16514 (exit "$ac_status"); }; }; then
16515 ac_cv_lib_Xt_XtAppInitialize=yes
16516 else
16517 echo "$as_me: failed program was:" >&5
16518 cat "conftest.$ac_ext" >&5
16519 ac_cv_lib_Xt_XtAppInitialize=no
16520 fi
16521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16522 LIBS=$ac_check_lib_save_LIBS
16523 fi
16524 echo "$as_me:16524: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
16525 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
16526 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
16527
16528 cat >>confdefs.h <<\EOF
16529 #define HAVE_LIBXT 1
16530 EOF
16531
16532 cf_have_X_LIBS=Xt
16533 LIBS="-lXt $LIBS"
16534 fi
16535
16536 fi
16537
16538 fi
16539
16540 if test "$cf_have_X_LIBS" = no ; then
16541 { echo "$as_me:16541: WARNING: Unable to successfully link X Toolkit library (-lXt) with
16542 test program. You will have to check and add the proper libraries by hand
16543 to makefile." >&5
16544 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
16545 test program. You will have to check and add the proper libraries by hand
16546 to makefile." >&2;}
16547 fi
16548
16549 cf_x_athena_root=$cf_x_athena
16550 cf_x_athena_inc=""
16551
16552 for cf_path in default \
16553 /usr/contrib/X11R6 \
16554 /usr/contrib/X11R5 \
16555 /usr/lib/X11R5 \
16556 /usr/local
16557 do
16558 if test -z "$cf_x_athena_inc" ; then
16559
16560 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
16561 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
16562 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
16563 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16564 for cf_X_CFLAGS in $X_CFLAGS
16565 do
16566 case "x$cf_X_CFLAGS" in
16567 x-[IUD]*)
16568 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16569 ;;
16570 *)
16571 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16572 ;;
16573 esac
16574 done
16575
16576 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
16577 if test "$cf_path" != default ; then
16578
16579 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16580 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
16581
16582 echo "$as_me:16582: checking for $cf_test in $cf_path" >&5
16583 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
16584 else
16585 echo "$as_me:16585: checking for $cf_test" >&5
16586 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
16587 fi
16588 cat >"conftest.$ac_ext" <<_ACEOF
16589 #line 16589 "configure"
16590 #include "confdefs.h"
16591
16592 #include <X11/Intrinsic.h>
16593 #include <$cf_test>
16594 int
16595 main (void)
16596 {
16597
16598 ;
16599 return 0;
16600 }
16601 _ACEOF
16602 rm -f "conftest.$ac_objext"
16603 if { (eval echo "$as_me:16603: \"$ac_compile\"") >&5
16604 (eval $ac_compile) 2>&5
16605 ac_status=$?
16606 echo "$as_me:16606: \$? = $ac_status" >&5
16607 (exit "$ac_status"); } &&
16608 { ac_try='test -s "conftest.$ac_objext"'
16609 { (eval echo "$as_me:16609: \"$ac_try\"") >&5
16610 (eval $ac_try) 2>&5
16611 ac_status=$?
16612 echo "$as_me:16612: \$? = $ac_status" >&5
16613 (exit "$ac_status"); }; }; then
16614 cf_result=yes
16615 else
16616 echo "$as_me: failed program was:" >&5
16617 cat "conftest.$ac_ext" >&5
16618 cf_result=no
16619 fi
16620 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16621 echo "$as_me:16621: result: $cf_result" >&5
16622 echo "${ECHO_T}$cf_result" >&6
16623
16624 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
16625 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
16626 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
16627
16628 if test "$cf_result" = yes ; then
16629 test "$cf_path" = default && cf_x_athena_inc=default
16630 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
16631 break
16632 fi
16633 fi
16634 done
16635
16636 if test -z "$cf_x_athena_inc" ; then
16637 { echo "$as_me:16637: WARNING: Unable to find Athena header files" >&5
16638 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
16639 elif test "$cf_x_athena_inc" != default ; then
16640
16641 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16642 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
16643
16644 fi
16645
16646 cf_x_athena_root=$cf_x_athena
16647 cf_x_athena_lib=""
16648
16649 for cf_path in default \
16650 /usr/contrib/X11R6 \
16651 /usr/contrib/X11R5 \
16652 /usr/lib/X11R5 \
16653 /usr/local
16654 do
16655 for cf_lib in \
16656 ${cf_x_athena_root} \
16657 ${cf_x_athena_root}7 \
16658 ${cf_x_athena_root}6
16659 do
16660 for cf_libs in \
16661 "-l$cf_lib -lXmu" \
16662 "-l$cf_lib -lXpm -lXmu" \
16663 "-l${cf_lib}_s -lXmu_s"
16664 do
16665 test -n "$cf_x_athena_lib" && break
16666
16667 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
16668 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
16669 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
16670 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16671 for cf_X_CFLAGS in $X_CFLAGS
16672 do
16673 case "x$cf_X_CFLAGS" in
16674 x-[IUD]*)
16675 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16676 ;;
16677 *)
16678 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16679 ;;
16680 esac
16681 done
16682
16683 cf_test=XawSimpleMenuAddGlobalActions
16684 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
16685
16686 cf_add_libs="$LIBS"
16687 # reverse order
16688 cf_add_0lib=
16689 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16690 # filter duplicates
16691 for cf_add_1lib in $cf_add_0lib; do
16692 for cf_add_2lib in $cf_add_libs; do
16693 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16694 cf_add_1lib=
16695 break
16696 fi
16697 done
16698 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16699 done
16700 LIBS="$cf_add_libs"
16701
16702 echo "$as_me:16702: checking for $cf_test in $cf_libs" >&5
16703 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
16704 cat >"conftest.$ac_ext" <<_ACEOF
16705 #line 16705 "configure"
16706 #include "confdefs.h"
16707
16708 $ac_includes_default
16709 #include <X11/Intrinsic.h>
16710 #include <X11/$cf_x_athena_root/SimpleMenu.h>
16711
16712 int
16713 main (void)
16714 {
16715
16716 $cf_test((XtAppContext) 0)
16717 ;
16718 return 0;
16719 }
16720 _ACEOF
16721 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16722 if { (eval echo "$as_me:16722: \"$ac_link\"") >&5
16723 (eval $ac_link) 2>&5
16724 ac_status=$?
16725 echo "$as_me:16725: \$? = $ac_status" >&5
16726 (exit "$ac_status"); } &&
16727 { ac_try='test -s "conftest$ac_exeext"'
16728 { (eval echo "$as_me:16728: \"$ac_try\"") >&5
16729 (eval $ac_try) 2>&5
16730 ac_status=$?
16731 echo "$as_me:16731: \$? = $ac_status" >&5
16732 (exit "$ac_status"); }; }; then
16733 cf_result=yes
16734 else
16735 echo "$as_me: failed program was:" >&5
16736 cat "conftest.$ac_ext" >&5
16737 cf_result=no
16738 fi
16739 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16740 echo "$as_me:16740: result: $cf_result" >&5
16741 echo "${ECHO_T}$cf_result" >&6
16742
16743 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
16744 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
16745 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
16746
16747 if test "$cf_result" = yes ; then
16748 cf_x_athena_lib="$cf_libs"
16749 break
16750 fi
16751 done # cf_libs
16752 test -n "$cf_x_athena_lib" && break
16753 done # cf_lib
16754 done
16755
16756 if test -z "$cf_x_athena_lib" ; then
16757 { { echo "$as_me:16757: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
16758 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
16759 { (exit 1); exit 1; }; }
16760 fi
16761
16762 cf_add_libs="$LIBS"
16763 # reverse order
16764 cf_add_0lib=
16765 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16766 # filter duplicates
16767 for cf_add_1lib in $cf_add_0lib; do
16768 for cf_add_2lib in $cf_add_libs; do
16769 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16770 cf_add_1lib=
16771 break
16772 fi
16773 done
16774 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16775 done
16776 LIBS="$cf_add_libs"
16777
16778 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16779
16780 cat >>confdefs.h <<EOF
16781 #define $cf_x_athena_LIBS 1
16782 EOF
16783
16784 fi
16785
16786 if test -n "$ac_tool_prefix"; then
16787 for ac_prog in xcurses-config
16788 do
16789 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16790 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16791 echo "$as_me:16791: checking for $ac_word" >&5
16792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16793 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
16794 echo $ECHO_N "(cached) $ECHO_C" >&6
16795 else
16796 if test -n "$XCURSES_CONFIG"; then
16797 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
16798 else
16799 ac_save_IFS=$IFS; IFS=$ac_path_separator
16800 ac_dummy="$PATH"
16801 for ac_dir in $ac_dummy; do
16802 IFS=$ac_save_IFS
16803 test -z "$ac_dir" && ac_dir=.
16804 $as_executable_p "$ac_dir/$ac_word" || continue
16805 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16806 echo "$as_me:16806: found $ac_dir/$ac_word" >&5
16807 break
16808 done
16809
16810 fi
16811 fi
16812 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
16813 if test -n "$XCURSES_CONFIG"; then
16814 echo "$as_me:16814: result: $XCURSES_CONFIG" >&5
16815 echo "${ECHO_T}$XCURSES_CONFIG" >&6
16816 else
16817 echo "$as_me:16817: result: no" >&5
16818 echo "${ECHO_T}no" >&6
16819 fi
16820
16821 test -n "$XCURSES_CONFIG" && break
16822 done
16823 fi
16824 if test -z "$XCURSES_CONFIG"; then
16825 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
16826 for ac_prog in xcurses-config
16827 do
16828 # Extract the first word of "$ac_prog", so it can be a program name with args.
16829 set dummy $ac_prog; ac_word=$2
16830 echo "$as_me:16830: checking for $ac_word" >&5
16831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16832 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
16833 echo $ECHO_N "(cached) $ECHO_C" >&6
16834 else
16835 if test -n "$ac_ct_XCURSES_CONFIG"; then
16836 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
16837 else
16838 ac_save_IFS=$IFS; IFS=$ac_path_separator
16839 ac_dummy="$PATH"
16840 for ac_dir in $ac_dummy; do
16841 IFS=$ac_save_IFS
16842 test -z "$ac_dir" && ac_dir=.
16843 $as_executable_p "$ac_dir/$ac_word" || continue
16844 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
16845 echo "$as_me:16845: found $ac_dir/$ac_word" >&5
16846 break
16847 done
16848
16849 fi
16850 fi
16851 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
16852 if test -n "$ac_ct_XCURSES_CONFIG"; then
16853 echo "$as_me:16853: result: $ac_ct_XCURSES_CONFIG" >&5
16854 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
16855 else
16856 echo "$as_me:16856: result: no" >&5
16857 echo "${ECHO_T}no" >&6
16858 fi
16859
16860 test -n "$ac_ct_XCURSES_CONFIG" && break
16861 done
16862 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
16863
16864 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
16865 fi
16866
16867 if test "$XCURSES_CONFIG" != none ; then
16868
16869 cf_fix_cppflags=no
16870 cf_new_cflags=
16871 cf_new_cppflags=
16872 cf_new_extra_cppflags=
16873
16874 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
16875 do
16876 case "$cf_fix_cppflags" in
16877 (no)
16878 case "$cf_add_cflags" in
16879 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16880 case "$cf_add_cflags" in
16881 (-D*)
16882 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16883
16884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16885 && test -z "${cf_tst_cflags}" \
16886 && cf_fix_cppflags=yes
16887
16888 if test "$cf_fix_cppflags" = yes ; then
16889
16890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16892
16893 continue
16894 elif test "${cf_tst_cflags}" = "\"'" ; then
16895
16896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16898
16899 continue
16900 fi
16901 ;;
16902 esac
16903 case "$CPPFLAGS" in
16904 (*$cf_add_cflags)
16905 ;;
16906 (*)
16907 case "$cf_add_cflags" in
16908 (-D*)
16909 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16910
16911 CPPFLAGS=`echo "$CPPFLAGS" | \
16912 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16913 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16914
16915 ;;
16916 esac
16917
16918 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16919 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16920
16921 ;;
16922 esac
16923 ;;
16924 (*)
16925
16926 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16927 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16928
16929 ;;
16930 esac
16931 ;;
16932 (yes)
16933
16934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16936
16937 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16938
16939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16940 && test -z "${cf_tst_cflags}" \
16941 && cf_fix_cppflags=no
16942 ;;
16943 esac
16944 done
16945
16946 if test -n "$cf_new_cflags" ; then
16947
16948 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16949 CFLAGS="${CFLAGS}$cf_new_cflags"
16950
16951 fi
16952
16953 if test -n "$cf_new_cppflags" ; then
16954
16955 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16956 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16957
16958 fi
16959
16960 if test -n "$cf_new_extra_cppflags" ; then
16961
16962 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16963 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16964
16965 fi
16966
16967 cf_add_libs="$LIBS"
16968 # reverse order
16969 cf_add_0lib=
16970 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16971 # filter duplicates
16972 for cf_add_1lib in $cf_add_0lib; do
16973 for cf_add_2lib in $cf_add_libs; do
16974 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16975 cf_add_1lib=
16976 break
16977 fi
16978 done
16979 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16980 done
16981 LIBS="$cf_add_libs"
16982
16983 cf_cv_lib_XCurses=yes
16984
16985 else
16986
16987 LDFLAGS="$LDFLAGS $X_LIBS"
16988
16989 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
16990
16991 echo "${as_me:-configure}:16991: testing checking additions to CFLAGS ..." 1>&5
16992
16993 cf_check_cflags="$CFLAGS"
16994 cf_check_cppflags="$CPPFLAGS"
16995
16996 cf_fix_cppflags=no
16997 cf_new_cflags=
16998 cf_new_cppflags=
16999 cf_new_extra_cppflags=
17000
17001 for cf_add_cflags in $X_CFLAGS
17002 do
17003 case "$cf_fix_cppflags" in
17004 (no)
17005 case "$cf_add_cflags" in
17006 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17007 case "$cf_add_cflags" in
17008 (-D*)
17009 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17010
17011 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17012 && test -z "${cf_tst_cflags}" \
17013 && cf_fix_cppflags=yes
17014
17015 if test "$cf_fix_cppflags" = yes ; then
17016
17017 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17018 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17019
17020 continue
17021 elif test "${cf_tst_cflags}" = "\"'" ; then
17022
17023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17025
17026 continue
17027 fi
17028 ;;
17029 esac
17030 case "$CPPFLAGS" in
17031 (*$cf_add_cflags)
17032 ;;
17033 (*)
17034 case "$cf_add_cflags" in
17035 (-D*)
17036 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17037
17038 CPPFLAGS=`echo "$CPPFLAGS" | \
17039 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17040 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17041
17042 ;;
17043 esac
17044
17045 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17046 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17047
17048 ;;
17049 esac
17050 ;;
17051 (*)
17052
17053 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17054 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17055
17056 ;;
17057 esac
17058 ;;
17059 (yes)
17060
17061 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17062 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17063
17064 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17065
17066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17067 && test -z "${cf_tst_cflags}" \
17068 && cf_fix_cppflags=no
17069 ;;
17070 esac
17071 done
17072
17073 if test -n "$cf_new_cflags" ; then
17074 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
17075
17076 echo "${as_me:-configure}:17076: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
17077
17078 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17079 CFLAGS="${CFLAGS}$cf_new_cflags"
17080
17081 fi
17082
17083 if test -n "$cf_new_cppflags" ; then
17084 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
17085
17086 echo "${as_me:-configure}:17086: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
17087
17088 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17089 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17090
17091 fi
17092
17093 if test -n "$cf_new_extra_cppflags" ; then
17094 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
17095
17096 echo "${as_me:-configure}:17096: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
17097
17098 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17099 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17100
17101 fi
17102
17103 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
17104 cat >"conftest.$ac_ext" <<_ACEOF
17105 #line 17105 "configure"
17106 #include "confdefs.h"
17107 #include <stdio.h>
17108 int
17109 main (void)
17110 {
17111 printf("Hello world");
17112 ;
17113 return 0;
17114 }
17115 _ACEOF
17116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17117 if { (eval echo "$as_me:17117: \"$ac_link\"") >&5
17118 (eval $ac_link) 2>&5
17119 ac_status=$?
17120 echo "$as_me:17120: \$? = $ac_status" >&5
17121 (exit "$ac_status"); } &&
17122 { ac_try='test -s "conftest$ac_exeext"'
17123 { (eval echo "$as_me:17123: \"$ac_try\"") >&5
17124 (eval $ac_try) 2>&5
17125 ac_status=$?
17126 echo "$as_me:17126: \$? = $ac_status" >&5
17127 (exit "$ac_status"); }; }; then
17128 :
17129 else
17130 echo "$as_me: failed program was:" >&5
17131 cat "conftest.$ac_ext" >&5
17132 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
17133
17134 echo "${as_me:-configure}:17134: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
17135
17136 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
17137 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
17138
17139 echo "${as_me:-configure}:17139: testing but keeping change to \$CPPFLAGS ..." 1>&5
17140
17141 fi
17142 CFLAGS="$cf_check_cflags"
17143 fi
17144 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17145 fi
17146
17147 echo "$as_me:17147: checking for XOpenDisplay in -lX11" >&5
17148 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
17149 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
17150 echo $ECHO_N "(cached) $ECHO_C" >&6
17151 else
17152 ac_check_lib_save_LIBS=$LIBS
17153 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
17154 cat >"conftest.$ac_ext" <<_ACEOF
17155 #line 17155 "configure"
17156 #include "confdefs.h"
17157
17158 /* Override any gcc2 internal prototype to avoid an error. */
17159 #ifdef __cplusplus
17160 extern "C"
17161 #endif
17162 /* We use char because int might match the return type of a gcc2
17163 builtin and then its argument prototype would still apply. */
17164 char XOpenDisplay (void);
17165 int
17166 main (void)
17167 {
17168 XOpenDisplay ();
17169 ;
17170 return 0;
17171 }
17172 _ACEOF
17173 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17174 if { (eval echo "$as_me:17174: \"$ac_link\"") >&5
17175 (eval $ac_link) 2>&5
17176 ac_status=$?
17177 echo "$as_me:17177: \$? = $ac_status" >&5
17178 (exit "$ac_status"); } &&
17179 { ac_try='test -s "conftest$ac_exeext"'
17180 { (eval echo "$as_me:17180: \"$ac_try\"") >&5
17181 (eval $ac_try) 2>&5
17182 ac_status=$?
17183 echo "$as_me:17183: \$? = $ac_status" >&5
17184 (exit "$ac_status"); }; }; then
17185 ac_cv_lib_X11_XOpenDisplay=yes
17186 else
17187 echo "$as_me: failed program was:" >&5
17188 cat "conftest.$ac_ext" >&5
17189 ac_cv_lib_X11_XOpenDisplay=no
17190 fi
17191 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17192 LIBS=$ac_check_lib_save_LIBS
17193 fi
17194 echo "$as_me:17194: result: $ac_cv_lib_X11_XOpenDisplay" >&5
17195 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
17196 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
17197
17198 cf_add_libs="$LIBS"
17199 # reverse order
17200 cf_add_0lib=
17201 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17202 # filter duplicates
17203 for cf_add_1lib in $cf_add_0lib; do
17204 for cf_add_2lib in $cf_add_libs; do
17205 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17206 cf_add_1lib=
17207 break
17208 fi
17209 done
17210 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17211 done
17212 LIBS="$cf_add_libs"
17213
17214 fi
17215
17216 echo "$as_me:17216: checking for XCurses library" >&5
17217 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
17218 if test "${cf_cv_lib_XCurses+set}" = set; then
17219 echo $ECHO_N "(cached) $ECHO_C" >&6
17220 else
17221
17222 cf_add_libs="$LIBS"
17223 # reverse order
17224 cf_add_0lib=
17225 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17226 # filter duplicates
17227 for cf_add_1lib in $cf_add_0lib; do
17228 for cf_add_2lib in $cf_add_libs; do
17229 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17230 cf_add_1lib=
17231 break
17232 fi
17233 done
17234 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17235 done
17236 LIBS="$cf_add_libs"
17237
17238 cat >"conftest.$ac_ext" <<_ACEOF
17239 #line 17239 "configure"
17240 #include "confdefs.h"
17241
17242 #include <xcurses.h>
17243 char *XCursesProgramName = "test";
17244
17245 int
17246 main (void)
17247 {
17248 XCursesExit();
17249 ;
17250 return 0;
17251 }
17252 _ACEOF
17253 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17254 if { (eval echo "$as_me:17254: \"$ac_link\"") >&5
17255 (eval $ac_link) 2>&5
17256 ac_status=$?
17257 echo "$as_me:17257: \$? = $ac_status" >&5
17258 (exit "$ac_status"); } &&
17259 { ac_try='test -s "conftest$ac_exeext"'
17260 { (eval echo "$as_me:17260: \"$ac_try\"") >&5
17261 (eval $ac_try) 2>&5
17262 ac_status=$?
17263 echo "$as_me:17263: \$? = $ac_status" >&5
17264 (exit "$ac_status"); }; }; then
17265 cf_cv_lib_XCurses=yes
17266 else
17267 echo "$as_me: failed program was:" >&5
17268 cat "conftest.$ac_ext" >&5
17269 cf_cv_lib_XCurses=no
17270 fi
17271 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17272
17273 fi
17274 echo "$as_me:17274: result: $cf_cv_lib_XCurses" >&5
17275 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
17276
17277 fi
17278
17279 if test "$cf_cv_lib_XCurses" = yes ; then
17280
17281 cat >>confdefs.h <<\EOF
17282 #define UNIX 1
17283 EOF
17284
17285 cat >>confdefs.h <<\EOF
17286 #define XCURSES 1
17287 EOF
17288
17289 echo "$as_me:17289: checking for xcurses.h" >&5
17290 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
17291 if test "${ac_cv_header_xcurses_h+set}" = set; then
17292 echo $ECHO_N "(cached) $ECHO_C" >&6
17293 else
17294 cat >"conftest.$ac_ext" <<_ACEOF
17295 #line 17295 "configure"
17296 #include "confdefs.h"
17297 #include <xcurses.h>
17298 _ACEOF
17299 if { (eval echo "$as_me:17299: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17300 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17301 ac_status=$?
17302 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17303 rm -f conftest.er1
17304 cat conftest.err >&5
17305 echo "$as_me:17305: \$? = $ac_status" >&5
17306 (exit "$ac_status"); } >/dev/null; then
17307 if test -s conftest.err; then
17308 ac_cpp_err=$ac_c_preproc_warn_flag
17309 else
17310 ac_cpp_err=
17311 fi
17312 else
17313 ac_cpp_err=yes
17314 fi
17315 if test -z "$ac_cpp_err"; then
17316 ac_cv_header_xcurses_h=yes
17317 else
17318 echo "$as_me: failed program was:" >&5
17319 cat "conftest.$ac_ext" >&5
17320 ac_cv_header_xcurses_h=no
17321 fi
17322 rm -f conftest.err "conftest.$ac_ext"
17323 fi
17324 echo "$as_me:17324: result: $ac_cv_header_xcurses_h" >&5
17325 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
17326 if test "$ac_cv_header_xcurses_h" = yes; then
17327
17328 cat >>confdefs.h <<\EOF
17329 #define HAVE_XCURSES 1
17330 EOF
17331
17332 fi
17333
17334 else
17335 { { echo "$as_me:17335: error: Cannot link with XCurses" >&5
17336 echo "$as_me: error: Cannot link with XCurses" >&2;}
17337 { (exit 1); exit 1; }; }
17338 fi
17339
17340 ;;
17341 (*)
17342 { { echo "$as_me:17342: error: unexpected screen-value: $cf_cv_screen" >&5
17343 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
17344 { (exit 1); exit 1; }; }
17345 ;;
17346 esac
17347
17348 echo "$as_me:17348: checking for _nc_init_pthreads" >&5
17349 echo $ECHO_N "checking for _nc_init_pthreads... $ECHO_C" >&6
17350 if test "${ac_cv_func__nc_init_pthreads+set}" = set; then
17351 echo $ECHO_N "(cached) $ECHO_C" >&6
17352 else
17353 cat >"conftest.$ac_ext" <<_ACEOF
17354 #line 17354 "configure"
17355 #include "confdefs.h"
17356 #define _nc_init_pthreads autoconf_temporary
17357 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17358 #undef _nc_init_pthreads
17359
17360 #ifdef __cplusplus
17361 extern "C"
17362 #endif
17363
17364 /* We use char because int might match the return type of a gcc2
17365 builtin and then its argument prototype would still apply. */
17366 char _nc_init_pthreads (void);
17367
17368 int
17369 main (void)
17370 {
17371
17372 /* The GNU C library defines stubs for functions which it implements
17373 to always fail with ENOSYS. Some functions are actually named
17374 something starting with __ and the normal name is an alias. */
17375 #if defined (__stub__nc_init_pthreads) || defined (__stub____nc_init_pthreads)
17376 #error found stub for _nc_init_pthreads
17377 #endif
17378
17379 return _nc_init_pthreads ();
17380 ;
17381 return 0;
17382 }
17383 _ACEOF
17384 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17385 if { (eval echo "$as_me:17385: \"$ac_link\"") >&5
17386 (eval $ac_link) 2>&5
17387 ac_status=$?
17388 echo "$as_me:17388: \$? = $ac_status" >&5
17389 (exit "$ac_status"); } &&
17390 { ac_try='test -s "conftest$ac_exeext"'
17391 { (eval echo "$as_me:17391: \"$ac_try\"") >&5
17392 (eval $ac_try) 2>&5
17393 ac_status=$?
17394 echo "$as_me:17394: \$? = $ac_status" >&5
17395 (exit "$ac_status"); }; }; then
17396 ac_cv_func__nc_init_pthreads=yes
17397 else
17398 echo "$as_me: failed program was:" >&5
17399 cat "conftest.$ac_ext" >&5
17400 ac_cv_func__nc_init_pthreads=no
17401 fi
17402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17403 fi
17404 echo "$as_me:17404: result: $ac_cv_func__nc_init_pthreads" >&5
17405 echo "${ECHO_T}$ac_cv_func__nc_init_pthreads" >&6
17406 if test "$ac_cv_func__nc_init_pthreads" = yes; then
17407 cf_cv_ncurses_pthreads=yes
17408 else
17409 cf_cv_ncurses_pthreads=no
17410 fi
17411
17412 if test "$cf_cv_ncurses_pthreads" = yes
17413 then
17414
17415 cf_add_libs="$LIBS"
17416 # reverse order
17417 cf_add_0lib=
17418 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17419 # filter duplicates
17420 for cf_add_1lib in $cf_add_0lib; do
17421 for cf_add_2lib in $cf_add_libs; do
17422 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17423 cf_add_1lib=
17424 break
17425 fi
17426 done
17427 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17428 done
17429 LIBS="$cf_add_libs"
17430
17431 fi
17432
17433 case $cf_cv_screen in
17434 (ncurses*)
17435 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
17436 ;;
17437 esac
17438
17439 echo "$as_me:17439: checking for X11 rgb file" >&5
17440 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
17441
17442 # Check whether --with-x11-rgb or --without-x11-rgb was given.
17443 if test "${with_x11_rgb+set}" = set; then
17444 withval="$with_x11_rgb"
17445 RGB_PATH=$withval
17446 else
17447 RGB_PATH=auto
17448 fi;
17449
17450 if test "x$RGB_PATH" = xauto
17451 then
17452 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
17453 for cf_path in \
17454 /opt/local/share/X11/rgb.txt \
17455 /opt/X11/share/X11/rgb.txt \
17456 /usr/share/X11/rgb.txt \
17457 /usr/X11/share/X11/rgb.txt \
17458 /usr/X11/lib/X11/rgb.txt \
17459 /usr/lib/X11/rgb.txt \
17460 /etc/X11/rgb.txt \
17461 /usr/pkg/lib/X11/rgb.txt \
17462 /usr/X11R7/lib/X11/rgb.txt \
17463 /usr/X11R6/lib/X11/rgb.txt \
17464 /usr/X11R5/lib/X11/rgb.txt \
17465 /usr/X11R4/lib/X11/rgb.txt \
17466 /usr/local/lib/X11/rgb.txt \
17467 /usr/local/share/X11/rgb.txt \
17468 /usr/lib64/X11/rgb.txt
17469 do
17470 if test -f "$cf_path" ; then
17471 RGB_PATH="$cf_path"
17472 break
17473 fi
17474 done
17475 else
17476 cf_path=$RGB_PATH
17477
17478 if test "x$prefix" != xNONE; then
17479 cf_path_syntax="$prefix"
17480 else
17481 cf_path_syntax="$ac_default_prefix"
17482 fi
17483
17484 case "x$cf_path" in
17485 (x\$\(*\)*|x\'*\'*)
17486 ;;
17487 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
17488 ;;
17489 (x\$\{*prefix\}*|x\$\{*dir\}*)
17490 eval cf_path="$cf_path"
17491 case "x$cf_path" in
17492 (xNONE/*)
17493 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
17494 ;;
17495 esac
17496 ;;
17497 (xno|xNONE/*)
17498 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
17499 ;;
17500 (*)
17501 { { echo "$as_me:17501: error: expected a pathname, not \"$cf_path\"" >&5
17502 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
17503 { (exit 1); exit 1; }; }
17504 ;;
17505 esac
17506
17507 fi
17508
17509 echo "$as_me:17509: result: $RGB_PATH" >&5
17510 echo "${ECHO_T}$RGB_PATH" >&6
17511
17512 cat >>confdefs.h <<EOF
17513 #define RGB_PATH "$cf_path"
17514 EOF
17515
17516 no_x11_rgb=
17517 if test "$RGB_PATH" = no
17518 then
17519 no_x11_rgb="#"
17520 fi
17521
17522 cf_curses_headers=
17523
17524 case $cf_cv_screen in
17525 (pdcurses)
17526 cf_default_panel=no
17527 cf_default_form=no
17528 cf_default_menu=no
17529 cf_default_tinfo=no
17530 ;;
17531 (xcurses|bsdcurses)
17532 cf_default_panel=no
17533 cf_default_form=no
17534 cf_default_menu=no
17535 cf_default_tinfo=yes
17536 ;;
17537 (*)
17538 cf_default_panel=yes
17539 cf_default_form=yes
17540 cf_default_menu=yes
17541 cf_default_tinfo=yes
17542 case $cf_cv_screen in
17543 (ncurses*)
17544 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
17545 ;;
17546 esac
17547 ;;
17548 esac
17549
17550 echo "$as_me:17550: checking for desired basename for form library" >&5
17551 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
17552
17553 # Check whether --with-form-libname or --without-form-libname was given.
17554 if test "${with_form_libname+set}" = set; then
17555 withval="$with_form_libname"
17556 with_lib_basename=$withval
17557 else
17558 with_lib_basename=form
17559 fi;
17560 FORM_NAME="$with_lib_basename"
17561
17562 case "x$FORM_NAME" in
17563 (x|xno|xnone|xyes)
17564 FORM_NAME=form
17565 ;;
17566 (*)
17567 ;;
17568 esac
17569
17570 echo "$as_me:17570: result: $FORM_NAME" >&5
17571 echo "${ECHO_T}$FORM_NAME" >&6
17572
17573 echo "$as_me:17573: checking for desired basename for menu library" >&5
17574 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
17575
17576 # Check whether --with-menu-libname or --without-menu-libname was given.
17577 if test "${with_menu_libname+set}" = set; then
17578 withval="$with_menu_libname"
17579 with_lib_basename=$withval
17580 else
17581 with_lib_basename=menu
17582 fi;
17583 MENU_NAME="$with_lib_basename"
17584
17585 case "x$MENU_NAME" in
17586 (x|xno|xnone|xyes)
17587 MENU_NAME=menu
17588 ;;
17589 (*)
17590 ;;
17591 esac
17592
17593 echo "$as_me:17593: result: $MENU_NAME" >&5
17594 echo "${ECHO_T}$MENU_NAME" >&6
17595
17596 echo "$as_me:17596: checking for desired basename for panel library" >&5
17597 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
17598
17599 # Check whether --with-panel-libname or --without-panel-libname was given.
17600 if test "${with_panel_libname+set}" = set; then
17601 withval="$with_panel_libname"
17602 with_lib_basename=$withval
17603 else
17604 with_lib_basename=panel
17605 fi;
17606 PANEL_NAME="$with_lib_basename"
17607
17608 case "x$PANEL_NAME" in
17609 (x|xno|xnone|xyes)
17610 PANEL_NAME=panel
17611 ;;
17612 (*)
17613 ;;
17614 esac
17615
17616 echo "$as_me:17616: result: $PANEL_NAME" >&5
17617 echo "${ECHO_T}$PANEL_NAME" >&6
17618
17619 echo "$as_me:17619: checking if you want to check for panel functions" >&5
17620 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
17621
17622 # Check whether --enable-panel or --disable-panel was given.
17623 if test "${enable_panel+set}" = set; then
17624 enableval="$enable_panel"
17625 test "$enableval" != no && enableval=yes
17626 if test "$enableval" != "yes" ; then
17627 cf_enable_panel=no
17628 else
17629 cf_enable_panel=$cf_default_panel
17630 fi
17631 else
17632 enableval=yes
17633 cf_enable_panel=$cf_default_panel
17634
17635 fi;
17636 echo "$as_me:17636: result: $cf_enable_panel" >&5
17637 echo "${ECHO_T}$cf_enable_panel" >&6
17638 if test $cf_enable_panel = yes
17639 then
17640
17641 cf_have_curses_lib=no
17642
17643 : ${NCURSES_CONFIG_PKG:=none}
17644 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17645 :
17646 elif test "x${PKG_CONFIG:=none}" != xnone; then
17647 echo "$as_me:17647: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
17648 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17649 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
17650 echo "$as_me:17650: result: yes" >&5
17651 echo "${ECHO_T}yes" >&6
17652
17653 echo "$as_me:17653: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
17654 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17655
17656 cf_save_CFLAGS="$CFLAGS"
17657 cf_save_CPPFLAGS="$CPPFLAGS"
17658 cf_save_LIBS="$LIBS"
17659
17660 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
17661 do
17662 case "x$cf_add_cflags" in
17663 (x-[DU]*)
17664
17665 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17666 while true
17667 do
17668 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17669 test "$CFLAGS" != "$cf_old_cflag" || break
17670
17671 CFLAGS="$cf_old_cflag"
17672 done
17673
17674 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17675 while true
17676 do
17677 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17678 test "$CPPFLAGS" != "$cf_old_cflag" || break
17679
17680 CPPFLAGS="$cf_old_cflag"
17681 done
17682
17683 ;;
17684 esac
17685
17686 cf_fix_cppflags=no
17687 cf_new_cflags=
17688 cf_new_cppflags=
17689 cf_new_extra_cppflags=
17690
17691 for cf_add_cflags in $cf_add_cflags
17692 do
17693 case "$cf_fix_cppflags" in
17694 (no)
17695 case "$cf_add_cflags" in
17696 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17697 case "$cf_add_cflags" in
17698 (-D*)
17699 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17700
17701 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17702 && test -z "${cf_tst_cflags}" \
17703 && cf_fix_cppflags=yes
17704
17705 if test "$cf_fix_cppflags" = yes ; then
17706
17707 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17708 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17709
17710 continue
17711 elif test "${cf_tst_cflags}" = "\"'" ; then
17712
17713 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17714 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17715
17716 continue
17717 fi
17718 ;;
17719 esac
17720 case "$CPPFLAGS" in
17721 (*$cf_add_cflags)
17722 ;;
17723 (*)
17724 case "$cf_add_cflags" in
17725 (-D*)
17726 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17727
17728 CPPFLAGS=`echo "$CPPFLAGS" | \
17729 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17730 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17731
17732 ;;
17733 esac
17734
17735 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17736 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17737
17738 ;;
17739 esac
17740 ;;
17741 (*)
17742
17743 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17744 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17745
17746 ;;
17747 esac
17748 ;;
17749 (yes)
17750
17751 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17752 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17753
17754 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17755
17756 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17757 && test -z "${cf_tst_cflags}" \
17758 && cf_fix_cppflags=no
17759 ;;
17760 esac
17761 done
17762
17763 if test -n "$cf_new_cflags" ; then
17764
17765 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17766 CFLAGS="${CFLAGS}$cf_new_cflags"
17767
17768 fi
17769
17770 if test -n "$cf_new_cppflags" ; then
17771
17772 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17773 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17774
17775 fi
17776
17777 if test -n "$cf_new_extra_cppflags" ; then
17778
17779 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17780 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17781
17782 fi
17783
17784 done
17785
17786 cf_add_libs="$LIBS"
17787 # reverse order
17788 cf_add_0lib=
17789 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17790 # filter duplicates
17791 for cf_add_1lib in $cf_add_0lib; do
17792 for cf_add_2lib in $cf_add_libs; do
17793 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17794 cf_add_1lib=
17795 break
17796 fi
17797 done
17798 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17799 done
17800 LIBS="$cf_add_libs"
17801
17802 cat >"conftest.$ac_ext" <<_ACEOF
17803 #line 17803 "configure"
17804 #include "confdefs.h"
17805 #include <$PANEL_NAME.h>
17806 int
17807 main (void)
17808 {
17809 (void) new_panel ( 0 );
17810 ;
17811 return 0;
17812 }
17813 _ACEOF
17814 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17815 if { (eval echo "$as_me:17815: \"$ac_link\"") >&5
17816 (eval $ac_link) 2>&5
17817 ac_status=$?
17818 echo "$as_me:17818: \$? = $ac_status" >&5
17819 (exit "$ac_status"); } &&
17820 { ac_try='test -s "conftest$ac_exeext"'
17821 { (eval echo "$as_me:17821: \"$ac_try\"") >&5
17822 (eval $ac_try) 2>&5
17823 ac_status=$?
17824 echo "$as_me:17824: \$? = $ac_status" >&5
17825 (exit "$ac_status"); }; }; then
17826 if test "$cross_compiling" = yes; then
17827 cf_have_curses_lib=maybe
17828 else
17829 cat >"conftest.$ac_ext" <<_ACEOF
17830 #line 17830 "configure"
17831 #include "confdefs.h"
17832 #include <$PANEL_NAME.h>
17833 int main(void)
17834 { (void) new_panel ( 0 ); return 0; }
17835 _ACEOF
17836 rm -f "conftest$ac_exeext"
17837 if { (eval echo "$as_me:17837: \"$ac_link\"") >&5
17838 (eval $ac_link) 2>&5
17839 ac_status=$?
17840 echo "$as_me:17840: \$? = $ac_status" >&5
17841 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17842 { (eval echo "$as_me:17842: \"$ac_try\"") >&5
17843 (eval $ac_try) 2>&5
17844 ac_status=$?
17845 echo "$as_me:17845: \$? = $ac_status" >&5
17846 (exit "$ac_status"); }; }; then
17847 cf_have_curses_lib=yes
17848 else
17849 echo "$as_me: program exited with status $ac_status" >&5
17850 echo "$as_me: failed program was:" >&5
17851 cat "conftest.$ac_ext" >&5
17852 cf_have_curses_lib=no
17853 fi
17854 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17855 fi
17856 else
17857 echo "$as_me: failed program was:" >&5
17858 cat "conftest.$ac_ext" >&5
17859 cf_have_curses_lib=no
17860 fi
17861 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17862 echo "$as_me:17862: result: $cf_have_curses_lib" >&5
17863 echo "${ECHO_T}$cf_have_curses_lib" >&6
17864 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17865 if test "$cf_have_curses_lib" = "yes"
17866 then
17867
17868 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17869
17870 cat >>confdefs.h <<EOF
17871 #define $cf_upper 1
17872 EOF
17873
17874 else
17875 CFLAGS="$cf_save_CFLAGS"
17876 CPPFLAGS="$cf_save_CPPFLAGS"
17877 LIBS="$cf_save_LIBS"
17878 fi
17879 fi
17880 fi
17881 if test "$cf_have_curses_lib" = no; then
17882 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
17883 echo "$as_me:17883: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
17884 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17885 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17886 echo $ECHO_N "(cached) $ECHO_C" >&6
17887 else
17888 ac_check_lib_save_LIBS=$LIBS
17889 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
17890 cat >"conftest.$ac_ext" <<_ACEOF
17891 #line 17891 "configure"
17892 #include "confdefs.h"
17893
17894 /* Override any gcc2 internal prototype to avoid an error. */
17895 #ifdef __cplusplus
17896 extern "C"
17897 #endif
17898 /* We use char because int might match the return type of a gcc2
17899 builtin and then its argument prototype would still apply. */
17900 char new_panel (void);
17901 int
17902 main (void)
17903 {
17904 new_panel ();
17905 ;
17906 return 0;
17907 }
17908 _ACEOF
17909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17910 if { (eval echo "$as_me:17910: \"$ac_link\"") >&5
17911 (eval $ac_link) 2>&5
17912 ac_status=$?
17913 echo "$as_me:17913: \$? = $ac_status" >&5
17914 (exit "$ac_status"); } &&
17915 { ac_try='test -s "conftest$ac_exeext"'
17916 { (eval echo "$as_me:17916: \"$ac_try\"") >&5
17917 (eval $ac_try) 2>&5
17918 ac_status=$?
17919 echo "$as_me:17919: \$? = $ac_status" >&5
17920 (exit "$ac_status"); }; }; then
17921 eval "$as_ac_Lib=yes"
17922 else
17923 echo "$as_me: failed program was:" >&5
17924 cat "conftest.$ac_ext" >&5
17925 eval "$as_ac_Lib=no"
17926 fi
17927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17928 LIBS=$ac_check_lib_save_LIBS
17929 fi
17930 echo "$as_me:17930: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17931 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17932 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17933
17934 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17935
17936 cf_add_libs="$LIBS"
17937 # reverse order
17938 cf_add_0lib=
17939 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17940 # filter duplicates
17941 for cf_add_1lib in $cf_add_0lib; do
17942 for cf_add_2lib in $cf_add_libs; do
17943 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17944 cf_add_1lib=
17945 break
17946 fi
17947 done
17948 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17949 done
17950 LIBS="$cf_add_libs"
17951
17952 cat >>confdefs.h <<EOF
17953 #define $cf_upper 1
17954 EOF
17955
17956 fi
17957
17958 fi
17959
17960 cf_curses_headers="$cf_curses_headers panel.h"
17961 fi
17962
17963 echo "$as_me:17963: checking if you want to check for menu functions" >&5
17964 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
17965
17966 # Check whether --enable-menu or --disable-menu was given.
17967 if test "${enable_menu+set}" = set; then
17968 enableval="$enable_menu"
17969 test "$enableval" != no && enableval=yes
17970 if test "$enableval" != "yes" ; then
17971 cf_enable_menu=no
17972 else
17973 cf_enable_menu=$cf_default_menu
17974 fi
17975 else
17976 enableval=yes
17977 cf_enable_menu=$cf_default_menu
17978
17979 fi;
17980 echo "$as_me:17980: result: $cf_enable_menu" >&5
17981 echo "${ECHO_T}$cf_enable_menu" >&6
17982 if test $cf_enable_menu = yes
17983 then
17984 case $cf_cv_screen in
17985 (ncurses*)
17986 ;;
17987 (curses*)
17988
17989 echo "$as_me:17989: checking for NetBSD menu.h" >&5
17990 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
17991 if test "${cf_cv_netbsd_menu_h+set}" = set; then
17992 echo $ECHO_N "(cached) $ECHO_C" >&6
17993 else
17994
17995 cat >"conftest.$ac_ext" <<_ACEOF
17996 #line 17996 "configure"
17997 #include "confdefs.h"
17998
17999 $ac_includes_default
18000 #include <${cf_cv_ncurses_header:-curses.h}>
18001 #include <menu.h>
18002
18003 int
18004 main (void)
18005 {
18006
18007 MENU *menu = calloc(1, sizeof(MENU));
18008 int y = menu->max_item_width;
18009 (void) y;
18010
18011 ;
18012 return 0;
18013 }
18014 _ACEOF
18015 rm -f "conftest.$ac_objext"
18016 if { (eval echo "$as_me:18016: \"$ac_compile\"") >&5
18017 (eval $ac_compile) 2>&5
18018 ac_status=$?
18019 echo "$as_me:18019: \$? = $ac_status" >&5
18020 (exit "$ac_status"); } &&
18021 { ac_try='test -s "conftest.$ac_objext"'
18022 { (eval echo "$as_me:18022: \"$ac_try\"") >&5
18023 (eval $ac_try) 2>&5
18024 ac_status=$?
18025 echo "$as_me:18025: \$? = $ac_status" >&5
18026 (exit "$ac_status"); }; }; then
18027 cf_cv_netbsd_menu_h=yes
18028
18029 else
18030 echo "$as_me: failed program was:" >&5
18031 cat "conftest.$ac_ext" >&5
18032 cf_cv_netbsd_menu_h=no
18033 fi
18034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18035
18036 fi
18037 echo "$as_me:18037: result: $cf_cv_netbsd_menu_h" >&5
18038 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
18039
18040 test "$cf_cv_netbsd_menu_h" = yes &&
18041 cat >>confdefs.h <<\EOF
18042 #define HAVE_NETBSD_MENU_H 1
18043 EOF
18044
18045 ;;
18046 esac
18047
18048 cf_have_curses_lib=no
18049
18050 : ${NCURSES_CONFIG_PKG:=none}
18051 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
18052 :
18053 elif test "x${PKG_CONFIG:=none}" != xnone; then
18054 echo "$as_me:18054: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
18055 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
18056 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
18057 echo "$as_me:18057: result: yes" >&5
18058 echo "${ECHO_T}yes" >&6
18059
18060 echo "$as_me:18060: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
18061 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
18062
18063 cf_save_CFLAGS="$CFLAGS"
18064 cf_save_CPPFLAGS="$CPPFLAGS"
18065 cf_save_LIBS="$LIBS"
18066
18067 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
18068 do
18069 case "x$cf_add_cflags" in
18070 (x-[DU]*)
18071
18072 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18073 while true
18074 do
18075 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
18076 test "$CFLAGS" != "$cf_old_cflag" || break
18077
18078 CFLAGS="$cf_old_cflag"
18079 done
18080
18081 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18082 while true
18083 do
18084 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
18085 test "$CPPFLAGS" != "$cf_old_cflag" || break
18086
18087 CPPFLAGS="$cf_old_cflag"
18088 done
18089
18090 ;;
18091 esac
18092
18093 cf_fix_cppflags=no
18094 cf_new_cflags=
18095 cf_new_cppflags=
18096 cf_new_extra_cppflags=
18097
18098 for cf_add_cflags in $cf_add_cflags
18099 do
18100 case "$cf_fix_cppflags" in
18101 (no)
18102 case "$cf_add_cflags" in
18103 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18104 case "$cf_add_cflags" in
18105 (-D*)
18106 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18107
18108 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18109 && test -z "${cf_tst_cflags}" \
18110 && cf_fix_cppflags=yes
18111
18112 if test "$cf_fix_cppflags" = yes ; then
18113
18114 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18115 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18116
18117 continue
18118 elif test "${cf_tst_cflags}" = "\"'" ; then
18119
18120 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18121 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18122
18123 continue
18124 fi
18125 ;;
18126 esac
18127 case "$CPPFLAGS" in
18128 (*$cf_add_cflags)
18129 ;;
18130 (*)
18131 case "$cf_add_cflags" in
18132 (-D*)
18133 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18134
18135 CPPFLAGS=`echo "$CPPFLAGS" | \
18136 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18137 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18138
18139 ;;
18140 esac
18141
18142 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18143 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18144
18145 ;;
18146 esac
18147 ;;
18148 (*)
18149
18150 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18151 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18152
18153 ;;
18154 esac
18155 ;;
18156 (yes)
18157
18158 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18159 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18160
18161 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18162
18163 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18164 && test -z "${cf_tst_cflags}" \
18165 && cf_fix_cppflags=no
18166 ;;
18167 esac
18168 done
18169
18170 if test -n "$cf_new_cflags" ; then
18171
18172 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18173 CFLAGS="${CFLAGS}$cf_new_cflags"
18174
18175 fi
18176
18177 if test -n "$cf_new_cppflags" ; then
18178
18179 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18180 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18181
18182 fi
18183
18184 if test -n "$cf_new_extra_cppflags" ; then
18185
18186 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18187 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18188
18189 fi
18190
18191 done
18192
18193 cf_add_libs="$LIBS"
18194 # reverse order
18195 cf_add_0lib=
18196 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18197 # filter duplicates
18198 for cf_add_1lib in $cf_add_0lib; do
18199 for cf_add_2lib in $cf_add_libs; do
18200 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18201 cf_add_1lib=
18202 break
18203 fi
18204 done
18205 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18206 done
18207 LIBS="$cf_add_libs"
18208
18209 cat >"conftest.$ac_ext" <<_ACEOF
18210 #line 18210 "configure"
18211 #include "confdefs.h"
18212 #include <$MENU_NAME.h>
18213 int
18214 main (void)
18215 {
18216 (void) menu_driver ( 0,0 );
18217 ;
18218 return 0;
18219 }
18220 _ACEOF
18221 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18222 if { (eval echo "$as_me:18222: \"$ac_link\"") >&5
18223 (eval $ac_link) 2>&5
18224 ac_status=$?
18225 echo "$as_me:18225: \$? = $ac_status" >&5
18226 (exit "$ac_status"); } &&
18227 { ac_try='test -s "conftest$ac_exeext"'
18228 { (eval echo "$as_me:18228: \"$ac_try\"") >&5
18229 (eval $ac_try) 2>&5
18230 ac_status=$?
18231 echo "$as_me:18231: \$? = $ac_status" >&5
18232 (exit "$ac_status"); }; }; then
18233 if test "$cross_compiling" = yes; then
18234 cf_have_curses_lib=maybe
18235 else
18236 cat >"conftest.$ac_ext" <<_ACEOF
18237 #line 18237 "configure"
18238 #include "confdefs.h"
18239 #include <$MENU_NAME.h>
18240 int main(void)
18241 { (void) menu_driver ( 0,0 ); return 0; }
18242 _ACEOF
18243 rm -f "conftest$ac_exeext"
18244 if { (eval echo "$as_me:18244: \"$ac_link\"") >&5
18245 (eval $ac_link) 2>&5
18246 ac_status=$?
18247 echo "$as_me:18247: \$? = $ac_status" >&5
18248 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18249 { (eval echo "$as_me:18249: \"$ac_try\"") >&5
18250 (eval $ac_try) 2>&5
18251 ac_status=$?
18252 echo "$as_me:18252: \$? = $ac_status" >&5
18253 (exit "$ac_status"); }; }; then
18254 cf_have_curses_lib=yes
18255 else
18256 echo "$as_me: program exited with status $ac_status" >&5
18257 echo "$as_me: failed program was:" >&5
18258 cat "conftest.$ac_ext" >&5
18259 cf_have_curses_lib=no
18260 fi
18261 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18262 fi
18263 else
18264 echo "$as_me: failed program was:" >&5
18265 cat "conftest.$ac_ext" >&5
18266 cf_have_curses_lib=no
18267 fi
18268 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18269 echo "$as_me:18269: result: $cf_have_curses_lib" >&5
18270 echo "${ECHO_T}$cf_have_curses_lib" >&6
18271 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
18272 if test "$cf_have_curses_lib" = "yes"
18273 then
18274
18275 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18276
18277 cat >>confdefs.h <<EOF
18278 #define $cf_upper 1
18279 EOF
18280
18281 else
18282 CFLAGS="$cf_save_CFLAGS"
18283 CPPFLAGS="$cf_save_CPPFLAGS"
18284 LIBS="$cf_save_LIBS"
18285 fi
18286 fi
18287 fi
18288 if test "$cf_have_curses_lib" = no; then
18289 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
18290 echo "$as_me:18290: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
18291 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
18292 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18293 echo $ECHO_N "(cached) $ECHO_C" >&6
18294 else
18295 ac_check_lib_save_LIBS=$LIBS
18296 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
18297 cat >"conftest.$ac_ext" <<_ACEOF
18298 #line 18298 "configure"
18299 #include "confdefs.h"
18300
18301 /* Override any gcc2 internal prototype to avoid an error. */
18302 #ifdef __cplusplus
18303 extern "C"
18304 #endif
18305 /* We use char because int might match the return type of a gcc2
18306 builtin and then its argument prototype would still apply. */
18307 char menu_driver (void);
18308 int
18309 main (void)
18310 {
18311 menu_driver ();
18312 ;
18313 return 0;
18314 }
18315 _ACEOF
18316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18317 if { (eval echo "$as_me:18317: \"$ac_link\"") >&5
18318 (eval $ac_link) 2>&5
18319 ac_status=$?
18320 echo "$as_me:18320: \$? = $ac_status" >&5
18321 (exit "$ac_status"); } &&
18322 { ac_try='test -s "conftest$ac_exeext"'
18323 { (eval echo "$as_me:18323: \"$ac_try\"") >&5
18324 (eval $ac_try) 2>&5
18325 ac_status=$?
18326 echo "$as_me:18326: \$? = $ac_status" >&5
18327 (exit "$ac_status"); }; }; then
18328 eval "$as_ac_Lib=yes"
18329 else
18330 echo "$as_me: failed program was:" >&5
18331 cat "conftest.$ac_ext" >&5
18332 eval "$as_ac_Lib=no"
18333 fi
18334 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18335 LIBS=$ac_check_lib_save_LIBS
18336 fi
18337 echo "$as_me:18337: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
18338 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
18339 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
18340
18341 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18342
18343 cf_add_libs="$LIBS"
18344 # reverse order
18345 cf_add_0lib=
18346 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18347 # filter duplicates
18348 for cf_add_1lib in $cf_add_0lib; do
18349 for cf_add_2lib in $cf_add_libs; do
18350 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18351 cf_add_1lib=
18352 break
18353 fi
18354 done
18355 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18356 done
18357 LIBS="$cf_add_libs"
18358
18359 cat >>confdefs.h <<EOF
18360 #define $cf_upper 1
18361 EOF
18362
18363 fi
18364
18365 fi
18366
18367 cf_curses_headers="$cf_curses_headers menu.h"
18368 fi
18369
18370 echo "$as_me:18370: checking if you want to check for form functions" >&5
18371 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
18372
18373 # Check whether --enable-form or --disable-form was given.
18374 if test "${enable_form+set}" = set; then
18375 enableval="$enable_form"
18376 test "$enableval" != no && enableval=yes
18377 if test "$enableval" != "yes" ; then
18378 cf_enable_form=no
18379 else
18380 cf_enable_form=$cf_default_form
18381 fi
18382 else
18383 enableval=yes
18384 cf_enable_form=$cf_default_form
18385
18386 fi;
18387 echo "$as_me:18387: result: $cf_enable_form" >&5
18388 echo "${ECHO_T}$cf_enable_form" >&6
18389 if test $cf_enable_form = yes
18390 then
18391 case $cf_cv_screen in
18392 (ncurses*)
18393 ;;
18394 (curses*)
18395
18396 echo "$as_me:18396: checking for NetBSD form.h" >&5
18397 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
18398 if test "${cf_cv_netbsd_form_h+set}" = set; then
18399 echo $ECHO_N "(cached) $ECHO_C" >&6
18400 else
18401
18402 cat >"conftest.$ac_ext" <<_ACEOF
18403 #line 18403 "configure"
18404 #include "confdefs.h"
18405
18406 $ac_includes_default
18407 #include <${cf_cv_ncurses_header:-curses.h}>
18408 #include <form.h>
18409
18410 int
18411 main (void)
18412 {
18413
18414 FORM *form = calloc(1, sizeof(FORM));
18415 int y = current_field(form)->cursor_ypos;
18416 int x = current_field(form)->cursor_xpos;
18417 (void) x; (void) y;
18418
18419 ;
18420 return 0;
18421 }
18422 _ACEOF
18423 rm -f "conftest.$ac_objext"
18424 if { (eval echo "$as_me:18424: \"$ac_compile\"") >&5
18425 (eval $ac_compile) 2>&5
18426 ac_status=$?
18427 echo "$as_me:18427: \$? = $ac_status" >&5
18428 (exit "$ac_status"); } &&
18429 { ac_try='test -s "conftest.$ac_objext"'
18430 { (eval echo "$as_me:18430: \"$ac_try\"") >&5
18431 (eval $ac_try) 2>&5
18432 ac_status=$?
18433 echo "$as_me:18433: \$? = $ac_status" >&5
18434 (exit "$ac_status"); }; }; then
18435 cf_cv_netbsd_form_h=yes
18436
18437 else
18438 echo "$as_me: failed program was:" >&5
18439 cat "conftest.$ac_ext" >&5
18440 cf_cv_netbsd_form_h=no
18441 fi
18442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18443
18444 fi
18445 echo "$as_me:18445: result: $cf_cv_netbsd_form_h" >&5
18446 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
18447
18448 test "$cf_cv_netbsd_form_h" = yes &&
18449 cat >>confdefs.h <<\EOF
18450 #define HAVE_NETBSD_FORM_H 1
18451 EOF
18452
18453 ;;
18454 esac
18455
18456 cf_have_curses_lib=no
18457
18458 : ${NCURSES_CONFIG_PKG:=none}
18459 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
18460 :
18461 elif test "x${PKG_CONFIG:=none}" != xnone; then
18462 echo "$as_me:18462: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
18463 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
18464 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
18465 echo "$as_me:18465: result: yes" >&5
18466 echo "${ECHO_T}yes" >&6
18467
18468 echo "$as_me:18468: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
18469 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
18470
18471 cf_save_CFLAGS="$CFLAGS"
18472 cf_save_CPPFLAGS="$CPPFLAGS"
18473 cf_save_LIBS="$LIBS"
18474
18475 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
18476 do
18477 case "x$cf_add_cflags" in
18478 (x-[DU]*)
18479
18480 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18481 while true
18482 do
18483 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
18484 test "$CFLAGS" != "$cf_old_cflag" || break
18485
18486 CFLAGS="$cf_old_cflag"
18487 done
18488
18489 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18490 while true
18491 do
18492 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
18493 test "$CPPFLAGS" != "$cf_old_cflag" || break
18494
18495 CPPFLAGS="$cf_old_cflag"
18496 done
18497
18498 ;;
18499 esac
18500
18501 cf_fix_cppflags=no
18502 cf_new_cflags=
18503 cf_new_cppflags=
18504 cf_new_extra_cppflags=
18505
18506 for cf_add_cflags in $cf_add_cflags
18507 do
18508 case "$cf_fix_cppflags" in
18509 (no)
18510 case "$cf_add_cflags" in
18511 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18512 case "$cf_add_cflags" in
18513 (-D*)
18514 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18515
18516 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18517 && test -z "${cf_tst_cflags}" \
18518 && cf_fix_cppflags=yes
18519
18520 if test "$cf_fix_cppflags" = yes ; then
18521
18522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18524
18525 continue
18526 elif test "${cf_tst_cflags}" = "\"'" ; then
18527
18528 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18529 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18530
18531 continue
18532 fi
18533 ;;
18534 esac
18535 case "$CPPFLAGS" in
18536 (*$cf_add_cflags)
18537 ;;
18538 (*)
18539 case "$cf_add_cflags" in
18540 (-D*)
18541 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18542
18543 CPPFLAGS=`echo "$CPPFLAGS" | \
18544 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18545 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18546
18547 ;;
18548 esac
18549
18550 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18551 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18552
18553 ;;
18554 esac
18555 ;;
18556 (*)
18557
18558 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18559 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18560
18561 ;;
18562 esac
18563 ;;
18564 (yes)
18565
18566 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18567 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18568
18569 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18570
18571 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18572 && test -z "${cf_tst_cflags}" \
18573 && cf_fix_cppflags=no
18574 ;;
18575 esac
18576 done
18577
18578 if test -n "$cf_new_cflags" ; then
18579
18580 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18581 CFLAGS="${CFLAGS}$cf_new_cflags"
18582
18583 fi
18584
18585 if test -n "$cf_new_cppflags" ; then
18586
18587 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18588 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18589
18590 fi
18591
18592 if test -n "$cf_new_extra_cppflags" ; then
18593
18594 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18595 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18596
18597 fi
18598
18599 done
18600
18601 cf_add_libs="$LIBS"
18602 # reverse order
18603 cf_add_0lib=
18604 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18605 # filter duplicates
18606 for cf_add_1lib in $cf_add_0lib; do
18607 for cf_add_2lib in $cf_add_libs; do
18608 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18609 cf_add_1lib=
18610 break
18611 fi
18612 done
18613 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18614 done
18615 LIBS="$cf_add_libs"
18616
18617 cat >"conftest.$ac_ext" <<_ACEOF
18618 #line 18618 "configure"
18619 #include "confdefs.h"
18620 #include <$FORM_NAME.h>
18621 int
18622 main (void)
18623 {
18624 (void) form_driver ( 0,0 );
18625 ;
18626 return 0;
18627 }
18628 _ACEOF
18629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18630 if { (eval echo "$as_me:18630: \"$ac_link\"") >&5
18631 (eval $ac_link) 2>&5
18632 ac_status=$?
18633 echo "$as_me:18633: \$? = $ac_status" >&5
18634 (exit "$ac_status"); } &&
18635 { ac_try='test -s "conftest$ac_exeext"'
18636 { (eval echo "$as_me:18636: \"$ac_try\"") >&5
18637 (eval $ac_try) 2>&5
18638 ac_status=$?
18639 echo "$as_me:18639: \$? = $ac_status" >&5
18640 (exit "$ac_status"); }; }; then
18641 if test "$cross_compiling" = yes; then
18642 cf_have_curses_lib=maybe
18643 else
18644 cat >"conftest.$ac_ext" <<_ACEOF
18645 #line 18645 "configure"
18646 #include "confdefs.h"
18647 #include <$FORM_NAME.h>
18648 int main(void)
18649 { (void) form_driver ( 0,0 ); return 0; }
18650 _ACEOF
18651 rm -f "conftest$ac_exeext"
18652 if { (eval echo "$as_me:18652: \"$ac_link\"") >&5
18653 (eval $ac_link) 2>&5
18654 ac_status=$?
18655 echo "$as_me:18655: \$? = $ac_status" >&5
18656 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18657 { (eval echo "$as_me:18657: \"$ac_try\"") >&5
18658 (eval $ac_try) 2>&5
18659 ac_status=$?
18660 echo "$as_me:18660: \$? = $ac_status" >&5
18661 (exit "$ac_status"); }; }; then
18662 cf_have_curses_lib=yes
18663 else
18664 echo "$as_me: program exited with status $ac_status" >&5
18665 echo "$as_me: failed program was:" >&5
18666 cat "conftest.$ac_ext" >&5
18667 cf_have_curses_lib=no
18668 fi
18669 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18670 fi
18671 else
18672 echo "$as_me: failed program was:" >&5
18673 cat "conftest.$ac_ext" >&5
18674 cf_have_curses_lib=no
18675 fi
18676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18677 echo "$as_me:18677: result: $cf_have_curses_lib" >&5
18678 echo "${ECHO_T}$cf_have_curses_lib" >&6
18679 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
18680 if test "$cf_have_curses_lib" = "yes"
18681 then
18682
18683 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18684
18685 cat >>confdefs.h <<EOF
18686 #define $cf_upper 1
18687 EOF
18688
18689 else
18690 CFLAGS="$cf_save_CFLAGS"
18691 CPPFLAGS="$cf_save_CPPFLAGS"
18692 LIBS="$cf_save_LIBS"
18693 fi
18694 fi
18695 fi
18696 if test "$cf_have_curses_lib" = no; then
18697 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
18698 echo "$as_me:18698: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
18699 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
18700 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18701 echo $ECHO_N "(cached) $ECHO_C" >&6
18702 else
18703 ac_check_lib_save_LIBS=$LIBS
18704 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
18705 cat >"conftest.$ac_ext" <<_ACEOF
18706 #line 18706 "configure"
18707 #include "confdefs.h"
18708
18709 /* Override any gcc2 internal prototype to avoid an error. */
18710 #ifdef __cplusplus
18711 extern "C"
18712 #endif
18713 /* We use char because int might match the return type of a gcc2
18714 builtin and then its argument prototype would still apply. */
18715 char form_driver (void);
18716 int
18717 main (void)
18718 {
18719 form_driver ();
18720 ;
18721 return 0;
18722 }
18723 _ACEOF
18724 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18725 if { (eval echo "$as_me:18725: \"$ac_link\"") >&5
18726 (eval $ac_link) 2>&5
18727 ac_status=$?
18728 echo "$as_me:18728: \$? = $ac_status" >&5
18729 (exit "$ac_status"); } &&
18730 { ac_try='test -s "conftest$ac_exeext"'
18731 { (eval echo "$as_me:18731: \"$ac_try\"") >&5
18732 (eval $ac_try) 2>&5
18733 ac_status=$?
18734 echo "$as_me:18734: \$? = $ac_status" >&5
18735 (exit "$ac_status"); }; }; then
18736 eval "$as_ac_Lib=yes"
18737 else
18738 echo "$as_me: failed program was:" >&5
18739 cat "conftest.$ac_ext" >&5
18740 eval "$as_ac_Lib=no"
18741 fi
18742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18743 LIBS=$ac_check_lib_save_LIBS
18744 fi
18745 echo "$as_me:18745: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
18746 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
18747 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
18748
18749 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18750
18751 cf_add_libs="$LIBS"
18752 # reverse order
18753 cf_add_0lib=
18754 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18755 # filter duplicates
18756 for cf_add_1lib in $cf_add_0lib; do
18757 for cf_add_2lib in $cf_add_libs; do
18758 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18759 cf_add_1lib=
18760 break
18761 fi
18762 done
18763 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18764 done
18765 LIBS="$cf_add_libs"
18766
18767 cat >>confdefs.h <<EOF
18768 #define $cf_upper 1
18769 EOF
18770
18771 fi
18772
18773 fi
18774
18775 cf_curses_headers="$cf_curses_headers form.h"
18776 fi
18777
18778 # look for curses-related headers
18779
18780 for ac_header in $cf_curses_headers
18781 do
18782 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18783 echo "$as_me:18783: checking for $ac_header" >&5
18784 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18785 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
18787 else
18788 cat >"conftest.$ac_ext" <<_ACEOF
18789 #line 18789 "configure"
18790 #include "confdefs.h"
18791 #include <$ac_header>
18792 _ACEOF
18793 if { (eval echo "$as_me:18793: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18794 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18795 ac_status=$?
18796 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18797 rm -f conftest.er1
18798 cat conftest.err >&5
18799 echo "$as_me:18799: \$? = $ac_status" >&5
18800 (exit "$ac_status"); } >/dev/null; then
18801 if test -s conftest.err; then
18802 ac_cpp_err=$ac_c_preproc_warn_flag
18803 else
18804 ac_cpp_err=
18805 fi
18806 else
18807 ac_cpp_err=yes
18808 fi
18809 if test -z "$ac_cpp_err"; then
18810 eval "$as_ac_Header=yes"
18811 else
18812 echo "$as_me: failed program was:" >&5
18813 cat "conftest.$ac_ext" >&5
18814 eval "$as_ac_Header=no"
18815 fi
18816 rm -f conftest.err "conftest.$ac_ext"
18817 fi
18818 echo "$as_me:18818: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18819 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18820 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18821 cat >>confdefs.h <<EOF
18822 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18823 EOF
18824
18825 fi
18826 done
18827
18828 echo "$as_me:18828: checking whether time.h and sys/time.h may both be included" >&5
18829 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18830 if test "${ac_cv_header_time+set}" = set; then
18831 echo $ECHO_N "(cached) $ECHO_C" >&6
18832 else
18833 cat >"conftest.$ac_ext" <<_ACEOF
18834 #line 18834 "configure"
18835 #include "confdefs.h"
18836 #include <sys/types.h>
18837 #include <sys/time.h>
18838 #include <time.h>
18839
18840 int
18841 main (void)
18842 {
18843 if ((struct tm *) 0)
18844 return 0;
18845 ;
18846 return 0;
18847 }
18848 _ACEOF
18849 rm -f "conftest.$ac_objext"
18850 if { (eval echo "$as_me:18850: \"$ac_compile\"") >&5
18851 (eval $ac_compile) 2>&5
18852 ac_status=$?
18853 echo "$as_me:18853: \$? = $ac_status" >&5
18854 (exit "$ac_status"); } &&
18855 { ac_try='test -s "conftest.$ac_objext"'
18856 { (eval echo "$as_me:18856: \"$ac_try\"") >&5
18857 (eval $ac_try) 2>&5
18858 ac_status=$?
18859 echo "$as_me:18859: \$? = $ac_status" >&5
18860 (exit "$ac_status"); }; }; then
18861 ac_cv_header_time=yes
18862 else
18863 echo "$as_me: failed program was:" >&5
18864 cat "conftest.$ac_ext" >&5
18865 ac_cv_header_time=no
18866 fi
18867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18868 fi
18869 echo "$as_me:18869: result: $ac_cv_header_time" >&5
18870 echo "${ECHO_T}$ac_cv_header_time" >&6
18871 if test $ac_cv_header_time = yes; then
18872
18873 cat >>confdefs.h <<\EOF
18874 #define TIME_WITH_SYS_TIME 1
18875 EOF
18876
18877 fi
18878
18879 for ac_header in \
18880 locale.h \
18881 math.h \
18882 stdarg.h \
18883 sys/ioctl.h \
18884 sys/select.h \
18885 sys/time.h \
18886 termios.h \
18887
18888 do
18889 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18890 echo "$as_me:18890: checking for $ac_header" >&5
18891 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18892 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18893 echo $ECHO_N "(cached) $ECHO_C" >&6
18894 else
18895 cat >"conftest.$ac_ext" <<_ACEOF
18896 #line 18896 "configure"
18897 #include "confdefs.h"
18898 #include <$ac_header>
18899 _ACEOF
18900 if { (eval echo "$as_me:18900: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18901 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18902 ac_status=$?
18903 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18904 rm -f conftest.er1
18905 cat conftest.err >&5
18906 echo "$as_me:18906: \$? = $ac_status" >&5
18907 (exit "$ac_status"); } >/dev/null; then
18908 if test -s conftest.err; then
18909 ac_cpp_err=$ac_c_preproc_warn_flag
18910 else
18911 ac_cpp_err=
18912 fi
18913 else
18914 ac_cpp_err=yes
18915 fi
18916 if test -z "$ac_cpp_err"; then
18917 eval "$as_ac_Header=yes"
18918 else
18919 echo "$as_me: failed program was:" >&5
18920 cat "conftest.$ac_ext" >&5
18921 eval "$as_ac_Header=no"
18922 fi
18923 rm -f conftest.err "conftest.$ac_ext"
18924 fi
18925 echo "$as_me:18925: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18926 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18927 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18928 cat >>confdefs.h <<EOF
18929 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18930 EOF
18931
18932 fi
18933 done
18934
18935 for ac_header in getopt.h
18936 do
18937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18938 echo "$as_me:18938: checking for $ac_header" >&5
18939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18940 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18941 echo $ECHO_N "(cached) $ECHO_C" >&6
18942 else
18943 cat >"conftest.$ac_ext" <<_ACEOF
18944 #line 18944 "configure"
18945 #include "confdefs.h"
18946 #include <$ac_header>
18947 _ACEOF
18948 if { (eval echo "$as_me:18948: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18949 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18950 ac_status=$?
18951 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18952 rm -f conftest.er1
18953 cat conftest.err >&5
18954 echo "$as_me:18954: \$? = $ac_status" >&5
18955 (exit "$ac_status"); } >/dev/null; then
18956 if test -s conftest.err; then
18957 ac_cpp_err=$ac_c_preproc_warn_flag
18958 else
18959 ac_cpp_err=
18960 fi
18961 else
18962 ac_cpp_err=yes
18963 fi
18964 if test -z "$ac_cpp_err"; then
18965 eval "$as_ac_Header=yes"
18966 else
18967 echo "$as_me: failed program was:" >&5
18968 cat "conftest.$ac_ext" >&5
18969 eval "$as_ac_Header=no"
18970 fi
18971 rm -f conftest.err "conftest.$ac_ext"
18972 fi
18973 echo "$as_me:18973: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18974 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18975 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18976 cat >>confdefs.h <<EOF
18977 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18978 EOF
18979
18980 fi
18981 done
18982
18983 echo "$as_me:18983: checking for header declaring getopt variables" >&5
18984 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18985 if test "${cf_cv_getopt_header+set}" = set; then
18986 echo $ECHO_N "(cached) $ECHO_C" >&6
18987 else
18988
18989 cf_cv_getopt_header=none
18990 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18991 do
18992 cat >"conftest.$ac_ext" <<_ACEOF
18993 #line 18993 "configure"
18994 #include "confdefs.h"
18995
18996 #include <$cf_header>
18997 int
18998 main (void)
18999 {
19000 int x = optind; char *y = optarg; (void)x; (void)y
19001 ;
19002 return 0;
19003 }
19004 _ACEOF
19005 rm -f "conftest.$ac_objext"
19006 if { (eval echo "$as_me:19006: \"$ac_compile\"") >&5
19007 (eval $ac_compile) 2>&5
19008 ac_status=$?
19009 echo "$as_me:19009: \$? = $ac_status" >&5
19010 (exit "$ac_status"); } &&
19011 { ac_try='test -s "conftest.$ac_objext"'
19012 { (eval echo "$as_me:19012: \"$ac_try\"") >&5
19013 (eval $ac_try) 2>&5
19014 ac_status=$?
19015 echo "$as_me:19015: \$? = $ac_status" >&5
19016 (exit "$ac_status"); }; }; then
19017 cf_cv_getopt_header=$cf_header
19018 break
19019 else
19020 echo "$as_me: failed program was:" >&5
19021 cat "conftest.$ac_ext" >&5
19022 fi
19023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19024 done
19025
19026 fi
19027 echo "$as_me:19027: result: $cf_cv_getopt_header" >&5
19028 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19029 if test "$cf_cv_getopt_header" != none ; then
19030
19031 cat >>confdefs.h <<\EOF
19032 #define HAVE_GETOPT_HEADER 1
19033 EOF
19034
19035 fi
19036 if test "$cf_cv_getopt_header" = getopt.h ; then
19037
19038 cat >>confdefs.h <<\EOF
19039 #define NEED_GETOPT_H 1
19040 EOF
19041
19042 fi
19043
19044 cf_save_libs="$LIBS"
19045 echo "$as_me:19045: checking for clock_gettime" >&5
19046 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
19047 if test "${ac_cv_func_clock_gettime+set}" = set; then
19048 echo $ECHO_N "(cached) $ECHO_C" >&6
19049 else
19050 cat >"conftest.$ac_ext" <<_ACEOF
19051 #line 19051 "configure"
19052 #include "confdefs.h"
19053 #define clock_gettime autoconf_temporary
19054 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19055 #undef clock_gettime
19056
19057 #ifdef __cplusplus
19058 extern "C"
19059 #endif
19060
19061 /* We use char because int might match the return type of a gcc2
19062 builtin and then its argument prototype would still apply. */
19063 char clock_gettime (void);
19064
19065 int
19066 main (void)
19067 {
19068
19069 /* The GNU C library defines stubs for functions which it implements
19070 to always fail with ENOSYS. Some functions are actually named
19071 something starting with __ and the normal name is an alias. */
19072 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
19073 #error found stub for clock_gettime
19074 #endif
19075
19076 return clock_gettime ();
19077 ;
19078 return 0;
19079 }
19080 _ACEOF
19081 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19082 if { (eval echo "$as_me:19082: \"$ac_link\"") >&5
19083 (eval $ac_link) 2>&5
19084 ac_status=$?
19085 echo "$as_me:19085: \$? = $ac_status" >&5
19086 (exit "$ac_status"); } &&
19087 { ac_try='test -s "conftest$ac_exeext"'
19088 { (eval echo "$as_me:19088: \"$ac_try\"") >&5
19089 (eval $ac_try) 2>&5
19090 ac_status=$?
19091 echo "$as_me:19091: \$? = $ac_status" >&5
19092 (exit "$ac_status"); }; }; then
19093 ac_cv_func_clock_gettime=yes
19094 else
19095 echo "$as_me: failed program was:" >&5
19096 cat "conftest.$ac_ext" >&5
19097 ac_cv_func_clock_gettime=no
19098 fi
19099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19100 fi
19101 echo "$as_me:19101: result: $ac_cv_func_clock_gettime" >&5
19102 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
19103 if test "$ac_cv_func_clock_gettime" = yes; then
19104 cf_cv_test_clock_gettime=yes
19105 else
19106 echo "$as_me:19106: checking for clock_gettime in -lrt" >&5
19107 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
19108 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
19109 echo $ECHO_N "(cached) $ECHO_C" >&6
19110 else
19111 ac_check_lib_save_LIBS=$LIBS
19112 LIBS="-lrt $LIBS"
19113 cat >"conftest.$ac_ext" <<_ACEOF
19114 #line 19114 "configure"
19115 #include "confdefs.h"
19116
19117 /* Override any gcc2 internal prototype to avoid an error. */
19118 #ifdef __cplusplus
19119 extern "C"
19120 #endif
19121 /* We use char because int might match the return type of a gcc2
19122 builtin and then its argument prototype would still apply. */
19123 char clock_gettime (void);
19124 int
19125 main (void)
19126 {
19127 clock_gettime ();
19128 ;
19129 return 0;
19130 }
19131 _ACEOF
19132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19133 if { (eval echo "$as_me:19133: \"$ac_link\"") >&5
19134 (eval $ac_link) 2>&5
19135 ac_status=$?
19136 echo "$as_me:19136: \$? = $ac_status" >&5
19137 (exit "$ac_status"); } &&
19138 { ac_try='test -s "conftest$ac_exeext"'
19139 { (eval echo "$as_me:19139: \"$ac_try\"") >&5
19140 (eval $ac_try) 2>&5
19141 ac_status=$?
19142 echo "$as_me:19142: \$? = $ac_status" >&5
19143 (exit "$ac_status"); }; }; then
19144 ac_cv_lib_rt_clock_gettime=yes
19145 else
19146 echo "$as_me: failed program was:" >&5
19147 cat "conftest.$ac_ext" >&5
19148 ac_cv_lib_rt_clock_gettime=no
19149 fi
19150 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19151 LIBS=$ac_check_lib_save_LIBS
19152 fi
19153 echo "$as_me:19153: result: $ac_cv_lib_rt_clock_gettime" >&5
19154 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
19155 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
19156 LIBS="-lrt $LIBS"
19157 cf_cv_test_clock_gettime=yes
19158 else
19159 cf_cv_test_clock_gettime=no
19160 fi
19161
19162 fi
19163
19164 if test "$cf_cv_test_clock_gettime" = yes ; then
19165 echo "$as_me:19165: checking if clock_gettime links" >&5
19166 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
19167 if test "${cf_cv_func_clock_gettime+set}" = set; then
19168 echo $ECHO_N "(cached) $ECHO_C" >&6
19169 else
19170
19171 cat >"conftest.$ac_ext" <<_ACEOF
19172 #line 19172 "configure"
19173 #include "confdefs.h"
19174
19175 $ac_includes_default
19176 #include <time.h>
19177
19178 int
19179 main (void)
19180 {
19181 struct timespec ts;
19182 int rc = clock_gettime(CLOCK_REALTIME, &ts)
19183 + clock_gettime(CLOCK_MONOTONIC, &ts);
19184 (void) rc; (void)ts
19185 ;
19186 return 0;
19187 }
19188 _ACEOF
19189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19190 if { (eval echo "$as_me:19190: \"$ac_link\"") >&5
19191 (eval $ac_link) 2>&5
19192 ac_status=$?
19193 echo "$as_me:19193: \$? = $ac_status" >&5
19194 (exit "$ac_status"); } &&
19195 { ac_try='test -s "conftest$ac_exeext"'
19196 { (eval echo "$as_me:19196: \"$ac_try\"") >&5
19197 (eval $ac_try) 2>&5
19198 ac_status=$?
19199 echo "$as_me:19199: \$? = $ac_status" >&5
19200 (exit "$ac_status"); }; }; then
19201 cf_cv_func_clock_gettime=yes
19202 else
19203 echo "$as_me: failed program was:" >&5
19204 cat "conftest.$ac_ext" >&5
19205 cf_cv_func_clock_gettime=no
19206 fi
19207 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19208
19209 fi
19210 echo "$as_me:19210: result: $cf_cv_func_clock_gettime" >&5
19211 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
19212 else
19213 cf_cv_func_clock_gettime=no
19214 fi
19215
19216 if test "$cf_cv_func_clock_gettime" = yes
19217 then
19218
19219 cat >>confdefs.h <<\EOF
19220 #define HAVE_CLOCK_GETTIME 1
19221 EOF
19222
19223 else
19224 echo "$as_me:19224: checking for gettimeofday" >&5
19225 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
19226 if test "${ac_cv_func_gettimeofday+set}" = set; then
19227 echo $ECHO_N "(cached) $ECHO_C" >&6
19228 else
19229 cat >"conftest.$ac_ext" <<_ACEOF
19230 #line 19230 "configure"
19231 #include "confdefs.h"
19232 #define gettimeofday autoconf_temporary
19233 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19234 #undef gettimeofday
19235
19236 #ifdef __cplusplus
19237 extern "C"
19238 #endif
19239
19240 /* We use char because int might match the return type of a gcc2
19241 builtin and then its argument prototype would still apply. */
19242 char gettimeofday (void);
19243
19244 int
19245 main (void)
19246 {
19247
19248 /* The GNU C library defines stubs for functions which it implements
19249 to always fail with ENOSYS. Some functions are actually named
19250 something starting with __ and the normal name is an alias. */
19251 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
19252 #error found stub for gettimeofday
19253 #endif
19254
19255 return gettimeofday ();
19256 ;
19257 return 0;
19258 }
19259 _ACEOF
19260 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19261 if { (eval echo "$as_me:19261: \"$ac_link\"") >&5
19262 (eval $ac_link) 2>&5
19263 ac_status=$?
19264 echo "$as_me:19264: \$? = $ac_status" >&5
19265 (exit "$ac_status"); } &&
19266 { ac_try='test -s "conftest$ac_exeext"'
19267 { (eval echo "$as_me:19267: \"$ac_try\"") >&5
19268 (eval $ac_try) 2>&5
19269 ac_status=$?
19270 echo "$as_me:19270: \$? = $ac_status" >&5
19271 (exit "$ac_status"); }; }; then
19272 ac_cv_func_gettimeofday=yes
19273 else
19274 echo "$as_me: failed program was:" >&5
19275 cat "conftest.$ac_ext" >&5
19276 ac_cv_func_gettimeofday=no
19277 fi
19278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19279 fi
19280 echo "$as_me:19280: result: $ac_cv_func_gettimeofday" >&5
19281 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
19282 if test "$ac_cv_func_gettimeofday" = yes; then
19283
19284 cat >>confdefs.h <<\EOF
19285 #define HAVE_GETTIMEOFDAY 1
19286 EOF
19287
19288 else
19289
19290 echo "$as_me:19290: checking for gettimeofday in -lbsd" >&5
19291 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
19292 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
19293 echo $ECHO_N "(cached) $ECHO_C" >&6
19294 else
19295 ac_check_lib_save_LIBS=$LIBS
19296 LIBS="-lbsd $LIBS"
19297 cat >"conftest.$ac_ext" <<_ACEOF
19298 #line 19298 "configure"
19299 #include "confdefs.h"
19300
19301 /* Override any gcc2 internal prototype to avoid an error. */
19302 #ifdef __cplusplus
19303 extern "C"
19304 #endif
19305 /* We use char because int might match the return type of a gcc2
19306 builtin and then its argument prototype would still apply. */
19307 char gettimeofday (void);
19308 int
19309 main (void)
19310 {
19311 gettimeofday ();
19312 ;
19313 return 0;
19314 }
19315 _ACEOF
19316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19317 if { (eval echo "$as_me:19317: \"$ac_link\"") >&5
19318 (eval $ac_link) 2>&5
19319 ac_status=$?
19320 echo "$as_me:19320: \$? = $ac_status" >&5
19321 (exit "$ac_status"); } &&
19322 { ac_try='test -s "conftest$ac_exeext"'
19323 { (eval echo "$as_me:19323: \"$ac_try\"") >&5
19324 (eval $ac_try) 2>&5
19325 ac_status=$?
19326 echo "$as_me:19326: \$? = $ac_status" >&5
19327 (exit "$ac_status"); }; }; then
19328 ac_cv_lib_bsd_gettimeofday=yes
19329 else
19330 echo "$as_me: failed program was:" >&5
19331 cat "conftest.$ac_ext" >&5
19332 ac_cv_lib_bsd_gettimeofday=no
19333 fi
19334 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19335 LIBS=$ac_check_lib_save_LIBS
19336 fi
19337 echo "$as_me:19337: result: $ac_cv_lib_bsd_gettimeofday" >&5
19338 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
19339 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
19340
19341 cat >>confdefs.h <<\EOF
19342 #define HAVE_GETTIMEOFDAY 1
19343 EOF
19344
19345 cf_add_libs="$LIBS"
19346 # reverse order
19347 cf_add_0lib=
19348 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19349 # filter duplicates
19350 for cf_add_1lib in $cf_add_0lib; do
19351 for cf_add_2lib in $cf_add_libs; do
19352 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19353 cf_add_1lib=
19354 break
19355 fi
19356 done
19357 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19358 done
19359 LIBS="$cf_add_libs"
19360
19361 fi
19362
19363 fi
19364 fi
19365
19366 for ac_func in \
19367 getopt \
19368 snprintf \
19369 strdup \
19370 strstr \
19371 tsearch \
19372
19373 do
19374 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19375 echo "$as_me:19375: checking for $ac_func" >&5
19376 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19377 if eval "test \"\${$as_ac_var+set}\" = set"; then
19378 echo $ECHO_N "(cached) $ECHO_C" >&6
19379 else
19380 cat >"conftest.$ac_ext" <<_ACEOF
19381 #line 19381 "configure"
19382 #include "confdefs.h"
19383 #define $ac_func autoconf_temporary
19384 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19385 #undef $ac_func
19386
19387 #ifdef __cplusplus
19388 extern "C"
19389 #endif
19390
19391 /* We use char because int might match the return type of a gcc2
19392 builtin and then its argument prototype would still apply. */
19393 char $ac_func (void);
19394
19395 int
19396 main (void)
19397 {
19398
19399 /* The GNU C library defines stubs for functions which it implements
19400 to always fail with ENOSYS. Some functions are actually named
19401 something starting with __ and the normal name is an alias. */
19402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19403 #error found stub for $ac_func
19404 #endif
19405
19406 return $ac_func ();
19407 ;
19408 return 0;
19409 }
19410 _ACEOF
19411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19412 if { (eval echo "$as_me:19412: \"$ac_link\"") >&5
19413 (eval $ac_link) 2>&5
19414 ac_status=$?
19415 echo "$as_me:19415: \$? = $ac_status" >&5
19416 (exit "$ac_status"); } &&
19417 { ac_try='test -s "conftest$ac_exeext"'
19418 { (eval echo "$as_me:19418: \"$ac_try\"") >&5
19419 (eval $ac_try) 2>&5
19420 ac_status=$?
19421 echo "$as_me:19421: \$? = $ac_status" >&5
19422 (exit "$ac_status"); }; }; then
19423 eval "$as_ac_var=yes"
19424 else
19425 echo "$as_me: failed program was:" >&5
19426 cat "conftest.$ac_ext" >&5
19427 eval "$as_ac_var=no"
19428 fi
19429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19430 fi
19431 echo "$as_me:19431: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19432 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19433 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19434 cat >>confdefs.h <<EOF
19435 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19436 EOF
19437
19438 fi
19439 done
19440
19441 # use a compile-check to work with ncurses*-config and subdirectory includes
19442 echo "$as_me:19442: checking if we can use termcap.h" >&5
19443 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
19444 if test "${cf_cv_have_termcap_h+set}" = set; then
19445 echo $ECHO_N "(cached) $ECHO_C" >&6
19446 else
19447
19448 cat >"conftest.$ac_ext" <<_ACEOF
19449 #line 19449 "configure"
19450 #include "confdefs.h"
19451
19452 #include <curses.h>
19453 #ifdef NCURSES_VERSION
19454 #undef NCURSES_VERSION
19455 #endif
19456 #include <termcap.h>
19457 #ifndef NCURSES_VERSION
19458 #error wrong header
19459 #endif
19460
19461 int
19462 main (void)
19463 {
19464 return 0;
19465 ;
19466 return 0;
19467 }
19468 _ACEOF
19469 rm -f "conftest.$ac_objext"
19470 if { (eval echo "$as_me:19470: \"$ac_compile\"") >&5
19471 (eval $ac_compile) 2>&5
19472 ac_status=$?
19473 echo "$as_me:19473: \$? = $ac_status" >&5
19474 (exit "$ac_status"); } &&
19475 { ac_try='test -s "conftest.$ac_objext"'
19476 { (eval echo "$as_me:19476: \"$ac_try\"") >&5
19477 (eval $ac_try) 2>&5
19478 ac_status=$?
19479 echo "$as_me:19479: \$? = $ac_status" >&5
19480 (exit "$ac_status"); }; }; then
19481 cf_cv_have_termcap_h=yes
19482 else
19483 echo "$as_me: failed program was:" >&5
19484 cat "conftest.$ac_ext" >&5
19485 cf_cv_have_termcap_h=no
19486 fi
19487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19488 fi
19489 echo "$as_me:19489: result: $cf_cv_have_termcap_h" >&5
19490 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
19491 if test "x$cf_cv_have_termcap_h" = xyes
19492 then
19493
19494 cat >>confdefs.h <<\EOF
19495 #define HAVE_TERMCAP_H 1
19496 EOF
19497
19498 else
19499 echo "$as_me:19499: checking if we can use ncurses/termcap.h" >&5
19500 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
19501 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
19502 echo $ECHO_N "(cached) $ECHO_C" >&6
19503 else
19504
19505 cat >"conftest.$ac_ext" <<_ACEOF
19506 #line 19506 "configure"
19507 #include "confdefs.h"
19508
19509 #include <ncurses/curses.h>
19510 #ifdef NCURSES_VERSION
19511 #undef NCURSES_VERSION
19512 #endif
19513 #include <ncurses/termcap.h>
19514 #ifndef NCURSES_VERSION
19515 #error wrong header
19516 #endif
19517
19518 int
19519 main (void)
19520 {
19521 return 0;
19522 ;
19523 return 0;
19524 }
19525 _ACEOF
19526 rm -f "conftest.$ac_objext"
19527 if { (eval echo "$as_me:19527: \"$ac_compile\"") >&5
19528 (eval $ac_compile) 2>&5
19529 ac_status=$?
19530 echo "$as_me:19530: \$? = $ac_status" >&5
19531 (exit "$ac_status"); } &&
19532 { ac_try='test -s "conftest.$ac_objext"'
19533 { (eval echo "$as_me:19533: \"$ac_try\"") >&5
19534 (eval $ac_try) 2>&5
19535 ac_status=$?
19536 echo "$as_me:19536: \$? = $ac_status" >&5
19537 (exit "$ac_status"); }; }; then
19538 cf_cv_have_ncurses_termcap_h=yes
19539 else
19540 echo "$as_me: failed program was:" >&5
19541 cat "conftest.$ac_ext" >&5
19542 cf_cv_have_ncurses_termcap_h=no
19543 fi
19544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19545 fi
19546 echo "$as_me:19546: result: $cf_cv_have_ncurses_termcap_h" >&5
19547 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
19548 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
19549 cat >>confdefs.h <<\EOF
19550 #define HAVE_NCURSES_TERMCAP_H 1
19551 EOF
19552
19553 fi
19554
19555 if test "x$ac_cv_func_getopt" = xno; then
19556 { { echo "$as_me:19556: error: getopt is required for building programs" >&5
19557 echo "$as_me: error: getopt is required for building programs" >&2;}
19558 { (exit 1); exit 1; }; }
19559 fi
19560
19561 if test "$cf_enable_widec" = yes; then
19562
19563 for ac_func in \
19564 mblen \
19565 mbrlen \
19566 mbrtowc \
19567 mbsrtowcs \
19568 mbstowcs \
19569 mbtowc \
19570 wcsrtombs \
19571 wcstombs \
19572 wcwidth \
19573
19574 do
19575 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19576 echo "$as_me:19576: checking for $ac_func" >&5
19577 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19578 if eval "test \"\${$as_ac_var+set}\" = set"; then
19579 echo $ECHO_N "(cached) $ECHO_C" >&6
19580 else
19581 cat >"conftest.$ac_ext" <<_ACEOF
19582 #line 19582 "configure"
19583 #include "confdefs.h"
19584 #define $ac_func autoconf_temporary
19585 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19586 #undef $ac_func
19587
19588 #ifdef __cplusplus
19589 extern "C"
19590 #endif
19591
19592 /* We use char because int might match the return type of a gcc2
19593 builtin and then its argument prototype would still apply. */
19594 char $ac_func (void);
19595
19596 int
19597 main (void)
19598 {
19599
19600 /* The GNU C library defines stubs for functions which it implements
19601 to always fail with ENOSYS. Some functions are actually named
19602 something starting with __ and the normal name is an alias. */
19603 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19604 #error found stub for $ac_func
19605 #endif
19606
19607 return $ac_func ();
19608 ;
19609 return 0;
19610 }
19611 _ACEOF
19612 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19613 if { (eval echo "$as_me:19613: \"$ac_link\"") >&5
19614 (eval $ac_link) 2>&5
19615 ac_status=$?
19616 echo "$as_me:19616: \$? = $ac_status" >&5
19617 (exit "$ac_status"); } &&
19618 { ac_try='test -s "conftest$ac_exeext"'
19619 { (eval echo "$as_me:19619: \"$ac_try\"") >&5
19620 (eval $ac_try) 2>&5
19621 ac_status=$?
19622 echo "$as_me:19622: \$? = $ac_status" >&5
19623 (exit "$ac_status"); }; }; then
19624 eval "$as_ac_var=yes"
19625 else
19626 echo "$as_me: failed program was:" >&5
19627 cat "conftest.$ac_ext" >&5
19628 eval "$as_ac_var=no"
19629 fi
19630 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19631 fi
19632 echo "$as_me:19632: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19633 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19634 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19635 cat >>confdefs.h <<EOF
19636 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19637 EOF
19638
19639 fi
19640 done
19641
19642 fi
19643
19644 echo "$as_me:19644: checking definition to turn on extended curses functions" >&5
19645 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
19646 if test "${cf_cv_need_xopen_extension+set}" = set; then
19647 echo $ECHO_N "(cached) $ECHO_C" >&6
19648 else
19649
19650 cf_cv_need_xopen_extension=unknown
19651 cat >"conftest.$ac_ext" <<_ACEOF
19652 #line 19652 "configure"
19653 #include "confdefs.h"
19654
19655 $ac_includes_default
19656 #include <${cf_cv_ncurses_header:-curses.h}>
19657 int
19658 main (void)
19659 {
19660
19661 #if defined(NCURSES_VERSION_PATCH)
19662 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
19663 #error disallow ncurses versions between 2020/04/03 and 2010/05/01
19664 #endif
19665 #endif
19666 #ifdef NCURSES_WIDECHAR
19667 #error prefer to fall-through on the second checks
19668 #endif
19669 static char dummy[10];
19670 cchar_t check;
19671 int check2 = curs_set((int)sizeof(check));
19672 long x = winnstr(stdscr, dummy, 5);
19673 int x1, y1;
19674 (void)check2;
19675 getbegyx(stdscr, y1, x1);
19676 (void)x;
19677 (void)y1;
19678 (void)x1;
19679
19680 ;
19681 return 0;
19682 }
19683 _ACEOF
19684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19685 if { (eval echo "$as_me:19685: \"$ac_link\"") >&5
19686 (eval $ac_link) 2>&5
19687 ac_status=$?
19688 echo "$as_me:19688: \$? = $ac_status" >&5
19689 (exit "$ac_status"); } &&
19690 { ac_try='test -s "conftest$ac_exeext"'
19691 { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692 (eval $ac_try) 2>&5
19693 ac_status=$?
19694 echo "$as_me:19694: \$? = $ac_status" >&5
19695 (exit "$ac_status"); }; }; then
19696 cf_cv_need_xopen_extension=none
19697 else
19698 echo "$as_me: failed program was:" >&5
19699 cat "conftest.$ac_ext" >&5
19700
19701 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
19702 do
19703 cat >"conftest.$ac_ext" <<_ACEOF
19704 #line 19704 "configure"
19705 #include "confdefs.h"
19706
19707 #define $cf_try_xopen_extension 1
19708 $ac_includes_default
19709 #include <${cf_cv_ncurses_header:-curses.h}>
19710 int
19711 main (void)
19712 {
19713
19714 static char dummy[10];
19715 cchar_t check;
19716 int check2 = curs_set((int)sizeof(check));
19717 long x = winnstr(stdscr, dummy, 5);
19718 int x1, y1;
19719 getbegyx(stdscr, y1, x1);
19720 (void)check2;
19721 (void)x;
19722 (void)y1;
19723 (void)x1;
19724
19725 ;
19726 return 0;
19727 }
19728 _ACEOF
19729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19730 if { (eval echo "$as_me:19730: \"$ac_link\"") >&5
19731 (eval $ac_link) 2>&5
19732 ac_status=$?
19733 echo "$as_me:19733: \$? = $ac_status" >&5
19734 (exit "$ac_status"); } &&
19735 { ac_try='test -s "conftest$ac_exeext"'
19736 { (eval echo "$as_me:19736: \"$ac_try\"") >&5
19737 (eval $ac_try) 2>&5
19738 ac_status=$?
19739 echo "$as_me:19739: \$? = $ac_status" >&5
19740 (exit "$ac_status"); }; }; then
19741 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
19742 else
19743 echo "$as_me: failed program was:" >&5
19744 cat "conftest.$ac_ext" >&5
19745 fi
19746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19747 done
19748
19749 fi
19750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19751
19752 fi
19753 echo "$as_me:19753: result: $cf_cv_need_xopen_extension" >&5
19754 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
19755
19756 case "$cf_cv_need_xopen_extension" in
19757 (*_*)
19758
19759 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19760 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
19761
19762 ;;
19763 esac
19764
19765 echo "$as_me:19765: checking for term.h" >&5
19766 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
19767 if test "${cf_cv_term_header+set}" = set; then
19768 echo $ECHO_N "(cached) $ECHO_C" >&6
19769 else
19770
19771 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
19772 # for <term.h> if we do not find the variant.
19773
19774 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
19775
19776 case "${cf_cv_ncurses_header:-curses.h}" in
19777 (*/*)
19778 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
19779 cf_header_list="$cf_header_item $cf_header_list"
19780 ;;
19781 esac
19782
19783 for cf_header in $cf_header_list
19784 do
19785 cat >"conftest.$ac_ext" <<_ACEOF
19786 #line 19786 "configure"
19787 #include "confdefs.h"
19788
19789 #include <${cf_cv_ncurses_header:-curses.h}>
19790 #include <${cf_header}>
19791 int
19792 main (void)
19793 {
19794 WINDOW *x; (void)x
19795 ;
19796 return 0;
19797 }
19798 _ACEOF
19799 rm -f "conftest.$ac_objext"
19800 if { (eval echo "$as_me:19800: \"$ac_compile\"") >&5
19801 (eval $ac_compile) 2>&5
19802 ac_status=$?
19803 echo "$as_me:19803: \$? = $ac_status" >&5
19804 (exit "$ac_status"); } &&
19805 { ac_try='test -s "conftest.$ac_objext"'
19806 { (eval echo "$as_me:19806: \"$ac_try\"") >&5
19807 (eval $ac_try) 2>&5
19808 ac_status=$?
19809 echo "$as_me:19809: \$? = $ac_status" >&5
19810 (exit "$ac_status"); }; }; then
19811 cf_cv_term_header=$cf_header
19812 break
19813 else
19814 echo "$as_me: failed program was:" >&5
19815 cat "conftest.$ac_ext" >&5
19816 cf_cv_term_header=no
19817 fi
19818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19819 done
19820
19821 case "$cf_cv_term_header" in
19822 (no)
19823 # If curses is ncurses, some packagers still mess it up by trying to make
19824 # us use GNU termcap. This handles the most common case.
19825 for cf_header in ncurses/term.h ncursesw/term.h
19826 do
19827 cat >"conftest.$ac_ext" <<_ACEOF
19828 #line 19828 "configure"
19829 #include "confdefs.h"
19830
19831 #include <${cf_cv_ncurses_header:-curses.h}>
19832 #ifdef NCURSES_VERSION
19833 #include <${cf_header}>
19834 #else
19835 #error expected NCURSES_VERSION to be defined
19836 #endif
19837 int
19838 main (void)
19839 {
19840 WINDOW *x; (void)x
19841 ;
19842 return 0;
19843 }
19844 _ACEOF
19845 rm -f "conftest.$ac_objext"
19846 if { (eval echo "$as_me:19846: \"$ac_compile\"") >&5
19847 (eval $ac_compile) 2>&5
19848 ac_status=$?
19849 echo "$as_me:19849: \$? = $ac_status" >&5
19850 (exit "$ac_status"); } &&
19851 { ac_try='test -s "conftest.$ac_objext"'
19852 { (eval echo "$as_me:19852: \"$ac_try\"") >&5
19853 (eval $ac_try) 2>&5
19854 ac_status=$?
19855 echo "$as_me:19855: \$? = $ac_status" >&5
19856 (exit "$ac_status"); }; }; then
19857 cf_cv_term_header=$cf_header
19858 break
19859 else
19860 echo "$as_me: failed program was:" >&5
19861 cat "conftest.$ac_ext" >&5
19862 cf_cv_term_header=no
19863 fi
19864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19865 done
19866 ;;
19867 esac
19868
19869 fi
19870 echo "$as_me:19870: result: $cf_cv_term_header" >&5
19871 echo "${ECHO_T}$cf_cv_term_header" >&6
19872
19873 case "$cf_cv_term_header" in
19874 (term.h)
19875
19876 cat >>confdefs.h <<\EOF
19877 #define HAVE_TERM_H 1
19878 EOF
19879
19880 ;;
19881 (ncurses/term.h)
19882
19883 cat >>confdefs.h <<\EOF
19884 #define HAVE_NCURSES_TERM_H 1
19885 EOF
19886
19887 ;;
19888 (ncursesw/term.h)
19889
19890 cat >>confdefs.h <<\EOF
19891 #define HAVE_NCURSESW_TERM_H 1
19892 EOF
19893
19894 ;;
19895 esac
19896
19897 echo "$as_me:19897: checking for unctrl.h" >&5
19898 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
19899 if test "${cf_cv_unctrl_header+set}" = set; then
19900 echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902
19903 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
19904 # for <unctrl.h> if we do not find the variant.
19905
19906 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
19907
19908 case "${cf_cv_ncurses_header:-curses.h}" in
19909 (*/*)
19910 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
19911 cf_header_list="$cf_header_item $cf_header_list"
19912 ;;
19913 esac
19914
19915 for cf_header in $cf_header_list
19916 do
19917 cat >"conftest.$ac_ext" <<_ACEOF
19918 #line 19918 "configure"
19919 #include "confdefs.h"
19920
19921 #include <${cf_cv_ncurses_header:-curses.h}>
19922 #include <${cf_header}>
19923 int
19924 main (void)
19925 {
19926 WINDOW *x; (void)x
19927 ;
19928 return 0;
19929 }
19930 _ACEOF
19931 rm -f "conftest.$ac_objext"
19932 if { (eval echo "$as_me:19932: \"$ac_compile\"") >&5
19933 (eval $ac_compile) 2>&5
19934 ac_status=$?
19935 echo "$as_me:19935: \$? = $ac_status" >&5
19936 (exit "$ac_status"); } &&
19937 { ac_try='test -s "conftest.$ac_objext"'
19938 { (eval echo "$as_me:19938: \"$ac_try\"") >&5
19939 (eval $ac_try) 2>&5
19940 ac_status=$?
19941 echo "$as_me:19941: \$? = $ac_status" >&5
19942 (exit "$ac_status"); }; }; then
19943 cf_cv_unctrl_header=$cf_header
19944 break
19945 else
19946 echo "$as_me: failed program was:" >&5
19947 cat "conftest.$ac_ext" >&5
19948 cf_cv_unctrl_header=no
19949 fi
19950 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19951 done
19952
19953 fi
19954 echo "$as_me:19954: result: $cf_cv_unctrl_header" >&5
19955 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
19956
19957 case "$cf_cv_unctrl_header" in
19958 (no)
19959 { echo "$as_me:19959: WARNING: unctrl.h header not found" >&5
19960 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
19961 ;;
19962 esac
19963
19964 case "$cf_cv_unctrl_header" in
19965 (unctrl.h)
19966
19967 cat >>confdefs.h <<\EOF
19968 #define HAVE_UNCTRL_H 1
19969 EOF
19970
19971 ;;
19972 (ncurses/unctrl.h)
19973
19974 cat >>confdefs.h <<\EOF
19975 #define HAVE_NCURSES_UNCTRL_H 1
19976 EOF
19977
19978 ;;
19979 (ncursesw/unctrl.h)
19980
19981 cat >>confdefs.h <<\EOF
19982 #define HAVE_NCURSESW_UNCTRL_H 1
19983 EOF
19984
19985 ;;
19986 esac
19987
19988 for cf_func in \
19989 _nc_tparm_analyze \
19990 _tracef \
19991 alloc_pair \
19992 assume_default_colors \
19993 chgat \
19994 color_content \
19995 color_set \
19996 copywin \
19997 curses_trace \
19998 delscreen \
19999 dupwin \
20000 exit_curses \
20001 exit_terminfo \
20002 filter \
20003 getbegx \
20004 getcurx \
20005 getmaxx \
20006 getnstr \
20007 getparx \
20008 getwin \
20009 halfdelay \
20010 init_extended_color \
20011 mvderwin \
20012 mvvline \
20013 mvwin \
20014 mvwvline \
20015 napms \
20016 newpad \
20017 putwin \
20018 reset_color_pairs \
20019 resize_term \
20020 resizeterm \
20021 restartterm \
20022 ripoffline \
20023 scr_dump \
20024 setupterm \
20025 slk_color \
20026 slk_init \
20027 termattrs \
20028 termname \
20029 tgetent \
20030 tigetnum \
20031 tigetstr \
20032 tiparm \
20033 tiparm_s \
20034 tiscan_s \
20035 tputs_sp \
20036 typeahead \
20037 unget_wch \
20038 use_default_colors \
20039 use_env \
20040 use_extended_names \
20041 use_screen \
20042 use_window \
20043 vid_puts \
20044 vidputs \
20045 vsscanf \
20046 vw_printw \
20047 wchgat \
20048 winsdelln \
20049 winsstr \
20050 wresize \
20051 wsyncdown \
20052
20053 do
20054
20055 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20056
20057 echo "$as_me:20057: checking for ${cf_func}" >&5
20058 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
20059
20060 echo "${as_me:-configure}:20060: testing ${cf_func} ..." 1>&5
20061
20062 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
20063 echo $ECHO_N "(cached) $ECHO_C" >&6
20064 else
20065
20066 eval cf_result='$ac_cv_func_'$cf_func
20067 if test ".$cf_result" != ".no"; then
20068 cat >"conftest.$ac_ext" <<_ACEOF
20069 #line 20069 "configure"
20070 #include "confdefs.h"
20071
20072 #ifdef HAVE_XCURSES
20073 #include <xcurses.h>
20074 char * XCursesProgramName = "test";
20075 #else
20076 #include <${cf_cv_ncurses_header:-curses.h}>
20077 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20078 #include <ncursesw/term.h>
20079 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20080 #include <ncurses/term.h>
20081 #elif defined(HAVE_TERM_H)
20082 #include <term.h>
20083 #endif
20084 #endif
20085
20086 int
20087 main (void)
20088 {
20089
20090 #ifndef ${cf_func}
20091 long foo = (long)(&${cf_func});
20092 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
20093 if (foo + 1234L > 5678L)
20094 ${cf_cv_main_return:-return}(foo != 0);
20095 #endif
20096
20097 ;
20098 return 0;
20099 }
20100 _ACEOF
20101 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20102 if { (eval echo "$as_me:20102: \"$ac_link\"") >&5
20103 (eval $ac_link) 2>&5
20104 ac_status=$?
20105 echo "$as_me:20105: \$? = $ac_status" >&5
20106 (exit "$ac_status"); } &&
20107 { ac_try='test -s "conftest$ac_exeext"'
20108 { (eval echo "$as_me:20108: \"$ac_try\"") >&5
20109 (eval $ac_try) 2>&5
20110 ac_status=$?
20111 echo "$as_me:20111: \$? = $ac_status" >&5
20112 (exit "$ac_status"); }; }; then
20113 cf_result=yes
20114 else
20115 echo "$as_me: failed program was:" >&5
20116 cat "conftest.$ac_ext" >&5
20117 cf_result=no
20118 fi
20119 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20120 fi
20121 eval 'cf_cv_func_'$cf_func'="$cf_result"'
20122
20123 fi
20124
20125 # use the computed/retrieved cache-value:
20126 eval 'cf_result=$cf_cv_func_'$cf_func
20127 echo "$as_me:20127: result: $cf_result" >&5
20128 echo "${ECHO_T}$cf_result" >&6
20129 if test "$cf_result" != no; then
20130 cat >>confdefs.h <<EOF
20131 #define HAVE_${cf_tr_func} 1
20132 EOF
20133
20134 fi
20135 done
20136
20137 for cf_func in tputs
20138 do
20139
20140 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20141
20142 echo "$as_me:20142: checking for ${cf_func}" >&5
20143 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
20144
20145 echo "${as_me:-configure}:20145: testing ${cf_func} ..." 1>&5
20146
20147 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
20148 echo $ECHO_N "(cached) $ECHO_C" >&6
20149 else
20150
20151 eval cf_result='$ac_cv_func_'$cf_func
20152 if test ".$cf_result" != ".no"; then
20153 cat >"conftest.$ac_ext" <<_ACEOF
20154 #line 20154 "configure"
20155 #include "confdefs.h"
20156
20157 #ifdef HAVE_XCURSES
20158 #include <xcurses.h>
20159 char * XCursesProgramName = "test";
20160 #else
20161 #include <${cf_cv_ncurses_header:-curses.h}>
20162 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20163 #include <ncursesw/term.h>
20164 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20165 #include <ncurses/term.h>
20166 #elif defined(HAVE_TERM_H)
20167 #include <term.h>
20168 #endif
20169 #endif
20170
20171 int
20172 main (void)
20173 {
20174
20175 #ifndef ${cf_func}
20176 long foo = (long)(&${cf_func});
20177 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
20178 if (foo + 1234L > 5678L)
20179 ${cf_cv_main_return:-return}(foo != 0);
20180 #endif
20181
20182 ;
20183 return 0;
20184 }
20185 _ACEOF
20186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20187 if { (eval echo "$as_me:20187: \"$ac_link\"") >&5
20188 (eval $ac_link) 2>&5
20189 ac_status=$?
20190 echo "$as_me:20190: \$? = $ac_status" >&5
20191 (exit "$ac_status"); } &&
20192 { ac_try='test -s "conftest$ac_exeext"'
20193 { (eval echo "$as_me:20193: \"$ac_try\"") >&5
20194 (eval $ac_try) 2>&5
20195 ac_status=$?
20196 echo "$as_me:20196: \$? = $ac_status" >&5
20197 (exit "$ac_status"); }; }; then
20198 cf_result=yes
20199 else
20200 echo "$as_me: failed program was:" >&5
20201 cat "conftest.$ac_ext" >&5
20202 cf_result=no
20203 fi
20204 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20205 fi
20206 eval 'cf_cv_func_'$cf_func'="$cf_result"'
20207
20208 fi
20209
20210 # use the computed/retrieved cache-value:
20211 eval 'cf_result=$cf_cv_func_'$cf_func
20212 echo "$as_me:20212: result: $cf_result" >&5
20213 echo "${ECHO_T}$cf_result" >&6
20214 if test "$cf_result" != no; then
20215 cat >>confdefs.h <<EOF
20216 #define HAVE_${cf_tr_func} 1
20217 EOF
20218
20219 fi
20220 done
20221
20222 if test "x$cf_cv_func_tputs" = xyes
20223 then
20224 cf_done=no
20225 for cf_arg in int char
20226 do
20227 for cf_ret in int void
20228 do
20229 if test "$cf_ret" = void
20230 then
20231 cf_return="/* nothing */"
20232 else
20233 cf_return="return value"
20234 fi
20235 cat >"conftest.$ac_ext" <<_ACEOF
20236 #line 20236 "configure"
20237 #include "confdefs.h"
20238
20239 #include <${cf_cv_ncurses_header:-curses.h}>
20240 #include <$cf_cv_term_header>
20241
20242 static $cf_ret outc($cf_arg value) { $cf_return; }
20243
20244 int
20245 main (void)
20246 {
20247
20248 tputs("hello", 0, outc);
20249 ${cf_cv_main_return:-return}(0);
20250
20251 ;
20252 return 0;
20253 }
20254 _ACEOF
20255 rm -f "conftest.$ac_objext"
20256 if { (eval echo "$as_me:20256: \"$ac_compile\"") >&5
20257 (eval $ac_compile) 2>&5
20258 ac_status=$?
20259 echo "$as_me:20259: \$? = $ac_status" >&5
20260 (exit "$ac_status"); } &&
20261 { ac_try='test -s "conftest.$ac_objext"'
20262 { (eval echo "$as_me:20262: \"$ac_try\"") >&5
20263 (eval $ac_try) 2>&5
20264 ac_status=$?
20265 echo "$as_me:20265: \$? = $ac_status" >&5
20266 (exit "$ac_status"); }; }; then
20267
20268 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
20269
20270 echo "${as_me:-configure}:20270: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
20271
20272 cat >>confdefs.h <<EOF
20273 #define TPUTS_ARG $cf_arg
20274 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
20275 #define TPUTS_RETURN(value) $cf_return
20276 EOF
20277 cf_done=yes
20278 break
20279
20280 else
20281 echo "$as_me: failed program was:" >&5
20282 cat "conftest.$ac_ext" >&5
20283 fi
20284 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20285 done
20286 test "$cf_done" = yes && break
20287 done
20288 fi
20289
20290 echo "$as_me:20290: checking for ncurses extended functions" >&5
20291 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
20292 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
20293 echo $ECHO_N "(cached) $ECHO_C" >&6
20294 else
20295
20296 cat >"conftest.$ac_ext" <<_ACEOF
20297 #line 20297 "configure"
20298 #include "confdefs.h"
20299
20300 #include <${cf_cv_ncurses_header:-curses.h}>
20301 int
20302 main (void)
20303 {
20304
20305 int x = NCURSES_EXT_FUNCS;
20306 ${cf_cv_main_return:-return}(x != 0);
20307
20308 ;
20309 return 0;
20310 }
20311 _ACEOF
20312 rm -f "conftest.$ac_objext"
20313 if { (eval echo "$as_me:20313: \"$ac_compile\"") >&5
20314 (eval $ac_compile) 2>&5
20315 ac_status=$?
20316 echo "$as_me:20316: \$? = $ac_status" >&5
20317 (exit "$ac_status"); } &&
20318 { ac_try='test -s "conftest.$ac_objext"'
20319 { (eval echo "$as_me:20319: \"$ac_try\"") >&5
20320 (eval $ac_try) 2>&5
20321 ac_status=$?
20322 echo "$as_me:20322: \$? = $ac_status" >&5
20323 (exit "$ac_status"); }; }; then
20324 cf_cv_ncurses_ext_funcs=defined
20325 else
20326 echo "$as_me: failed program was:" >&5
20327 cat "conftest.$ac_ext" >&5
20328
20329 cat >"conftest.$ac_ext" <<_ACEOF
20330 #line 20330 "configure"
20331 #include "confdefs.h"
20332
20333 #include <${cf_cv_ncurses_header:-curses.h}>
20334 int
20335 main (void)
20336 {
20337
20338 (void) assume_default_colors (0, 0);
20339 (void) curses_version ();
20340 (void) define_key (0, 0);
20341 (void) is_term_resized (0, 0);
20342 (void) key_defined (0);
20343 (void) keybound (0, 0);
20344 (void) keyok (0, 0);
20345 (void) resize_term (0, 0);
20346 (void) resizeterm (0, 0);
20347 (void) use_default_colors ();
20348 (void) use_extended_names (0);
20349 (void) wresize (NULL, 0, 0);
20350 ;
20351 return 0;
20352 }
20353 _ACEOF
20354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20355 if { (eval echo "$as_me:20355: \"$ac_link\"") >&5
20356 (eval $ac_link) 2>&5
20357 ac_status=$?
20358 echo "$as_me:20358: \$? = $ac_status" >&5
20359 (exit "$ac_status"); } &&
20360 { ac_try='test -s "conftest$ac_exeext"'
20361 { (eval echo "$as_me:20361: \"$ac_try\"") >&5
20362 (eval $ac_try) 2>&5
20363 ac_status=$?
20364 echo "$as_me:20364: \$? = $ac_status" >&5
20365 (exit "$ac_status"); }; }; then
20366 cf_cv_ncurses_ext_funcs=yes
20367 else
20368 echo "$as_me: failed program was:" >&5
20369 cat "conftest.$ac_ext" >&5
20370 cf_cv_ncurses_ext_funcs=no
20371 fi
20372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20373
20374 fi
20375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20376
20377 fi
20378 echo "$as_me:20378: result: $cf_cv_ncurses_ext_funcs" >&5
20379 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
20380 test "$cf_cv_ncurses_ext_funcs" = yes &&
20381 cat >>confdefs.h <<\EOF
20382 #define NCURSES_EXT_FUNCS 1
20383 EOF
20384
20385 if test "$cf_enable_widec" = yes
20386 then
20387 # workaround for systems with ncurses before 20111029, due to change of
20388 # feature test macro from _XPG5 to _XOPEN_SOURCE
20389 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
20390 then
20391 cf_define_xpg5=no
20392 echo "$as_me:20392: checking if _XPG5 should be defined to enable wide-characters" >&5
20393 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
20394
20395 cat >"conftest.$ac_ext" <<_ACEOF
20396 #line 20396 "configure"
20397 #include "confdefs.h"
20398
20399 #include <${cf_cv_ncurses_header:-curses.h}>
20400 int
20401 main (void)
20402 {
20403 int x = _XPG5; (void) x
20404 ;
20405 return 0;
20406 }
20407 _ACEOF
20408 rm -f "conftest.$ac_objext"
20409 if { (eval echo "$as_me:20409: \"$ac_compile\"") >&5
20410 (eval $ac_compile) 2>&5
20411 ac_status=$?
20412 echo "$as_me:20412: \$? = $ac_status" >&5
20413 (exit "$ac_status"); } &&
20414 { ac_try='test -s "conftest.$ac_objext"'
20415 { (eval echo "$as_me:20415: \"$ac_try\"") >&5
20416 (eval $ac_try) 2>&5
20417 ac_status=$?
20418 echo "$as_me:20418: \$? = $ac_status" >&5
20419 (exit "$ac_status"); }; }; then
20420 :
20421 else
20422 echo "$as_me: failed program was:" >&5
20423 cat "conftest.$ac_ext" >&5
20424 cf_save_cppflags="$CPPFLAGS"
20425 CPPFLAGS="$CPPFLAGS -D_XPG5"
20426 cat >"conftest.$ac_ext" <<_ACEOF
20427 #line 20427 "configure"
20428 #include "confdefs.h"
20429
20430 #include <${cf_cv_ncurses_header:-curses.h}>
20431 int
20432 main (void)
20433 {
20434 int x = _XPG5; (void) x
20435 ;
20436 return 0;
20437 }
20438 _ACEOF
20439 rm -f "conftest.$ac_objext"
20440 if { (eval echo "$as_me:20440: \"$ac_compile\"") >&5
20441 (eval $ac_compile) 2>&5
20442 ac_status=$?
20443 echo "$as_me:20443: \$? = $ac_status" >&5
20444 (exit "$ac_status"); } &&
20445 { ac_try='test -s "conftest.$ac_objext"'
20446 { (eval echo "$as_me:20446: \"$ac_try\"") >&5
20447 (eval $ac_try) 2>&5
20448 ac_status=$?
20449 echo "$as_me:20449: \$? = $ac_status" >&5
20450 (exit "$ac_status"); }; }; then
20451 cf_define_xpg5=yes
20452 else
20453 echo "$as_me: failed program was:" >&5
20454 cat "conftest.$ac_ext" >&5
20455 fi
20456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20457 CPPFLAGS="$cf_save_cppflags"
20458 fi
20459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20460 echo "$as_me:20460: result: $cf_define_xpg5" >&5
20461 echo "${ECHO_T}$cf_define_xpg5" >&6
20462
20463 if test "$cf_define_xpg5" = yes
20464 then
20465 CPPFLAGS="$CPPFLAGS -D_XPG5"
20466 fi
20467 fi
20468
20469 echo "$as_me:20469: checking for wide-character functions" >&5
20470 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
20471 if test "${cf_cv_widechar_funcs+set}" = set; then
20472 echo $ECHO_N "(cached) $ECHO_C" >&6
20473 else
20474
20475 cat >"conftest.$ac_ext" <<_ACEOF
20476 #line 20476 "configure"
20477 #include "confdefs.h"
20478
20479 #include <${cf_cv_ncurses_header:-curses.h}>
20480 int
20481 main (void)
20482 {
20483
20484 static wchar_t src_wchar[2];
20485 static cchar_t dst_cchar;
20486 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
20487
20488 ;
20489 return 0;
20490 }
20491 _ACEOF
20492 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20493 if { (eval echo "$as_me:20493: \"$ac_link\"") >&5
20494 (eval $ac_link) 2>&5
20495 ac_status=$?
20496 echo "$as_me:20496: \$? = $ac_status" >&5
20497 (exit "$ac_status"); } &&
20498 { ac_try='test -s "conftest$ac_exeext"'
20499 { (eval echo "$as_me:20499: \"$ac_try\"") >&5
20500 (eval $ac_try) 2>&5
20501 ac_status=$?
20502 echo "$as_me:20502: \$? = $ac_status" >&5
20503 (exit "$ac_status"); }; }; then
20504 cf_cv_widechar_funcs=yes
20505 else
20506 echo "$as_me: failed program was:" >&5
20507 cat "conftest.$ac_ext" >&5
20508 cf_cv_widechar_funcs=no
20509 fi
20510 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20511
20512 fi
20513 echo "$as_me:20513: result: $cf_cv_widechar_funcs" >&5
20514 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
20515 if test "$cf_cv_widechar_funcs" != no ; then
20516
20517 cat >>confdefs.h <<\EOF
20518 #define USE_WIDEC_SUPPORT 1
20519 EOF
20520
20521 else
20522 cat >>confdefs.h <<\EOF
20523 #define USE_WIDEC_SUPPORT 0
20524 EOF
20525
20526 fi
20527 else
20528 cat >>confdefs.h <<\EOF
20529 #define USE_WIDEC_SUPPORT 0
20530 EOF
20531
20532 fi
20533
20534 echo "$as_me:20534: checking if $cf_cv_screen library uses pthreads" >&5
20535 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
20536 if test "${cf_cv_use_pthreads+set}" = set; then
20537 echo $ECHO_N "(cached) $ECHO_C" >&6
20538 else
20539
20540 cat >"conftest.$ac_ext" <<_ACEOF
20541 #line 20541 "configure"
20542 #include "confdefs.h"
20543
20544 #include <${cf_cv_ncurses_header:-curses.h}>
20545 extern void _nc_init_pthreads(void);
20546
20547 int
20548 main (void)
20549 {
20550
20551 initscr();
20552 _nc_init_pthreads();
20553
20554 ;
20555 return 0;
20556 }
20557 _ACEOF
20558 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20559 if { (eval echo "$as_me:20559: \"$ac_link\"") >&5
20560 (eval $ac_link) 2>&5
20561 ac_status=$?
20562 echo "$as_me:20562: \$? = $ac_status" >&5
20563 (exit "$ac_status"); } &&
20564 { ac_try='test -s "conftest$ac_exeext"'
20565 { (eval echo "$as_me:20565: \"$ac_try\"") >&5
20566 (eval $ac_try) 2>&5
20567 ac_status=$?
20568 echo "$as_me:20568: \$? = $ac_status" >&5
20569 (exit "$ac_status"); }; }; then
20570 cf_cv_use_pthreads=yes
20571 else
20572 echo "$as_me: failed program was:" >&5
20573 cat "conftest.$ac_ext" >&5
20574 cf_cv_use_pthreads=no
20575 fi
20576 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20577
20578 fi
20579 echo "$as_me:20579: result: $cf_cv_use_pthreads" >&5
20580 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
20581 test $cf_cv_use_pthreads = yes &&
20582 cat >>confdefs.h <<\EOF
20583 #define USE_PTHREADS 1
20584 EOF
20585
20586 echo "$as_me:20586: checking if sys/time.h works with sys/select.h" >&5
20587 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20588 if test "${cf_cv_sys_time_select+set}" = set; then
20589 echo $ECHO_N "(cached) $ECHO_C" >&6
20590 else
20591
20592 cat >"conftest.$ac_ext" <<_ACEOF
20593 #line 20593 "configure"
20594 #include "confdefs.h"
20595
20596 #include <sys/types.h>
20597 #ifdef HAVE_SYS_TIME_H
20598 #include <sys/time.h>
20599 #endif
20600 #ifdef HAVE_SYS_SELECT_H
20601 #include <sys/select.h>
20602 #endif
20603
20604 int
20605 main (void)
20606 {
20607
20608 ;
20609 return 0;
20610 }
20611 _ACEOF
20612 rm -f "conftest.$ac_objext"
20613 if { (eval echo "$as_me:20613: \"$ac_compile\"") >&5
20614 (eval $ac_compile) 2>&5
20615 ac_status=$?
20616 echo "$as_me:20616: \$? = $ac_status" >&5
20617 (exit "$ac_status"); } &&
20618 { ac_try='test -s "conftest.$ac_objext"'
20619 { (eval echo "$as_me:20619: \"$ac_try\"") >&5
20620 (eval $ac_try) 2>&5
20621 ac_status=$?
20622 echo "$as_me:20622: \$? = $ac_status" >&5
20623 (exit "$ac_status"); }; }; then
20624 cf_cv_sys_time_select=yes
20625 else
20626 echo "$as_me: failed program was:" >&5
20627 cat "conftest.$ac_ext" >&5
20628 cf_cv_sys_time_select=no
20629 fi
20630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20631
20632 fi
20633
20634 echo "$as_me:20634: result: $cf_cv_sys_time_select" >&5
20635 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20636 test "$cf_cv_sys_time_select" = yes &&
20637 cat >>confdefs.h <<\EOF
20638 #define HAVE_SYS_TIME_SELECT 1
20639 EOF
20640
20641 # special check for test/ditto.c
20642
20643 echo "$as_me:20643: checking for openpty in -lutil" >&5
20644 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20645 if test "${ac_cv_lib_util_openpty+set}" = set; then
20646 echo $ECHO_N "(cached) $ECHO_C" >&6
20647 else
20648 ac_check_lib_save_LIBS=$LIBS
20649 LIBS="-lutil $LIBS"
20650 cat >"conftest.$ac_ext" <<_ACEOF
20651 #line 20651 "configure"
20652 #include "confdefs.h"
20653
20654 /* Override any gcc2 internal prototype to avoid an error. */
20655 #ifdef __cplusplus
20656 extern "C"
20657 #endif
20658 /* We use char because int might match the return type of a gcc2
20659 builtin and then its argument prototype would still apply. */
20660 char openpty (void);
20661 int
20662 main (void)
20663 {
20664 openpty ();
20665 ;
20666 return 0;
20667 }
20668 _ACEOF
20669 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20670 if { (eval echo "$as_me:20670: \"$ac_link\"") >&5
20671 (eval $ac_link) 2>&5
20672 ac_status=$?
20673 echo "$as_me:20673: \$? = $ac_status" >&5
20674 (exit "$ac_status"); } &&
20675 { ac_try='test -s "conftest$ac_exeext"'
20676 { (eval echo "$as_me:20676: \"$ac_try\"") >&5
20677 (eval $ac_try) 2>&5
20678 ac_status=$?
20679 echo "$as_me:20679: \$? = $ac_status" >&5
20680 (exit "$ac_status"); }; }; then
20681 ac_cv_lib_util_openpty=yes
20682 else
20683 echo "$as_me: failed program was:" >&5
20684 cat "conftest.$ac_ext" >&5
20685 ac_cv_lib_util_openpty=no
20686 fi
20687 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20688 LIBS=$ac_check_lib_save_LIBS
20689 fi
20690 echo "$as_me:20690: result: $ac_cv_lib_util_openpty" >&5
20691 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20692 if test "$ac_cv_lib_util_openpty" = yes; then
20693 cf_cv_lib_util=yes
20694 else
20695 cf_cv_lib_util=no
20696 fi
20697
20698 echo "$as_me:20698: checking for openpty header" >&5
20699 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20700 if test "${cf_cv_func_openpty+set}" = set; then
20701 echo $ECHO_N "(cached) $ECHO_C" >&6
20702 else
20703
20704 cf_save_LIBS="$LIBS"
20705 test "$cf_cv_lib_util" = yes && {
20706 cf_add_libs="$LIBS"
20707 # reverse order
20708 cf_add_0lib=
20709 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20710 # filter duplicates
20711 for cf_add_1lib in $cf_add_0lib; do
20712 for cf_add_2lib in $cf_add_libs; do
20713 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20714 cf_add_1lib=
20715 break
20716 fi
20717 done
20718 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20719 done
20720 LIBS="$cf_add_libs"
20721 }
20722 for cf_header in pty.h libutil.h util.h
20723 do
20724 cat >"conftest.$ac_ext" <<_ACEOF
20725 #line 20725 "configure"
20726 #include "confdefs.h"
20727
20728 #include <$cf_header>
20729
20730 int
20731 main (void)
20732 {
20733
20734 int x = openpty((int *)0, (int *)0, (char *)0,
20735 (struct termios *)0, (struct winsize *)0);
20736 (void)x;
20737
20738 ;
20739 return 0;
20740 }
20741 _ACEOF
20742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20743 if { (eval echo "$as_me:20743: \"$ac_link\"") >&5
20744 (eval $ac_link) 2>&5
20745 ac_status=$?
20746 echo "$as_me:20746: \$? = $ac_status" >&5
20747 (exit "$ac_status"); } &&
20748 { ac_try='test -s "conftest$ac_exeext"'
20749 { (eval echo "$as_me:20749: \"$ac_try\"") >&5
20750 (eval $ac_try) 2>&5
20751 ac_status=$?
20752 echo "$as_me:20752: \$? = $ac_status" >&5
20753 (exit "$ac_status"); }; }; then
20754
20755 cf_cv_func_openpty=$cf_header
20756 break
20757
20758 else
20759 echo "$as_me: failed program was:" >&5
20760 cat "conftest.$ac_ext" >&5
20761
20762 cf_cv_func_openpty=no
20763
20764 fi
20765 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20766 done
20767 LIBS="$cf_save_LIBS"
20768
20769 fi
20770 echo "$as_me:20770: result: $cf_cv_func_openpty" >&5
20771 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20772
20773 if test "$cf_cv_func_openpty" != no ; then
20774
20775 cat >>confdefs.h <<EOF
20776 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20777 EOF
20778
20779 cat >>confdefs.h <<\EOF
20780 #define USE_XTERM_PTY 1
20781 EOF
20782
20783 if test "x$cf_cv_lib_util" = xyes ; then
20784
20785 cf_add_libs="$TEST_LIBS"
20786 # reverse order
20787 cf_add_0lib=
20788 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20789 # filter duplicates
20790 for cf_add_1lib in $cf_add_0lib; do
20791 for cf_add_2lib in $cf_add_libs; do
20792 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20793 cf_add_1lib=
20794 break
20795 fi
20796 done
20797 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20798 done
20799 TEST_LIBS="$cf_add_libs"
20800
20801 fi
20802 fi
20803
20804 echo "$as_me:20804: checking for function curses_version" >&5
20805 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
20806 if test "${cf_cv_func_curses_version+set}" = set; then
20807 echo $ECHO_N "(cached) $ECHO_C" >&6
20808 else
20809
20810 if test "$cross_compiling" = yes; then
20811 cf_cv_func_curses_version=unknown
20812 else
20813 cat >"conftest.$ac_ext" <<_ACEOF
20814 #line 20814 "configure"
20815 #include "confdefs.h"
20816
20817 $ac_includes_default
20818
20819 #include <${cf_cv_ncurses_header:-curses.h}>
20820
20821 int main(void)
20822 {
20823 char temp[1024];
20824 sprintf(temp, "%.999s\\n", curses_version());
20825 ${cf_cv_main_return:-return}(0);
20826 }
20827
20828 _ACEOF
20829 rm -f "conftest$ac_exeext"
20830 if { (eval echo "$as_me:20830: \"$ac_link\"") >&5
20831 (eval $ac_link) 2>&5
20832 ac_status=$?
20833 echo "$as_me:20833: \$? = $ac_status" >&5
20834 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20835 { (eval echo "$as_me:20835: \"$ac_try\"") >&5
20836 (eval $ac_try) 2>&5
20837 ac_status=$?
20838 echo "$as_me:20838: \$? = $ac_status" >&5
20839 (exit "$ac_status"); }; }; then
20840 cf_cv_func_curses_version=yes
20841
20842 else
20843 echo "$as_me: program exited with status $ac_status" >&5
20844 echo "$as_me: failed program was:" >&5
20845 cat "conftest.$ac_ext" >&5
20846 cf_cv_func_curses_version=no
20847
20848 fi
20849 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20850 fi
20851 rm -f core
20852 fi
20853 echo "$as_me:20853: result: $cf_cv_func_curses_version" >&5
20854 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
20855 test "$cf_cv_func_curses_version" = yes &&
20856 cat >>confdefs.h <<\EOF
20857 #define HAVE_CURSES_VERSION 1
20858 EOF
20859
20860 echo "$as_me:20860: checking for alternate character set array" >&5
20861 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
20862 if test "${cf_cv_curses_acs_map+set}" = set; then
20863 echo $ECHO_N "(cached) $ECHO_C" >&6
20864 else
20865
20866 cf_cv_curses_acs_map=unknown
20867 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
20868 do
20869 cat >"conftest.$ac_ext" <<_ACEOF
20870 #line 20870 "configure"
20871 #include "confdefs.h"
20872
20873 #include <${cf_cv_ncurses_header:-curses.h}>
20874
20875 int
20876 main (void)
20877 {
20878
20879 ${name}['k'] = ACS_PLUS
20880
20881 ;
20882 return 0;
20883 }
20884 _ACEOF
20885 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20886 if { (eval echo "$as_me:20886: \"$ac_link\"") >&5
20887 (eval $ac_link) 2>&5
20888 ac_status=$?
20889 echo "$as_me:20889: \$? = $ac_status" >&5
20890 (exit "$ac_status"); } &&
20891 { ac_try='test -s "conftest$ac_exeext"'
20892 { (eval echo "$as_me:20892: \"$ac_try\"") >&5
20893 (eval $ac_try) 2>&5
20894 ac_status=$?
20895 echo "$as_me:20895: \$? = $ac_status" >&5
20896 (exit "$ac_status"); }; }; then
20897 cf_cv_curses_acs_map=$name; break
20898 else
20899 echo "$as_me: failed program was:" >&5
20900 cat "conftest.$ac_ext" >&5
20901 fi
20902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20903 done
20904
20905 fi
20906 echo "$as_me:20906: result: $cf_cv_curses_acs_map" >&5
20907 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
20908
20909 test "$cf_cv_curses_acs_map" != unknown &&
20910 cat >>confdefs.h <<EOF
20911 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
20912 EOF
20913
20914 if test "$cf_enable_widec" = yes; then
20915
20916 echo "$as_me:20916: checking for wide alternate character set array" >&5
20917 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
20918 if test "${cf_cv_curses_wacs_map+set}" = set; then
20919 echo $ECHO_N "(cached) $ECHO_C" >&6
20920 else
20921
20922 cf_cv_curses_wacs_map=unknown
20923 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
20924 do
20925 cat >"conftest.$ac_ext" <<_ACEOF
20926 #line 20926 "configure"
20927 #include "confdefs.h"
20928
20929 #ifndef _XOPEN_SOURCE_EXTENDED
20930 #define _XOPEN_SOURCE_EXTENDED
20931 #endif
20932 #include <${cf_cv_ncurses_header:-curses.h}>
20933 int
20934 main (void)
20935 {
20936 void *foo = &(${name}['k']); (void)foo
20937 ;
20938 return 0;
20939 }
20940 _ACEOF
20941 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20942 if { (eval echo "$as_me:20942: \"$ac_link\"") >&5
20943 (eval $ac_link) 2>&5
20944 ac_status=$?
20945 echo "$as_me:20945: \$? = $ac_status" >&5
20946 (exit "$ac_status"); } &&
20947 { ac_try='test -s "conftest$ac_exeext"'
20948 { (eval echo "$as_me:20948: \"$ac_try\"") >&5
20949 (eval $ac_try) 2>&5
20950 ac_status=$?
20951 echo "$as_me:20951: \$? = $ac_status" >&5
20952 (exit "$ac_status"); }; }; then
20953 cf_cv_curses_wacs_map=$name
20954 break
20955 else
20956 echo "$as_me: failed program was:" >&5
20957 cat "conftest.$ac_ext" >&5
20958 fi
20959 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20960 done
20961 fi
20962 echo "$as_me:20962: result: $cf_cv_curses_wacs_map" >&5
20963 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
20964
20965 test "$cf_cv_curses_wacs_map" != unknown &&
20966 cat >>confdefs.h <<EOF
20967 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
20968 EOF
20969
20970 echo "$as_me:20970: checking for wide alternate character constants" >&5
20971 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
20972 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
20973 echo $ECHO_N "(cached) $ECHO_C" >&6
20974 else
20975
20976 cf_cv_curses_wacs_symbols=no
20977 if test "$cf_cv_curses_wacs_map" != unknown
20978 then
20979 cat >"conftest.$ac_ext" <<_ACEOF
20980 #line 20980 "configure"
20981 #include "confdefs.h"
20982
20983 #ifndef _XOPEN_SOURCE_EXTENDED
20984 #define _XOPEN_SOURCE_EXTENDED
20985 #endif
20986 #include <${cf_cv_ncurses_header:-curses.h}>
20987 int
20988 main (void)
20989 {
20990 cchar_t *foo = WACS_PLUS;
20991 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
20992 ;
20993 return 0;
20994 }
20995 _ACEOF
20996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20997 if { (eval echo "$as_me:20997: \"$ac_link\"") >&5
20998 (eval $ac_link) 2>&5
20999 ac_status=$?
21000 echo "$as_me:21000: \$? = $ac_status" >&5
21001 (exit "$ac_status"); } &&
21002 { ac_try='test -s "conftest$ac_exeext"'
21003 { (eval echo "$as_me:21003: \"$ac_try\"") >&5
21004 (eval $ac_try) 2>&5
21005 ac_status=$?
21006 echo "$as_me:21006: \$? = $ac_status" >&5
21007 (exit "$ac_status"); }; }; then
21008 cf_cv_curses_wacs_symbols=yes
21009 else
21010 echo "$as_me: failed program was:" >&5
21011 cat "conftest.$ac_ext" >&5
21012 fi
21013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21014 else
21015 cat >"conftest.$ac_ext" <<_ACEOF
21016 #line 21016 "configure"
21017 #include "confdefs.h"
21018
21019 #ifndef _XOPEN_SOURCE_EXTENDED
21020 #define _XOPEN_SOURCE_EXTENDED
21021 #endif
21022 #include <${cf_cv_ncurses_header:-curses.h}>
21023 int
21024 main (void)
21025 {
21026 cchar_t *foo = WACS_PLUS; (void)foo
21027 ;
21028 return 0;
21029 }
21030 _ACEOF
21031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21032 if { (eval echo "$as_me:21032: \"$ac_link\"") >&5
21033 (eval $ac_link) 2>&5
21034 ac_status=$?
21035 echo "$as_me:21035: \$? = $ac_status" >&5
21036 (exit "$ac_status"); } &&
21037 { ac_try='test -s "conftest$ac_exeext"'
21038 { (eval echo "$as_me:21038: \"$ac_try\"") >&5
21039 (eval $ac_try) 2>&5
21040 ac_status=$?
21041 echo "$as_me:21041: \$? = $ac_status" >&5
21042 (exit "$ac_status"); }; }; then
21043 cf_cv_curses_wacs_symbols=yes
21044 else
21045 echo "$as_me: failed program was:" >&5
21046 cat "conftest.$ac_ext" >&5
21047 fi
21048 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21049 fi
21050
21051 fi
21052 echo "$as_me:21052: result: $cf_cv_curses_wacs_symbols" >&5
21053 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
21054
21055 test "$cf_cv_curses_wacs_symbols" != no &&
21056 cat >>confdefs.h <<\EOF
21057 #define CURSES_WACS_SYMBOLS 1
21058 EOF
21059
21060 fi
21061
21062 echo "$as_me:21062: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
21063 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
21064 cat >"conftest.$ac_ext" <<_ACEOF
21065 #line 21065 "configure"
21066 #include "confdefs.h"
21067
21068 #ifndef _XOPEN_SOURCE_EXTENDED
21069 #define _XOPEN_SOURCE_EXTENDED
21070 #endif
21071 #include <${cf_cv_ncurses_header:-curses.h}>
21072 int
21073 main (void)
21074 {
21075
21076 attr_t foo; (void) foo
21077
21078 ;
21079 return 0;
21080 }
21081 _ACEOF
21082 rm -f "conftest.$ac_objext"
21083 if { (eval echo "$as_me:21083: \"$ac_compile\"") >&5
21084 (eval $ac_compile) 2>&5
21085 ac_status=$?
21086 echo "$as_me:21086: \$? = $ac_status" >&5
21087 (exit "$ac_status"); } &&
21088 { ac_try='test -s "conftest.$ac_objext"'
21089 { (eval echo "$as_me:21089: \"$ac_try\"") >&5
21090 (eval $ac_try) 2>&5
21091 ac_status=$?
21092 echo "$as_me:21092: \$? = $ac_status" >&5
21093 (exit "$ac_status"); }; }; then
21094 cf_result=yes
21095 else
21096 echo "$as_me: failed program was:" >&5
21097 cat "conftest.$ac_ext" >&5
21098 cf_result=no
21099 fi
21100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21101 echo "$as_me:21101: result: $cf_result" >&5
21102 echo "${ECHO_T}$cf_result" >&6
21103 if test "$cf_result" = yes ; then
21104
21105 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21106
21107 cat >>confdefs.h <<EOF
21108 #define $cf_result 1
21109 EOF
21110
21111 else
21112
21113 cat >>confdefs.h <<EOF
21114 #define attr_t long
21115 EOF
21116
21117 fi
21118
21119 if test "$cf_enable_widec" = yes; then
21120
21121 # This is needed on Tru64 5.0 to declare mbstate_t
21122 echo "$as_me:21122: checking if we must include wchar.h to declare mbstate_t" >&5
21123 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
21124 if test "${cf_cv_mbstate_t+set}" = set; then
21125 echo $ECHO_N "(cached) $ECHO_C" >&6
21126 else
21127
21128 cat >"conftest.$ac_ext" <<_ACEOF
21129 #line 21129 "configure"
21130 #include "confdefs.h"
21131
21132 #include <stdlib.h>
21133 #include <stdarg.h>
21134 #include <stdio.h>
21135 #ifdef HAVE_LIBUTF8_H
21136 #include <libutf8.h>
21137 #endif
21138 int
21139 main (void)
21140 {
21141 mbstate_t state; (void)state
21142 ;
21143 return 0;
21144 }
21145 _ACEOF
21146 rm -f "conftest.$ac_objext"
21147 if { (eval echo "$as_me:21147: \"$ac_compile\"") >&5
21148 (eval $ac_compile) 2>&5
21149 ac_status=$?
21150 echo "$as_me:21150: \$? = $ac_status" >&5
21151 (exit "$ac_status"); } &&
21152 { ac_try='test -s "conftest.$ac_objext"'
21153 { (eval echo "$as_me:21153: \"$ac_try\"") >&5
21154 (eval $ac_try) 2>&5
21155 ac_status=$?
21156 echo "$as_me:21156: \$? = $ac_status" >&5
21157 (exit "$ac_status"); }; }; then
21158 cf_cv_mbstate_t=no
21159 else
21160 echo "$as_me: failed program was:" >&5
21161 cat "conftest.$ac_ext" >&5
21162 cat >"conftest.$ac_ext" <<_ACEOF
21163 #line 21163 "configure"
21164 #include "confdefs.h"
21165
21166 #include <stdlib.h>
21167 #include <stdarg.h>
21168 #include <stdio.h>
21169 #include <wchar.h>
21170 #ifdef HAVE_LIBUTF8_H
21171 #include <libutf8.h>
21172 #endif
21173 int
21174 main (void)
21175 {
21176 mbstate_t value; (void) value
21177 ;
21178 return 0;
21179 }
21180 _ACEOF
21181 rm -f "conftest.$ac_objext"
21182 if { (eval echo "$as_me:21182: \"$ac_compile\"") >&5
21183 (eval $ac_compile) 2>&5
21184 ac_status=$?
21185 echo "$as_me:21185: \$? = $ac_status" >&5
21186 (exit "$ac_status"); } &&
21187 { ac_try='test -s "conftest.$ac_objext"'
21188 { (eval echo "$as_me:21188: \"$ac_try\"") >&5
21189 (eval $ac_try) 2>&5
21190 ac_status=$?
21191 echo "$as_me:21191: \$? = $ac_status" >&5
21192 (exit "$ac_status"); }; }; then
21193 cf_cv_mbstate_t=yes
21194 else
21195 echo "$as_me: failed program was:" >&5
21196 cat "conftest.$ac_ext" >&5
21197 cf_cv_mbstate_t=unknown
21198 fi
21199 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21200 fi
21201 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21202 fi
21203 echo "$as_me:21203: result: $cf_cv_mbstate_t" >&5
21204 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
21205
21206 if test "$cf_cv_mbstate_t" = yes ; then
21207
21208 cat >>confdefs.h <<\EOF
21209 #define NEED_WCHAR_H 1
21210 EOF
21211
21212 NEED_WCHAR_H=1
21213 fi
21214
21215 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
21216 if test "$cf_cv_mbstate_t" = unknown ; then
21217 NCURSES_MBSTATE_T=1
21218 fi
21219
21220 # if we find mbstate_t in either place, use substitution to provide a fallback.
21221 if test "$cf_cv_mbstate_t" != unknown ; then
21222 NCURSES_OK_MBSTATE_T=1
21223 fi
21224
21225 # This is needed on Tru64 5.0 to declare wchar_t
21226 echo "$as_me:21226: checking if we must include wchar.h to declare wchar_t" >&5
21227 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
21228 if test "${cf_cv_wchar_t+set}" = set; then
21229 echo $ECHO_N "(cached) $ECHO_C" >&6
21230 else
21231
21232 cat >"conftest.$ac_ext" <<_ACEOF
21233 #line 21233 "configure"
21234 #include "confdefs.h"
21235
21236 #include <stdlib.h>
21237 #include <stdarg.h>
21238 #include <stdio.h>
21239 #ifdef HAVE_LIBUTF8_H
21240 #include <libutf8.h>
21241 #endif
21242 int
21243 main (void)
21244 {
21245 wchar_t state; (void)state
21246 ;
21247 return 0;
21248 }
21249 _ACEOF
21250 rm -f "conftest.$ac_objext"
21251 if { (eval echo "$as_me:21251: \"$ac_compile\"") >&5
21252 (eval $ac_compile) 2>&5
21253 ac_status=$?
21254 echo "$as_me:21254: \$? = $ac_status" >&5
21255 (exit "$ac_status"); } &&
21256 { ac_try='test -s "conftest.$ac_objext"'
21257 { (eval echo "$as_me:21257: \"$ac_try\"") >&5
21258 (eval $ac_try) 2>&5
21259 ac_status=$?
21260 echo "$as_me:21260: \$? = $ac_status" >&5
21261 (exit "$ac_status"); }; }; then
21262 cf_cv_wchar_t=no
21263 else
21264 echo "$as_me: failed program was:" >&5
21265 cat "conftest.$ac_ext" >&5
21266 cat >"conftest.$ac_ext" <<_ACEOF
21267 #line 21267 "configure"
21268 #include "confdefs.h"
21269
21270 #include <stdlib.h>
21271 #include <stdarg.h>
21272 #include <stdio.h>
21273 #include <wchar.h>
21274 #ifdef HAVE_LIBUTF8_H
21275 #include <libutf8.h>
21276 #endif
21277 int
21278 main (void)
21279 {
21280 wchar_t value; (void) value
21281 ;
21282 return 0;
21283 }
21284 _ACEOF
21285 rm -f "conftest.$ac_objext"
21286 if { (eval echo "$as_me:21286: \"$ac_compile\"") >&5
21287 (eval $ac_compile) 2>&5
21288 ac_status=$?
21289 echo "$as_me:21289: \$? = $ac_status" >&5
21290 (exit "$ac_status"); } &&
21291 { ac_try='test -s "conftest.$ac_objext"'
21292 { (eval echo "$as_me:21292: \"$ac_try\"") >&5
21293 (eval $ac_try) 2>&5
21294 ac_status=$?
21295 echo "$as_me:21295: \$? = $ac_status" >&5
21296 (exit "$ac_status"); }; }; then
21297 cf_cv_wchar_t=yes
21298 else
21299 echo "$as_me: failed program was:" >&5
21300 cat "conftest.$ac_ext" >&5
21301 cf_cv_wchar_t=unknown
21302 fi
21303 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21304 fi
21305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21306 fi
21307 echo "$as_me:21307: result: $cf_cv_wchar_t" >&5
21308 echo "${ECHO_T}$cf_cv_wchar_t" >&6
21309
21310 if test "$cf_cv_wchar_t" = yes ; then
21311
21312 cat >>confdefs.h <<\EOF
21313 #define NEED_WCHAR_H 1
21314 EOF
21315
21316 NEED_WCHAR_H=1
21317 fi
21318
21319 # if we do not find wchar_t in either place, use substitution to provide a fallback.
21320 if test "$cf_cv_wchar_t" = unknown ; then
21321 NCURSES_WCHAR_T=1
21322 fi
21323
21324 # if we find wchar_t in either place, use substitution to provide a fallback.
21325 if test "$cf_cv_wchar_t" != unknown ; then
21326 NCURSES_OK_WCHAR_T=1
21327 fi
21328
21329 # This is needed on Tru64 5.0 to declare wint_t
21330 echo "$as_me:21330: checking if we must include wchar.h to declare wint_t" >&5
21331 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
21332 if test "${cf_cv_wint_t+set}" = set; then
21333 echo $ECHO_N "(cached) $ECHO_C" >&6
21334 else
21335
21336 cat >"conftest.$ac_ext" <<_ACEOF
21337 #line 21337 "configure"
21338 #include "confdefs.h"
21339
21340 #include <stdlib.h>
21341 #include <stdarg.h>
21342 #include <stdio.h>
21343 #ifdef HAVE_LIBUTF8_H
21344 #include <libutf8.h>
21345 #endif
21346 int
21347 main (void)
21348 {
21349 wint_t state; (void)state
21350 ;
21351 return 0;
21352 }
21353 _ACEOF
21354 rm -f "conftest.$ac_objext"
21355 if { (eval echo "$as_me:21355: \"$ac_compile\"") >&5
21356 (eval $ac_compile) 2>&5
21357 ac_status=$?
21358 echo "$as_me:21358: \$? = $ac_status" >&5
21359 (exit "$ac_status"); } &&
21360 { ac_try='test -s "conftest.$ac_objext"'
21361 { (eval echo "$as_me:21361: \"$ac_try\"") >&5
21362 (eval $ac_try) 2>&5
21363 ac_status=$?
21364 echo "$as_me:21364: \$? = $ac_status" >&5
21365 (exit "$ac_status"); }; }; then
21366 cf_cv_wint_t=no
21367 else
21368 echo "$as_me: failed program was:" >&5
21369 cat "conftest.$ac_ext" >&5
21370 cat >"conftest.$ac_ext" <<_ACEOF
21371 #line 21371 "configure"
21372 #include "confdefs.h"
21373
21374 #include <stdlib.h>
21375 #include <stdarg.h>
21376 #include <stdio.h>
21377 #include <wchar.h>
21378 #ifdef HAVE_LIBUTF8_H
21379 #include <libutf8.h>
21380 #endif
21381 int
21382 main (void)
21383 {
21384 wint_t value; (void) value
21385 ;
21386 return 0;
21387 }
21388 _ACEOF
21389 rm -f "conftest.$ac_objext"
21390 if { (eval echo "$as_me:21390: \"$ac_compile\"") >&5
21391 (eval $ac_compile) 2>&5
21392 ac_status=$?
21393 echo "$as_me:21393: \$? = $ac_status" >&5
21394 (exit "$ac_status"); } &&
21395 { ac_try='test -s "conftest.$ac_objext"'
21396 { (eval echo "$as_me:21396: \"$ac_try\"") >&5
21397 (eval $ac_try) 2>&5
21398 ac_status=$?
21399 echo "$as_me:21399: \$? = $ac_status" >&5
21400 (exit "$ac_status"); }; }; then
21401 cf_cv_wint_t=yes
21402 else
21403 echo "$as_me: failed program was:" >&5
21404 cat "conftest.$ac_ext" >&5
21405 cf_cv_wint_t=unknown
21406 fi
21407 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21408 fi
21409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21410 fi
21411 echo "$as_me:21411: result: $cf_cv_wint_t" >&5
21412 echo "${ECHO_T}$cf_cv_wint_t" >&6
21413
21414 if test "$cf_cv_wint_t" = yes ; then
21415
21416 cat >>confdefs.h <<\EOF
21417 #define NEED_WCHAR_H 1
21418 EOF
21419
21420 NEED_WCHAR_H=1
21421 fi
21422
21423 # if we do not find wint_t in either place, use substitution to provide a fallback.
21424 if test "$cf_cv_wint_t" = unknown ; then
21425 NCURSES_WINT_T=1
21426 fi
21427
21428 # if we find wint_t in either place, use substitution to provide a fallback.
21429 if test "$cf_cv_wint_t" != unknown ; then
21430 NCURSES_OK_WINT_T=1
21431 fi
21432
21433 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
21434
21435 echo "$as_me:21435: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
21436 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
21437 cat >"conftest.$ac_ext" <<_ACEOF
21438 #line 21438 "configure"
21439 #include "confdefs.h"
21440
21441 #ifndef _XOPEN_SOURCE_EXTENDED
21442 #define _XOPEN_SOURCE_EXTENDED
21443 #endif
21444 #include <${cf_cv_ncurses_header:-curses.h}>
21445 int
21446 main (void)
21447 {
21448
21449 mbstate_t foo; (void) foo
21450
21451 ;
21452 return 0;
21453 }
21454 _ACEOF
21455 rm -f "conftest.$ac_objext"
21456 if { (eval echo "$as_me:21456: \"$ac_compile\"") >&5
21457 (eval $ac_compile) 2>&5
21458 ac_status=$?
21459 echo "$as_me:21459: \$? = $ac_status" >&5
21460 (exit "$ac_status"); } &&
21461 { ac_try='test -s "conftest.$ac_objext"'
21462 { (eval echo "$as_me:21462: \"$ac_try\"") >&5
21463 (eval $ac_try) 2>&5
21464 ac_status=$?
21465 echo "$as_me:21465: \$? = $ac_status" >&5
21466 (exit "$ac_status"); }; }; then
21467 cf_result=yes
21468 else
21469 echo "$as_me: failed program was:" >&5
21470 cat "conftest.$ac_ext" >&5
21471 cf_result=no
21472 fi
21473 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21474 echo "$as_me:21474: result: $cf_result" >&5
21475 echo "${ECHO_T}$cf_result" >&6
21476 if test "$cf_result" = yes ; then
21477
21478 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21479
21480 cat >>confdefs.h <<EOF
21481 #define $cf_result 1
21482 EOF
21483
21484 else
21485
21486 cat >>confdefs.h <<EOF
21487 #define mbstate_t long
21488 EOF
21489
21490 fi
21491
21492 fi
21493
21494 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
21495
21496 echo "$as_me:21496: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
21497 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
21498 cat >"conftest.$ac_ext" <<_ACEOF
21499 #line 21499 "configure"
21500 #include "confdefs.h"
21501
21502 #ifndef _XOPEN_SOURCE_EXTENDED
21503 #define _XOPEN_SOURCE_EXTENDED
21504 #endif
21505 #include <${cf_cv_ncurses_header:-curses.h}>
21506 int
21507 main (void)
21508 {
21509
21510 wchar_t foo; (void) foo
21511
21512 ;
21513 return 0;
21514 }
21515 _ACEOF
21516 rm -f "conftest.$ac_objext"
21517 if { (eval echo "$as_me:21517: \"$ac_compile\"") >&5
21518 (eval $ac_compile) 2>&5
21519 ac_status=$?
21520 echo "$as_me:21520: \$? = $ac_status" >&5
21521 (exit "$ac_status"); } &&
21522 { ac_try='test -s "conftest.$ac_objext"'
21523 { (eval echo "$as_me:21523: \"$ac_try\"") >&5
21524 (eval $ac_try) 2>&5
21525 ac_status=$?
21526 echo "$as_me:21526: \$? = $ac_status" >&5
21527 (exit "$ac_status"); }; }; then
21528 cf_result=yes
21529 else
21530 echo "$as_me: failed program was:" >&5
21531 cat "conftest.$ac_ext" >&5
21532 cf_result=no
21533 fi
21534 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21535 echo "$as_me:21535: result: $cf_result" >&5
21536 echo "${ECHO_T}$cf_result" >&6
21537 if test "$cf_result" = yes ; then
21538
21539 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21540
21541 cat >>confdefs.h <<EOF
21542 #define $cf_result 1
21543 EOF
21544
21545 else
21546
21547 cat >>confdefs.h <<EOF
21548 #define wchar_t long
21549 EOF
21550
21551 fi
21552
21553 fi
21554
21555 if test "$NCURSES_OK_WINT_T" = 0 ; then
21556
21557 echo "$as_me:21557: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
21558 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
21559 cat >"conftest.$ac_ext" <<_ACEOF
21560 #line 21560 "configure"
21561 #include "confdefs.h"
21562
21563 #ifndef _XOPEN_SOURCE_EXTENDED
21564 #define _XOPEN_SOURCE_EXTENDED
21565 #endif
21566 #include <${cf_cv_ncurses_header:-curses.h}>
21567 int
21568 main (void)
21569 {
21570
21571 wint_t foo; (void) foo
21572
21573 ;
21574 return 0;
21575 }
21576 _ACEOF
21577 rm -f "conftest.$ac_objext"
21578 if { (eval echo "$as_me:21578: \"$ac_compile\"") >&5
21579 (eval $ac_compile) 2>&5
21580 ac_status=$?
21581 echo "$as_me:21581: \$? = $ac_status" >&5
21582 (exit "$ac_status"); } &&
21583 { ac_try='test -s "conftest.$ac_objext"'
21584 { (eval echo "$as_me:21584: \"$ac_try\"") >&5
21585 (eval $ac_try) 2>&5
21586 ac_status=$?
21587 echo "$as_me:21587: \$? = $ac_status" >&5
21588 (exit "$ac_status"); }; }; then
21589 cf_result=yes
21590 else
21591 echo "$as_me: failed program was:" >&5
21592 cat "conftest.$ac_ext" >&5
21593 cf_result=no
21594 fi
21595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21596 echo "$as_me:21596: result: $cf_result" >&5
21597 echo "${ECHO_T}$cf_result" >&6
21598 if test "$cf_result" = yes ; then
21599
21600 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21601
21602 cat >>confdefs.h <<EOF
21603 #define $cf_result 1
21604 EOF
21605
21606 else
21607
21608 cat >>confdefs.h <<EOF
21609 #define wint_t long
21610 EOF
21611
21612 fi
21613
21614 fi
21615 fi
21616
21617 for cf_data in \
21618 TABSIZE \
21619 curscr \
21620 ospeed \
21621 boolnames \
21622 boolfnames \
21623 ttytype
21624 do
21625 echo "$as_me:21625: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
21626 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
21627
21628 cat >"conftest.$ac_ext" <<_ACEOF
21629 #line 21629 "configure"
21630 #include "confdefs.h"
21631
21632 #ifdef HAVE_XCURSES
21633 #include <xcurses.h>
21634 char * XCursesProgramName = "test";
21635 #else
21636 #include <${cf_cv_ncurses_header:-curses.h}>
21637 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21638 #include <ncursesw/term.h>
21639 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21640 #include <ncurses/term.h>
21641 #elif defined(HAVE_TERM_H)
21642 #include <term.h>
21643 #endif
21644 #endif
21645
21646 int
21647 main (void)
21648 {
21649
21650 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21651 const void *foo = (const void *)($cf_data);
21652 #else
21653 const void *foo = &($cf_data);
21654 #endif
21655 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21656
21657 ;
21658 return 0;
21659 }
21660 _ACEOF
21661 rm -f "conftest.$ac_objext"
21662 if { (eval echo "$as_me:21662: \"$ac_compile\"") >&5
21663 (eval $ac_compile) 2>&5
21664 ac_status=$?
21665 echo "$as_me:21665: \$? = $ac_status" >&5
21666 (exit "$ac_status"); } &&
21667 { ac_try='test -s "conftest.$ac_objext"'
21668 { (eval echo "$as_me:21668: \"$ac_try\"") >&5
21669 (eval $ac_try) 2>&5
21670 ac_status=$?
21671 echo "$as_me:21671: \$? = $ac_status" >&5
21672 (exit "$ac_status"); }; }; then
21673 cf_result=yes
21674
21675 else
21676 echo "$as_me: failed program was:" >&5
21677 cat "conftest.$ac_ext" >&5
21678 cf_result=no
21679 fi
21680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21681 echo "$as_me:21681: result: $cf_result" >&5
21682 echo "${ECHO_T}$cf_result" >&6
21683
21684 if test "$cf_result" = yes ; then
21685
21686 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21687
21688 cat >>confdefs.h <<EOF
21689 #define $cf_result 1
21690 EOF
21691
21692 else
21693 echo "$as_me:21693: checking for data $cf_data in library" >&5
21694 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
21695 # BSD linkers insist on making weak linkage, but resolve at runtime.
21696 if test "$cross_compiling" = yes; then
21697
21698 # cross-compiling
21699 cat >"conftest.$ac_ext" <<_ACEOF
21700 #line 21700 "configure"
21701 #include "confdefs.h"
21702
21703 #ifdef HAVE_XCURSES
21704 #include <xcurses.h>
21705 char * XCursesProgramName = "test";
21706 #else
21707 #include <${cf_cv_ncurses_header:-curses.h}>
21708 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21709 #include <ncursesw/term.h>
21710 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21711 #include <ncurses/term.h>
21712 #elif defined(HAVE_TERM_H)
21713 #include <term.h>
21714 #endif
21715 #endif
21716
21717 extern char $cf_data;
21718 int
21719 main (void)
21720 {
21721
21722 do {
21723
21724 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21725 const void *foo = (const void *)($cf_data);
21726 #else
21727 const void *foo = &($cf_data);
21728 #endif
21729 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21730
21731 ${cf_cv_main_return:-return}(foo == 0);
21732 } while (0)
21733
21734 ;
21735 return 0;
21736 }
21737 _ACEOF
21738 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21739 if { (eval echo "$as_me:21739: \"$ac_link\"") >&5
21740 (eval $ac_link) 2>&5
21741 ac_status=$?
21742 echo "$as_me:21742: \$? = $ac_status" >&5
21743 (exit "$ac_status"); } &&
21744 { ac_try='test -s "conftest$ac_exeext"'
21745 { (eval echo "$as_me:21745: \"$ac_try\"") >&5
21746 (eval $ac_try) 2>&5
21747 ac_status=$?
21748 echo "$as_me:21748: \$? = $ac_status" >&5
21749 (exit "$ac_status"); }; }; then
21750 cf_result=yes
21751 else
21752 echo "$as_me: failed program was:" >&5
21753 cat "conftest.$ac_ext" >&5
21754 cf_result=no
21755 fi
21756 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21757
21758 else
21759 cat >"conftest.$ac_ext" <<_ACEOF
21760 #line 21760 "configure"
21761 #include "confdefs.h"
21762
21763 #ifdef HAVE_XCURSES
21764 #include <xcurses.h>
21765 char * XCursesProgramName = "test";
21766 #else
21767 #include <${cf_cv_ncurses_header:-curses.h}>
21768 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21769 #include <ncursesw/term.h>
21770 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21771 #include <ncurses/term.h>
21772 #elif defined(HAVE_TERM_H)
21773 #include <term.h>
21774 #endif
21775 #endif
21776
21777 extern char $cf_data;
21778 int main(void)
21779 {
21780
21781 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21782 const void *foo = (const void *)($cf_data);
21783 #else
21784 const void *foo = &($cf_data);
21785 #endif
21786 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21787
21788 ${cf_cv_main_return:-return}(foo == 0);
21789 }
21790 _ACEOF
21791 rm -f "conftest$ac_exeext"
21792 if { (eval echo "$as_me:21792: \"$ac_link\"") >&5
21793 (eval $ac_link) 2>&5
21794 ac_status=$?
21795 echo "$as_me:21795: \$? = $ac_status" >&5
21796 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21797 { (eval echo "$as_me:21797: \"$ac_try\"") >&5
21798 (eval $ac_try) 2>&5
21799 ac_status=$?
21800 echo "$as_me:21800: \$? = $ac_status" >&5
21801 (exit "$ac_status"); }; }; then
21802 cf_result=yes
21803
21804 else
21805 echo "$as_me: program exited with status $ac_status" >&5
21806 echo "$as_me: failed program was:" >&5
21807 cat "conftest.$ac_ext" >&5
21808 cf_result=no
21809 fi
21810 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21811 fi
21812 echo "$as_me:21812: result: $cf_result" >&5
21813 echo "${ECHO_T}$cf_result" >&6
21814 if test "$cf_result" = yes ; then
21815
21816 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21817
21818 cat >>confdefs.h <<EOF
21819 #define $cf_result 1
21820 EOF
21821
21822 # do not exit loop here, since we prefer system's declarations
21823 fi
21824 fi
21825 done
21826
21827 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
21828 then
21829 echo "$as_me:21829: checking for X" >&5
21830 echo $ECHO_N "checking for X... $ECHO_C" >&6
21831
21832 # Check whether --with-x or --without-x was given.
21833 if test "${with_x+set}" = set; then
21834 withval="$with_x"
21835
21836 fi;
21837 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
21838 if test "x$with_x" = xno; then
21839 # The user explicitly disabled X.
21840 have_x=disabled
21841 else
21842 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
21843 # Both variables are already set.
21844 have_x=yes
21845 else
21846 if test "${ac_cv_have_x+set}" = set; then
21847 echo $ECHO_N "(cached) $ECHO_C" >&6
21848 else
21849 # One or both of the vars are not set, and there is no cached value.
21850 ac_x_includes=no ac_x_libraries=no
21851 rm -fr conftest.dir
21852 if mkdir conftest.dir; then
21853 cd conftest.dir
21854 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
21855 cat >Imakefile <<'EOF'
21856 acfindx:
21857 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
21858 EOF
21859 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
21860 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
21861 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
21862 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
21863 for ac_extension in a so sl dylib dll; do
21864 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
21865 test -f "$ac_im_libdir/libX11.$ac_extension"; then
21866 ac_im_usrlibdir=$ac_im_libdir; break
21867 fi
21868 done
21869 # Screen out bogus values from the imake configuration. They are
21870 # bogus both because they are the default anyway, and because
21871 # using them would break gcc on systems where it needs fixed includes.
21872 case $ac_im_incroot in
21873 /usr/include) ;;
21874 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
21875 esac
21876 case $ac_im_usrlibdir in
21877 /usr/lib | /lib) ;;
21878 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
21879 esac
21880 fi
21881 cd ..
21882 rm -fr conftest.dir
21883 fi
21884
21885 # Standard set of common directories for X headers.
21886 # Check X11 before X11Rn because it is often a symlink to the current release.
21887 ac_x_header_dirs='
21888 /usr/X11/include
21889 /usr/X11R7/include
21890 /usr/X11R6/include
21891 /usr/X11R5/include
21892 /usr/X11R4/include
21893
21894 /opt/local/include
21895 /opt/X11/include
21896
21897 /usr/include/X11
21898 /usr/include/X11R7
21899 /usr/include/X11R6
21900 /usr/include/X11R5
21901 /usr/include/X11R4
21902
21903 /usr/local/X11/include
21904 /usr/local/X11R7/include
21905 /usr/local/X11R6/include
21906 /usr/local/X11R5/include
21907 /usr/local/X11R4/include
21908
21909 /usr/local/include/X11
21910 /usr/local/include/X11R7
21911 /usr/local/include/X11R6
21912 /usr/local/include/X11R5
21913 /usr/local/include/X11R4
21914
21915 /usr/X386/include
21916 /usr/x386/include
21917 /usr/XFree86/include/X11
21918
21919 /usr/include
21920 /usr/local/include
21921 /usr/unsupported/include
21922 /usr/athena/include
21923 /usr/local/x11r5/include
21924 /usr/lpp/Xamples/include
21925
21926 /usr/openwin/include
21927 /usr/openwin/share/include'
21928
21929 if test "$ac_x_includes" = no; then
21930 # Guess where to find include files, by looking for Intrinsic.h.
21931 # First, try using that file with no special directory specified.
21932 cat >"conftest.$ac_ext" <<_ACEOF
21933 #line 21933 "configure"
21934 #include "confdefs.h"
21935 #include <X11/Intrinsic.h>
21936 _ACEOF
21937 if { (eval echo "$as_me:21937: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21938 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21939 ac_status=$?
21940 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21941 rm -f conftest.er1
21942 cat conftest.err >&5
21943 echo "$as_me:21943: \$? = $ac_status" >&5
21944 (exit "$ac_status"); } >/dev/null; then
21945 if test -s conftest.err; then
21946 ac_cpp_err=$ac_c_preproc_warn_flag
21947 else
21948 ac_cpp_err=
21949 fi
21950 else
21951 ac_cpp_err=yes
21952 fi
21953 if test -z "$ac_cpp_err"; then
21954 # We can compile using X headers with no special include directory.
21955 ac_x_includes=
21956 else
21957 echo "$as_me: failed program was:" >&5
21958 cat "conftest.$ac_ext" >&5
21959 for ac_dir in $ac_x_header_dirs; do
21960 if test -r "$ac_dir/X11/Intrinsic.h"; then
21961 ac_x_includes=$ac_dir
21962 break
21963 fi
21964 done
21965 fi
21966 rm -f conftest.err "conftest.$ac_ext"
21967 fi # $ac_x_includes = no
21968
21969 if test "$ac_x_libraries" = no; then
21970 # Check for the libraries.
21971 # See if we find them without any special options.
21972 # Don't add to $LIBS permanently.
21973 ac_save_LIBS=$LIBS
21974 LIBS="-lXt $LIBS"
21975 cat >"conftest.$ac_ext" <<_ACEOF
21976 #line 21976 "configure"
21977 #include "confdefs.h"
21978 #include <X11/Intrinsic.h>
21979 int
21980 main (void)
21981 {
21982 XtMalloc (0)
21983 ;
21984 return 0;
21985 }
21986 _ACEOF
21987 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21988 if { (eval echo "$as_me:21988: \"$ac_link\"") >&5
21989 (eval $ac_link) 2>&5
21990 ac_status=$?
21991 echo "$as_me:21991: \$? = $ac_status" >&5
21992 (exit "$ac_status"); } &&
21993 { ac_try='test -s "conftest$ac_exeext"'
21994 { (eval echo "$as_me:21994: \"$ac_try\"") >&5
21995 (eval $ac_try) 2>&5
21996 ac_status=$?
21997 echo "$as_me:21997: \$? = $ac_status" >&5
21998 (exit "$ac_status"); }; }; then
21999 LIBS=$ac_save_LIBS
22000 # We can link X programs with no special library path.
22001 ac_x_libraries=
22002 else
22003 echo "$as_me: failed program was:" >&5
22004 cat "conftest.$ac_ext" >&5
22005 LIBS=$ac_save_LIBS
22006 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
22007 do
22008 # Don't even attempt the hair of trying to link an X program!
22009 for ac_extension in a so sl dylib dll; do
22010 if test -r "$ac_dir/libXt.$ac_extension"; then
22011 ac_x_libraries=$ac_dir
22012 break 2
22013 fi
22014 done
22015 done
22016 fi
22017 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22018 fi # $ac_x_libraries = no
22019
22020 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
22021 # Didn't find X anywhere. Cache the known absence of X.
22022 ac_cv_have_x="have_x=no"
22023 else
22024 # Record where we found X for the cache.
22025 ac_cv_have_x="have_x=yes \
22026 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
22027 fi
22028 fi
22029
22030 fi
22031 eval "$ac_cv_have_x"
22032 fi # $with_x != no
22033
22034 if test "$have_x" != yes; then
22035 echo "$as_me:22035: result: $have_x" >&5
22036 echo "${ECHO_T}$have_x" >&6
22037 no_x=yes
22038 else
22039 # If each of the values was on the command line, it overrides each guess.
22040 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
22041 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
22042 # Update the cache value to reflect the command line values.
22043 ac_cv_have_x="have_x=yes \
22044 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
22045 echo "$as_me:22045: result: libraries $x_libraries, headers $x_includes" >&5
22046 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
22047 fi
22048
22049 if test "$no_x" = yes; then
22050 # Not all programs may use this symbol, but it does not hurt to define it.
22051
22052 cat >>confdefs.h <<\EOF
22053 #define X_DISPLAY_MISSING 1
22054 EOF
22055
22056 X_CFLAGS=
22057 X_PRE_LIBS=
22058 X_LIBS=
22059 X_EXTRA_LIBS=
22060 else
22061 if test -n "$x_includes"; then
22062 X_CFLAGS="$X_CFLAGS -I$x_includes"
22063 fi
22064
22065 # It would also be nice to do this for all -L options, not just this one.
22066 if test -n "$x_libraries"; then
22067 X_LIBS="$X_LIBS -L$x_libraries"
22068 # For Solaris; some versions of Sun CC require a space after -R and
22069 # others require no space. Words are not sufficient . . . .
22070 case `(uname -sr) 2>/dev/null` in
22071 "SunOS 5"*)
22072 echo "$as_me:22072: checking whether -R must be followed by a space" >&5
22073 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
22074 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
22075 cat >"conftest.$ac_ext" <<_ACEOF
22076 #line 22076 "configure"
22077 #include "confdefs.h"
22078
22079 int
22080 main (void)
22081 {
22082
22083 ;
22084 return 0;
22085 }
22086 _ACEOF
22087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22088 if { (eval echo "$as_me:22088: \"$ac_link\"") >&5
22089 (eval $ac_link) 2>&5
22090 ac_status=$?
22091 echo "$as_me:22091: \$? = $ac_status" >&5
22092 (exit "$ac_status"); } &&
22093 { ac_try='test -s "conftest$ac_exeext"'
22094 { (eval echo "$as_me:22094: \"$ac_try\"") >&5
22095 (eval $ac_try) 2>&5
22096 ac_status=$?
22097 echo "$as_me:22097: \$? = $ac_status" >&5
22098 (exit "$ac_status"); }; }; then
22099 ac_R_nospace=yes
22100 else
22101 echo "$as_me: failed program was:" >&5
22102 cat "conftest.$ac_ext" >&5
22103 ac_R_nospace=no
22104 fi
22105 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22106 if test $ac_R_nospace = yes; then
22107 echo "$as_me:22107: result: no" >&5
22108 echo "${ECHO_T}no" >&6
22109 X_LIBS="$X_LIBS -R$x_libraries"
22110 else
22111 LIBS="$ac_xsave_LIBS -R $x_libraries"
22112 cat >"conftest.$ac_ext" <<_ACEOF
22113 #line 22113 "configure"
22114 #include "confdefs.h"
22115
22116 int
22117 main (void)
22118 {
22119
22120 ;
22121 return 0;
22122 }
22123 _ACEOF
22124 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22125 if { (eval echo "$as_me:22125: \"$ac_link\"") >&5
22126 (eval $ac_link) 2>&5
22127 ac_status=$?
22128 echo "$as_me:22128: \$? = $ac_status" >&5
22129 (exit "$ac_status"); } &&
22130 { ac_try='test -s "conftest$ac_exeext"'
22131 { (eval echo "$as_me:22131: \"$ac_try\"") >&5
22132 (eval $ac_try) 2>&5
22133 ac_status=$?
22134 echo "$as_me:22134: \$? = $ac_status" >&5
22135 (exit "$ac_status"); }; }; then
22136 ac_R_space=yes
22137 else
22138 echo "$as_me: failed program was:" >&5
22139 cat "conftest.$ac_ext" >&5
22140 ac_R_space=no
22141 fi
22142 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22143 if test $ac_R_space = yes; then
22144 echo "$as_me:22144: result: yes" >&5
22145 echo "${ECHO_T}yes" >&6
22146 X_LIBS="$X_LIBS -R $x_libraries"
22147 else
22148 echo "$as_me:22148: result: neither works" >&5
22149 echo "${ECHO_T}neither works" >&6
22150 fi
22151 fi
22152 LIBS=$ac_xsave_LIBS
22153 esac
22154 fi
22155
22156 # Check for system-dependent libraries X programs must link with.
22157 # Do this before checking for the system-independent R6 libraries
22158 # (-lICE), since we may need -lsocket or whatever for X linking.
22159
22160 if test "$ISC" = yes; then
22161 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
22162 else
22163 # Martyn Johnson says this is needed for Ultrix, if the X
22164 # libraries were built with DECnet support. And Karl Berry says
22165 # the Alpha needs dnet_stub (dnet does not exist).
22166 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
22167 cat >"conftest.$ac_ext" <<_ACEOF
22168 #line 22168 "configure"
22169 #include "confdefs.h"
22170
22171 /* Override any gcc2 internal prototype to avoid an error. */
22172 #ifdef __cplusplus
22173 extern "C"
22174 #endif
22175 /* We use char because int might match the return type of a gcc2
22176 builtin and then its argument prototype would still apply. */
22177 char XOpenDisplay (void);
22178 int
22179 main (void)
22180 {
22181 XOpenDisplay ();
22182 ;
22183 return 0;
22184 }
22185 _ACEOF
22186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22187 if { (eval echo "$as_me:22187: \"$ac_link\"") >&5
22188 (eval $ac_link) 2>&5
22189 ac_status=$?
22190 echo "$as_me:22190: \$? = $ac_status" >&5
22191 (exit "$ac_status"); } &&
22192 { ac_try='test -s "conftest$ac_exeext"'
22193 { (eval echo "$as_me:22193: \"$ac_try\"") >&5
22194 (eval $ac_try) 2>&5
22195 ac_status=$?
22196 echo "$as_me:22196: \$? = $ac_status" >&5
22197 (exit "$ac_status"); }; }; then
22198 :
22199 else
22200 echo "$as_me: failed program was:" >&5
22201 cat "conftest.$ac_ext" >&5
22202 echo "$as_me:22202: checking for dnet_ntoa in -ldnet" >&5
22203 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
22204 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
22205 echo $ECHO_N "(cached) $ECHO_C" >&6
22206 else
22207 ac_check_lib_save_LIBS=$LIBS
22208 LIBS="-ldnet $LIBS"
22209 cat >"conftest.$ac_ext" <<_ACEOF
22210 #line 22210 "configure"
22211 #include "confdefs.h"
22212
22213 /* Override any gcc2 internal prototype to avoid an error. */
22214 #ifdef __cplusplus
22215 extern "C"
22216 #endif
22217 /* We use char because int might match the return type of a gcc2
22218 builtin and then its argument prototype would still apply. */
22219 char dnet_ntoa (void);
22220 int
22221 main (void)
22222 {
22223 dnet_ntoa ();
22224 ;
22225 return 0;
22226 }
22227 _ACEOF
22228 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22229 if { (eval echo "$as_me:22229: \"$ac_link\"") >&5
22230 (eval $ac_link) 2>&5
22231 ac_status=$?
22232 echo "$as_me:22232: \$? = $ac_status" >&5
22233 (exit "$ac_status"); } &&
22234 { ac_try='test -s "conftest$ac_exeext"'
22235 { (eval echo "$as_me:22235: \"$ac_try\"") >&5
22236 (eval $ac_try) 2>&5
22237 ac_status=$?
22238 echo "$as_me:22238: \$? = $ac_status" >&5
22239 (exit "$ac_status"); }; }; then
22240 ac_cv_lib_dnet_dnet_ntoa=yes
22241 else
22242 echo "$as_me: failed program was:" >&5
22243 cat "conftest.$ac_ext" >&5
22244 ac_cv_lib_dnet_dnet_ntoa=no
22245 fi
22246 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22247 LIBS=$ac_check_lib_save_LIBS
22248 fi
22249 echo "$as_me:22249: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
22250 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
22251 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
22252 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
22253 fi
22254
22255 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
22256 echo "$as_me:22256: checking for dnet_ntoa in -ldnet_stub" >&5
22257 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
22258 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
22259 echo $ECHO_N "(cached) $ECHO_C" >&6
22260 else
22261 ac_check_lib_save_LIBS=$LIBS
22262 LIBS="-ldnet_stub $LIBS"
22263 cat >"conftest.$ac_ext" <<_ACEOF
22264 #line 22264 "configure"
22265 #include "confdefs.h"
22266
22267 /* Override any gcc2 internal prototype to avoid an error. */
22268 #ifdef __cplusplus
22269 extern "C"
22270 #endif
22271 /* We use char because int might match the return type of a gcc2
22272 builtin and then its argument prototype would still apply. */
22273 char dnet_ntoa (void);
22274 int
22275 main (void)
22276 {
22277 dnet_ntoa ();
22278 ;
22279 return 0;
22280 }
22281 _ACEOF
22282 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22283 if { (eval echo "$as_me:22283: \"$ac_link\"") >&5
22284 (eval $ac_link) 2>&5
22285 ac_status=$?
22286 echo "$as_me:22286: \$? = $ac_status" >&5
22287 (exit "$ac_status"); } &&
22288 { ac_try='test -s "conftest$ac_exeext"'
22289 { (eval echo "$as_me:22289: \"$ac_try\"") >&5
22290 (eval $ac_try) 2>&5
22291 ac_status=$?
22292 echo "$as_me:22292: \$? = $ac_status" >&5
22293 (exit "$ac_status"); }; }; then
22294 ac_cv_lib_dnet_stub_dnet_ntoa=yes
22295 else
22296 echo "$as_me: failed program was:" >&5
22297 cat "conftest.$ac_ext" >&5
22298 ac_cv_lib_dnet_stub_dnet_ntoa=no
22299 fi
22300 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22301 LIBS=$ac_check_lib_save_LIBS
22302 fi
22303 echo "$as_me:22303: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
22304 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
22305 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
22306 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
22307 fi
22308
22309 fi
22310 fi
22311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22312 LIBS="$ac_xsave_LIBS"
22313
22314 # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
22315 # to get the SysV transport functions.
22316 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
22317 # needs -lnsl.
22318 # The nsl library prevents programs from opening the X display
22319 # on Irix 5.2, according to T.E. Dickey.
22320 # The functions gethostbyname, getservbyname, and inet_addr are
22321 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
22322 echo "$as_me:22322: checking for gethostbyname" >&5
22323 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
22324 if test "${ac_cv_func_gethostbyname+set}" = set; then
22325 echo $ECHO_N "(cached) $ECHO_C" >&6
22326 else
22327 cat >"conftest.$ac_ext" <<_ACEOF
22328 #line 22328 "configure"
22329 #include "confdefs.h"
22330 #define gethostbyname autoconf_temporary
22331 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22332 #undef gethostbyname
22333
22334 #ifdef __cplusplus
22335 extern "C"
22336 #endif
22337
22338 /* We use char because int might match the return type of a gcc2
22339 builtin and then its argument prototype would still apply. */
22340 char gethostbyname (void);
22341
22342 int
22343 main (void)
22344 {
22345
22346 /* The GNU C library defines stubs for functions which it implements
22347 to always fail with ENOSYS. Some functions are actually named
22348 something starting with __ and the normal name is an alias. */
22349 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
22350 #error found stub for gethostbyname
22351 #endif
22352
22353 return gethostbyname ();
22354 ;
22355 return 0;
22356 }
22357 _ACEOF
22358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22359 if { (eval echo "$as_me:22359: \"$ac_link\"") >&5
22360 (eval $ac_link) 2>&5
22361 ac_status=$?
22362 echo "$as_me:22362: \$? = $ac_status" >&5
22363 (exit "$ac_status"); } &&
22364 { ac_try='test -s "conftest$ac_exeext"'
22365 { (eval echo "$as_me:22365: \"$ac_try\"") >&5
22366 (eval $ac_try) 2>&5
22367 ac_status=$?
22368 echo "$as_me:22368: \$? = $ac_status" >&5
22369 (exit "$ac_status"); }; }; then
22370 ac_cv_func_gethostbyname=yes
22371 else
22372 echo "$as_me: failed program was:" >&5
22373 cat "conftest.$ac_ext" >&5
22374 ac_cv_func_gethostbyname=no
22375 fi
22376 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22377 fi
22378 echo "$as_me:22378: result: $ac_cv_func_gethostbyname" >&5
22379 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
22380
22381 if test $ac_cv_func_gethostbyname = no; then
22382 echo "$as_me:22382: checking for gethostbyname in -lnsl" >&5
22383 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
22384 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
22385 echo $ECHO_N "(cached) $ECHO_C" >&6
22386 else
22387 ac_check_lib_save_LIBS=$LIBS
22388 LIBS="-lnsl $LIBS"
22389 cat >"conftest.$ac_ext" <<_ACEOF
22390 #line 22390 "configure"
22391 #include "confdefs.h"
22392
22393 /* Override any gcc2 internal prototype to avoid an error. */
22394 #ifdef __cplusplus
22395 extern "C"
22396 #endif
22397 /* We use char because int might match the return type of a gcc2
22398 builtin and then its argument prototype would still apply. */
22399 char gethostbyname (void);
22400 int
22401 main (void)
22402 {
22403 gethostbyname ();
22404 ;
22405 return 0;
22406 }
22407 _ACEOF
22408 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22409 if { (eval echo "$as_me:22409: \"$ac_link\"") >&5
22410 (eval $ac_link) 2>&5
22411 ac_status=$?
22412 echo "$as_me:22412: \$? = $ac_status" >&5
22413 (exit "$ac_status"); } &&
22414 { ac_try='test -s "conftest$ac_exeext"'
22415 { (eval echo "$as_me:22415: \"$ac_try\"") >&5
22416 (eval $ac_try) 2>&5
22417 ac_status=$?
22418 echo "$as_me:22418: \$? = $ac_status" >&5
22419 (exit "$ac_status"); }; }; then
22420 ac_cv_lib_nsl_gethostbyname=yes
22421 else
22422 echo "$as_me: failed program was:" >&5
22423 cat "conftest.$ac_ext" >&5
22424 ac_cv_lib_nsl_gethostbyname=no
22425 fi
22426 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22427 LIBS=$ac_check_lib_save_LIBS
22428 fi
22429 echo "$as_me:22429: result: $ac_cv_lib_nsl_gethostbyname" >&5
22430 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
22431 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
22432 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
22433 fi
22434
22435 if test $ac_cv_lib_nsl_gethostbyname = no; then
22436 echo "$as_me:22436: checking for gethostbyname in -lbsd" >&5
22437 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
22438 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
22439 echo $ECHO_N "(cached) $ECHO_C" >&6
22440 else
22441 ac_check_lib_save_LIBS=$LIBS
22442 LIBS="-lbsd $LIBS"
22443 cat >"conftest.$ac_ext" <<_ACEOF
22444 #line 22444 "configure"
22445 #include "confdefs.h"
22446
22447 /* Override any gcc2 internal prototype to avoid an error. */
22448 #ifdef __cplusplus
22449 extern "C"
22450 #endif
22451 /* We use char because int might match the return type of a gcc2
22452 builtin and then its argument prototype would still apply. */
22453 char gethostbyname (void);
22454 int
22455 main (void)
22456 {
22457 gethostbyname ();
22458 ;
22459 return 0;
22460 }
22461 _ACEOF
22462 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22463 if { (eval echo "$as_me:22463: \"$ac_link\"") >&5
22464 (eval $ac_link) 2>&5
22465 ac_status=$?
22466 echo "$as_me:22466: \$? = $ac_status" >&5
22467 (exit "$ac_status"); } &&
22468 { ac_try='test -s "conftest$ac_exeext"'
22469 { (eval echo "$as_me:22469: \"$ac_try\"") >&5
22470 (eval $ac_try) 2>&5
22471 ac_status=$?
22472 echo "$as_me:22472: \$? = $ac_status" >&5
22473 (exit "$ac_status"); }; }; then
22474 ac_cv_lib_bsd_gethostbyname=yes
22475 else
22476 echo "$as_me: failed program was:" >&5
22477 cat "conftest.$ac_ext" >&5
22478 ac_cv_lib_bsd_gethostbyname=no
22479 fi
22480 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22481 LIBS=$ac_check_lib_save_LIBS
22482 fi
22483 echo "$as_me:22483: result: $ac_cv_lib_bsd_gethostbyname" >&5
22484 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
22485 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
22486 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
22487 fi
22488
22489 fi
22490 fi
22491
22492 # [email protected] says without -lsocket,
22493 # socket/setsockopt and other routines are undefined under SCO ODT
22494 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
22495 # on later versions), says Simon Leinen: it contains gethostby*
22496 # variants that don't use the nameserver (or something). -lsocket
22497 # must be given before -lnsl if both are needed. We assume that
22498 # if connect needs -lnsl, so does gethostbyname.
22499 echo "$as_me:22499: checking for connect" >&5
22500 echo $ECHO_N "checking for connect... $ECHO_C" >&6
22501 if test "${ac_cv_func_connect+set}" = set; then
22502 echo $ECHO_N "(cached) $ECHO_C" >&6
22503 else
22504 cat >"conftest.$ac_ext" <<_ACEOF
22505 #line 22505 "configure"
22506 #include "confdefs.h"
22507 #define connect autoconf_temporary
22508 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22509 #undef connect
22510
22511 #ifdef __cplusplus
22512 extern "C"
22513 #endif
22514
22515 /* We use char because int might match the return type of a gcc2
22516 builtin and then its argument prototype would still apply. */
22517 char connect (void);
22518
22519 int
22520 main (void)
22521 {
22522
22523 /* The GNU C library defines stubs for functions which it implements
22524 to always fail with ENOSYS. Some functions are actually named
22525 something starting with __ and the normal name is an alias. */
22526 #if defined (__stub_connect) || defined (__stub___connect)
22527 #error found stub for connect
22528 #endif
22529
22530 return connect ();
22531 ;
22532 return 0;
22533 }
22534 _ACEOF
22535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22536 if { (eval echo "$as_me:22536: \"$ac_link\"") >&5
22537 (eval $ac_link) 2>&5
22538 ac_status=$?
22539 echo "$as_me:22539: \$? = $ac_status" >&5
22540 (exit "$ac_status"); } &&
22541 { ac_try='test -s "conftest$ac_exeext"'
22542 { (eval echo "$as_me:22542: \"$ac_try\"") >&5
22543 (eval $ac_try) 2>&5
22544 ac_status=$?
22545 echo "$as_me:22545: \$? = $ac_status" >&5
22546 (exit "$ac_status"); }; }; then
22547 ac_cv_func_connect=yes
22548 else
22549 echo "$as_me: failed program was:" >&5
22550 cat "conftest.$ac_ext" >&5
22551 ac_cv_func_connect=no
22552 fi
22553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22554 fi
22555 echo "$as_me:22555: result: $ac_cv_func_connect" >&5
22556 echo "${ECHO_T}$ac_cv_func_connect" >&6
22557
22558 if test $ac_cv_func_connect = no; then
22559 echo "$as_me:22559: checking for connect in -lsocket" >&5
22560 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
22561 if test "${ac_cv_lib_socket_connect+set}" = set; then
22562 echo $ECHO_N "(cached) $ECHO_C" >&6
22563 else
22564 ac_check_lib_save_LIBS=$LIBS
22565 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
22566 cat >"conftest.$ac_ext" <<_ACEOF
22567 #line 22567 "configure"
22568 #include "confdefs.h"
22569
22570 /* Override any gcc2 internal prototype to avoid an error. */
22571 #ifdef __cplusplus
22572 extern "C"
22573 #endif
22574 /* We use char because int might match the return type of a gcc2
22575 builtin and then its argument prototype would still apply. */
22576 char connect (void);
22577 int
22578 main (void)
22579 {
22580 connect ();
22581 ;
22582 return 0;
22583 }
22584 _ACEOF
22585 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22586 if { (eval echo "$as_me:22586: \"$ac_link\"") >&5
22587 (eval $ac_link) 2>&5
22588 ac_status=$?
22589 echo "$as_me:22589: \$? = $ac_status" >&5
22590 (exit "$ac_status"); } &&
22591 { ac_try='test -s "conftest$ac_exeext"'
22592 { (eval echo "$as_me:22592: \"$ac_try\"") >&5
22593 (eval $ac_try) 2>&5
22594 ac_status=$?
22595 echo "$as_me:22595: \$? = $ac_status" >&5
22596 (exit "$ac_status"); }; }; then
22597 ac_cv_lib_socket_connect=yes
22598 else
22599 echo "$as_me: failed program was:" >&5
22600 cat "conftest.$ac_ext" >&5
22601 ac_cv_lib_socket_connect=no
22602 fi
22603 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22604 LIBS=$ac_check_lib_save_LIBS
22605 fi
22606 echo "$as_me:22606: result: $ac_cv_lib_socket_connect" >&5
22607 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
22608 if test "$ac_cv_lib_socket_connect" = yes; then
22609 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
22610 fi
22611
22612 fi
22613
22614 # Guillermo Gomez says -lposix is necessary on A/UX.
22615 echo "$as_me:22615: checking for remove" >&5
22616 echo $ECHO_N "checking for remove... $ECHO_C" >&6
22617 if test "${ac_cv_func_remove+set}" = set; then
22618 echo $ECHO_N "(cached) $ECHO_C" >&6
22619 else
22620 cat >"conftest.$ac_ext" <<_ACEOF
22621 #line 22621 "configure"
22622 #include "confdefs.h"
22623 #define remove autoconf_temporary
22624 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22625 #undef remove
22626
22627 #ifdef __cplusplus
22628 extern "C"
22629 #endif
22630
22631 /* We use char because int might match the return type of a gcc2
22632 builtin and then its argument prototype would still apply. */
22633 char remove (void);
22634
22635 int
22636 main (void)
22637 {
22638
22639 /* The GNU C library defines stubs for functions which it implements
22640 to always fail with ENOSYS. Some functions are actually named
22641 something starting with __ and the normal name is an alias. */
22642 #if defined (__stub_remove) || defined (__stub___remove)
22643 #error found stub for remove
22644 #endif
22645
22646 return remove ();
22647 ;
22648 return 0;
22649 }
22650 _ACEOF
22651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22652 if { (eval echo "$as_me:22652: \"$ac_link\"") >&5
22653 (eval $ac_link) 2>&5
22654 ac_status=$?
22655 echo "$as_me:22655: \$? = $ac_status" >&5
22656 (exit "$ac_status"); } &&
22657 { ac_try='test -s "conftest$ac_exeext"'
22658 { (eval echo "$as_me:22658: \"$ac_try\"") >&5
22659 (eval $ac_try) 2>&5
22660 ac_status=$?
22661 echo "$as_me:22661: \$? = $ac_status" >&5
22662 (exit "$ac_status"); }; }; then
22663 ac_cv_func_remove=yes
22664 else
22665 echo "$as_me: failed program was:" >&5
22666 cat "conftest.$ac_ext" >&5
22667 ac_cv_func_remove=no
22668 fi
22669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22670 fi
22671 echo "$as_me:22671: result: $ac_cv_func_remove" >&5
22672 echo "${ECHO_T}$ac_cv_func_remove" >&6
22673
22674 if test $ac_cv_func_remove = no; then
22675 echo "$as_me:22675: checking for remove in -lposix" >&5
22676 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
22677 if test "${ac_cv_lib_posix_remove+set}" = set; then
22678 echo $ECHO_N "(cached) $ECHO_C" >&6
22679 else
22680 ac_check_lib_save_LIBS=$LIBS
22681 LIBS="-lposix $LIBS"
22682 cat >"conftest.$ac_ext" <<_ACEOF
22683 #line 22683 "configure"
22684 #include "confdefs.h"
22685
22686 /* Override any gcc2 internal prototype to avoid an error. */
22687 #ifdef __cplusplus
22688 extern "C"
22689 #endif
22690 /* We use char because int might match the return type of a gcc2
22691 builtin and then its argument prototype would still apply. */
22692 char remove (void);
22693 int
22694 main (void)
22695 {
22696 remove ();
22697 ;
22698 return 0;
22699 }
22700 _ACEOF
22701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22702 if { (eval echo "$as_me:22702: \"$ac_link\"") >&5
22703 (eval $ac_link) 2>&5
22704 ac_status=$?
22705 echo "$as_me:22705: \$? = $ac_status" >&5
22706 (exit "$ac_status"); } &&
22707 { ac_try='test -s "conftest$ac_exeext"'
22708 { (eval echo "$as_me:22708: \"$ac_try\"") >&5
22709 (eval $ac_try) 2>&5
22710 ac_status=$?
22711 echo "$as_me:22711: \$? = $ac_status" >&5
22712 (exit "$ac_status"); }; }; then
22713 ac_cv_lib_posix_remove=yes
22714 else
22715 echo "$as_me: failed program was:" >&5
22716 cat "conftest.$ac_ext" >&5
22717 ac_cv_lib_posix_remove=no
22718 fi
22719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22720 LIBS=$ac_check_lib_save_LIBS
22721 fi
22722 echo "$as_me:22722: result: $ac_cv_lib_posix_remove" >&5
22723 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
22724 if test "$ac_cv_lib_posix_remove" = yes; then
22725 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
22726 fi
22727
22728 fi
22729
22730 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
22731 echo "$as_me:22731: checking for shmat" >&5
22732 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
22733 if test "${ac_cv_func_shmat+set}" = set; then
22734 echo $ECHO_N "(cached) $ECHO_C" >&6
22735 else
22736 cat >"conftest.$ac_ext" <<_ACEOF
22737 #line 22737 "configure"
22738 #include "confdefs.h"
22739 #define shmat autoconf_temporary
22740 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22741 #undef shmat
22742
22743 #ifdef __cplusplus
22744 extern "C"
22745 #endif
22746
22747 /* We use char because int might match the return type of a gcc2
22748 builtin and then its argument prototype would still apply. */
22749 char shmat (void);
22750
22751 int
22752 main (void)
22753 {
22754
22755 /* The GNU C library defines stubs for functions which it implements
22756 to always fail with ENOSYS. Some functions are actually named
22757 something starting with __ and the normal name is an alias. */
22758 #if defined (__stub_shmat) || defined (__stub___shmat)
22759 #error found stub for shmat
22760 #endif
22761
22762 return shmat ();
22763 ;
22764 return 0;
22765 }
22766 _ACEOF
22767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22768 if { (eval echo "$as_me:22768: \"$ac_link\"") >&5
22769 (eval $ac_link) 2>&5
22770 ac_status=$?
22771 echo "$as_me:22771: \$? = $ac_status" >&5
22772 (exit "$ac_status"); } &&
22773 { ac_try='test -s "conftest$ac_exeext"'
22774 { (eval echo "$as_me:22774: \"$ac_try\"") >&5
22775 (eval $ac_try) 2>&5
22776 ac_status=$?
22777 echo "$as_me:22777: \$? = $ac_status" >&5
22778 (exit "$ac_status"); }; }; then
22779 ac_cv_func_shmat=yes
22780 else
22781 echo "$as_me: failed program was:" >&5
22782 cat "conftest.$ac_ext" >&5
22783 ac_cv_func_shmat=no
22784 fi
22785 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22786 fi
22787 echo "$as_me:22787: result: $ac_cv_func_shmat" >&5
22788 echo "${ECHO_T}$ac_cv_func_shmat" >&6
22789
22790 if test $ac_cv_func_shmat = no; then
22791 echo "$as_me:22791: checking for shmat in -lipc" >&5
22792 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
22793 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
22794 echo $ECHO_N "(cached) $ECHO_C" >&6
22795 else
22796 ac_check_lib_save_LIBS=$LIBS
22797 LIBS="-lipc $LIBS"
22798 cat >"conftest.$ac_ext" <<_ACEOF
22799 #line 22799 "configure"
22800 #include "confdefs.h"
22801
22802 /* Override any gcc2 internal prototype to avoid an error. */
22803 #ifdef __cplusplus
22804 extern "C"
22805 #endif
22806 /* We use char because int might match the return type of a gcc2
22807 builtin and then its argument prototype would still apply. */
22808 char shmat (void);
22809 int
22810 main (void)
22811 {
22812 shmat ();
22813 ;
22814 return 0;
22815 }
22816 _ACEOF
22817 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22818 if { (eval echo "$as_me:22818: \"$ac_link\"") >&5
22819 (eval $ac_link) 2>&5
22820 ac_status=$?
22821 echo "$as_me:22821: \$? = $ac_status" >&5
22822 (exit "$ac_status"); } &&
22823 { ac_try='test -s "conftest$ac_exeext"'
22824 { (eval echo "$as_me:22824: \"$ac_try\"") >&5
22825 (eval $ac_try) 2>&5
22826 ac_status=$?
22827 echo "$as_me:22827: \$? = $ac_status" >&5
22828 (exit "$ac_status"); }; }; then
22829 ac_cv_lib_ipc_shmat=yes
22830 else
22831 echo "$as_me: failed program was:" >&5
22832 cat "conftest.$ac_ext" >&5
22833 ac_cv_lib_ipc_shmat=no
22834 fi
22835 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22836 LIBS=$ac_check_lib_save_LIBS
22837 fi
22838 echo "$as_me:22838: result: $ac_cv_lib_ipc_shmat" >&5
22839 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
22840 if test "$ac_cv_lib_ipc_shmat" = yes; then
22841 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
22842 fi
22843
22844 fi
22845 fi
22846
22847 # Check for libraries that X11R6 Xt/Xaw programs need.
22848 ac_save_LDFLAGS=$LDFLAGS
22849 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
22850 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
22851 # check for ICE first), but we must link in the order -lSM -lICE or
22852 # we get undefined symbols. So assume we have SM if we have ICE.
22853 # These have to be linked with before -lX11, unlike the other
22854 # libraries we check for below, so use a different variable.
22855 # John Interrante, Karl Berry
22856 echo "$as_me:22856: checking for IceConnectionNumber in -lICE" >&5
22857 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
22858 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
22859 echo $ECHO_N "(cached) $ECHO_C" >&6
22860 else
22861 ac_check_lib_save_LIBS=$LIBS
22862 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
22863 cat >"conftest.$ac_ext" <<_ACEOF
22864 #line 22864 "configure"
22865 #include "confdefs.h"
22866
22867 /* Override any gcc2 internal prototype to avoid an error. */
22868 #ifdef __cplusplus
22869 extern "C"
22870 #endif
22871 /* We use char because int might match the return type of a gcc2
22872 builtin and then its argument prototype would still apply. */
22873 char IceConnectionNumber (void);
22874 int
22875 main (void)
22876 {
22877 IceConnectionNumber ();
22878 ;
22879 return 0;
22880 }
22881 _ACEOF
22882 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22883 if { (eval echo "$as_me:22883: \"$ac_link\"") >&5
22884 (eval $ac_link) 2>&5
22885 ac_status=$?
22886 echo "$as_me:22886: \$? = $ac_status" >&5
22887 (exit "$ac_status"); } &&
22888 { ac_try='test -s "conftest$ac_exeext"'
22889 { (eval echo "$as_me:22889: \"$ac_try\"") >&5
22890 (eval $ac_try) 2>&5
22891 ac_status=$?
22892 echo "$as_me:22892: \$? = $ac_status" >&5
22893 (exit "$ac_status"); }; }; then
22894 ac_cv_lib_ICE_IceConnectionNumber=yes
22895 else
22896 echo "$as_me: failed program was:" >&5
22897 cat "conftest.$ac_ext" >&5
22898 ac_cv_lib_ICE_IceConnectionNumber=no
22899 fi
22900 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22901 LIBS=$ac_check_lib_save_LIBS
22902 fi
22903 echo "$as_me:22903: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
22904 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
22905 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
22906 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
22907 fi
22908
22909 LDFLAGS=$ac_save_LDFLAGS
22910
22911 fi
22912
22913 fi
22914
22915 if test "$GCC" = yes || test "$GXX" = yes
22916 then
22917
22918 if test "$GCC" = yes || test "$GXX" = yes
22919 then
22920 case $CFLAGS in
22921 (*-Werror=*)
22922 cf_temp_flags=
22923 for cf_temp_scan in $CFLAGS
22924 do
22925 case "x$cf_temp_scan" in
22926 (x-Werror=format*)
22927
22928 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22929 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22930
22931 ;;
22932 (x-Werror=*)
22933
22934 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22935 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22936
22937 ;;
22938 (*)
22939
22940 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22941 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22942
22943 ;;
22944 esac
22945 done
22946 if test "x$CFLAGS" != "x$cf_temp_flags"
22947 then
22948 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
22949
22950 echo "${as_me:-configure}:22950: testing repairing CFLAGS: $CFLAGS ..." 1>&5
22951
22952 CFLAGS="$cf_temp_flags"
22953 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
22954
22955 echo "${as_me:-configure}:22955: testing ... fixed $CFLAGS ..." 1>&5
22956
22957 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22958
22959 echo "${as_me:-configure}:22959: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22960
22961 fi
22962 ;;
22963 esac
22964 fi
22965
22966 if test "$GCC" = yes || test "$GXX" = yes
22967 then
22968 case $CPPFLAGS in
22969 (*-Werror=*)
22970 cf_temp_flags=
22971 for cf_temp_scan in $CPPFLAGS
22972 do
22973 case "x$cf_temp_scan" in
22974 (x-Werror=format*)
22975
22976 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22977 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22978
22979 ;;
22980 (x-Werror=*)
22981
22982 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22983 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22984
22985 ;;
22986 (*)
22987
22988 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22989 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22990
22991 ;;
22992 esac
22993 done
22994 if test "x$CPPFLAGS" != "x$cf_temp_flags"
22995 then
22996 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
22997
22998 echo "${as_me:-configure}:22998: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
22999
23000 CPPFLAGS="$cf_temp_flags"
23001 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
23002
23003 echo "${as_me:-configure}:23003: testing ... fixed $CPPFLAGS ..." 1>&5
23004
23005 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
23006
23007 echo "${as_me:-configure}:23007: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23008
23009 fi
23010 ;;
23011 esac
23012 fi
23013
23014 if test "$GCC" = yes || test "$GXX" = yes
23015 then
23016 case $LDFLAGS in
23017 (*-Werror=*)
23018 cf_temp_flags=
23019 for cf_temp_scan in $LDFLAGS
23020 do
23021 case "x$cf_temp_scan" in
23022 (x-Werror=format*)
23023
23024 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23025 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23026
23027 ;;
23028 (x-Werror=*)
23029
23030 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23031 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23032
23033 ;;
23034 (*)
23035
23036 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23037 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23038
23039 ;;
23040 esac
23041 done
23042 if test "x$LDFLAGS" != "x$cf_temp_flags"
23043 then
23044 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
23045
23046 echo "${as_me:-configure}:23046: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
23047
23048 LDFLAGS="$cf_temp_flags"
23049 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
23050
23051 echo "${as_me:-configure}:23051: testing ... fixed $LDFLAGS ..." 1>&5
23052
23053 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
23054
23055 echo "${as_me:-configure}:23055: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23056
23057 fi
23058 ;;
23059 esac
23060 fi
23061
23062 echo "$as_me:23062: checking if you want to turn on gcc warnings" >&5
23063 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
23064
23065 # Check whether --enable-warnings or --disable-warnings was given.
23066 if test "${enable_warnings+set}" = set; then
23067 enableval="$enable_warnings"
23068 test "$enableval" != yes && enableval=no
23069 if test "$enableval" != "no" ; then
23070 enable_warnings=yes
23071 else
23072 enable_warnings=no
23073 fi
23074 else
23075 enableval=no
23076 enable_warnings=no
23077
23078 fi;
23079 echo "$as_me:23079: result: $enable_warnings" >&5
23080 echo "${ECHO_T}$enable_warnings" >&6
23081 if test "$enable_warnings" = "yes"
23082 then
23083
23084 if test "$GCC" = yes || test "$GXX" = yes
23085 then
23086 cat > conftest.i <<EOF
23087 #ifndef GCC_PRINTF
23088 #define GCC_PRINTF 0
23089 #endif
23090 #ifndef GCC_SCANF
23091 #define GCC_SCANF 0
23092 #endif
23093 #ifndef GCC_NORETURN
23094 #define GCC_NORETURN /* nothing */
23095 #endif
23096 #ifndef GCC_UNUSED
23097 #define GCC_UNUSED /* nothing */
23098 #endif
23099 EOF
23100 if test "$GCC" = yes
23101 then
23102 echo "$as_me:23102: checking for $CC __attribute__ directives" >&5
23103 echo $ECHO_N "checking for $CC __attribute__ directives... $ECHO_C" >&6
23104 test -n "$verbose" && echo "$as_me:23104: result: " >&5
23105 echo "${ECHO_T}" >&6
23106 cat > "conftest.$ac_ext" <<EOF
23107 #line 23107 "${as_me:-configure}"
23108 #include <stdio.h>
23109 #include "confdefs.h"
23110 #include "conftest.h"
23111 #include "conftest.i"
23112 #if GCC_PRINTF
23113 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
23114 #else
23115 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
23116 #endif
23117 #if GCC_SCANF
23118 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
23119 #else
23120 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
23121 #endif
23122 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
23123 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
23124 extern GCC_NORETURN void foo(void);
23125 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
23126 EOF
23127 cf_printf_attribute=no
23128 cf_scanf_attribute=no
23129 for cf_attribute in scanf printf unused noreturn
23130 do
23131
23132 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23133
23134 cf_directive="__attribute__(($cf_attribute))"
23135 echo "checking for $CC $cf_directive" 1>&5
23136
23137 case "$cf_attribute" in
23138 (printf)
23139 cf_printf_attribute=yes
23140 cat >conftest.h <<EOF
23141 #define GCC_$cf_ATTRIBUTE 1
23142 EOF
23143 ;;
23144 (scanf)
23145 cf_scanf_attribute=yes
23146 cat >conftest.h <<EOF
23147 #define GCC_$cf_ATTRIBUTE 1
23148 EOF
23149 ;;
23150 (*)
23151 cat >conftest.h <<EOF
23152 #define GCC_$cf_ATTRIBUTE $cf_directive
23153 EOF
23154 ;;
23155 esac
23156
23157 if { (eval echo "$as_me:23157: \"$ac_compile\"") >&5
23158 (eval $ac_compile) 2>&5
23159 ac_status=$?
23160 echo "$as_me:23160: \$? = $ac_status" >&5
23161 (exit "$ac_status"); }; then
23162 test -n "$verbose" && echo "$as_me:23162: result: ... $cf_attribute" >&5
23163 echo "${ECHO_T}... $cf_attribute" >&6
23164 cat conftest.h >>confdefs.h
23165 case "$cf_attribute" in
23166 (noreturn)
23167
23168 cat >>confdefs.h <<EOF
23169 #define GCC_NORETURN $cf_directive
23170 EOF
23171
23172 ;;
23173 (printf)
23174 cf_value='/* nothing */'
23175 if test "$cf_printf_attribute" != no ; then
23176 cf_value='__attribute__((format(printf,fmt,var)))'
23177
23178 cat >>confdefs.h <<\EOF
23179 #define GCC_PRINTF 1
23180 EOF
23181
23182 fi
23183
23184 cat >>confdefs.h <<EOF
23185 #define GCC_PRINTFLIKE(fmt,var) $cf_value
23186 EOF
23187
23188 ;;
23189 (scanf)
23190 cf_value='/* nothing */'
23191 if test "$cf_scanf_attribute" != no ; then
23192 cf_value='__attribute__((format(scanf,fmt,var)))'
23193
23194 cat >>confdefs.h <<\EOF
23195 #define GCC_SCANF 1
23196 EOF
23197
23198 fi
23199
23200 cat >>confdefs.h <<EOF
23201 #define GCC_SCANFLIKE(fmt,var) $cf_value
23202 EOF
23203
23204 ;;
23205 (unused)
23206
23207 cat >>confdefs.h <<EOF
23208 #define GCC_UNUSED $cf_directive
23209 EOF
23210
23211 ;;
23212 esac
23213 fi
23214 done
23215 else
23216 ${FGREP-fgrep} define conftest.i >>confdefs.h
23217 fi
23218 rm -rf ./conftest*
23219 fi
23220
23221 if test "x$have_x" = xyes; then
23222
23223 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
23224 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
23225 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
23226 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
23227 for cf_X_CFLAGS in $X_CFLAGS
23228 do
23229 case "x$cf_X_CFLAGS" in
23230 x-[IUD]*)
23231 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
23232 ;;
23233 *)
23234 CFLAGS="$CFLAGS $cf_X_CFLAGS"
23235 ;;
23236 esac
23237 done
23238
23239 cat >"conftest.$ac_ext" <<_ACEOF
23240 #line 23240 "configure"
23241 #include "confdefs.h"
23242
23243 $ac_includes_default
23244 #include <X11/Intrinsic.h>
23245
23246 int
23247 main (void)
23248 {
23249 String foo = malloc(1); free((void*)foo)
23250 ;
23251 return 0;
23252 }
23253 _ACEOF
23254 rm -f "conftest.$ac_objext"
23255 if { (eval echo "$as_me:23255: \"$ac_compile\"") >&5
23256 (eval $ac_compile) 2>&5
23257 ac_status=$?
23258 echo "$as_me:23258: \$? = $ac_status" >&5
23259 (exit "$ac_status"); } &&
23260 { ac_try='test -s "conftest.$ac_objext"'
23261 { (eval echo "$as_me:23261: \"$ac_try\"") >&5
23262 (eval $ac_try) 2>&5
23263 ac_status=$?
23264 echo "$as_me:23264: \$? = $ac_status" >&5
23265 (exit "$ac_status"); }; }; then
23266
23267 echo "$as_me:23267: checking for X11/Xt const-feature" >&5
23268 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
23269 if test "${cf_cv_const_x_string+set}" = set; then
23270 echo $ECHO_N "(cached) $ECHO_C" >&6
23271 else
23272
23273 cat >"conftest.$ac_ext" <<_ACEOF
23274 #line 23274 "configure"
23275 #include "confdefs.h"
23276
23277 #undef _CONST_X_STRING
23278 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
23279 #undef XTSTRINGDEFINES /* X11R5 and later */
23280 $ac_includes_default
23281 #include <X11/Intrinsic.h>
23282
23283 int
23284 main (void)
23285 {
23286 String foo = malloc(1); *foo = 0
23287 ;
23288 return 0;
23289 }
23290 _ACEOF
23291 rm -f "conftest.$ac_objext"
23292 if { (eval echo "$as_me:23292: \"$ac_compile\"") >&5
23293 (eval $ac_compile) 2>&5
23294 ac_status=$?
23295 echo "$as_me:23295: \$? = $ac_status" >&5
23296 (exit "$ac_status"); } &&
23297 { ac_try='test -s "conftest.$ac_objext"'
23298 { (eval echo "$as_me:23298: \"$ac_try\"") >&5
23299 (eval $ac_try) 2>&5
23300 ac_status=$?
23301 echo "$as_me:23301: \$? = $ac_status" >&5
23302 (exit "$ac_status"); }; }; then
23303
23304 cf_cv_const_x_string=no
23305
23306 else
23307 echo "$as_me: failed program was:" >&5
23308 cat "conftest.$ac_ext" >&5
23309
23310 cf_cv_const_x_string=yes
23311
23312 fi
23313 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23314
23315 fi
23316 echo "$as_me:23316: result: $cf_cv_const_x_string" >&5
23317 echo "${ECHO_T}$cf_cv_const_x_string" >&6
23318
23319 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
23320 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
23321 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
23322
23323 case "$cf_cv_const_x_string" in
23324 (no)
23325
23326 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23327 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
23328
23329 ;;
23330 (*)
23331
23332 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23333 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
23334
23335 ;;
23336 esac
23337
23338 else
23339 echo "$as_me: failed program was:" >&5
23340 cat "conftest.$ac_ext" >&5
23341 fi
23342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23343 fi
23344 cat > "conftest.$ac_ext" <<EOF
23345 #line 23345 "${as_me:-configure}"
23346 int main(int argc, char *argv[]) { return (argv[argc-1] == (char*)0) ; }
23347 EOF
23348 if test "$INTEL_COMPILER" = yes
23349 then
23350 # The "-wdXXX" options suppress warnings:
23351 # remark #1419: external declaration in primary source file
23352 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
23353 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
23354 # remark #193: zero used for undefined preprocessing identifier
23355 # remark #593: variable "curs_sb_left_arrow" was set but never used
23356 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
23357 # remark #869: parameter "tw" was never referenced
23358 # remark #981: operands are evaluated in unspecified order
23359 # warning #279: controlling expression is constant
23360
23361 echo "$as_me:23361: checking for $CC warning options" >&5
23362 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
23363 test -n "$verbose" && echo "$as_me:23363: result: " >&5
23364 echo "${ECHO_T}" >&6
23365 cf_save_CFLAGS="$CFLAGS"
23366 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
23367 for cf_opt in \
23368 wd1419 \
23369 wd1683 \
23370 wd1684 \
23371 wd193 \
23372 wd593 \
23373 wd279 \
23374 wd810 \
23375 wd869 \
23376 wd981
23377 do
23378 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
23379 if { (eval echo "$as_me:23379: \"$ac_compile\"") >&5
23380 (eval $ac_compile) 2>&5
23381 ac_status=$?
23382 echo "$as_me:23382: \$? = $ac_status" >&5
23383 (exit "$ac_status"); }; then
23384 test -n "$verbose" && echo "$as_me:23384: result: ... -$cf_opt" >&5
23385 echo "${ECHO_T}... -$cf_opt" >&6
23386 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
23387 fi
23388 done
23389 CFLAGS="$cf_save_CFLAGS"
23390 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
23391 then
23392 echo "$as_me:23392: checking for $CC warning options" >&5
23393 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
23394 test -n "$verbose" && echo "$as_me:23394: result: " >&5
23395 echo "${ECHO_T}" >&6
23396 cf_save_CFLAGS="$CFLAGS"
23397 cf_warn_CONST=""
23398 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
23399 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
23400 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
23401 for cf_opt in W Wall \
23402 Wbad-function-cast \
23403 Wcast-align \
23404 Wcast-qual \
23405 Wdeclaration-after-statement \
23406 Wextra \
23407 Winline \
23408 Wmissing-declarations \
23409 Wmissing-prototypes \
23410 Wnested-externs \
23411 Wpointer-arith \
23412 Wshadow \
23413 Wstrict-prototypes \
23414 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
23415 do
23416 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
23417 if { (eval echo "$as_me:23417: \"$ac_compile\"") >&5
23418 (eval $ac_compile) 2>&5
23419 ac_status=$?
23420 echo "$as_me:23420: \$? = $ac_status" >&5
23421 (exit "$ac_status"); }; then
23422 test -n "$verbose" && echo "$as_me:23422: result: ... -$cf_opt" >&5
23423 echo "${ECHO_T}... -$cf_opt" >&6
23424 case "$cf_opt" in
23425 (Winline)
23426 case "$GCC_VERSION" in
23427 ([34].*)
23428 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
23429
23430 echo "${as_me:-configure}:23430: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
23431
23432 continue;;
23433 esac
23434 ;;
23435 (Wpointer-arith)
23436 case "$GCC_VERSION" in
23437 ([12].*)
23438 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
23439
23440 echo "${as_me:-configure}:23440: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
23441
23442 continue;;
23443 esac
23444 ;;
23445 esac
23446 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
23447 fi
23448 done
23449 CFLAGS="$cf_save_CFLAGS"
23450 fi
23451 rm -rf ./conftest*
23452
23453 fi
23454
23455 fi
23456
23457 echo "$as_me:23457: checking if you want to use dmalloc for testing" >&5
23458 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
23459
23460 # Check whether --with-dmalloc or --without-dmalloc was given.
23461 if test "${with_dmalloc+set}" = set; then
23462 withval="$with_dmalloc"
23463 case "x$withval" in
23464 (x|xno) ;;
23465 (*)
23466 : "${with_cflags:=-g}"
23467 : "${enable_leaks:=no}"
23468 with_dmalloc=yes
23469
23470 cat >>confdefs.h <<EOF
23471 #define USE_DMALLOC 1
23472 EOF
23473
23474 ;;
23475 esac
23476 else
23477 with_dmalloc=
23478 fi;
23479 echo "$as_me:23479: result: ${with_dmalloc:-no}" >&5
23480 echo "${ECHO_T}${with_dmalloc:-no}" >&6
23481
23482 case ".$with_cflags" in
23483 (.*-g*)
23484 case .$CFLAGS in
23485 (.*-g*)
23486 ;;
23487 (*)
23488
23489 cf_fix_cppflags=no
23490 cf_new_cflags=
23491 cf_new_cppflags=
23492 cf_new_extra_cppflags=
23493
23494 for cf_add_cflags in -g
23495 do
23496 case "$cf_fix_cppflags" in
23497 (no)
23498 case "$cf_add_cflags" in
23499 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23500 case "$cf_add_cflags" in
23501 (-D*)
23502 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23503
23504 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23505 && test -z "${cf_tst_cflags}" \
23506 && cf_fix_cppflags=yes
23507
23508 if test "$cf_fix_cppflags" = yes ; then
23509
23510 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23511 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23512
23513 continue
23514 elif test "${cf_tst_cflags}" = "\"'" ; then
23515
23516 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23517 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23518
23519 continue
23520 fi
23521 ;;
23522 esac
23523 case "$CPPFLAGS" in
23524 (*$cf_add_cflags)
23525 ;;
23526 (*)
23527 case "$cf_add_cflags" in
23528 (-D*)
23529 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23530
23531 CPPFLAGS=`echo "$CPPFLAGS" | \
23532 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23533 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23534
23535 ;;
23536 esac
23537
23538 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23539 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23540
23541 ;;
23542 esac
23543 ;;
23544 (*)
23545
23546 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23547 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23548
23549 ;;
23550 esac
23551 ;;
23552 (yes)
23553
23554 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23555 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23556
23557 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23558
23559 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23560 && test -z "${cf_tst_cflags}" \
23561 && cf_fix_cppflags=no
23562 ;;
23563 esac
23564 done
23565
23566 if test -n "$cf_new_cflags" ; then
23567
23568 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23569 CFLAGS="${CFLAGS}$cf_new_cflags"
23570
23571 fi
23572
23573 if test -n "$cf_new_cppflags" ; then
23574
23575 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23576 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23577
23578 fi
23579
23580 if test -n "$cf_new_extra_cppflags" ; then
23581
23582 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23583 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23584
23585 fi
23586
23587 ;;
23588 esac
23589 ;;
23590 esac
23591
23592 if test "$with_dmalloc" = yes ; then
23593 echo "$as_me:23593: checking for dmalloc.h" >&5
23594 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
23595 if test "${ac_cv_header_dmalloc_h+set}" = set; then
23596 echo $ECHO_N "(cached) $ECHO_C" >&6
23597 else
23598 cat >"conftest.$ac_ext" <<_ACEOF
23599 #line 23599 "configure"
23600 #include "confdefs.h"
23601 #include <dmalloc.h>
23602 _ACEOF
23603 if { (eval echo "$as_me:23603: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23604 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23605 ac_status=$?
23606 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23607 rm -f conftest.er1
23608 cat conftest.err >&5
23609 echo "$as_me:23609: \$? = $ac_status" >&5
23610 (exit "$ac_status"); } >/dev/null; then
23611 if test -s conftest.err; then
23612 ac_cpp_err=$ac_c_preproc_warn_flag
23613 else
23614 ac_cpp_err=
23615 fi
23616 else
23617 ac_cpp_err=yes
23618 fi
23619 if test -z "$ac_cpp_err"; then
23620 ac_cv_header_dmalloc_h=yes
23621 else
23622 echo "$as_me: failed program was:" >&5
23623 cat "conftest.$ac_ext" >&5
23624 ac_cv_header_dmalloc_h=no
23625 fi
23626 rm -f conftest.err "conftest.$ac_ext"
23627 fi
23628 echo "$as_me:23628: result: $ac_cv_header_dmalloc_h" >&5
23629 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
23630 if test "$ac_cv_header_dmalloc_h" = yes; then
23631
23632 echo "$as_me:23632: checking for dmalloc_debug in -ldmalloc" >&5
23633 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
23634 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
23635 echo $ECHO_N "(cached) $ECHO_C" >&6
23636 else
23637 ac_check_lib_save_LIBS=$LIBS
23638 LIBS="-ldmalloc $LIBS"
23639 cat >"conftest.$ac_ext" <<_ACEOF
23640 #line 23640 "configure"
23641 #include "confdefs.h"
23642
23643 /* Override any gcc2 internal prototype to avoid an error. */
23644 #ifdef __cplusplus
23645 extern "C"
23646 #endif
23647 /* We use char because int might match the return type of a gcc2
23648 builtin and then its argument prototype would still apply. */
23649 char dmalloc_debug (void);
23650 int
23651 main (void)
23652 {
23653 dmalloc_debug ();
23654 ;
23655 return 0;
23656 }
23657 _ACEOF
23658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23659 if { (eval echo "$as_me:23659: \"$ac_link\"") >&5
23660 (eval $ac_link) 2>&5
23661 ac_status=$?
23662 echo "$as_me:23662: \$? = $ac_status" >&5
23663 (exit "$ac_status"); } &&
23664 { ac_try='test -s "conftest$ac_exeext"'
23665 { (eval echo "$as_me:23665: \"$ac_try\"") >&5
23666 (eval $ac_try) 2>&5
23667 ac_status=$?
23668 echo "$as_me:23668: \$? = $ac_status" >&5
23669 (exit "$ac_status"); }; }; then
23670 ac_cv_lib_dmalloc_dmalloc_debug=yes
23671 else
23672 echo "$as_me: failed program was:" >&5
23673 cat "conftest.$ac_ext" >&5
23674 ac_cv_lib_dmalloc_dmalloc_debug=no
23675 fi
23676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23677 LIBS=$ac_check_lib_save_LIBS
23678 fi
23679 echo "$as_me:23679: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
23680 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
23681 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
23682 cat >>confdefs.h <<EOF
23683 #define HAVE_LIBDMALLOC 1
23684 EOF
23685
23686 LIBS="-ldmalloc $LIBS"
23687
23688 fi
23689
23690 fi
23691
23692 fi
23693
23694 echo "$as_me:23694: checking if you want to use dbmalloc for testing" >&5
23695 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
23696
23697 # Check whether --with-dbmalloc or --without-dbmalloc was given.
23698 if test "${with_dbmalloc+set}" = set; then
23699 withval="$with_dbmalloc"
23700 case "x$withval" in
23701 (x|xno) ;;
23702 (*)
23703 : "${with_cflags:=-g}"
23704 : "${enable_leaks:=no}"
23705 with_dbmalloc=yes
23706
23707 cat >>confdefs.h <<EOF
23708 #define USE_DBMALLOC 1
23709 EOF
23710
23711 ;;
23712 esac
23713 else
23714 with_dbmalloc=
23715 fi;
23716 echo "$as_me:23716: result: ${with_dbmalloc:-no}" >&5
23717 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
23718
23719 case ".$with_cflags" in
23720 (.*-g*)
23721 case .$CFLAGS in
23722 (.*-g*)
23723 ;;
23724 (*)
23725
23726 cf_fix_cppflags=no
23727 cf_new_cflags=
23728 cf_new_cppflags=
23729 cf_new_extra_cppflags=
23730
23731 for cf_add_cflags in -g
23732 do
23733 case "$cf_fix_cppflags" in
23734 (no)
23735 case "$cf_add_cflags" in
23736 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23737 case "$cf_add_cflags" in
23738 (-D*)
23739 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23740
23741 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23742 && test -z "${cf_tst_cflags}" \
23743 && cf_fix_cppflags=yes
23744
23745 if test "$cf_fix_cppflags" = yes ; then
23746
23747 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23748 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23749
23750 continue
23751 elif test "${cf_tst_cflags}" = "\"'" ; then
23752
23753 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23754 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23755
23756 continue
23757 fi
23758 ;;
23759 esac
23760 case "$CPPFLAGS" in
23761 (*$cf_add_cflags)
23762 ;;
23763 (*)
23764 case "$cf_add_cflags" in
23765 (-D*)
23766 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23767
23768 CPPFLAGS=`echo "$CPPFLAGS" | \
23769 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23770 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23771
23772 ;;
23773 esac
23774
23775 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23776 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23777
23778 ;;
23779 esac
23780 ;;
23781 (*)
23782
23783 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23784 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23785
23786 ;;
23787 esac
23788 ;;
23789 (yes)
23790
23791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23793
23794 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23795
23796 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23797 && test -z "${cf_tst_cflags}" \
23798 && cf_fix_cppflags=no
23799 ;;
23800 esac
23801 done
23802
23803 if test -n "$cf_new_cflags" ; then
23804
23805 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23806 CFLAGS="${CFLAGS}$cf_new_cflags"
23807
23808 fi
23809
23810 if test -n "$cf_new_cppflags" ; then
23811
23812 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23813 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23814
23815 fi
23816
23817 if test -n "$cf_new_extra_cppflags" ; then
23818
23819 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23820 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23821
23822 fi
23823
23824 ;;
23825 esac
23826 ;;
23827 esac
23828
23829 if test "$with_dbmalloc" = yes ; then
23830 echo "$as_me:23830: checking for dbmalloc.h" >&5
23831 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
23832 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
23833 echo $ECHO_N "(cached) $ECHO_C" >&6
23834 else
23835 cat >"conftest.$ac_ext" <<_ACEOF
23836 #line 23836 "configure"
23837 #include "confdefs.h"
23838 #include <dbmalloc.h>
23839 _ACEOF
23840 if { (eval echo "$as_me:23840: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23841 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23842 ac_status=$?
23843 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23844 rm -f conftest.er1
23845 cat conftest.err >&5
23846 echo "$as_me:23846: \$? = $ac_status" >&5
23847 (exit "$ac_status"); } >/dev/null; then
23848 if test -s conftest.err; then
23849 ac_cpp_err=$ac_c_preproc_warn_flag
23850 else
23851 ac_cpp_err=
23852 fi
23853 else
23854 ac_cpp_err=yes
23855 fi
23856 if test -z "$ac_cpp_err"; then
23857 ac_cv_header_dbmalloc_h=yes
23858 else
23859 echo "$as_me: failed program was:" >&5
23860 cat "conftest.$ac_ext" >&5
23861 ac_cv_header_dbmalloc_h=no
23862 fi
23863 rm -f conftest.err "conftest.$ac_ext"
23864 fi
23865 echo "$as_me:23865: result: $ac_cv_header_dbmalloc_h" >&5
23866 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
23867 if test "$ac_cv_header_dbmalloc_h" = yes; then
23868
23869 echo "$as_me:23869: checking for debug_malloc in -ldbmalloc" >&5
23870 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
23871 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
23872 echo $ECHO_N "(cached) $ECHO_C" >&6
23873 else
23874 ac_check_lib_save_LIBS=$LIBS
23875 LIBS="-ldbmalloc $LIBS"
23876 cat >"conftest.$ac_ext" <<_ACEOF
23877 #line 23877 "configure"
23878 #include "confdefs.h"
23879
23880 /* Override any gcc2 internal prototype to avoid an error. */
23881 #ifdef __cplusplus
23882 extern "C"
23883 #endif
23884 /* We use char because int might match the return type of a gcc2
23885 builtin and then its argument prototype would still apply. */
23886 char debug_malloc (void);
23887 int
23888 main (void)
23889 {
23890 debug_malloc ();
23891 ;
23892 return 0;
23893 }
23894 _ACEOF
23895 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23896 if { (eval echo "$as_me:23896: \"$ac_link\"") >&5
23897 (eval $ac_link) 2>&5
23898 ac_status=$?
23899 echo "$as_me:23899: \$? = $ac_status" >&5
23900 (exit "$ac_status"); } &&
23901 { ac_try='test -s "conftest$ac_exeext"'
23902 { (eval echo "$as_me:23902: \"$ac_try\"") >&5
23903 (eval $ac_try) 2>&5
23904 ac_status=$?
23905 echo "$as_me:23905: \$? = $ac_status" >&5
23906 (exit "$ac_status"); }; }; then
23907 ac_cv_lib_dbmalloc_debug_malloc=yes
23908 else
23909 echo "$as_me: failed program was:" >&5
23910 cat "conftest.$ac_ext" >&5
23911 ac_cv_lib_dbmalloc_debug_malloc=no
23912 fi
23913 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23914 LIBS=$ac_check_lib_save_LIBS
23915 fi
23916 echo "$as_me:23916: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
23917 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
23918 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23919 cat >>confdefs.h <<EOF
23920 #define HAVE_LIBDBMALLOC 1
23921 EOF
23922
23923 LIBS="-ldbmalloc $LIBS"
23924
23925 fi
23926
23927 fi
23928
23929 fi
23930
23931 echo "$as_me:23931: checking if you want to use valgrind for testing" >&5
23932 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23933
23934 # Check whether --with-valgrind or --without-valgrind was given.
23935 if test "${with_valgrind+set}" = set; then
23936 withval="$with_valgrind"
23937 case "x$withval" in
23938 (x|xno) ;;
23939 (*)
23940 : "${with_cflags:=-g}"
23941 : "${enable_leaks:=no}"
23942 with_valgrind=yes
23943
23944 cat >>confdefs.h <<EOF
23945 #define USE_VALGRIND 1
23946 EOF
23947
23948 ;;
23949 esac
23950 else
23951 with_valgrind=
23952 fi;
23953 echo "$as_me:23953: result: ${with_valgrind:-no}" >&5
23954 echo "${ECHO_T}${with_valgrind:-no}" >&6
23955
23956 case ".$with_cflags" in
23957 (.*-g*)
23958 case .$CFLAGS in
23959 (.*-g*)
23960 ;;
23961 (*)
23962
23963 cf_fix_cppflags=no
23964 cf_new_cflags=
23965 cf_new_cppflags=
23966 cf_new_extra_cppflags=
23967
23968 for cf_add_cflags in -g
23969 do
23970 case "$cf_fix_cppflags" in
23971 (no)
23972 case "$cf_add_cflags" in
23973 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23974 case "$cf_add_cflags" in
23975 (-D*)
23976 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23977
23978 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23979 && test -z "${cf_tst_cflags}" \
23980 && cf_fix_cppflags=yes
23981
23982 if test "$cf_fix_cppflags" = yes ; then
23983
23984 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23985 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23986
23987 continue
23988 elif test "${cf_tst_cflags}" = "\"'" ; then
23989
23990 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23991 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23992
23993 continue
23994 fi
23995 ;;
23996 esac
23997 case "$CPPFLAGS" in
23998 (*$cf_add_cflags)
23999 ;;
24000 (*)
24001 case "$cf_add_cflags" in
24002 (-D*)
24003 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24004
24005 CPPFLAGS=`echo "$CPPFLAGS" | \
24006 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
24007 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
24008
24009 ;;
24010 esac
24011
24012 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24013 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24014
24015 ;;
24016 esac
24017 ;;
24018 (*)
24019
24020 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24021 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24022
24023 ;;
24024 esac
24025 ;;
24026 (yes)
24027
24028 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24029 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24030
24031 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
24032
24033 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24034 && test -z "${cf_tst_cflags}" \
24035 && cf_fix_cppflags=no
24036 ;;
24037 esac
24038 done
24039
24040 if test -n "$cf_new_cflags" ; then
24041
24042 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24043 CFLAGS="${CFLAGS}$cf_new_cflags"
24044
24045 fi
24046
24047 if test -n "$cf_new_cppflags" ; then
24048
24049 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24050 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24051
24052 fi
24053
24054 if test -n "$cf_new_extra_cppflags" ; then
24055
24056 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24057 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24058
24059 fi
24060
24061 ;;
24062 esac
24063 ;;
24064 esac
24065
24066 echo "$as_me:24066: checking if you want to perform memory-leak testing" >&5
24067 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
24068
24069 # Check whether --enable-leaks or --disable-leaks was given.
24070 if test "${enable_leaks+set}" = set; then
24071 enableval="$enable_leaks"
24072 enable_leaks=$enableval
24073 else
24074 enable_leaks=yes
24075 fi;
24076 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
24077 echo "$as_me:24077: result: $with_no_leaks" >&5
24078 echo "${ECHO_T}$with_no_leaks" >&6
24079
24080 if test "$enable_leaks" = no ; then
24081
24082 cat >>confdefs.h <<\EOF
24083 #define NO_LEAKS 1
24084 EOF
24085
24086 cat >>confdefs.h <<\EOF
24087 #define YY_NO_LEAKS 1
24088 EOF
24089
24090 fi
24091
24092 LD_RPATH_OPT=
24093 if test "x$cf_cv_enable_rpath" != xno
24094 then
24095 echo "$as_me:24095: checking for an rpath option" >&5
24096 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
24097 case "$cf_cv_system_name" in
24098 (irix*)
24099 if test "$GCC" = yes; then
24100 LD_RPATH_OPT="-Wl,-rpath,"
24101 else
24102 LD_RPATH_OPT="-rpath "
24103 fi
24104 ;;
24105 (linux*|gnu*|k*bsd*-gnu|freebsd*)
24106 LD_RPATH_OPT="-Wl,-rpath,"
24107 ;;
24108 (openbsd[2-9].*|mirbsd*)
24109 LD_RPATH_OPT="-Wl,-rpath,"
24110 ;;
24111 (dragonfly*)
24112 LD_RPATH_OPT="-rpath "
24113 ;;
24114 (netbsd*)
24115 LD_RPATH_OPT="-Wl,-rpath,"
24116 ;;
24117 (osf*|mls+*)
24118 LD_RPATH_OPT="-rpath "
24119 ;;
24120 (solaris2*)
24121 LD_RPATH_OPT="-R"
24122 ;;
24123 (*)
24124 ;;
24125 esac
24126 echo "$as_me:24126: result: $LD_RPATH_OPT" >&5
24127 echo "${ECHO_T}$LD_RPATH_OPT" >&6
24128
24129 case "x$LD_RPATH_OPT" in
24130 (x-R*)
24131 echo "$as_me:24131: checking if we need a space after rpath option" >&5
24132 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
24133 cf_save_LIBS="$LIBS"
24134
24135 cf_add_libs="$LIBS"
24136 # reverse order
24137 cf_add_0lib=
24138 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24139 # filter duplicates
24140 for cf_add_1lib in $cf_add_0lib; do
24141 for cf_add_2lib in $cf_add_libs; do
24142 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24143 cf_add_1lib=
24144 break
24145 fi
24146 done
24147 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24148 done
24149 LIBS="$cf_add_libs"
24150
24151 cat >"conftest.$ac_ext" <<_ACEOF
24152 #line 24152 "configure"
24153 #include "confdefs.h"
24154
24155 int
24156 main (void)
24157 {
24158
24159 ;
24160 return 0;
24161 }
24162 _ACEOF
24163 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24164 if { (eval echo "$as_me:24164: \"$ac_link\"") >&5
24165 (eval $ac_link) 2>&5
24166 ac_status=$?
24167 echo "$as_me:24167: \$? = $ac_status" >&5
24168 (exit "$ac_status"); } &&
24169 { ac_try='test -s "conftest$ac_exeext"'
24170 { (eval echo "$as_me:24170: \"$ac_try\"") >&5
24171 (eval $ac_try) 2>&5
24172 ac_status=$?
24173 echo "$as_me:24173: \$? = $ac_status" >&5
24174 (exit "$ac_status"); }; }; then
24175 cf_rpath_space=no
24176 else
24177 echo "$as_me: failed program was:" >&5
24178 cat "conftest.$ac_ext" >&5
24179 cf_rpath_space=yes
24180 fi
24181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24182 LIBS="$cf_save_LIBS"
24183 echo "$as_me:24183: result: $cf_rpath_space" >&5
24184 echo "${ECHO_T}$cf_rpath_space" >&6
24185 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
24186 ;;
24187 esac
24188 fi
24189
24190 echo "$as_me:24190: checking if rpath-hack should be disabled" >&5
24191 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24192
24193 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24194 if test "${enable_rpath_hack+set}" = set; then
24195 enableval="$enable_rpath_hack"
24196 test "$enableval" != no && enableval=yes
24197 if test "$enableval" != "yes" ; then
24198 enable_rpath_hack=no
24199 else
24200 enable_rpath_hack=yes
24201 fi
24202 else
24203 enableval=yes
24204 enable_rpath_hack=yes
24205
24206 fi;
24207 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
24208 echo "$as_me:24208: result: $cf_disable_rpath_hack" >&5
24209 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24210
24211 if test "$enable_rpath_hack" = yes ; then
24212
24213 echo "$as_me:24213: checking for updated LDFLAGS" >&5
24214 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24215 if test -n "$LD_RPATH_OPT" ; then
24216 echo "$as_me:24216: result: maybe" >&5
24217 echo "${ECHO_T}maybe" >&6
24218
24219 for ac_prog in ldd
24220 do
24221 # Extract the first word of "$ac_prog", so it can be a program name with args.
24222 set dummy $ac_prog; ac_word=$2
24223 echo "$as_me:24223: checking for $ac_word" >&5
24224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24225 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24226 echo $ECHO_N "(cached) $ECHO_C" >&6
24227 else
24228 if test -n "$cf_ldd_prog"; then
24229 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24230 else
24231 ac_save_IFS=$IFS; IFS=$ac_path_separator
24232 ac_dummy="$PATH"
24233 for ac_dir in $ac_dummy; do
24234 IFS=$ac_save_IFS
24235 test -z "$ac_dir" && ac_dir=.
24236 $as_executable_p "$ac_dir/$ac_word" || continue
24237 ac_cv_prog_cf_ldd_prog="$ac_prog"
24238 echo "$as_me:24238: found $ac_dir/$ac_word" >&5
24239 break
24240 done
24241
24242 fi
24243 fi
24244 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24245 if test -n "$cf_ldd_prog"; then
24246 echo "$as_me:24246: result: $cf_ldd_prog" >&5
24247 echo "${ECHO_T}$cf_ldd_prog" >&6
24248 else
24249 echo "$as_me:24249: result: no" >&5
24250 echo "${ECHO_T}no" >&6
24251 fi
24252
24253 test -n "$cf_ldd_prog" && break
24254 done
24255 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24256
24257 cf_rpath_list="/usr/lib /lib"
24258 if test "$cf_ldd_prog" != no
24259 then
24260 cf_rpath_oops=
24261
24262 cat >"conftest.$ac_ext" <<_ACEOF
24263 #line 24263 "configure"
24264 #include "confdefs.h"
24265 #include <stdio.h>
24266 int
24267 main (void)
24268 {
24269 printf("Hello");
24270 ;
24271 return 0;
24272 }
24273 _ACEOF
24274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24275 if { (eval echo "$as_me:24275: \"$ac_link\"") >&5
24276 (eval $ac_link) 2>&5
24277 ac_status=$?
24278 echo "$as_me:24278: \$? = $ac_status" >&5
24279 (exit "$ac_status"); } &&
24280 { ac_try='test -s "conftest$ac_exeext"'
24281 { (eval echo "$as_me:24281: \"$ac_try\"") >&5
24282 (eval $ac_try) 2>&5
24283 ac_status=$?
24284 echo "$as_me:24284: \$? = $ac_status" >&5
24285 (exit "$ac_status"); }; }; then
24286 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
24287 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
24288 else
24289 echo "$as_me: failed program was:" >&5
24290 cat "conftest.$ac_ext" >&5
24291 fi
24292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24293
24294 # If we passed the link-test, but get a "not found" on a given library,
24295 # this could be due to inept reconfiguration of gcc to make it only
24296 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
24297 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
24298 # /usr/local libraries.
24299 if test -n "$cf_rpath_oops"
24300 then
24301 for cf_rpath_src in $cf_rpath_oops
24302 do
24303 for cf_rpath_dir in \
24304 /usr/local \
24305 /usr/pkg \
24306 /opt/sfw
24307 do
24308 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
24309 then
24310 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
24311
24312 echo "${as_me:-configure}:24312: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
24313
24314 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
24315 break
24316 fi
24317 done
24318 done
24319 fi
24320 fi
24321
24322 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24323
24324 echo "${as_me:-configure}:24324: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24325
24326 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
24327
24328 echo "${as_me:-configure}:24328: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
24329
24330 cf_rpath_dst=
24331 for cf_rpath_src in $LDFLAGS
24332 do
24333 case "$cf_rpath_src" in
24334 (-L*)
24335
24336 # check if this refers to a directory which we will ignore
24337 cf_rpath_skip=no
24338 if test -n "$cf_rpath_list"
24339 then
24340 for cf_rpath_item in $cf_rpath_list
24341 do
24342 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24343 then
24344 cf_rpath_skip=yes
24345 break
24346 fi
24347 done
24348 fi
24349
24350 if test "$cf_rpath_skip" = no
24351 then
24352 # transform the option
24353 if test "$LD_RPATH_OPT" = "-R " ; then
24354 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24355 else
24356 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24357 fi
24358
24359 # if we have not already added this, add it now
24360 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24361 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24362 then
24363 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24364
24365 echo "${as_me:-configure}:24365: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24366
24367 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24368 fi
24369 fi
24370 ;;
24371 esac
24372 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24373 done
24374 LDFLAGS=$cf_rpath_dst
24375
24376 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
24377
24378 echo "${as_me:-configure}:24378: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
24379
24380 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
24381
24382 echo "${as_me:-configure}:24382: testing ...checking LIBS $LIBS ..." 1>&5
24383
24384 cf_rpath_dst=
24385 for cf_rpath_src in $LIBS
24386 do
24387 case "$cf_rpath_src" in
24388 (-L*)
24389
24390 # check if this refers to a directory which we will ignore
24391 cf_rpath_skip=no
24392 if test -n "$cf_rpath_list"
24393 then
24394 for cf_rpath_item in $cf_rpath_list
24395 do
24396 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24397 then
24398 cf_rpath_skip=yes
24399 break
24400 fi
24401 done
24402 fi
24403
24404 if test "$cf_rpath_skip" = no
24405 then
24406 # transform the option
24407 if test "$LD_RPATH_OPT" = "-R " ; then
24408 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24409 else
24410 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24411 fi
24412
24413 # if we have not already added this, add it now
24414 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24415 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24416 then
24417 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24418
24419 echo "${as_me:-configure}:24419: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24420
24421 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24422 fi
24423 fi
24424 ;;
24425 esac
24426 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24427 done
24428 LIBS=$cf_rpath_dst
24429
24430 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
24431
24432 echo "${as_me:-configure}:24432: testing ...checked LIBS $LIBS ..." 1>&5
24433
24434 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24435
24436 echo "${as_me:-configure}:24436: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24437
24438 else
24439 echo "$as_me:24439: result: no" >&5
24440 echo "${ECHO_T}no" >&6
24441 fi
24442
24443 fi
24444
24445 TEST_ARGS="$LIBS"
24446 LIBS=
24447
24448 ac_config_files="$ac_config_files Makefile"
24449
24450 ac_config_commands="$ac_config_commands default"
24451
24452 DEFS=-DHAVE_CONFIG_H
24453
24454 cat >confcache <<\_ACEOF
24455 # This file is a shell script that caches the results of configure
24456 # tests run on this system so they can be shared between configure
24457 # scripts and configure runs, see configure's option --config-cache.
24458 # It is not useful on other systems. If it contains results you don't
24459 # want to keep, you may remove or edit it.
24460 #
24461 # config.status only pays attention to the cache file if you give it
24462 # the --recheck option to rerun configure.
24463 #
24464 # `ac_cv_env_foo' variables (set or unset) will be overridden when
24465 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24466 # following values.
24467
24468 _ACEOF
24469
24470 # The following way of writing the cache mishandles newlines in values,
24471 # but we know of no workaround that is simple, portable, and efficient.
24472 # So, don't put newlines in cache variables' values.
24473 # Ultrix sh set writes to stderr and can't be redirected directly,
24474 # and sets the high bit in the cache file unless we assign to the vars.
24475 {
24476 (set) 2>&1 |
24477 case `(ac_space=' '; set | grep ac_space) 2>&1` in
24478 *ac_space=\ *)
24479 # `set' does not quote correctly, so add quotes (double-quote
24480 # substitution turns \\\\ into \\, and sed turns \\ into \).
24481 sed -n \
24482 "s/'/'\\\\''/g;
24483 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24484 ;;
24485 *)
24486 # `set' quotes correctly as required by POSIX, so do not add quotes.
24487 sed -n \
24488 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24489 ;;
24490 esac;
24491 } |
24492 sed '
24493 t clear
24494 : clear
24495 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24496 t end
24497 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24498 : end' >>confcache
24499 if cmp -s $cache_file confcache; then :; else
24500 if test -w $cache_file; then
24501 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24502 cat confcache >$cache_file
24503 else
24504 echo "not updating unwritable cache $cache_file"
24505 fi
24506 fi
24507 rm -f confcache
24508
24509 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24510 # Let make expand exec_prefix.
24511 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24512
24513 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24514 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24515 # trailing colons and then remove the whole line if VPATH becomes empty
24516 # (actually we leave an empty line to preserve line numbers).
24517 if test "x$srcdir" = x.; then
24518 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24519 s/:*\$(srcdir):*/:/;
24520 s/:*\${srcdir}:*/:/;
24521 s/:*@srcdir@:*/:/;
24522 s/^\([^=]*=[ ]*\):*/\1/;
24523 s/:*$//;
24524 s/^[^=]*=[ ]*$//;
24525 }'
24526 fi
24527
24528 DEFS=-DHAVE_CONFIG_H
24529
24530 : "${CONFIG_STATUS=./config.status}"
24531 ac_clean_files_save=$ac_clean_files
24532 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24533 { echo "$as_me:24533: creating $CONFIG_STATUS" >&5
24534 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24535 cat >"$CONFIG_STATUS" <<_ACEOF
24536 #! $SHELL
24537 # Generated automatically by configure.
24538 # Run this file to recreate the current configuration.
24539 # Compiler output produced by configure, useful for debugging
24540 # configure, is in config.log if it exists.
24541
24542 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
24543
24544 debug=false
24545 SHELL=\${CONFIG_SHELL-$SHELL}
24546 ac_cs_invocation="\$0 \$@"
24547
24548 CLICOLOR_FORCE= GREP_OPTIONS=
24549 unset CLICOLOR_FORCE GREP_OPTIONS
24550 _ACEOF
24551
24552 cat >>"$CONFIG_STATUS" <<\_ACEOF
24553 # Be Bourne compatible
24554 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24555 emulate sh
24556 NULLCMD=:
24557 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24558 set -o posix
24559 fi
24560
24561 # Name of the executable.
24562 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24563
24564 if expr a : '\(a\)' >/dev/null 2>&1; then
24565 as_expr="expr"
24566 else
24567 as_expr="false"
24568 fi
24569
24570 rm -f conf$$ conf$$.exe conf$$.file
24571 echo >conf$$.file
24572 if ln -s conf$$.file conf$$ 2>/dev/null; then
24573 # We could just check for DJGPP; but this test a) works b) is more generic
24574 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24575 if test -f conf$$.exe; then
24576 # Don't use ln at all; we don't have any links
24577 as_ln_s='cp -p'
24578 else
24579 as_ln_s='ln -s'
24580 fi
24581 elif ln conf$$.file conf$$ 2>/dev/null; then
24582 as_ln_s='ln'
24583 else
24584 as_ln_s='cp -p'
24585 fi
24586 rm -f conf$$ conf$$.exe conf$$.file
24587
24588 as_executable_p="test -f"
24589
24590 # Support unset when possible.
24591 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24592 as_unset="unset"
24593 else
24594 as_unset="false"
24595 fi
24596
24597 # NLS nuisances.
24598 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24599 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24600 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24601 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24602 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24603 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24604 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24605 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24606
24607 # IFS
24608 # We need space, tab and new line, in precisely that order.
24609 as_nl='
24610 '
24611 IFS=" $as_nl"
24612
24613 # CDPATH.
24614 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24615
24616 exec 6>&1
24617
24618 _ACEOF
24619
24620 # Files that config.status was made for.
24621 if test -n "$ac_config_files"; then
24622 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
24623 fi
24624
24625 if test -n "$ac_config_headers"; then
24626 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
24627 fi
24628
24629 if test -n "$ac_config_links"; then
24630 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
24631 fi
24632
24633 if test -n "$ac_config_commands"; then
24634 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
24635 fi
24636
24637 cat >>"$CONFIG_STATUS" <<\EOF
24638
24639 ac_cs_usage="\
24640 \`$as_me' instantiates files from templates according to the
24641 current configuration.
24642
24643 Usage: $0 [OPTIONS] [FILE]...
24644
24645 -h, --help print this help, then exit
24646 -V, --version print version number, then exit
24647 -d, --debug don't remove temporary files
24648 --recheck update $as_me by reconfiguring in the same conditions
24649 --file=FILE[:TEMPLATE]
24650 instantiate the configuration file FILE
24651 --header=FILE[:TEMPLATE]
24652 instantiate the configuration header FILE
24653
24654 Configuration files:
24655 $config_files
24656
24657 Configuration headers:
24658 $config_headers
24659
24660 Configuration commands:
24661 $config_commands
24662
24663 Report bugs to <[email protected]>."
24664 EOF
24665
24666 cat >>"$CONFIG_STATUS" <<EOF
24667 ac_cs_version="\\
24668 config.status
24669 configured by $0, generated by GNU Autoconf 2.52.20260412,
24670 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24671
24672 Copyright 2003-2023,2025 Thomas E. Dickey
24673 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24674 Free Software Foundation, Inc.
24675 This config.status script is free software; the Free Software Foundation
24676 gives unlimited permission to copy, distribute and modify it."
24677 srcdir="$srcdir"
24678 INSTALL="$INSTALL"
24679 EOF
24680
24681 cat >>"$CONFIG_STATUS" <<\EOF
24682 # If no file are specified by the user, then we need to provide default
24683 # value. By we need to know if files were specified by the user.
24684 ac_need_defaults=:
24685 while test $# != 0
24686 do
24687 case $1 in
24688 --*=*)
24689 ac_option=`expr "x$1" : 'x\([^=]*\)='`
24690 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24691 shift
24692 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24693 shift
24694 ;;
24695 -*);;
24696 *) # This is not an option, so the user has probably given explicit
24697 # arguments.
24698 ac_need_defaults=false;;
24699 esac
24700
24701 case $1 in
24702 # Handling of the options.
24703 EOF
24704 cat >>"$CONFIG_STATUS" <<EOF
24705 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24706 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24707 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24708 EOF
24709 cat >>"$CONFIG_STATUS" <<\EOF
24710 --version | --vers* | -V )
24711 echo "$ac_cs_version"; exit 0 ;;
24712 --he | --h)
24713 # Conflict between --help and --header
24714 { { echo "$as_me:24714: error: ambiguous option: $1
24715 Try \`$0 --help' for more information." >&5
24716 echo "$as_me: error: ambiguous option: $1
24717 Try \`$0 --help' for more information." >&2;}
24718 { (exit 1); exit 1; }; };;
24719 --help | --hel | -h )
24720 echo "$ac_cs_usage"; exit 0 ;;
24721 --debug | --d* | -d )
24722 debug=: ;;
24723 --file | --fil | --fi | --f )
24724 shift
24725 CONFIG_FILES="$CONFIG_FILES $1"
24726 ac_need_defaults=false;;
24727 --header | --heade | --head | --hea )
24728 shift
24729 CONFIG_HEADERS="$CONFIG_HEADERS $1"
24730 ac_need_defaults=false;;
24731
24732 # This is an error.
24733 -*) { { echo "$as_me:24733: error: unrecognized option: $1
24734 Try \`$0 --help' for more information." >&5
24735 echo "$as_me: error: unrecognized option: $1
24736 Try \`$0 --help' for more information." >&2;}
24737 { (exit 1); exit 1; }; } ;;
24738
24739 *) ac_config_targets="$ac_config_targets $1" ;;
24740
24741 esac
24742 shift
24743 done
24744
24745 exec 5>>config.log
24746 cat >&5 << _ACEOF
24747
24748 ## ----------------------- ##
24749 ## Running config.status. ##
24750 ## ----------------------- ##
24751
24752 This file was extended by $as_me 2.52.20260412, executed with
24753 CONFIG_FILES = $CONFIG_FILES
24754 CONFIG_HEADERS = $CONFIG_HEADERS
24755 CONFIG_LINKS = $CONFIG_LINKS
24756 CONFIG_COMMANDS = $CONFIG_COMMANDS
24757 > "$ac_cs_invocation"
24758 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24759
24760 _ACEOF
24761 EOF
24762
24763 cat >>"$CONFIG_STATUS" <<EOF
24764 #
24765 # INIT-COMMANDS section.
24766 #
24767
24768 AWK="$AWK"
24769 ECHO_CC="$ECHO_CC"
24770 ECHO_LD="$ECHO_LD"
24771 SHOW_CC="$SHOW_LD"
24772
24773 EOF
24774
24775 cat >>"$CONFIG_STATUS" <<\EOF
24776 for ac_config_target in $ac_config_targets
24777 do
24778 case "$ac_config_target" in
24779 # Handling of arguments.
24780 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24781 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24782 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
24783 *) { { echo "$as_me:24783: error: invalid argument: $ac_config_target" >&5
24784 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24785 { (exit 1); exit 1; }; };;
24786 esac
24787 done
24788
24789 # If the user did not use the arguments to specify the items to instantiate,
24790 # then the envvar interface is used. Set only those that are not.
24791 # We use the long form for the default assignment because of an extremely
24792 # bizarre bug on SunOS 4.1.3.
24793 if "$ac_need_defaults"; then
24794 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24795 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24796 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24797 fi
24798
24799 # Create a temporary directory, and hook for its removal unless debugging.
24800 $debug ||
24801 {
24802 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24803 trap '{ (exit 1); exit 1; }' 1 2 13 15
24804 }
24805
24806 # Create a (secure) tmp directory for tmp files.
24807 : "${TMPDIR=/tmp}"
24808 {
24809 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24810 test -n "$tmp" && test -d "$tmp"
24811 } ||
24812 {
24813 tmp=$TMPDIR/cs$$-$RANDOM
24814 (umask 077 && mkdir "$tmp")
24815 } ||
24816 {
24817 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24818 { (exit 1); exit 1; }
24819 }
24820
24821 EOF
24822
24823 cat >>"$CONFIG_STATUS" <<EOF
24824
24825 #
24826 # CONFIG_FILES section.
24827 #
24828
24829 # No need to generate the scripts if there are no CONFIG_FILES.
24830 # This happens for instance when ./config.status config.h
24831 if test -n "\$CONFIG_FILES"; then
24832 # Protect against being on the right side of a sed subst in config.status.
24833 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24834 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
24835 s,@SHELL@,$SHELL,;t t
24836 s,@exec_prefix@,$exec_prefix,;t t
24837 s,@prefix@,$prefix,;t t
24838 s,@program_transform_name@,$program_transform_name,;t t
24839 s,@bindir@,$bindir,;t t
24840 s,@sbindir@,$sbindir,;t t
24841 s,@libexecdir@,$libexecdir,;t t
24842 s,@datarootdir@,$datarootdir,;t t
24843 s,@datadir@,$datadir,;t t
24844 s,@sysconfdir@,$sysconfdir,;t t
24845 s,@sharedstatedir@,$sharedstatedir,;t t
24846 s,@localstatedir@,$localstatedir,;t t
24847 s,@runstatedir@,$runstatedir,;t t
24848 s,@libdir@,$libdir,;t t
24849 s,@includedir@,$includedir,;t t
24850 s,@oldincludedir@,$oldincludedir,;t t
24851 s,@infodir@,$infodir,;t t
24852 s,@mandir@,$mandir,;t t
24853 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24854 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24855 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24856 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24857 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24858 s,@build_alias@,$build_alias,;t t
24859 s,@host_alias@,$host_alias,;t t
24860 s,@target_alias@,$target_alias,;t t
24861 s,@ECHO_C@,$ECHO_C,;t t
24862 s,@ECHO_N@,$ECHO_N,;t t
24863 s,@ECHO_T@,$ECHO_T,;t t
24864 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24865 s,@DEFS@,$DEFS,;t t
24866 s,@LIBS@,$LIBS,;t t
24867 s,@build@,$build,;t t
24868 s,@build_cpu@,$build_cpu,;t t
24869 s,@build_vendor@,$build_vendor,;t t
24870 s,@build_os@,$build_os,;t t
24871 s,@host@,$host,;t t
24872 s,@host_cpu@,$host_cpu,;t t
24873 s,@host_vendor@,$host_vendor,;t t
24874 s,@host_os@,$host_os,;t t
24875 s,@target@,$target,;t t
24876 s,@target_cpu@,$target_cpu,;t t
24877 s,@target_vendor@,$target_vendor,;t t
24878 s,@target_os@,$target_os,;t t
24879 s,@SET_MAKE@,$SET_MAKE,;t t
24880 s,@CC@,$CC,;t t
24881 s,@CFLAGS@,$CFLAGS,;t t
24882 s,@LDFLAGS@,$LDFLAGS,;t t
24883 s,@CPPFLAGS@,$CPPFLAGS,;t t
24884 s,@ac_ct_CC@,$ac_ct_CC,;t t
24885 s,@EXEEXT@,$EXEEXT,;t t
24886 s,@OBJEXT@,$OBJEXT,;t t
24887 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24888 s,@CPP@,$CPP,;t t
24889 s,@GREP@,$GREP,;t t
24890 s,@EGREP@,$EGREP,;t t
24891 s,@AWK@,$AWK,;t t
24892 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24893 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24894 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24895 s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
24896 s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
24897 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24898 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24899 s,@LINT@,$LINT,;t t
24900 s,@LINT_OPTS@,$LINT_OPTS,;t t
24901 s,@LINT_LIBS@,$LINT_LIBS,;t t
24902 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
24903 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
24904 s,@CTAGS@,$CTAGS,;t t
24905 s,@ETAGS@,$ETAGS,;t t
24906 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24907 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24908 s,@MATH_LIB@,$MATH_LIB,;t t
24909 s,@top_builddir@,$top_builddir,;t t
24910 s,@CC_G_OPT@,$CC_G_OPT,;t t
24911 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24912 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24913 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24914 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24915 s,@LD@,$LD,;t t
24916 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24917 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24918 s,@LD_MODEL@,$LD_MODEL,;t t
24919 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24920 s,@LIBTOOL@,$LIBTOOL,;t t
24921 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24922 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24923 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24924 s,@LIB_LINK@,$LIB_LINK,;t t
24925 s,@LINK_TESTS@,$LINK_TESTS,;t t
24926 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24927 s,@PACKAGE@,$PACKAGE,;t t
24928 s,@PTHREAD@,$PTHREAD,;t t
24929 s,@TEST_ARGS@,$TEST_ARGS,;t t
24930 s,@TEST_DEPS@,$TEST_DEPS,;t t
24931 s,@TEST_LIBS@,$TEST_LIBS,;t t
24932 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24933 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24934 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24935 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24936 s,@includesubdir@,$includesubdir,;t t
24937 s,@FGREP@,$FGREP,;t t
24938 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
24939 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
24940 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24941 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24942 s,@ECHO_LT@,$ECHO_LT,;t t
24943 s,@ECHO_LD@,$ECHO_LD,;t t
24944 s,@RULE_CC@,$RULE_CC,;t t
24945 s,@SHOW_CC@,$SHOW_CC,;t t
24946 s,@ECHO_CC@,$ECHO_CC,;t t
24947 s,@DESTDIR@,$DESTDIR,;t t
24948 s,@SET_DESTDIR@,$SET_DESTDIR,;t t
24949 s,@MERGE_PREFIX@,$MERGE_PREFIX,;t t
24950 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24951 s,@REQUIRE_PKG@,$REQUIRE_PKG,;t t
24952 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
24953 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
24954 s,@X_CFLAGS@,$X_CFLAGS,;t t
24955 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
24956 s,@X_LIBS@,$X_LIBS,;t t
24957 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
24958 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
24959 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
24960 s,@cf_cv_screen@,$cf_cv_screen,;t t
24961 s,@RGB_PATH@,$RGB_PATH,;t t
24962 s,@no_x11_rgb@,$no_x11_rgb,;t t
24963 s,@FORM_NAME@,$FORM_NAME,;t t
24964 s,@MENU_NAME@,$MENU_NAME,;t t
24965 s,@PANEL_NAME@,$PANEL_NAME,;t t
24966 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24967 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24968 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24969 CEOF
24970
24971 EOF
24972
24973 cat >>"$CONFIG_STATUS" <<\EOF
24974 # Split the substitutions into bite-sized pieces for seds with
24975 # small command number limits, like on Digital OSF/1 and HP-UX.
24976 ac_max_sed_lines=48
24977 ac_sed_frag=1 # Number of current file.
24978 ac_beg=1 # First line for current file.
24979 ac_end=$ac_max_sed_lines # Line after last line for current file.
24980 ac_more_lines=:
24981 ac_sed_cmds=
24982 while "$ac_more_lines"; do
24983 if test "$ac_beg" -gt 1; then
24984 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24985 else
24986 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24987 fi
24988 if test ! -s "$tmp"/subs.frag; then
24989 ac_more_lines=false
24990 else
24991 # The purpose of the label and of the branching condition is to
24992 # speed up the sed processing (if there are no `@' at all, there
24993 # is no need to browse any of the substitutions).
24994 # These are the two extra sed commands mentioned above.
24995 (echo ':t
24996 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && sed -e 's/\\\\*$//g' -e 's/$/\\/' -e 's/;t t\\/;t t/' -e 't' -e '3,'$ac_max_sed_lines's/$/\\/' "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
24997 # It is possible to make a multiline substitution using escaped newlines.
24998 # Ensure that we do not split the substitution between script fragments.
24999 ac_BEG=$ac_end
25000 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
25001 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
25002 if test -s "$tmp"/subs.next; then
25003 grep '^s,@[^@,][^@,]*@,.*$' "$tmp"/subs.next | grep -v '^s,@.*;t t$' >"$tmp"/subs.edit
25004 if test ! -s "$tmp"/subs.edit; then
25005 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
25006 if test ! -s "$tmp"/subs.edit; then
25007 if test "$ac_beg" -gt 1; then
25008 ac_end=`expr "$ac_end" - 1`
25009 continue
25010 fi
25011 fi
25012 fi
25013 fi
25014
25015 if test -z "$ac_sed_cmds"; then
25016 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
25017 else
25018 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
25019 fi
25020 ac_sed_frag=`expr "$ac_sed_frag" + 1`
25021 ac_beg=$ac_end
25022 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
25023 fi
25024 done
25025 if test -z "$ac_sed_cmds"; then
25026 ac_sed_cmds="cat"
25027 fi
25028 fi # test -n "$CONFIG_FILES"
25029
25030 EOF
25031 cat >>"$CONFIG_STATUS" <<\EOF
25032 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25033 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25034 case "$ac_file" in
25035 - | *:- | *:-:* ) # input from stdin
25036 cat >"$tmp"/stdin
25037 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25038 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25039 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25040 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25041 * ) ac_file_in=$ac_file.in ;;
25042 esac
25043
25044 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25045 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25046 X"$ac_file" : 'X\(//\)[^/]' \| \
25047 X"$ac_file" : 'X\(//\)$' \| \
25048 X"$ac_file" : 'X\(/\)' \| \
25049 . : '\(.\)' 2>/dev/null ||
25050 echo X"$ac_file" |
25051 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25052 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25053 /^X\(\/\/\)$/{ s//\1/; q; }
25054 /^X\(\/\).*/{ s//\1/; q; }
25055 s/.*/./; q'`
25056 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25057 { case "$ac_dir" in
25058 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25059 *) as_incr_dir=.;;
25060 esac
25061 as_dummy="$ac_dir"
25062 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25063 case $as_mkdir_dir in
25064 # Skip DOS drivespec
25065 ?:) as_incr_dir=$as_mkdir_dir ;;
25066 *)
25067 as_incr_dir=$as_incr_dir/$as_mkdir_dir
25068 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25069 ;;
25070 esac
25071 done; }
25072
25073 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
25074 # A "../" for each directory in $ac_dir_suffix.
25075 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25076 else
25077 ac_dir_suffix= ac_dots=
25078 fi
25079
25080 case "$srcdir" in
25081 .) ac_srcdir=.
25082 if test -z "$ac_dots"; then
25083 ac_top_srcdir=.
25084 else
25085 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
25086 fi ;;
25087 [\\/]* | ?:[\\/]* )
25088 ac_srcdir="$srcdir$ac_dir_suffix";
25089 ac_top_srcdir="$srcdir" ;;
25090 *) # Relative path.
25091 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
25092 ac_top_srcdir="$ac_dots$srcdir" ;;
25093 esac
25094
25095 case $INSTALL in
25096 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25097 *) ac_INSTALL=$ac_dots$INSTALL ;;
25098 esac
25099
25100 if test x"$ac_file" != x-; then
25101 { echo "$as_me:25101: creating $ac_file" >&5
25102 echo "$as_me: creating $ac_file" >&6;}
25103 rm -f "$ac_file"
25104 fi
25105 # Let's still pretend it is `configure' which instantiates (i.e., don't
25106 # use $as_me), people would be surprised to read:
25107 # /* config.h. Generated automatically by config.status. */
25108 configure_input="Generated automatically from `echo $ac_file_in |
25109 sed 's,.*/,,'` by configure."
25110
25111 # First look for the input files in the build tree, otherwise in the
25112 # src tree.
25113 ac_file_inputs=`IFS=:
25114 for f in $ac_file_in; do
25115 case $f in
25116 -) echo "$tmp"/stdin ;;
25117 [\\/$]*)
25118 # Absolute (can't be DOS-style, as IFS=:)
25119 test -f "$f" || { { echo "$as_me:25119: error: cannot find input file: $f" >&5
25120 echo "$as_me: error: cannot find input file: $f" >&2;}
25121 { (exit 1); exit 1; }; }
25122 echo "$f";;
25123 *) # Relative
25124 if test -f "$f"; then
25125 # Build tree
25126 echo "$f"
25127 elif test -f "$srcdir/$f"; then
25128 # Source tree
25129 echo "$srcdir/$f"
25130 else
25131 # /dev/null tree
25132 { { echo "$as_me:25132: error: cannot find input file: $f" >&5
25133 echo "$as_me: error: cannot find input file: $f" >&2;}
25134 { (exit 1); exit 1; }; }
25135 fi;;
25136 esac
25137 done` || { (exit 1); exit 1; }
25138 EOF
25139 cat >>"$CONFIG_STATUS" <<\EOF
25140 ac_warn_datarootdir=no
25141 if test x"$ac_file" != x-; then
25142 for ac_item in $ac_file_inputs
25143 do
25144 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
25145 if test -n "$ac_seen"; then
25146 ac_used=`grep '@datarootdir@' "$ac_item"`
25147 if test -z "$ac_used"; then
25148 { echo "$as_me:25148: WARNING: datarootdir was used implicitly but not set:
25149 $ac_seen" >&5
25150 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25151 $ac_seen" >&2;}
25152 ac_warn_datarootdir=yes
25153 fi
25154 fi
25155 ac_seen=`grep '${datarootdir}' "$ac_item"`
25156 if test -n "$ac_seen"; then
25157 { echo "$as_me:25157: WARNING: datarootdir was used explicitly but not set:
25158 $ac_seen" >&5
25159 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25160 $ac_seen" >&2;}
25161 ac_warn_datarootdir=yes
25162 fi
25163 done
25164 fi
25165
25166 if test "x$ac_warn_datarootdir" = xyes; then
25167 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25168 fi
25169
25170 EOF
25171 cat >>"$CONFIG_STATUS" <<EOF
25172 sed "$ac_vpsub
25173 $extrasub
25174 EOF
25175 cat >>"$CONFIG_STATUS" <<\EOF
25176 :t
25177 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25178 s,@configure_input@,$configure_input,;t t
25179 s,@srcdir@,$ac_srcdir,;t t
25180 s,@top_srcdir@,$ac_top_srcdir,;t t
25181 s,@INSTALL@,$ac_INSTALL,;t t
25182 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
25183 rm -f "$tmp"/stdin
25184 EOF
25185 test -n "${FGREP}" || FGREP="grep -F"
25186 test -n "${EGREP}" || EGREP="grep -E"
25187 cat >>"$CONFIG_STATUS" <<EOF
25188 test -n "\${FGREP}" || FGREP="$FGREP"
25189 test -n "\${EGREP}" || EGREP="$EGREP"
25190 EOF
25191 cat >>"$CONFIG_STATUS" <<\EOF
25192 if test x"$ac_file" != x-; then
25193 cp "$tmp/out" "$ac_file"
25194
25195 for ac_name in prefix exec_prefix datarootdir
25196 do
25197 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
25198 if test -n "$ac_seen"; then
25199 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
25200 if test -z "$ac_init"; then
25201 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
25202 { echo "$as_me:25202: WARNING: Variable $ac_name is used but was not set:
25203 $ac_seen" >&5
25204 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25205 $ac_seen" >&2;}
25206 fi
25207 fi
25208 done
25209 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
25210 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
25211 if test -s "$tmp"/out; then
25212 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
25213 { echo "$as_me:25213: WARNING: Some variables may not be substituted:
25214 $ac_seen" >&5
25215 echo "$as_me: WARNING: Some variables may not be substituted:
25216 $ac_seen" >&2;}
25217 fi
25218 else
25219 cat "$tmp"/out
25220 fi
25221 rm -f "$tmp"/out
25222
25223 done
25224 EOF
25225 cat >>"$CONFIG_STATUS" <<\EOF
25226
25227 #
25228 # CONFIG_HEADER section.
25229 #
25230
25231 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25232 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25233 #
25234 # ac_d sets the value in "#define NAME VALUE" lines.
25235 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
25236 ac_dB='[ ].*$,\1#\2'
25237 ac_dC=' '
25238 ac_dD=',;t'
25239 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25240 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
25241 ac_iB='\([ ]\),\1#\2define\3'
25242 ac_iC=' '
25243 ac_iD='\4,;t'
25244 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25245 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
25246 ac_uB='$,\1#\2define\3'
25247 ac_uC=' '
25248 ac_uD=',;t'
25249
25250 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25251 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25252 case "$ac_file" in
25253 - | *:- | *:-:* ) # input from stdin
25254 cat >"$tmp"/stdin
25255 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25256 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25257 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25258 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25259 * ) ac_file_in=$ac_file.in ;;
25260 esac
25261
25262 test x"$ac_file" != x- && { echo "$as_me:25262: creating $ac_file" >&5
25263 echo "$as_me: creating $ac_file" >&6;}
25264
25265 # First look for the input files in the build tree, otherwise in the
25266 # src tree.
25267 ac_file_inputs=`IFS=:
25268 for f in $ac_file_in; do
25269 case $f in
25270 -) echo "$tmp"/stdin ;;
25271 [\\/$]*)
25272 # Absolute (can't be DOS-style, as IFS=:)
25273 test -f "$f" || { { echo "$as_me:25273: error: cannot find input file: $f" >&5
25274 echo "$as_me: error: cannot find input file: $f" >&2;}
25275 { (exit 1); exit 1; }; }
25276 echo $f;;
25277 *) # Relative
25278 if test -f "$f"; then
25279 # Build tree
25280 echo $f
25281 elif test -f "$srcdir/$f"; then
25282 # Source tree
25283 echo "$srcdir/$f"
25284 else
25285 # /dev/null tree
25286 { { echo "$as_me:25286: error: cannot find input file: $f" >&5
25287 echo "$as_me: error: cannot find input file: $f" >&2;}
25288 { (exit 1); exit 1; }; }
25289 fi;;
25290 esac
25291 done` || { (exit 1); exit 1; }
25292 # Remove the trailing spaces.
25293 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
25294
25295 EOF
25296
25297 # Transform confdefs.h into a list of #define's. We won't use it as a sed
25298 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
25299 # be either 'cat' or 'sort'.
25300 cat confdefs.h | uniq >conftest.vals
25301
25302 # Break up conftest.vals because some shells have a limit on
25303 # the size of here documents, and old seds have small limits too.
25304
25305 rm -f conftest.tail
25306 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
25307 while grep . conftest.vals >/dev/null
25308 do
25309 # Write chunks of a limited-size here document to conftest.frag.
25310 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
25311 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
25312 echo 'CEOF' >> "$CONFIG_STATUS"
25313 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
25314 rm -f conftest.vals
25315 mv conftest.tail conftest.vals
25316 done
25317 rm -f conftest.vals
25318
25319 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25320 # marker @DEFS@.
25321 echo ' cat >> conftest.edit <<CEOF
25322 /@DEFS@/r conftest.frag
25323 /@DEFS@/d
25324 CEOF
25325 sed -f conftest.edit "$tmp"/in > "$tmp"/out
25326 rm -f "$tmp"/in
25327 mv "$tmp"/out "$tmp"/in
25328 rm -f conftest.edit conftest.frag
25329 ' >> "$CONFIG_STATUS"
25330
25331 cat >>"$CONFIG_STATUS" <<\EOF
25332 # Let's still pretend it is `configure' which instantiates (i.e., don't
25333 # use $as_me), people would be surprised to read:
25334 # /* config.h. Generated automatically by config.status. */
25335 if test x"$ac_file" = x-; then
25336 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
25337 else
25338 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
25339 fi
25340 cat "$tmp"/in >>"$tmp"/config.h
25341 rm -f "$tmp"/in
25342 if test x"$ac_file" != x-; then
25343 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
25344 { echo "$as_me:25344: $ac_file is unchanged" >&5
25345 echo "$as_me: $ac_file is unchanged" >&6;}
25346 else
25347 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25348 X"$ac_file" : 'X\(//\)[^/]' \| \
25349 X"$ac_file" : 'X\(//\)$' \| \
25350 X"$ac_file" : 'X\(/\)' \| \
25351 . : '\(.\)' 2>/dev/null ||
25352 echo X"$ac_file" |
25353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25354 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25355 /^X\(\/\/\)$/{ s//\1/; q; }
25356 /^X\(\/\).*/{ s//\1/; q; }
25357 s/.*/./; q'`
25358 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25359 { case "$ac_dir" in
25360 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25361 *) as_incr_dir=.;;
25362 esac
25363 as_dummy="$ac_dir"
25364 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25365 case $as_mkdir_dir in
25366 # Skip DOS drivespec
25367 ?:) as_incr_dir=$as_mkdir_dir ;;
25368 *)
25369 as_incr_dir=$as_incr_dir/$as_mkdir_dir
25370 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25371 ;;
25372 esac
25373 done; }
25374
25375 fi
25376 rm -f "$ac_file"
25377 mv "$tmp/config.h" "$ac_file"
25378 fi
25379 else
25380 cat "$tmp"/config.h
25381 rm -f "$tmp"/config.h
25382 fi
25383 done
25384 EOF
25385 cat >>"$CONFIG_STATUS" <<\EOF
25386 #
25387 # CONFIG_COMMANDS section.
25388 #
25389 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25390 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25391 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25392
25393 case "$ac_dest" in
25394 default )
25395
25396 for cf_dir in .
25397 do
25398 if test ! -d "$srcdir/$cf_dir" ; then
25399 continue
25400 elif test -f "$srcdir/$cf_dir/programs" ; then
25401 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
25402 fi
25403 done
25404
25405 cat >>Makefile <<TEST_EOF
25406
25407 # These rules are generated so we do not rely on suffix rules, which do not
25408 # work consistently for different make-programs (the '\$(MODEL)/' confuses
25409 # some, and the '\$x' confuses others).
25410 TEST_EOF
25411
25412 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
25413 for N in $LIST
25414 do
25415 cat >>Makefile <<TEST_EOF
25416
25417 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
25418 \$(srcdir)/test.priv.h \\
25419 ncurses_cfg.h
25420 $SHOW_CC
25421 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
25422 TEST_EOF
25423 done
25424
25425 if test -f ../config.guess && test -f ../config.sub
25426 then
25427 cat >>Makefile <<TEST_EOF
25428
25429 # if we used CF_INHERIT for getting these files, we can remove them
25430 distclean::
25431 rm -f config.guess config.sub
25432 TEST_EOF
25433 fi
25434 ;;
25435 esac
25436 done
25437 EOF
25438
25439 cat >>"$CONFIG_STATUS" <<\EOF
25440
25441 { (exit 0); exit 0; }
25442 EOF
25443 chmod +x "$CONFIG_STATUS"
25444 ac_clean_files=$ac_clean_files_save
25445
25446 # configure is writing to config.log, and then calls config.status.
25447 # config.status does its own redirection, appending to config.log.
25448 # Unfortunately, on DOS this fails, as config.log is still kept open
25449 # by configure, so config.status won't be able to write to it; its
25450 # output is simply discarded. So we exec the FD to /dev/null,
25451 # effectively closing config.log, so it can be properly (re)opened and
25452 # appended to by config.status. When coming back to configure, we
25453 # need to make the FD available again.
25454 if test "$no_create" != yes; then
25455 ac_cs_success=:
25456 exec 5>/dev/null
25457 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
25458 exec 5>>config.log
25459 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25460 # would make configure fail if this is the last instruction.
25461 "$ac_cs_success" || { (exit 1); exit 1; }
25462 fi
25463