Debian Codegraph @

Ada95/configure

raw
1 #! /bin/sh
2 # From configure.in Revision: 1.97 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20250126.
5 #
6 # Copyright 2003-2022,2023 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 emulate sh
28 NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30 set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37 as_expr="expr"
38 else
39 as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
49 as_ln_s='cp -p'
50 else
51 as_ln_s='ln -s'
52 fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54 as_ln_s='ln'
55 else
56 as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64 as_unset="unset"
65 else
66 as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS=" $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 # include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 # include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 # include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
201 ac_prev=
202 continue
203 fi
204
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207 # Accept the important Cygnus configure options, so we can diagnose typos.
208
209 case "$ac_option" in
210
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
212 ac_prev=bindir ;;
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214 bindir=$ac_optarg ;;
215
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
220
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
227
228 --config-cache | -C)
229 cache_file=config.cache ;;
230
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232 ac_prev=datadir ;;
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234 | --da=*)
235 datadir=$ac_optarg ;;
236
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
243
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
252
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260 case "$ac_option" in
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262 *) ac_optarg=yes ;;
263 esac
264 eval "enable_$ac_feature='$ac_optarg'" ;;
265
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
274
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
277 with_gas=yes ;;
278
279 -help | --help | --hel | --he | -h)
280 ac_init_help=long ;;
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
285
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
290
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
297
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
299 ac_prev=infodir ;;
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
302
303 -libdir | --libdir | --libdi | --libd)
304 ac_prev=libdir ;;
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
306 libdir=$ac_optarg ;;
307
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
314
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
323
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
332
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334 ac_prev=mandir ;;
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336 mandir=$ac_optarg ;;
337
338 -nfp | --nfp | --nf)
339 # Obsolete; use --without-fp.
340 with_fp=no ;;
341
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343 | --no-cr | --no-c)
344 no_create=yes ;;
345
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348 no_recursion=yes ;;
349
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
358
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360 ac_prev=prefix ;;
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362 prefix=$ac_optarg ;;
363
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
370
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
377
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
394
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
397 silent=yes ;;
398
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400 ac_prev=sbindir ;;
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402 | --sbi=* | --sb=*)
403 sbindir=$ac_optarg ;;
404
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
408 | --sha | --sh)
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413 | --sha=* | --sh=*)
414 sharedstatedir=$ac_optarg ;;
415
416 -site | --site | --sit)
417 ac_prev=site ;;
418 -site=* | --site=* | --sit=*)
419 site=$ac_optarg ;;
420
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422 ac_prev=srcdir ;;
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424 srcdir=$ac_optarg ;;
425
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
432
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
437
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
439 verbose=yes ;;
440
441 -version | --version | --versio | --versi | --vers | -V)
442 ac_init_version=: ;;
443
444 -with-* | --with-*)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451 case "$ac_option" in
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453 *) ac_optarg=yes ;;
454 esac
455 eval "with_$ac_package='$ac_optarg'" ;;
456
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
465
466 --x)
467 # Obsolete; use --with-x.
468 with_x=yes ;;
469
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
476
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
483
484 -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
485 echo "$as_me: WARNING: unsupported option: $ac_option" >&2
486 ;;
487
488 -*) { echo "$as_me: error: unrecognized option: $ac_option
489 Try \`$0 --help' for more information." >&2
490 { (exit 1); exit 1; }; }
491 ;;
492
493 *=*)
494 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
495 # Reject names that are not valid shell variable names.
496 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
497 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
498 { (exit 1); exit 1; }; }
499 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
500 eval "$ac_envvar='$ac_optarg'"
501 export "$ac_envvar" ;;
502
503 *)
504 # FIXME: should be removed in autoconf 3.0.
505 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
506 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
507 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
508 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
509 ;;
510
511 esac
512 done
513
514 if test -n "$ac_prev"; then
515 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
516 { echo "$as_me: error: missing argument to $ac_option" >&2
517 { (exit 1); exit 1; }; }
518 fi
519
520 # Be sure to have absolute paths.
521 for ac_var in exec_prefix prefix
522 do
523 eval ac_val=$`echo "$ac_var"`
524 case "$ac_val" in
525 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
526 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
527 { (exit 1); exit 1; }; };;
528 esac
529 done
530
531 # Be sure to have absolute paths.
532 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
533 localstatedir libdir includedir oldincludedir infodir mandir
534 do
535 eval ac_val=$`echo "$ac_var"`
536 case "$ac_val" in
537 [\\/$]* | ?:[\\/]* ) ;;
538 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
539 { (exit 1); exit 1; }; };;
540 esac
541 done
542
543 # There might be people who depend on the old broken behavior: `$host'
544 # used to hold the argument of --host etc.
545 build=$build_alias
546 host=$host_alias
547 target=$target_alias
548
549 # FIXME: should be removed in autoconf 3.0.
550 if test "x$host_alias" != x; then
551 if test "x$build_alias" = x; then
552 cross_compiling=maybe
553 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
554 If a cross compiler is detected then cross compile mode will be used." >&2
555 elif test "x$build_alias" != "x$host_alias"; then
556 cross_compiling=yes
557 fi
558 fi
559
560 ac_tool_prefix=
561 test -n "$host_alias" && ac_tool_prefix=$host_alias-
562
563 test "$silent" = yes && exec 6>/dev/null
564
565 # Find the source files, if location was not specified.
566 if test -z "$srcdir"; then
567 ac_srcdir_defaulted=yes
568 # Try the directory containing this script, then its parent.
569 ac_prog=$0
570 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
571 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
572 srcdir=$ac_confdir
573 if test ! -r "$srcdir/$ac_unique_file"; then
574 srcdir=..
575 fi
576 else
577 ac_srcdir_defaulted=no
578 fi
579 if test ! -r "$srcdir/$ac_unique_file"; then
580 if test "$ac_srcdir_defaulted" = yes; then
581 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
582 { (exit 1); exit 1; }; }
583 else
584 { echo "$as_me: error: cannot find sources in $srcdir" >&2
585 { (exit 1); exit 1; }; }
586 fi
587 fi
588 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
589 ac_env_build_alias_set=${build_alias+set}
590 ac_env_build_alias_value=$build_alias
591 ac_cv_env_build_alias_set=${build_alias+set}
592 ac_cv_env_build_alias_value=$build_alias
593 ac_env_host_alias_set=${host_alias+set}
594 ac_env_host_alias_value=$host_alias
595 ac_cv_env_host_alias_set=${host_alias+set}
596 ac_cv_env_host_alias_value=$host_alias
597 ac_env_target_alias_set=${target_alias+set}
598 ac_env_target_alias_value=$target_alias
599 ac_cv_env_target_alias_set=${target_alias+set}
600 ac_cv_env_target_alias_value=$target_alias
601 ac_env_CC_set=${CC+set}
602 ac_env_CC_value=$CC
603 ac_cv_env_CC_set=${CC+set}
604 ac_cv_env_CC_value=$CC
605 ac_env_CFLAGS_set=${CFLAGS+set}
606 ac_env_CFLAGS_value=$CFLAGS
607 ac_cv_env_CFLAGS_set=${CFLAGS+set}
608 ac_cv_env_CFLAGS_value=$CFLAGS
609 ac_env_LDFLAGS_set=${LDFLAGS+set}
610 ac_env_LDFLAGS_value=$LDFLAGS
611 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
612 ac_cv_env_LDFLAGS_value=$LDFLAGS
613 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
614 ac_env_CPPFLAGS_value=$CPPFLAGS
615 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
616 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
617 ac_env_CPP_set=${CPP+set}
618 ac_env_CPP_value=$CPP
619 ac_cv_env_CPP_set=${CPP+set}
620 ac_cv_env_CPP_value=$CPP
621
622 #
623 # Report the --help message.
624 #
625 if test "$ac_init_help" = "long"; then
626 # Omit some internal or obsolete options to make the list less imposing.
627 # This message is too long to be a string in the A/UX 3.1 sh.
628 cat <<EOF
629 \`configure' configures this package to adapt to many kinds of systems.
630
631 Usage: $0 [OPTION]... [VAR=VALUE]...
632
633 To assign environment variables (e.g., CC, CFLAGS...), specify them as
634 VAR=VALUE. See below for descriptions of some of the useful variables.
635
636 Defaults for the options are specified in brackets.
637
638 Configuration:
639 -h, --help display this help and exit
640 --help=short display options specific to this package
641 --help=recursive display the short help of all the included packages
642 -V, --version display version information and exit
643 -q, --quiet, --silent do not print \`checking...' messages
644 --cache-file=FILE cache test results in FILE [disabled]
645 -C, --config-cache alias for \`--cache-file=config.cache'
646 -n, --no-create do not create output files
647 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648
649 EOF
650
651 cat <<EOF
652 Installation directories:
653 --prefix=PREFIX install architecture-independent files in PREFIX
654 [$ac_default_prefix]
655 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
656 [PREFIX]
657
658 By default, \`make install' will install all the files in
659 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
660 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
661 for instance \`--prefix=\$HOME'.
662
663 For better control, use the options below.
664
665 Fine tuning of the installation directories:
666 --bindir=DIR user executables [EPREFIX/bin]
667 --sbindir=DIR system admin executables [EPREFIX/sbin]
668 --libexecdir=DIR program executables [EPREFIX/libexec]
669 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
670 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
671 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
672 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
673 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
674 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
675 --libdir=DIR object code libraries [EPREFIX/lib]
676 --includedir=DIR C header files [PREFIX/include]
677 --oldincludedir=DIR C header files for non-gcc [/usr/include]
678 --infodir=DIR info documentation [DATAROOTDIR/info]
679 --mandir=DIR man documentation [DATAROOTDIR/man]
680 EOF
681
682 cat <<\EOF
683
684 Program names:
685 --program-prefix=PREFIX prepend PREFIX to installed program names
686 --program-suffix=SUFFIX append SUFFIX to installed program names
687 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
688
689 System types:
690 --build=BUILD configure for building on BUILD [guessed]
691 --host=HOST build programs to run on HOST [BUILD]
692 --target=TARGET configure for building compilers for TARGET [HOST]
693 EOF
694 fi
695
696 if test -n "$ac_init_help"; then
697
698 cat <<\EOF
699
700 Optional Packages:
701 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
702 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
703
704 Optional Features:
705 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
706 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
707
708 General Options:
709 --with-system-type=XXX test: override derived host system-type
710 --without-ada suppress check for Ada compiler
711 --disable-stripping do not strip (debug info) installed executables
712 --with-strip-program=XX specify program to use when stripping in install
713 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
714 --with-pkg-config-libdir[=XXX] use given directory for installing pc-files
715 --without-tests suppress build with test-programs
716 --enable-mixed-case tic should assume mixed-case filenames
717 --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
718 --enable-install-prefix merge DESTDIR with installation prefix
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720 --with-build-cc=XXX the build C compiler ($BUILD_CC)
721 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
722 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
728 --with-curses-dir=DIR directory in which (n)curses is installed
729 --with-screen=XXX use specified curses-libraries
730 --with-lib-prefix override library-prefix
731 --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
732 --enable-rpath-link link sample programs with rpath option
733 Fine-Tuning Your Configuration:
734 --enable-broken_linker compile with broken-linker support code
735 --disable-largefile omit support for large files
736 --with-rcs-ids compile-in RCS identifiers
737 Extensions:
738 --disable-ext-funcs disable function-extensions
739 --enable-const compile with extra/non-standard const
740 Development Code:
741 --without-develop disable development options
742 Experimental Code:
743 --with-pthread use POSIX thread library
744 --enable-weak-symbols enable weak-symbols for pthreads
745 --enable-reentrant compile with experimental reentrant code
746 --with-wrap-prefix=XXX override prefix used for public variables
747 Testing/development Options:
748 --disable-echo do not display "compiling" commands
749 --enable-warnings test: turn on gcc compiler warnings
750 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
751 --enable-assertions test: turn on generation of assertion code
752 --enable-expanded test: generate functions for certain macros
753 --disable-macros test: use functions rather than macros
754 --with-trace test: add trace() function to all models of ncurses
755 --disable-gnat-projects test: disable GNAT projects even if usable
756 Ada95 Binding Options:
757 --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)
758 --with-ada-include=DIR find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
759 --with-ada-objects=DIR find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
760 --with-ada-sharedlib build Ada95 shared library; requires GNAT project support
761 --with-ada-libname[=XXX] use XXX as Ada95 library name
762
763 Some influential environment variables:
764 CC C compiler command
765 CFLAGS C compiler flags
766 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
767 nonstandard directory <lib dir>
768 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
769 headers in a nonstandard directory <include dir>
770 CPP C preprocessor
771
772 Use these variables to override the choices made by `configure' or to help
773 it to find libraries and programs with nonstandard names/locations.
774
775 EOF
776 fi
777
778 if test "$ac_init_help" = "recursive"; then
779 # If there are subdirs, report their specific --help.
780 ac_popdir=`pwd`
781 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
782 cd "$ac_subdir"
783 # A "../" for each directory in /$ac_subdir.
784 ac_dots=`echo "$ac_subdir" |
785 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
786
787 case "$srcdir" in
788 .) # No --srcdir option. We are building in place.
789 ac_sub_srcdir="$srcdir" ;;
790 [\\/]* | ?:[\\/]* ) # Absolute path.
791 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
792 *) # Relative path.
793 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
794 esac
795
796 # Check for guested configure; otherwise get Cygnus style configure.
797 if test -f "$ac_sub_srcdir/configure.gnu"; then
798 echo
799 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
800 elif test -f "$ac_sub_srcdir/configure"; then
801 echo
802 $SHELL "$ac_sub_srcdir/configure" --help=recursive
803 elif test -f "$ac_sub_srcdir/configure.ac" ||
804 test -f "$ac_sub_srcdir/configure.in"; then
805 echo
806 "$ac_configure" --help
807 else
808 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
809 fi
810 cd "$ac_popdir"
811 done
812 fi
813
814 test -n "$ac_init_help" && exit 0
815 if "$ac_init_version"; then
816 cat <<\EOF
817
818 Copyright 2003-2022,2023 Thomas E. Dickey
819 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
820 Free Software Foundation, Inc.
821 This configure script is free software; the Free Software Foundation
822 gives unlimited permission to copy, distribute and modify it.
823 EOF
824 exit 0
825 fi
826 exec 5>config.log
827 cat >&5 <<EOF
828 This file contains any messages produced by compilers while
829 running configure, to aid debugging if configure makes a mistake.
830
831 It was created by $as_me, which was
832 generated by GNU Autoconf 2.52.20250126. Invocation command line was
833
834 $ $0 $@
835
836 EOF
837 {
838 cat <<_ASUNAME
839 ## ---------- ##
840 ## Platform. ##
841 ## ---------- ##
842
843 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
844 uname -m = `(uname -m) 2>/dev/null || echo unknown`
845 uname -r = `(uname -r) 2>/dev/null || echo unknown`
846 uname -s = `(uname -s) 2>/dev/null || echo unknown`
847 uname -v = `(uname -v) 2>/dev/null || echo unknown`
848
849 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
850 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
851
852 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
853 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
854 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
855 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
856 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
857 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
858 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
859
860 PATH = $PATH
861
862 _ASUNAME
863 } >&5
864
865 cat >&5 <<EOF
866 ## ------------ ##
867 ## Core tests. ##
868 ## ------------ ##
869
870 EOF
871
872 # Keep a trace of the command line.
873 # Strip out --no-create and --no-recursion so they do not pile up.
874 # Also quote any args containing shell meta-characters.
875 ac_configure_args=
876 ac_sep=
877 for ac_arg
878 do
879 case "$ac_arg" in
880 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
881 | --no-cr | --no-c) ;;
882 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
883 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
884 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
885 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
886 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
887 ac_sep=" " ;;
888 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
889 ac_sep=" " ;;
890 esac
891 # Get rid of the leading space.
892 done
893
894 # When interrupted or exit'd, cleanup temporary files, and complete
895 # config.log. We remove comments because anyway the quotes in there
896 # would cause problems or look ugly.
897 trap 'exit_status=$?
898 # Save into config.log some information that might help in debugging.
899 echo >&5
900 echo "## ----------------- ##" >&5
901 echo "## Cache variables. ##" >&5
902 echo "## ----------------- ##" >&5
903 echo >&5
904 # The following way of writing the cache mishandles newlines in values,
905 {
906 (set) 2>&1 |
907 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
908 *ac_space=\ *)
909 sed -n \
910 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
911 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
912 ;;
913 *)
914 sed -n \
915 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
916 ;;
917 esac;
918 } >&5
919 sed "/^$/d" confdefs.h >conftest.log
920 if test -s conftest.log; then
921 echo >&5
922 echo "## ------------ ##" >&5
923 echo "## confdefs.h. ##" >&5
924 echo "## ------------ ##" >&5
925 echo >&5
926 cat conftest.log >&5
927 fi
928 (echo; echo) >&5
929 test "$ac_signal" != 0 &&
930 echo "$as_me: caught signal $ac_signal" >&5
931 echo "$as_me: exit $exit_status" >&5
932 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
933 exit $exit_status
934 ' 0
935 for ac_signal in 1 2 13 15; do
936 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
937 done
938 ac_signal=0
939
940 # confdefs.h avoids OS command line length limits that DEFS can exceed.
941 rm -rf conftest* confdefs.h
942 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
943 echo >confdefs.h
944
945 # Let the site file select an alternate cache file if it wants to.
946 # Prefer explicitly selected file to automatically selected ones.
947 if test -z "$CONFIG_SITE"; then
948 if test "x$prefix" != xNONE; then
949 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
950 else
951 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
952 fi
953 fi
954 for ac_site_file in $CONFIG_SITE; do
955 if test -r "$ac_site_file"; then
956 { echo "$as_me:956: loading site script $ac_site_file" >&5
957 echo "$as_me: loading site script $ac_site_file" >&6;}
958 cat "$ac_site_file" >&5
959 . "$ac_site_file"
960 fi
961 done
962
963 if test -r "$cache_file"; then
964 # Some versions of bash will fail to source /dev/null (special
965 # files actually), so we avoid doing that.
966 if test -f "$cache_file"; then
967 { echo "$as_me:967: loading cache $cache_file" >&5
968 echo "$as_me: loading cache $cache_file" >&6;}
969 case $cache_file in
970 [\\/]* | ?:[\\/]* ) . $cache_file;;
971 *) . ./$cache_file;;
972 esac
973 fi
974 else
975 { echo "$as_me:975: creating cache $cache_file" >&5
976 echo "$as_me: creating cache $cache_file" >&6;}
977 >$cache_file
978 fi
979
980 # Check that the precious variables saved in the cache have kept the same
981 # value.
982 ac_cache_corrupted=false
983 for ac_var in `(set) 2>&1 |
984 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
985 eval ac_old_set=\$ac_cv_env_${ac_var}_set
986 eval ac_new_set=\$ac_env_${ac_var}_set
987 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
988 eval ac_new_val="\$ac_env_${ac_var}_value"
989 case "$ac_old_set,$ac_new_set" in
990 set,)
991 { echo "$as_me:991: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
992 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
993 ac_cache_corrupted=: ;;
994 ,set)
995 { echo "$as_me:995: error: \`$ac_var' was not set in the previous run" >&5
996 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
997 ac_cache_corrupted=: ;;
998 ,);;
999 *)
1000 if test "x$ac_old_val" != "x$ac_new_val"; then
1001 { echo "$as_me:1001: error: \`$ac_var' has changed since the previous run:" >&5
1002 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1003 { echo "$as_me:1003: former value: $ac_old_val" >&5
1004 echo "$as_me: former value: $ac_old_val" >&2;}
1005 { echo "$as_me:1005: current value: $ac_new_val" >&5
1006 echo "$as_me: current value: $ac_new_val" >&2;}
1007 ac_cache_corrupted=:
1008 fi;;
1009 esac
1010 # Pass precious variables to config.status. It doesn't matter if
1011 # we pass some twice (in addition to the command line arguments).
1012 if test "$ac_new_set" = set; then
1013 case "$ac_new_val" in
1014 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1015 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1016 ac_configure_args="$ac_configure_args '$ac_arg'"
1017 ;;
1018 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1019 ;;
1020 esac
1021 fi
1022 done
1023 if "$ac_cache_corrupted"; then
1024 { echo "$as_me:1024: error: changes in the environment can compromise the build" >&5
1025 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1026 { { echo "$as_me:1026: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1027 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1028 { (exit 1); exit 1; }; }
1029 fi
1030
1031 ac_ext=c
1032 ac_cpp='$CPP $CPPFLAGS'
1033 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1034 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1035 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1036 ac_main_return="return"
1037
1038 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1039 *c*,-n*) ECHO_N=
1040 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1041 ECHO_T=' '
1042 ;;
1043 *c*,* ) ECHO_N=-n
1044 ECHO_C=
1045 ECHO_T=
1046 ;;
1047 *) ECHO_N=
1048 ECHO_C='\c'
1049 ECHO_T=
1050 ;;
1051 esac
1052 echo "#! $SHELL" >conftest.sh
1053 echo "exit 0" >>conftest.sh
1054 chmod +x conftest.sh
1055 if { (echo "$as_me:1055: PATH=\".;.\"; conftest.sh") >&5
1056 (PATH=".;."; conftest.sh) 2>&5
1057 ac_status=$?
1058 echo "$as_me:1058: \$? = $ac_status" >&5
1059 (exit "$ac_status"); }; then
1060 ac_path_separator=';'
1061 else
1062 ac_path_separator=:
1063 fi
1064 PATH_SEPARATOR="$ac_path_separator"
1065 rm -f conftest.sh
1066
1067 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1068
1069 PACKAGE="AdaCurses"
1070
1071 top_builddir=`pwd`
1072
1073 ac_aux_dir=
1074 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1075 if test -f "$ac_dir/install-sh"; then
1076 ac_aux_dir=$ac_dir
1077 ac_install_sh="$ac_aux_dir/install-sh -c"
1078 break
1079 elif test -f "$ac_dir/install.sh"; then
1080 ac_aux_dir=$ac_dir
1081 ac_install_sh="$ac_aux_dir/install.sh -c"
1082 break
1083 elif test -f "$ac_dir/shtool"; then
1084 ac_aux_dir=$ac_dir
1085 ac_install_sh="$ac_aux_dir/shtool install -c"
1086 break
1087 fi
1088 done
1089 if test -z "$ac_aux_dir"; then
1090 { { echo "$as_me:1090: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1091 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1092 { (exit 1); exit 1; }; }
1093 fi
1094 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1095 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1096 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1097
1098 # Make sure we can run config.sub.
1099 $ac_config_sub sun4 >/dev/null 2>&1 ||
1100 { { echo "$as_me:1100: error: cannot run $ac_config_sub" >&5
1101 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1102 { (exit 1); exit 1; }; }
1103
1104 echo "$as_me:1104: checking build system type" >&5
1105 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1106 if test "${ac_cv_build+set}" = set; then
1107 echo $ECHO_N "(cached) $ECHO_C" >&6
1108 else
1109 ac_cv_build_alias=$build_alias
1110 test -z "$ac_cv_build_alias" &&
1111 ac_cv_build_alias=`$ac_config_guess`
1112 test -z "$ac_cv_build_alias" &&
1113 { { echo "$as_me:1113: error: cannot guess build type; you must specify one" >&5
1114 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1115 { (exit 1); exit 1; }; }
1116 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1117 { { echo "$as_me:1117: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1118 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1119 { (exit 1); exit 1; }; }
1120
1121 fi
1122 echo "$as_me:1122: result: $ac_cv_build" >&5
1123 echo "${ECHO_T}$ac_cv_build" >&6
1124 build=$ac_cv_build
1125 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128
1129 echo "$as_me:1129: checking host system type" >&5
1130 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1131 if test "${ac_cv_host+set}" = set; then
1132 echo $ECHO_N "(cached) $ECHO_C" >&6
1133 else
1134 ac_cv_host_alias=$host_alias
1135 test -z "$ac_cv_host_alias" &&
1136 ac_cv_host_alias=$ac_cv_build_alias
1137 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1138 { { echo "$as_me:1138: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1139 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1140 { (exit 1); exit 1; }; }
1141
1142 fi
1143 echo "$as_me:1143: result: $ac_cv_host" >&5
1144 echo "${ECHO_T}$ac_cv_host" >&6
1145 host=$ac_cv_host
1146 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1147 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1148 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1149
1150 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1151 echo "$as_me:1151: checking target system type" >&5
1152 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1153 if test "${ac_cv_target+set}" = set; then
1154 echo $ECHO_N "(cached) $ECHO_C" >&6
1155 else
1156 ac_cv_target_alias=$target_alias
1157 test "x$ac_cv_target_alias" = "x" &&
1158 ac_cv_target_alias=$ac_cv_host_alias
1159 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1160 { { echo "$as_me:1160: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1161 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1162 { (exit 1); exit 1; }; }
1163
1164 fi
1165 echo "$as_me:1165: result: $ac_cv_target" >&5
1166 echo "${ECHO_T}$ac_cv_target" >&6
1167 target=$ac_cv_target
1168 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1169 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1170 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1171
1172 # The aliases save the names the user supplied, while $host etc.
1173 # will get canonicalized.
1174 test -n "$target_alias" &&
1175 test "$program_prefix$program_suffix$program_transform_name" = \
1176 NONENONEs,x,x, &&
1177 program_prefix=${target_alias}-
1178 system_name="$host_os"
1179 else
1180 system_name="`(uname -s -r) 2>/dev/null`"
1181 if test -z "$system_name" ; then
1182 system_name="`(hostname) 2>/dev/null`"
1183 fi
1184 fi
1185 test -n "$system_name" &&
1186 cat >>confdefs.h <<EOF
1187 #define SYSTEM_NAME "$system_name"
1188 EOF
1189
1190 if test "${cf_cv_system_name+set}" = set; then
1191 echo $ECHO_N "(cached) $ECHO_C" >&6
1192 else
1193 cf_cv_system_name="$system_name"
1194 fi
1195
1196 test -z "$system_name" && system_name="$cf_cv_system_name"
1197 test -n "$cf_cv_system_name" && echo "$as_me:1197: result: Configuring for $cf_cv_system_name" >&5
1198 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1199
1200 if test ".$system_name" != ".$cf_cv_system_name" ; then
1201 echo "$as_me:1201: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1202 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1203 { { echo "$as_me:1203: error: \"Please remove config.cache and try again.\"" >&5
1204 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1205 { (exit 1); exit 1; }; }
1206 fi
1207
1208 # Check whether --with-system-type or --without-system-type was given.
1209 if test "${with_system_type+set}" = set; then
1210 withval="$with_system_type"
1211 { echo "$as_me:1211: WARNING: overriding system type to $withval" >&5
1212 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1213 cf_cv_system_name=$withval
1214 host_os=$withval
1215
1216 fi;
1217
1218 ### Save the given $CFLAGS to allow user-override.
1219 cf_user_CFLAGS="$CFLAGS"
1220
1221 ### Default install-location
1222 for ac_prog in ggrep grep
1223 do
1224 # Extract the first word of "$ac_prog", so it can be a program name with args.
1225 set dummy $ac_prog; ac_word=$2
1226 echo "$as_me:1226: checking for $ac_word" >&5
1227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1228 if test "${ac_cv_prog_GREP+set}" = set; then
1229 echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231 if test -n "$GREP"; then
1232 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1233 else
1234 ac_save_IFS=$IFS; IFS=$ac_path_separator
1235 ac_dummy="$PATH"
1236 for ac_dir in $ac_dummy; do
1237 IFS=$ac_save_IFS
1238 test -z "$ac_dir" && ac_dir=.
1239 $as_executable_p "$ac_dir/$ac_word" || continue
1240 ac_cv_prog_GREP="$ac_prog"
1241 echo "$as_me:1241: found $ac_dir/$ac_word" >&5
1242 break
1243 done
1244
1245 fi
1246 fi
1247 GREP=$ac_cv_prog_GREP
1248 if test -n "$GREP"; then
1249 echo "$as_me:1249: result: $GREP" >&5
1250 echo "${ECHO_T}$GREP" >&6
1251 else
1252 echo "$as_me:1252: result: no" >&5
1253 echo "${ECHO_T}no" >&6
1254 fi
1255
1256 test -n "$GREP" && break
1257 done
1258 test -n "$GREP" || GREP=": "
1259
1260 echo "$as_me:1260: checking for fgrep" >&5
1261 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1262 if test "${ac_cv_path_FGREP+set}" = set; then
1263 echo $ECHO_N "(cached) $ECHO_C" >&6
1264 else
1265 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1266 then ac_cv_path_FGREP="$GREP -F"
1267 else
1268 for ac_prog in gfgrep fgrep
1269 do
1270 # Extract the first word of "$ac_prog", so it can be a program name with args.
1271 set dummy $ac_prog; ac_word=$2
1272 echo "$as_me:1272: checking for $ac_word" >&5
1273 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1274 if test "${ac_cv_path_FGREP+set}" = set; then
1275 echo $ECHO_N "(cached) $ECHO_C" >&6
1276 else
1277 case $FGREP in
1278 [\\/]* | ?:[\\/]*)
1279 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1280 ;;
1281 *)
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 if $as_executable_p "$ac_dir/$ac_word"; then
1288 ac_cv_path_FGREP="$ac_dir/$ac_word"
1289 echo "$as_me:1289: found $ac_dir/$ac_word" >&5
1290 break
1291 fi
1292 done
1293
1294 ;;
1295 esac
1296 fi
1297 FGREP=$ac_cv_path_FGREP
1298
1299 if test -n "$FGREP"; then
1300 echo "$as_me:1300: result: $FGREP" >&5
1301 echo "${ECHO_T}$FGREP" >&6
1302 else
1303 echo "$as_me:1303: result: no" >&5
1304 echo "${ECHO_T}no" >&6
1305 fi
1306
1307 test -n "$FGREP" && break
1308 done
1309 test -n "$FGREP" || FGREP=": "
1310
1311 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1311: error: cannot find workable fgrep" >&5
1312 echo "$as_me: error: cannot find workable fgrep" >&2;}
1313 { (exit 1); exit 1; }; }
1314 fi
1315 fi
1316 echo "$as_me:1316: result: $ac_cv_path_FGREP" >&5
1317 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1318 FGREP="$ac_cv_path_FGREP"
1319
1320 echo "$as_me:1320: checking for prefix" >&5
1321 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1322 if test "x$prefix" = "xNONE" ; then
1323 case "$cf_cv_system_name" in
1324 # non-vendor systems don't have a conflict
1325 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1326 prefix=/usr
1327 ;;
1328 (*) prefix=$ac_default_prefix
1329 ;;
1330 esac
1331 fi
1332 echo "$as_me:1332: result: $prefix" >&5
1333 echo "${ECHO_T}$prefix" >&6
1334
1335 if test "x$prefix" = "xNONE" ; then
1336 echo "$as_me:1336: checking for default include-directory" >&5
1337 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1338 test -n "$verbose" && echo 1>&6
1339 for cf_symbol in \
1340 "$includedir" \
1341 "$includedir/ncurses" \
1342 "$prefix/include" \
1343 "$prefix/include/ncurses" \
1344 /usr/local/include \
1345 /usr/local/include/ncurses \
1346 /usr/include \
1347 /usr/include/ncurses
1348 do
1349 cf_dir=`eval echo "$cf_symbol"`
1350 if test -f "$cf_dir/curses.h" ; then
1351 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1352 includedir="$cf_symbol"
1353 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1354 break
1355 fi
1356 fi
1357 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1358 done
1359 echo "$as_me:1359: result: $includedir" >&5
1360 echo "${ECHO_T}$includedir" >&6
1361 fi
1362
1363 ### Checks for programs.
1364
1365 # Check whether --with-ada or --without-ada was given.
1366 if test "${with_ada+set}" = set; then
1367 withval="$with_ada"
1368 cf_with_ada=$withval
1369 else
1370 cf_with_ada=yes
1371 fi;
1372
1373 cf_prog_cc="gcc cc"
1374 if test "x$cf_with_ada" = xyes
1375 then
1376
1377 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
1378 do
1379
1380 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1381
1382 unset ac_cv_path_cf_TEMP_gnat
1383 unset cf_TEMP_gnat
1384 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
1385 set dummy $cf_prog_gnat; ac_word=$2
1386 echo "$as_me:1386: checking for $ac_word" >&5
1387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1388 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
1389 echo $ECHO_N "(cached) $ECHO_C" >&6
1390 else
1391 case $cf_TEMP_gnat in
1392 [\\/]* | ?:[\\/]*)
1393 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
1394 ;;
1395 *)
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 if $as_executable_p "$ac_dir/$ac_word"; then
1402 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
1403 echo "$as_me:1403: found $ac_dir/$ac_word" >&5
1404 break
1405 fi
1406 done
1407
1408 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
1409 ;;
1410 esac
1411 fi
1412 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
1413
1414 if test -n "$cf_TEMP_gnat"; then
1415 echo "$as_me:1415: result: $cf_TEMP_gnat" >&5
1416 echo "${ECHO_T}$cf_TEMP_gnat" >&6
1417 else
1418 echo "$as_me:1418: result: no" >&5
1419 echo "${ECHO_T}no" >&6
1420 fi
1421
1422 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
1423
1424 if test "x$cf_TEMP_gnat" != xno; then
1425 unset cf_cv_gnat_version
1426 unset cf_TEMP_gnat
1427
1428 echo "$as_me:1428: checking for $cf_prog_gnat version" >&5
1429 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
1430 if test "${cf_cv_gnat_version+set}" = set; then
1431 echo $ECHO_N "(cached) $ECHO_C" >&6
1432 else
1433
1434 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
1435 grep '[0-9].[0-9][0-9]*' |\
1436 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1437
1438 fi
1439 echo "$as_me:1439: result: $cf_cv_gnat_version" >&5
1440 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1441 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1442 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
1443
1444 fi
1445 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
1446
1447 unset cf_TEMP_gnat
1448 unset cf_cv_gnat_version
1449 unset ac_cv_path_cf_TEMP_gnat
1450 done
1451
1452 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
1453 cf_ada_make=
1454 cf_cv_prog_gnat_correct=no
1455 else
1456 cf_ada_make=gnatmake
1457 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
1458 # gprconfig is newer than gnatmake; we can continue...
1459 cf_ada_config="##"
1460 else
1461 rm -rf ./conftest* ./*~conftest*
1462 if mkdir conftest.src
1463 then
1464 cf_ada_config=""
1465 cd conftest.src
1466 for cf_gprconfig in Ada C
1467 do
1468 echo "$as_me:1468: checking for gprconfig name for $cf_gprconfig" >&5
1469 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
1470 if test "$cf_gprconfig" = C
1471 then
1472 for cf_gprconfig_param in \
1473 "$cf_gprconfig,,,,GNATGCC" \
1474 "$cf_gprconfig,,,,GCC" \
1475 "$cf_gprconfig"
1476 do
1477 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1478 test -n "$cf_gprconfig_value" && break
1479 done
1480 else
1481 cf_gprconfig_param=$cf_gprconfig
1482 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1483 fi
1484 if test -n "$cf_gprconfig_value"
1485 then
1486 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
1487 echo "$as_me:1487: result: $cf_gprconfig_value" >&5
1488 echo "${ECHO_T}$cf_gprconfig_value" >&6
1489 else
1490 echo "$as_me:1490: result: missing" >&5
1491 echo "${ECHO_T}missing" >&6
1492 cf_ada_config="#"
1493 break
1494 fi
1495 done
1496 cd ..
1497 rm -rf ./conftest* ./*~conftest*
1498 fi
1499 fi
1500 if test "x$cf_ada_config" != "x#"
1501 then
1502
1503 echo "$as_me:1503: checking for gnat version" >&5
1504 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
1505 if test "${cf_cv_gnat_version+set}" = set; then
1506 echo $ECHO_N "(cached) $ECHO_C" >&6
1507 else
1508
1509 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
1510 grep '[0-9].[0-9][0-9]*' |\
1511 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1512
1513 fi
1514 echo "$as_me:1514: result: $cf_cv_gnat_version" >&5
1515 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1516 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1517
1518 case "$cf_cv_gnat_version" in
1519 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
1520 cf_cv_prog_gnat_correct=yes
1521 ;;
1522 (*)
1523 { echo "$as_me:1523: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
1524 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
1525 cf_cv_prog_gnat_correct=no
1526 ;;
1527 esac
1528
1529 # Extract the first word of "m4", so it can be a program name with args.
1530 set dummy m4; ac_word=$2
1531 echo "$as_me:1531: checking for $ac_word" >&5
1532 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1533 if test "${ac_cv_prog_M4_exists+set}" = set; then
1534 echo $ECHO_N "(cached) $ECHO_C" >&6
1535 else
1536 if test -n "$M4_exists"; then
1537 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
1538 else
1539 ac_save_IFS=$IFS; IFS=$ac_path_separator
1540 ac_dummy="$PATH"
1541 for ac_dir in $ac_dummy; do
1542 IFS=$ac_save_IFS
1543 test -z "$ac_dir" && ac_dir=.
1544 $as_executable_p "$ac_dir/$ac_word" || continue
1545 ac_cv_prog_M4_exists="yes"
1546 echo "$as_me:1546: found $ac_dir/$ac_word" >&5
1547 break
1548 done
1549
1550 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
1551 fi
1552 fi
1553 M4_exists=$ac_cv_prog_M4_exists
1554 if test -n "$M4_exists"; then
1555 echo "$as_me:1555: result: $M4_exists" >&5
1556 echo "${ECHO_T}$M4_exists" >&6
1557 else
1558 echo "$as_me:1558: result: no" >&5
1559 echo "${ECHO_T}no" >&6
1560 fi
1561
1562 if test "$ac_cv_prog_M4_exists" = no; then
1563 cf_cv_prog_gnat_correct=no
1564 { echo "$as_me:1564: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
1565 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
1566 fi
1567 if test "$cf_cv_prog_gnat_correct" = yes; then
1568 echo "$as_me:1568: checking if GNAT works" >&5
1569 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
1570
1571 rm -rf ./conftest* ./*~conftest*
1572 cat >>conftest.ads <<CF_EOF
1573 procedure conftest;
1574 CF_EOF
1575 cat >>conftest.adb <<CF_EOF
1576 with Text_IO;
1577 with GNAT.OS_Lib;
1578 procedure conftest is
1579 begin
1580 Text_IO.Put ("Hello World");
1581 Text_IO.New_Line;
1582 GNAT.OS_Lib.OS_Exit (0);
1583 end conftest;
1584 CF_EOF
1585 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
1586 if ( ./conftest 1>&5 2>&1 ) ; then
1587 cf_cv_prog_gnat_correct=yes
1588 else
1589 cf_cv_prog_gnat_correct=no
1590 fi
1591 else
1592 cf_cv_prog_gnat_correct=no
1593 fi
1594 rm -rf ./conftest* ./*~conftest*
1595
1596 echo "$as_me:1596: result: $cf_cv_prog_gnat_correct" >&5
1597 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
1598 fi
1599 else
1600 cf_cv_prog_gnat_correct=no
1601 fi
1602 fi
1603
1604 if test "x$cf_cv_prog_gnat_correct" = xyes; then
1605 # gcc's developers chose to deprecate gnatgcc before making gprconfig
1606 # work. They replaced gnatgcc in gcc 13 with a script which spits out
1607 # a warning offering advice which could never work.
1608 #
1609 # Here is a workaround.
1610 # Extract the first word of "gnatgcc", so it can be a program name with args.
1611 set dummy gnatgcc; ac_word=$2
1612 echo "$as_me:1612: checking for $ac_word" >&5
1613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1614 if test "${ac_cv_path_cf_cv_path_gnatgcc+set}" = set; then
1615 echo $ECHO_N "(cached) $ECHO_C" >&6
1616 else
1617 case $cf_cv_path_gnatgcc in
1618 [\\/]* | ?:[\\/]*)
1619 ac_cv_path_cf_cv_path_gnatgcc="$cf_cv_path_gnatgcc" # Let the user override the test with a path.
1620 ;;
1621 *)
1622 ac_save_IFS=$IFS; IFS=$ac_path_separator
1623 ac_dummy="$PATH"
1624 for ac_dir in $ac_dummy; do
1625 IFS=$ac_save_IFS
1626 test -z "$ac_dir" && ac_dir=.
1627 if $as_executable_p "$ac_dir/$ac_word"; then
1628 ac_cv_path_cf_cv_path_gnatgcc="$ac_dir/$ac_word"
1629 echo "$as_me:1629: found $ac_dir/$ac_word" >&5
1630 break
1631 fi
1632 done
1633
1634 test -z "$ac_cv_path_cf_cv_path_gnatgcc" && ac_cv_path_cf_cv_path_gnatgcc="no"
1635 ;;
1636 esac
1637 fi
1638 cf_cv_path_gnatgcc=$ac_cv_path_cf_cv_path_gnatgcc
1639
1640 if test -n "$cf_cv_path_gnatgcc"; then
1641 echo "$as_me:1641: result: $cf_cv_path_gnatgcc" >&5
1642 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
1643 else
1644 echo "$as_me:1644: result: no" >&5
1645 echo "${ECHO_T}no" >&6
1646 fi
1647
1648 if test "$cf_cv_path_gnatgcc" != no
1649 then
1650 echo "$as_me:1650: checking for improvement" >&5
1651 echo $ECHO_N "checking for improvement... $ECHO_C" >&6
1652 cf_file_gnatgcc=`file -L "$cf_cv_path_gnatgcc" 2>/dev/null`
1653 case "x$cf_file_gnatgcc" in
1654 (*script*)
1655 cf_cv_path_gnatgcc=`sh -x "$cf_cv_path_gnatgcc" --version 2>&1 | grep -w exec | sed -e 's/^[ ]*+[ ]*//' -e 's/exec[ ]//' -e 's/ .*//'`
1656 ;;
1657 (*)
1658 cf_cv_path_gnatgcc=no
1659 ;;
1660 esac
1661 echo "$as_me:1661: result: $cf_cv_path_gnatgcc" >&5
1662 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
1663 test "$cf_cv_path_gnatgcc" = no && cf_cv_path_gnatgcc=gnatgcc
1664 cf_prog_cc="$cf_cv_path_gnatgcc $cf_prog_cc"
1665 fi
1666 fi
1667 fi
1668 case "$cf_prog_cc" in
1669 (*/*)
1670 CC="$cf_prog_cc"
1671
1672 ;;
1673 (*)
1674
1675 ac_ext=c
1676 ac_cpp='$CPP $CPPFLAGS'
1677 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1678 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1679 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1680 ac_main_return="return"
1681 if test -n "$ac_tool_prefix"; then
1682 for ac_prog in $cf_prog_cc
1683 do
1684 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1685 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1686 echo "$as_me:1686: checking for $ac_word" >&5
1687 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1688 if test "${ac_cv_prog_CC+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1690 else
1691 if test -n "$CC"; then
1692 ac_cv_prog_CC="$CC" # Let the user override the test.
1693 else
1694 ac_save_IFS=$IFS; IFS=$ac_path_separator
1695 ac_dummy="$PATH"
1696 for ac_dir in $ac_dummy; do
1697 IFS=$ac_save_IFS
1698 test -z "$ac_dir" && ac_dir=.
1699 $as_executable_p "$ac_dir/$ac_word" || continue
1700 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1701 echo "$as_me:1701: found $ac_dir/$ac_word" >&5
1702 break
1703 done
1704
1705 fi
1706 fi
1707 CC=$ac_cv_prog_CC
1708 if test -n "$CC"; then
1709 echo "$as_me:1709: result: $CC" >&5
1710 echo "${ECHO_T}$CC" >&6
1711 else
1712 echo "$as_me:1712: result: no" >&5
1713 echo "${ECHO_T}no" >&6
1714 fi
1715
1716 test -n "$CC" && break
1717 done
1718 fi
1719 if test -z "$CC"; then
1720 ac_ct_CC=$CC
1721 for ac_prog in $cf_prog_cc
1722 do
1723 # Extract the first word of "$ac_prog", so it can be a program name with args.
1724 set dummy $ac_prog; ac_word=$2
1725 echo "$as_me:1725: checking for $ac_word" >&5
1726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1727 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1728 echo $ECHO_N "(cached) $ECHO_C" >&6
1729 else
1730 if test -n "$ac_ct_CC"; then
1731 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1732 else
1733 ac_save_IFS=$IFS; IFS=$ac_path_separator
1734 ac_dummy="$PATH"
1735 for ac_dir in $ac_dummy; do
1736 IFS=$ac_save_IFS
1737 test -z "$ac_dir" && ac_dir=.
1738 $as_executable_p "$ac_dir/$ac_word" || continue
1739 ac_cv_prog_ac_ct_CC="$ac_prog"
1740 echo "$as_me:1740: found $ac_dir/$ac_word" >&5
1741 break
1742 done
1743
1744 fi
1745 fi
1746 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1747 if test -n "$ac_ct_CC"; then
1748 echo "$as_me:1748: result: $ac_ct_CC" >&5
1749 echo "${ECHO_T}$ac_ct_CC" >&6
1750 else
1751 echo "$as_me:1751: result: no" >&5
1752 echo "${ECHO_T}no" >&6
1753 fi
1754
1755 test -n "$ac_ct_CC" && break
1756 done
1757
1758 CC=$ac_ct_CC
1759 fi
1760
1761 test -z "$CC" && { { echo "$as_me:1761: error: no acceptable cc found in \$PATH" >&5
1762 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1763 { (exit 1); exit 1; }; }
1764
1765 # Provide some information about the compiler.
1766 echo "$as_me:1766:" \
1767 "checking for C compiler version" >&5
1768 ac_compiler=`set X $ac_compile; echo "$2"`
1769 { (eval echo "$as_me:1769: \"$ac_compiler --version </dev/null >&5\"") >&5
1770 (eval $ac_compiler --version </dev/null >&5) 2>&5
1771 ac_status=$?
1772 echo "$as_me:1772: \$? = $ac_status" >&5
1773 (exit "$ac_status"); }
1774 { (eval echo "$as_me:1774: \"$ac_compiler -v </dev/null >&5\"") >&5
1775 (eval $ac_compiler -v </dev/null >&5) 2>&5
1776 ac_status=$?
1777 echo "$as_me:1777: \$? = $ac_status" >&5
1778 (exit "$ac_status"); }
1779 { (eval echo "$as_me:1779: \"$ac_compiler -V </dev/null >&5\"") >&5
1780 (eval $ac_compiler -V </dev/null >&5) 2>&5
1781 ac_status=$?
1782 echo "$as_me:1782: \$? = $ac_status" >&5
1783 (exit "$ac_status"); }
1784
1785 cat >"conftest.$ac_ext" <<_ACEOF
1786 #line 1786 "configure"
1787 #include "confdefs.h"
1788
1789 int
1790 main (void)
1791 {
1792
1793 ;
1794 return 0;
1795 }
1796 _ACEOF
1797 ac_clean_files_save=$ac_clean_files
1798 ac_clean_files="$ac_clean_files a.out a.exe"
1799 # Try to create an executable without -o first, disregard a.out.
1800 # It will help us diagnose broken compilers, and finding out an intuition
1801 # of exeext.
1802 echo "$as_me:1802: checking for C compiler default output" >&5
1803 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1804 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1805 if { (eval echo "$as_me:1805: \"$ac_link_default\"") >&5
1806 (eval $ac_link_default) 2>&5
1807 ac_status=$?
1808 echo "$as_me:1808: \$? = $ac_status" >&5
1809 (exit "$ac_status"); }; then
1810 # Find the output, starting from the most likely. This scheme is
1811 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1812 # resort.
1813 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1814 ls a.out conftest 2>/dev/null;
1815 ls a.* conftest.* 2>/dev/null`; do
1816 case $ac_file in
1817 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1818 a.out ) # We found the default executable, but exeext='' is most
1819 # certainly right.
1820 break;;
1821 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1822 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1823 export ac_cv_exeext
1824 break;;
1825 * ) break;;
1826 esac
1827 done
1828 else
1829 echo "$as_me: failed program was:" >&5
1830 cat "conftest.$ac_ext" >&5
1831 { { echo "$as_me:1831: error: C compiler cannot create executables" >&5
1832 echo "$as_me: error: C compiler cannot create executables" >&2;}
1833 { (exit 77); exit 77; }; }
1834 fi
1835
1836 ac_exeext=$ac_cv_exeext
1837 echo "$as_me:1837: result: $ac_file" >&5
1838 echo "${ECHO_T}$ac_file" >&6
1839
1840 # Check the compiler produces executables we can run. If not, either
1841 # the compiler is broken, or we cross compile.
1842 echo "$as_me:1842: checking whether the C compiler works" >&5
1843 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1844 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1845 # If not cross compiling, check that we can run a simple program.
1846 if test "$cross_compiling" != yes; then
1847 if { ac_try='./$ac_file'
1848 { (eval echo "$as_me:1848: \"$ac_try\"") >&5
1849 (eval $ac_try) 2>&5
1850 ac_status=$?
1851 echo "$as_me:1851: \$? = $ac_status" >&5
1852 (exit "$ac_status"); }; }; then
1853 cross_compiling=no
1854 else
1855 if test "$cross_compiling" = maybe; then
1856 cross_compiling=yes
1857 else
1858 { { echo "$as_me:1858: error: cannot run C compiled programs.
1859 If you meant to cross compile, use \`--host'." >&5
1860 echo "$as_me: error: cannot run C compiled programs.
1861 If you meant to cross compile, use \`--host'." >&2;}
1862 { (exit 1); exit 1; }; }
1863 fi
1864 fi
1865 fi
1866 echo "$as_me:1866: result: yes" >&5
1867 echo "${ECHO_T}yes" >&6
1868
1869 rm -f a.out a.exe "conftest$ac_cv_exeext"
1870 ac_clean_files=$ac_clean_files_save
1871 # Check the compiler produces executables we can run. If not, either
1872 # the compiler is broken, or we cross compile.
1873 echo "$as_me:1873: checking whether we are cross compiling" >&5
1874 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1875 echo "$as_me:1875: result: $cross_compiling" >&5
1876 echo "${ECHO_T}$cross_compiling" >&6
1877
1878 echo "$as_me:1878: checking for executable suffix" >&5
1879 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1880 if { (eval echo "$as_me:1880: \"$ac_link\"") >&5
1881 (eval $ac_link) 2>&5
1882 ac_status=$?
1883 echo "$as_me:1883: \$? = $ac_status" >&5
1884 (exit "$ac_status"); }; then
1885 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1886 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1887 # work properly (i.e., refer to `conftest.exe'), while it won't with
1888 # `rm'.
1889 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1890 case $ac_file in
1891 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1892 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1893 export ac_cv_exeext
1894 break;;
1895 * ) break;;
1896 esac
1897 done
1898 else
1899 { { echo "$as_me:1899: error: cannot compute EXEEXT: cannot compile and link" >&5
1900 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1901 { (exit 1); exit 1; }; }
1902 fi
1903
1904 rm -f "conftest$ac_cv_exeext"
1905 echo "$as_me:1905: result: $ac_cv_exeext" >&5
1906 echo "${ECHO_T}$ac_cv_exeext" >&6
1907
1908 rm -f "conftest.$ac_ext"
1909 EXEEXT=$ac_cv_exeext
1910 ac_exeext=$EXEEXT
1911 echo "$as_me:1911: checking for object suffix" >&5
1912 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1913 if test "${ac_cv_objext+set}" = set; then
1914 echo $ECHO_N "(cached) $ECHO_C" >&6
1915 else
1916 cat >"conftest.$ac_ext" <<_ACEOF
1917 #line 1917 "configure"
1918 #include "confdefs.h"
1919
1920 int
1921 main (void)
1922 {
1923
1924 ;
1925 return 0;
1926 }
1927 _ACEOF
1928 rm -f conftest.o conftest.obj
1929 if { (eval echo "$as_me:1929: \"$ac_compile\"") >&5
1930 (eval $ac_compile) 2>&5
1931 ac_status=$?
1932 echo "$as_me:1932: \$? = $ac_status" >&5
1933 (exit "$ac_status"); }; then
1934 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1935 case $ac_file in
1936 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1937 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1938 break;;
1939 esac
1940 done
1941 else
1942 echo "$as_me: failed program was:" >&5
1943 cat "conftest.$ac_ext" >&5
1944 { { echo "$as_me:1944: error: cannot compute OBJEXT: cannot compile" >&5
1945 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1946 { (exit 1); exit 1; }; }
1947 fi
1948
1949 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1950 fi
1951 echo "$as_me:1951: result: $ac_cv_objext" >&5
1952 echo "${ECHO_T}$ac_cv_objext" >&6
1953 OBJEXT=$ac_cv_objext
1954 ac_objext=$OBJEXT
1955 echo "$as_me:1955: checking whether we are using the GNU C compiler" >&5
1956 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1957 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1958 echo $ECHO_N "(cached) $ECHO_C" >&6
1959 else
1960 cat >"conftest.$ac_ext" <<_ACEOF
1961 #line 1961 "configure"
1962 #include "confdefs.h"
1963
1964 int
1965 main (void)
1966 {
1967 #ifndef __GNUC__
1968 choke me
1969 #endif
1970
1971 ;
1972 return 0;
1973 }
1974 _ACEOF
1975 rm -f "conftest.$ac_objext"
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977 (eval $ac_compile) 2>&5
1978 ac_status=$?
1979 echo "$as_me:1979: \$? = $ac_status" >&5
1980 (exit "$ac_status"); } &&
1981 { ac_try='test -s "conftest.$ac_objext"'
1982 { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983 (eval $ac_try) 2>&5
1984 ac_status=$?
1985 echo "$as_me:1985: \$? = $ac_status" >&5
1986 (exit "$ac_status"); }; }; then
1987 ac_compiler_gnu=yes
1988 else
1989 echo "$as_me: failed program was:" >&5
1990 cat "conftest.$ac_ext" >&5
1991 ac_compiler_gnu=no
1992 fi
1993 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1994 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1995
1996 fi
1997 echo "$as_me:1997: result: $ac_cv_c_compiler_gnu" >&5
1998 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1999 GCC=`test $ac_compiler_gnu = yes && echo yes`
2000 ac_test_CFLAGS=${CFLAGS+set}
2001 ac_save_CFLAGS=$CFLAGS
2002 CFLAGS="-g"
2003 echo "$as_me:2003: checking whether $CC accepts -g" >&5
2004 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2005 if test "${ac_cv_prog_cc_g+set}" = set; then
2006 echo $ECHO_N "(cached) $ECHO_C" >&6
2007 else
2008 cat >"conftest.$ac_ext" <<_ACEOF
2009 #line 2009 "configure"
2010 #include "confdefs.h"
2011
2012 int
2013 main (void)
2014 {
2015
2016 ;
2017 return 0;
2018 }
2019 _ACEOF
2020 rm -f "conftest.$ac_objext"
2021 if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5
2022 (eval $ac_compile) 2>&5
2023 ac_status=$?
2024 echo "$as_me:2024: \$? = $ac_status" >&5
2025 (exit "$ac_status"); } &&
2026 { ac_try='test -s "conftest.$ac_objext"'
2027 { (eval echo "$as_me:2027: \"$ac_try\"") >&5
2028 (eval $ac_try) 2>&5
2029 ac_status=$?
2030 echo "$as_me:2030: \$? = $ac_status" >&5
2031 (exit "$ac_status"); }; }; then
2032 ac_cv_prog_cc_g=yes
2033 else
2034 echo "$as_me: failed program was:" >&5
2035 cat "conftest.$ac_ext" >&5
2036 ac_cv_prog_cc_g=no
2037 fi
2038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2039 fi
2040 echo "$as_me:2040: result: $ac_cv_prog_cc_g" >&5
2041 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2042 if test "$ac_test_CFLAGS" = set; then
2043 CFLAGS=$ac_save_CFLAGS
2044 elif test $ac_cv_prog_cc_g = yes; then
2045 if test "$GCC" = yes; then
2046 CFLAGS="-g -O2"
2047 else
2048 CFLAGS="-g"
2049 fi
2050 else
2051 if test "$GCC" = yes; then
2052 CFLAGS="-O2"
2053 else
2054 CFLAGS=
2055 fi
2056 fi
2057 # Some people use a C++ compiler to compile C. Since we use `exit',
2058 # in C++ we need to declare it. In case someone uses the same compiler
2059 # for both compiling C and C++ we need to have the C++ compiler decide
2060 # the declaration of exit, since it's the most demanding environment.
2061 cat >"conftest.$ac_ext" <<_ACEOF
2062 #ifndef __cplusplus
2063 choke me
2064 #endif
2065 _ACEOF
2066 rm -f "conftest.$ac_objext"
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068 (eval $ac_compile) 2>&5
2069 ac_status=$?
2070 echo "$as_me:2070: \$? = $ac_status" >&5
2071 (exit "$ac_status"); } &&
2072 { ac_try='test -s "conftest.$ac_objext"'
2073 { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074 (eval $ac_try) 2>&5
2075 ac_status=$?
2076 echo "$as_me:2076: \$? = $ac_status" >&5
2077 (exit "$ac_status"); }; }; then
2078 for ac_declaration in \
2079 ''\
2080 '#include <stdlib.h>' \
2081 'extern "C" void std::exit (int) throw (); using std::exit;' \
2082 'extern "C" void std::exit (int); using std::exit;' \
2083 'extern "C" void exit (int) throw ();' \
2084 'extern "C" void exit (int);' \
2085 'void exit (int);'
2086 do
2087 cat >"conftest.$ac_ext" <<_ACEOF
2088 #line 2088 "configure"
2089 #include "confdefs.h"
2090 #include <stdlib.h>
2091 $ac_declaration
2092 int
2093 main (void)
2094 {
2095 exit (42);
2096 ;
2097 return 0;
2098 }
2099 _ACEOF
2100 rm -f "conftest.$ac_objext"
2101 if { (eval echo "$as_me:2101: \"$ac_compile\"") >&5
2102 (eval $ac_compile) 2>&5
2103 ac_status=$?
2104 echo "$as_me:2104: \$? = $ac_status" >&5
2105 (exit "$ac_status"); } &&
2106 { ac_try='test -s "conftest.$ac_objext"'
2107 { (eval echo "$as_me:2107: \"$ac_try\"") >&5
2108 (eval $ac_try) 2>&5
2109 ac_status=$?
2110 echo "$as_me:2110: \$? = $ac_status" >&5
2111 (exit "$ac_status"); }; }; then
2112 :
2113 else
2114 echo "$as_me: failed program was:" >&5
2115 cat "conftest.$ac_ext" >&5
2116 continue
2117 fi
2118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2119 cat >"conftest.$ac_ext" <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122 $ac_declaration
2123 int
2124 main (void)
2125 {
2126 exit (42);
2127 ;
2128 return 0;
2129 }
2130 _ACEOF
2131 rm -f "conftest.$ac_objext"
2132 if { (eval echo "$as_me:2132: \"$ac_compile\"") >&5
2133 (eval $ac_compile) 2>&5
2134 ac_status=$?
2135 echo "$as_me:2135: \$? = $ac_status" >&5
2136 (exit "$ac_status"); } &&
2137 { ac_try='test -s "conftest.$ac_objext"'
2138 { (eval echo "$as_me:2138: \"$ac_try\"") >&5
2139 (eval $ac_try) 2>&5
2140 ac_status=$?
2141 echo "$as_me:2141: \$? = $ac_status" >&5
2142 (exit "$ac_status"); }; }; then
2143 break
2144 else
2145 echo "$as_me: failed program was:" >&5
2146 cat "conftest.$ac_ext" >&5
2147 fi
2148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2149 done
2150 rm -rf conftest*
2151 if test -n "$ac_declaration"; then
2152 echo '#ifdef __cplusplus' >>confdefs.h
2153 echo "$ac_declaration" >>confdefs.h
2154 echo '#endif' >>confdefs.h
2155 fi
2156
2157 else
2158 echo "$as_me: failed program was:" >&5
2159 cat "conftest.$ac_ext" >&5
2160 fi
2161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2162 ac_ext=c
2163 ac_cpp='$CPP $CPPFLAGS'
2164 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2165 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2166 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2167 ac_main_return="return"
2168
2169 GCC_VERSION=none
2170 if test "$GCC" = yes ; then
2171 echo "$as_me:2171: checking version of $CC" >&5
2172 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2173 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2174 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2175 echo "$as_me:2175: result: $GCC_VERSION" >&5
2176 echo "${ECHO_T}$GCC_VERSION" >&6
2177 fi
2178
2179 INTEL_COMPILER=no
2180
2181 if test "$GCC" = yes ; then
2182 case "$host_os" in
2183 (linux*|gnu*)
2184 echo "$as_me:2184: checking if this is really Intel C compiler" >&5
2185 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2186 cf_save_CFLAGS="$CFLAGS"
2187 CFLAGS="$CFLAGS -no-gcc"
2188 cat >"conftest.$ac_ext" <<_ACEOF
2189 #line 2189 "configure"
2190 #include "confdefs.h"
2191
2192 int
2193 main (void)
2194 {
2195
2196 #ifdef __INTEL_COMPILER
2197 #else
2198 #error __INTEL_COMPILER is not defined
2199 #endif
2200
2201 ;
2202 return 0;
2203 }
2204 _ACEOF
2205 rm -f "conftest.$ac_objext"
2206 if { (eval echo "$as_me:2206: \"$ac_compile\"") >&5
2207 (eval $ac_compile) 2>&5
2208 ac_status=$?
2209 echo "$as_me:2209: \$? = $ac_status" >&5
2210 (exit "$ac_status"); } &&
2211 { ac_try='test -s "conftest.$ac_objext"'
2212 { (eval echo "$as_me:2212: \"$ac_try\"") >&5
2213 (eval $ac_try) 2>&5
2214 ac_status=$?
2215 echo "$as_me:2215: \$? = $ac_status" >&5
2216 (exit "$ac_status"); }; }; then
2217 INTEL_COMPILER=yes
2218 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2219
2220 else
2221 echo "$as_me: failed program was:" >&5
2222 cat "conftest.$ac_ext" >&5
2223 fi
2224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2225 CFLAGS="$cf_save_CFLAGS"
2226 echo "$as_me:2226: result: $INTEL_COMPILER" >&5
2227 echo "${ECHO_T}$INTEL_COMPILER" >&6
2228 ;;
2229 esac
2230 fi
2231
2232 CLANG_COMPILER=no
2233
2234 if test "$GCC" = yes ; then
2235 echo "$as_me:2235: checking if this is really Clang C compiler" >&5
2236 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2237 cf_save_CFLAGS="$CFLAGS"
2238 cat >"conftest.$ac_ext" <<_ACEOF
2239 #line 2239 "configure"
2240 #include "confdefs.h"
2241
2242 int
2243 main (void)
2244 {
2245
2246 #ifdef __clang__
2247 #else
2248 #error __clang__ is not defined
2249 #endif
2250
2251 ;
2252 return 0;
2253 }
2254 _ACEOF
2255 rm -f "conftest.$ac_objext"
2256 if { (eval echo "$as_me:2256: \"$ac_compile\"") >&5
2257 (eval $ac_compile) 2>&5
2258 ac_status=$?
2259 echo "$as_me:2259: \$? = $ac_status" >&5
2260 (exit "$ac_status"); } &&
2261 { ac_try='test -s "conftest.$ac_objext"'
2262 { (eval echo "$as_me:2262: \"$ac_try\"") >&5
2263 (eval $ac_try) 2>&5
2264 ac_status=$?
2265 echo "$as_me:2265: \$? = $ac_status" >&5
2266 (exit "$ac_status"); }; }; then
2267 CLANG_COMPILER=yes
2268
2269 else
2270 echo "$as_me: failed program was:" >&5
2271 cat "conftest.$ac_ext" >&5
2272 fi
2273 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2274 CFLAGS="$cf_save_CFLAGS"
2275 echo "$as_me:2275: result: $CLANG_COMPILER" >&5
2276 echo "${ECHO_T}$CLANG_COMPILER" >&6
2277 fi
2278
2279 CLANG_VERSION=none
2280
2281 if test "x$CLANG_COMPILER" = "xyes" ; then
2282 case "$CC" in
2283 (c[1-9][0-9]|*/c[1-9][0-9])
2284 { echo "$as_me:2284: WARNING: replacing broken compiler alias $CC" >&5
2285 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2286 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2287 CC=clang
2288 ;;
2289 esac
2290
2291 echo "$as_me:2291: checking version of $CC" >&5
2292 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2293 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.].*//'`"
2294 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2295 echo "$as_me:2295: result: $CLANG_VERSION" >&5
2296 echo "${ECHO_T}$CLANG_VERSION" >&6
2297
2298 for cf_clang_opt in \
2299 -Qunused-arguments \
2300 -Wno-error=implicit-function-declaration
2301 do
2302 echo "$as_me:2302: checking if option $cf_clang_opt works" >&5
2303 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2304 cf_save_CFLAGS="$CFLAGS"
2305 CFLAGS="$CFLAGS $cf_clang_opt"
2306 cat >"conftest.$ac_ext" <<_ACEOF
2307 #line 2307 "configure"
2308 #include "confdefs.h"
2309
2310 #include <stdio.h>
2311 int
2312 main (void)
2313 {
2314
2315 printf("hello!\\n");
2316 ;
2317 return 0;
2318 }
2319 _ACEOF
2320 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2321 if { (eval echo "$as_me:2321: \"$ac_link\"") >&5
2322 (eval $ac_link) 2>&5
2323 ac_status=$?
2324 echo "$as_me:2324: \$? = $ac_status" >&5
2325 (exit "$ac_status"); } &&
2326 { ac_try='test -s "conftest$ac_exeext"'
2327 { (eval echo "$as_me:2327: \"$ac_try\"") >&5
2328 (eval $ac_try) 2>&5
2329 ac_status=$?
2330 echo "$as_me:2330: \$? = $ac_status" >&5
2331 (exit "$ac_status"); }; }; then
2332
2333 cf_clang_optok=yes
2334 else
2335 echo "$as_me: failed program was:" >&5
2336 cat "conftest.$ac_ext" >&5
2337
2338 cf_clang_optok=no
2339 fi
2340 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2341 echo "$as_me:2341: result: $cf_clang_optok" >&5
2342 echo "${ECHO_T}$cf_clang_optok" >&6
2343 CFLAGS="$cf_save_CFLAGS"
2344 if test "$cf_clang_optok" = yes; then
2345 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2346
2347 echo "${as_me:-configure}:2347: testing adding option $cf_clang_opt ..." 1>&5
2348
2349 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2350 CFLAGS="${CFLAGS}$cf_clang_opt"
2351
2352 fi
2353 done
2354 fi
2355
2356 echo "$as_me:2356: checking for $CC option to accept ANSI C" >&5
2357 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2358 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2359 echo $ECHO_N "(cached) $ECHO_C" >&6
2360 else
2361 ac_cv_prog_cc_stdc=no
2362 ac_save_CC=$CC
2363 cat >"conftest.$ac_ext" <<_ACEOF
2364 #line 2364 "configure"
2365 #include "confdefs.h"
2366 #include <stdarg.h>
2367 #include <stdio.h>
2368 #include <sys/types.h>
2369 #include <sys/stat.h>
2370 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2371 struct buf { int x; };
2372 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2373 static char *e (char **p, int i)
2374 {
2375 return p[i];
2376 }
2377 static char *f (char * (*g) (char **, int), char **p, ...)
2378 {
2379 char *s;
2380 va_list v;
2381 va_start (v,p);
2382 s = g (p, va_arg (v,int));
2383 va_end (v);
2384 return s;
2385 }
2386 int test (int i, double x);
2387 struct s1 {int (*f) (int a);};
2388 struct s2 {int (*f) (double a);};
2389 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2390 int argc;
2391 char **argv;
2392 int
2393 main (void)
2394 {
2395 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2396 ;
2397 return 0;
2398 }
2399 _ACEOF
2400 # Don't try gcc -ansi; that turns off useful extensions and
2401 # breaks some systems' header files.
2402 # AIX -qlanglvl=ansi
2403 # Ultrix and OSF/1 -std1
2404 # HP-UX 10.20 and later -Ae
2405 # HP-UX older versions -Aa -D_HPUX_SOURCE
2406 # SVR4 -Xc -D__EXTENSIONS__
2407 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2408 do
2409 CC="$ac_save_CC $ac_arg"
2410 rm -f "conftest.$ac_objext"
2411 if { (eval echo "$as_me:2411: \"$ac_compile\"") >&5
2412 (eval $ac_compile) 2>&5
2413 ac_status=$?
2414 echo "$as_me:2414: \$? = $ac_status" >&5
2415 (exit "$ac_status"); } &&
2416 { ac_try='test -s "conftest.$ac_objext"'
2417 { (eval echo "$as_me:2417: \"$ac_try\"") >&5
2418 (eval $ac_try) 2>&5
2419 ac_status=$?
2420 echo "$as_me:2420: \$? = $ac_status" >&5
2421 (exit "$ac_status"); }; }; then
2422 ac_cv_prog_cc_stdc=$ac_arg
2423 break
2424 else
2425 echo "$as_me: failed program was:" >&5
2426 cat "conftest.$ac_ext" >&5
2427 fi
2428 rm -f "conftest.$ac_objext"
2429 done
2430 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2431 CC=$ac_save_CC
2432
2433 fi
2434
2435 case "x$ac_cv_prog_cc_stdc" in
2436 x|xno)
2437 echo "$as_me:2437: result: none needed" >&5
2438 echo "${ECHO_T}none needed" >&6 ;;
2439 *)
2440 echo "$as_me:2440: result: $ac_cv_prog_cc_stdc" >&5
2441 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2442 CC="$CC $ac_cv_prog_cc_stdc" ;;
2443 esac
2444
2445 # This should have been defined by AC_PROG_CC
2446 : "${CC:=cc}"
2447
2448 echo "$as_me:2448: checking \$CFLAGS variable" >&5
2449 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2450 case "x$CFLAGS" in
2451 (*-[IUD]*)
2452 echo "$as_me:2452: result: broken" >&5
2453 echo "${ECHO_T}broken" >&6
2454 { echo "$as_me:2454: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2455 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2456 cf_flags="$CFLAGS"
2457 CFLAGS=
2458 for cf_arg in $cf_flags
2459 do
2460
2461 cf_fix_cppflags=no
2462 cf_new_cflags=
2463 cf_new_cppflags=
2464 cf_new_extra_cppflags=
2465
2466 for cf_add_cflags in $cf_arg
2467 do
2468 case "$cf_fix_cppflags" in
2469 (no)
2470 case "$cf_add_cflags" in
2471 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2472 case "$cf_add_cflags" in
2473 (-D*)
2474 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2475
2476 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2477 && test -z "${cf_tst_cflags}" \
2478 && cf_fix_cppflags=yes
2479
2480 if test "$cf_fix_cppflags" = yes ; then
2481
2482 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2483 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2484
2485 continue
2486 elif test "${cf_tst_cflags}" = "\"'" ; then
2487
2488 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2489 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2490
2491 continue
2492 fi
2493 ;;
2494 esac
2495 case "$CPPFLAGS" in
2496 (*$cf_add_cflags)
2497 ;;
2498 (*)
2499 case "$cf_add_cflags" in
2500 (-D*)
2501 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2502
2503 CPPFLAGS=`echo "$CPPFLAGS" | \
2504 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2505 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2506
2507 ;;
2508 esac
2509
2510 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2511 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2512
2513 ;;
2514 esac
2515 ;;
2516 (*)
2517
2518 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2519 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2520
2521 ;;
2522 esac
2523 ;;
2524 (yes)
2525
2526 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2527 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2528
2529 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2530
2531 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2532 && test -z "${cf_tst_cflags}" \
2533 && cf_fix_cppflags=no
2534 ;;
2535 esac
2536 done
2537
2538 if test -n "$cf_new_cflags" ; then
2539
2540 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2541 CFLAGS="${CFLAGS}$cf_new_cflags"
2542
2543 fi
2544
2545 if test -n "$cf_new_cppflags" ; then
2546
2547 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2548 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2549
2550 fi
2551
2552 if test -n "$cf_new_extra_cppflags" ; then
2553
2554 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2555 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2556
2557 fi
2558
2559 done
2560 ;;
2561 (*)
2562 echo "$as_me:2562: result: ok" >&5
2563 echo "${ECHO_T}ok" >&6
2564 ;;
2565 esac
2566
2567 echo "$as_me:2567: checking \$CC variable" >&5
2568 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2569 case "$CC" in
2570 (*[\ \ ]-*)
2571 echo "$as_me:2571: result: broken" >&5
2572 echo "${ECHO_T}broken" >&6
2573 { echo "$as_me:2573: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2574 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2575 # humor him...
2576 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2577 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2578 CC="$cf_prog"
2579 for cf_arg in $cf_flags
2580 do
2581 case "x$cf_arg" in
2582 (x-[IUDfgOW]*)
2583
2584 cf_fix_cppflags=no
2585 cf_new_cflags=
2586 cf_new_cppflags=
2587 cf_new_extra_cppflags=
2588
2589 for cf_add_cflags in $cf_arg
2590 do
2591 case "$cf_fix_cppflags" in
2592 (no)
2593 case "$cf_add_cflags" in
2594 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2595 case "$cf_add_cflags" in
2596 (-D*)
2597 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2598
2599 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2600 && test -z "${cf_tst_cflags}" \
2601 && cf_fix_cppflags=yes
2602
2603 if test "$cf_fix_cppflags" = yes ; then
2604
2605 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2606 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2607
2608 continue
2609 elif test "${cf_tst_cflags}" = "\"'" ; then
2610
2611 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2612 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2613
2614 continue
2615 fi
2616 ;;
2617 esac
2618 case "$CPPFLAGS" in
2619 (*$cf_add_cflags)
2620 ;;
2621 (*)
2622 case "$cf_add_cflags" in
2623 (-D*)
2624 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2625
2626 CPPFLAGS=`echo "$CPPFLAGS" | \
2627 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2628 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2629
2630 ;;
2631 esac
2632
2633 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2634 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2635
2636 ;;
2637 esac
2638 ;;
2639 (*)
2640
2641 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2642 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2643
2644 ;;
2645 esac
2646 ;;
2647 (yes)
2648
2649 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2650 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2651
2652 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2653
2654 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2655 && test -z "${cf_tst_cflags}" \
2656 && cf_fix_cppflags=no
2657 ;;
2658 esac
2659 done
2660
2661 if test -n "$cf_new_cflags" ; then
2662
2663 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2664 CFLAGS="${CFLAGS}$cf_new_cflags"
2665
2666 fi
2667
2668 if test -n "$cf_new_cppflags" ; then
2669
2670 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2671 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2672
2673 fi
2674
2675 if test -n "$cf_new_extra_cppflags" ; then
2676
2677 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2678 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2679
2680 fi
2681
2682 ;;
2683 (*)
2684 CC="$CC $cf_arg"
2685 ;;
2686 esac
2687 done
2688 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2689
2690 echo "${as_me:-configure}:2690: testing resulting CC: '$CC' ..." 1>&5
2691
2692 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2693
2694 echo "${as_me:-configure}:2694: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2695
2696 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2697
2698 echo "${as_me:-configure}:2698: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2699
2700 ;;
2701 (*)
2702 echo "$as_me:2702: result: ok" >&5
2703 echo "${ECHO_T}ok" >&6
2704 ;;
2705 esac
2706
2707 ;;
2708 esac
2709
2710 echo "$as_me:2710: checking for egrep" >&5
2711 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2712 if test "${ac_cv_path_EGREP+set}" = set; then
2713 echo $ECHO_N "(cached) $ECHO_C" >&6
2714 else
2715 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2716 then ac_cv_path_EGREP="$GREP -E"
2717 else
2718 for ac_prog in gegrep egrep
2719 do
2720 # Extract the first word of "$ac_prog", so it can be a program name with args.
2721 set dummy $ac_prog; ac_word=$2
2722 echo "$as_me:2722: checking for $ac_word" >&5
2723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2724 if test "${ac_cv_path_EGREP+set}" = set; then
2725 echo $ECHO_N "(cached) $ECHO_C" >&6
2726 else
2727 case $EGREP in
2728 [\\/]* | ?:[\\/]*)
2729 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2730 ;;
2731 *)
2732 ac_save_IFS=$IFS; IFS=$ac_path_separator
2733 ac_dummy="$PATH"
2734 for ac_dir in $ac_dummy; do
2735 IFS=$ac_save_IFS
2736 test -z "$ac_dir" && ac_dir=.
2737 if $as_executable_p "$ac_dir/$ac_word"; then
2738 ac_cv_path_EGREP="$ac_dir/$ac_word"
2739 echo "$as_me:2739: found $ac_dir/$ac_word" >&5
2740 break
2741 fi
2742 done
2743
2744 ;;
2745 esac
2746 fi
2747 EGREP=$ac_cv_path_EGREP
2748
2749 if test -n "$EGREP"; then
2750 echo "$as_me:2750: result: $EGREP" >&5
2751 echo "${ECHO_T}$EGREP" >&6
2752 else
2753 echo "$as_me:2753: result: no" >&5
2754 echo "${ECHO_T}no" >&6
2755 fi
2756
2757 test -n "$EGREP" && break
2758 done
2759 test -n "$EGREP" || EGREP=": "
2760
2761 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2761: error: cannot find workable egrep" >&5
2762 echo "$as_me: error: cannot find workable egrep" >&2;}
2763 { (exit 1); exit 1; }; }
2764 fi
2765 fi
2766 echo "$as_me:2766: result: $ac_cv_path_EGREP" >&5
2767 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2768 EGREP="$ac_cv_path_EGREP"
2769
2770 ac_ext=c
2771 ac_cpp='$CPP $CPPFLAGS'
2772 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2773 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2775 ac_main_return="return"
2776 echo "$as_me:2776: checking how to run the C preprocessor" >&5
2777 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2778 # On Suns, sometimes $CPP names a directory.
2779 if test -n "$CPP" && test -d "$CPP"; then
2780 CPP=
2781 fi
2782 if test -z "$CPP"; then
2783 if test "${ac_cv_prog_CPP+set}" = set; then
2784 echo $ECHO_N "(cached) $ECHO_C" >&6
2785 else
2786 # Double quotes because CPP needs to be expanded
2787 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2788 do
2789 ac_preproc_ok=false
2790 for ac_c_preproc_warn_flag in '' yes
2791 do
2792 # Use a header file that comes with gcc, so configuring glibc
2793 # with a fresh cross-compiler works.
2794 # On the NeXT, cc -E runs the code through the compiler's parser,
2795 # not just through cpp. "Syntax error" is here to catch this case.
2796 cat >"conftest.$ac_ext" <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799 #include <assert.h>
2800 Syntax error
2801 _ACEOF
2802 if { (eval echo "$as_me:2802: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2803 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2804 ac_status=$?
2805 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2806 rm -f conftest.er1
2807 cat conftest.err >&5
2808 echo "$as_me:2808: \$? = $ac_status" >&5
2809 (exit "$ac_status"); } >/dev/null; then
2810 if test -s conftest.err; then
2811 ac_cpp_err=$ac_c_preproc_warn_flag
2812 else
2813 ac_cpp_err=
2814 fi
2815 else
2816 ac_cpp_err=yes
2817 fi
2818 if test -z "$ac_cpp_err"; then
2819 :
2820 else
2821 echo "$as_me: failed program was:" >&5
2822 cat "conftest.$ac_ext" >&5
2823 # Broken: fails on valid input.
2824 continue
2825 fi
2826 rm -f conftest.err "conftest.$ac_ext"
2827
2828 # OK, works on sane cases. Now check whether non-existent headers
2829 # can be detected and how.
2830 cat >"conftest.$ac_ext" <<_ACEOF
2831 #line 2831 "configure"
2832 #include "confdefs.h"
2833 #include <ac_nonexistent.h>
2834 _ACEOF
2835 if { (eval echo "$as_me:2835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2836 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2837 ac_status=$?
2838 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2839 rm -f conftest.er1
2840 cat conftest.err >&5
2841 echo "$as_me:2841: \$? = $ac_status" >&5
2842 (exit "$ac_status"); } >/dev/null; then
2843 if test -s conftest.err; then
2844 ac_cpp_err=$ac_c_preproc_warn_flag
2845 else
2846 ac_cpp_err=
2847 fi
2848 else
2849 ac_cpp_err=yes
2850 fi
2851 if test -z "$ac_cpp_err"; then
2852 # Broken: success on invalid input.
2853 continue
2854 else
2855 echo "$as_me: failed program was:" >&5
2856 cat "conftest.$ac_ext" >&5
2857 # Passes both tests.
2858 ac_preproc_ok=:
2859 break
2860 fi
2861 rm -f conftest.err "conftest.$ac_ext"
2862
2863 done
2864 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2865 rm -f conftest.err "conftest.$ac_ext"
2866 if $ac_preproc_ok; then
2867 break
2868 fi
2869
2870 done
2871 ac_cv_prog_CPP=$CPP
2872
2873 fi
2874 CPP=$ac_cv_prog_CPP
2875 else
2876 ac_cv_prog_CPP=$CPP
2877 fi
2878 echo "$as_me:2878: result: $CPP" >&5
2879 echo "${ECHO_T}$CPP" >&6
2880 ac_preproc_ok=false
2881 for ac_c_preproc_warn_flag in '' yes
2882 do
2883 # Use a header file that comes with gcc, so configuring glibc
2884 # with a fresh cross-compiler works.
2885 # On the NeXT, cc -E runs the code through the compiler's parser,
2886 # not just through cpp. "Syntax error" is here to catch this case.
2887 cat >"conftest.$ac_ext" <<_ACEOF
2888 #line 2888 "configure"
2889 #include "confdefs.h"
2890 #include <assert.h>
2891 Syntax error
2892 _ACEOF
2893 if { (eval echo "$as_me:2893: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2894 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2895 ac_status=$?
2896 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2897 rm -f conftest.er1
2898 cat conftest.err >&5
2899 echo "$as_me:2899: \$? = $ac_status" >&5
2900 (exit "$ac_status"); } >/dev/null; then
2901 if test -s conftest.err; then
2902 ac_cpp_err=$ac_c_preproc_warn_flag
2903 else
2904 ac_cpp_err=
2905 fi
2906 else
2907 ac_cpp_err=yes
2908 fi
2909 if test -z "$ac_cpp_err"; then
2910 :
2911 else
2912 echo "$as_me: failed program was:" >&5
2913 cat "conftest.$ac_ext" >&5
2914 # Broken: fails on valid input.
2915 continue
2916 fi
2917 rm -f conftest.err "conftest.$ac_ext"
2918
2919 # OK, works on sane cases. Now check whether non-existent headers
2920 # can be detected and how.
2921 cat >"conftest.$ac_ext" <<_ACEOF
2922 #line 2922 "configure"
2923 #include "confdefs.h"
2924 #include <ac_nonexistent.h>
2925 _ACEOF
2926 if { (eval echo "$as_me:2926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2927 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2928 ac_status=$?
2929 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2930 rm -f conftest.er1
2931 cat conftest.err >&5
2932 echo "$as_me:2932: \$? = $ac_status" >&5
2933 (exit "$ac_status"); } >/dev/null; then
2934 if test -s conftest.err; then
2935 ac_cpp_err=$ac_c_preproc_warn_flag
2936 else
2937 ac_cpp_err=
2938 fi
2939 else
2940 ac_cpp_err=yes
2941 fi
2942 if test -z "$ac_cpp_err"; then
2943 # Broken: success on invalid input.
2944 continue
2945 else
2946 echo "$as_me: failed program was:" >&5
2947 cat "conftest.$ac_ext" >&5
2948 # Passes both tests.
2949 ac_preproc_ok=:
2950 break
2951 fi
2952 rm -f conftest.err "conftest.$ac_ext"
2953
2954 done
2955 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2956 rm -f conftest.err "conftest.$ac_ext"
2957 if $ac_preproc_ok; then
2958 :
2959 else
2960 { { echo "$as_me:2960: error: C preprocessor \"$CPP\" fails sanity check" >&5
2961 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2962 { (exit 1); exit 1; }; }
2963 fi
2964
2965 ac_ext=c
2966 ac_cpp='$CPP $CPPFLAGS'
2967 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2968 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2969 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2970 ac_main_return="return"
2971
2972 if test $ac_cv_c_compiler_gnu = yes; then
2973 echo "$as_me:2973: checking whether $CC needs -traditional" >&5
2974 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2975 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2976 echo $ECHO_N "(cached) $ECHO_C" >&6
2977 else
2978 ac_pattern="Autoconf.*'x'"
2979 cat >"conftest.$ac_ext" <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982 #include <sgtty.h>
2983 int Autoconf = TIOCGETP;
2984 _ACEOF
2985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2986 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2987 ac_cv_prog_gcc_traditional=yes
2988 else
2989 ac_cv_prog_gcc_traditional=no
2990 fi
2991 rm -rf conftest*
2992
2993 if test $ac_cv_prog_gcc_traditional = no; then
2994 cat >"conftest.$ac_ext" <<_ACEOF
2995 #line 2995 "configure"
2996 #include "confdefs.h"
2997 #include <termio.h>
2998 int Autoconf = TCGETA;
2999 _ACEOF
3000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3001 $EGREP "$ac_pattern" >/dev/null 2>&1; then
3002 ac_cv_prog_gcc_traditional=yes
3003 fi
3004 rm -rf conftest*
3005
3006 fi
3007 fi
3008 echo "$as_me:3008: result: $ac_cv_prog_gcc_traditional" >&5
3009 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3010 if test $ac_cv_prog_gcc_traditional = yes; then
3011 CC="$CC -traditional"
3012 fi
3013 fi
3014
3015 echo "$as_me:3015: checking whether $CC understands -c and -o together" >&5
3016 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3017 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3018 echo $ECHO_N "(cached) $ECHO_C" >&6
3019 else
3020
3021 cat > conftest.$ac_ext <<CF_EOF
3022 int main(void)
3023 {
3024 ${cf_cv_main_return:-return}(0);
3025 }
3026 CF_EOF
3027 # We do the test twice because some compilers refuse to overwrite an
3028 # existing .o file with -o, though they will create one.
3029 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3030 if { (eval echo "$as_me:3030: \"$ac_try\"") >&5
3031 (eval $ac_try) 2>&5
3032 ac_status=$?
3033 echo "$as_me:3033: \$? = $ac_status" >&5
3034 (exit "$ac_status"); } &&
3035 test -f conftest2.$ac_objext && { (eval echo "$as_me:3035: \"$ac_try\"") >&5
3036 (eval $ac_try) 2>&5
3037 ac_status=$?
3038 echo "$as_me:3038: \$? = $ac_status" >&5
3039 (exit "$ac_status"); };
3040 then
3041 eval cf_cv_prog_CC_c_o=yes
3042 else
3043 eval cf_cv_prog_CC_c_o=no
3044 fi
3045 rm -rf ./conftest*
3046
3047 fi
3048 if test "$cf_cv_prog_CC_c_o" = yes; then
3049 echo "$as_me:3049: result: yes" >&5
3050 echo "${ECHO_T}yes" >&6
3051 else
3052 echo "$as_me:3052: result: no" >&5
3053 echo "${ECHO_T}no" >&6
3054 fi
3055
3056 test "$program_prefix" != NONE &&
3057 program_transform_name="s,^,$program_prefix,;$program_transform_name"
3058 # Use a double $ so make ignores it.
3059 test "$program_suffix" != NONE &&
3060 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3061 # Double any \ or $. echo might interpret backslashes.
3062 # By default was `s,x,x', remove it if useless.
3063 cat <<\_ACEOF >conftest.sed
3064 s/[\\$]/&&/g;s/;s,x,x,$//
3065 _ACEOF
3066 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3067 rm conftest.sed
3068
3069 for ac_prog in mawk gawk nawk awk
3070 do
3071 # Extract the first word of "$ac_prog", so it can be a program name with args.
3072 set dummy $ac_prog; ac_word=$2
3073 echo "$as_me:3073: checking for $ac_word" >&5
3074 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3075 if test "${ac_cv_prog_AWK+set}" = set; then
3076 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 else
3078 if test -n "$AWK"; then
3079 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3080 else
3081 ac_save_IFS=$IFS; IFS=$ac_path_separator
3082 ac_dummy="$PATH"
3083 for ac_dir in $ac_dummy; do
3084 IFS=$ac_save_IFS
3085 test -z "$ac_dir" && ac_dir=.
3086 $as_executable_p "$ac_dir/$ac_word" || continue
3087 ac_cv_prog_AWK="$ac_prog"
3088 echo "$as_me:3088: found $ac_dir/$ac_word" >&5
3089 break
3090 done
3091
3092 fi
3093 fi
3094 AWK=$ac_cv_prog_AWK
3095 if test -n "$AWK"; then
3096 echo "$as_me:3096: result: $AWK" >&5
3097 echo "${ECHO_T}$AWK" >&6
3098 else
3099 echo "$as_me:3099: result: no" >&5
3100 echo "${ECHO_T}no" >&6
3101 fi
3102
3103 test -n "$AWK" && break
3104 done
3105
3106 test -z "$AWK" && { { echo "$as_me:3106: error: No awk program found" >&5
3107 echo "$as_me: error: No awk program found" >&2;}
3108 { (exit 1); exit 1; }; }
3109
3110 echo "$as_me:3110: checking for egrep" >&5
3111 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3112 if test "${ac_cv_prog_egrep+set}" = set; then
3113 echo $ECHO_N "(cached) $ECHO_C" >&6
3114 else
3115 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3116 then ac_cv_prog_egrep='grep -E'
3117 else ac_cv_prog_egrep='egrep'
3118 fi
3119 fi
3120 echo "$as_me:3120: result: $ac_cv_prog_egrep" >&5
3121 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3122 EGREP=$ac_cv_prog_egrep
3123
3124 test -z "$EGREP" && { { echo "$as_me:3124: error: No egrep program found" >&5
3125 echo "$as_me: error: No egrep program found" >&2;}
3126 { (exit 1); exit 1; }; }
3127
3128 # Find a good install program. We prefer a C program (faster),
3129 # so one script is as good as another. But avoid the broken or
3130 # incompatible versions:
3131 # SysV /etc/install, /usr/sbin/install
3132 # SunOS /usr/etc/install
3133 # IRIX /sbin/install
3134 # AIX /bin/install
3135 # AmigaOS /C/install, which installs bootblocks on floppy discs
3136 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3137 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3138 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3139 # ./install, which can be erroneously created by make from ./install.sh.
3140 echo "$as_me:3140: checking for a BSD compatible install" >&5
3141 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3142 if test -z "$INSTALL"; then
3143 if test "${ac_cv_path_install+set}" = set; then
3144 echo $ECHO_N "(cached) $ECHO_C" >&6
3145 else
3146 ac_save_IFS=$IFS; IFS=$ac_path_separator
3147 for ac_dir in $PATH; do
3148 IFS=$ac_save_IFS
3149 # Account for people who put trailing slashes in PATH elements.
3150 case $ac_dir/ in
3151 / | ./ | .// | /cC/* \
3152 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3153 | /usr/ucb/* ) ;;
3154 *)
3155 # OSF1 and SCO ODT 3.0 have their own names for install.
3156 # Don't use installbsd from OSF since it installs stuff as root
3157 # by default.
3158 for ac_prog in ginstall scoinst install; do
3159 if $as_executable_p "$ac_dir/$ac_prog"; then
3160 if test $ac_prog = install &&
3161 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3162 # AIX install. It has an incompatible calling convention.
3163 :
3164 elif test $ac_prog = install &&
3165 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3166 # program-specific install script used by HP pwplus--don't use.
3167 :
3168 else
3169 ac_cv_path_install="$ac_dir/$ac_prog -c"
3170 break 2
3171 fi
3172 fi
3173 done
3174 ;;
3175 esac
3176 done
3177
3178 fi
3179 if test "${ac_cv_path_install+set}" = set; then
3180 INSTALL=$ac_cv_path_install
3181 else
3182 # As a last resort, use the slow shell script. We don't cache a
3183 # path for INSTALL within a source directory, because that will
3184 # break other packages using the cache if that directory is
3185 # removed, or if the path is relative.
3186 INSTALL=$ac_install_sh
3187 fi
3188 fi
3189 echo "$as_me:3189: result: $INSTALL" >&5
3190 echo "${ECHO_T}$INSTALL" >&6
3191
3192 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3193 # It thinks the first close brace ends the variable substitution.
3194 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3195
3196 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3197
3198 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3199
3200 echo "$as_me:3200: checking whether ln -s works" >&5
3201 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3202 LN_S=$as_ln_s
3203 if test "$LN_S" = "ln -s"; then
3204 echo "$as_me:3204: result: yes" >&5
3205 echo "${ECHO_T}yes" >&6
3206 else
3207 echo "$as_me:3207: result: no, using $LN_S" >&5
3208 echo "${ECHO_T}no, using $LN_S" >&6
3209 fi
3210
3211 echo "$as_me:3211: checking if $LN_S -f options work" >&5
3212 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3213
3214 rm -f conf$$.src conf$$dst
3215 echo >conf$$.dst
3216 echo first >conf$$.src
3217 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3218 cf_prog_ln_sf=yes
3219 else
3220 cf_prog_ln_sf=no
3221 fi
3222 rm -f conf$$.dst conf$$src
3223 echo "$as_me:3223: result: $cf_prog_ln_sf" >&5
3224 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3225
3226 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3227
3228 case "$cf_cv_system_name" in
3229 (cygwin*|msys*|mingw32*|mingw64|os2*)
3230 GLOB_FULLPATH_POSIX='/*'
3231 GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
3232 ;;
3233 (*)
3234 GLOB_FULLPATH_POSIX='/*'
3235 GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
3236 ;;
3237 esac
3238
3239 # Find a good install program. We prefer a C program (faster),
3240 # so one script is as good as another. But avoid the broken or
3241 # incompatible versions:
3242 # SysV /etc/install, /usr/sbin/install
3243 # SunOS /usr/etc/install
3244 # IRIX /sbin/install
3245 # AIX /bin/install
3246 # AmigaOS /C/install, which installs bootblocks on floppy discs
3247 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3248 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3249 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3250 # ./install, which can be erroneously created by make from ./install.sh.
3251 echo "$as_me:3251: checking for a BSD compatible install" >&5
3252 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3253 if test -z "$INSTALL"; then
3254 if test "${ac_cv_path_install+set}" = set; then
3255 echo $ECHO_N "(cached) $ECHO_C" >&6
3256 else
3257 ac_save_IFS=$IFS; IFS=$ac_path_separator
3258 for ac_dir in $PATH; do
3259 IFS=$ac_save_IFS
3260 # Account for people who put trailing slashes in PATH elements.
3261 case $ac_dir/ in
3262 / | ./ | .// | /cC/* \
3263 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3264 | /usr/ucb/* ) ;;
3265 *)
3266 # OSF1 and SCO ODT 3.0 have their own names for install.
3267 # Don't use installbsd from OSF since it installs stuff as root
3268 # by default.
3269 for ac_prog in ginstall scoinst install; do
3270 if $as_executable_p "$ac_dir/$ac_prog"; then
3271 if test $ac_prog = install &&
3272 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3273 # AIX install. It has an incompatible calling convention.
3274 :
3275 elif test $ac_prog = install &&
3276 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3277 # program-specific install script used by HP pwplus--don't use.
3278 :
3279 else
3280 ac_cv_path_install="$ac_dir/$ac_prog -c"
3281 break 2
3282 fi
3283 fi
3284 done
3285 ;;
3286 esac
3287 done
3288
3289 fi
3290 if test "${ac_cv_path_install+set}" = set; then
3291 INSTALL=$ac_cv_path_install
3292 else
3293 # As a last resort, use the slow shell script. We don't cache a
3294 # path for INSTALL within a source directory, because that will
3295 # break other packages using the cache if that directory is
3296 # removed, or if the path is relative.
3297 INSTALL=$ac_install_sh
3298 fi
3299 fi
3300 echo "$as_me:3300: result: $INSTALL" >&5
3301 echo "${ECHO_T}$INSTALL" >&6
3302
3303 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3304 # It thinks the first close brace ends the variable substitution.
3305 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3306
3307 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3308
3309 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3310
3311 if test "x$INSTALL" = "x./install-sh -c"; then
3312 if test -f /usr/sbin/install ; then
3313 case "$host_os" in
3314 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
3315 INSTALL=/usr/sbin/install
3316 ;;
3317 esac
3318 fi
3319 fi
3320 case x$INSTALL in
3321 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
3322 ;;
3323 (*)
3324 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3325 test -z "$cf_dir" && cf_dir=.
3326 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3327 ;;
3328 esac
3329
3330 echo "$as_me:3330: checking if you want to install stripped executables" >&5
3331 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
3332
3333 # Check whether --enable-stripping or --disable-stripping was given.
3334 if test "${enable_stripping+set}" = set; then
3335 enableval="$enable_stripping"
3336 test "$enableval" != no && enableval=yes
3337 if test "$enableval" != "yes" ; then
3338 enable_stripping=no
3339 else
3340 enable_stripping=yes
3341 fi
3342 else
3343 enableval=yes
3344 enable_stripping=yes
3345
3346 fi;
3347 echo "$as_me:3347: result: $enable_stripping" >&5
3348 echo "${ECHO_T}$enable_stripping" >&6
3349
3350 if test "$enable_stripping" = yes
3351 then
3352 INSTALL_OPT_S="-s"
3353 else
3354 INSTALL_OPT_S=
3355 fi
3356
3357 : "${INSTALL:=install}"
3358 echo "$as_me:3358: checking if install accepts -p option" >&5
3359 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3360 if test "${cf_cv_install_p+set}" = set; then
3361 echo $ECHO_N "(cached) $ECHO_C" >&6
3362 else
3363
3364 rm -rf ./conftest*
3365 date >conftest.in
3366 mkdir conftest.out
3367 sleep 3
3368 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3369 then
3370 if test -f conftest.out/conftest.in
3371 then
3372 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3373 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3374 if test -s conftest.err
3375 then
3376 cf_cv_install_p=no
3377 else
3378 cf_cv_install_p=yes
3379 fi
3380 else
3381 cf_cv_install_p=no
3382 fi
3383 else
3384 cf_cv_install_p=no
3385 fi
3386 rm -rf ./conftest*
3387
3388 fi
3389 echo "$as_me:3389: result: $cf_cv_install_p" >&5
3390 echo "${ECHO_T}$cf_cv_install_p" >&6
3391
3392 echo "$as_me:3392: checking if install needs to be told about ownership" >&5
3393 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3394 case `$ac_config_guess` in
3395 (*minix)
3396 with_install_o=yes
3397 ;;
3398 (*)
3399 with_install_o=no
3400 ;;
3401 esac
3402
3403 echo "$as_me:3403: result: $with_install_o" >&5
3404 echo "${ECHO_T}$with_install_o" >&6
3405 if test "x$with_install_o" = xyes
3406 then
3407 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'`"
3408 else
3409 INSTALL_OPT_O=
3410 fi
3411
3412 if test -n "$INSTALL_OPT_S"
3413 then
3414 echo "$as_me:3414: checking if you want to specify strip-program" >&5
3415 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
3416
3417 # Check whether --with-strip-program or --without-strip-program was given.
3418 if test "${with_strip_program+set}" = set; then
3419 withval="$with_strip_program"
3420 with_strip_program=$withval
3421 else
3422 with_strip_program=no
3423 fi;
3424 echo "$as_me:3424: result: $with_strip_program" >&5
3425 echo "${ECHO_T}$with_strip_program" >&6
3426 if test "$with_strip_program" != no
3427 then
3428 echo "$as_me:3428: checking if strip-program is supported with this installer" >&5
3429 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
3430 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
3431 check_install_strip=no
3432 if test -f "$cf_install_program"
3433 then
3434 check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
3435 if test -n "$check_install_version"
3436 then
3437 check_install_strip="option"
3438 else
3439 for check_strip_variable in STRIPBIN STRIP
3440 do
3441 if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
3442 then
3443 check_install_strip="environ"
3444 break
3445 fi
3446 done
3447 fi
3448 fi
3449 echo "$as_me:3449: result: $check_install_strip" >&5
3450 echo "${ECHO_T}$check_install_strip" >&6
3451 case "$check_install_strip" in
3452 (no)
3453 { echo "$as_me:3453: WARNING: $cf_install_program does not support strip program option" >&5
3454 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
3455 with_strip_program=no
3456 ;;
3457 (environ)
3458 cat >install.tmp <<-CF_EOF
3459 #! $SHELL
3460 STRIPBIN="$with_strip_program" \\
3461 STRIP="$with_strip_program" \\
3462 $INSTALL "$@"
3463 CF_EOF
3464 INSTALL="`pwd`/install.tmp"
3465 chmod +x "$INSTALL"
3466 test -n "$verbose" && echo " created $INSTALL" 1>&6
3467
3468 echo "${as_me:-configure}:3468: testing created $INSTALL ..." 1>&5
3469
3470 ;;
3471 (option)
3472 INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
3473 ;;
3474 esac
3475 fi
3476 fi
3477
3478 echo "$as_me:3478: checking for long file names" >&5
3479 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3480 if test "${ac_cv_sys_long_file_names+set}" = set; then
3481 echo $ECHO_N "(cached) $ECHO_C" >&6
3482 else
3483 ac_cv_sys_long_file_names=yes
3484 # Test for long file names in all the places we know might matter:
3485 # . the current directory, where building will happen
3486 # $prefix/lib where we will be installing things
3487 # $exec_prefix/lib likewise
3488 # eval it to expand exec_prefix.
3489 # $TMPDIR if set, where it might want to write temporary files
3490 # if $TMPDIR is not set:
3491 # /tmp where it might want to write temporary files
3492 # /var/tmp likewise
3493 # /usr/tmp likewise
3494 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3495 ac_tmpdirs=$TMPDIR
3496 else
3497 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3498 fi
3499 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3500 test -d "$ac_dir" || continue
3501 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3502 ac_xdir=$ac_dir/cf$$
3503 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3504 ac_tf1=$ac_xdir/conftest9012345
3505 ac_tf2=$ac_xdir/conftest9012346
3506 (echo 1 >"$ac_tf1") 2>/dev/null
3507 (echo 2 >"$ac_tf2") 2>/dev/null
3508 ac_val=`cat "$ac_tf1" 2>/dev/null`
3509 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3510 ac_cv_sys_long_file_names=no
3511 rm -rf "$ac_xdir" 2>/dev/null
3512 break
3513 fi
3514 rm -rf "$ac_xdir" 2>/dev/null
3515 done
3516 fi
3517 echo "$as_me:3517: result: $ac_cv_sys_long_file_names" >&5
3518 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3519 if test "$ac_cv_sys_long_file_names" = yes; then
3520
3521 cat >>confdefs.h <<\EOF
3522 #define HAVE_LONG_FILE_NAMES 1
3523 EOF
3524
3525 fi
3526
3527 # if we find pkg-config, check if we should install the ".pc" files.
3528
3529 echo "$as_me:3529: checking if you want to use pkg-config" >&5
3530 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3531
3532 # Check whether --with-pkg-config or --without-pkg-config was given.
3533 if test "${with_pkg_config+set}" = set; then
3534 withval="$with_pkg_config"
3535 cf_pkg_config=$withval
3536 else
3537 cf_pkg_config=yes
3538 fi;
3539 echo "$as_me:3539: result: $cf_pkg_config" >&5
3540 echo "${ECHO_T}$cf_pkg_config" >&6
3541
3542 case "$cf_pkg_config" in
3543 (no)
3544 PKG_CONFIG=none
3545 ;;
3546 (yes)
3547
3548 if test -n "$ac_tool_prefix"; then
3549 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3550 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3551 echo "$as_me:3551: checking for $ac_word" >&5
3552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3553 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3554 echo $ECHO_N "(cached) $ECHO_C" >&6
3555 else
3556 case $PKG_CONFIG in
3557 [\\/]* | ?:[\\/]*)
3558 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3559 ;;
3560 *)
3561 ac_save_IFS=$IFS; IFS=$ac_path_separator
3562 ac_dummy="$PATH"
3563 for ac_dir in $ac_dummy; do
3564 IFS=$ac_save_IFS
3565 test -z "$ac_dir" && ac_dir=.
3566 if $as_executable_p "$ac_dir/$ac_word"; then
3567 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3568 echo "$as_me:3568: found $ac_dir/$ac_word" >&5
3569 break
3570 fi
3571 done
3572
3573 ;;
3574 esac
3575 fi
3576 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3577
3578 if test -n "$PKG_CONFIG"; then
3579 echo "$as_me:3579: result: $PKG_CONFIG" >&5
3580 echo "${ECHO_T}$PKG_CONFIG" >&6
3581 else
3582 echo "$as_me:3582: result: no" >&5
3583 echo "${ECHO_T}no" >&6
3584 fi
3585
3586 fi
3587 if test -z "$ac_cv_path_PKG_CONFIG"; then
3588 ac_pt_PKG_CONFIG=$PKG_CONFIG
3589 # Extract the first word of "pkg-config", so it can be a program name with args.
3590 set dummy pkg-config; ac_word=$2
3591 echo "$as_me:3591: checking for $ac_word" >&5
3592 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3593 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3594 echo $ECHO_N "(cached) $ECHO_C" >&6
3595 else
3596 case $ac_pt_PKG_CONFIG in
3597 [\\/]* | ?:[\\/]*)
3598 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3599 ;;
3600 *)
3601 ac_save_IFS=$IFS; IFS=$ac_path_separator
3602 ac_dummy="$PATH"
3603 for ac_dir in $ac_dummy; do
3604 IFS=$ac_save_IFS
3605 test -z "$ac_dir" && ac_dir=.
3606 if $as_executable_p "$ac_dir/$ac_word"; then
3607 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3608 echo "$as_me:3608: found $ac_dir/$ac_word" >&5
3609 break
3610 fi
3611 done
3612
3613 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3614 ;;
3615 esac
3616 fi
3617 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3618
3619 if test -n "$ac_pt_PKG_CONFIG"; then
3620 echo "$as_me:3620: result: $ac_pt_PKG_CONFIG" >&5
3621 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3622 else
3623 echo "$as_me:3623: result: no" >&5
3624 echo "${ECHO_T}no" >&6
3625 fi
3626
3627 PKG_CONFIG=$ac_pt_PKG_CONFIG
3628 else
3629 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3630 fi
3631
3632 ;;
3633 (*)
3634 PKG_CONFIG=$withval
3635 ;;
3636 esac
3637
3638 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3639 if test "$PKG_CONFIG" != none ; then
3640
3641 if test "x$prefix" != xNONE; then
3642 cf_path_syntax="$prefix"
3643 else
3644 cf_path_syntax="$ac_default_prefix"
3645 fi
3646
3647 case "x$PKG_CONFIG" in
3648 (x\$\(*\)*|x\'*\'*)
3649 ;;
3650 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
3651 ;;
3652 (x\$\{*prefix\}*|x\$\{*dir\}*)
3653 eval PKG_CONFIG="$PKG_CONFIG"
3654 case "x$PKG_CONFIG" in
3655 (xNONE/*)
3656 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3657 ;;
3658 esac
3659 ;;
3660 (xno|xNONE/*)
3661 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3662 ;;
3663 (*)
3664 { { echo "$as_me:3664: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3665 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3666 { (exit 1); exit 1; }; }
3667 ;;
3668 esac
3669
3670 elif test "x$cf_pkg_config" != xno ; then
3671 { echo "$as_me:3671: WARNING: pkg-config is not installed" >&5
3672 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3673 fi
3674
3675 case "$PKG_CONFIG" in
3676 (no|none|yes)
3677 echo "$as_me:3677: checking for pkg-config library directory" >&5
3678 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3679 ;;
3680 (*)
3681 echo "$as_me:3681: checking for $PKG_CONFIG library directory" >&5
3682 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3683 ;;
3684 esac
3685
3686 # if $PKG_CONFIG_LIBDIR is set, try to use that
3687 if test -n "$PKG_CONFIG_PATH"; then
3688 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3689 elif test -n "$PKG_CONFIG_LIBDIR"; then
3690 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3691 else
3692 cf_search_path=auto
3693 fi
3694
3695 # if the option is used, let that override. otherwise default to "libdir"
3696
3697 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3698 if test "${with_pkg_config_libdir+set}" = set; then
3699 withval="$with_pkg_config_libdir"
3700 cf_search_path=$withval
3701 else
3702 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3703 fi;
3704
3705 case "x$cf_search_path" in
3706 (xlibdir)
3707 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3708 echo "$as_me:3708: result: $PKG_CONFIG_LIBDIR" >&5
3709 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3710 cf_search_path=
3711 ;;
3712 (x)
3713 ;;
3714 (x$GLOB_FULLPATH_POSIX\ *|x$GLOB_FULLPATH_OTHER\ *)
3715 PKG_CONFIG_LIBDIR=
3716 ;;
3717 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
3718 PKG_CONFIG_LIBDIR="$cf_search_path"
3719 echo "$as_me:3719: result: $PKG_CONFIG_LIBDIR" >&5
3720 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3721 cf_search_path=
3722 ;;
3723 (xyes|xauto)
3724 echo "$as_me:3724: result: auto" >&5
3725 echo "${ECHO_T}auto" >&6
3726 cf_search_path=
3727 # Look for the library directory using the same prefix as the executable
3728 echo "$as_me:3728: checking for search-list" >&5
3729 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3730 if test "x$PKG_CONFIG" != xnone
3731 then
3732 # works for pkg-config since version 0.24 (2009)
3733 # works for pkgconf since version 0.8.3 (2012)
3734 for cf_pkg_program in \
3735 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3736 pkg-config \
3737 pkgconf
3738 do
3739 cf_raw_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null`
3740 case "$cf_raw_search_path" in
3741 (*\\*)
3742 cf_search_path=`echo "$cf_raw_search_path" | tr ';' ' ' | tr '\' '/'`
3743 ;;
3744 (*/*)
3745 cf_search_path=`echo "$cf_raw_search_path" | tr : ' '`
3746 ;;
3747 esac
3748 test -n "$cf_search_path" && break
3749 done
3750
3751 # works for pkg-config since import in 2005 of original 2001 HP code.
3752 test -z "$cf_search_path" && \
3753 cf_search_path=`
3754 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3755 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3756 sub(\"^[^']*'\",\"\"); \
3757 sub(\"'.*\",\"\"); \
3758 printf \" %s\", \\$0; } \
3759 { next; } \
3760 "`
3761 fi
3762
3763 echo "$as_me:3763: result: $cf_search_path" >&5
3764 echo "${ECHO_T}$cf_search_path" >&6
3765 ;;
3766 (*)
3767 { { echo "$as_me:3767: error: Unexpected option value: $cf_search_path" >&5
3768 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3769 { (exit 1); exit 1; }; }
3770 ;;
3771 esac
3772
3773 if test -n "$cf_search_path"
3774 then
3775 echo "$as_me:3775: checking for first directory" >&5
3776 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3777 cf_pkg_config_path=none
3778 for cf_config in $cf_search_path
3779 do
3780 if test -d "$cf_config"
3781 then
3782 cf_pkg_config_path=$cf_config
3783 break
3784 fi
3785 done
3786 echo "$as_me:3786: result: $cf_pkg_config_path" >&5
3787 echo "${ECHO_T}$cf_pkg_config_path" >&6
3788
3789 if test "x$cf_pkg_config_path" != xnone ; then
3790 # limit this to the first directory found
3791 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3792 fi
3793
3794 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3795 then
3796 echo "$as_me:3796: checking for workaround" >&5
3797 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3798 if test "$prefix" = "NONE" ; then
3799 cf_prefix="$ac_default_prefix"
3800 else
3801 cf_prefix="$prefix"
3802 fi
3803 eval cf_libdir=$libdir
3804 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3805 cf_backup=
3806 for cf_config in $cf_search_path
3807 do
3808 case $cf_config in
3809 $cf_libdir/pkgconfig)
3810 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3811 break
3812 ;;
3813 *)
3814 test -z "$cf_backup" && cf_backup=$cf_config
3815 ;;
3816 esac
3817 done
3818 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3819 echo "$as_me:3819: result: $PKG_CONFIG_LIBDIR" >&5
3820 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3821 fi
3822 fi
3823
3824 echo "$as_me:3824: checking if you want to build test-programs" >&5
3825 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3826
3827 # Check whether --with-tests or --without-tests was given.
3828 if test "${with_tests+set}" = set; then
3829 withval="$with_tests"
3830 cf_with_tests=$withval
3831 else
3832 cf_with_tests=yes
3833 fi;
3834 echo "$as_me:3834: result: $cf_with_tests" >&5
3835 echo "${ECHO_T}$cf_with_tests" >&6
3836
3837 echo "$as_me:3837: checking if we should assume mixed-case filenames" >&5
3838 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3839
3840 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3841 if test "${enable_mixed_case+set}" = set; then
3842 enableval="$enable_mixed_case"
3843 enable_mixedcase=$enableval
3844 else
3845 enable_mixedcase=auto
3846 fi;
3847 echo "$as_me:3847: result: $enable_mixedcase" >&5
3848 echo "${ECHO_T}$enable_mixedcase" >&6
3849 if test "$enable_mixedcase" = "auto" ; then
3850
3851 echo "$as_me:3851: checking if filesystem supports mixed-case filenames" >&5
3852 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3853 if test "${cf_cv_mixedcase+set}" = set; then
3854 echo $ECHO_N "(cached) $ECHO_C" >&6
3855 else
3856
3857 if test "$cross_compiling" = yes ; then
3858 case "$target_alias" in
3859 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3860 cf_cv_mixedcase=no
3861 ;;
3862 (*)
3863 cf_cv_mixedcase=yes
3864 ;;
3865 esac
3866 else
3867 rm -f conftest CONFTEST
3868 echo test >conftest
3869 if test -f CONFTEST ; then
3870 cf_cv_mixedcase=no
3871 else
3872 cf_cv_mixedcase=yes
3873 fi
3874 rm -f conftest CONFTEST
3875 fi
3876
3877 fi
3878 echo "$as_me:3878: result: $cf_cv_mixedcase" >&5
3879 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3880 test "$cf_cv_mixedcase" = yes &&
3881 cat >>confdefs.h <<\EOF
3882 #define MIXEDCASE_FILENAMES 1
3883 EOF
3884
3885 else
3886 cf_cv_mixedcase=$enable_mixedcase
3887 if test "$enable_mixedcase" = "yes" ; then
3888 cat >>confdefs.h <<\EOF
3889 #define MIXEDCASE_FILENAMES 1
3890 EOF
3891
3892 fi
3893 fi
3894
3895 # do this after mixed-case option (tags/TAGS is not as important as tic).
3896 echo "$as_me:3896: checking whether ${MAKE-make} sets \${MAKE}" >&5
3897 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3898 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3899 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3900 echo $ECHO_N "(cached) $ECHO_C" >&6
3901 else
3902 cat >conftest.make <<\EOF
3903 all:
3904 @echo 'ac_maketemp="${MAKE}"'
3905 EOF
3906 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3907 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3908 if test -n "$ac_maketemp"; then
3909 eval ac_cv_prog_make_${ac_make}_set=yes
3910 else
3911 eval ac_cv_prog_make_${ac_make}_set=no
3912 fi
3913 rm -f conftest.make
3914 fi
3915 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3916 echo "$as_me:3916: result: yes" >&5
3917 echo "${ECHO_T}yes" >&6
3918 SET_MAKE=
3919 else
3920 echo "$as_me:3920: result: no" >&5
3921 echo "${ECHO_T}no" >&6
3922 SET_MAKE="MAKE=${MAKE-make}"
3923 fi
3924
3925 echo "$as_me:3925: checking for \".PHONY\" make-support" >&5
3926 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3927 if test "${cf_cv_make_PHONY+set}" = set; then
3928 echo $ECHO_N "(cached) $ECHO_C" >&6
3929 else
3930
3931 rm -rf conftest*
3932 (
3933 mkdir conftest || exit 1
3934 cd conftest
3935 cat >makefile <<'CF_EOF'
3936 .PHONY: always
3937 DATA=0
3938 always: always.out
3939 @echo "** making $@ $(DATA)"
3940 once: once.out
3941 @echo "** making $@ $(DATA)"
3942 always.out:
3943 @echo "** making $@ $(DATA)"
3944 echo $(DATA) > $@
3945 once.out:
3946 @echo "** making $@ $(DATA)"
3947 echo $(DATA) > $@
3948 CF_EOF
3949 for cf_data in 1 2 3
3950 do
3951 ${MAKE:-make} always DATA=$cf_data
3952 ${MAKE:-make} once DATA=$cf_data
3953 ${MAKE:-make} -t always once
3954 if test -f always ; then
3955 echo "no (case 1)" > ../conftest.tmp
3956 elif test ! -f always.out ; then
3957 echo "no (case 2)" > ../conftest.tmp
3958 elif test ! -f once.out ; then
3959 echo "no (case 3)" > ../conftest.tmp
3960 elif ! cmp -s always.out once.out ; then
3961 echo "no (case 4)" > ../conftest.tmp
3962 diff always.out once.out
3963 else
3964 cf_check="`cat always.out`"
3965 if test "x$cf_check" != "x$cf_data" ; then
3966 echo "no (case 5)" > ../conftest.tmp
3967 else
3968 echo yes > ../conftest.tmp
3969 rm -f ./*.out
3970 continue
3971 fi
3972 fi
3973 break
3974 done
3975 ) >&5 2>&1
3976 cf_cv_make_PHONY="`cat conftest.tmp`"
3977 rm -rf conftest*
3978
3979 fi
3980 echo "$as_me:3980: result: $cf_cv_make_PHONY" >&5
3981 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3982 MAKE_NO_PHONY="#"
3983 MAKE_PHONY="#"
3984 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3985 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3986
3987 for ac_prog in exctags ctags
3988 do
3989 # Extract the first word of "$ac_prog", so it can be a program name with args.
3990 set dummy $ac_prog; ac_word=$2
3991 echo "$as_me:3991: checking for $ac_word" >&5
3992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3993 if test "${ac_cv_prog_CTAGS+set}" = set; then
3994 echo $ECHO_N "(cached) $ECHO_C" >&6
3995 else
3996 if test -n "$CTAGS"; then
3997 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3998 else
3999 ac_save_IFS=$IFS; IFS=$ac_path_separator
4000 ac_dummy="$PATH"
4001 for ac_dir in $ac_dummy; do
4002 IFS=$ac_save_IFS
4003 test -z "$ac_dir" && ac_dir=.
4004 $as_executable_p "$ac_dir/$ac_word" || continue
4005 ac_cv_prog_CTAGS="$ac_prog"
4006 echo "$as_me:4006: found $ac_dir/$ac_word" >&5
4007 break
4008 done
4009
4010 fi
4011 fi
4012 CTAGS=$ac_cv_prog_CTAGS
4013 if test -n "$CTAGS"; then
4014 echo "$as_me:4014: result: $CTAGS" >&5
4015 echo "${ECHO_T}$CTAGS" >&6
4016 else
4017 echo "$as_me:4017: result: no" >&5
4018 echo "${ECHO_T}no" >&6
4019 fi
4020
4021 test -n "$CTAGS" && break
4022 done
4023
4024 for ac_prog in exetags etags
4025 do
4026 # Extract the first word of "$ac_prog", so it can be a program name with args.
4027 set dummy $ac_prog; ac_word=$2
4028 echo "$as_me:4028: checking for $ac_word" >&5
4029 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4030 if test "${ac_cv_prog_ETAGS+set}" = set; then
4031 echo $ECHO_N "(cached) $ECHO_C" >&6
4032 else
4033 if test -n "$ETAGS"; then
4034 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4035 else
4036 ac_save_IFS=$IFS; IFS=$ac_path_separator
4037 ac_dummy="$PATH"
4038 for ac_dir in $ac_dummy; do
4039 IFS=$ac_save_IFS
4040 test -z "$ac_dir" && ac_dir=.
4041 $as_executable_p "$ac_dir/$ac_word" || continue
4042 ac_cv_prog_ETAGS="$ac_prog"
4043 echo "$as_me:4043: found $ac_dir/$ac_word" >&5
4044 break
4045 done
4046
4047 fi
4048 fi
4049 ETAGS=$ac_cv_prog_ETAGS
4050 if test -n "$ETAGS"; then
4051 echo "$as_me:4051: result: $ETAGS" >&5
4052 echo "${ECHO_T}$ETAGS" >&6
4053 else
4054 echo "$as_me:4054: result: no" >&5
4055 echo "${ECHO_T}no" >&6
4056 fi
4057
4058 test -n "$ETAGS" && break
4059 done
4060
4061 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4062 set dummy ${CTAGS:-ctags}; ac_word=$2
4063 echo "$as_me:4063: checking for $ac_word" >&5
4064 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4065 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4066 echo $ECHO_N "(cached) $ECHO_C" >&6
4067 else
4068 if test -n "$MAKE_LOWER_TAGS"; then
4069 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4070 else
4071 ac_save_IFS=$IFS; IFS=$ac_path_separator
4072 ac_dummy="$PATH"
4073 for ac_dir in $ac_dummy; do
4074 IFS=$ac_save_IFS
4075 test -z "$ac_dir" && ac_dir=.
4076 $as_executable_p "$ac_dir/$ac_word" || continue
4077 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4078 echo "$as_me:4078: found $ac_dir/$ac_word" >&5
4079 break
4080 done
4081
4082 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4083 fi
4084 fi
4085 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4086 if test -n "$MAKE_LOWER_TAGS"; then
4087 echo "$as_me:4087: result: $MAKE_LOWER_TAGS" >&5
4088 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4089 else
4090 echo "$as_me:4090: result: no" >&5
4091 echo "${ECHO_T}no" >&6
4092 fi
4093
4094 if test "$cf_cv_mixedcase" = yes ; then
4095 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4096 set dummy ${ETAGS:-etags}; ac_word=$2
4097 echo "$as_me:4097: checking for $ac_word" >&5
4098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4099 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4100 echo $ECHO_N "(cached) $ECHO_C" >&6
4101 else
4102 if test -n "$MAKE_UPPER_TAGS"; then
4103 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4104 else
4105 ac_save_IFS=$IFS; IFS=$ac_path_separator
4106 ac_dummy="$PATH"
4107 for ac_dir in $ac_dummy; do
4108 IFS=$ac_save_IFS
4109 test -z "$ac_dir" && ac_dir=.
4110 $as_executable_p "$ac_dir/$ac_word" || continue
4111 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4112 echo "$as_me:4112: found $ac_dir/$ac_word" >&5
4113 break
4114 done
4115
4116 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4117 fi
4118 fi
4119 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4120 if test -n "$MAKE_UPPER_TAGS"; then
4121 echo "$as_me:4121: result: $MAKE_UPPER_TAGS" >&5
4122 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4123 else
4124 echo "$as_me:4124: result: no" >&5
4125 echo "${ECHO_T}no" >&6
4126 fi
4127
4128 else
4129 MAKE_UPPER_TAGS=no
4130 fi
4131
4132 if test "$MAKE_UPPER_TAGS" = yes ; then
4133 MAKE_UPPER_TAGS=
4134 else
4135 MAKE_UPPER_TAGS="#"
4136 fi
4137
4138 if test "$MAKE_LOWER_TAGS" = yes ; then
4139 MAKE_LOWER_TAGS=
4140 else
4141 MAKE_LOWER_TAGS="#"
4142 fi
4143
4144 if test -n "$ac_tool_prefix"; then
4145 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4146 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4147 echo "$as_me:4147: checking for $ac_word" >&5
4148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4149 if test "${ac_cv_prog_RANLIB+set}" = set; then
4150 echo $ECHO_N "(cached) $ECHO_C" >&6
4151 else
4152 if test -n "$RANLIB"; then
4153 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4154 else
4155 ac_save_IFS=$IFS; IFS=$ac_path_separator
4156 ac_dummy="$PATH"
4157 for ac_dir in $ac_dummy; do
4158 IFS=$ac_save_IFS
4159 test -z "$ac_dir" && ac_dir=.
4160 $as_executable_p "$ac_dir/$ac_word" || continue
4161 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4162 echo "$as_me:4162: found $ac_dir/$ac_word" >&5
4163 break
4164 done
4165
4166 fi
4167 fi
4168 RANLIB=$ac_cv_prog_RANLIB
4169 if test -n "$RANLIB"; then
4170 echo "$as_me:4170: result: $RANLIB" >&5
4171 echo "${ECHO_T}$RANLIB" >&6
4172 else
4173 echo "$as_me:4173: result: no" >&5
4174 echo "${ECHO_T}no" >&6
4175 fi
4176
4177 fi
4178 if test -z "$ac_cv_prog_RANLIB"; then
4179 ac_ct_RANLIB=$RANLIB
4180 # Extract the first word of "ranlib", so it can be a program name with args.
4181 set dummy ranlib; ac_word=$2
4182 echo "$as_me:4182: checking for $ac_word" >&5
4183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4184 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4185 echo $ECHO_N "(cached) $ECHO_C" >&6
4186 else
4187 if test -n "$ac_ct_RANLIB"; then
4188 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4189 else
4190 ac_save_IFS=$IFS; IFS=$ac_path_separator
4191 ac_dummy="$PATH"
4192 for ac_dir in $ac_dummy; do
4193 IFS=$ac_save_IFS
4194 test -z "$ac_dir" && ac_dir=.
4195 $as_executable_p "$ac_dir/$ac_word" || continue
4196 ac_cv_prog_ac_ct_RANLIB="ranlib"
4197 echo "$as_me:4197: found $ac_dir/$ac_word" >&5
4198 break
4199 done
4200
4201 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4202 fi
4203 fi
4204 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4205 if test -n "$ac_ct_RANLIB"; then
4206 echo "$as_me:4206: result: $ac_ct_RANLIB" >&5
4207 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4208 else
4209 echo "$as_me:4209: result: no" >&5
4210 echo "${ECHO_T}no" >&6
4211 fi
4212
4213 RANLIB=$ac_ct_RANLIB
4214 else
4215 RANLIB="$ac_cv_prog_RANLIB"
4216 fi
4217
4218 if test -n "$ac_tool_prefix"; then
4219 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4220 set dummy ${ac_tool_prefix}ld; ac_word=$2
4221 echo "$as_me:4221: checking for $ac_word" >&5
4222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4223 if test "${ac_cv_prog_LD+set}" = set; then
4224 echo $ECHO_N "(cached) $ECHO_C" >&6
4225 else
4226 if test -n "$LD"; then
4227 ac_cv_prog_LD="$LD" # Let the user override the test.
4228 else
4229 ac_save_IFS=$IFS; IFS=$ac_path_separator
4230 ac_dummy="$PATH"
4231 for ac_dir in $ac_dummy; do
4232 IFS=$ac_save_IFS
4233 test -z "$ac_dir" && ac_dir=.
4234 $as_executable_p "$ac_dir/$ac_word" || continue
4235 ac_cv_prog_LD="${ac_tool_prefix}ld"
4236 echo "$as_me:4236: found $ac_dir/$ac_word" >&5
4237 break
4238 done
4239
4240 fi
4241 fi
4242 LD=$ac_cv_prog_LD
4243 if test -n "$LD"; then
4244 echo "$as_me:4244: result: $LD" >&5
4245 echo "${ECHO_T}$LD" >&6
4246 else
4247 echo "$as_me:4247: result: no" >&5
4248 echo "${ECHO_T}no" >&6
4249 fi
4250
4251 fi
4252 if test -z "$ac_cv_prog_LD"; then
4253 ac_ct_LD=$LD
4254 # Extract the first word of "ld", so it can be a program name with args.
4255 set dummy ld; ac_word=$2
4256 echo "$as_me:4256: checking for $ac_word" >&5
4257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4258 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4259 echo $ECHO_N "(cached) $ECHO_C" >&6
4260 else
4261 if test -n "$ac_ct_LD"; then
4262 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4263 else
4264 ac_save_IFS=$IFS; IFS=$ac_path_separator
4265 ac_dummy="$PATH"
4266 for ac_dir in $ac_dummy; do
4267 IFS=$ac_save_IFS
4268 test -z "$ac_dir" && ac_dir=.
4269 $as_executable_p "$ac_dir/$ac_word" || continue
4270 ac_cv_prog_ac_ct_LD="ld"
4271 echo "$as_me:4271: found $ac_dir/$ac_word" >&5
4272 break
4273 done
4274
4275 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4276 fi
4277 fi
4278 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4279 if test -n "$ac_ct_LD"; then
4280 echo "$as_me:4280: result: $ac_ct_LD" >&5
4281 echo "${ECHO_T}$ac_ct_LD" >&6
4282 else
4283 echo "$as_me:4283: result: no" >&5
4284 echo "${ECHO_T}no" >&6
4285 fi
4286
4287 LD=$ac_ct_LD
4288 else
4289 LD="$ac_cv_prog_LD"
4290 fi
4291
4292 if test -n "$ac_tool_prefix"; then
4293 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4294 set dummy ${ac_tool_prefix}ar; ac_word=$2
4295 echo "$as_me:4295: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_AR+set}" = set; then
4298 echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300 if test -n "$AR"; then
4301 ac_cv_prog_AR="$AR" # Let the user override the test.
4302 else
4303 ac_save_IFS=$IFS; IFS=$ac_path_separator
4304 ac_dummy="$PATH"
4305 for ac_dir in $ac_dummy; do
4306 IFS=$ac_save_IFS
4307 test -z "$ac_dir" && ac_dir=.
4308 $as_executable_p "$ac_dir/$ac_word" || continue
4309 ac_cv_prog_AR="${ac_tool_prefix}ar"
4310 echo "$as_me:4310: found $ac_dir/$ac_word" >&5
4311 break
4312 done
4313
4314 fi
4315 fi
4316 AR=$ac_cv_prog_AR
4317 if test -n "$AR"; then
4318 echo "$as_me:4318: result: $AR" >&5
4319 echo "${ECHO_T}$AR" >&6
4320 else
4321 echo "$as_me:4321: result: no" >&5
4322 echo "${ECHO_T}no" >&6
4323 fi
4324
4325 fi
4326 if test -z "$ac_cv_prog_AR"; then
4327 ac_ct_AR=$AR
4328 # Extract the first word of "ar", so it can be a program name with args.
4329 set dummy ar; ac_word=$2
4330 echo "$as_me:4330: checking for $ac_word" >&5
4331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4332 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4333 echo $ECHO_N "(cached) $ECHO_C" >&6
4334 else
4335 if test -n "$ac_ct_AR"; then
4336 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4337 else
4338 ac_save_IFS=$IFS; IFS=$ac_path_separator
4339 ac_dummy="$PATH"
4340 for ac_dir in $ac_dummy; do
4341 IFS=$ac_save_IFS
4342 test -z "$ac_dir" && ac_dir=.
4343 $as_executable_p "$ac_dir/$ac_word" || continue
4344 ac_cv_prog_ac_ct_AR="ar"
4345 echo "$as_me:4345: found $ac_dir/$ac_word" >&5
4346 break
4347 done
4348
4349 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4350 fi
4351 fi
4352 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4353 if test -n "$ac_ct_AR"; then
4354 echo "$as_me:4354: result: $ac_ct_AR" >&5
4355 echo "${ECHO_T}$ac_ct_AR" >&6
4356 else
4357 echo "$as_me:4357: result: no" >&5
4358 echo "${ECHO_T}no" >&6
4359 fi
4360
4361 AR=$ac_ct_AR
4362 else
4363 AR="$ac_cv_prog_AR"
4364 fi
4365
4366 if test -n "$ac_tool_prefix"; then
4367 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4368 set dummy ${ac_tool_prefix}ar; ac_word=$2
4369 echo "$as_me:4369: checking for $ac_word" >&5
4370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4371 if test "${ac_cv_prog_AR+set}" = set; then
4372 echo $ECHO_N "(cached) $ECHO_C" >&6
4373 else
4374 if test -n "$AR"; then
4375 ac_cv_prog_AR="$AR" # Let the user override the test.
4376 else
4377 ac_save_IFS=$IFS; IFS=$ac_path_separator
4378 ac_dummy="$PATH"
4379 for ac_dir in $ac_dummy; do
4380 IFS=$ac_save_IFS
4381 test -z "$ac_dir" && ac_dir=.
4382 $as_executable_p "$ac_dir/$ac_word" || continue
4383 ac_cv_prog_AR="${ac_tool_prefix}ar"
4384 echo "$as_me:4384: found $ac_dir/$ac_word" >&5
4385 break
4386 done
4387
4388 fi
4389 fi
4390 AR=$ac_cv_prog_AR
4391 if test -n "$AR"; then
4392 echo "$as_me:4392: result: $AR" >&5
4393 echo "${ECHO_T}$AR" >&6
4394 else
4395 echo "$as_me:4395: result: no" >&5
4396 echo "${ECHO_T}no" >&6
4397 fi
4398
4399 fi
4400 if test -z "$ac_cv_prog_AR"; then
4401 ac_ct_AR=$AR
4402 # Extract the first word of "ar", so it can be a program name with args.
4403 set dummy ar; ac_word=$2
4404 echo "$as_me:4404: checking for $ac_word" >&5
4405 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4406 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4407 echo $ECHO_N "(cached) $ECHO_C" >&6
4408 else
4409 if test -n "$ac_ct_AR"; then
4410 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4411 else
4412 ac_save_IFS=$IFS; IFS=$ac_path_separator
4413 ac_dummy="$PATH"
4414 for ac_dir in $ac_dummy; do
4415 IFS=$ac_save_IFS
4416 test -z "$ac_dir" && ac_dir=.
4417 $as_executable_p "$ac_dir/$ac_word" || continue
4418 ac_cv_prog_ac_ct_AR="ar"
4419 echo "$as_me:4419: found $ac_dir/$ac_word" >&5
4420 break
4421 done
4422
4423 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4424 fi
4425 fi
4426 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4427 if test -n "$ac_ct_AR"; then
4428 echo "$as_me:4428: result: $ac_ct_AR" >&5
4429 echo "${ECHO_T}$ac_ct_AR" >&6
4430 else
4431 echo "$as_me:4431: result: no" >&5
4432 echo "${ECHO_T}no" >&6
4433 fi
4434
4435 AR=$ac_ct_AR
4436 else
4437 AR="$ac_cv_prog_AR"
4438 fi
4439
4440 echo "$as_me:4440: checking for options to update archives" >&5
4441 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4442 if test "${cf_cv_ar_flags+set}" = set; then
4443 echo $ECHO_N "(cached) $ECHO_C" >&6
4444 else
4445
4446 case "$cf_cv_system_name" in
4447 (*-msvc*)
4448 cf_cv_ar_flags=''
4449 cat >mk_static_lib.sh <<-EOF
4450 #!$SHELL
4451 MSVC_BIN="$AR"
4452 out="\$1"
4453 shift
4454 exec \$MSVC_BIN -out:"\$out" \$@
4455 EOF
4456 chmod +x mk_static_lib.sh
4457 AR=`pwd`/mk_static_lib.sh
4458 ;;
4459 (*)
4460 cf_cv_ar_flags=unknown
4461 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4462 do
4463
4464 # check if $ARFLAGS already contains this choice
4465 if test "x$ARFLAGS" != "x" ; then
4466 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4467 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4468 cf_cv_ar_flags=
4469 break
4470 fi
4471 fi
4472
4473 rm -f "conftest.$ac_cv_objext"
4474 rm -f conftest.a
4475
4476 cat >"conftest.$ac_ext" <<EOF
4477 #line 4477 "configure"
4478 int testdata[3] = { 123, 456, 789 };
4479 EOF
4480 if { (eval echo "$as_me:4480: \"$ac_compile\"") >&5
4481 (eval $ac_compile) 2>&5
4482 ac_status=$?
4483 echo "$as_me:4483: \$? = $ac_status" >&5
4484 (exit "$ac_status"); } ; then
4485 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4486 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4487 if test -f conftest.a ; then
4488 cf_cv_ar_flags="$cf_ar_flags"
4489 break
4490 fi
4491 else
4492 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4493
4494 echo "${as_me:-configure}:4494: testing cannot compile test-program ..." 1>&5
4495
4496 break
4497 fi
4498 done
4499 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4500 ;;
4501 esac
4502
4503 fi
4504 echo "$as_me:4504: result: $cf_cv_ar_flags" >&5
4505 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4506
4507 if test -n "$ARFLAGS" ; then
4508 if test -n "$cf_cv_ar_flags" ; then
4509 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4510 fi
4511 else
4512 ARFLAGS=$cf_cv_ar_flags
4513 fi
4514
4515 echo "$as_me:4515: checking for PATH separator" >&5
4516 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4517 case "$cf_cv_system_name" in
4518 (os2*) PATH_SEPARATOR=';' ;;
4519 (*) ${PATH_SEPARATOR:=':'} ;;
4520 esac
4521
4522 echo "$as_me:4522: result: $PATH_SEPARATOR" >&5
4523 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4524
4525 echo "$as_me:4525: checking for an installation directory prefix" >&5
4526 echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
4527
4528 # Check whether --with-install-prefix or --without-install-prefix was given.
4529 if test "${with_install_prefix+set}" = set; then
4530 withval="$with_install_prefix"
4531 case "x$withval" in
4532 (xyes|xno)
4533 ;;
4534 (*) DESTDIR="$withval"
4535 ;;
4536 esac
4537 fi;
4538 echo "$as_me:4538: result: ${DESTDIR:-(none)}" >&5
4539 echo "${ECHO_T}${DESTDIR:-(none)}" >&6
4540
4541 SET_DESTDIR=
4542 test -n "$DESTDIR" && SET_DESTDIR="DESTDIR=$DESTDIR"
4543
4544 echo "$as_me:4544: checking if installation directory prefix should be merged" >&5
4545 echo $ECHO_N "checking if installation directory prefix should be merged... $ECHO_C" >&6
4546
4547 # Check whether --enable-install-prefix or --disable-install-prefix was given.
4548 if test "${enable_install_prefix+set}" = set; then
4549 enableval="$enable_install_prefix"
4550 test "$enableval" != yes && enableval=no
4551 if test "$enableval" != "no" ; then
4552 cf_install_prefix=yes
4553 else
4554 cf_install_prefix=no
4555 fi
4556 else
4557 enableval=no
4558 cf_install_prefix=no
4559
4560 fi;
4561 echo "$as_me:4561: result: $cf_install_prefix" >&5
4562 echo "${ECHO_T}$cf_install_prefix" >&6
4563
4564 if test "$cf_install_prefix" = yes ; then
4565 MERGE_PREFIX=':$(prefix)%=%'
4566 else
4567 MERGE_PREFIX=''
4568 fi
4569
4570 ###############################################################################
4571
4572 # If we're cross-compiling, allow the user to override the tools and their
4573 # options. The configure script is oriented toward identifying the host
4574 # compiler, etc., but we need a build compiler to generate parts of the source.
4575
4576 if test "$cross_compiling" = yes ; then
4577
4578 # defaults that we might want to override
4579 : ${BUILD_CFLAGS:=''}
4580 : ${BUILD_CPPFLAGS:=''}
4581 : ${BUILD_LDFLAGS:=''}
4582 : ${BUILD_LIBS:=''}
4583 : ${BUILD_EXEEXT:='$x'}
4584 : ${BUILD_OBJEXT:='o'}
4585
4586 # Check whether --with-build-cc or --without-build-cc was given.
4587 if test "${with_build_cc+set}" = set; then
4588 withval="$with_build_cc"
4589 BUILD_CC="$withval"
4590 else
4591 for ac_prog in gcc clang c99 c89 cc cl
4592 do
4593 # Extract the first word of "$ac_prog", so it can be a program name with args.
4594 set dummy $ac_prog; ac_word=$2
4595 echo "$as_me:4595: checking for $ac_word" >&5
4596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4597 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4598 echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600 if test -n "$BUILD_CC"; then
4601 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4602 else
4603 ac_save_IFS=$IFS; IFS=$ac_path_separator
4604 ac_dummy="$PATH"
4605 for ac_dir in $ac_dummy; do
4606 IFS=$ac_save_IFS
4607 test -z "$ac_dir" && ac_dir=.
4608 $as_executable_p "$ac_dir/$ac_word" || continue
4609 ac_cv_prog_BUILD_CC="$ac_prog"
4610 echo "$as_me:4610: found $ac_dir/$ac_word" >&5
4611 break
4612 done
4613
4614 fi
4615 fi
4616 BUILD_CC=$ac_cv_prog_BUILD_CC
4617 if test -n "$BUILD_CC"; then
4618 echo "$as_me:4618: result: $BUILD_CC" >&5
4619 echo "${ECHO_T}$BUILD_CC" >&6
4620 else
4621 echo "$as_me:4621: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625 test -n "$BUILD_CC" && break
4626 done
4627 test -n "$BUILD_CC" || BUILD_CC="none"
4628
4629 fi;
4630 echo "$as_me:4630: checking for native build C compiler" >&5
4631 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4632 echo "$as_me:4632: result: $BUILD_CC" >&5
4633 echo "${ECHO_T}$BUILD_CC" >&6
4634
4635 echo "$as_me:4635: checking for native build C preprocessor" >&5
4636 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4637
4638 # Check whether --with-build-cpp or --without-build-cpp was given.
4639 if test "${with_build_cpp+set}" = set; then
4640 withval="$with_build_cpp"
4641 BUILD_CPP="$withval"
4642 else
4643 BUILD_CPP='${BUILD_CC} -E'
4644 fi;
4645 echo "$as_me:4645: result: $BUILD_CPP" >&5
4646 echo "${ECHO_T}$BUILD_CPP" >&6
4647
4648 echo "$as_me:4648: checking for native build C flags" >&5
4649 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4650
4651 # Check whether --with-build-cflags or --without-build-cflags was given.
4652 if test "${with_build_cflags+set}" = set; then
4653 withval="$with_build_cflags"
4654 BUILD_CFLAGS="$withval"
4655 fi;
4656 echo "$as_me:4656: result: $BUILD_CFLAGS" >&5
4657 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4658
4659 echo "$as_me:4659: checking for native build C preprocessor-flags" >&5
4660 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4661
4662 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4663 if test "${with_build_cppflags+set}" = set; then
4664 withval="$with_build_cppflags"
4665 BUILD_CPPFLAGS="$withval"
4666 fi;
4667 echo "$as_me:4667: result: $BUILD_CPPFLAGS" >&5
4668 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4669
4670 echo "$as_me:4670: checking for native build linker-flags" >&5
4671 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4672
4673 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4674 if test "${with_build_ldflags+set}" = set; then
4675 withval="$with_build_ldflags"
4676 BUILD_LDFLAGS="$withval"
4677 fi;
4678 echo "$as_me:4678: result: $BUILD_LDFLAGS" >&5
4679 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4680
4681 echo "$as_me:4681: checking for native build linker-libraries" >&5
4682 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4683
4684 # Check whether --with-build-libs or --without-build-libs was given.
4685 if test "${with_build_libs+set}" = set; then
4686 withval="$with_build_libs"
4687 BUILD_LIBS="$withval"
4688 fi;
4689 echo "$as_me:4689: result: $BUILD_LIBS" >&5
4690 echo "${ECHO_T}$BUILD_LIBS" >&6
4691
4692 # this assumes we're on Unix.
4693 BUILD_EXEEXT=
4694 BUILD_OBJEXT=o
4695
4696 : ${BUILD_CC:='${CC}'}
4697
4698 echo "$as_me:4698: checking if the build-compiler \"$BUILD_CC\" works" >&5
4699 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
4700
4701 cf_save_crossed=$cross_compiling
4702 cf_save_ac_link=$ac_link
4703 cross_compiling=no
4704 cf_build_cppflags=$BUILD_CPPFLAGS
4705 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
4706 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4707
4708 if test "$cross_compiling" = yes; then
4709 cf_ok_build_cc=unknown
4710 else
4711 cat >"conftest.$ac_ext" <<_ACEOF
4712 #line 4712 "configure"
4713 #include "confdefs.h"
4714 #include <stdio.h>
4715 int main(int argc, char *argv[])
4716 {
4717 ${cf_cv_main_return:-return}(argc < 0 || argv == (void*)0 || argv[0] == (void*)0);
4718 }
4719
4720 _ACEOF
4721 rm -f "conftest$ac_exeext"
4722 if { (eval echo "$as_me:4722: \"$ac_link\"") >&5
4723 (eval $ac_link) 2>&5
4724 ac_status=$?
4725 echo "$as_me:4725: \$? = $ac_status" >&5
4726 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4727 { (eval echo "$as_me:4727: \"$ac_try\"") >&5
4728 (eval $ac_try) 2>&5
4729 ac_status=$?
4730 echo "$as_me:4730: \$? = $ac_status" >&5
4731 (exit "$ac_status"); }; }; then
4732 cf_ok_build_cc=yes
4733 else
4734 echo "$as_me: program exited with status $ac_status" >&5
4735 echo "$as_me: failed program was:" >&5
4736 cat "conftest.$ac_ext" >&5
4737 cf_ok_build_cc=no
4738 fi
4739 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4740 fi
4741
4742 cross_compiling=$cf_save_crossed
4743 ac_link=$cf_save_ac_link
4744
4745 echo "$as_me:4745: result: $cf_ok_build_cc" >&5
4746 echo "${ECHO_T}$cf_ok_build_cc" >&6
4747
4748 if test "$cf_ok_build_cc" != yes
4749 then
4750 { { echo "$as_me:4750: error: Cross-build requires two compilers.
4751 Use --with-build-cc to specify the native compiler." >&5
4752 echo "$as_me: error: Cross-build requires two compilers.
4753 Use --with-build-cc to specify the native compiler." >&2;}
4754 { (exit 1); exit 1; }; }
4755 fi
4756
4757 else
4758 : ${BUILD_CC:='${CC}'}
4759 : ${BUILD_CPP:='${CPP}'}
4760 : ${BUILD_CFLAGS:='${CFLAGS}'}
4761 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4762 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4763 : ${BUILD_LIBS:='${LIBS}'}
4764 : ${BUILD_EXEEXT:='$x'}
4765 : ${BUILD_OBJEXT:='o'}
4766 fi
4767
4768 ###############################################################################
4769
4770 ### Options to allow the user to specify the set of libraries which are used.
4771 ### Use "--without-normal --with-shared" to allow the default model to be
4772 ### shared, for example.
4773 cf_list_models=""
4774
4775 echo "$as_me:4775: checking if you want to build shared C-objects" >&5
4776 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4777
4778 # Check whether --with-shared or --without-shared was given.
4779 if test "${with_shared+set}" = set; then
4780 withval="$with_shared"
4781 with_shared=$withval
4782 else
4783 with_shared=no
4784 fi;
4785 echo "$as_me:4785: result: $with_shared" >&5
4786 echo "${ECHO_T}$with_shared" >&6
4787 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4788
4789 echo "$as_me:4789: checking for specified models" >&5
4790 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4791 test -z "$cf_list_models" && cf_list_models=normal
4792 echo "$as_me:4792: result: $cf_list_models" >&5
4793 echo "${ECHO_T}$cf_list_models" >&6
4794
4795 ### Use the first model as the default, and save its suffix for use in building
4796 ### up test-applications.
4797 echo "$as_me:4797: checking for default model" >&5
4798 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4799 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4800 echo "$as_me:4800: result: $DFT_LWR_MODEL" >&5
4801 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4802
4803 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4804
4805 echo "$as_me:4805: checking for specific curses-directory" >&5
4806 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4807
4808 # Check whether --with-curses-dir or --without-curses-dir was given.
4809 if test "${with_curses_dir+set}" = set; then
4810 withval="$with_curses_dir"
4811 cf_cv_curses_dir=$withval
4812 else
4813 cf_cv_curses_dir=no
4814 fi;
4815 echo "$as_me:4815: result: $cf_cv_curses_dir" >&5
4816 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4817
4818 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4819 then
4820
4821 if test "x$prefix" != xNONE; then
4822 cf_path_syntax="$prefix"
4823 else
4824 cf_path_syntax="$ac_default_prefix"
4825 fi
4826
4827 case "x$withval" in
4828 (x\$\(*\)*|x\'*\'*)
4829 ;;
4830 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
4831 ;;
4832 (x\$\{*prefix\}*|x\$\{*dir\}*)
4833 eval withval="$withval"
4834 case "x$withval" in
4835 (xNONE/*)
4836 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4837 ;;
4838 esac
4839 ;;
4840 (xno|xNONE/*)
4841 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4842 ;;
4843 (*)
4844 { { echo "$as_me:4844: error: expected a pathname, not \"$withval\"" >&5
4845 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4846 { (exit 1); exit 1; }; }
4847 ;;
4848 esac
4849
4850 if test -d "$cf_cv_curses_dir"
4851 then
4852
4853 if test -n "$cf_cv_curses_dir/include" ; then
4854 for cf_add_incdir in $cf_cv_curses_dir/include
4855 do
4856 while test "$cf_add_incdir" != /usr/include
4857 do
4858 if test -d "$cf_add_incdir"
4859 then
4860 cf_have_incdir=no
4861 if test -n "$CFLAGS$CPPFLAGS" ; then
4862 # a loop is needed to ensure we can add subdirs of existing dirs
4863 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4864 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4865 cf_have_incdir=yes; break
4866 fi
4867 done
4868 fi
4869
4870 if test "$cf_have_incdir" = no ; then
4871 if test "$cf_add_incdir" = /usr/local/include ; then
4872 if test "$GCC" = yes
4873 then
4874 cf_save_CPPFLAGS=$CPPFLAGS
4875
4876 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4877 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4878
4879 cat >"conftest.$ac_ext" <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4882 #include <stdio.h>
4883 int
4884 main (void)
4885 {
4886 printf("Hello")
4887 ;
4888 return 0;
4889 }
4890 _ACEOF
4891 rm -f "conftest.$ac_objext"
4892 if { (eval echo "$as_me:4892: \"$ac_compile\"") >&5
4893 (eval $ac_compile) 2>&5
4894 ac_status=$?
4895 echo "$as_me:4895: \$? = $ac_status" >&5
4896 (exit "$ac_status"); } &&
4897 { ac_try='test -s "conftest.$ac_objext"'
4898 { (eval echo "$as_me:4898: \"$ac_try\"") >&5
4899 (eval $ac_try) 2>&5
4900 ac_status=$?
4901 echo "$as_me:4901: \$? = $ac_status" >&5
4902 (exit "$ac_status"); }; }; then
4903 :
4904 else
4905 echo "$as_me: failed program was:" >&5
4906 cat "conftest.$ac_ext" >&5
4907 cf_have_incdir=yes
4908 fi
4909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4910 CPPFLAGS=$cf_save_CPPFLAGS
4911 fi
4912 fi
4913 fi
4914
4915 if test "$cf_have_incdir" = no ; then
4916 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4917
4918 echo "${as_me:-configure}:4918: testing adding $cf_add_incdir to include-path ..." 1>&5
4919
4920 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4921
4922 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4923 test "$cf_top_incdir" = "$cf_add_incdir" && break
4924 cf_add_incdir="$cf_top_incdir"
4925 else
4926 break
4927 fi
4928 else
4929 break
4930 fi
4931 done
4932 done
4933 fi
4934
4935 if test -n "$cf_cv_curses_dir/lib" ; then
4936 for cf_add_libdir in $cf_cv_curses_dir/lib
4937 do
4938 if test "$cf_add_libdir" = /usr/lib ; then
4939 :
4940 elif test -d "$cf_add_libdir"
4941 then
4942 cf_have_libdir=no
4943 if test -n "$LDFLAGS$LIBS" ; then
4944 # a loop is needed to ensure we can add subdirs of existing dirs
4945 for cf_test_libdir in $LDFLAGS $LIBS ; do
4946 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4947 cf_have_libdir=yes; break
4948 fi
4949 done
4950 fi
4951 if test "$cf_have_libdir" = no ; then
4952 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4953
4954 echo "${as_me:-configure}:4954: testing adding $cf_add_libdir to library-path ..." 1>&5
4955
4956 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4957 fi
4958 fi
4959 done
4960 fi
4961
4962 fi
4963 fi
4964
4965 cf_ncuconfig_root=ncurses
4966 cf_have_ncuconfig=no
4967
4968 if test "x${PKG_CONFIG:=none}" != xnone; then
4969 echo "$as_me:4969: checking pkg-config for $cf_ncuconfig_root" >&5
4970 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4971 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4972 echo "$as_me:4972: result: yes" >&5
4973 echo "${ECHO_T}yes" >&6
4974
4975 echo "$as_me:4975: checking if the $cf_ncuconfig_root package files work" >&5
4976 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4977 cf_have_ncuconfig=unknown
4978
4979 cf_save_CFLAGS="$CFLAGS"
4980 cf_save_CPPFLAGS="$CPPFLAGS"
4981 cf_save_LIBS="$LIBS"
4982
4983 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4984 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4985
4986 # while -W for passing linker flags is prevalent, it is not "standard".
4987 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4988 # incompatible _and_ non-standard -W option which gives an error. Work
4989 # around that pitfall.
4990 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4991 (x*c[89]9@@*-W*)
4992
4993 cf_fix_cppflags=no
4994 cf_new_cflags=
4995 cf_new_cppflags=
4996 cf_new_extra_cppflags=
4997
4998 for cf_add_cflags in $cf_pkg_cflags
4999 do
5000 case "$cf_fix_cppflags" in
5001 (no)
5002 case "$cf_add_cflags" in
5003 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5004 case "$cf_add_cflags" in
5005 (-D*)
5006 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5007
5008 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5009 && test -z "${cf_tst_cflags}" \
5010 && cf_fix_cppflags=yes
5011
5012 if test "$cf_fix_cppflags" = yes ; then
5013
5014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5016
5017 continue
5018 elif test "${cf_tst_cflags}" = "\"'" ; then
5019
5020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5022
5023 continue
5024 fi
5025 ;;
5026 esac
5027 case "$CPPFLAGS" in
5028 (*$cf_add_cflags)
5029 ;;
5030 (*)
5031 case "$cf_add_cflags" in
5032 (-D*)
5033 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5034
5035 CPPFLAGS=`echo "$CPPFLAGS" | \
5036 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5037 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5038
5039 ;;
5040 esac
5041
5042 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5043 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5044
5045 ;;
5046 esac
5047 ;;
5048 (*)
5049
5050 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5051 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5052
5053 ;;
5054 esac
5055 ;;
5056 (yes)
5057
5058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5060
5061 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5062
5063 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5064 && test -z "${cf_tst_cflags}" \
5065 && cf_fix_cppflags=no
5066 ;;
5067 esac
5068 done
5069
5070 if test -n "$cf_new_cflags" ; then
5071
5072 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5073 CFLAGS="${CFLAGS}$cf_new_cflags"
5074
5075 fi
5076
5077 if test -n "$cf_new_cppflags" ; then
5078
5079 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5080 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5081
5082 fi
5083
5084 if test -n "$cf_new_extra_cppflags" ; then
5085
5086 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5087 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5088
5089 fi
5090
5091 cf_add_libs="$LIBS"
5092 # reverse order
5093 cf_add_0lib=
5094 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5095 # filter duplicates
5096 for cf_add_1lib in $cf_add_0lib; do
5097 for cf_add_2lib in $cf_add_libs; do
5098 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5099 cf_add_1lib=
5100 break
5101 fi
5102 done
5103 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5104 done
5105 LIBS="$cf_add_libs"
5106
5107 cat >"conftest.$ac_ext" <<_ACEOF
5108 #line 5108 "configure"
5109 #include "confdefs.h"
5110 #include <${cf_cv_ncurses_header:-curses.h}>
5111 int
5112 main (void)
5113 {
5114 initscr(); mousemask(0,0); tigetstr((char *)0);
5115 ;
5116 return 0;
5117 }
5118 _ACEOF
5119 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5120 if { (eval echo "$as_me:5120: \"$ac_link\"") >&5
5121 (eval $ac_link) 2>&5
5122 ac_status=$?
5123 echo "$as_me:5123: \$? = $ac_status" >&5
5124 (exit "$ac_status"); } &&
5125 { ac_try='test -s "conftest$ac_exeext"'
5126 { (eval echo "$as_me:5126: \"$ac_try\"") >&5
5127 (eval $ac_try) 2>&5
5128 ac_status=$?
5129 echo "$as_me:5129: \$? = $ac_status" >&5
5130 (exit "$ac_status"); }; }; then
5131 if test "$cross_compiling" = yes; then
5132 cf_test_ncuconfig=maybe
5133 else
5134 cat >"conftest.$ac_ext" <<_ACEOF
5135 #line 5135 "configure"
5136 #include "confdefs.h"
5137 #include <${cf_cv_ncurses_header:-curses.h}>
5138 int main(void)
5139 { const char *xx = curses_version(); return (xx == 0); }
5140 _ACEOF
5141 rm -f "conftest$ac_exeext"
5142 if { (eval echo "$as_me:5142: \"$ac_link\"") >&5
5143 (eval $ac_link) 2>&5
5144 ac_status=$?
5145 echo "$as_me:5145: \$? = $ac_status" >&5
5146 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5147 { (eval echo "$as_me:5147: \"$ac_try\"") >&5
5148 (eval $ac_try) 2>&5
5149 ac_status=$?
5150 echo "$as_me:5150: \$? = $ac_status" >&5
5151 (exit "$ac_status"); }; }; then
5152 cf_test_ncuconfig=yes
5153 else
5154 echo "$as_me: program exited with status $ac_status" >&5
5155 echo "$as_me: failed program was:" >&5
5156 cat "conftest.$ac_ext" >&5
5157 cf_test_ncuconfig=no
5158 fi
5159 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5160 fi
5161 else
5162 echo "$as_me: failed program was:" >&5
5163 cat "conftest.$ac_ext" >&5
5164 cf_test_ncuconfig=no
5165 fi
5166 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5167
5168 CFLAGS="$cf_save_CFLAGS"
5169 CPPFLAGS="$cf_save_CPPFLAGS"
5170 LIBS="$cf_save_LIBS"
5171
5172 if test "x$cf_test_ncuconfig" != xyes; then
5173 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
5174 cf_pkg_cflags="$cf_temp"
5175 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
5176 cf_pkg_libs="$cf_temp"
5177 fi
5178 ;;
5179 esac
5180
5181 for cf_required in $cf_ncuconfig_root
5182 do
5183 # check for duplicates
5184 for cf_require_pkg in $REQUIRE_PKG
5185 do
5186 if test "$cf_required" = "$cf_require_pkg"
5187 then
5188 cf_required=
5189 break
5190 fi
5191 done
5192 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
5193 done
5194
5195 for cf_add_cflags in $cf_pkg_cflags
5196 do
5197 case "x$cf_add_cflags" in
5198 (x-[DU]*)
5199
5200 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5201 while true
5202 do
5203 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'`
5204 test "$CFLAGS" != "$cf_old_cflag" || break
5205
5206 CFLAGS="$cf_old_cflag"
5207 done
5208
5209 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5210 while true
5211 do
5212 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'`
5213 test "$CPPFLAGS" != "$cf_old_cflag" || break
5214
5215 CPPFLAGS="$cf_old_cflag"
5216 done
5217
5218 ;;
5219 esac
5220
5221 cf_fix_cppflags=no
5222 cf_new_cflags=
5223 cf_new_cppflags=
5224 cf_new_extra_cppflags=
5225
5226 for cf_add_cflags in $cf_add_cflags
5227 do
5228 case "$cf_fix_cppflags" in
5229 (no)
5230 case "$cf_add_cflags" in
5231 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5232 case "$cf_add_cflags" in
5233 (-D*)
5234 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5235
5236 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5237 && test -z "${cf_tst_cflags}" \
5238 && cf_fix_cppflags=yes
5239
5240 if test "$cf_fix_cppflags" = yes ; then
5241
5242 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5243 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5244
5245 continue
5246 elif test "${cf_tst_cflags}" = "\"'" ; then
5247
5248 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5249 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5250
5251 continue
5252 fi
5253 ;;
5254 esac
5255 case "$CPPFLAGS" in
5256 (*$cf_add_cflags)
5257 ;;
5258 (*)
5259 case "$cf_add_cflags" in
5260 (-D*)
5261 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5262
5263 CPPFLAGS=`echo "$CPPFLAGS" | \
5264 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5265 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5266
5267 ;;
5268 esac
5269
5270 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5271 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5272
5273 ;;
5274 esac
5275 ;;
5276 (*)
5277
5278 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5279 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5280
5281 ;;
5282 esac
5283 ;;
5284 (yes)
5285
5286 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5287 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5288
5289 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5290
5291 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5292 && test -z "${cf_tst_cflags}" \
5293 && cf_fix_cppflags=no
5294 ;;
5295 esac
5296 done
5297
5298 if test -n "$cf_new_cflags" ; then
5299
5300 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5301 CFLAGS="${CFLAGS}$cf_new_cflags"
5302
5303 fi
5304
5305 if test -n "$cf_new_cppflags" ; then
5306
5307 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5308 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5309
5310 fi
5311
5312 if test -n "$cf_new_extra_cppflags" ; then
5313
5314 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5315 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5316
5317 fi
5318
5319 done
5320
5321 cf_add_libs="$LIBS"
5322 # reverse order
5323 cf_add_0lib=
5324 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5325 # filter duplicates
5326 for cf_add_1lib in $cf_add_0lib; do
5327 for cf_add_2lib in $cf_add_libs; do
5328 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5329 cf_add_1lib=
5330 break
5331 fi
5332 done
5333 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5334 done
5335 LIBS="$cf_add_libs"
5336
5337 cat >"conftest.$ac_ext" <<_ACEOF
5338 #line 5338 "configure"
5339 #include "confdefs.h"
5340 #include <${cf_cv_ncurses_header:-curses.h}>
5341 int
5342 main (void)
5343 {
5344 initscr(); mousemask(0,0); tigetstr((char *)0);
5345 ;
5346 return 0;
5347 }
5348 _ACEOF
5349 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5350 if { (eval echo "$as_me:5350: \"$ac_link\"") >&5
5351 (eval $ac_link) 2>&5
5352 ac_status=$?
5353 echo "$as_me:5353: \$? = $ac_status" >&5
5354 (exit "$ac_status"); } &&
5355 { ac_try='test -s "conftest$ac_exeext"'
5356 { (eval echo "$as_me:5356: \"$ac_try\"") >&5
5357 (eval $ac_try) 2>&5
5358 ac_status=$?
5359 echo "$as_me:5359: \$? = $ac_status" >&5
5360 (exit "$ac_status"); }; }; then
5361 if test "$cross_compiling" = yes; then
5362 cf_have_ncuconfig=maybe
5363 else
5364 cat >"conftest.$ac_ext" <<_ACEOF
5365 #line 5365 "configure"
5366 #include "confdefs.h"
5367 #include <${cf_cv_ncurses_header:-curses.h}>
5368 int main(void)
5369 { const char *xx = curses_version(); return (xx == 0); }
5370 _ACEOF
5371 rm -f "conftest$ac_exeext"
5372 if { (eval echo "$as_me:5372: \"$ac_link\"") >&5
5373 (eval $ac_link) 2>&5
5374 ac_status=$?
5375 echo "$as_me:5375: \$? = $ac_status" >&5
5376 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5377 { (eval echo "$as_me:5377: \"$ac_try\"") >&5
5378 (eval $ac_try) 2>&5
5379 ac_status=$?
5380 echo "$as_me:5380: \$? = $ac_status" >&5
5381 (exit "$ac_status"); }; }; then
5382 cf_have_ncuconfig=yes
5383 else
5384 echo "$as_me: program exited with status $ac_status" >&5
5385 echo "$as_me: failed program was:" >&5
5386 cat "conftest.$ac_ext" >&5
5387 cf_have_ncuconfig=no
5388 fi
5389 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5390 fi
5391 else
5392 echo "$as_me: failed program was:" >&5
5393 cat "conftest.$ac_ext" >&5
5394 cf_have_ncuconfig=no
5395 fi
5396 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5397 echo "$as_me:5397: result: $cf_have_ncuconfig" >&5
5398 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5399 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
5400 if test "$cf_have_ncuconfig" != "yes"
5401 then
5402 CPPFLAGS="$cf_save_CPPFLAGS"
5403 LIBS="$cf_save_LIBS"
5404 NCURSES_CONFIG_PKG=none
5405 else
5406
5407 cat >>confdefs.h <<\EOF
5408 #define NCURSES 1
5409 EOF
5410
5411 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5412
5413 echo "$as_me:5413: checking for terminfo header" >&5
5414 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5415 if test "${cf_cv_term_header+set}" = set; then
5416 echo $ECHO_N "(cached) $ECHO_C" >&6
5417 else
5418
5419 case "${cf_cv_ncurses_header}" in
5420 (*/ncurses.h|*/ncursesw.h)
5421 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5422 ;;
5423 (*)
5424 cf_term_header=term.h
5425 ;;
5426 esac
5427
5428 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5429 do
5430 cat >"conftest.$ac_ext" <<_ACEOF
5431 #line 5431 "configure"
5432 #include "confdefs.h"
5433 #include <stdio.h>
5434 #include <${cf_cv_ncurses_header:-curses.h}>
5435 #include <$cf_test>
5436
5437 int
5438 main (void)
5439 {
5440 int x = auto_left_margin; (void)x
5441 ;
5442 return 0;
5443 }
5444 _ACEOF
5445 rm -f "conftest.$ac_objext"
5446 if { (eval echo "$as_me:5446: \"$ac_compile\"") >&5
5447 (eval $ac_compile) 2>&5
5448 ac_status=$?
5449 echo "$as_me:5449: \$? = $ac_status" >&5
5450 (exit "$ac_status"); } &&
5451 { ac_try='test -s "conftest.$ac_objext"'
5452 { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453 (eval $ac_try) 2>&5
5454 ac_status=$?
5455 echo "$as_me:5455: \$? = $ac_status" >&5
5456 (exit "$ac_status"); }; }; then
5457
5458 cf_cv_term_header="$cf_test"
5459 else
5460 echo "$as_me: failed program was:" >&5
5461 cat "conftest.$ac_ext" >&5
5462
5463 cf_cv_term_header=unknown
5464
5465 fi
5466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5467 test "$cf_cv_term_header" != unknown && break
5468 done
5469
5470 fi
5471 echo "$as_me:5471: result: $cf_cv_term_header" >&5
5472 echo "${ECHO_T}$cf_cv_term_header" >&6
5473
5474 # Set definitions to allow ifdef'ing to accommodate subdirectories
5475
5476 case "$cf_cv_term_header" in
5477 (*term.h)
5478
5479 cat >>confdefs.h <<\EOF
5480 #define HAVE_TERM_H 1
5481 EOF
5482
5483 ;;
5484 esac
5485
5486 case "$cf_cv_term_header" in
5487 (ncurses/term.h)
5488
5489 cat >>confdefs.h <<\EOF
5490 #define HAVE_NCURSES_TERM_H 1
5491 EOF
5492
5493 ;;
5494 (ncursesw/term.h)
5495
5496 cat >>confdefs.h <<\EOF
5497 #define HAVE_NCURSESW_TERM_H 1
5498 EOF
5499
5500 ;;
5501 esac
5502
5503 fi
5504
5505 else
5506 echo "$as_me:5506: result: no" >&5
5507 echo "${ECHO_T}no" >&6
5508 NCURSES_CONFIG_PKG=none
5509 fi
5510 else
5511 NCURSES_CONFIG_PKG=none
5512 fi
5513
5514 if test "x$cf_have_ncuconfig" = "xno"; then
5515 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5516
5517 if test -n "$ac_tool_prefix"; then
5518 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5519 do
5520 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5521 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5522 echo "$as_me:5522: checking for $ac_word" >&5
5523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5524 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5525 echo $ECHO_N "(cached) $ECHO_C" >&6
5526 else
5527 if test -n "$NCURSES_CONFIG"; then
5528 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5529 else
5530 ac_save_IFS=$IFS; IFS=$ac_path_separator
5531 ac_dummy="$PATH"
5532 for ac_dir in $ac_dummy; do
5533 IFS=$ac_save_IFS
5534 test -z "$ac_dir" && ac_dir=.
5535 $as_executable_p "$ac_dir/$ac_word" || continue
5536 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5537 echo "$as_me:5537: found $ac_dir/$ac_word" >&5
5538 break
5539 done
5540
5541 fi
5542 fi
5543 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5544 if test -n "$NCURSES_CONFIG"; then
5545 echo "$as_me:5545: result: $NCURSES_CONFIG" >&5
5546 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5547 else
5548 echo "$as_me:5548: result: no" >&5
5549 echo "${ECHO_T}no" >&6
5550 fi
5551
5552 test -n "$NCURSES_CONFIG" && break
5553 done
5554 fi
5555 if test -z "$NCURSES_CONFIG"; then
5556 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5557 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5558 do
5559 # Extract the first word of "$ac_prog", so it can be a program name with args.
5560 set dummy $ac_prog; ac_word=$2
5561 echo "$as_me:5561: checking for $ac_word" >&5
5562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5563 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5564 echo $ECHO_N "(cached) $ECHO_C" >&6
5565 else
5566 if test -n "$ac_ct_NCURSES_CONFIG"; then
5567 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5568 else
5569 ac_save_IFS=$IFS; IFS=$ac_path_separator
5570 ac_dummy="$PATH"
5571 for ac_dir in $ac_dummy; do
5572 IFS=$ac_save_IFS
5573 test -z "$ac_dir" && ac_dir=.
5574 $as_executable_p "$ac_dir/$ac_word" || continue
5575 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5576 echo "$as_me:5576: found $ac_dir/$ac_word" >&5
5577 break
5578 done
5579
5580 fi
5581 fi
5582 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5583 if test -n "$ac_ct_NCURSES_CONFIG"; then
5584 echo "$as_me:5584: result: $ac_ct_NCURSES_CONFIG" >&5
5585 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5586 else
5587 echo "$as_me:5587: result: no" >&5
5588 echo "${ECHO_T}no" >&6
5589 fi
5590
5591 test -n "$ac_ct_NCURSES_CONFIG" && break
5592 done
5593 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5594
5595 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5596 fi
5597
5598 if test "$NCURSES_CONFIG" != none ; then
5599
5600 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5601 do
5602 case "x$cf_add_cflags" in
5603 (x-[DU]*)
5604
5605 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5606 while true
5607 do
5608 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'`
5609 test "$CFLAGS" != "$cf_old_cflag" || break
5610
5611 CFLAGS="$cf_old_cflag"
5612 done
5613
5614 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5615 while true
5616 do
5617 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'`
5618 test "$CPPFLAGS" != "$cf_old_cflag" || break
5619
5620 CPPFLAGS="$cf_old_cflag"
5621 done
5622
5623 ;;
5624 esac
5625
5626 cf_fix_cppflags=no
5627 cf_new_cflags=
5628 cf_new_cppflags=
5629 cf_new_extra_cppflags=
5630
5631 for cf_add_cflags in $cf_add_cflags
5632 do
5633 case "$cf_fix_cppflags" in
5634 (no)
5635 case "$cf_add_cflags" in
5636 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5637 case "$cf_add_cflags" in
5638 (-D*)
5639 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5640
5641 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5642 && test -z "${cf_tst_cflags}" \
5643 && cf_fix_cppflags=yes
5644
5645 if test "$cf_fix_cppflags" = yes ; then
5646
5647 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5648 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5649
5650 continue
5651 elif test "${cf_tst_cflags}" = "\"'" ; then
5652
5653 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5654 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5655
5656 continue
5657 fi
5658 ;;
5659 esac
5660 case "$CPPFLAGS" in
5661 (*$cf_add_cflags)
5662 ;;
5663 (*)
5664 case "$cf_add_cflags" in
5665 (-D*)
5666 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5667
5668 CPPFLAGS=`echo "$CPPFLAGS" | \
5669 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5670 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5671
5672 ;;
5673 esac
5674
5675 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5676 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5677
5678 ;;
5679 esac
5680 ;;
5681 (*)
5682
5683 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5684 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5685
5686 ;;
5687 esac
5688 ;;
5689 (yes)
5690
5691 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5692 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5693
5694 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5695
5696 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5697 && test -z "${cf_tst_cflags}" \
5698 && cf_fix_cppflags=no
5699 ;;
5700 esac
5701 done
5702
5703 if test -n "$cf_new_cflags" ; then
5704
5705 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5706 CFLAGS="${CFLAGS}$cf_new_cflags"
5707
5708 fi
5709
5710 if test -n "$cf_new_cppflags" ; then
5711
5712 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5713 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5714
5715 fi
5716
5717 if test -n "$cf_new_extra_cppflags" ; then
5718
5719 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5720 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5721
5722 fi
5723
5724 done
5725
5726 cf_add_libs="$LIBS"
5727 # reverse order
5728 cf_add_0lib=
5729 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5730 # filter duplicates
5731 for cf_add_1lib in $cf_add_0lib; do
5732 for cf_add_2lib in $cf_add_libs; do
5733 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5734 cf_add_1lib=
5735 break
5736 fi
5737 done
5738 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5739 done
5740 LIBS="$cf_add_libs"
5741
5742 # even with config script, some packages use no-override for curses.h
5743
5744 echo "$as_me:5744: checking if we have identified curses headers" >&5
5745 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5746 if test "${cf_cv_ncurses_header+set}" = set; then
5747 echo $ECHO_N "(cached) $ECHO_C" >&6
5748 else
5749
5750 cf_cv_ncurses_header=none
5751 for cf_header in \
5752 ncurses.h ncurses/ncurses.h \
5753 curses.h ncurses/curses.h
5754 do
5755 cat >"conftest.$ac_ext" <<_ACEOF
5756 #line 5756 "configure"
5757 #include "confdefs.h"
5758 #include <${cf_header}>
5759 int
5760 main (void)
5761 {
5762 initscr(); endwin()
5763 ;
5764 return 0;
5765 }
5766 _ACEOF
5767 rm -f "conftest.$ac_objext"
5768 if { (eval echo "$as_me:5768: \"$ac_compile\"") >&5
5769 (eval $ac_compile) 2>&5
5770 ac_status=$?
5771 echo "$as_me:5771: \$? = $ac_status" >&5
5772 (exit "$ac_status"); } &&
5773 { ac_try='test -s "conftest.$ac_objext"'
5774 { (eval echo "$as_me:5774: \"$ac_try\"") >&5
5775 (eval $ac_try) 2>&5
5776 ac_status=$?
5777 echo "$as_me:5777: \$? = $ac_status" >&5
5778 (exit "$ac_status"); }; }; then
5779 cf_cv_ncurses_header=$cf_header; break
5780 else
5781 echo "$as_me: failed program was:" >&5
5782 cat "conftest.$ac_ext" >&5
5783 fi
5784 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5785 done
5786
5787 fi
5788 echo "$as_me:5788: result: $cf_cv_ncurses_header" >&5
5789 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5790
5791 if test "$cf_cv_ncurses_header" = none ; then
5792 { { echo "$as_me:5792: error: No curses header-files found" >&5
5793 echo "$as_me: error: No curses header-files found" >&2;}
5794 { (exit 1); exit 1; }; }
5795 fi
5796
5797 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5798
5799 for ac_header in $cf_cv_ncurses_header
5800 do
5801 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5802 echo "$as_me:5802: checking for $ac_header" >&5
5803 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5804 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5805 echo $ECHO_N "(cached) $ECHO_C" >&6
5806 else
5807 cat >"conftest.$ac_ext" <<_ACEOF
5808 #line 5808 "configure"
5809 #include "confdefs.h"
5810 #include <$ac_header>
5811 _ACEOF
5812 if { (eval echo "$as_me:5812: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5813 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5814 ac_status=$?
5815 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5816 rm -f conftest.er1
5817 cat conftest.err >&5
5818 echo "$as_me:5818: \$? = $ac_status" >&5
5819 (exit "$ac_status"); } >/dev/null; then
5820 if test -s conftest.err; then
5821 ac_cpp_err=$ac_c_preproc_warn_flag
5822 else
5823 ac_cpp_err=
5824 fi
5825 else
5826 ac_cpp_err=yes
5827 fi
5828 if test -z "$ac_cpp_err"; then
5829 eval "$as_ac_Header=yes"
5830 else
5831 echo "$as_me: failed program was:" >&5
5832 cat "conftest.$ac_ext" >&5
5833 eval "$as_ac_Header=no"
5834 fi
5835 rm -f conftest.err "conftest.$ac_ext"
5836 fi
5837 echo "$as_me:5837: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5838 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5839 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5840 cat >>confdefs.h <<EOF
5841 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5842 EOF
5843
5844 fi
5845 done
5846
5847 cat >>confdefs.h <<\EOF
5848 #define NCURSES 1
5849 EOF
5850
5851 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5852
5853 cat >>confdefs.h <<EOF
5854 #define $cf_nculib_ROOT 1
5855 EOF
5856
5857 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5858
5859 else
5860
5861 cf_ncuhdr_root=ncurses
5862
5863 test -n "$cf_cv_curses_dir" && \
5864 test "$cf_cv_curses_dir" != "no" && { \
5865
5866 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5867 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5868 do
5869 while test "$cf_add_incdir" != /usr/include
5870 do
5871 if test -d "$cf_add_incdir"
5872 then
5873 cf_have_incdir=no
5874 if test -n "$CFLAGS$CPPFLAGS" ; then
5875 # a loop is needed to ensure we can add subdirs of existing dirs
5876 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5877 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5878 cf_have_incdir=yes; break
5879 fi
5880 done
5881 fi
5882
5883 if test "$cf_have_incdir" = no ; then
5884 if test "$cf_add_incdir" = /usr/local/include ; then
5885 if test "$GCC" = yes
5886 then
5887 cf_save_CPPFLAGS=$CPPFLAGS
5888
5889 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5890 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5891
5892 cat >"conftest.$ac_ext" <<_ACEOF
5893 #line 5893 "configure"
5894 #include "confdefs.h"
5895 #include <stdio.h>
5896 int
5897 main (void)
5898 {
5899 printf("Hello")
5900 ;
5901 return 0;
5902 }
5903 _ACEOF
5904 rm -f "conftest.$ac_objext"
5905 if { (eval echo "$as_me:5905: \"$ac_compile\"") >&5
5906 (eval $ac_compile) 2>&5
5907 ac_status=$?
5908 echo "$as_me:5908: \$? = $ac_status" >&5
5909 (exit "$ac_status"); } &&
5910 { ac_try='test -s "conftest.$ac_objext"'
5911 { (eval echo "$as_me:5911: \"$ac_try\"") >&5
5912 (eval $ac_try) 2>&5
5913 ac_status=$?
5914 echo "$as_me:5914: \$? = $ac_status" >&5
5915 (exit "$ac_status"); }; }; then
5916 :
5917 else
5918 echo "$as_me: failed program was:" >&5
5919 cat "conftest.$ac_ext" >&5
5920 cf_have_incdir=yes
5921 fi
5922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5923 CPPFLAGS=$cf_save_CPPFLAGS
5924 fi
5925 fi
5926 fi
5927
5928 if test "$cf_have_incdir" = no ; then
5929 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5930
5931 echo "${as_me:-configure}:5931: testing adding $cf_add_incdir to include-path ..." 1>&5
5932
5933 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5934
5935 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5936 test "$cf_top_incdir" = "$cf_add_incdir" && break
5937 cf_add_incdir="$cf_top_incdir"
5938 else
5939 break
5940 fi
5941 else
5942 break
5943 fi
5944 done
5945 done
5946 fi
5947
5948 }
5949
5950 echo "$as_me:5950: checking for $cf_ncuhdr_root header in include-path" >&5
5951 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5952 if test "${cf_cv_ncurses_h+set}" = set; then
5953 echo $ECHO_N "(cached) $ECHO_C" >&6
5954 else
5955
5956 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5957 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5958 for cf_header in $cf_header_list
5959 do
5960
5961 cat >"conftest.$ac_ext" <<_ACEOF
5962 #line 5962 "configure"
5963 #include "confdefs.h"
5964
5965 #include <$cf_header>
5966 int
5967 main (void)
5968 {
5969
5970 #ifdef NCURSES_VERSION
5971
5972 printf("%s\\n", NCURSES_VERSION);
5973 #else
5974 #ifdef __NCURSES_H
5975 printf("old\\n");
5976 #else
5977 #error __NCURSES_H is not defined
5978 #endif
5979 #endif
5980
5981 ;
5982 return 0;
5983 }
5984 _ACEOF
5985 rm -f "conftest.$ac_objext"
5986 if { (eval echo "$as_me:5986: \"$ac_compile\"") >&5
5987 (eval $ac_compile) 2>&5
5988 ac_status=$?
5989 echo "$as_me:5989: \$? = $ac_status" >&5
5990 (exit "$ac_status"); } &&
5991 { ac_try='test -s "conftest.$ac_objext"'
5992 { (eval echo "$as_me:5992: \"$ac_try\"") >&5
5993 (eval $ac_try) 2>&5
5994 ac_status=$?
5995 echo "$as_me:5995: \$? = $ac_status" >&5
5996 (exit "$ac_status"); }; }; then
5997 cf_cv_ncurses_h=$cf_header
5998
5999 else
6000 echo "$as_me: failed program was:" >&5
6001 cat "conftest.$ac_ext" >&5
6002 cf_cv_ncurses_h=no
6003 fi
6004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6005
6006 test "$cf_cv_ncurses_h" != no && break
6007 done
6008
6009 fi
6010 echo "$as_me:6010: result: $cf_cv_ncurses_h" >&5
6011 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6012
6013 if test "$cf_cv_ncurses_h" != no ; then
6014 cf_cv_ncurses_header=$cf_cv_ncurses_h
6015 else
6016
6017 echo "$as_me:6017: checking for $cf_ncuhdr_root include-path" >&5
6018 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6019 if test "${cf_cv_ncurses_h2+set}" = set; then
6020 echo $ECHO_N "(cached) $ECHO_C" >&6
6021 else
6022
6023 test -n "$verbose" && echo
6024
6025 cf_search=
6026
6027 # collect the current set of include-directories from compiler flags
6028 cf_header_path_list=""
6029 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6030 for cf_header_path in $CPPFLAGS $CFLAGS
6031 do
6032 case "$cf_header_path" in
6033 (-I*)
6034 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6035
6036 test "x$cf_header_path" != "xNONE" && \
6037 test -d "$cf_header_path" && \
6038 {
6039 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6040 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6041 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6042 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6043 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6044 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"
6045 }
6046
6047 cf_header_path_list="$cf_header_path_list $cf_search"
6048 ;;
6049 esac
6050 done
6051 fi
6052
6053 # add the variations for the package we are looking for
6054
6055 cf_search=
6056
6057 test "x$prefix" != "xNONE" && \
6058 test -d "$prefix" && \
6059 {
6060 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6061 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6062 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6063 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6064 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6065 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6066 }
6067
6068 for cf_subdir_prefix in \
6069 /usr \
6070 /usr/local \
6071 /usr/pkg \
6072 /opt \
6073 /opt/local \
6074 $HOME
6075 do
6076
6077 test "x$cf_subdir_prefix" != "x$prefix" && \
6078 test -d "$cf_subdir_prefix" && \
6079 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6080 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6081 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6082 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6083 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6084 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6085 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"
6086 }
6087
6088 done
6089
6090 test "$includedir" != NONE && \
6091 test "$includedir" != "/usr/include" && \
6092 test -d "$includedir" && {
6093 test -d "$includedir" && cf_search="$cf_search $includedir"
6094 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6095 }
6096
6097 test "$oldincludedir" != NONE && \
6098 test "$oldincludedir" != "/usr/include" && \
6099 test -d "$oldincludedir" && {
6100 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6101 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6102 }
6103
6104 cf_search="$cf_search $cf_header_path_list"
6105
6106 test -n "$verbose" && echo "search path $cf_search"
6107 cf_save2_CPPFLAGS="$CPPFLAGS"
6108 for cf_incdir in $cf_search
6109 do
6110
6111 if test -n "$cf_incdir" ; then
6112 for cf_add_incdir in $cf_incdir
6113 do
6114 while test "$cf_add_incdir" != /usr/include
6115 do
6116 if test -d "$cf_add_incdir"
6117 then
6118 cf_have_incdir=no
6119 if test -n "$CFLAGS$CPPFLAGS" ; then
6120 # a loop is needed to ensure we can add subdirs of existing dirs
6121 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6122 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6123 cf_have_incdir=yes; break
6124 fi
6125 done
6126 fi
6127
6128 if test "$cf_have_incdir" = no ; then
6129 if test "$cf_add_incdir" = /usr/local/include ; then
6130 if test "$GCC" = yes
6131 then
6132 cf_save_CPPFLAGS=$CPPFLAGS
6133
6134 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6135 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6136
6137 cat >"conftest.$ac_ext" <<_ACEOF
6138 #line 6138 "configure"
6139 #include "confdefs.h"
6140 #include <stdio.h>
6141 int
6142 main (void)
6143 {
6144 printf("Hello")
6145 ;
6146 return 0;
6147 }
6148 _ACEOF
6149 rm -f "conftest.$ac_objext"
6150 if { (eval echo "$as_me:6150: \"$ac_compile\"") >&5
6151 (eval $ac_compile) 2>&5
6152 ac_status=$?
6153 echo "$as_me:6153: \$? = $ac_status" >&5
6154 (exit "$ac_status"); } &&
6155 { ac_try='test -s "conftest.$ac_objext"'
6156 { (eval echo "$as_me:6156: \"$ac_try\"") >&5
6157 (eval $ac_try) 2>&5
6158 ac_status=$?
6159 echo "$as_me:6159: \$? = $ac_status" >&5
6160 (exit "$ac_status"); }; }; then
6161 :
6162 else
6163 echo "$as_me: failed program was:" >&5
6164 cat "conftest.$ac_ext" >&5
6165 cf_have_incdir=yes
6166 fi
6167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6168 CPPFLAGS=$cf_save_CPPFLAGS
6169 fi
6170 fi
6171 fi
6172
6173 if test "$cf_have_incdir" = no ; then
6174 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6175
6176 echo "${as_me:-configure}:6176: testing adding $cf_add_incdir to include-path ..." 1>&5
6177
6178 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6179
6180 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6181 test "$cf_top_incdir" = "$cf_add_incdir" && break
6182 cf_add_incdir="$cf_top_incdir"
6183 else
6184 break
6185 fi
6186 else
6187 break
6188 fi
6189 done
6190 done
6191 fi
6192
6193 for cf_header in \
6194 ncurses.h \
6195 curses.h
6196 do
6197
6198 cat >"conftest.$ac_ext" <<_ACEOF
6199 #line 6199 "configure"
6200 #include "confdefs.h"
6201
6202 #include <$cf_header>
6203 int
6204 main (void)
6205 {
6206
6207 #ifdef NCURSES_VERSION
6208
6209 printf("%s\\n", NCURSES_VERSION);
6210 #else
6211 #ifdef __NCURSES_H
6212 printf("old\\n");
6213 #else
6214 #error __NCURSES_H is not defined
6215 #endif
6216 #endif
6217
6218 ;
6219 return 0;
6220 }
6221 _ACEOF
6222 rm -f "conftest.$ac_objext"
6223 if { (eval echo "$as_me:6223: \"$ac_compile\"") >&5
6224 (eval $ac_compile) 2>&5
6225 ac_status=$?
6226 echo "$as_me:6226: \$? = $ac_status" >&5
6227 (exit "$ac_status"); } &&
6228 { ac_try='test -s "conftest.$ac_objext"'
6229 { (eval echo "$as_me:6229: \"$ac_try\"") >&5
6230 (eval $ac_try) 2>&5
6231 ac_status=$?
6232 echo "$as_me:6232: \$? = $ac_status" >&5
6233 (exit "$ac_status"); }; }; then
6234 cf_cv_ncurses_h2=$cf_header
6235
6236 else
6237 echo "$as_me: failed program was:" >&5
6238 cat "conftest.$ac_ext" >&5
6239 cf_cv_ncurses_h2=no
6240 fi
6241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6242
6243 if test "$cf_cv_ncurses_h2" != no ; then
6244 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6245 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
6246 break
6247 fi
6248 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6249 done
6250 CPPFLAGS="$cf_save2_CPPFLAGS"
6251 test "$cf_cv_ncurses_h2" != no && break
6252 done
6253 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6253: error: not found" >&5
6254 echo "$as_me: error: not found" >&2;}
6255 { (exit 1); exit 1; }; }
6256
6257 fi
6258 echo "$as_me:6258: result: $cf_cv_ncurses_h2" >&5
6259 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6260
6261 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
6262 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
6263 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
6264 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
6265 fi
6266
6267 if test -n "$cf_1st_incdir" ; then
6268 for cf_add_incdir in $cf_1st_incdir
6269 do
6270 while test "$cf_add_incdir" != /usr/include
6271 do
6272 if test -d "$cf_add_incdir"
6273 then
6274 cf_have_incdir=no
6275 if test -n "$CFLAGS$CPPFLAGS" ; then
6276 # a loop is needed to ensure we can add subdirs of existing dirs
6277 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6278 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6279 cf_have_incdir=yes; break
6280 fi
6281 done
6282 fi
6283
6284 if test "$cf_have_incdir" = no ; then
6285 if test "$cf_add_incdir" = /usr/local/include ; then
6286 if test "$GCC" = yes
6287 then
6288 cf_save_CPPFLAGS=$CPPFLAGS
6289
6290 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6291 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6292
6293 cat >"conftest.$ac_ext" <<_ACEOF
6294 #line 6294 "configure"
6295 #include "confdefs.h"
6296 #include <stdio.h>
6297 int
6298 main (void)
6299 {
6300 printf("Hello")
6301 ;
6302 return 0;
6303 }
6304 _ACEOF
6305 rm -f "conftest.$ac_objext"
6306 if { (eval echo "$as_me:6306: \"$ac_compile\"") >&5
6307 (eval $ac_compile) 2>&5
6308 ac_status=$?
6309 echo "$as_me:6309: \$? = $ac_status" >&5
6310 (exit "$ac_status"); } &&
6311 { ac_try='test -s "conftest.$ac_objext"'
6312 { (eval echo "$as_me:6312: \"$ac_try\"") >&5
6313 (eval $ac_try) 2>&5
6314 ac_status=$?
6315 echo "$as_me:6315: \$? = $ac_status" >&5
6316 (exit "$ac_status"); }; }; then
6317 :
6318 else
6319 echo "$as_me: failed program was:" >&5
6320 cat "conftest.$ac_ext" >&5
6321 cf_have_incdir=yes
6322 fi
6323 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6324 CPPFLAGS=$cf_save_CPPFLAGS
6325 fi
6326 fi
6327 fi
6328
6329 if test "$cf_have_incdir" = no ; then
6330 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6331
6332 echo "${as_me:-configure}:6332: testing adding $cf_add_incdir to include-path ..." 1>&5
6333
6334 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6335
6336 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6337 test "$cf_top_incdir" = "$cf_add_incdir" && break
6338 cf_add_incdir="$cf_top_incdir"
6339 else
6340 break
6341 fi
6342 else
6343 break
6344 fi
6345 done
6346 done
6347 fi
6348
6349 fi
6350
6351 # Set definitions to allow ifdef'ing for ncurses.h
6352
6353 case "$cf_cv_ncurses_header" in
6354 (*ncurses.h)
6355
6356 cat >>confdefs.h <<\EOF
6357 #define HAVE_NCURSES_H 1
6358 EOF
6359
6360 ;;
6361 esac
6362
6363 case "$cf_cv_ncurses_header" in
6364 (ncurses/curses.h|ncurses/ncurses.h)
6365
6366 cat >>confdefs.h <<\EOF
6367 #define HAVE_NCURSES_NCURSES_H 1
6368 EOF
6369
6370 ;;
6371 (ncursesw/curses.h|ncursesw/ncurses.h)
6372
6373 cat >>confdefs.h <<\EOF
6374 #define HAVE_NCURSESW_NCURSES_H 1
6375 EOF
6376
6377 ;;
6378 esac
6379
6380 echo "$as_me:6380: checking for terminfo header" >&5
6381 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6382 if test "${cf_cv_term_header+set}" = set; then
6383 echo $ECHO_N "(cached) $ECHO_C" >&6
6384 else
6385
6386 case "${cf_cv_ncurses_header}" in
6387 (*/ncurses.h|*/ncursesw.h)
6388 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6389 ;;
6390 (*)
6391 cf_term_header=term.h
6392 ;;
6393 esac
6394
6395 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6396 do
6397 cat >"conftest.$ac_ext" <<_ACEOF
6398 #line 6398 "configure"
6399 #include "confdefs.h"
6400 #include <stdio.h>
6401 #include <${cf_cv_ncurses_header:-curses.h}>
6402 #include <$cf_test>
6403
6404 int
6405 main (void)
6406 {
6407 int x = auto_left_margin; (void)x
6408 ;
6409 return 0;
6410 }
6411 _ACEOF
6412 rm -f "conftest.$ac_objext"
6413 if { (eval echo "$as_me:6413: \"$ac_compile\"") >&5
6414 (eval $ac_compile) 2>&5
6415 ac_status=$?
6416 echo "$as_me:6416: \$? = $ac_status" >&5
6417 (exit "$ac_status"); } &&
6418 { ac_try='test -s "conftest.$ac_objext"'
6419 { (eval echo "$as_me:6419: \"$ac_try\"") >&5
6420 (eval $ac_try) 2>&5
6421 ac_status=$?
6422 echo "$as_me:6422: \$? = $ac_status" >&5
6423 (exit "$ac_status"); }; }; then
6424
6425 cf_cv_term_header="$cf_test"
6426 else
6427 echo "$as_me: failed program was:" >&5
6428 cat "conftest.$ac_ext" >&5
6429
6430 cf_cv_term_header=unknown
6431
6432 fi
6433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6434 test "$cf_cv_term_header" != unknown && break
6435 done
6436
6437 fi
6438 echo "$as_me:6438: result: $cf_cv_term_header" >&5
6439 echo "${ECHO_T}$cf_cv_term_header" >&6
6440
6441 # Set definitions to allow ifdef'ing to accommodate subdirectories
6442
6443 case "$cf_cv_term_header" in
6444 (*term.h)
6445
6446 cat >>confdefs.h <<\EOF
6447 #define HAVE_TERM_H 1
6448 EOF
6449
6450 ;;
6451 esac
6452
6453 case "$cf_cv_term_header" in
6454 (ncurses/term.h)
6455
6456 cat >>confdefs.h <<\EOF
6457 #define HAVE_NCURSES_TERM_H 1
6458 EOF
6459
6460 ;;
6461 (ncursesw/term.h)
6462
6463 cat >>confdefs.h <<\EOF
6464 #define HAVE_NCURSESW_TERM_H 1
6465 EOF
6466
6467 ;;
6468 esac
6469
6470 # some applications need this, but should check for NCURSES_VERSION
6471
6472 cat >>confdefs.h <<\EOF
6473 #define NCURSES 1
6474 EOF
6475
6476 echo "$as_me:6476: checking for ncurses version" >&5
6477 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6478 if test "${cf_cv_ncurses_version+set}" = set; then
6479 echo $ECHO_N "(cached) $ECHO_C" >&6
6480 else
6481
6482 cf_cv_ncurses_version=no
6483 cf_tempfile=out$$
6484 rm -f "$cf_tempfile"
6485 if test "$cross_compiling" = yes; then
6486
6487 # This will not work if the preprocessor splits the line after the
6488 # Autoconf token. The 'unproto' program does that.
6489 cat > "conftest.$ac_ext" <<EOF
6490 #include <${cf_cv_ncurses_header:-curses.h}>
6491 #undef Autoconf
6492 #ifdef NCURSES_VERSION
6493 Autoconf NCURSES_VERSION
6494 #else
6495 #ifdef __NCURSES_H
6496 Autoconf "old"
6497 #endif
6498 ;
6499 #endif
6500 EOF
6501 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6502 { (eval echo "$as_me:6502: \"$cf_try\"") >&5
6503 (eval $cf_try) 2>&5
6504 ac_status=$?
6505 echo "$as_me:6505: \$? = $ac_status" >&5
6506 (exit "$ac_status"); }
6507 if test -f conftest.out ; then
6508 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6509 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6510 rm -f conftest.out
6511 fi
6512
6513 else
6514 cat >"conftest.$ac_ext" <<_ACEOF
6515 #line 6515 "configure"
6516 #include "confdefs.h"
6517
6518 $ac_includes_default
6519
6520 #include <${cf_cv_ncurses_header:-curses.h}>
6521
6522 int main(void)
6523 {
6524 FILE *fp = fopen("$cf_tempfile", "w");
6525 #ifdef NCURSES_VERSION
6526 # ifdef NCURSES_VERSION_PATCH
6527 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6528 # else
6529 fprintf(fp, "%s\\n", NCURSES_VERSION);
6530 # endif
6531 #else
6532 # ifdef __NCURSES_H
6533 fprintf(fp, "old\\n");
6534 # else
6535 #error expected ncurses header to define __NCURSES_H
6536 # endif
6537 #endif
6538 ${cf_cv_main_return:-return}(0);
6539 }
6540 _ACEOF
6541 rm -f "conftest$ac_exeext"
6542 if { (eval echo "$as_me:6542: \"$ac_link\"") >&5
6543 (eval $ac_link) 2>&5
6544 ac_status=$?
6545 echo "$as_me:6545: \$? = $ac_status" >&5
6546 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6547 { (eval echo "$as_me:6547: \"$ac_try\"") >&5
6548 (eval $ac_try) 2>&5
6549 ac_status=$?
6550 echo "$as_me:6550: \$? = $ac_status" >&5
6551 (exit "$ac_status"); }; }; then
6552
6553 cf_cv_ncurses_version=`cat $cf_tempfile`
6554 else
6555 echo "$as_me: program exited with status $ac_status" >&5
6556 echo "$as_me: failed program was:" >&5
6557 cat "conftest.$ac_ext" >&5
6558 fi
6559 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6560 fi
6561 rm -f "$cf_tempfile"
6562
6563 fi
6564 echo "$as_me:6564: result: $cf_cv_ncurses_version" >&5
6565 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6566 test "$cf_cv_ncurses_version" = no ||
6567 cat >>confdefs.h <<\EOF
6568 #define NCURSES 1
6569 EOF
6570
6571 cf_nculib_root=ncurses
6572 # This works, except for the special case where we find gpm, but
6573 # ncurses is in a nonstandard location via $LIBS, and we really want
6574 # to link gpm.
6575 cf_ncurses_LIBS=""
6576 cf_ncurses_SAVE="$LIBS"
6577 echo "$as_me:6577: checking for Gpm_Open in -lgpm" >&5
6578 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6579 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6580 echo $ECHO_N "(cached) $ECHO_C" >&6
6581 else
6582 ac_check_lib_save_LIBS=$LIBS
6583 LIBS="-lgpm $LIBS"
6584 cat >"conftest.$ac_ext" <<_ACEOF
6585 #line 6585 "configure"
6586 #include "confdefs.h"
6587
6588 /* Override any gcc2 internal prototype to avoid an error. */
6589 #ifdef __cplusplus
6590 extern "C"
6591 #endif
6592 /* We use char because int might match the return type of a gcc2
6593 builtin and then its argument prototype would still apply. */
6594 char Gpm_Open (void);
6595 int
6596 main (void)
6597 {
6598 Gpm_Open ();
6599 ;
6600 return 0;
6601 }
6602 _ACEOF
6603 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6604 if { (eval echo "$as_me:6604: \"$ac_link\"") >&5
6605 (eval $ac_link) 2>&5
6606 ac_status=$?
6607 echo "$as_me:6607: \$? = $ac_status" >&5
6608 (exit "$ac_status"); } &&
6609 { ac_try='test -s "conftest$ac_exeext"'
6610 { (eval echo "$as_me:6610: \"$ac_try\"") >&5
6611 (eval $ac_try) 2>&5
6612 ac_status=$?
6613 echo "$as_me:6613: \$? = $ac_status" >&5
6614 (exit "$ac_status"); }; }; then
6615 ac_cv_lib_gpm_Gpm_Open=yes
6616 else
6617 echo "$as_me: failed program was:" >&5
6618 cat "conftest.$ac_ext" >&5
6619 ac_cv_lib_gpm_Gpm_Open=no
6620 fi
6621 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6622 LIBS=$ac_check_lib_save_LIBS
6623 fi
6624 echo "$as_me:6624: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6625 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6626 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6627 echo "$as_me:6627: checking for initscr in -lgpm" >&5
6628 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6629 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6630 echo $ECHO_N "(cached) $ECHO_C" >&6
6631 else
6632 ac_check_lib_save_LIBS=$LIBS
6633 LIBS="-lgpm $LIBS"
6634 cat >"conftest.$ac_ext" <<_ACEOF
6635 #line 6635 "configure"
6636 #include "confdefs.h"
6637
6638 /* Override any gcc2 internal prototype to avoid an error. */
6639 #ifdef __cplusplus
6640 extern "C"
6641 #endif
6642 /* We use char because int might match the return type of a gcc2
6643 builtin and then its argument prototype would still apply. */
6644 char initscr (void);
6645 int
6646 main (void)
6647 {
6648 initscr ();
6649 ;
6650 return 0;
6651 }
6652 _ACEOF
6653 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6654 if { (eval echo "$as_me:6654: \"$ac_link\"") >&5
6655 (eval $ac_link) 2>&5
6656 ac_status=$?
6657 echo "$as_me:6657: \$? = $ac_status" >&5
6658 (exit "$ac_status"); } &&
6659 { ac_try='test -s "conftest$ac_exeext"'
6660 { (eval echo "$as_me:6660: \"$ac_try\"") >&5
6661 (eval $ac_try) 2>&5
6662 ac_status=$?
6663 echo "$as_me:6663: \$? = $ac_status" >&5
6664 (exit "$ac_status"); }; }; then
6665 ac_cv_lib_gpm_initscr=yes
6666 else
6667 echo "$as_me: failed program was:" >&5
6668 cat "conftest.$ac_ext" >&5
6669 ac_cv_lib_gpm_initscr=no
6670 fi
6671 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6672 LIBS=$ac_check_lib_save_LIBS
6673 fi
6674 echo "$as_me:6674: result: $ac_cv_lib_gpm_initscr" >&5
6675 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6676 if test "$ac_cv_lib_gpm_initscr" = yes; then
6677 LIBS="$cf_ncurses_SAVE"
6678 else
6679 cf_ncurses_LIBS="-lgpm"
6680 fi
6681
6682 fi
6683
6684 case "$host_os" in
6685 (freebsd*)
6686 # This is only necessary if you are linking against an obsolete
6687 # version of ncurses (but it should do no harm, since it is static).
6688 if test "$cf_nculib_root" = ncurses ; then
6689 echo "$as_me:6689: checking for tgoto in -lmytinfo" >&5
6690 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6691 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6692 echo $ECHO_N "(cached) $ECHO_C" >&6
6693 else
6694 ac_check_lib_save_LIBS=$LIBS
6695 LIBS="-lmytinfo $LIBS"
6696 cat >"conftest.$ac_ext" <<_ACEOF
6697 #line 6697 "configure"
6698 #include "confdefs.h"
6699
6700 /* Override any gcc2 internal prototype to avoid an error. */
6701 #ifdef __cplusplus
6702 extern "C"
6703 #endif
6704 /* We use char because int might match the return type of a gcc2
6705 builtin and then its argument prototype would still apply. */
6706 char tgoto (void);
6707 int
6708 main (void)
6709 {
6710 tgoto ();
6711 ;
6712 return 0;
6713 }
6714 _ACEOF
6715 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6716 if { (eval echo "$as_me:6716: \"$ac_link\"") >&5
6717 (eval $ac_link) 2>&5
6718 ac_status=$?
6719 echo "$as_me:6719: \$? = $ac_status" >&5
6720 (exit "$ac_status"); } &&
6721 { ac_try='test -s "conftest$ac_exeext"'
6722 { (eval echo "$as_me:6722: \"$ac_try\"") >&5
6723 (eval $ac_try) 2>&5
6724 ac_status=$?
6725 echo "$as_me:6725: \$? = $ac_status" >&5
6726 (exit "$ac_status"); }; }; then
6727 ac_cv_lib_mytinfo_tgoto=yes
6728 else
6729 echo "$as_me: failed program was:" >&5
6730 cat "conftest.$ac_ext" >&5
6731 ac_cv_lib_mytinfo_tgoto=no
6732 fi
6733 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6734 LIBS=$ac_check_lib_save_LIBS
6735 fi
6736 echo "$as_me:6736: result: $ac_cv_lib_mytinfo_tgoto" >&5
6737 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6738 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6739 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6740 fi
6741
6742 fi
6743 ;;
6744 esac
6745
6746 cf_add_libs="$LIBS"
6747 # reverse order
6748 cf_add_0lib=
6749 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6750 # filter duplicates
6751 for cf_add_1lib in $cf_add_0lib; do
6752 for cf_add_2lib in $cf_add_libs; do
6753 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6754 cf_add_1lib=
6755 break
6756 fi
6757 done
6758 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6759 done
6760 LIBS="$cf_add_libs"
6761
6762 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6763 then
6764
6765 cf_add_libs="$LIBS"
6766 # reverse order
6767 cf_add_0lib=
6768 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6769 # filter duplicates
6770 for cf_add_1lib in $cf_add_0lib; do
6771 for cf_add_2lib in $cf_add_libs; do
6772 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6773 cf_add_1lib=
6774 break
6775 fi
6776 done
6777 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6778 done
6779 LIBS="$cf_add_libs"
6780
6781 else
6782
6783 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6784 cf_libdir=""
6785 echo "$as_me:6785: checking for initscr" >&5
6786 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6787 if test "${ac_cv_func_initscr+set}" = set; then
6788 echo $ECHO_N "(cached) $ECHO_C" >&6
6789 else
6790 cat >"conftest.$ac_ext" <<_ACEOF
6791 #line 6791 "configure"
6792 #include "confdefs.h"
6793 #define initscr autoconf_temporary
6794 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6795 #undef initscr
6796
6797 #ifdef __cplusplus
6798 extern "C"
6799 #endif
6800
6801 /* We use char because int might match the return type of a gcc2
6802 builtin and then its argument prototype would still apply. */
6803 char initscr (void);
6804
6805 int
6806 main (void)
6807 {
6808
6809 /* The GNU C library defines stubs for functions which it implements
6810 to always fail with ENOSYS. Some functions are actually named
6811 something starting with __ and the normal name is an alias. */
6812 #if defined (__stub_initscr) || defined (__stub___initscr)
6813 #error found stub for initscr
6814 #endif
6815
6816 return initscr ();
6817 ;
6818 return 0;
6819 }
6820 _ACEOF
6821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6822 if { (eval echo "$as_me:6822: \"$ac_link\"") >&5
6823 (eval $ac_link) 2>&5
6824 ac_status=$?
6825 echo "$as_me:6825: \$? = $ac_status" >&5
6826 (exit "$ac_status"); } &&
6827 { ac_try='test -s "conftest$ac_exeext"'
6828 { (eval echo "$as_me:6828: \"$ac_try\"") >&5
6829 (eval $ac_try) 2>&5
6830 ac_status=$?
6831 echo "$as_me:6831: \$? = $ac_status" >&5
6832 (exit "$ac_status"); }; }; then
6833 ac_cv_func_initscr=yes
6834 else
6835 echo "$as_me: failed program was:" >&5
6836 cat "conftest.$ac_ext" >&5
6837 ac_cv_func_initscr=no
6838 fi
6839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6840 fi
6841 echo "$as_me:6841: result: $ac_cv_func_initscr" >&5
6842 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6843 if test "$ac_cv_func_initscr" = yes; then
6844 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6845 else
6846
6847 cf_save_LIBS="$LIBS"
6848 echo "$as_me:6848: checking for initscr in -l$cf_nculib_root" >&5
6849 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6850 LIBS="-l$cf_nculib_root $LIBS"
6851 cat >"conftest.$ac_ext" <<_ACEOF
6852 #line 6852 "configure"
6853 #include "confdefs.h"
6854 #include <${cf_cv_ncurses_header:-curses.h}>
6855 int
6856 main (void)
6857 {
6858 initscr()
6859 ;
6860 return 0;
6861 }
6862 _ACEOF
6863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6864 if { (eval echo "$as_me:6864: \"$ac_link\"") >&5
6865 (eval $ac_link) 2>&5
6866 ac_status=$?
6867 echo "$as_me:6867: \$? = $ac_status" >&5
6868 (exit "$ac_status"); } &&
6869 { ac_try='test -s "conftest$ac_exeext"'
6870 { (eval echo "$as_me:6870: \"$ac_try\"") >&5
6871 (eval $ac_try) 2>&5
6872 ac_status=$?
6873 echo "$as_me:6873: \$? = $ac_status" >&5
6874 (exit "$ac_status"); }; }; then
6875 echo "$as_me:6875: result: yes" >&5
6876 echo "${ECHO_T}yes" >&6
6877 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6878
6879 else
6880 echo "$as_me: failed program was:" >&5
6881 cat "conftest.$ac_ext" >&5
6882 echo "$as_me:6882: result: no" >&5
6883 echo "${ECHO_T}no" >&6
6884
6885 cf_search=
6886 cf_library_path_list=""
6887 if test -n "${LDFLAGS}${LIBS}" ; then
6888 for cf_library_path in $LDFLAGS $LIBS
6889 do
6890 case "$cf_library_path" in
6891 (-L*)
6892 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6893
6894 test "x$cf_library_path" != "xNONE" && \
6895 test -d "$cf_library_path" && \
6896 {
6897 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6898 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6899 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6900 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6901 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6902 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"
6903 }
6904
6905 cf_library_path_list="$cf_library_path_list $cf_search"
6906 ;;
6907 esac
6908 done
6909 fi
6910
6911 cf_search=
6912
6913 test "x$prefix" != "xNONE" && \
6914 test -d "$prefix" && \
6915 {
6916 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6917 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6918 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6919 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6920 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6921 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6922 }
6923
6924 for cf_subdir_prefix in \
6925 /usr \
6926 /usr/local \
6927 /usr/pkg \
6928 /opt \
6929 /opt/local \
6930 $HOME
6931 do
6932
6933 test "x$cf_subdir_prefix" != "x$prefix" && \
6934 test -d "$cf_subdir_prefix" && \
6935 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6936 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6937 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6938 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6939 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6940 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6941 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"
6942 }
6943
6944 done
6945
6946 cf_search="$cf_library_path_list $cf_search"
6947
6948 for cf_libdir in $cf_search
6949 do
6950 echo "$as_me:6950: checking for -l$cf_nculib_root in $cf_libdir" >&5
6951 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6952 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6953 cat >"conftest.$ac_ext" <<_ACEOF
6954 #line 6954 "configure"
6955 #include "confdefs.h"
6956 #include <${cf_cv_ncurses_header:-curses.h}>
6957 int
6958 main (void)
6959 {
6960 initscr()
6961 ;
6962 return 0;
6963 }
6964 _ACEOF
6965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6966 if { (eval echo "$as_me:6966: \"$ac_link\"") >&5
6967 (eval $ac_link) 2>&5
6968 ac_status=$?
6969 echo "$as_me:6969: \$? = $ac_status" >&5
6970 (exit "$ac_status"); } &&
6971 { ac_try='test -s "conftest$ac_exeext"'
6972 { (eval echo "$as_me:6972: \"$ac_try\"") >&5
6973 (eval $ac_try) 2>&5
6974 ac_status=$?
6975 echo "$as_me:6975: \$? = $ac_status" >&5
6976 (exit "$ac_status"); }; }; then
6977 echo "$as_me:6977: result: yes" >&5
6978 echo "${ECHO_T}yes" >&6
6979 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6980 break
6981 else
6982 echo "$as_me: failed program was:" >&5
6983 cat "conftest.$ac_ext" >&5
6984 echo "$as_me:6984: result: no" >&5
6985 echo "${ECHO_T}no" >&6
6986 LIBS="$cf_save_LIBS"
6987 fi
6988 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6989 done
6990
6991 fi
6992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6993
6994 fi
6995
6996 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6997
6998 if test "$cf_found_library" = no ; then
6999 { { echo "$as_me:6999: error: Cannot link $cf_nculib_root library" >&5
7000 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7001 { (exit 1); exit 1; }; }
7002 fi
7003
7004 fi
7005
7006 if test -n "$cf_ncurses_LIBS" ; then
7007 echo "$as_me:7007: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7008 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7009 cf_ncurses_SAVE="$LIBS"
7010 for p in $cf_ncurses_LIBS ; do
7011 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
7012 if test "$q" != "$LIBS" ; then
7013 LIBS="$q"
7014 fi
7015 done
7016 cat >"conftest.$ac_ext" <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7019 #include <${cf_cv_ncurses_header:-curses.h}>
7020 int
7021 main (void)
7022 {
7023 initscr(); mousemask(0,0); tigetstr((char *)0);
7024 ;
7025 return 0;
7026 }
7027 _ACEOF
7028 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7029 if { (eval echo "$as_me:7029: \"$ac_link\"") >&5
7030 (eval $ac_link) 2>&5
7031 ac_status=$?
7032 echo "$as_me:7032: \$? = $ac_status" >&5
7033 (exit "$ac_status"); } &&
7034 { ac_try='test -s "conftest$ac_exeext"'
7035 { (eval echo "$as_me:7035: \"$ac_try\"") >&5
7036 (eval $ac_try) 2>&5
7037 ac_status=$?
7038 echo "$as_me:7038: \$? = $ac_status" >&5
7039 (exit "$ac_status"); }; }; then
7040 echo "$as_me:7040: result: yes" >&5
7041 echo "${ECHO_T}yes" >&6
7042 else
7043 echo "$as_me: failed program was:" >&5
7044 cat "conftest.$ac_ext" >&5
7045 echo "$as_me:7045: result: no" >&5
7046 echo "${ECHO_T}no" >&6
7047 LIBS="$cf_ncurses_SAVE"
7048 fi
7049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7050 fi
7051
7052 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7053
7054 cat >>confdefs.h <<EOF
7055 #define $cf_nculib_ROOT 1
7056 EOF
7057
7058 fi
7059 else
7060 NCURSES_CONFIG=none
7061 fi
7062
7063 echo "$as_me:7063: checking for specified curses library type" >&5
7064 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
7065
7066 # Check whether --with-screen or --without-screen was given.
7067 if test "${with_screen+set}" = set; then
7068 withval="$with_screen"
7069 cf_cv_screen=$withval
7070 else
7071 cf_cv_screen=ncurses
7072 fi;
7073
7074 case $cf_cv_screen in
7075 (curses|curses_*)
7076
7077 echo "$as_me:7077: checking for extra include directories" >&5
7078 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
7079 if test "${cf_cv_curses_incdir+set}" = set; then
7080 echo $ECHO_N "(cached) $ECHO_C" >&6
7081 else
7082
7083 cf_cv_curses_incdir=no
7084 case "$host_os" in
7085 (hpux10.*)
7086 if test "x$cf_cv_screen" = "xcurses_colr"
7087 then
7088 test -d /usr/include/curses_colr && \
7089 cf_cv_curses_incdir="-I/usr/include/curses_colr"
7090 fi
7091 ;;
7092 (sunos3*|sunos4*)
7093 if test "x$cf_cv_screen" = "xcurses_5lib"
7094 then
7095 test -d /usr/5lib && \
7096 test -d /usr/5include && \
7097 cf_cv_curses_incdir="-I/usr/5include"
7098 fi
7099 ;;
7100 esac
7101
7102 fi
7103 echo "$as_me:7103: result: $cf_cv_curses_incdir" >&5
7104 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
7105 if test "$cf_cv_curses_incdir" != no
7106 then
7107
7108 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7109 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
7110
7111 fi
7112
7113 echo "$as_me:7113: checking if we have identified curses headers" >&5
7114 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7115 if test "${cf_cv_ncurses_header+set}" = set; then
7116 echo $ECHO_N "(cached) $ECHO_C" >&6
7117 else
7118
7119 cf_cv_ncurses_header=none
7120 for cf_header in \
7121 ncurses.h \
7122 curses.h ncurses/ncurses.h ncurses/curses.h
7123 do
7124 cat >"conftest.$ac_ext" <<_ACEOF
7125 #line 7125 "configure"
7126 #include "confdefs.h"
7127 #include <${cf_header}>
7128 int
7129 main (void)
7130 {
7131 initscr(); endwin()
7132 ;
7133 return 0;
7134 }
7135 _ACEOF
7136 rm -f "conftest.$ac_objext"
7137 if { (eval echo "$as_me:7137: \"$ac_compile\"") >&5
7138 (eval $ac_compile) 2>&5
7139 ac_status=$?
7140 echo "$as_me:7140: \$? = $ac_status" >&5
7141 (exit "$ac_status"); } &&
7142 { ac_try='test -s "conftest.$ac_objext"'
7143 { (eval echo "$as_me:7143: \"$ac_try\"") >&5
7144 (eval $ac_try) 2>&5
7145 ac_status=$?
7146 echo "$as_me:7146: \$? = $ac_status" >&5
7147 (exit "$ac_status"); }; }; then
7148 cf_cv_ncurses_header=$cf_header; break
7149 else
7150 echo "$as_me: failed program was:" >&5
7151 cat "conftest.$ac_ext" >&5
7152 fi
7153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7154 done
7155
7156 fi
7157 echo "$as_me:7157: result: $cf_cv_ncurses_header" >&5
7158 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7159
7160 if test "$cf_cv_ncurses_header" = none ; then
7161 { { echo "$as_me:7161: error: No curses header-files found" >&5
7162 echo "$as_me: error: No curses header-files found" >&2;}
7163 { (exit 1); exit 1; }; }
7164 fi
7165
7166 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7167
7168 for ac_header in $cf_cv_ncurses_header
7169 do
7170 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7171 echo "$as_me:7171: checking for $ac_header" >&5
7172 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7173 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7174 echo $ECHO_N "(cached) $ECHO_C" >&6
7175 else
7176 cat >"conftest.$ac_ext" <<_ACEOF
7177 #line 7177 "configure"
7178 #include "confdefs.h"
7179 #include <$ac_header>
7180 _ACEOF
7181 if { (eval echo "$as_me:7181: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7182 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7183 ac_status=$?
7184 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7185 rm -f conftest.er1
7186 cat conftest.err >&5
7187 echo "$as_me:7187: \$? = $ac_status" >&5
7188 (exit "$ac_status"); } >/dev/null; then
7189 if test -s conftest.err; then
7190 ac_cpp_err=$ac_c_preproc_warn_flag
7191 else
7192 ac_cpp_err=
7193 fi
7194 else
7195 ac_cpp_err=yes
7196 fi
7197 if test -z "$ac_cpp_err"; then
7198 eval "$as_ac_Header=yes"
7199 else
7200 echo "$as_me: failed program was:" >&5
7201 cat "conftest.$ac_ext" >&5
7202 eval "$as_ac_Header=no"
7203 fi
7204 rm -f conftest.err "conftest.$ac_ext"
7205 fi
7206 echo "$as_me:7206: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7207 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7208 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7209 cat >>confdefs.h <<EOF
7210 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7211 EOF
7212
7213 fi
7214 done
7215
7216 echo "$as_me:7216: checking for terminfo header" >&5
7217 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7218 if test "${cf_cv_term_header+set}" = set; then
7219 echo $ECHO_N "(cached) $ECHO_C" >&6
7220 else
7221
7222 case "${cf_cv_ncurses_header}" in
7223 (*/ncurses.h|*/ncursesw.h)
7224 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7225 ;;
7226 (*)
7227 cf_term_header=term.h
7228 ;;
7229 esac
7230
7231 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7232 do
7233 cat >"conftest.$ac_ext" <<_ACEOF
7234 #line 7234 "configure"
7235 #include "confdefs.h"
7236 #include <stdio.h>
7237 #include <${cf_cv_ncurses_header:-curses.h}>
7238 #include <$cf_test>
7239
7240 int
7241 main (void)
7242 {
7243 int x = auto_left_margin; (void)x
7244 ;
7245 return 0;
7246 }
7247 _ACEOF
7248 rm -f "conftest.$ac_objext"
7249 if { (eval echo "$as_me:7249: \"$ac_compile\"") >&5
7250 (eval $ac_compile) 2>&5
7251 ac_status=$?
7252 echo "$as_me:7252: \$? = $ac_status" >&5
7253 (exit "$ac_status"); } &&
7254 { ac_try='test -s "conftest.$ac_objext"'
7255 { (eval echo "$as_me:7255: \"$ac_try\"") >&5
7256 (eval $ac_try) 2>&5
7257 ac_status=$?
7258 echo "$as_me:7258: \$? = $ac_status" >&5
7259 (exit "$ac_status"); }; }; then
7260
7261 cf_cv_term_header="$cf_test"
7262 else
7263 echo "$as_me: failed program was:" >&5
7264 cat "conftest.$ac_ext" >&5
7265
7266 cf_cv_term_header=unknown
7267
7268 fi
7269 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7270 test "$cf_cv_term_header" != unknown && break
7271 done
7272
7273 fi
7274 echo "$as_me:7274: result: $cf_cv_term_header" >&5
7275 echo "${ECHO_T}$cf_cv_term_header" >&6
7276
7277 # Set definitions to allow ifdef'ing to accommodate subdirectories
7278
7279 case "$cf_cv_term_header" in
7280 (*term.h)
7281
7282 cat >>confdefs.h <<\EOF
7283 #define HAVE_TERM_H 1
7284 EOF
7285
7286 ;;
7287 esac
7288
7289 case "$cf_cv_term_header" in
7290 (ncurses/term.h)
7291
7292 cat >>confdefs.h <<\EOF
7293 #define HAVE_NCURSES_TERM_H 1
7294 EOF
7295
7296 ;;
7297 (ncursesw/term.h)
7298
7299 cat >>confdefs.h <<\EOF
7300 #define HAVE_NCURSESW_TERM_H 1
7301 EOF
7302
7303 ;;
7304 esac
7305
7306 echo "$as_me:7306: checking for ncurses version" >&5
7307 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7308 if test "${cf_cv_ncurses_version+set}" = set; then
7309 echo $ECHO_N "(cached) $ECHO_C" >&6
7310 else
7311
7312 cf_cv_ncurses_version=no
7313 cf_tempfile=out$$
7314 rm -f "$cf_tempfile"
7315 if test "$cross_compiling" = yes; then
7316
7317 # This will not work if the preprocessor splits the line after the
7318 # Autoconf token. The 'unproto' program does that.
7319 cat > "conftest.$ac_ext" <<EOF
7320 #include <${cf_cv_ncurses_header:-curses.h}>
7321 #undef Autoconf
7322 #ifdef NCURSES_VERSION
7323 Autoconf NCURSES_VERSION
7324 #else
7325 #ifdef __NCURSES_H
7326 Autoconf "old"
7327 #endif
7328 ;
7329 #endif
7330 EOF
7331 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7332 { (eval echo "$as_me:7332: \"$cf_try\"") >&5
7333 (eval $cf_try) 2>&5
7334 ac_status=$?
7335 echo "$as_me:7335: \$? = $ac_status" >&5
7336 (exit "$ac_status"); }
7337 if test -f conftest.out ; then
7338 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
7339 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7340 rm -f conftest.out
7341 fi
7342
7343 else
7344 cat >"conftest.$ac_ext" <<_ACEOF
7345 #line 7345 "configure"
7346 #include "confdefs.h"
7347
7348 $ac_includes_default
7349
7350 #include <${cf_cv_ncurses_header:-curses.h}>
7351
7352 int main(void)
7353 {
7354 FILE *fp = fopen("$cf_tempfile", "w");
7355 #ifdef NCURSES_VERSION
7356 # ifdef NCURSES_VERSION_PATCH
7357 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7358 # else
7359 fprintf(fp, "%s\\n", NCURSES_VERSION);
7360 # endif
7361 #else
7362 # ifdef __NCURSES_H
7363 fprintf(fp, "old\\n");
7364 # else
7365 #error expected ncurses header to define __NCURSES_H
7366 # endif
7367 #endif
7368 ${cf_cv_main_return:-return}(0);
7369 }
7370 _ACEOF
7371 rm -f "conftest$ac_exeext"
7372 if { (eval echo "$as_me:7372: \"$ac_link\"") >&5
7373 (eval $ac_link) 2>&5
7374 ac_status=$?
7375 echo "$as_me:7375: \$? = $ac_status" >&5
7376 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7377 { (eval echo "$as_me:7377: \"$ac_try\"") >&5
7378 (eval $ac_try) 2>&5
7379 ac_status=$?
7380 echo "$as_me:7380: \$? = $ac_status" >&5
7381 (exit "$ac_status"); }; }; then
7382
7383 cf_cv_ncurses_version=`cat $cf_tempfile`
7384 else
7385 echo "$as_me: program exited with status $ac_status" >&5
7386 echo "$as_me: failed program was:" >&5
7387 cat "conftest.$ac_ext" >&5
7388 fi
7389 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7390 fi
7391 rm -f "$cf_tempfile"
7392
7393 fi
7394 echo "$as_me:7394: result: $cf_cv_ncurses_version" >&5
7395 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7396 test "$cf_cv_ncurses_version" = no ||
7397 cat >>confdefs.h <<\EOF
7398 #define NCURSES 1
7399 EOF
7400
7401 echo "$as_me:7401: checking if we have identified curses libraries" >&5
7402 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
7403 cat >"conftest.$ac_ext" <<_ACEOF
7404 #line 7404 "configure"
7405 #include "confdefs.h"
7406 #include <${cf_cv_ncurses_header:-curses.h}>
7407 int
7408 main (void)
7409 {
7410 initscr(); endwin()
7411 ;
7412 return 0;
7413 }
7414 _ACEOF
7415 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7416 if { (eval echo "$as_me:7416: \"$ac_link\"") >&5
7417 (eval $ac_link) 2>&5
7418 ac_status=$?
7419 echo "$as_me:7419: \$? = $ac_status" >&5
7420 (exit "$ac_status"); } &&
7421 { ac_try='test -s "conftest$ac_exeext"'
7422 { (eval echo "$as_me:7422: \"$ac_try\"") >&5
7423 (eval $ac_try) 2>&5
7424 ac_status=$?
7425 echo "$as_me:7425: \$? = $ac_status" >&5
7426 (exit "$ac_status"); }; }; then
7427 cf_result=yes
7428 else
7429 echo "$as_me: failed program was:" >&5
7430 cat "conftest.$ac_ext" >&5
7431 cf_result=no
7432 fi
7433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7434 echo "$as_me:7434: result: $cf_result" >&5
7435 echo "${ECHO_T}$cf_result" >&6
7436
7437 if test "$cf_result" = no ; then
7438 case "$host_os" in
7439 (freebsd*)
7440 echo "$as_me:7440: checking for tgoto in -lmytinfo" >&5
7441 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7442 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7443 echo $ECHO_N "(cached) $ECHO_C" >&6
7444 else
7445 ac_check_lib_save_LIBS=$LIBS
7446 LIBS="-lmytinfo $LIBS"
7447 cat >"conftest.$ac_ext" <<_ACEOF
7448 #line 7448 "configure"
7449 #include "confdefs.h"
7450
7451 /* Override any gcc2 internal prototype to avoid an error. */
7452 #ifdef __cplusplus
7453 extern "C"
7454 #endif
7455 /* We use char because int might match the return type of a gcc2
7456 builtin and then its argument prototype would still apply. */
7457 char tgoto (void);
7458 int
7459 main (void)
7460 {
7461 tgoto ();
7462 ;
7463 return 0;
7464 }
7465 _ACEOF
7466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7467 if { (eval echo "$as_me:7467: \"$ac_link\"") >&5
7468 (eval $ac_link) 2>&5
7469 ac_status=$?
7470 echo "$as_me:7470: \$? = $ac_status" >&5
7471 (exit "$ac_status"); } &&
7472 { ac_try='test -s "conftest$ac_exeext"'
7473 { (eval echo "$as_me:7473: \"$ac_try\"") >&5
7474 (eval $ac_try) 2>&5
7475 ac_status=$?
7476 echo "$as_me:7476: \$? = $ac_status" >&5
7477 (exit "$ac_status"); }; }; then
7478 ac_cv_lib_mytinfo_tgoto=yes
7479 else
7480 echo "$as_me: failed program was:" >&5
7481 cat "conftest.$ac_ext" >&5
7482 ac_cv_lib_mytinfo_tgoto=no
7483 fi
7484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7485 LIBS=$ac_check_lib_save_LIBS
7486 fi
7487 echo "$as_me:7487: result: $ac_cv_lib_mytinfo_tgoto" >&5
7488 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7489 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
7490
7491 cf_add_libs="$LIBS"
7492 # reverse order
7493 cf_add_0lib=
7494 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7495 # filter duplicates
7496 for cf_add_1lib in $cf_add_0lib; do
7497 for cf_add_2lib in $cf_add_libs; do
7498 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7499 cf_add_1lib=
7500 break
7501 fi
7502 done
7503 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7504 done
7505 LIBS="$cf_add_libs"
7506
7507 fi
7508
7509 ;;
7510 (hpux10.*)
7511 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
7512 # next (1998), and xcurses "newer" (2000). There is no header file for
7513 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
7514 # term.h) for cur_colr
7515 if test "x$cf_cv_screen" = "xcurses_colr"
7516 then
7517 echo "$as_me:7517: checking for initscr in -lcur_colr" >&5
7518 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
7519 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
7520 echo $ECHO_N "(cached) $ECHO_C" >&6
7521 else
7522 ac_check_lib_save_LIBS=$LIBS
7523 LIBS="-lcur_colr $LIBS"
7524 cat >"conftest.$ac_ext" <<_ACEOF
7525 #line 7525 "configure"
7526 #include "confdefs.h"
7527
7528 /* Override any gcc2 internal prototype to avoid an error. */
7529 #ifdef __cplusplus
7530 extern "C"
7531 #endif
7532 /* We use char because int might match the return type of a gcc2
7533 builtin and then its argument prototype would still apply. */
7534 char initscr (void);
7535 int
7536 main (void)
7537 {
7538 initscr ();
7539 ;
7540 return 0;
7541 }
7542 _ACEOF
7543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7544 if { (eval echo "$as_me:7544: \"$ac_link\"") >&5
7545 (eval $ac_link) 2>&5
7546 ac_status=$?
7547 echo "$as_me:7547: \$? = $ac_status" >&5
7548 (exit "$ac_status"); } &&
7549 { ac_try='test -s "conftest$ac_exeext"'
7550 { (eval echo "$as_me:7550: \"$ac_try\"") >&5
7551 (eval $ac_try) 2>&5
7552 ac_status=$?
7553 echo "$as_me:7553: \$? = $ac_status" >&5
7554 (exit "$ac_status"); }; }; then
7555 ac_cv_lib_cur_colr_initscr=yes
7556 else
7557 echo "$as_me: failed program was:" >&5
7558 cat "conftest.$ac_ext" >&5
7559 ac_cv_lib_cur_colr_initscr=no
7560 fi
7561 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7562 LIBS=$ac_check_lib_save_LIBS
7563 fi
7564 echo "$as_me:7564: result: $ac_cv_lib_cur_colr_initscr" >&5
7565 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
7566 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
7567
7568 cf_add_libs="$LIBS"
7569 # reverse order
7570 cf_add_0lib=
7571 for cf_add_1lib in -lcur_colr; 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 ac_cv_func_initscr=yes
7585
7586 else
7587
7588 echo "$as_me:7588: checking for initscr in -lHcurses" >&5
7589 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
7590 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
7591 echo $ECHO_N "(cached) $ECHO_C" >&6
7592 else
7593 ac_check_lib_save_LIBS=$LIBS
7594 LIBS="-lHcurses $LIBS"
7595 cat >"conftest.$ac_ext" <<_ACEOF
7596 #line 7596 "configure"
7597 #include "confdefs.h"
7598
7599 /* Override any gcc2 internal prototype to avoid an error. */
7600 #ifdef __cplusplus
7601 extern "C"
7602 #endif
7603 /* We use char because int might match the return type of a gcc2
7604 builtin and then its argument prototype would still apply. */
7605 char initscr (void);
7606 int
7607 main (void)
7608 {
7609 initscr ();
7610 ;
7611 return 0;
7612 }
7613 _ACEOF
7614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7615 if { (eval echo "$as_me:7615: \"$ac_link\"") >&5
7616 (eval $ac_link) 2>&5
7617 ac_status=$?
7618 echo "$as_me:7618: \$? = $ac_status" >&5
7619 (exit "$ac_status"); } &&
7620 { ac_try='test -s "conftest$ac_exeext"'
7621 { (eval echo "$as_me:7621: \"$ac_try\"") >&5
7622 (eval $ac_try) 2>&5
7623 ac_status=$?
7624 echo "$as_me:7624: \$? = $ac_status" >&5
7625 (exit "$ac_status"); }; }; then
7626 ac_cv_lib_Hcurses_initscr=yes
7627 else
7628 echo "$as_me: failed program was:" >&5
7629 cat "conftest.$ac_ext" >&5
7630 ac_cv_lib_Hcurses_initscr=no
7631 fi
7632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7633 LIBS=$ac_check_lib_save_LIBS
7634 fi
7635 echo "$as_me:7635: result: $ac_cv_lib_Hcurses_initscr" >&5
7636 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
7637 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
7638
7639 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
7640
7641 cf_add_libs="$LIBS"
7642 # reverse order
7643 cf_add_0lib=
7644 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7645 # filter duplicates
7646 for cf_add_1lib in $cf_add_0lib; do
7647 for cf_add_2lib in $cf_add_libs; do
7648 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7649 cf_add_1lib=
7650 break
7651 fi
7652 done
7653 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7654 done
7655 LIBS="$cf_add_libs"
7656
7657 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7658 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
7659
7660 ac_cv_func_initscr=yes
7661
7662 fi
7663
7664 fi
7665
7666 fi
7667 ;;
7668 (linux*)
7669 case `arch 2>/dev/null` in
7670 (x86_64)
7671 if test -d /lib64
7672 then
7673
7674 if test -n "/lib64" ; then
7675 for cf_add_libdir in /lib64
7676 do
7677 if test "$cf_add_libdir" = /usr/lib ; then
7678 :
7679 elif test -d "$cf_add_libdir"
7680 then
7681 cf_have_libdir=no
7682 if test -n "$LDFLAGS$LIBS" ; then
7683 # a loop is needed to ensure we can add subdirs of existing dirs
7684 for cf_test_libdir in $LDFLAGS $LIBS ; do
7685 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7686 cf_have_libdir=yes; break
7687 fi
7688 done
7689 fi
7690 if test "$cf_have_libdir" = no ; then
7691 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7692
7693 echo "${as_me:-configure}:7693: testing adding $cf_add_libdir to library-path ..." 1>&5
7694
7695 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7696 fi
7697 fi
7698 done
7699 fi
7700
7701 else
7702
7703 if test -n "/lib" ; then
7704 for cf_add_libdir in /lib
7705 do
7706 if test "$cf_add_libdir" = /usr/lib ; then
7707 :
7708 elif test -d "$cf_add_libdir"
7709 then
7710 cf_have_libdir=no
7711 if test -n "$LDFLAGS$LIBS" ; then
7712 # a loop is needed to ensure we can add subdirs of existing dirs
7713 for cf_test_libdir in $LDFLAGS $LIBS ; do
7714 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7715 cf_have_libdir=yes; break
7716 fi
7717 done
7718 fi
7719 if test "$cf_have_libdir" = no ; then
7720 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7721
7722 echo "${as_me:-configure}:7722: testing adding $cf_add_libdir to library-path ..." 1>&5
7723
7724 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7725 fi
7726 fi
7727 done
7728 fi
7729
7730 fi
7731 ;;
7732 (*)
7733
7734 if test -n "/lib" ; then
7735 for cf_add_libdir in /lib
7736 do
7737 if test "$cf_add_libdir" = /usr/lib ; then
7738 :
7739 elif test -d "$cf_add_libdir"
7740 then
7741 cf_have_libdir=no
7742 if test -n "$LDFLAGS$LIBS" ; then
7743 # a loop is needed to ensure we can add subdirs of existing dirs
7744 for cf_test_libdir in $LDFLAGS $LIBS ; do
7745 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7746 cf_have_libdir=yes; break
7747 fi
7748 done
7749 fi
7750 if test "$cf_have_libdir" = no ; then
7751 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7752
7753 echo "${as_me:-configure}:7753: testing adding $cf_add_libdir to library-path ..." 1>&5
7754
7755 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7756 fi
7757 fi
7758 done
7759 fi
7760
7761 ;;
7762 esac
7763 ;;
7764 (sunos3*|sunos4*)
7765 if test "x$cf_cv_screen" = "xcurses_5lib"
7766 then
7767 if test -d /usr/5lib ; then
7768
7769 if test -n "/usr/5lib" ; then
7770 for cf_add_libdir in /usr/5lib
7771 do
7772 if test "$cf_add_libdir" = /usr/lib ; then
7773 :
7774 elif test -d "$cf_add_libdir"
7775 then
7776 cf_have_libdir=no
7777 if test -n "$LDFLAGS$LIBS" ; then
7778 # a loop is needed to ensure we can add subdirs of existing dirs
7779 for cf_test_libdir in $LDFLAGS $LIBS ; do
7780 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7781 cf_have_libdir=yes; break
7782 fi
7783 done
7784 fi
7785 if test "$cf_have_libdir" = no ; then
7786 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7787
7788 echo "${as_me:-configure}:7788: testing adding $cf_add_libdir to library-path ..." 1>&5
7789
7790 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7791 fi
7792 fi
7793 done
7794 fi
7795
7796 cf_add_libs="$LIBS"
7797 # reverse order
7798 cf_add_0lib=
7799 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7800 # filter duplicates
7801 for cf_add_1lib in $cf_add_0lib; do
7802 for cf_add_2lib in $cf_add_libs; do
7803 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7804 cf_add_1lib=
7805 break
7806 fi
7807 done
7808 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7809 done
7810 LIBS="$cf_add_libs"
7811
7812 fi
7813 fi
7814 ac_cv_func_initscr=yes
7815 ;;
7816 esac
7817
7818 if test ".$ac_cv_func_initscr" != .yes ; then
7819 cf_save_LIBS="$LIBS"
7820
7821 if test ".${cf_cv_ncurses_version:-no}" != .no
7822 then
7823 cf_check_list="ncurses curses cursesX"
7824 else
7825 cf_check_list="cursesX curses ncurses"
7826 fi
7827
7828 # Check for library containing tgoto. Do this before curses library
7829 # because it may be needed to link the test-case for initscr.
7830 if test "x$cf_term_lib" = x
7831 then
7832 echo "$as_me:7832: checking for tgoto" >&5
7833 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7834 if test "${ac_cv_func_tgoto+set}" = set; then
7835 echo $ECHO_N "(cached) $ECHO_C" >&6
7836 else
7837 cat >"conftest.$ac_ext" <<_ACEOF
7838 #line 7838 "configure"
7839 #include "confdefs.h"
7840 #define tgoto autoconf_temporary
7841 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7842 #undef tgoto
7843
7844 #ifdef __cplusplus
7845 extern "C"
7846 #endif
7847
7848 /* We use char because int might match the return type of a gcc2
7849 builtin and then its argument prototype would still apply. */
7850 char tgoto (void);
7851
7852 int
7853 main (void)
7854 {
7855
7856 /* The GNU C library defines stubs for functions which it implements
7857 to always fail with ENOSYS. Some functions are actually named
7858 something starting with __ and the normal name is an alias. */
7859 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7860 #error found stub for tgoto
7861 #endif
7862
7863 return tgoto ();
7864 ;
7865 return 0;
7866 }
7867 _ACEOF
7868 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7869 if { (eval echo "$as_me:7869: \"$ac_link\"") >&5
7870 (eval $ac_link) 2>&5
7871 ac_status=$?
7872 echo "$as_me:7872: \$? = $ac_status" >&5
7873 (exit "$ac_status"); } &&
7874 { ac_try='test -s "conftest$ac_exeext"'
7875 { (eval echo "$as_me:7875: \"$ac_try\"") >&5
7876 (eval $ac_try) 2>&5
7877 ac_status=$?
7878 echo "$as_me:7878: \$? = $ac_status" >&5
7879 (exit "$ac_status"); }; }; then
7880 ac_cv_func_tgoto=yes
7881 else
7882 echo "$as_me: failed program was:" >&5
7883 cat "conftest.$ac_ext" >&5
7884 ac_cv_func_tgoto=no
7885 fi
7886 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7887 fi
7888 echo "$as_me:7888: result: $ac_cv_func_tgoto" >&5
7889 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7890 if test "$ac_cv_func_tgoto" = yes; then
7891 cf_term_lib=predefined
7892 else
7893
7894 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7895 do
7896 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7897 echo "$as_me:7897: checking for tgoto in -l$cf_term_lib" >&5
7898 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7899 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7900 echo $ECHO_N "(cached) $ECHO_C" >&6
7901 else
7902 ac_check_lib_save_LIBS=$LIBS
7903 LIBS="-l$cf_term_lib $LIBS"
7904 cat >"conftest.$ac_ext" <<_ACEOF
7905 #line 7905 "configure"
7906 #include "confdefs.h"
7907
7908 /* Override any gcc2 internal prototype to avoid an error. */
7909 #ifdef __cplusplus
7910 extern "C"
7911 #endif
7912 /* We use char because int might match the return type of a gcc2
7913 builtin and then its argument prototype would still apply. */
7914 char tgoto (void);
7915 int
7916 main (void)
7917 {
7918 tgoto ();
7919 ;
7920 return 0;
7921 }
7922 _ACEOF
7923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7924 if { (eval echo "$as_me:7924: \"$ac_link\"") >&5
7925 (eval $ac_link) 2>&5
7926 ac_status=$?
7927 echo "$as_me:7927: \$? = $ac_status" >&5
7928 (exit "$ac_status"); } &&
7929 { ac_try='test -s "conftest$ac_exeext"'
7930 { (eval echo "$as_me:7930: \"$ac_try\"") >&5
7931 (eval $ac_try) 2>&5
7932 ac_status=$?
7933 echo "$as_me:7933: \$? = $ac_status" >&5
7934 (exit "$ac_status"); }; }; then
7935 eval "$as_ac_Lib=yes"
7936 else
7937 echo "$as_me: failed program was:" >&5
7938 cat "conftest.$ac_ext" >&5
7939 eval "$as_ac_Lib=no"
7940 fi
7941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7942 LIBS=$ac_check_lib_save_LIBS
7943 fi
7944 echo "$as_me:7944: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7945 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7946 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7947
7948 : "${cf_nculib_root:=$cf_term_lib}"
7949 break
7950
7951 fi
7952
7953 done
7954
7955 fi
7956
7957 fi
7958
7959 # Check for library containing initscr
7960 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7961 if test "x$cf_curs_lib" = x
7962 then
7963 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7964 do
7965 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7966 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7967 echo "$as_me:7967: checking if we can link with $cf_curs_lib library" >&5
7968 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7969 cat >"conftest.$ac_ext" <<_ACEOF
7970 #line 7970 "configure"
7971 #include "confdefs.h"
7972 #include <${cf_cv_ncurses_header:-curses.h}>
7973 int
7974 main (void)
7975 {
7976 initscr()
7977 ;
7978 return 0;
7979 }
7980 _ACEOF
7981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7982 if { (eval echo "$as_me:7982: \"$ac_link\"") >&5
7983 (eval $ac_link) 2>&5
7984 ac_status=$?
7985 echo "$as_me:7985: \$? = $ac_status" >&5
7986 (exit "$ac_status"); } &&
7987 { ac_try='test -s "conftest$ac_exeext"'
7988 { (eval echo "$as_me:7988: \"$ac_try\"") >&5
7989 (eval $ac_try) 2>&5
7990 ac_status=$?
7991 echo "$as_me:7991: \$? = $ac_status" >&5
7992 (exit "$ac_status"); }; }; then
7993 cf_result=yes
7994 else
7995 echo "$as_me: failed program was:" >&5
7996 cat "conftest.$ac_ext" >&5
7997 cf_result=no
7998 fi
7999 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8000 echo "$as_me:8000: result: $cf_result" >&5
8001 echo "${ECHO_T}$cf_result" >&6
8002 test "$cf_result" = yes && break
8003 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
8004 cf_result=no
8005 elif test "$cf_term_lib" != predefined ; then
8006 echo "$as_me:8006: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
8007 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
8008 cat >"conftest.$ac_ext" <<_ACEOF
8009 #line 8009 "configure"
8010 #include "confdefs.h"
8011 #include <${cf_cv_ncurses_header:-curses.h}>
8012 int
8013 main (void)
8014 {
8015 initscr(); endwin();
8016 ;
8017 return 0;
8018 }
8019 _ACEOF
8020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8021 if { (eval echo "$as_me:8021: \"$ac_link\"") >&5
8022 (eval $ac_link) 2>&5
8023 ac_status=$?
8024 echo "$as_me:8024: \$? = $ac_status" >&5
8025 (exit "$ac_status"); } &&
8026 { ac_try='test -s "conftest$ac_exeext"'
8027 { (eval echo "$as_me:8027: \"$ac_try\"") >&5
8028 (eval $ac_try) 2>&5
8029 ac_status=$?
8030 echo "$as_me:8030: \$? = $ac_status" >&5
8031 (exit "$ac_status"); }; }; then
8032 cf_result=no
8033 else
8034 echo "$as_me: failed program was:" >&5
8035 cat "conftest.$ac_ext" >&5
8036
8037 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
8038 cat >"conftest.$ac_ext" <<_ACEOF
8039 #line 8039 "configure"
8040 #include "confdefs.h"
8041 #include <${cf_cv_ncurses_header:-curses.h}>
8042 int
8043 main (void)
8044 {
8045 initscr()
8046 ;
8047 return 0;
8048 }
8049 _ACEOF
8050 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8051 if { (eval echo "$as_me:8051: \"$ac_link\"") >&5
8052 (eval $ac_link) 2>&5
8053 ac_status=$?
8054 echo "$as_me:8054: \$? = $ac_status" >&5
8055 (exit "$ac_status"); } &&
8056 { ac_try='test -s "conftest$ac_exeext"'
8057 { (eval echo "$as_me:8057: \"$ac_try\"") >&5
8058 (eval $ac_try) 2>&5
8059 ac_status=$?
8060 echo "$as_me:8060: \$? = $ac_status" >&5
8061 (exit "$ac_status"); }; }; then
8062 cf_result=yes
8063 else
8064 echo "$as_me: failed program was:" >&5
8065 cat "conftest.$ac_ext" >&5
8066 cf_result=error
8067 fi
8068 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8069
8070 fi
8071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8072 echo "$as_me:8072: result: $cf_result" >&5
8073 echo "${ECHO_T}$cf_result" >&6
8074 test "$cf_result" != error && break
8075 fi
8076 done
8077 fi
8078 test "$cf_curs_lib" = unknown && { { echo "$as_me:8078: error: no curses library found" >&5
8079 echo "$as_me: error: no curses library found" >&2;}
8080 { (exit 1); exit 1; }; }
8081 fi
8082 fi
8083
8084 ;;
8085 (ncursesw*)
8086
8087 for ac_header in wchar.h
8088 do
8089 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8090 echo "$as_me:8090: checking for $ac_header" >&5
8091 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8092 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8093 echo $ECHO_N "(cached) $ECHO_C" >&6
8094 else
8095 cat >"conftest.$ac_ext" <<_ACEOF
8096 #line 8096 "configure"
8097 #include "confdefs.h"
8098 #include <$ac_header>
8099 _ACEOF
8100 if { (eval echo "$as_me:8100: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8101 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8102 ac_status=$?
8103 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8104 rm -f conftest.er1
8105 cat conftest.err >&5
8106 echo "$as_me:8106: \$? = $ac_status" >&5
8107 (exit "$ac_status"); } >/dev/null; then
8108 if test -s conftest.err; then
8109 ac_cpp_err=$ac_c_preproc_warn_flag
8110 else
8111 ac_cpp_err=
8112 fi
8113 else
8114 ac_cpp_err=yes
8115 fi
8116 if test -z "$ac_cpp_err"; then
8117 eval "$as_ac_Header=yes"
8118 else
8119 echo "$as_me: failed program was:" >&5
8120 cat "conftest.$ac_ext" >&5
8121 eval "$as_ac_Header=no"
8122 fi
8123 rm -f conftest.err "conftest.$ac_ext"
8124 fi
8125 echo "$as_me:8125: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8126 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8127 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8128 cat >>confdefs.h <<EOF
8129 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8130 EOF
8131
8132 fi
8133 done
8134
8135 echo "$as_me:8135: checking for multibyte character support" >&5
8136 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8137 if test "${cf_cv_utf8_lib+set}" = set; then
8138 echo $ECHO_N "(cached) $ECHO_C" >&6
8139 else
8140
8141 cf_save_LIBS="$LIBS"
8142 cat >"conftest.$ac_ext" <<_ACEOF
8143 #line 8143 "configure"
8144 #include "confdefs.h"
8145
8146 $ac_includes_default
8147 #ifdef HAVE_WCHAR_H
8148 #include <wchar.h>
8149 #endif
8150
8151 int
8152 main (void)
8153 {
8154 putwc(0,0);
8155 ;
8156 return 0;
8157 }
8158 _ACEOF
8159 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8160 if { (eval echo "$as_me:8160: \"$ac_link\"") >&5
8161 (eval $ac_link) 2>&5
8162 ac_status=$?
8163 echo "$as_me:8163: \$? = $ac_status" >&5
8164 (exit "$ac_status"); } &&
8165 { ac_try='test -s "conftest$ac_exeext"'
8166 { (eval echo "$as_me:8166: \"$ac_try\"") >&5
8167 (eval $ac_try) 2>&5
8168 ac_status=$?
8169 echo "$as_me:8169: \$? = $ac_status" >&5
8170 (exit "$ac_status"); }; }; then
8171 cf_cv_utf8_lib=yes
8172 else
8173 echo "$as_me: failed program was:" >&5
8174 cat "conftest.$ac_ext" >&5
8175
8176 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8177 # will be set on completion of the AC_LINK_IFELSE below.
8178 cf_cv_header_path_utf8=
8179 cf_cv_library_path_utf8=
8180
8181 echo "${as_me:-configure}:8181: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8182
8183 cf_save_LIBS="$LIBS"
8184
8185 cat >"conftest.$ac_ext" <<_ACEOF
8186 #line 8186 "configure"
8187 #include "confdefs.h"
8188
8189 #include <libutf8.h>
8190 int
8191 main (void)
8192 {
8193 putwc(0,0);
8194 ;
8195 return 0;
8196 }
8197 _ACEOF
8198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8199 if { (eval echo "$as_me:8199: \"$ac_link\"") >&5
8200 (eval $ac_link) 2>&5
8201 ac_status=$?
8202 echo "$as_me:8202: \$? = $ac_status" >&5
8203 (exit "$ac_status"); } &&
8204 { ac_try='test -s "conftest$ac_exeext"'
8205 { (eval echo "$as_me:8205: \"$ac_try\"") >&5
8206 (eval $ac_try) 2>&5
8207 ac_status=$?
8208 echo "$as_me:8208: \$? = $ac_status" >&5
8209 (exit "$ac_status"); }; }; then
8210
8211 cf_cv_find_linkage_utf8=yes
8212 cf_cv_header_path_utf8=/usr/include
8213 cf_cv_library_path_utf8=/usr/lib
8214
8215 else
8216 echo "$as_me: failed program was:" >&5
8217 cat "conftest.$ac_ext" >&5
8218
8219 LIBS="-lutf8 $cf_save_LIBS"
8220
8221 cat >"conftest.$ac_ext" <<_ACEOF
8222 #line 8222 "configure"
8223 #include "confdefs.h"
8224
8225 #include <libutf8.h>
8226 int
8227 main (void)
8228 {
8229 putwc(0,0);
8230 ;
8231 return 0;
8232 }
8233 _ACEOF
8234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8235 if { (eval echo "$as_me:8235: \"$ac_link\"") >&5
8236 (eval $ac_link) 2>&5
8237 ac_status=$?
8238 echo "$as_me:8238: \$? = $ac_status" >&5
8239 (exit "$ac_status"); } &&
8240 { ac_try='test -s "conftest$ac_exeext"'
8241 { (eval echo "$as_me:8241: \"$ac_try\"") >&5
8242 (eval $ac_try) 2>&5
8243 ac_status=$?
8244 echo "$as_me:8244: \$? = $ac_status" >&5
8245 (exit "$ac_status"); }; }; then
8246
8247 cf_cv_find_linkage_utf8=yes
8248 cf_cv_header_path_utf8=/usr/include
8249 cf_cv_library_path_utf8=/usr/lib
8250 cf_cv_library_file_utf8="-lutf8"
8251
8252 else
8253 echo "$as_me: failed program was:" >&5
8254 cat "conftest.$ac_ext" >&5
8255
8256 cf_cv_find_linkage_utf8=no
8257 LIBS="$cf_save_LIBS"
8258
8259 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
8260
8261 echo "${as_me:-configure}:8261: testing find linkage for utf8 library ..." 1>&5
8262
8263 echo "${as_me:-configure}:8263: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8264
8265 cf_save_CPPFLAGS="$CPPFLAGS"
8266 cf_test_CPPFLAGS="$CPPFLAGS"
8267
8268 cf_search=
8269
8270 # collect the current set of include-directories from compiler flags
8271 cf_header_path_list=""
8272 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8273 for cf_header_path in $CPPFLAGS $CFLAGS
8274 do
8275 case "$cf_header_path" in
8276 (-I*)
8277 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8278
8279 test "x$cf_header_path" != "xNONE" && \
8280 test -d "$cf_header_path" && \
8281 {
8282 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8283 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8284 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
8285 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
8286 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
8287 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8288 }
8289
8290 cf_header_path_list="$cf_header_path_list $cf_search"
8291 ;;
8292 esac
8293 done
8294 fi
8295
8296 # add the variations for the package we are looking for
8297
8298 cf_search=
8299
8300 test "x$prefix" != "xNONE" && \
8301 test -d "$prefix" && \
8302 {
8303 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8304 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8305 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
8306 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
8307 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
8308 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
8309 }
8310
8311 for cf_subdir_prefix in \
8312 /usr \
8313 /usr/local \
8314 /usr/pkg \
8315 /opt \
8316 /opt/local \
8317 $HOME
8318 do
8319
8320 test "x$cf_subdir_prefix" != "x$prefix" && \
8321 test -d "$cf_subdir_prefix" && \
8322 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8323 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8324 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8325 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
8326 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
8327 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
8328 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
8329 }
8330
8331 done
8332
8333 test "$includedir" != NONE && \
8334 test "$includedir" != "/usr/include" && \
8335 test -d "$includedir" && {
8336 test -d "$includedir" && cf_search="$cf_search $includedir"
8337 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
8338 }
8339
8340 test "$oldincludedir" != NONE && \
8341 test "$oldincludedir" != "/usr/include" && \
8342 test -d "$oldincludedir" && {
8343 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8344 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
8345 }
8346
8347 cf_search="$cf_search $cf_header_path_list"
8348
8349 for cf_cv_header_path_utf8 in $cf_search
8350 do
8351 if test -d "$cf_cv_header_path_utf8" ; then
8352 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
8353
8354 echo "${as_me:-configure}:8354: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8355
8356 CPPFLAGS="$cf_save_CPPFLAGS"
8357
8358 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8359 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
8360
8361 cat >"conftest.$ac_ext" <<_ACEOF
8362 #line 8362 "configure"
8363 #include "confdefs.h"
8364
8365 #include <libutf8.h>
8366 int
8367 main (void)
8368 {
8369 putwc(0,0);
8370 ;
8371 return 0;
8372 }
8373 _ACEOF
8374 rm -f "conftest.$ac_objext"
8375 if { (eval echo "$as_me:8375: \"$ac_compile\"") >&5
8376 (eval $ac_compile) 2>&5
8377 ac_status=$?
8378 echo "$as_me:8378: \$? = $ac_status" >&5
8379 (exit "$ac_status"); } &&
8380 { ac_try='test -s "conftest.$ac_objext"'
8381 { (eval echo "$as_me:8381: \"$ac_try\"") >&5
8382 (eval $ac_try) 2>&5
8383 ac_status=$?
8384 echo "$as_me:8384: \$? = $ac_status" >&5
8385 (exit "$ac_status"); }; }; then
8386
8387 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8388
8389 echo "${as_me:-configure}:8389: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8390
8391 cf_cv_find_linkage_utf8=maybe
8392 cf_test_CPPFLAGS="$CPPFLAGS"
8393 break
8394 else
8395 echo "$as_me: failed program was:" >&5
8396 cat "conftest.$ac_ext" >&5
8397
8398 CPPFLAGS="$cf_save_CPPFLAGS"
8399
8400 fi
8401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8402 fi
8403 done
8404
8405 if test "$cf_cv_find_linkage_utf8" = maybe ; then
8406
8407 echo "${as_me:-configure}:8407: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8408
8409 cf_save_LIBS="$LIBS"
8410 cf_save_LDFLAGS="$LDFLAGS"
8411
8412 if test "$cf_cv_find_linkage_utf8" != yes ; then
8413
8414 cf_search=
8415 cf_library_path_list=""
8416 if test -n "${LDFLAGS}${LIBS}" ; then
8417 for cf_library_path in $LDFLAGS $LIBS
8418 do
8419 case "$cf_library_path" in
8420 (-L*)
8421 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8422
8423 test "x$cf_library_path" != "xNONE" && \
8424 test -d "$cf_library_path" && \
8425 {
8426 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8427 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8428 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
8429 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8430 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
8431 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8432 }
8433
8434 cf_library_path_list="$cf_library_path_list $cf_search"
8435 ;;
8436 esac
8437 done
8438 fi
8439
8440 cf_search=
8441
8442 test "x$prefix" != "xNONE" && \
8443 test -d "$prefix" && \
8444 {
8445 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8446 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
8447 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
8448 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
8449 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
8450 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
8451 }
8452
8453 for cf_subdir_prefix in \
8454 /usr \
8455 /usr/local \
8456 /usr/pkg \
8457 /opt \
8458 /opt/local \
8459 $HOME
8460 do
8461
8462 test "x$cf_subdir_prefix" != "x$prefix" && \
8463 test -d "$cf_subdir_prefix" && \
8464 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8465 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8466 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
8467 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
8468 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
8469 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
8470 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
8471 }
8472
8473 done
8474
8475 cf_search="$cf_library_path_list $cf_search"
8476
8477 for cf_cv_library_path_utf8 in $cf_search
8478 do
8479 if test -d "$cf_cv_library_path_utf8" ; then
8480 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
8481
8482 echo "${as_me:-configure}:8482: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8483
8484 CPPFLAGS="$cf_test_CPPFLAGS"
8485 LIBS="-lutf8 $cf_save_LIBS"
8486 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8487 cat >"conftest.$ac_ext" <<_ACEOF
8488 #line 8488 "configure"
8489 #include "confdefs.h"
8490
8491 #include <libutf8.h>
8492 int
8493 main (void)
8494 {
8495 putwc(0,0);
8496 ;
8497 return 0;
8498 }
8499 _ACEOF
8500 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8501 if { (eval echo "$as_me:8501: \"$ac_link\"") >&5
8502 (eval $ac_link) 2>&5
8503 ac_status=$?
8504 echo "$as_me:8504: \$? = $ac_status" >&5
8505 (exit "$ac_status"); } &&
8506 { ac_try='test -s "conftest$ac_exeext"'
8507 { (eval echo "$as_me:8507: \"$ac_try\"") >&5
8508 (eval $ac_try) 2>&5
8509 ac_status=$?
8510 echo "$as_me:8510: \$? = $ac_status" >&5
8511 (exit "$ac_status"); }; }; then
8512
8513 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8514
8515 echo "${as_me:-configure}:8515: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8516
8517 cf_cv_find_linkage_utf8=yes
8518 cf_cv_library_file_utf8="-lutf8"
8519 break
8520 else
8521 echo "$as_me: failed program was:" >&5
8522 cat "conftest.$ac_ext" >&5
8523
8524 CPPFLAGS="$cf_save_CPPFLAGS"
8525 LIBS="$cf_save_LIBS"
8526 LDFLAGS="$cf_save_LDFLAGS"
8527
8528 fi
8529 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8530 fi
8531 done
8532 CPPFLAGS="$cf_save_CPPFLAGS"
8533 LDFLAGS="$cf_save_LDFLAGS"
8534 fi
8535
8536 else
8537 cf_cv_find_linkage_utf8=no
8538 fi
8539
8540 fi
8541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8542
8543 fi
8544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8545
8546 LIBS="$cf_save_LIBS"
8547
8548 if test "$cf_cv_find_linkage_utf8" = yes ; then
8549 cf_cv_utf8_lib=add-on
8550 else
8551 cf_cv_utf8_lib=no
8552 fi
8553
8554 fi
8555 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8556 fi
8557 echo "$as_me:8557: result: $cf_cv_utf8_lib" >&5
8558 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8559
8560 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8561 # ncurses/ncursesw:
8562 if test "$cf_cv_utf8_lib" = "add-on" ; then
8563
8564 cat >>confdefs.h <<\EOF
8565 #define HAVE_LIBUTF8_H 1
8566 EOF
8567
8568 if test -n "$cf_cv_header_path_utf8" ; then
8569 for cf_add_incdir in $cf_cv_header_path_utf8
8570 do
8571 while test "$cf_add_incdir" != /usr/include
8572 do
8573 if test -d "$cf_add_incdir"
8574 then
8575 cf_have_incdir=no
8576 if test -n "$CFLAGS$CPPFLAGS" ; then
8577 # a loop is needed to ensure we can add subdirs of existing dirs
8578 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8579 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8580 cf_have_incdir=yes; break
8581 fi
8582 done
8583 fi
8584
8585 if test "$cf_have_incdir" = no ; then
8586 if test "$cf_add_incdir" = /usr/local/include ; then
8587 if test "$GCC" = yes
8588 then
8589 cf_save_CPPFLAGS=$CPPFLAGS
8590
8591 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8592 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8593
8594 cat >"conftest.$ac_ext" <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8597 #include <stdio.h>
8598 int
8599 main (void)
8600 {
8601 printf("Hello")
8602 ;
8603 return 0;
8604 }
8605 _ACEOF
8606 rm -f "conftest.$ac_objext"
8607 if { (eval echo "$as_me:8607: \"$ac_compile\"") >&5
8608 (eval $ac_compile) 2>&5
8609 ac_status=$?
8610 echo "$as_me:8610: \$? = $ac_status" >&5
8611 (exit "$ac_status"); } &&
8612 { ac_try='test -s "conftest.$ac_objext"'
8613 { (eval echo "$as_me:8613: \"$ac_try\"") >&5
8614 (eval $ac_try) 2>&5
8615 ac_status=$?
8616 echo "$as_me:8616: \$? = $ac_status" >&5
8617 (exit "$ac_status"); }; }; then
8618 :
8619 else
8620 echo "$as_me: failed program was:" >&5
8621 cat "conftest.$ac_ext" >&5
8622 cf_have_incdir=yes
8623 fi
8624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8625 CPPFLAGS=$cf_save_CPPFLAGS
8626 fi
8627 fi
8628 fi
8629
8630 if test "$cf_have_incdir" = no ; then
8631 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8632
8633 echo "${as_me:-configure}:8633: testing adding $cf_add_incdir to include-path ..." 1>&5
8634
8635 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8636
8637 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8638 test "$cf_top_incdir" = "$cf_add_incdir" && break
8639 cf_add_incdir="$cf_top_incdir"
8640 else
8641 break
8642 fi
8643 else
8644 break
8645 fi
8646 done
8647 done
8648 fi
8649
8650 if test -n "$cf_cv_library_path_utf8" ; then
8651 for cf_add_libdir in $cf_cv_library_path_utf8
8652 do
8653 if test "$cf_add_libdir" = /usr/lib ; then
8654 :
8655 elif test -d "$cf_add_libdir"
8656 then
8657 cf_have_libdir=no
8658 if test -n "$LDFLAGS$LIBS" ; then
8659 # a loop is needed to ensure we can add subdirs of existing dirs
8660 for cf_test_libdir in $LDFLAGS $LIBS ; do
8661 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8662 cf_have_libdir=yes; break
8663 fi
8664 done
8665 fi
8666 if test "$cf_have_libdir" = no ; then
8667 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8668
8669 echo "${as_me:-configure}:8669: testing adding $cf_add_libdir to library-path ..." 1>&5
8670
8671 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8672 fi
8673 fi
8674 done
8675 fi
8676
8677 cf_add_libs="$LIBS"
8678 # reverse order
8679 cf_add_0lib=
8680 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8681 # filter duplicates
8682 for cf_add_1lib in $cf_add_0lib; do
8683 for cf_add_2lib in $cf_add_libs; do
8684 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8685 cf_add_1lib=
8686 break
8687 fi
8688 done
8689 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8690 done
8691 LIBS="$cf_add_libs"
8692
8693 fi
8694
8695 cf_ncuconfig_root=$cf_cv_screen
8696 cf_have_ncuconfig=no
8697
8698 if test "x${PKG_CONFIG:=none}" != xnone; then
8699 echo "$as_me:8699: checking pkg-config for $cf_ncuconfig_root" >&5
8700 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8701 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8702 echo "$as_me:8702: result: yes" >&5
8703 echo "${ECHO_T}yes" >&6
8704
8705 echo "$as_me:8705: checking if the $cf_ncuconfig_root package files work" >&5
8706 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8707 cf_have_ncuconfig=unknown
8708
8709 cf_save_CFLAGS="$CFLAGS"
8710 cf_save_CPPFLAGS="$CPPFLAGS"
8711 cf_save_LIBS="$LIBS"
8712
8713 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8714 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8715
8716 # while -W for passing linker flags is prevalent, it is not "standard".
8717 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8718 # incompatible _and_ non-standard -W option which gives an error. Work
8719 # around that pitfall.
8720 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8721 (x*c[89]9@@*-W*)
8722
8723 cf_fix_cppflags=no
8724 cf_new_cflags=
8725 cf_new_cppflags=
8726 cf_new_extra_cppflags=
8727
8728 for cf_add_cflags in $cf_pkg_cflags
8729 do
8730 case "$cf_fix_cppflags" in
8731 (no)
8732 case "$cf_add_cflags" in
8733 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8734 case "$cf_add_cflags" in
8735 (-D*)
8736 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8737
8738 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8739 && test -z "${cf_tst_cflags}" \
8740 && cf_fix_cppflags=yes
8741
8742 if test "$cf_fix_cppflags" = yes ; then
8743
8744 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8745 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8746
8747 continue
8748 elif test "${cf_tst_cflags}" = "\"'" ; then
8749
8750 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8751 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8752
8753 continue
8754 fi
8755 ;;
8756 esac
8757 case "$CPPFLAGS" in
8758 (*$cf_add_cflags)
8759 ;;
8760 (*)
8761 case "$cf_add_cflags" in
8762 (-D*)
8763 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8764
8765 CPPFLAGS=`echo "$CPPFLAGS" | \
8766 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8767 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8768
8769 ;;
8770 esac
8771
8772 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8773 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8774
8775 ;;
8776 esac
8777 ;;
8778 (*)
8779
8780 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8781 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8782
8783 ;;
8784 esac
8785 ;;
8786 (yes)
8787
8788 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8789 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8790
8791 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8792
8793 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8794 && test -z "${cf_tst_cflags}" \
8795 && cf_fix_cppflags=no
8796 ;;
8797 esac
8798 done
8799
8800 if test -n "$cf_new_cflags" ; then
8801
8802 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8803 CFLAGS="${CFLAGS}$cf_new_cflags"
8804
8805 fi
8806
8807 if test -n "$cf_new_cppflags" ; then
8808
8809 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8810 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8811
8812 fi
8813
8814 if test -n "$cf_new_extra_cppflags" ; then
8815
8816 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8817 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8818
8819 fi
8820
8821 cf_add_libs="$LIBS"
8822 # reverse order
8823 cf_add_0lib=
8824 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8825 # filter duplicates
8826 for cf_add_1lib in $cf_add_0lib; do
8827 for cf_add_2lib in $cf_add_libs; do
8828 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8829 cf_add_1lib=
8830 break
8831 fi
8832 done
8833 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8834 done
8835 LIBS="$cf_add_libs"
8836
8837 cat >"conftest.$ac_ext" <<_ACEOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8840 #include <${cf_cv_ncurses_header:-curses.h}>
8841 int
8842 main (void)
8843 {
8844 initscr(); mousemask(0,0); tigetstr((char *)0);
8845 ;
8846 return 0;
8847 }
8848 _ACEOF
8849 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8850 if { (eval echo "$as_me:8850: \"$ac_link\"") >&5
8851 (eval $ac_link) 2>&5
8852 ac_status=$?
8853 echo "$as_me:8853: \$? = $ac_status" >&5
8854 (exit "$ac_status"); } &&
8855 { ac_try='test -s "conftest$ac_exeext"'
8856 { (eval echo "$as_me:8856: \"$ac_try\"") >&5
8857 (eval $ac_try) 2>&5
8858 ac_status=$?
8859 echo "$as_me:8859: \$? = $ac_status" >&5
8860 (exit "$ac_status"); }; }; then
8861 if test "$cross_compiling" = yes; then
8862 cf_test_ncuconfig=maybe
8863 else
8864 cat >"conftest.$ac_ext" <<_ACEOF
8865 #line 8865 "configure"
8866 #include "confdefs.h"
8867 #include <${cf_cv_ncurses_header:-curses.h}>
8868 int main(void)
8869 { const char *xx = curses_version(); return (xx == 0); }
8870 _ACEOF
8871 rm -f "conftest$ac_exeext"
8872 if { (eval echo "$as_me:8872: \"$ac_link\"") >&5
8873 (eval $ac_link) 2>&5
8874 ac_status=$?
8875 echo "$as_me:8875: \$? = $ac_status" >&5
8876 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8877 { (eval echo "$as_me:8877: \"$ac_try\"") >&5
8878 (eval $ac_try) 2>&5
8879 ac_status=$?
8880 echo "$as_me:8880: \$? = $ac_status" >&5
8881 (exit "$ac_status"); }; }; then
8882 cf_test_ncuconfig=yes
8883 else
8884 echo "$as_me: program exited with status $ac_status" >&5
8885 echo "$as_me: failed program was:" >&5
8886 cat "conftest.$ac_ext" >&5
8887 cf_test_ncuconfig=no
8888 fi
8889 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8890 fi
8891 else
8892 echo "$as_me: failed program was:" >&5
8893 cat "conftest.$ac_ext" >&5
8894 cf_test_ncuconfig=no
8895 fi
8896 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8897
8898 CFLAGS="$cf_save_CFLAGS"
8899 CPPFLAGS="$cf_save_CPPFLAGS"
8900 LIBS="$cf_save_LIBS"
8901
8902 if test "x$cf_test_ncuconfig" != xyes; then
8903 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8904 cf_pkg_cflags="$cf_temp"
8905 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8906 cf_pkg_libs="$cf_temp"
8907 fi
8908 ;;
8909 esac
8910
8911 for cf_required in $cf_ncuconfig_root
8912 do
8913 # check for duplicates
8914 for cf_require_pkg in $REQUIRE_PKG
8915 do
8916 if test "$cf_required" = "$cf_require_pkg"
8917 then
8918 cf_required=
8919 break
8920 fi
8921 done
8922 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
8923 done
8924
8925 for cf_add_cflags in $cf_pkg_cflags
8926 do
8927 case "x$cf_add_cflags" in
8928 (x-[DU]*)
8929
8930 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8931 while true
8932 do
8933 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'`
8934 test "$CFLAGS" != "$cf_old_cflag" || break
8935
8936 CFLAGS="$cf_old_cflag"
8937 done
8938
8939 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8940 while true
8941 do
8942 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'`
8943 test "$CPPFLAGS" != "$cf_old_cflag" || break
8944
8945 CPPFLAGS="$cf_old_cflag"
8946 done
8947
8948 ;;
8949 esac
8950
8951 cf_fix_cppflags=no
8952 cf_new_cflags=
8953 cf_new_cppflags=
8954 cf_new_extra_cppflags=
8955
8956 for cf_add_cflags in $cf_add_cflags
8957 do
8958 case "$cf_fix_cppflags" in
8959 (no)
8960 case "$cf_add_cflags" in
8961 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8962 case "$cf_add_cflags" in
8963 (-D*)
8964 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8965
8966 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8967 && test -z "${cf_tst_cflags}" \
8968 && cf_fix_cppflags=yes
8969
8970 if test "$cf_fix_cppflags" = yes ; then
8971
8972 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8973 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8974
8975 continue
8976 elif test "${cf_tst_cflags}" = "\"'" ; then
8977
8978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8980
8981 continue
8982 fi
8983 ;;
8984 esac
8985 case "$CPPFLAGS" in
8986 (*$cf_add_cflags)
8987 ;;
8988 (*)
8989 case "$cf_add_cflags" in
8990 (-D*)
8991 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8992
8993 CPPFLAGS=`echo "$CPPFLAGS" | \
8994 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8995 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8996
8997 ;;
8998 esac
8999
9000 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9001 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9002
9003 ;;
9004 esac
9005 ;;
9006 (*)
9007
9008 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9009 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9010
9011 ;;
9012 esac
9013 ;;
9014 (yes)
9015
9016 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9017 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9018
9019 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9020
9021 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9022 && test -z "${cf_tst_cflags}" \
9023 && cf_fix_cppflags=no
9024 ;;
9025 esac
9026 done
9027
9028 if test -n "$cf_new_cflags" ; then
9029
9030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9031 CFLAGS="${CFLAGS}$cf_new_cflags"
9032
9033 fi
9034
9035 if test -n "$cf_new_cppflags" ; then
9036
9037 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9038 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9039
9040 fi
9041
9042 if test -n "$cf_new_extra_cppflags" ; then
9043
9044 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9045 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9046
9047 fi
9048
9049 done
9050
9051 cf_add_libs="$LIBS"
9052 # reverse order
9053 cf_add_0lib=
9054 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9055 # filter duplicates
9056 for cf_add_1lib in $cf_add_0lib; do
9057 for cf_add_2lib in $cf_add_libs; do
9058 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9059 cf_add_1lib=
9060 break
9061 fi
9062 done
9063 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9064 done
9065 LIBS="$cf_add_libs"
9066
9067 cat >"conftest.$ac_ext" <<_ACEOF
9068 #line 9068 "configure"
9069 #include "confdefs.h"
9070 #include <${cf_cv_ncurses_header:-curses.h}>
9071 int
9072 main (void)
9073 {
9074 initscr(); mousemask(0,0); tigetstr((char *)0);
9075 ;
9076 return 0;
9077 }
9078 _ACEOF
9079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9080 if { (eval echo "$as_me:9080: \"$ac_link\"") >&5
9081 (eval $ac_link) 2>&5
9082 ac_status=$?
9083 echo "$as_me:9083: \$? = $ac_status" >&5
9084 (exit "$ac_status"); } &&
9085 { ac_try='test -s "conftest$ac_exeext"'
9086 { (eval echo "$as_me:9086: \"$ac_try\"") >&5
9087 (eval $ac_try) 2>&5
9088 ac_status=$?
9089 echo "$as_me:9089: \$? = $ac_status" >&5
9090 (exit "$ac_status"); }; }; then
9091 if test "$cross_compiling" = yes; then
9092 cf_have_ncuconfig=maybe
9093 else
9094 cat >"conftest.$ac_ext" <<_ACEOF
9095 #line 9095 "configure"
9096 #include "confdefs.h"
9097 #include <${cf_cv_ncurses_header:-curses.h}>
9098 int main(void)
9099 { const char *xx = curses_version(); return (xx == 0); }
9100 _ACEOF
9101 rm -f "conftest$ac_exeext"
9102 if { (eval echo "$as_me:9102: \"$ac_link\"") >&5
9103 (eval $ac_link) 2>&5
9104 ac_status=$?
9105 echo "$as_me:9105: \$? = $ac_status" >&5
9106 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9107 { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108 (eval $ac_try) 2>&5
9109 ac_status=$?
9110 echo "$as_me:9110: \$? = $ac_status" >&5
9111 (exit "$ac_status"); }; }; then
9112 cf_have_ncuconfig=yes
9113 else
9114 echo "$as_me: program exited with status $ac_status" >&5
9115 echo "$as_me: failed program was:" >&5
9116 cat "conftest.$ac_ext" >&5
9117 cf_have_ncuconfig=no
9118 fi
9119 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9120 fi
9121 else
9122 echo "$as_me: failed program was:" >&5
9123 cat "conftest.$ac_ext" >&5
9124 cf_have_ncuconfig=no
9125 fi
9126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9127 echo "$as_me:9127: result: $cf_have_ncuconfig" >&5
9128 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9129 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9130 if test "$cf_have_ncuconfig" != "yes"
9131 then
9132 CPPFLAGS="$cf_save_CPPFLAGS"
9133 LIBS="$cf_save_LIBS"
9134 NCURSES_CONFIG_PKG=none
9135 else
9136
9137 cat >>confdefs.h <<\EOF
9138 #define NCURSES 1
9139 EOF
9140
9141 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9142
9143 echo "$as_me:9143: checking for terminfo header" >&5
9144 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9145 if test "${cf_cv_term_header+set}" = set; then
9146 echo $ECHO_N "(cached) $ECHO_C" >&6
9147 else
9148
9149 case "${cf_cv_ncurses_header}" in
9150 (*/ncurses.h|*/ncursesw.h)
9151 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9152 ;;
9153 (*)
9154 cf_term_header=term.h
9155 ;;
9156 esac
9157
9158 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9159 do
9160 cat >"conftest.$ac_ext" <<_ACEOF
9161 #line 9161 "configure"
9162 #include "confdefs.h"
9163 #include <stdio.h>
9164 #include <${cf_cv_ncurses_header:-curses.h}>
9165 #include <$cf_test>
9166
9167 int
9168 main (void)
9169 {
9170 int x = auto_left_margin; (void)x
9171 ;
9172 return 0;
9173 }
9174 _ACEOF
9175 rm -f "conftest.$ac_objext"
9176 if { (eval echo "$as_me:9176: \"$ac_compile\"") >&5
9177 (eval $ac_compile) 2>&5
9178 ac_status=$?
9179 echo "$as_me:9179: \$? = $ac_status" >&5
9180 (exit "$ac_status"); } &&
9181 { ac_try='test -s "conftest.$ac_objext"'
9182 { (eval echo "$as_me:9182: \"$ac_try\"") >&5
9183 (eval $ac_try) 2>&5
9184 ac_status=$?
9185 echo "$as_me:9185: \$? = $ac_status" >&5
9186 (exit "$ac_status"); }; }; then
9187
9188 cf_cv_term_header="$cf_test"
9189 else
9190 echo "$as_me: failed program was:" >&5
9191 cat "conftest.$ac_ext" >&5
9192
9193 cf_cv_term_header=unknown
9194
9195 fi
9196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9197 test "$cf_cv_term_header" != unknown && break
9198 done
9199
9200 fi
9201 echo "$as_me:9201: result: $cf_cv_term_header" >&5
9202 echo "${ECHO_T}$cf_cv_term_header" >&6
9203
9204 # Set definitions to allow ifdef'ing to accommodate subdirectories
9205
9206 case "$cf_cv_term_header" in
9207 (*term.h)
9208
9209 cat >>confdefs.h <<\EOF
9210 #define HAVE_TERM_H 1
9211 EOF
9212
9213 ;;
9214 esac
9215
9216 case "$cf_cv_term_header" in
9217 (ncurses/term.h)
9218
9219 cat >>confdefs.h <<\EOF
9220 #define HAVE_NCURSES_TERM_H 1
9221 EOF
9222
9223 ;;
9224 (ncursesw/term.h)
9225
9226 cat >>confdefs.h <<\EOF
9227 #define HAVE_NCURSESW_TERM_H 1
9228 EOF
9229
9230 ;;
9231 esac
9232
9233 fi
9234
9235 else
9236 echo "$as_me:9236: result: no" >&5
9237 echo "${ECHO_T}no" >&6
9238 NCURSES_CONFIG_PKG=none
9239 fi
9240 else
9241 NCURSES_CONFIG_PKG=none
9242 fi
9243
9244 if test "x$cf_have_ncuconfig" = "xno"; then
9245 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9246
9247 if test -n "$ac_tool_prefix"; then
9248 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9249 do
9250 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9251 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9252 echo "$as_me:9252: checking for $ac_word" >&5
9253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9254 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9255 echo $ECHO_N "(cached) $ECHO_C" >&6
9256 else
9257 if test -n "$NCURSES_CONFIG"; then
9258 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9259 else
9260 ac_save_IFS=$IFS; IFS=$ac_path_separator
9261 ac_dummy="$PATH"
9262 for ac_dir in $ac_dummy; do
9263 IFS=$ac_save_IFS
9264 test -z "$ac_dir" && ac_dir=.
9265 $as_executable_p "$ac_dir/$ac_word" || continue
9266 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9267 echo "$as_me:9267: found $ac_dir/$ac_word" >&5
9268 break
9269 done
9270
9271 fi
9272 fi
9273 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9274 if test -n "$NCURSES_CONFIG"; then
9275 echo "$as_me:9275: result: $NCURSES_CONFIG" >&5
9276 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9277 else
9278 echo "$as_me:9278: result: no" >&5
9279 echo "${ECHO_T}no" >&6
9280 fi
9281
9282 test -n "$NCURSES_CONFIG" && break
9283 done
9284 fi
9285 if test -z "$NCURSES_CONFIG"; then
9286 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9287 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9288 do
9289 # Extract the first word of "$ac_prog", so it can be a program name with args.
9290 set dummy $ac_prog; ac_word=$2
9291 echo "$as_me:9291: checking for $ac_word" >&5
9292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9293 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9294 echo $ECHO_N "(cached) $ECHO_C" >&6
9295 else
9296 if test -n "$ac_ct_NCURSES_CONFIG"; then
9297 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9298 else
9299 ac_save_IFS=$IFS; IFS=$ac_path_separator
9300 ac_dummy="$PATH"
9301 for ac_dir in $ac_dummy; do
9302 IFS=$ac_save_IFS
9303 test -z "$ac_dir" && ac_dir=.
9304 $as_executable_p "$ac_dir/$ac_word" || continue
9305 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9306 echo "$as_me:9306: found $ac_dir/$ac_word" >&5
9307 break
9308 done
9309
9310 fi
9311 fi
9312 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9313 if test -n "$ac_ct_NCURSES_CONFIG"; then
9314 echo "$as_me:9314: result: $ac_ct_NCURSES_CONFIG" >&5
9315 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9316 else
9317 echo "$as_me:9317: result: no" >&5
9318 echo "${ECHO_T}no" >&6
9319 fi
9320
9321 test -n "$ac_ct_NCURSES_CONFIG" && break
9322 done
9323 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9324
9325 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9326 fi
9327
9328 if test "$NCURSES_CONFIG" != none ; then
9329
9330 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9331 do
9332 case "x$cf_add_cflags" in
9333 (x-[DU]*)
9334
9335 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9336 while true
9337 do
9338 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'`
9339 test "$CFLAGS" != "$cf_old_cflag" || break
9340
9341 CFLAGS="$cf_old_cflag"
9342 done
9343
9344 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9345 while true
9346 do
9347 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'`
9348 test "$CPPFLAGS" != "$cf_old_cflag" || break
9349
9350 CPPFLAGS="$cf_old_cflag"
9351 done
9352
9353 ;;
9354 esac
9355
9356 cf_fix_cppflags=no
9357 cf_new_cflags=
9358 cf_new_cppflags=
9359 cf_new_extra_cppflags=
9360
9361 for cf_add_cflags in $cf_add_cflags
9362 do
9363 case "$cf_fix_cppflags" in
9364 (no)
9365 case "$cf_add_cflags" in
9366 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9367 case "$cf_add_cflags" in
9368 (-D*)
9369 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9370
9371 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9372 && test -z "${cf_tst_cflags}" \
9373 && cf_fix_cppflags=yes
9374
9375 if test "$cf_fix_cppflags" = yes ; then
9376
9377 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9378 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9379
9380 continue
9381 elif test "${cf_tst_cflags}" = "\"'" ; then
9382
9383 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9384 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9385
9386 continue
9387 fi
9388 ;;
9389 esac
9390 case "$CPPFLAGS" in
9391 (*$cf_add_cflags)
9392 ;;
9393 (*)
9394 case "$cf_add_cflags" in
9395 (-D*)
9396 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9397
9398 CPPFLAGS=`echo "$CPPFLAGS" | \
9399 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9400 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9401
9402 ;;
9403 esac
9404
9405 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9406 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9407
9408 ;;
9409 esac
9410 ;;
9411 (*)
9412
9413 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9414 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9415
9416 ;;
9417 esac
9418 ;;
9419 (yes)
9420
9421 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9422 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9423
9424 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9425
9426 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9427 && test -z "${cf_tst_cflags}" \
9428 && cf_fix_cppflags=no
9429 ;;
9430 esac
9431 done
9432
9433 if test -n "$cf_new_cflags" ; then
9434
9435 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9436 CFLAGS="${CFLAGS}$cf_new_cflags"
9437
9438 fi
9439
9440 if test -n "$cf_new_cppflags" ; then
9441
9442 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9443 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9444
9445 fi
9446
9447 if test -n "$cf_new_extra_cppflags" ; then
9448
9449 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9450 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9451
9452 fi
9453
9454 done
9455
9456 cf_add_libs="$LIBS"
9457 # reverse order
9458 cf_add_0lib=
9459 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9460 # filter duplicates
9461 for cf_add_1lib in $cf_add_0lib; do
9462 for cf_add_2lib in $cf_add_libs; do
9463 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9464 cf_add_1lib=
9465 break
9466 fi
9467 done
9468 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9469 done
9470 LIBS="$cf_add_libs"
9471
9472 # even with config script, some packages use no-override for curses.h
9473
9474 echo "$as_me:9474: checking if we have identified curses headers" >&5
9475 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9476 if test "${cf_cv_ncurses_header+set}" = set; then
9477 echo $ECHO_N "(cached) $ECHO_C" >&6
9478 else
9479
9480 cf_cv_ncurses_header=none
9481 for cf_header in \
9482 ncurses.h $cf_cv_screen/ncurses.h \
9483 curses.h $cf_cv_screen/curses.h
9484 do
9485 cat >"conftest.$ac_ext" <<_ACEOF
9486 #line 9486 "configure"
9487 #include "confdefs.h"
9488 #include <${cf_header}>
9489 int
9490 main (void)
9491 {
9492 initscr(); endwin()
9493 ;
9494 return 0;
9495 }
9496 _ACEOF
9497 rm -f "conftest.$ac_objext"
9498 if { (eval echo "$as_me:9498: \"$ac_compile\"") >&5
9499 (eval $ac_compile) 2>&5
9500 ac_status=$?
9501 echo "$as_me:9501: \$? = $ac_status" >&5
9502 (exit "$ac_status"); } &&
9503 { ac_try='test -s "conftest.$ac_objext"'
9504 { (eval echo "$as_me:9504: \"$ac_try\"") >&5
9505 (eval $ac_try) 2>&5
9506 ac_status=$?
9507 echo "$as_me:9507: \$? = $ac_status" >&5
9508 (exit "$ac_status"); }; }; then
9509 cf_cv_ncurses_header=$cf_header; break
9510 else
9511 echo "$as_me: failed program was:" >&5
9512 cat "conftest.$ac_ext" >&5
9513 fi
9514 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9515 done
9516
9517 fi
9518 echo "$as_me:9518: result: $cf_cv_ncurses_header" >&5
9519 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9520
9521 if test "$cf_cv_ncurses_header" = none ; then
9522 { { echo "$as_me:9522: error: No curses header-files found" >&5
9523 echo "$as_me: error: No curses header-files found" >&2;}
9524 { (exit 1); exit 1; }; }
9525 fi
9526
9527 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9528
9529 for ac_header in $cf_cv_ncurses_header
9530 do
9531 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9532 echo "$as_me:9532: checking for $ac_header" >&5
9533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9535 echo $ECHO_N "(cached) $ECHO_C" >&6
9536 else
9537 cat >"conftest.$ac_ext" <<_ACEOF
9538 #line 9538 "configure"
9539 #include "confdefs.h"
9540 #include <$ac_header>
9541 _ACEOF
9542 if { (eval echo "$as_me:9542: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9543 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9544 ac_status=$?
9545 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9546 rm -f conftest.er1
9547 cat conftest.err >&5
9548 echo "$as_me:9548: \$? = $ac_status" >&5
9549 (exit "$ac_status"); } >/dev/null; then
9550 if test -s conftest.err; then
9551 ac_cpp_err=$ac_c_preproc_warn_flag
9552 else
9553 ac_cpp_err=
9554 fi
9555 else
9556 ac_cpp_err=yes
9557 fi
9558 if test -z "$ac_cpp_err"; then
9559 eval "$as_ac_Header=yes"
9560 else
9561 echo "$as_me: failed program was:" >&5
9562 cat "conftest.$ac_ext" >&5
9563 eval "$as_ac_Header=no"
9564 fi
9565 rm -f conftest.err "conftest.$ac_ext"
9566 fi
9567 echo "$as_me:9567: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9568 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9569 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9570 cat >>confdefs.h <<EOF
9571 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9572 EOF
9573
9574 fi
9575 done
9576
9577 cat >>confdefs.h <<\EOF
9578 #define NCURSES 1
9579 EOF
9580
9581 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9582
9583 cat >>confdefs.h <<EOF
9584 #define $cf_nculib_ROOT 1
9585 EOF
9586
9587 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9588
9589 else
9590
9591 cf_ncuhdr_root=$cf_cv_screen
9592
9593 test -n "$cf_cv_curses_dir" && \
9594 test "$cf_cv_curses_dir" != "no" && { \
9595
9596 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9597 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9598 do
9599 while test "$cf_add_incdir" != /usr/include
9600 do
9601 if test -d "$cf_add_incdir"
9602 then
9603 cf_have_incdir=no
9604 if test -n "$CFLAGS$CPPFLAGS" ; then
9605 # a loop is needed to ensure we can add subdirs of existing dirs
9606 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9607 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9608 cf_have_incdir=yes; break
9609 fi
9610 done
9611 fi
9612
9613 if test "$cf_have_incdir" = no ; then
9614 if test "$cf_add_incdir" = /usr/local/include ; then
9615 if test "$GCC" = yes
9616 then
9617 cf_save_CPPFLAGS=$CPPFLAGS
9618
9619 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9620 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9621
9622 cat >"conftest.$ac_ext" <<_ACEOF
9623 #line 9623 "configure"
9624 #include "confdefs.h"
9625 #include <stdio.h>
9626 int
9627 main (void)
9628 {
9629 printf("Hello")
9630 ;
9631 return 0;
9632 }
9633 _ACEOF
9634 rm -f "conftest.$ac_objext"
9635 if { (eval echo "$as_me:9635: \"$ac_compile\"") >&5
9636 (eval $ac_compile) 2>&5
9637 ac_status=$?
9638 echo "$as_me:9638: \$? = $ac_status" >&5
9639 (exit "$ac_status"); } &&
9640 { ac_try='test -s "conftest.$ac_objext"'
9641 { (eval echo "$as_me:9641: \"$ac_try\"") >&5
9642 (eval $ac_try) 2>&5
9643 ac_status=$?
9644 echo "$as_me:9644: \$? = $ac_status" >&5
9645 (exit "$ac_status"); }; }; then
9646 :
9647 else
9648 echo "$as_me: failed program was:" >&5
9649 cat "conftest.$ac_ext" >&5
9650 cf_have_incdir=yes
9651 fi
9652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9653 CPPFLAGS=$cf_save_CPPFLAGS
9654 fi
9655 fi
9656 fi
9657
9658 if test "$cf_have_incdir" = no ; then
9659 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9660
9661 echo "${as_me:-configure}:9661: testing adding $cf_add_incdir to include-path ..." 1>&5
9662
9663 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9664
9665 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9666 test "$cf_top_incdir" = "$cf_add_incdir" && break
9667 cf_add_incdir="$cf_top_incdir"
9668 else
9669 break
9670 fi
9671 else
9672 break
9673 fi
9674 done
9675 done
9676 fi
9677
9678 }
9679
9680 echo "$as_me:9680: checking for $cf_ncuhdr_root header in include-path" >&5
9681 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9682 if test "${cf_cv_ncurses_h+set}" = set; then
9683 echo $ECHO_N "(cached) $ECHO_C" >&6
9684 else
9685
9686 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9687 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9688 for cf_header in $cf_header_list
9689 do
9690
9691 cat >"conftest.$ac_ext" <<_ACEOF
9692 #line 9692 "configure"
9693 #include "confdefs.h"
9694
9695 #include <$cf_header>
9696 int
9697 main (void)
9698 {
9699
9700 #ifdef NCURSES_VERSION
9701
9702 printf("%s\\n", NCURSES_VERSION);
9703 #else
9704 #ifdef __NCURSES_H
9705 printf("old\\n");
9706 #else
9707 #error __NCURSES_H is not defined
9708 #endif
9709 #endif
9710
9711 ;
9712 return 0;
9713 }
9714 _ACEOF
9715 rm -f "conftest.$ac_objext"
9716 if { (eval echo "$as_me:9716: \"$ac_compile\"") >&5
9717 (eval $ac_compile) 2>&5
9718 ac_status=$?
9719 echo "$as_me:9719: \$? = $ac_status" >&5
9720 (exit "$ac_status"); } &&
9721 { ac_try='test -s "conftest.$ac_objext"'
9722 { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9723 (eval $ac_try) 2>&5
9724 ac_status=$?
9725 echo "$as_me:9725: \$? = $ac_status" >&5
9726 (exit "$ac_status"); }; }; then
9727 cf_cv_ncurses_h=$cf_header
9728
9729 else
9730 echo "$as_me: failed program was:" >&5
9731 cat "conftest.$ac_ext" >&5
9732 cf_cv_ncurses_h=no
9733 fi
9734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9735
9736 test "$cf_cv_ncurses_h" != no && break
9737 done
9738
9739 fi
9740 echo "$as_me:9740: result: $cf_cv_ncurses_h" >&5
9741 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9742
9743 if test "$cf_cv_ncurses_h" != no ; then
9744 cf_cv_ncurses_header=$cf_cv_ncurses_h
9745 else
9746
9747 echo "$as_me:9747: checking for $cf_ncuhdr_root include-path" >&5
9748 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9749 if test "${cf_cv_ncurses_h2+set}" = set; then
9750 echo $ECHO_N "(cached) $ECHO_C" >&6
9751 else
9752
9753 test -n "$verbose" && echo
9754
9755 cf_search=
9756
9757 # collect the current set of include-directories from compiler flags
9758 cf_header_path_list=""
9759 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9760 for cf_header_path in $CPPFLAGS $CFLAGS
9761 do
9762 case "$cf_header_path" in
9763 (-I*)
9764 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9765
9766 test "x$cf_header_path" != "xNONE" && \
9767 test -d "$cf_header_path" && \
9768 {
9769 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9770 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9771 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9772 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9773 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9774 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"
9775 }
9776
9777 cf_header_path_list="$cf_header_path_list $cf_search"
9778 ;;
9779 esac
9780 done
9781 fi
9782
9783 # add the variations for the package we are looking for
9784
9785 cf_search=
9786
9787 test "x$prefix" != "xNONE" && \
9788 test -d "$prefix" && \
9789 {
9790 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9791 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9792 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9793 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9794 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9795 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9796 }
9797
9798 for cf_subdir_prefix in \
9799 /usr \
9800 /usr/local \
9801 /usr/pkg \
9802 /opt \
9803 /opt/local \
9804 $HOME
9805 do
9806
9807 test "x$cf_subdir_prefix" != "x$prefix" && \
9808 test -d "$cf_subdir_prefix" && \
9809 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9810 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9811 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9812 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9813 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9814 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9815 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"
9816 }
9817
9818 done
9819
9820 test "$includedir" != NONE && \
9821 test "$includedir" != "/usr/include" && \
9822 test -d "$includedir" && {
9823 test -d "$includedir" && cf_search="$cf_search $includedir"
9824 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9825 }
9826
9827 test "$oldincludedir" != NONE && \
9828 test "$oldincludedir" != "/usr/include" && \
9829 test -d "$oldincludedir" && {
9830 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9831 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9832 }
9833
9834 cf_search="$cf_search $cf_header_path_list"
9835
9836 test -n "$verbose" && echo "search path $cf_search"
9837 cf_save2_CPPFLAGS="$CPPFLAGS"
9838 for cf_incdir in $cf_search
9839 do
9840
9841 if test -n "$cf_incdir" ; then
9842 for cf_add_incdir in $cf_incdir
9843 do
9844 while test "$cf_add_incdir" != /usr/include
9845 do
9846 if test -d "$cf_add_incdir"
9847 then
9848 cf_have_incdir=no
9849 if test -n "$CFLAGS$CPPFLAGS" ; then
9850 # a loop is needed to ensure we can add subdirs of existing dirs
9851 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9852 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9853 cf_have_incdir=yes; break
9854 fi
9855 done
9856 fi
9857
9858 if test "$cf_have_incdir" = no ; then
9859 if test "$cf_add_incdir" = /usr/local/include ; then
9860 if test "$GCC" = yes
9861 then
9862 cf_save_CPPFLAGS=$CPPFLAGS
9863
9864 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9865 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9866
9867 cat >"conftest.$ac_ext" <<_ACEOF
9868 #line 9868 "configure"
9869 #include "confdefs.h"
9870 #include <stdio.h>
9871 int
9872 main (void)
9873 {
9874 printf("Hello")
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 :
9892 else
9893 echo "$as_me: failed program was:" >&5
9894 cat "conftest.$ac_ext" >&5
9895 cf_have_incdir=yes
9896 fi
9897 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9898 CPPFLAGS=$cf_save_CPPFLAGS
9899 fi
9900 fi
9901 fi
9902
9903 if test "$cf_have_incdir" = no ; then
9904 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9905
9906 echo "${as_me:-configure}:9906: testing adding $cf_add_incdir to include-path ..." 1>&5
9907
9908 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9909
9910 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9911 test "$cf_top_incdir" = "$cf_add_incdir" && break
9912 cf_add_incdir="$cf_top_incdir"
9913 else
9914 break
9915 fi
9916 else
9917 break
9918 fi
9919 done
9920 done
9921 fi
9922
9923 for cf_header in \
9924 ncurses.h \
9925 curses.h
9926 do
9927
9928 cat >"conftest.$ac_ext" <<_ACEOF
9929 #line 9929 "configure"
9930 #include "confdefs.h"
9931
9932 #include <$cf_header>
9933 int
9934 main (void)
9935 {
9936
9937 #ifdef NCURSES_VERSION
9938
9939 printf("%s\\n", NCURSES_VERSION);
9940 #else
9941 #ifdef __NCURSES_H
9942 printf("old\\n");
9943 #else
9944 #error __NCURSES_H is not defined
9945 #endif
9946 #endif
9947
9948 ;
9949 return 0;
9950 }
9951 _ACEOF
9952 rm -f "conftest.$ac_objext"
9953 if { (eval echo "$as_me:9953: \"$ac_compile\"") >&5
9954 (eval $ac_compile) 2>&5
9955 ac_status=$?
9956 echo "$as_me:9956: \$? = $ac_status" >&5
9957 (exit "$ac_status"); } &&
9958 { ac_try='test -s "conftest.$ac_objext"'
9959 { (eval echo "$as_me:9959: \"$ac_try\"") >&5
9960 (eval $ac_try) 2>&5
9961 ac_status=$?
9962 echo "$as_me:9962: \$? = $ac_status" >&5
9963 (exit "$ac_status"); }; }; then
9964 cf_cv_ncurses_h2=$cf_header
9965
9966 else
9967 echo "$as_me: failed program was:" >&5
9968 cat "conftest.$ac_ext" >&5
9969 cf_cv_ncurses_h2=no
9970 fi
9971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9972
9973 if test "$cf_cv_ncurses_h2" != no ; then
9974 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9975 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9976 break
9977 fi
9978 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9979 done
9980 CPPFLAGS="$cf_save2_CPPFLAGS"
9981 test "$cf_cv_ncurses_h2" != no && break
9982 done
9983 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9983: error: not found" >&5
9984 echo "$as_me: error: not found" >&2;}
9985 { (exit 1); exit 1; }; }
9986
9987 fi
9988 echo "$as_me:9988: result: $cf_cv_ncurses_h2" >&5
9989 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9990
9991 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9992 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9993 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9994 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9995 fi
9996
9997 if test -n "$cf_1st_incdir" ; then
9998 for cf_add_incdir in $cf_1st_incdir
9999 do
10000 while test "$cf_add_incdir" != /usr/include
10001 do
10002 if test -d "$cf_add_incdir"
10003 then
10004 cf_have_incdir=no
10005 if test -n "$CFLAGS$CPPFLAGS" ; then
10006 # a loop is needed to ensure we can add subdirs of existing dirs
10007 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10008 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10009 cf_have_incdir=yes; break
10010 fi
10011 done
10012 fi
10013
10014 if test "$cf_have_incdir" = no ; then
10015 if test "$cf_add_incdir" = /usr/local/include ; then
10016 if test "$GCC" = yes
10017 then
10018 cf_save_CPPFLAGS=$CPPFLAGS
10019
10020 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10021 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10022
10023 cat >"conftest.$ac_ext" <<_ACEOF
10024 #line 10024 "configure"
10025 #include "confdefs.h"
10026 #include <stdio.h>
10027 int
10028 main (void)
10029 {
10030 printf("Hello")
10031 ;
10032 return 0;
10033 }
10034 _ACEOF
10035 rm -f "conftest.$ac_objext"
10036 if { (eval echo "$as_me:10036: \"$ac_compile\"") >&5
10037 (eval $ac_compile) 2>&5
10038 ac_status=$?
10039 echo "$as_me:10039: \$? = $ac_status" >&5
10040 (exit "$ac_status"); } &&
10041 { ac_try='test -s "conftest.$ac_objext"'
10042 { (eval echo "$as_me:10042: \"$ac_try\"") >&5
10043 (eval $ac_try) 2>&5
10044 ac_status=$?
10045 echo "$as_me:10045: \$? = $ac_status" >&5
10046 (exit "$ac_status"); }; }; then
10047 :
10048 else
10049 echo "$as_me: failed program was:" >&5
10050 cat "conftest.$ac_ext" >&5
10051 cf_have_incdir=yes
10052 fi
10053 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10054 CPPFLAGS=$cf_save_CPPFLAGS
10055 fi
10056 fi
10057 fi
10058
10059 if test "$cf_have_incdir" = no ; then
10060 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10061
10062 echo "${as_me:-configure}:10062: testing adding $cf_add_incdir to include-path ..." 1>&5
10063
10064 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10065
10066 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10067 test "$cf_top_incdir" = "$cf_add_incdir" && break
10068 cf_add_incdir="$cf_top_incdir"
10069 else
10070 break
10071 fi
10072 else
10073 break
10074 fi
10075 done
10076 done
10077 fi
10078
10079 fi
10080
10081 # Set definitions to allow ifdef'ing for ncurses.h
10082
10083 case "$cf_cv_ncurses_header" in
10084 (*ncurses.h)
10085
10086 cat >>confdefs.h <<\EOF
10087 #define HAVE_NCURSES_H 1
10088 EOF
10089
10090 ;;
10091 esac
10092
10093 case "$cf_cv_ncurses_header" in
10094 (ncurses/curses.h|ncurses/ncurses.h)
10095
10096 cat >>confdefs.h <<\EOF
10097 #define HAVE_NCURSES_NCURSES_H 1
10098 EOF
10099
10100 ;;
10101 (ncursesw/curses.h|ncursesw/ncurses.h)
10102
10103 cat >>confdefs.h <<\EOF
10104 #define HAVE_NCURSESW_NCURSES_H 1
10105 EOF
10106
10107 ;;
10108 esac
10109
10110 echo "$as_me:10110: checking for terminfo header" >&5
10111 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10112 if test "${cf_cv_term_header+set}" = set; then
10113 echo $ECHO_N "(cached) $ECHO_C" >&6
10114 else
10115
10116 case "${cf_cv_ncurses_header}" in
10117 (*/ncurses.h|*/ncursesw.h)
10118 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10119 ;;
10120 (*)
10121 cf_term_header=term.h
10122 ;;
10123 esac
10124
10125 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10126 do
10127 cat >"conftest.$ac_ext" <<_ACEOF
10128 #line 10128 "configure"
10129 #include "confdefs.h"
10130 #include <stdio.h>
10131 #include <${cf_cv_ncurses_header:-curses.h}>
10132 #include <$cf_test>
10133
10134 int
10135 main (void)
10136 {
10137 int x = auto_left_margin; (void)x
10138 ;
10139 return 0;
10140 }
10141 _ACEOF
10142 rm -f "conftest.$ac_objext"
10143 if { (eval echo "$as_me:10143: \"$ac_compile\"") >&5
10144 (eval $ac_compile) 2>&5
10145 ac_status=$?
10146 echo "$as_me:10146: \$? = $ac_status" >&5
10147 (exit "$ac_status"); } &&
10148 { ac_try='test -s "conftest.$ac_objext"'
10149 { (eval echo "$as_me:10149: \"$ac_try\"") >&5
10150 (eval $ac_try) 2>&5
10151 ac_status=$?
10152 echo "$as_me:10152: \$? = $ac_status" >&5
10153 (exit "$ac_status"); }; }; then
10154
10155 cf_cv_term_header="$cf_test"
10156 else
10157 echo "$as_me: failed program was:" >&5
10158 cat "conftest.$ac_ext" >&5
10159
10160 cf_cv_term_header=unknown
10161
10162 fi
10163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10164 test "$cf_cv_term_header" != unknown && break
10165 done
10166
10167 fi
10168 echo "$as_me:10168: result: $cf_cv_term_header" >&5
10169 echo "${ECHO_T}$cf_cv_term_header" >&6
10170
10171 # Set definitions to allow ifdef'ing to accommodate subdirectories
10172
10173 case "$cf_cv_term_header" in
10174 (*term.h)
10175
10176 cat >>confdefs.h <<\EOF
10177 #define HAVE_TERM_H 1
10178 EOF
10179
10180 ;;
10181 esac
10182
10183 case "$cf_cv_term_header" in
10184 (ncurses/term.h)
10185
10186 cat >>confdefs.h <<\EOF
10187 #define HAVE_NCURSES_TERM_H 1
10188 EOF
10189
10190 ;;
10191 (ncursesw/term.h)
10192
10193 cat >>confdefs.h <<\EOF
10194 #define HAVE_NCURSESW_TERM_H 1
10195 EOF
10196
10197 ;;
10198 esac
10199
10200 # some applications need this, but should check for NCURSES_VERSION
10201
10202 cat >>confdefs.h <<\EOF
10203 #define NCURSES 1
10204 EOF
10205
10206 echo "$as_me:10206: checking for ncurses version" >&5
10207 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10208 if test "${cf_cv_ncurses_version+set}" = set; then
10209 echo $ECHO_N "(cached) $ECHO_C" >&6
10210 else
10211
10212 cf_cv_ncurses_version=no
10213 cf_tempfile=out$$
10214 rm -f "$cf_tempfile"
10215 if test "$cross_compiling" = yes; then
10216
10217 # This will not work if the preprocessor splits the line after the
10218 # Autoconf token. The 'unproto' program does that.
10219 cat > "conftest.$ac_ext" <<EOF
10220 #include <${cf_cv_ncurses_header:-curses.h}>
10221 #undef Autoconf
10222 #ifdef NCURSES_VERSION
10223 Autoconf NCURSES_VERSION
10224 #else
10225 #ifdef __NCURSES_H
10226 Autoconf "old"
10227 #endif
10228 ;
10229 #endif
10230 EOF
10231 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10232 { (eval echo "$as_me:10232: \"$cf_try\"") >&5
10233 (eval $cf_try) 2>&5
10234 ac_status=$?
10235 echo "$as_me:10235: \$? = $ac_status" >&5
10236 (exit "$ac_status"); }
10237 if test -f conftest.out ; then
10238 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10239 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10240 rm -f conftest.out
10241 fi
10242
10243 else
10244 cat >"conftest.$ac_ext" <<_ACEOF
10245 #line 10245 "configure"
10246 #include "confdefs.h"
10247
10248 $ac_includes_default
10249
10250 #include <${cf_cv_ncurses_header:-curses.h}>
10251
10252 int main(void)
10253 {
10254 FILE *fp = fopen("$cf_tempfile", "w");
10255 #ifdef NCURSES_VERSION
10256 # ifdef NCURSES_VERSION_PATCH
10257 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10258 # else
10259 fprintf(fp, "%s\\n", NCURSES_VERSION);
10260 # endif
10261 #else
10262 # ifdef __NCURSES_H
10263 fprintf(fp, "old\\n");
10264 # else
10265 #error expected ncurses header to define __NCURSES_H
10266 # endif
10267 #endif
10268 ${cf_cv_main_return:-return}(0);
10269 }
10270 _ACEOF
10271 rm -f "conftest$ac_exeext"
10272 if { (eval echo "$as_me:10272: \"$ac_link\"") >&5
10273 (eval $ac_link) 2>&5
10274 ac_status=$?
10275 echo "$as_me:10275: \$? = $ac_status" >&5
10276 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10277 { (eval echo "$as_me:10277: \"$ac_try\"") >&5
10278 (eval $ac_try) 2>&5
10279 ac_status=$?
10280 echo "$as_me:10280: \$? = $ac_status" >&5
10281 (exit "$ac_status"); }; }; then
10282
10283 cf_cv_ncurses_version=`cat $cf_tempfile`
10284 else
10285 echo "$as_me: program exited with status $ac_status" >&5
10286 echo "$as_me: failed program was:" >&5
10287 cat "conftest.$ac_ext" >&5
10288 fi
10289 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10290 fi
10291 rm -f "$cf_tempfile"
10292
10293 fi
10294 echo "$as_me:10294: result: $cf_cv_ncurses_version" >&5
10295 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10296 test "$cf_cv_ncurses_version" = no ||
10297 cat >>confdefs.h <<\EOF
10298 #define NCURSES 1
10299 EOF
10300
10301 cf_nculib_root=$cf_cv_screen
10302 # This works, except for the special case where we find gpm, but
10303 # ncurses is in a nonstandard location via $LIBS, and we really want
10304 # to link gpm.
10305 cf_ncurses_LIBS=""
10306 cf_ncurses_SAVE="$LIBS"
10307 echo "$as_me:10307: checking for Gpm_Open in -lgpm" >&5
10308 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10309 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10310 echo $ECHO_N "(cached) $ECHO_C" >&6
10311 else
10312 ac_check_lib_save_LIBS=$LIBS
10313 LIBS="-lgpm $LIBS"
10314 cat >"conftest.$ac_ext" <<_ACEOF
10315 #line 10315 "configure"
10316 #include "confdefs.h"
10317
10318 /* Override any gcc2 internal prototype to avoid an error. */
10319 #ifdef __cplusplus
10320 extern "C"
10321 #endif
10322 /* We use char because int might match the return type of a gcc2
10323 builtin and then its argument prototype would still apply. */
10324 char Gpm_Open (void);
10325 int
10326 main (void)
10327 {
10328 Gpm_Open ();
10329 ;
10330 return 0;
10331 }
10332 _ACEOF
10333 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10334 if { (eval echo "$as_me:10334: \"$ac_link\"") >&5
10335 (eval $ac_link) 2>&5
10336 ac_status=$?
10337 echo "$as_me:10337: \$? = $ac_status" >&5
10338 (exit "$ac_status"); } &&
10339 { ac_try='test -s "conftest$ac_exeext"'
10340 { (eval echo "$as_me:10340: \"$ac_try\"") >&5
10341 (eval $ac_try) 2>&5
10342 ac_status=$?
10343 echo "$as_me:10343: \$? = $ac_status" >&5
10344 (exit "$ac_status"); }; }; then
10345 ac_cv_lib_gpm_Gpm_Open=yes
10346 else
10347 echo "$as_me: failed program was:" >&5
10348 cat "conftest.$ac_ext" >&5
10349 ac_cv_lib_gpm_Gpm_Open=no
10350 fi
10351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10352 LIBS=$ac_check_lib_save_LIBS
10353 fi
10354 echo "$as_me:10354: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10355 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10356 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10357 echo "$as_me:10357: checking for initscr in -lgpm" >&5
10358 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10359 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10360 echo $ECHO_N "(cached) $ECHO_C" >&6
10361 else
10362 ac_check_lib_save_LIBS=$LIBS
10363 LIBS="-lgpm $LIBS"
10364 cat >"conftest.$ac_ext" <<_ACEOF
10365 #line 10365 "configure"
10366 #include "confdefs.h"
10367
10368 /* Override any gcc2 internal prototype to avoid an error. */
10369 #ifdef __cplusplus
10370 extern "C"
10371 #endif
10372 /* We use char because int might match the return type of a gcc2
10373 builtin and then its argument prototype would still apply. */
10374 char initscr (void);
10375 int
10376 main (void)
10377 {
10378 initscr ();
10379 ;
10380 return 0;
10381 }
10382 _ACEOF
10383 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10384 if { (eval echo "$as_me:10384: \"$ac_link\"") >&5
10385 (eval $ac_link) 2>&5
10386 ac_status=$?
10387 echo "$as_me:10387: \$? = $ac_status" >&5
10388 (exit "$ac_status"); } &&
10389 { ac_try='test -s "conftest$ac_exeext"'
10390 { (eval echo "$as_me:10390: \"$ac_try\"") >&5
10391 (eval $ac_try) 2>&5
10392 ac_status=$?
10393 echo "$as_me:10393: \$? = $ac_status" >&5
10394 (exit "$ac_status"); }; }; then
10395 ac_cv_lib_gpm_initscr=yes
10396 else
10397 echo "$as_me: failed program was:" >&5
10398 cat "conftest.$ac_ext" >&5
10399 ac_cv_lib_gpm_initscr=no
10400 fi
10401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10402 LIBS=$ac_check_lib_save_LIBS
10403 fi
10404 echo "$as_me:10404: result: $ac_cv_lib_gpm_initscr" >&5
10405 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10406 if test "$ac_cv_lib_gpm_initscr" = yes; then
10407 LIBS="$cf_ncurses_SAVE"
10408 else
10409 cf_ncurses_LIBS="-lgpm"
10410 fi
10411
10412 fi
10413
10414 case "$host_os" in
10415 (freebsd*)
10416 # This is only necessary if you are linking against an obsolete
10417 # version of ncurses (but it should do no harm, since it is static).
10418 if test "$cf_nculib_root" = ncurses ; then
10419 echo "$as_me:10419: checking for tgoto in -lmytinfo" >&5
10420 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10421 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10422 echo $ECHO_N "(cached) $ECHO_C" >&6
10423 else
10424 ac_check_lib_save_LIBS=$LIBS
10425 LIBS="-lmytinfo $LIBS"
10426 cat >"conftest.$ac_ext" <<_ACEOF
10427 #line 10427 "configure"
10428 #include "confdefs.h"
10429
10430 /* Override any gcc2 internal prototype to avoid an error. */
10431 #ifdef __cplusplus
10432 extern "C"
10433 #endif
10434 /* We use char because int might match the return type of a gcc2
10435 builtin and then its argument prototype would still apply. */
10436 char tgoto (void);
10437 int
10438 main (void)
10439 {
10440 tgoto ();
10441 ;
10442 return 0;
10443 }
10444 _ACEOF
10445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10446 if { (eval echo "$as_me:10446: \"$ac_link\"") >&5
10447 (eval $ac_link) 2>&5
10448 ac_status=$?
10449 echo "$as_me:10449: \$? = $ac_status" >&5
10450 (exit "$ac_status"); } &&
10451 { ac_try='test -s "conftest$ac_exeext"'
10452 { (eval echo "$as_me:10452: \"$ac_try\"") >&5
10453 (eval $ac_try) 2>&5
10454 ac_status=$?
10455 echo "$as_me:10455: \$? = $ac_status" >&5
10456 (exit "$ac_status"); }; }; then
10457 ac_cv_lib_mytinfo_tgoto=yes
10458 else
10459 echo "$as_me: failed program was:" >&5
10460 cat "conftest.$ac_ext" >&5
10461 ac_cv_lib_mytinfo_tgoto=no
10462 fi
10463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10464 LIBS=$ac_check_lib_save_LIBS
10465 fi
10466 echo "$as_me:10466: result: $ac_cv_lib_mytinfo_tgoto" >&5
10467 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10468 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
10469 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10470 fi
10471
10472 fi
10473 ;;
10474 esac
10475
10476 cf_add_libs="$LIBS"
10477 # reverse order
10478 cf_add_0lib=
10479 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10480 # filter duplicates
10481 for cf_add_1lib in $cf_add_0lib; do
10482 for cf_add_2lib in $cf_add_libs; do
10483 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10484 cf_add_1lib=
10485 break
10486 fi
10487 done
10488 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10489 done
10490 LIBS="$cf_add_libs"
10491
10492 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
10493 then
10494
10495 cf_add_libs="$LIBS"
10496 # reverse order
10497 cf_add_0lib=
10498 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10499 # filter duplicates
10500 for cf_add_1lib in $cf_add_0lib; do
10501 for cf_add_2lib in $cf_add_libs; do
10502 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10503 cf_add_1lib=
10504 break
10505 fi
10506 done
10507 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10508 done
10509 LIBS="$cf_add_libs"
10510
10511 else
10512
10513 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10514 cf_libdir=""
10515 echo "$as_me:10515: checking for initscr" >&5
10516 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10517 if test "${ac_cv_func_initscr+set}" = set; then
10518 echo $ECHO_N "(cached) $ECHO_C" >&6
10519 else
10520 cat >"conftest.$ac_ext" <<_ACEOF
10521 #line 10521 "configure"
10522 #include "confdefs.h"
10523 #define initscr autoconf_temporary
10524 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10525 #undef initscr
10526
10527 #ifdef __cplusplus
10528 extern "C"
10529 #endif
10530
10531 /* We use char because int might match the return type of a gcc2
10532 builtin and then its argument prototype would still apply. */
10533 char initscr (void);
10534
10535 int
10536 main (void)
10537 {
10538
10539 /* The GNU C library defines stubs for functions which it implements
10540 to always fail with ENOSYS. Some functions are actually named
10541 something starting with __ and the normal name is an alias. */
10542 #if defined (__stub_initscr) || defined (__stub___initscr)
10543 #error found stub for initscr
10544 #endif
10545
10546 return initscr ();
10547 ;
10548 return 0;
10549 }
10550 _ACEOF
10551 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10552 if { (eval echo "$as_me:10552: \"$ac_link\"") >&5
10553 (eval $ac_link) 2>&5
10554 ac_status=$?
10555 echo "$as_me:10555: \$? = $ac_status" >&5
10556 (exit "$ac_status"); } &&
10557 { ac_try='test -s "conftest$ac_exeext"'
10558 { (eval echo "$as_me:10558: \"$ac_try\"") >&5
10559 (eval $ac_try) 2>&5
10560 ac_status=$?
10561 echo "$as_me:10561: \$? = $ac_status" >&5
10562 (exit "$ac_status"); }; }; then
10563 ac_cv_func_initscr=yes
10564 else
10565 echo "$as_me: failed program was:" >&5
10566 cat "conftest.$ac_ext" >&5
10567 ac_cv_func_initscr=no
10568 fi
10569 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10570 fi
10571 echo "$as_me:10571: result: $ac_cv_func_initscr" >&5
10572 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10573 if test "$ac_cv_func_initscr" = yes; then
10574 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10575 else
10576
10577 cf_save_LIBS="$LIBS"
10578 echo "$as_me:10578: checking for initscr in -l$cf_nculib_root" >&5
10579 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10580 LIBS="-l$cf_nculib_root $LIBS"
10581 cat >"conftest.$ac_ext" <<_ACEOF
10582 #line 10582 "configure"
10583 #include "confdefs.h"
10584 #include <${cf_cv_ncurses_header:-curses.h}>
10585 int
10586 main (void)
10587 {
10588 initscr()
10589 ;
10590 return 0;
10591 }
10592 _ACEOF
10593 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10594 if { (eval echo "$as_me:10594: \"$ac_link\"") >&5
10595 (eval $ac_link) 2>&5
10596 ac_status=$?
10597 echo "$as_me:10597: \$? = $ac_status" >&5
10598 (exit "$ac_status"); } &&
10599 { ac_try='test -s "conftest$ac_exeext"'
10600 { (eval echo "$as_me:10600: \"$ac_try\"") >&5
10601 (eval $ac_try) 2>&5
10602 ac_status=$?
10603 echo "$as_me:10603: \$? = $ac_status" >&5
10604 (exit "$ac_status"); }; }; then
10605 echo "$as_me:10605: result: yes" >&5
10606 echo "${ECHO_T}yes" >&6
10607 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10608
10609 else
10610 echo "$as_me: failed program was:" >&5
10611 cat "conftest.$ac_ext" >&5
10612 echo "$as_me:10612: result: no" >&5
10613 echo "${ECHO_T}no" >&6
10614
10615 cf_search=
10616 cf_library_path_list=""
10617 if test -n "${LDFLAGS}${LIBS}" ; then
10618 for cf_library_path in $LDFLAGS $LIBS
10619 do
10620 case "$cf_library_path" in
10621 (-L*)
10622 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10623
10624 test "x$cf_library_path" != "xNONE" && \
10625 test -d "$cf_library_path" && \
10626 {
10627 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10628 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10629 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10630 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10631 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10632 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"
10633 }
10634
10635 cf_library_path_list="$cf_library_path_list $cf_search"
10636 ;;
10637 esac
10638 done
10639 fi
10640
10641 cf_search=
10642
10643 test "x$prefix" != "xNONE" && \
10644 test -d "$prefix" && \
10645 {
10646 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10647 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10648 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10649 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10650 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10651 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10652 }
10653
10654 for cf_subdir_prefix in \
10655 /usr \
10656 /usr/local \
10657 /usr/pkg \
10658 /opt \
10659 /opt/local \
10660 $HOME
10661 do
10662
10663 test "x$cf_subdir_prefix" != "x$prefix" && \
10664 test -d "$cf_subdir_prefix" && \
10665 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10666 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10667 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10668 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10669 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10670 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10671 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"
10672 }
10673
10674 done
10675
10676 cf_search="$cf_library_path_list $cf_search"
10677
10678 for cf_libdir in $cf_search
10679 do
10680 echo "$as_me:10680: checking for -l$cf_nculib_root in $cf_libdir" >&5
10681 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10682 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10683 cat >"conftest.$ac_ext" <<_ACEOF
10684 #line 10684 "configure"
10685 #include "confdefs.h"
10686 #include <${cf_cv_ncurses_header:-curses.h}>
10687 int
10688 main (void)
10689 {
10690 initscr()
10691 ;
10692 return 0;
10693 }
10694 _ACEOF
10695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10696 if { (eval echo "$as_me:10696: \"$ac_link\"") >&5
10697 (eval $ac_link) 2>&5
10698 ac_status=$?
10699 echo "$as_me:10699: \$? = $ac_status" >&5
10700 (exit "$ac_status"); } &&
10701 { ac_try='test -s "conftest$ac_exeext"'
10702 { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703 (eval $ac_try) 2>&5
10704 ac_status=$?
10705 echo "$as_me:10705: \$? = $ac_status" >&5
10706 (exit "$ac_status"); }; }; then
10707 echo "$as_me:10707: result: yes" >&5
10708 echo "${ECHO_T}yes" >&6
10709 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10710 break
10711 else
10712 echo "$as_me: failed program was:" >&5
10713 cat "conftest.$ac_ext" >&5
10714 echo "$as_me:10714: result: no" >&5
10715 echo "${ECHO_T}no" >&6
10716 LIBS="$cf_save_LIBS"
10717 fi
10718 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10719 done
10720
10721 fi
10722 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10723
10724 fi
10725
10726 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10727
10728 if test "$cf_found_library" = no ; then
10729 { { echo "$as_me:10729: error: Cannot link $cf_nculib_root library" >&5
10730 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10731 { (exit 1); exit 1; }; }
10732 fi
10733
10734 fi
10735
10736 if test -n "$cf_ncurses_LIBS" ; then
10737 echo "$as_me:10737: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10738 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10739 cf_ncurses_SAVE="$LIBS"
10740 for p in $cf_ncurses_LIBS ; do
10741 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
10742 if test "$q" != "$LIBS" ; then
10743 LIBS="$q"
10744 fi
10745 done
10746 cat >"conftest.$ac_ext" <<_ACEOF
10747 #line 10747 "configure"
10748 #include "confdefs.h"
10749 #include <${cf_cv_ncurses_header:-curses.h}>
10750 int
10751 main (void)
10752 {
10753 initscr(); mousemask(0,0); tigetstr((char *)0);
10754 ;
10755 return 0;
10756 }
10757 _ACEOF
10758 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10759 if { (eval echo "$as_me:10759: \"$ac_link\"") >&5
10760 (eval $ac_link) 2>&5
10761 ac_status=$?
10762 echo "$as_me:10762: \$? = $ac_status" >&5
10763 (exit "$ac_status"); } &&
10764 { ac_try='test -s "conftest$ac_exeext"'
10765 { (eval echo "$as_me:10765: \"$ac_try\"") >&5
10766 (eval $ac_try) 2>&5
10767 ac_status=$?
10768 echo "$as_me:10768: \$? = $ac_status" >&5
10769 (exit "$ac_status"); }; }; then
10770 echo "$as_me:10770: result: yes" >&5
10771 echo "${ECHO_T}yes" >&6
10772 else
10773 echo "$as_me: failed program was:" >&5
10774 cat "conftest.$ac_ext" >&5
10775 echo "$as_me:10775: result: no" >&5
10776 echo "${ECHO_T}no" >&6
10777 LIBS="$cf_ncurses_SAVE"
10778 fi
10779 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10780 fi
10781
10782 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10783
10784 cat >>confdefs.h <<EOF
10785 #define $cf_nculib_ROOT 1
10786 EOF
10787
10788 fi
10789 else
10790 NCURSES_CONFIG=none
10791 fi
10792
10793 ;;
10794 (ncurses*)
10795
10796 cf_ncuconfig_root=$cf_cv_screen
10797 cf_have_ncuconfig=no
10798
10799 if test "x${PKG_CONFIG:=none}" != xnone; then
10800 echo "$as_me:10800: checking pkg-config for $cf_ncuconfig_root" >&5
10801 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10802 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10803 echo "$as_me:10803: result: yes" >&5
10804 echo "${ECHO_T}yes" >&6
10805
10806 echo "$as_me:10806: checking if the $cf_ncuconfig_root package files work" >&5
10807 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10808 cf_have_ncuconfig=unknown
10809
10810 cf_save_CFLAGS="$CFLAGS"
10811 cf_save_CPPFLAGS="$CPPFLAGS"
10812 cf_save_LIBS="$LIBS"
10813
10814 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10815 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10816
10817 # while -W for passing linker flags is prevalent, it is not "standard".
10818 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10819 # incompatible _and_ non-standard -W option which gives an error. Work
10820 # around that pitfall.
10821 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10822 (x*c[89]9@@*-W*)
10823
10824 cf_fix_cppflags=no
10825 cf_new_cflags=
10826 cf_new_cppflags=
10827 cf_new_extra_cppflags=
10828
10829 for cf_add_cflags in $cf_pkg_cflags
10830 do
10831 case "$cf_fix_cppflags" in
10832 (no)
10833 case "$cf_add_cflags" in
10834 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10835 case "$cf_add_cflags" in
10836 (-D*)
10837 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10838
10839 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10840 && test -z "${cf_tst_cflags}" \
10841 && cf_fix_cppflags=yes
10842
10843 if test "$cf_fix_cppflags" = yes ; then
10844
10845 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10846 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10847
10848 continue
10849 elif test "${cf_tst_cflags}" = "\"'" ; then
10850
10851 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10852 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10853
10854 continue
10855 fi
10856 ;;
10857 esac
10858 case "$CPPFLAGS" in
10859 (*$cf_add_cflags)
10860 ;;
10861 (*)
10862 case "$cf_add_cflags" in
10863 (-D*)
10864 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10865
10866 CPPFLAGS=`echo "$CPPFLAGS" | \
10867 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10868 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10869
10870 ;;
10871 esac
10872
10873 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10874 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10875
10876 ;;
10877 esac
10878 ;;
10879 (*)
10880
10881 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10882 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10883
10884 ;;
10885 esac
10886 ;;
10887 (yes)
10888
10889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10891
10892 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10893
10894 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10895 && test -z "${cf_tst_cflags}" \
10896 && cf_fix_cppflags=no
10897 ;;
10898 esac
10899 done
10900
10901 if test -n "$cf_new_cflags" ; then
10902
10903 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10904 CFLAGS="${CFLAGS}$cf_new_cflags"
10905
10906 fi
10907
10908 if test -n "$cf_new_cppflags" ; then
10909
10910 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10911 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10912
10913 fi
10914
10915 if test -n "$cf_new_extra_cppflags" ; then
10916
10917 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10918 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10919
10920 fi
10921
10922 cf_add_libs="$LIBS"
10923 # reverse order
10924 cf_add_0lib=
10925 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10926 # filter duplicates
10927 for cf_add_1lib in $cf_add_0lib; do
10928 for cf_add_2lib in $cf_add_libs; do
10929 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10930 cf_add_1lib=
10931 break
10932 fi
10933 done
10934 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10935 done
10936 LIBS="$cf_add_libs"
10937
10938 cat >"conftest.$ac_ext" <<_ACEOF
10939 #line 10939 "configure"
10940 #include "confdefs.h"
10941 #include <${cf_cv_ncurses_header:-curses.h}>
10942 int
10943 main (void)
10944 {
10945 initscr(); mousemask(0,0); tigetstr((char *)0);
10946 ;
10947 return 0;
10948 }
10949 _ACEOF
10950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10951 if { (eval echo "$as_me:10951: \"$ac_link\"") >&5
10952 (eval $ac_link) 2>&5
10953 ac_status=$?
10954 echo "$as_me:10954: \$? = $ac_status" >&5
10955 (exit "$ac_status"); } &&
10956 { ac_try='test -s "conftest$ac_exeext"'
10957 { (eval echo "$as_me:10957: \"$ac_try\"") >&5
10958 (eval $ac_try) 2>&5
10959 ac_status=$?
10960 echo "$as_me:10960: \$? = $ac_status" >&5
10961 (exit "$ac_status"); }; }; then
10962 if test "$cross_compiling" = yes; then
10963 cf_test_ncuconfig=maybe
10964 else
10965 cat >"conftest.$ac_ext" <<_ACEOF
10966 #line 10966 "configure"
10967 #include "confdefs.h"
10968 #include <${cf_cv_ncurses_header:-curses.h}>
10969 int main(void)
10970 { const char *xx = curses_version(); return (xx == 0); }
10971 _ACEOF
10972 rm -f "conftest$ac_exeext"
10973 if { (eval echo "$as_me:10973: \"$ac_link\"") >&5
10974 (eval $ac_link) 2>&5
10975 ac_status=$?
10976 echo "$as_me:10976: \$? = $ac_status" >&5
10977 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10978 { (eval echo "$as_me:10978: \"$ac_try\"") >&5
10979 (eval $ac_try) 2>&5
10980 ac_status=$?
10981 echo "$as_me:10981: \$? = $ac_status" >&5
10982 (exit "$ac_status"); }; }; then
10983 cf_test_ncuconfig=yes
10984 else
10985 echo "$as_me: program exited with status $ac_status" >&5
10986 echo "$as_me: failed program was:" >&5
10987 cat "conftest.$ac_ext" >&5
10988 cf_test_ncuconfig=no
10989 fi
10990 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10991 fi
10992 else
10993 echo "$as_me: failed program was:" >&5
10994 cat "conftest.$ac_ext" >&5
10995 cf_test_ncuconfig=no
10996 fi
10997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10998
10999 CFLAGS="$cf_save_CFLAGS"
11000 CPPFLAGS="$cf_save_CPPFLAGS"
11001 LIBS="$cf_save_LIBS"
11002
11003 if test "x$cf_test_ncuconfig" != xyes; then
11004 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
11005 cf_pkg_cflags="$cf_temp"
11006 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
11007 cf_pkg_libs="$cf_temp"
11008 fi
11009 ;;
11010 esac
11011
11012 for cf_required in $cf_ncuconfig_root
11013 do
11014 # check for duplicates
11015 for cf_require_pkg in $REQUIRE_PKG
11016 do
11017 if test "$cf_required" = "$cf_require_pkg"
11018 then
11019 cf_required=
11020 break
11021 fi
11022 done
11023 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
11024 done
11025
11026 for cf_add_cflags in $cf_pkg_cflags
11027 do
11028 case "x$cf_add_cflags" in
11029 (x-[DU]*)
11030
11031 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11032 while true
11033 do
11034 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'`
11035 test "$CFLAGS" != "$cf_old_cflag" || break
11036
11037 CFLAGS="$cf_old_cflag"
11038 done
11039
11040 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11041 while true
11042 do
11043 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'`
11044 test "$CPPFLAGS" != "$cf_old_cflag" || break
11045
11046 CPPFLAGS="$cf_old_cflag"
11047 done
11048
11049 ;;
11050 esac
11051
11052 cf_fix_cppflags=no
11053 cf_new_cflags=
11054 cf_new_cppflags=
11055 cf_new_extra_cppflags=
11056
11057 for cf_add_cflags in $cf_add_cflags
11058 do
11059 case "$cf_fix_cppflags" in
11060 (no)
11061 case "$cf_add_cflags" in
11062 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11063 case "$cf_add_cflags" in
11064 (-D*)
11065 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11066
11067 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11068 && test -z "${cf_tst_cflags}" \
11069 && cf_fix_cppflags=yes
11070
11071 if test "$cf_fix_cppflags" = yes ; then
11072
11073 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11074 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11075
11076 continue
11077 elif test "${cf_tst_cflags}" = "\"'" ; then
11078
11079 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11080 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11081
11082 continue
11083 fi
11084 ;;
11085 esac
11086 case "$CPPFLAGS" in
11087 (*$cf_add_cflags)
11088 ;;
11089 (*)
11090 case "$cf_add_cflags" in
11091 (-D*)
11092 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11093
11094 CPPFLAGS=`echo "$CPPFLAGS" | \
11095 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11096 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11097
11098 ;;
11099 esac
11100
11101 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11102 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11103
11104 ;;
11105 esac
11106 ;;
11107 (*)
11108
11109 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11110 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11111
11112 ;;
11113 esac
11114 ;;
11115 (yes)
11116
11117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11119
11120 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11121
11122 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11123 && test -z "${cf_tst_cflags}" \
11124 && cf_fix_cppflags=no
11125 ;;
11126 esac
11127 done
11128
11129 if test -n "$cf_new_cflags" ; then
11130
11131 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11132 CFLAGS="${CFLAGS}$cf_new_cflags"
11133
11134 fi
11135
11136 if test -n "$cf_new_cppflags" ; then
11137
11138 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11139 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11140
11141 fi
11142
11143 if test -n "$cf_new_extra_cppflags" ; then
11144
11145 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11146 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11147
11148 fi
11149
11150 done
11151
11152 cf_add_libs="$LIBS"
11153 # reverse order
11154 cf_add_0lib=
11155 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11156 # filter duplicates
11157 for cf_add_1lib in $cf_add_0lib; do
11158 for cf_add_2lib in $cf_add_libs; do
11159 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11160 cf_add_1lib=
11161 break
11162 fi
11163 done
11164 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11165 done
11166 LIBS="$cf_add_libs"
11167
11168 cat >"conftest.$ac_ext" <<_ACEOF
11169 #line 11169 "configure"
11170 #include "confdefs.h"
11171 #include <${cf_cv_ncurses_header:-curses.h}>
11172 int
11173 main (void)
11174 {
11175 initscr(); mousemask(0,0); tigetstr((char *)0);
11176 ;
11177 return 0;
11178 }
11179 _ACEOF
11180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11181 if { (eval echo "$as_me:11181: \"$ac_link\"") >&5
11182 (eval $ac_link) 2>&5
11183 ac_status=$?
11184 echo "$as_me:11184: \$? = $ac_status" >&5
11185 (exit "$ac_status"); } &&
11186 { ac_try='test -s "conftest$ac_exeext"'
11187 { (eval echo "$as_me:11187: \"$ac_try\"") >&5
11188 (eval $ac_try) 2>&5
11189 ac_status=$?
11190 echo "$as_me:11190: \$? = $ac_status" >&5
11191 (exit "$ac_status"); }; }; then
11192 if test "$cross_compiling" = yes; then
11193 cf_have_ncuconfig=maybe
11194 else
11195 cat >"conftest.$ac_ext" <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198 #include <${cf_cv_ncurses_header:-curses.h}>
11199 int main(void)
11200 { const char *xx = curses_version(); return (xx == 0); }
11201 _ACEOF
11202 rm -f "conftest$ac_exeext"
11203 if { (eval echo "$as_me:11203: \"$ac_link\"") >&5
11204 (eval $ac_link) 2>&5
11205 ac_status=$?
11206 echo "$as_me:11206: \$? = $ac_status" >&5
11207 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11208 { (eval echo "$as_me:11208: \"$ac_try\"") >&5
11209 (eval $ac_try) 2>&5
11210 ac_status=$?
11211 echo "$as_me:11211: \$? = $ac_status" >&5
11212 (exit "$ac_status"); }; }; then
11213 cf_have_ncuconfig=yes
11214 else
11215 echo "$as_me: program exited with status $ac_status" >&5
11216 echo "$as_me: failed program was:" >&5
11217 cat "conftest.$ac_ext" >&5
11218 cf_have_ncuconfig=no
11219 fi
11220 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11221 fi
11222 else
11223 echo "$as_me: failed program was:" >&5
11224 cat "conftest.$ac_ext" >&5
11225 cf_have_ncuconfig=no
11226 fi
11227 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11228 echo "$as_me:11228: result: $cf_have_ncuconfig" >&5
11229 echo "${ECHO_T}$cf_have_ncuconfig" >&6
11230 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
11231 if test "$cf_have_ncuconfig" != "yes"
11232 then
11233 CPPFLAGS="$cf_save_CPPFLAGS"
11234 LIBS="$cf_save_LIBS"
11235 NCURSES_CONFIG_PKG=none
11236 else
11237
11238 cat >>confdefs.h <<\EOF
11239 #define NCURSES 1
11240 EOF
11241
11242 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
11243
11244 echo "$as_me:11244: checking for terminfo header" >&5
11245 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11246 if test "${cf_cv_term_header+set}" = set; then
11247 echo $ECHO_N "(cached) $ECHO_C" >&6
11248 else
11249
11250 case "${cf_cv_ncurses_header}" in
11251 (*/ncurses.h|*/ncursesw.h)
11252 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11253 ;;
11254 (*)
11255 cf_term_header=term.h
11256 ;;
11257 esac
11258
11259 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11260 do
11261 cat >"conftest.$ac_ext" <<_ACEOF
11262 #line 11262 "configure"
11263 #include "confdefs.h"
11264 #include <stdio.h>
11265 #include <${cf_cv_ncurses_header:-curses.h}>
11266 #include <$cf_test>
11267
11268 int
11269 main (void)
11270 {
11271 int x = auto_left_margin; (void)x
11272 ;
11273 return 0;
11274 }
11275 _ACEOF
11276 rm -f "conftest.$ac_objext"
11277 if { (eval echo "$as_me:11277: \"$ac_compile\"") >&5
11278 (eval $ac_compile) 2>&5
11279 ac_status=$?
11280 echo "$as_me:11280: \$? = $ac_status" >&5
11281 (exit "$ac_status"); } &&
11282 { ac_try='test -s "conftest.$ac_objext"'
11283 { (eval echo "$as_me:11283: \"$ac_try\"") >&5
11284 (eval $ac_try) 2>&5
11285 ac_status=$?
11286 echo "$as_me:11286: \$? = $ac_status" >&5
11287 (exit "$ac_status"); }; }; then
11288
11289 cf_cv_term_header="$cf_test"
11290 else
11291 echo "$as_me: failed program was:" >&5
11292 cat "conftest.$ac_ext" >&5
11293
11294 cf_cv_term_header=unknown
11295
11296 fi
11297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11298 test "$cf_cv_term_header" != unknown && break
11299 done
11300
11301 fi
11302 echo "$as_me:11302: result: $cf_cv_term_header" >&5
11303 echo "${ECHO_T}$cf_cv_term_header" >&6
11304
11305 # Set definitions to allow ifdef'ing to accommodate subdirectories
11306
11307 case "$cf_cv_term_header" in
11308 (*term.h)
11309
11310 cat >>confdefs.h <<\EOF
11311 #define HAVE_TERM_H 1
11312 EOF
11313
11314 ;;
11315 esac
11316
11317 case "$cf_cv_term_header" in
11318 (ncurses/term.h)
11319
11320 cat >>confdefs.h <<\EOF
11321 #define HAVE_NCURSES_TERM_H 1
11322 EOF
11323
11324 ;;
11325 (ncursesw/term.h)
11326
11327 cat >>confdefs.h <<\EOF
11328 #define HAVE_NCURSESW_TERM_H 1
11329 EOF
11330
11331 ;;
11332 esac
11333
11334 fi
11335
11336 else
11337 echo "$as_me:11337: result: no" >&5
11338 echo "${ECHO_T}no" >&6
11339 NCURSES_CONFIG_PKG=none
11340 fi
11341 else
11342 NCURSES_CONFIG_PKG=none
11343 fi
11344
11345 if test "x$cf_have_ncuconfig" = "xno"; then
11346 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
11347
11348 if test -n "$ac_tool_prefix"; then
11349 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11350 do
11351 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11352 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11353 echo "$as_me:11353: checking for $ac_word" >&5
11354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11355 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
11356 echo $ECHO_N "(cached) $ECHO_C" >&6
11357 else
11358 if test -n "$NCURSES_CONFIG"; then
11359 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
11360 else
11361 ac_save_IFS=$IFS; IFS=$ac_path_separator
11362 ac_dummy="$PATH"
11363 for ac_dir in $ac_dummy; do
11364 IFS=$ac_save_IFS
11365 test -z "$ac_dir" && ac_dir=.
11366 $as_executable_p "$ac_dir/$ac_word" || continue
11367 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
11368 echo "$as_me:11368: found $ac_dir/$ac_word" >&5
11369 break
11370 done
11371
11372 fi
11373 fi
11374 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
11375 if test -n "$NCURSES_CONFIG"; then
11376 echo "$as_me:11376: result: $NCURSES_CONFIG" >&5
11377 echo "${ECHO_T}$NCURSES_CONFIG" >&6
11378 else
11379 echo "$as_me:11379: result: no" >&5
11380 echo "${ECHO_T}no" >&6
11381 fi
11382
11383 test -n "$NCURSES_CONFIG" && break
11384 done
11385 fi
11386 if test -z "$NCURSES_CONFIG"; then
11387 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
11388 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11389 do
11390 # Extract the first word of "$ac_prog", so it can be a program name with args.
11391 set dummy $ac_prog; ac_word=$2
11392 echo "$as_me:11392: checking for $ac_word" >&5
11393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11394 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
11395 echo $ECHO_N "(cached) $ECHO_C" >&6
11396 else
11397 if test -n "$ac_ct_NCURSES_CONFIG"; then
11398 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
11399 else
11400 ac_save_IFS=$IFS; IFS=$ac_path_separator
11401 ac_dummy="$PATH"
11402 for ac_dir in $ac_dummy; do
11403 IFS=$ac_save_IFS
11404 test -z "$ac_dir" && ac_dir=.
11405 $as_executable_p "$ac_dir/$ac_word" || continue
11406 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
11407 echo "$as_me:11407: found $ac_dir/$ac_word" >&5
11408 break
11409 done
11410
11411 fi
11412 fi
11413 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
11414 if test -n "$ac_ct_NCURSES_CONFIG"; then
11415 echo "$as_me:11415: result: $ac_ct_NCURSES_CONFIG" >&5
11416 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
11417 else
11418 echo "$as_me:11418: result: no" >&5
11419 echo "${ECHO_T}no" >&6
11420 fi
11421
11422 test -n "$ac_ct_NCURSES_CONFIG" && break
11423 done
11424 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
11425
11426 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
11427 fi
11428
11429 if test "$NCURSES_CONFIG" != none ; then
11430
11431 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
11432 do
11433 case "x$cf_add_cflags" in
11434 (x-[DU]*)
11435
11436 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11437 while true
11438 do
11439 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'`
11440 test "$CFLAGS" != "$cf_old_cflag" || break
11441
11442 CFLAGS="$cf_old_cflag"
11443 done
11444
11445 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11446 while true
11447 do
11448 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'`
11449 test "$CPPFLAGS" != "$cf_old_cflag" || break
11450
11451 CPPFLAGS="$cf_old_cflag"
11452 done
11453
11454 ;;
11455 esac
11456
11457 cf_fix_cppflags=no
11458 cf_new_cflags=
11459 cf_new_cppflags=
11460 cf_new_extra_cppflags=
11461
11462 for cf_add_cflags in $cf_add_cflags
11463 do
11464 case "$cf_fix_cppflags" in
11465 (no)
11466 case "$cf_add_cflags" in
11467 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11468 case "$cf_add_cflags" in
11469 (-D*)
11470 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11471
11472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11473 && test -z "${cf_tst_cflags}" \
11474 && cf_fix_cppflags=yes
11475
11476 if test "$cf_fix_cppflags" = yes ; then
11477
11478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11480
11481 continue
11482 elif test "${cf_tst_cflags}" = "\"'" ; then
11483
11484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11486
11487 continue
11488 fi
11489 ;;
11490 esac
11491 case "$CPPFLAGS" in
11492 (*$cf_add_cflags)
11493 ;;
11494 (*)
11495 case "$cf_add_cflags" in
11496 (-D*)
11497 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11498
11499 CPPFLAGS=`echo "$CPPFLAGS" | \
11500 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11501 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11502
11503 ;;
11504 esac
11505
11506 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11507 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11508
11509 ;;
11510 esac
11511 ;;
11512 (*)
11513
11514 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11515 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11516
11517 ;;
11518 esac
11519 ;;
11520 (yes)
11521
11522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11524
11525 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11526
11527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11528 && test -z "${cf_tst_cflags}" \
11529 && cf_fix_cppflags=no
11530 ;;
11531 esac
11532 done
11533
11534 if test -n "$cf_new_cflags" ; then
11535
11536 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11537 CFLAGS="${CFLAGS}$cf_new_cflags"
11538
11539 fi
11540
11541 if test -n "$cf_new_cppflags" ; then
11542
11543 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11544 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11545
11546 fi
11547
11548 if test -n "$cf_new_extra_cppflags" ; then
11549
11550 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11551 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11552
11553 fi
11554
11555 done
11556
11557 cf_add_libs="$LIBS"
11558 # reverse order
11559 cf_add_0lib=
11560 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11561 # filter duplicates
11562 for cf_add_1lib in $cf_add_0lib; do
11563 for cf_add_2lib in $cf_add_libs; do
11564 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11565 cf_add_1lib=
11566 break
11567 fi
11568 done
11569 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11570 done
11571 LIBS="$cf_add_libs"
11572
11573 # even with config script, some packages use no-override for curses.h
11574
11575 echo "$as_me:11575: checking if we have identified curses headers" >&5
11576 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11577 if test "${cf_cv_ncurses_header+set}" = set; then
11578 echo $ECHO_N "(cached) $ECHO_C" >&6
11579 else
11580
11581 cf_cv_ncurses_header=none
11582 for cf_header in \
11583 ncurses.h $cf_cv_screen/ncurses.h \
11584 curses.h $cf_cv_screen/curses.h
11585 do
11586 cat >"conftest.$ac_ext" <<_ACEOF
11587 #line 11587 "configure"
11588 #include "confdefs.h"
11589 #include <${cf_header}>
11590 int
11591 main (void)
11592 {
11593 initscr(); endwin()
11594 ;
11595 return 0;
11596 }
11597 _ACEOF
11598 rm -f "conftest.$ac_objext"
11599 if { (eval echo "$as_me:11599: \"$ac_compile\"") >&5
11600 (eval $ac_compile) 2>&5
11601 ac_status=$?
11602 echo "$as_me:11602: \$? = $ac_status" >&5
11603 (exit "$ac_status"); } &&
11604 { ac_try='test -s "conftest.$ac_objext"'
11605 { (eval echo "$as_me:11605: \"$ac_try\"") >&5
11606 (eval $ac_try) 2>&5
11607 ac_status=$?
11608 echo "$as_me:11608: \$? = $ac_status" >&5
11609 (exit "$ac_status"); }; }; then
11610 cf_cv_ncurses_header=$cf_header; break
11611 else
11612 echo "$as_me: failed program was:" >&5
11613 cat "conftest.$ac_ext" >&5
11614 fi
11615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11616 done
11617
11618 fi
11619 echo "$as_me:11619: result: $cf_cv_ncurses_header" >&5
11620 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11621
11622 if test "$cf_cv_ncurses_header" = none ; then
11623 { { echo "$as_me:11623: error: No curses header-files found" >&5
11624 echo "$as_me: error: No curses header-files found" >&2;}
11625 { (exit 1); exit 1; }; }
11626 fi
11627
11628 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11629
11630 for ac_header in $cf_cv_ncurses_header
11631 do
11632 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11633 echo "$as_me:11633: checking for $ac_header" >&5
11634 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11635 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11636 echo $ECHO_N "(cached) $ECHO_C" >&6
11637 else
11638 cat >"conftest.$ac_ext" <<_ACEOF
11639 #line 11639 "configure"
11640 #include "confdefs.h"
11641 #include <$ac_header>
11642 _ACEOF
11643 if { (eval echo "$as_me:11643: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11644 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11645 ac_status=$?
11646 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11647 rm -f conftest.er1
11648 cat conftest.err >&5
11649 echo "$as_me:11649: \$? = $ac_status" >&5
11650 (exit "$ac_status"); } >/dev/null; then
11651 if test -s conftest.err; then
11652 ac_cpp_err=$ac_c_preproc_warn_flag
11653 else
11654 ac_cpp_err=
11655 fi
11656 else
11657 ac_cpp_err=yes
11658 fi
11659 if test -z "$ac_cpp_err"; then
11660 eval "$as_ac_Header=yes"
11661 else
11662 echo "$as_me: failed program was:" >&5
11663 cat "conftest.$ac_ext" >&5
11664 eval "$as_ac_Header=no"
11665 fi
11666 rm -f conftest.err "conftest.$ac_ext"
11667 fi
11668 echo "$as_me:11668: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11669 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11670 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11671 cat >>confdefs.h <<EOF
11672 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11673 EOF
11674
11675 fi
11676 done
11677
11678 cat >>confdefs.h <<\EOF
11679 #define NCURSES 1
11680 EOF
11681
11682 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11683
11684 cat >>confdefs.h <<EOF
11685 #define $cf_nculib_ROOT 1
11686 EOF
11687
11688 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
11689
11690 else
11691
11692 cf_ncuhdr_root=$cf_cv_screen
11693
11694 test -n "$cf_cv_curses_dir" && \
11695 test "$cf_cv_curses_dir" != "no" && { \
11696
11697 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11698 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11699 do
11700 while test "$cf_add_incdir" != /usr/include
11701 do
11702 if test -d "$cf_add_incdir"
11703 then
11704 cf_have_incdir=no
11705 if test -n "$CFLAGS$CPPFLAGS" ; then
11706 # a loop is needed to ensure we can add subdirs of existing dirs
11707 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11708 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11709 cf_have_incdir=yes; break
11710 fi
11711 done
11712 fi
11713
11714 if test "$cf_have_incdir" = no ; then
11715 if test "$cf_add_incdir" = /usr/local/include ; then
11716 if test "$GCC" = yes
11717 then
11718 cf_save_CPPFLAGS=$CPPFLAGS
11719
11720 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11721 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11722
11723 cat >"conftest.$ac_ext" <<_ACEOF
11724 #line 11724 "configure"
11725 #include "confdefs.h"
11726 #include <stdio.h>
11727 int
11728 main (void)
11729 {
11730 printf("Hello")
11731 ;
11732 return 0;
11733 }
11734 _ACEOF
11735 rm -f "conftest.$ac_objext"
11736 if { (eval echo "$as_me:11736: \"$ac_compile\"") >&5
11737 (eval $ac_compile) 2>&5
11738 ac_status=$?
11739 echo "$as_me:11739: \$? = $ac_status" >&5
11740 (exit "$ac_status"); } &&
11741 { ac_try='test -s "conftest.$ac_objext"'
11742 { (eval echo "$as_me:11742: \"$ac_try\"") >&5
11743 (eval $ac_try) 2>&5
11744 ac_status=$?
11745 echo "$as_me:11745: \$? = $ac_status" >&5
11746 (exit "$ac_status"); }; }; then
11747 :
11748 else
11749 echo "$as_me: failed program was:" >&5
11750 cat "conftest.$ac_ext" >&5
11751 cf_have_incdir=yes
11752 fi
11753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11754 CPPFLAGS=$cf_save_CPPFLAGS
11755 fi
11756 fi
11757 fi
11758
11759 if test "$cf_have_incdir" = no ; then
11760 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11761
11762 echo "${as_me:-configure}:11762: testing adding $cf_add_incdir to include-path ..." 1>&5
11763
11764 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11765
11766 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11767 test "$cf_top_incdir" = "$cf_add_incdir" && break
11768 cf_add_incdir="$cf_top_incdir"
11769 else
11770 break
11771 fi
11772 else
11773 break
11774 fi
11775 done
11776 done
11777 fi
11778
11779 }
11780
11781 echo "$as_me:11781: checking for $cf_ncuhdr_root header in include-path" >&5
11782 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11783 if test "${cf_cv_ncurses_h+set}" = set; then
11784 echo $ECHO_N "(cached) $ECHO_C" >&6
11785 else
11786
11787 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11788 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
11789 for cf_header in $cf_header_list
11790 do
11791
11792 cat >"conftest.$ac_ext" <<_ACEOF
11793 #line 11793 "configure"
11794 #include "confdefs.h"
11795
11796 #include <$cf_header>
11797 int
11798 main (void)
11799 {
11800
11801 #ifdef NCURSES_VERSION
11802
11803 printf("%s\\n", NCURSES_VERSION);
11804 #else
11805 #ifdef __NCURSES_H
11806 printf("old\\n");
11807 #else
11808 #error __NCURSES_H is not defined
11809 #endif
11810 #endif
11811
11812 ;
11813 return 0;
11814 }
11815 _ACEOF
11816 rm -f "conftest.$ac_objext"
11817 if { (eval echo "$as_me:11817: \"$ac_compile\"") >&5
11818 (eval $ac_compile) 2>&5
11819 ac_status=$?
11820 echo "$as_me:11820: \$? = $ac_status" >&5
11821 (exit "$ac_status"); } &&
11822 { ac_try='test -s "conftest.$ac_objext"'
11823 { (eval echo "$as_me:11823: \"$ac_try\"") >&5
11824 (eval $ac_try) 2>&5
11825 ac_status=$?
11826 echo "$as_me:11826: \$? = $ac_status" >&5
11827 (exit "$ac_status"); }; }; then
11828 cf_cv_ncurses_h=$cf_header
11829
11830 else
11831 echo "$as_me: failed program was:" >&5
11832 cat "conftest.$ac_ext" >&5
11833 cf_cv_ncurses_h=no
11834 fi
11835 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11836
11837 test "$cf_cv_ncurses_h" != no && break
11838 done
11839
11840 fi
11841 echo "$as_me:11841: result: $cf_cv_ncurses_h" >&5
11842 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11843
11844 if test "$cf_cv_ncurses_h" != no ; then
11845 cf_cv_ncurses_header=$cf_cv_ncurses_h
11846 else
11847
11848 echo "$as_me:11848: checking for $cf_ncuhdr_root include-path" >&5
11849 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11850 if test "${cf_cv_ncurses_h2+set}" = set; then
11851 echo $ECHO_N "(cached) $ECHO_C" >&6
11852 else
11853
11854 test -n "$verbose" && echo
11855
11856 cf_search=
11857
11858 # collect the current set of include-directories from compiler flags
11859 cf_header_path_list=""
11860 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11861 for cf_header_path in $CPPFLAGS $CFLAGS
11862 do
11863 case "$cf_header_path" in
11864 (-I*)
11865 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11866
11867 test "x$cf_header_path" != "xNONE" && \
11868 test -d "$cf_header_path" && \
11869 {
11870 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11871 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11872 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11873 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11874 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11875 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"
11876 }
11877
11878 cf_header_path_list="$cf_header_path_list $cf_search"
11879 ;;
11880 esac
11881 done
11882 fi
11883
11884 # add the variations for the package we are looking for
11885
11886 cf_search=
11887
11888 test "x$prefix" != "xNONE" && \
11889 test -d "$prefix" && \
11890 {
11891 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11892 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11893 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11894 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11895 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11896 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11897 }
11898
11899 for cf_subdir_prefix in \
11900 /usr \
11901 /usr/local \
11902 /usr/pkg \
11903 /opt \
11904 /opt/local \
11905 $HOME
11906 do
11907
11908 test "x$cf_subdir_prefix" != "x$prefix" && \
11909 test -d "$cf_subdir_prefix" && \
11910 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11911 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11912 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11913 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11914 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11915 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11916 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"
11917 }
11918
11919 done
11920
11921 test "$includedir" != NONE && \
11922 test "$includedir" != "/usr/include" && \
11923 test -d "$includedir" && {
11924 test -d "$includedir" && cf_search="$cf_search $includedir"
11925 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11926 }
11927
11928 test "$oldincludedir" != NONE && \
11929 test "$oldincludedir" != "/usr/include" && \
11930 test -d "$oldincludedir" && {
11931 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11932 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11933 }
11934
11935 cf_search="$cf_search $cf_header_path_list"
11936
11937 test -n "$verbose" && echo "search path $cf_search"
11938 cf_save2_CPPFLAGS="$CPPFLAGS"
11939 for cf_incdir in $cf_search
11940 do
11941
11942 if test -n "$cf_incdir" ; then
11943 for cf_add_incdir in $cf_incdir
11944 do
11945 while test "$cf_add_incdir" != /usr/include
11946 do
11947 if test -d "$cf_add_incdir"
11948 then
11949 cf_have_incdir=no
11950 if test -n "$CFLAGS$CPPFLAGS" ; then
11951 # a loop is needed to ensure we can add subdirs of existing dirs
11952 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11953 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11954 cf_have_incdir=yes; break
11955 fi
11956 done
11957 fi
11958
11959 if test "$cf_have_incdir" = no ; then
11960 if test "$cf_add_incdir" = /usr/local/include ; then
11961 if test "$GCC" = yes
11962 then
11963 cf_save_CPPFLAGS=$CPPFLAGS
11964
11965 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11966 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11967
11968 cat >"conftest.$ac_ext" <<_ACEOF
11969 #line 11969 "configure"
11970 #include "confdefs.h"
11971 #include <stdio.h>
11972 int
11973 main (void)
11974 {
11975 printf("Hello")
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 :
11993 else
11994 echo "$as_me: failed program was:" >&5
11995 cat "conftest.$ac_ext" >&5
11996 cf_have_incdir=yes
11997 fi
11998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11999 CPPFLAGS=$cf_save_CPPFLAGS
12000 fi
12001 fi
12002 fi
12003
12004 if test "$cf_have_incdir" = no ; then
12005 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
12006
12007 echo "${as_me:-configure}:12007: testing adding $cf_add_incdir to include-path ..." 1>&5
12008
12009 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12010
12011 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12012 test "$cf_top_incdir" = "$cf_add_incdir" && break
12013 cf_add_incdir="$cf_top_incdir"
12014 else
12015 break
12016 fi
12017 else
12018 break
12019 fi
12020 done
12021 done
12022 fi
12023
12024 for cf_header in \
12025 ncurses.h \
12026 curses.h
12027 do
12028
12029 cat >"conftest.$ac_ext" <<_ACEOF
12030 #line 12030 "configure"
12031 #include "confdefs.h"
12032
12033 #include <$cf_header>
12034 int
12035 main (void)
12036 {
12037
12038 #ifdef NCURSES_VERSION
12039
12040 printf("%s\\n", NCURSES_VERSION);
12041 #else
12042 #ifdef __NCURSES_H
12043 printf("old\\n");
12044 #else
12045 #error __NCURSES_H is not defined
12046 #endif
12047 #endif
12048
12049 ;
12050 return 0;
12051 }
12052 _ACEOF
12053 rm -f "conftest.$ac_objext"
12054 if { (eval echo "$as_me:12054: \"$ac_compile\"") >&5
12055 (eval $ac_compile) 2>&5
12056 ac_status=$?
12057 echo "$as_me:12057: \$? = $ac_status" >&5
12058 (exit "$ac_status"); } &&
12059 { ac_try='test -s "conftest.$ac_objext"'
12060 { (eval echo "$as_me:12060: \"$ac_try\"") >&5
12061 (eval $ac_try) 2>&5
12062 ac_status=$?
12063 echo "$as_me:12063: \$? = $ac_status" >&5
12064 (exit "$ac_status"); }; }; then
12065 cf_cv_ncurses_h2=$cf_header
12066
12067 else
12068 echo "$as_me: failed program was:" >&5
12069 cat "conftest.$ac_ext" >&5
12070 cf_cv_ncurses_h2=no
12071 fi
12072 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12073
12074 if test "$cf_cv_ncurses_h2" != no ; then
12075 cf_cv_ncurses_h2=$cf_incdir/$cf_header
12076 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
12077 break
12078 fi
12079 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
12080 done
12081 CPPFLAGS="$cf_save2_CPPFLAGS"
12082 test "$cf_cv_ncurses_h2" != no && break
12083 done
12084 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:12084: error: not found" >&5
12085 echo "$as_me: error: not found" >&2;}
12086 { (exit 1); exit 1; }; }
12087
12088 fi
12089 echo "$as_me:12089: result: $cf_cv_ncurses_h2" >&5
12090 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
12091
12092 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
12093 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
12094 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
12095 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
12096 fi
12097
12098 if test -n "$cf_1st_incdir" ; then
12099 for cf_add_incdir in $cf_1st_incdir
12100 do
12101 while test "$cf_add_incdir" != /usr/include
12102 do
12103 if test -d "$cf_add_incdir"
12104 then
12105 cf_have_incdir=no
12106 if test -n "$CFLAGS$CPPFLAGS" ; then
12107 # a loop is needed to ensure we can add subdirs of existing dirs
12108 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12109 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12110 cf_have_incdir=yes; break
12111 fi
12112 done
12113 fi
12114
12115 if test "$cf_have_incdir" = no ; then
12116 if test "$cf_add_incdir" = /usr/local/include ; then
12117 if test "$GCC" = yes
12118 then
12119 cf_save_CPPFLAGS=$CPPFLAGS
12120
12121 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12122 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12123
12124 cat >"conftest.$ac_ext" <<_ACEOF
12125 #line 12125 "configure"
12126 #include "confdefs.h"
12127 #include <stdio.h>
12128 int
12129 main (void)
12130 {
12131 printf("Hello")
12132 ;
12133 return 0;
12134 }
12135 _ACEOF
12136 rm -f "conftest.$ac_objext"
12137 if { (eval echo "$as_me:12137: \"$ac_compile\"") >&5
12138 (eval $ac_compile) 2>&5
12139 ac_status=$?
12140 echo "$as_me:12140: \$? = $ac_status" >&5
12141 (exit "$ac_status"); } &&
12142 { ac_try='test -s "conftest.$ac_objext"'
12143 { (eval echo "$as_me:12143: \"$ac_try\"") >&5
12144 (eval $ac_try) 2>&5
12145 ac_status=$?
12146 echo "$as_me:12146: \$? = $ac_status" >&5
12147 (exit "$ac_status"); }; }; then
12148 :
12149 else
12150 echo "$as_me: failed program was:" >&5
12151 cat "conftest.$ac_ext" >&5
12152 cf_have_incdir=yes
12153 fi
12154 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12155 CPPFLAGS=$cf_save_CPPFLAGS
12156 fi
12157 fi
12158 fi
12159
12160 if test "$cf_have_incdir" = no ; then
12161 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
12162
12163 echo "${as_me:-configure}:12163: testing adding $cf_add_incdir to include-path ..." 1>&5
12164
12165 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12166
12167 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12168 test "$cf_top_incdir" = "$cf_add_incdir" && break
12169 cf_add_incdir="$cf_top_incdir"
12170 else
12171 break
12172 fi
12173 else
12174 break
12175 fi
12176 done
12177 done
12178 fi
12179
12180 fi
12181
12182 # Set definitions to allow ifdef'ing for ncurses.h
12183
12184 case "$cf_cv_ncurses_header" in
12185 (*ncurses.h)
12186
12187 cat >>confdefs.h <<\EOF
12188 #define HAVE_NCURSES_H 1
12189 EOF
12190
12191 ;;
12192 esac
12193
12194 case "$cf_cv_ncurses_header" in
12195 (ncurses/curses.h|ncurses/ncurses.h)
12196
12197 cat >>confdefs.h <<\EOF
12198 #define HAVE_NCURSES_NCURSES_H 1
12199 EOF
12200
12201 ;;
12202 (ncursesw/curses.h|ncursesw/ncurses.h)
12203
12204 cat >>confdefs.h <<\EOF
12205 #define HAVE_NCURSESW_NCURSES_H 1
12206 EOF
12207
12208 ;;
12209 esac
12210
12211 echo "$as_me:12211: checking for terminfo header" >&5
12212 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12213 if test "${cf_cv_term_header+set}" = set; then
12214 echo $ECHO_N "(cached) $ECHO_C" >&6
12215 else
12216
12217 case "${cf_cv_ncurses_header}" in
12218 (*/ncurses.h|*/ncursesw.h)
12219 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12220 ;;
12221 (*)
12222 cf_term_header=term.h
12223 ;;
12224 esac
12225
12226 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12227 do
12228 cat >"conftest.$ac_ext" <<_ACEOF
12229 #line 12229 "configure"
12230 #include "confdefs.h"
12231 #include <stdio.h>
12232 #include <${cf_cv_ncurses_header:-curses.h}>
12233 #include <$cf_test>
12234
12235 int
12236 main (void)
12237 {
12238 int x = auto_left_margin; (void)x
12239 ;
12240 return 0;
12241 }
12242 _ACEOF
12243 rm -f "conftest.$ac_objext"
12244 if { (eval echo "$as_me:12244: \"$ac_compile\"") >&5
12245 (eval $ac_compile) 2>&5
12246 ac_status=$?
12247 echo "$as_me:12247: \$? = $ac_status" >&5
12248 (exit "$ac_status"); } &&
12249 { ac_try='test -s "conftest.$ac_objext"'
12250 { (eval echo "$as_me:12250: \"$ac_try\"") >&5
12251 (eval $ac_try) 2>&5
12252 ac_status=$?
12253 echo "$as_me:12253: \$? = $ac_status" >&5
12254 (exit "$ac_status"); }; }; then
12255
12256 cf_cv_term_header="$cf_test"
12257 else
12258 echo "$as_me: failed program was:" >&5
12259 cat "conftest.$ac_ext" >&5
12260
12261 cf_cv_term_header=unknown
12262
12263 fi
12264 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12265 test "$cf_cv_term_header" != unknown && break
12266 done
12267
12268 fi
12269 echo "$as_me:12269: result: $cf_cv_term_header" >&5
12270 echo "${ECHO_T}$cf_cv_term_header" >&6
12271
12272 # Set definitions to allow ifdef'ing to accommodate subdirectories
12273
12274 case "$cf_cv_term_header" in
12275 (*term.h)
12276
12277 cat >>confdefs.h <<\EOF
12278 #define HAVE_TERM_H 1
12279 EOF
12280
12281 ;;
12282 esac
12283
12284 case "$cf_cv_term_header" in
12285 (ncurses/term.h)
12286
12287 cat >>confdefs.h <<\EOF
12288 #define HAVE_NCURSES_TERM_H 1
12289 EOF
12290
12291 ;;
12292 (ncursesw/term.h)
12293
12294 cat >>confdefs.h <<\EOF
12295 #define HAVE_NCURSESW_TERM_H 1
12296 EOF
12297
12298 ;;
12299 esac
12300
12301 # some applications need this, but should check for NCURSES_VERSION
12302
12303 cat >>confdefs.h <<\EOF
12304 #define NCURSES 1
12305 EOF
12306
12307 echo "$as_me:12307: checking for ncurses version" >&5
12308 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
12309 if test "${cf_cv_ncurses_version+set}" = set; then
12310 echo $ECHO_N "(cached) $ECHO_C" >&6
12311 else
12312
12313 cf_cv_ncurses_version=no
12314 cf_tempfile=out$$
12315 rm -f "$cf_tempfile"
12316 if test "$cross_compiling" = yes; then
12317
12318 # This will not work if the preprocessor splits the line after the
12319 # Autoconf token. The 'unproto' program does that.
12320 cat > "conftest.$ac_ext" <<EOF
12321 #include <${cf_cv_ncurses_header:-curses.h}>
12322 #undef Autoconf
12323 #ifdef NCURSES_VERSION
12324 Autoconf NCURSES_VERSION
12325 #else
12326 #ifdef __NCURSES_H
12327 Autoconf "old"
12328 #endif
12329 ;
12330 #endif
12331 EOF
12332 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
12333 { (eval echo "$as_me:12333: \"$cf_try\"") >&5
12334 (eval $cf_try) 2>&5
12335 ac_status=$?
12336 echo "$as_me:12336: \$? = $ac_status" >&5
12337 (exit "$ac_status"); }
12338 if test -f conftest.out ; then
12339 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
12340 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
12341 rm -f conftest.out
12342 fi
12343
12344 else
12345 cat >"conftest.$ac_ext" <<_ACEOF
12346 #line 12346 "configure"
12347 #include "confdefs.h"
12348
12349 $ac_includes_default
12350
12351 #include <${cf_cv_ncurses_header:-curses.h}>
12352
12353 int main(void)
12354 {
12355 FILE *fp = fopen("$cf_tempfile", "w");
12356 #ifdef NCURSES_VERSION
12357 # ifdef NCURSES_VERSION_PATCH
12358 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
12359 # else
12360 fprintf(fp, "%s\\n", NCURSES_VERSION);
12361 # endif
12362 #else
12363 # ifdef __NCURSES_H
12364 fprintf(fp, "old\\n");
12365 # else
12366 #error expected ncurses header to define __NCURSES_H
12367 # endif
12368 #endif
12369 ${cf_cv_main_return:-return}(0);
12370 }
12371 _ACEOF
12372 rm -f "conftest$ac_exeext"
12373 if { (eval echo "$as_me:12373: \"$ac_link\"") >&5
12374 (eval $ac_link) 2>&5
12375 ac_status=$?
12376 echo "$as_me:12376: \$? = $ac_status" >&5
12377 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12378 { (eval echo "$as_me:12378: \"$ac_try\"") >&5
12379 (eval $ac_try) 2>&5
12380 ac_status=$?
12381 echo "$as_me:12381: \$? = $ac_status" >&5
12382 (exit "$ac_status"); }; }; then
12383
12384 cf_cv_ncurses_version=`cat $cf_tempfile`
12385 else
12386 echo "$as_me: program exited with status $ac_status" >&5
12387 echo "$as_me: failed program was:" >&5
12388 cat "conftest.$ac_ext" >&5
12389 fi
12390 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12391 fi
12392 rm -f "$cf_tempfile"
12393
12394 fi
12395 echo "$as_me:12395: result: $cf_cv_ncurses_version" >&5
12396 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12397 test "$cf_cv_ncurses_version" = no ||
12398 cat >>confdefs.h <<\EOF
12399 #define NCURSES 1
12400 EOF
12401
12402 cf_nculib_root=$cf_cv_screen
12403 # This works, except for the special case where we find gpm, but
12404 # ncurses is in a nonstandard location via $LIBS, and we really want
12405 # to link gpm.
12406 cf_ncurses_LIBS=""
12407 cf_ncurses_SAVE="$LIBS"
12408 echo "$as_me:12408: checking for Gpm_Open in -lgpm" >&5
12409 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
12410 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
12411 echo $ECHO_N "(cached) $ECHO_C" >&6
12412 else
12413 ac_check_lib_save_LIBS=$LIBS
12414 LIBS="-lgpm $LIBS"
12415 cat >"conftest.$ac_ext" <<_ACEOF
12416 #line 12416 "configure"
12417 #include "confdefs.h"
12418
12419 /* Override any gcc2 internal prototype to avoid an error. */
12420 #ifdef __cplusplus
12421 extern "C"
12422 #endif
12423 /* We use char because int might match the return type of a gcc2
12424 builtin and then its argument prototype would still apply. */
12425 char Gpm_Open (void);
12426 int
12427 main (void)
12428 {
12429 Gpm_Open ();
12430 ;
12431 return 0;
12432 }
12433 _ACEOF
12434 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12435 if { (eval echo "$as_me:12435: \"$ac_link\"") >&5
12436 (eval $ac_link) 2>&5
12437 ac_status=$?
12438 echo "$as_me:12438: \$? = $ac_status" >&5
12439 (exit "$ac_status"); } &&
12440 { ac_try='test -s "conftest$ac_exeext"'
12441 { (eval echo "$as_me:12441: \"$ac_try\"") >&5
12442 (eval $ac_try) 2>&5
12443 ac_status=$?
12444 echo "$as_me:12444: \$? = $ac_status" >&5
12445 (exit "$ac_status"); }; }; then
12446 ac_cv_lib_gpm_Gpm_Open=yes
12447 else
12448 echo "$as_me: failed program was:" >&5
12449 cat "conftest.$ac_ext" >&5
12450 ac_cv_lib_gpm_Gpm_Open=no
12451 fi
12452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12453 LIBS=$ac_check_lib_save_LIBS
12454 fi
12455 echo "$as_me:12455: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12456 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
12457 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
12458 echo "$as_me:12458: checking for initscr in -lgpm" >&5
12459 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
12460 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
12461 echo $ECHO_N "(cached) $ECHO_C" >&6
12462 else
12463 ac_check_lib_save_LIBS=$LIBS
12464 LIBS="-lgpm $LIBS"
12465 cat >"conftest.$ac_ext" <<_ACEOF
12466 #line 12466 "configure"
12467 #include "confdefs.h"
12468
12469 /* Override any gcc2 internal prototype to avoid an error. */
12470 #ifdef __cplusplus
12471 extern "C"
12472 #endif
12473 /* We use char because int might match the return type of a gcc2
12474 builtin and then its argument prototype would still apply. */
12475 char initscr (void);
12476 int
12477 main (void)
12478 {
12479 initscr ();
12480 ;
12481 return 0;
12482 }
12483 _ACEOF
12484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12485 if { (eval echo "$as_me:12485: \"$ac_link\"") >&5
12486 (eval $ac_link) 2>&5
12487 ac_status=$?
12488 echo "$as_me:12488: \$? = $ac_status" >&5
12489 (exit "$ac_status"); } &&
12490 { ac_try='test -s "conftest$ac_exeext"'
12491 { (eval echo "$as_me:12491: \"$ac_try\"") >&5
12492 (eval $ac_try) 2>&5
12493 ac_status=$?
12494 echo "$as_me:12494: \$? = $ac_status" >&5
12495 (exit "$ac_status"); }; }; then
12496 ac_cv_lib_gpm_initscr=yes
12497 else
12498 echo "$as_me: failed program was:" >&5
12499 cat "conftest.$ac_ext" >&5
12500 ac_cv_lib_gpm_initscr=no
12501 fi
12502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12503 LIBS=$ac_check_lib_save_LIBS
12504 fi
12505 echo "$as_me:12505: result: $ac_cv_lib_gpm_initscr" >&5
12506 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
12507 if test "$ac_cv_lib_gpm_initscr" = yes; then
12508 LIBS="$cf_ncurses_SAVE"
12509 else
12510 cf_ncurses_LIBS="-lgpm"
12511 fi
12512
12513 fi
12514
12515 case "$host_os" in
12516 (freebsd*)
12517 # This is only necessary if you are linking against an obsolete
12518 # version of ncurses (but it should do no harm, since it is static).
12519 if test "$cf_nculib_root" = ncurses ; then
12520 echo "$as_me:12520: checking for tgoto in -lmytinfo" >&5
12521 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12522 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12523 echo $ECHO_N "(cached) $ECHO_C" >&6
12524 else
12525 ac_check_lib_save_LIBS=$LIBS
12526 LIBS="-lmytinfo $LIBS"
12527 cat >"conftest.$ac_ext" <<_ACEOF
12528 #line 12528 "configure"
12529 #include "confdefs.h"
12530
12531 /* Override any gcc2 internal prototype to avoid an error. */
12532 #ifdef __cplusplus
12533 extern "C"
12534 #endif
12535 /* We use char because int might match the return type of a gcc2
12536 builtin and then its argument prototype would still apply. */
12537 char tgoto (void);
12538 int
12539 main (void)
12540 {
12541 tgoto ();
12542 ;
12543 return 0;
12544 }
12545 _ACEOF
12546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12547 if { (eval echo "$as_me:12547: \"$ac_link\"") >&5
12548 (eval $ac_link) 2>&5
12549 ac_status=$?
12550 echo "$as_me:12550: \$? = $ac_status" >&5
12551 (exit "$ac_status"); } &&
12552 { ac_try='test -s "conftest$ac_exeext"'
12553 { (eval echo "$as_me:12553: \"$ac_try\"") >&5
12554 (eval $ac_try) 2>&5
12555 ac_status=$?
12556 echo "$as_me:12556: \$? = $ac_status" >&5
12557 (exit "$ac_status"); }; }; then
12558 ac_cv_lib_mytinfo_tgoto=yes
12559 else
12560 echo "$as_me: failed program was:" >&5
12561 cat "conftest.$ac_ext" >&5
12562 ac_cv_lib_mytinfo_tgoto=no
12563 fi
12564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12565 LIBS=$ac_check_lib_save_LIBS
12566 fi
12567 echo "$as_me:12567: result: $ac_cv_lib_mytinfo_tgoto" >&5
12568 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12569 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
12570 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12571 fi
12572
12573 fi
12574 ;;
12575 esac
12576
12577 cf_add_libs="$LIBS"
12578 # reverse order
12579 cf_add_0lib=
12580 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12581 # filter duplicates
12582 for cf_add_1lib in $cf_add_0lib; do
12583 for cf_add_2lib in $cf_add_libs; do
12584 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12585 cf_add_1lib=
12586 break
12587 fi
12588 done
12589 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12590 done
12591 LIBS="$cf_add_libs"
12592
12593 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
12594 then
12595
12596 cf_add_libs="$LIBS"
12597 # reverse order
12598 cf_add_0lib=
12599 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12600 # filter duplicates
12601 for cf_add_1lib in $cf_add_0lib; do
12602 for cf_add_2lib in $cf_add_libs; do
12603 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12604 cf_add_1lib=
12605 break
12606 fi
12607 done
12608 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12609 done
12610 LIBS="$cf_add_libs"
12611
12612 else
12613
12614 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
12615 cf_libdir=""
12616 echo "$as_me:12616: checking for initscr" >&5
12617 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12618 if test "${ac_cv_func_initscr+set}" = set; then
12619 echo $ECHO_N "(cached) $ECHO_C" >&6
12620 else
12621 cat >"conftest.$ac_ext" <<_ACEOF
12622 #line 12622 "configure"
12623 #include "confdefs.h"
12624 #define initscr autoconf_temporary
12625 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12626 #undef initscr
12627
12628 #ifdef __cplusplus
12629 extern "C"
12630 #endif
12631
12632 /* We use char because int might match the return type of a gcc2
12633 builtin and then its argument prototype would still apply. */
12634 char initscr (void);
12635
12636 int
12637 main (void)
12638 {
12639
12640 /* The GNU C library defines stubs for functions which it implements
12641 to always fail with ENOSYS. Some functions are actually named
12642 something starting with __ and the normal name is an alias. */
12643 #if defined (__stub_initscr) || defined (__stub___initscr)
12644 #error found stub for initscr
12645 #endif
12646
12647 return initscr ();
12648 ;
12649 return 0;
12650 }
12651 _ACEOF
12652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12653 if { (eval echo "$as_me:12653: \"$ac_link\"") >&5
12654 (eval $ac_link) 2>&5
12655 ac_status=$?
12656 echo "$as_me:12656: \$? = $ac_status" >&5
12657 (exit "$ac_status"); } &&
12658 { ac_try='test -s "conftest$ac_exeext"'
12659 { (eval echo "$as_me:12659: \"$ac_try\"") >&5
12660 (eval $ac_try) 2>&5
12661 ac_status=$?
12662 echo "$as_me:12662: \$? = $ac_status" >&5
12663 (exit "$ac_status"); }; }; then
12664 ac_cv_func_initscr=yes
12665 else
12666 echo "$as_me: failed program was:" >&5
12667 cat "conftest.$ac_ext" >&5
12668 ac_cv_func_initscr=no
12669 fi
12670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12671 fi
12672 echo "$as_me:12672: result: $ac_cv_func_initscr" >&5
12673 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12674 if test "$ac_cv_func_initscr" = yes; then
12675 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12676 else
12677
12678 cf_save_LIBS="$LIBS"
12679 echo "$as_me:12679: checking for initscr in -l$cf_nculib_root" >&5
12680 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12681 LIBS="-l$cf_nculib_root $LIBS"
12682 cat >"conftest.$ac_ext" <<_ACEOF
12683 #line 12683 "configure"
12684 #include "confdefs.h"
12685 #include <${cf_cv_ncurses_header:-curses.h}>
12686 int
12687 main (void)
12688 {
12689 initscr()
12690 ;
12691 return 0;
12692 }
12693 _ACEOF
12694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12695 if { (eval echo "$as_me:12695: \"$ac_link\"") >&5
12696 (eval $ac_link) 2>&5
12697 ac_status=$?
12698 echo "$as_me:12698: \$? = $ac_status" >&5
12699 (exit "$ac_status"); } &&
12700 { ac_try='test -s "conftest$ac_exeext"'
12701 { (eval echo "$as_me:12701: \"$ac_try\"") >&5
12702 (eval $ac_try) 2>&5
12703 ac_status=$?
12704 echo "$as_me:12704: \$? = $ac_status" >&5
12705 (exit "$ac_status"); }; }; then
12706 echo "$as_me:12706: result: yes" >&5
12707 echo "${ECHO_T}yes" >&6
12708 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12709
12710 else
12711 echo "$as_me: failed program was:" >&5
12712 cat "conftest.$ac_ext" >&5
12713 echo "$as_me:12713: result: no" >&5
12714 echo "${ECHO_T}no" >&6
12715
12716 cf_search=
12717 cf_library_path_list=""
12718 if test -n "${LDFLAGS}${LIBS}" ; then
12719 for cf_library_path in $LDFLAGS $LIBS
12720 do
12721 case "$cf_library_path" in
12722 (-L*)
12723 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12724
12725 test "x$cf_library_path" != "xNONE" && \
12726 test -d "$cf_library_path" && \
12727 {
12728 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
12729 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
12730 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12731 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12732 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12733 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"
12734 }
12735
12736 cf_library_path_list="$cf_library_path_list $cf_search"
12737 ;;
12738 esac
12739 done
12740 fi
12741
12742 cf_search=
12743
12744 test "x$prefix" != "xNONE" && \
12745 test -d "$prefix" && \
12746 {
12747 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
12748 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
12749 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12750 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12751 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12752 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12753 }
12754
12755 for cf_subdir_prefix in \
12756 /usr \
12757 /usr/local \
12758 /usr/pkg \
12759 /opt \
12760 /opt/local \
12761 $HOME
12762 do
12763
12764 test "x$cf_subdir_prefix" != "x$prefix" && \
12765 test -d "$cf_subdir_prefix" && \
12766 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12767 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
12768 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
12769 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
12770 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
12771 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
12772 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"
12773 }
12774
12775 done
12776
12777 cf_search="$cf_library_path_list $cf_search"
12778
12779 for cf_libdir in $cf_search
12780 do
12781 echo "$as_me:12781: checking for -l$cf_nculib_root in $cf_libdir" >&5
12782 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12783 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12784 cat >"conftest.$ac_ext" <<_ACEOF
12785 #line 12785 "configure"
12786 #include "confdefs.h"
12787 #include <${cf_cv_ncurses_header:-curses.h}>
12788 int
12789 main (void)
12790 {
12791 initscr()
12792 ;
12793 return 0;
12794 }
12795 _ACEOF
12796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12797 if { (eval echo "$as_me:12797: \"$ac_link\"") >&5
12798 (eval $ac_link) 2>&5
12799 ac_status=$?
12800 echo "$as_me:12800: \$? = $ac_status" >&5
12801 (exit "$ac_status"); } &&
12802 { ac_try='test -s "conftest$ac_exeext"'
12803 { (eval echo "$as_me:12803: \"$ac_try\"") >&5
12804 (eval $ac_try) 2>&5
12805 ac_status=$?
12806 echo "$as_me:12806: \$? = $ac_status" >&5
12807 (exit "$ac_status"); }; }; then
12808 echo "$as_me:12808: result: yes" >&5
12809 echo "${ECHO_T}yes" >&6
12810 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12811 break
12812 else
12813 echo "$as_me: failed program was:" >&5
12814 cat "conftest.$ac_ext" >&5
12815 echo "$as_me:12815: result: no" >&5
12816 echo "${ECHO_T}no" >&6
12817 LIBS="$cf_save_LIBS"
12818 fi
12819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12820 done
12821
12822 fi
12823 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12824
12825 fi
12826
12827 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
12828
12829 if test "$cf_found_library" = no ; then
12830 { { echo "$as_me:12830: error: Cannot link $cf_nculib_root library" >&5
12831 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12832 { (exit 1); exit 1; }; }
12833 fi
12834
12835 fi
12836
12837 if test -n "$cf_ncurses_LIBS" ; then
12838 echo "$as_me:12838: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12839 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12840 cf_ncurses_SAVE="$LIBS"
12841 for p in $cf_ncurses_LIBS ; do
12842 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
12843 if test "$q" != "$LIBS" ; then
12844 LIBS="$q"
12845 fi
12846 done
12847 cat >"conftest.$ac_ext" <<_ACEOF
12848 #line 12848 "configure"
12849 #include "confdefs.h"
12850 #include <${cf_cv_ncurses_header:-curses.h}>
12851 int
12852 main (void)
12853 {
12854 initscr(); mousemask(0,0); tigetstr((char *)0);
12855 ;
12856 return 0;
12857 }
12858 _ACEOF
12859 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12860 if { (eval echo "$as_me:12860: \"$ac_link\"") >&5
12861 (eval $ac_link) 2>&5
12862 ac_status=$?
12863 echo "$as_me:12863: \$? = $ac_status" >&5
12864 (exit "$ac_status"); } &&
12865 { ac_try='test -s "conftest$ac_exeext"'
12866 { (eval echo "$as_me:12866: \"$ac_try\"") >&5
12867 (eval $ac_try) 2>&5
12868 ac_status=$?
12869 echo "$as_me:12869: \$? = $ac_status" >&5
12870 (exit "$ac_status"); }; }; then
12871 echo "$as_me:12871: result: yes" >&5
12872 echo "${ECHO_T}yes" >&6
12873 else
12874 echo "$as_me: failed program was:" >&5
12875 cat "conftest.$ac_ext" >&5
12876 echo "$as_me:12876: result: no" >&5
12877 echo "${ECHO_T}no" >&6
12878 LIBS="$cf_ncurses_SAVE"
12879 fi
12880 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12881 fi
12882
12883 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12884
12885 cat >>confdefs.h <<EOF
12886 #define $cf_nculib_ROOT 1
12887 EOF
12888
12889 fi
12890 else
12891 NCURSES_CONFIG=none
12892 fi
12893
12894 ;;
12895 (*)
12896 { { echo "$as_me:12896: error: unexpected screen-value: $cf_cv_screen" >&5
12897 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
12898 { (exit 1); exit 1; }; }
12899 ;;
12900 esac
12901
12902 if test "$NCURSES_CONFIG_PKG" != none ; then
12903 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
12904
12905 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
12906 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
12907 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
12908
12909 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
12910 if test -z "$cf_cv_abi_version"
12911 then
12912 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
12913 fi
12914
12915 elif test "$NCURSES_CONFIG" != none ; then
12916
12917 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
12918
12919 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
12920 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
12921 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
12922
12923 # ABI version is not available from headers
12924 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
12925
12926 else
12927
12928 for cf_name in MAJOR MINOR PATCH
12929 do
12930 cat >conftest.$ac_ext <<CF_EOF
12931 #include <${cf_cv_ncurses_header:-curses.h}>
12932 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
12933 CF_EOF
12934 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
12935 { (eval echo "$as_me:12935: \"$cf_try\"") >&5
12936 (eval $cf_try) 2>&5
12937 ac_status=$?
12938 echo "$as_me:12938: \$? = $ac_status" >&5
12939 (exit "$ac_status"); }
12940 if test -f conftest.out ; then
12941 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
12942 eval NCURSES_$cf_name=\"$cf_result\"
12943 # cat conftest.$ac_ext
12944 # cat conftest.out
12945 fi
12946 done
12947
12948 cf_cv_abi_version=${NCURSES_MAJOR}
12949
12950 fi
12951
12952 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
12953
12954 cf_cv_timestamp=`date`
12955
12956 echo "$as_me:12956: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
12957 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
12958
12959 echo "$as_me:12959: checking if KEY_RESIZE is supported" >&5
12960 echo $ECHO_N "checking if KEY_RESIZE is supported... $ECHO_C" >&6
12961 if test "${cf_cv_curses_resizes+set}" = set; then
12962 echo $ECHO_N "(cached) $ECHO_C" >&6
12963 else
12964
12965 cat >"conftest.$ac_ext" <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12968 #include <${cf_cv_ncurses_header:-curses.h}>
12969 int
12970 main (void)
12971 {
12972 int key = KEY_RESIZE; (void)key
12973 ;
12974 return 0;
12975 }
12976 _ACEOF
12977 rm -f "conftest.$ac_objext"
12978 if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
12979 (eval $ac_compile) 2>&5
12980 ac_status=$?
12981 echo "$as_me:12981: \$? = $ac_status" >&5
12982 (exit "$ac_status"); } &&
12983 { ac_try='test -s "conftest.$ac_objext"'
12984 { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985 (eval $ac_try) 2>&5
12986 ac_status=$?
12987 echo "$as_me:12987: \$? = $ac_status" >&5
12988 (exit "$ac_status"); }; }; then
12989 cf_cv_curses_resizes=yes
12990 else
12991 echo "$as_me: failed program was:" >&5
12992 cat "conftest.$ac_ext" >&5
12993 cf_cv_curses_resizes=no
12994 fi
12995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12996 fi
12997 echo "$as_me:12997: result: $cf_cv_curses_resizes" >&5
12998 echo "${ECHO_T}$cf_cv_curses_resizes" >&6
12999 cf_cv_enable_sigwinch=0
13000 test "$cf_cv_curses_resizes" = yes && cf_cv_enable_sigwinch=1
13001
13002 echo "$as_me:13002: checking if you want to have a library-prefix" >&5
13003 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
13004
13005 # Check whether --with-lib-prefix or --without-lib-prefix was given.
13006 if test "${with_lib_prefix+set}" = set; then
13007 withval="$with_lib_prefix"
13008 with_lib_prefix=$withval
13009 else
13010 with_lib_prefix=auto
13011 fi;
13012 echo "$as_me:13012: result: $with_lib_prefix" >&5
13013 echo "${ECHO_T}$with_lib_prefix" >&6
13014
13015 if test "$with_lib_prefix" = auto
13016 then
13017
13018 case "$cf_cv_system_name" in
13019 (OS/2*|os2*)
13020 if test "$DFT_LWR_MODEL" = libtool; then
13021 LIB_PREFIX='lib'
13022 else
13023 LIB_PREFIX=''
13024 fi
13025 ;;
13026 (*-msvc*)
13027 LIB_PREFIX=''
13028 ;;
13029 (*) LIB_PREFIX='lib'
13030 ;;
13031 esac
13032 cf_prefix=$LIB_PREFIX
13033
13034 elif test "$with_lib_prefix" = no
13035 then
13036 LIB_PREFIX=
13037 else
13038 LIB_PREFIX=$with_lib_prefix
13039 fi
13040
13041 LIB_SUFFIX=
13042
13043 ###############################################################################
13044
13045 if test X"$CC_G_OPT" = X"" ; then
13046 CC_G_OPT='-g'
13047 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
13048 fi
13049
13050 echo "$as_me:13050: checking for default loader flags" >&5
13051 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
13052 case $DFT_LWR_MODEL in
13053 (normal) LD_MODEL='' ;;
13054 (debug) LD_MODEL=$CC_G_OPT ;;
13055 (profile) LD_MODEL='-pg';;
13056 (shared) LD_MODEL='' ;;
13057 esac
13058 echo "$as_me:13058: result: $LD_MODEL" >&5
13059 echo "${ECHO_T}$LD_MODEL" >&6
13060
13061 LD_RPATH_OPT=
13062 if test "x$cf_cv_enable_rpath" != xno
13063 then
13064 echo "$as_me:13064: checking for an rpath option" >&5
13065 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
13066 case "$cf_cv_system_name" in
13067 (irix*)
13068 if test "$GCC" = yes; then
13069 LD_RPATH_OPT="-Wl,-rpath,"
13070 else
13071 LD_RPATH_OPT="-rpath "
13072 fi
13073 ;;
13074 (linux*|gnu*|k*bsd*-gnu|freebsd*)
13075 LD_RPATH_OPT="-Wl,-rpath,"
13076 ;;
13077 (openbsd[2-9].*|mirbsd*)
13078 LD_RPATH_OPT="-Wl,-rpath,"
13079 ;;
13080 (dragonfly*)
13081 LD_RPATH_OPT="-rpath "
13082 ;;
13083 (netbsd*)
13084 LD_RPATH_OPT="-Wl,-rpath,"
13085 ;;
13086 (osf*|mls+*)
13087 LD_RPATH_OPT="-rpath "
13088 ;;
13089 (solaris2*)
13090 LD_RPATH_OPT="-R"
13091 ;;
13092 (*)
13093 ;;
13094 esac
13095 echo "$as_me:13095: result: $LD_RPATH_OPT" >&5
13096 echo "${ECHO_T}$LD_RPATH_OPT" >&6
13097
13098 case "x$LD_RPATH_OPT" in
13099 (x-R*)
13100 echo "$as_me:13100: checking if we need a space after rpath option" >&5
13101 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
13102 cf_save_LIBS="$LIBS"
13103
13104 cf_add_libs="$LIBS"
13105 # reverse order
13106 cf_add_0lib=
13107 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13108 # filter duplicates
13109 for cf_add_1lib in $cf_add_0lib; do
13110 for cf_add_2lib in $cf_add_libs; do
13111 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13112 cf_add_1lib=
13113 break
13114 fi
13115 done
13116 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13117 done
13118 LIBS="$cf_add_libs"
13119
13120 cat >"conftest.$ac_ext" <<_ACEOF
13121 #line 13121 "configure"
13122 #include "confdefs.h"
13123
13124 int
13125 main (void)
13126 {
13127
13128 ;
13129 return 0;
13130 }
13131 _ACEOF
13132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13133 if { (eval echo "$as_me:13133: \"$ac_link\"") >&5
13134 (eval $ac_link) 2>&5
13135 ac_status=$?
13136 echo "$as_me:13136: \$? = $ac_status" >&5
13137 (exit "$ac_status"); } &&
13138 { ac_try='test -s "conftest$ac_exeext"'
13139 { (eval echo "$as_me:13139: \"$ac_try\"") >&5
13140 (eval $ac_try) 2>&5
13141 ac_status=$?
13142 echo "$as_me:13142: \$? = $ac_status" >&5
13143 (exit "$ac_status"); }; }; then
13144 cf_rpath_space=no
13145 else
13146 echo "$as_me: failed program was:" >&5
13147 cat "conftest.$ac_ext" >&5
13148 cf_rpath_space=yes
13149 fi
13150 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13151 LIBS="$cf_save_LIBS"
13152 echo "$as_me:13152: result: $cf_rpath_space" >&5
13153 echo "${ECHO_T}$cf_rpath_space" >&6
13154 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
13155 ;;
13156 esac
13157 fi
13158
13159 RM_SHARED_OPTS=
13160 LOCAL_LDFLAGS=
13161 LOCAL_LDFLAGS2=
13162 LD_SHARED_OPTS=
13163 INSTALL_LIB="-m 644"
13164 : ${rel_builddir:=.}
13165
13166 shlibdir=$libdir
13167
13168 MAKE_DLLS="#"
13169
13170 cf_cv_do_symlinks=no
13171 cf_ld_rpath_opt=
13172 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
13173
13174 echo "$as_me:13174: checking whether to use release or ABI version in shared library file names" >&5
13175 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
13176
13177 # Check whether --with-shlib-version or --without-shlib-version was given.
13178 if test "${with_shlib_version+set}" = set; then
13179 withval="$with_shlib_version"
13180 test -z "$withval" && withval=auto
13181 case "$withval" in
13182 (yes)
13183 cf_cv_shlib_version=auto
13184 ;;
13185 (rel|abi|auto)
13186 cf_cv_shlib_version=$withval
13187 ;;
13188 (*)
13189 echo "$as_me:13189: result: $withval" >&5
13190 echo "${ECHO_T}$withval" >&6
13191 { { echo "$as_me:13191: error: option value must be one of: rel, abi, or auto" >&5
13192 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
13193 { (exit 1); exit 1; }; }
13194 ;;
13195 esac
13196
13197 else
13198 cf_cv_shlib_version=auto
13199 fi;
13200 echo "$as_me:13200: result: $cf_cv_shlib_version" >&5
13201 echo "${ECHO_T}$cf_cv_shlib_version" >&6
13202
13203 cf_cv_rm_so_locs=no
13204 cf_try_cflags=
13205
13206 # Some less-capable ports of gcc support only -fpic
13207 CC_SHARED_OPTS=
13208
13209 cf_try_fPIC=no
13210 if test "$GCC" = yes
13211 then
13212 cf_try_fPIC=yes
13213 else
13214 case "$cf_cv_system_name" in
13215 (*linux*) # e.g., PGI compiler
13216 cf_try_fPIC=yes
13217 ;;
13218 esac
13219 fi
13220
13221 if test "$cf_try_fPIC" = yes
13222 then
13223 echo "$as_me:13223: checking which $CC option to use" >&5
13224 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
13225 cf_save_CFLAGS="$CFLAGS"
13226 for CC_SHARED_OPTS in -fPIC -fpic ''
13227 do
13228 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
13229 cat >"conftest.$ac_ext" <<_ACEOF
13230 #line 13230 "configure"
13231 #include "confdefs.h"
13232 #include <stdio.h>
13233 int
13234 main (void)
13235 {
13236 int x = 1; (void)x
13237 ;
13238 return 0;
13239 }
13240 _ACEOF
13241 rm -f "conftest.$ac_objext"
13242 if { (eval echo "$as_me:13242: \"$ac_compile\"") >&5
13243 (eval $ac_compile) 2>&5
13244 ac_status=$?
13245 echo "$as_me:13245: \$? = $ac_status" >&5
13246 (exit "$ac_status"); } &&
13247 { ac_try='test -s "conftest.$ac_objext"'
13248 { (eval echo "$as_me:13248: \"$ac_try\"") >&5
13249 (eval $ac_try) 2>&5
13250 ac_status=$?
13251 echo "$as_me:13251: \$? = $ac_status" >&5
13252 (exit "$ac_status"); }; }; then
13253 break
13254 else
13255 echo "$as_me: failed program was:" >&5
13256 cat "conftest.$ac_ext" >&5
13257 fi
13258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13259 done
13260 echo "$as_me:13260: result: $CC_SHARED_OPTS" >&5
13261 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
13262 CFLAGS="$cf_save_CFLAGS"
13263 fi
13264
13265 cf_cv_shlib_version_infix=no
13266
13267 case "$cf_cv_system_name" in
13268 (aix4.3-9*|aix[5-7]*)
13269 if test "$GCC" = yes; then
13270 CC_SHARED_OPTS='-Wl,-brtl'
13271 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
13272 else
13273 CC_SHARED_OPTS='-brtl'
13274 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
13275 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
13276 fi
13277 ;;
13278 (beos*)
13279 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
13280 ;;
13281 (cygwin*)
13282 CC_SHARED_OPTS=
13283 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13284 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13285 cf_cv_shlib_version=cygdll
13286 cf_cv_shlib_version_infix=cygdll
13287 shlibdir=$bindir
13288 MAKE_DLLS=
13289 cat >mk_shared_lib.sh <<-CF_EOF
13290 #!$SHELL
13291 SHARED_LIB=\$1
13292 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
13293 shift
13294 cat <<-EOF
13295 Linking shared library
13296 ** SHARED_LIB \$SHARED_LIB
13297 ** IMPORT_LIB \$IMPORT_LIB
13298 EOF
13299 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13300 CF_EOF
13301 chmod +x mk_shared_lib.sh
13302 ;;
13303 (msys*)
13304 CC_SHARED_OPTS=
13305 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13306 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13307 cf_cv_shlib_version=msysdll
13308 cf_cv_shlib_version_infix=msysdll
13309 shlibdir=$bindir
13310 MAKE_DLLS=
13311 cat >mk_shared_lib.sh <<-CF_EOF
13312 #!$SHELL
13313 SHARED_LIB=\$1
13314 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
13315 shift
13316 cat <<-EOF
13317 Linking shared library
13318 ** SHARED_LIB \$SHARED_LIB
13319 ** IMPORT_LIB \$IMPORT_LIB
13320 EOF
13321 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13322 CF_EOF
13323 chmod +x mk_shared_lib.sh
13324 ;;
13325 (darwin*)
13326 cf_try_cflags="no-cpp-precomp"
13327 CC_SHARED_OPTS="-dynamic"
13328 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
13329 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
13330 cf_cv_shlib_version_infix=yes
13331 echo "$as_me:13331: checking if ld -search_paths_first works" >&5
13332 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
13333 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
13334 echo $ECHO_N "(cached) $ECHO_C" >&6
13335 else
13336
13337 cf_save_LDFLAGS=$LDFLAGS
13338 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
13339 cat >"conftest.$ac_ext" <<_ACEOF
13340 #line 13340 "configure"
13341 #include "confdefs.h"
13342
13343 int
13344 main (void)
13345 {
13346 int i;
13347 ;
13348 return 0;
13349 }
13350 _ACEOF
13351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13352 if { (eval echo "$as_me:13352: \"$ac_link\"") >&5
13353 (eval $ac_link) 2>&5
13354 ac_status=$?
13355 echo "$as_me:13355: \$? = $ac_status" >&5
13356 (exit "$ac_status"); } &&
13357 { ac_try='test -s "conftest$ac_exeext"'
13358 { (eval echo "$as_me:13358: \"$ac_try\"") >&5
13359 (eval $ac_try) 2>&5
13360 ac_status=$?
13361 echo "$as_me:13361: \$? = $ac_status" >&5
13362 (exit "$ac_status"); }; }; then
13363 cf_cv_ldflags_search_paths_first=yes
13364 else
13365 echo "$as_me: failed program was:" >&5
13366 cat "conftest.$ac_ext" >&5
13367 cf_cv_ldflags_search_paths_first=no
13368 fi
13369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13370 LDFLAGS=$cf_save_LDFLAGS
13371 fi
13372 echo "$as_me:13372: result: $cf_cv_ldflags_search_paths_first" >&5
13373 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
13374 if test "$cf_cv_ldflags_search_paths_first" = yes; then
13375 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
13376 fi
13377 ;;
13378 (haiku*)
13379
13380 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13381 if test "$cf_cv_shlib_version" = rel; then
13382 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13383 else
13384 cf_cv_shared_soname='`basename $@`'
13385 fi
13386
13387 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13388 ;;
13389 (hpux[7-8]*)
13390 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
13391 if test "$GCC" != yes; then
13392 CC_SHARED_OPTS='+Z'
13393 fi
13394 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
13395 INSTALL_LIB="-m 555"
13396 ;;
13397 (hpux*)
13398 # (tested with gcc 2.7.2 -- I don't have c89)
13399 if test "$GCC" = yes; then
13400 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
13401 else
13402 CC_SHARED_OPTS='+Z'
13403 LD_SHARED_OPTS='-Wl,+b,${libdir}'
13404 fi
13405 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
13406 # HP-UX shared libraries must be executable, and should be
13407 # readonly to exploit a quirk in the memory manager.
13408 INSTALL_LIB="-m 555"
13409 ;;
13410 (interix*)
13411 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13412 if test "$cf_cv_shlib_version" = rel; then
13413 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13414 else
13415 cf_shared_soname='`basename $@`'
13416 fi
13417 CC_SHARED_OPTS=
13418 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
13419 ;;
13420 (irix*)
13421 if test "$cf_cv_enable_rpath" = yes ; then
13422 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13423 fi
13424 # tested with IRIX 5.2 and 'cc'.
13425 if test "$GCC" != yes; then
13426 CC_SHARED_OPTS='-KPIC'
13427 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
13428 else
13429 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
13430 fi
13431 cf_cv_rm_so_locs=yes
13432 ;;
13433 (linux*|gnu*|k*bsd*-gnu)
13434 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13435 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13436 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13437 fi
13438 if test "$cf_cv_enable_rpath" = yes ; then
13439 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13440 fi
13441
13442 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13443 if test "$cf_cv_shlib_version" = rel; then
13444 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13445 else
13446 cf_cv_shared_soname='`basename $@`'
13447 fi
13448
13449 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13450 ;;
13451 (mingw*msvc*)
13452 cf_cv_shlib_version=msvcdll
13453 cf_cv_shlib_version_infix=msvcdll
13454 shlibdir=$bindir
13455 MAKE_DLLS=
13456 if test "$DFT_LWR_MODEL" = "shared" ; then
13457 LOCAL_LDFLAGS="-link -dll"
13458 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13459 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
13460 fi
13461 CC_SHARED_OPTS=
13462 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
13463 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
13464 cat >mk_shared_lib.sh <<-CF_EOF
13465 #!$SHELL
13466 SHARED_LIB=\$1
13467 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
13468 shift
13469 my_ld=\$1
13470 shift
13471 cat <<-EOF
13472 Linking shared library
13473 ** SHARED LIB \$SHARED_LIB
13474 ** IMPORT_LIB \$IMPORT_LIB
13475 EOF
13476 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
13477 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
13478 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
13479 CF_EOF
13480 chmod +x mk_shared_lib.sh
13481 cat >mk_prog.sh <<-CF_EOF
13482 #!$SHELL
13483 shift
13484 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
13485 LD="$LD"
13486 clopts=()
13487 ldopts=("/subsystem:console")
13488 libs=()
13489 isdll=0
13490 while test \$# -gt 0; do
13491 case "\$1" in
13492 -link)
13493 # ignore -link argument
13494 ;;
13495 -M[TD] | -M[TD]d)
13496 # ignore runtime-library option
13497 ;;
13498 -dll)
13499 isdll=1
13500 ;;
13501 -W* | -w*)
13502 # ignore warnings
13503 ;;
13504 -D*)
13505 clopts+=("\$1")
13506 ;;
13507 -I*)
13508 clopts+=("\$1")
13509 ;;
13510 -l*)
13511 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
13512 ;;
13513 -L*)
13514 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
13515 ;;
13516 *.obj | *.$OBJEXT)
13517 ldopts+=("\$1")
13518 ;;
13519 -Wl,*)
13520 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
13521 ldopts+=("\${linkarg}")
13522 done
13523 ;;
13524 *.lib)
13525 ldopts+=("\$1")
13526 ;;
13527 -o)
13528 shift
13529 ldopts+=("-out:\$1")
13530 ;;
13531 *)
13532 clopts+=("\$1")
13533 ldopts+=("\$1")
13534 ;;
13535 esac
13536 shift
13537 done
13538 if [ "\$isdll" -ne 0 ]; then
13539 for lib in \${libs[*]}; do
13540 ldopts+=("\$lib.dll.lib")
13541 done
13542 else
13543 for lib in \${libs[*]}; do
13544 ldopts+=("\$lib.lib")
13545 done
13546 fi
13547 cat <<-EOF
13548 Creating program
13549 ** ld options: "\${ldopts[@]}"
13550 EOF
13551 exec \$LD \${ldopts[@]}
13552 CF_EOF
13553 chmod +x mk_prog.sh
13554 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
13555 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
13556 ;;
13557 (mingw*)
13558 cf_cv_shlib_version=mingw
13559 cf_cv_shlib_version_infix=mingw
13560 shlibdir=$bindir
13561 MAKE_DLLS=
13562 if test "$DFT_LWR_MODEL" = "shared" ; then
13563 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
13564 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13565 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
13566 fi
13567 CC_SHARED_OPTS=
13568 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13569 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13570 cat >mk_shared_lib.sh <<-CF_EOF
13571 #!$SHELL
13572 SHARED_LIB=\$1
13573 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
13574 shift
13575 cat <<-EOF
13576 Linking shared library
13577 ** SHARED_LIB \$SHARED_LIB
13578 ** IMPORT_LIB \$IMPORT_LIB
13579 EOF
13580 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13581 CF_EOF
13582 chmod +x mk_shared_lib.sh
13583 ;;
13584 (openbsd[2-9].*|mirbsd*)
13585 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13586 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13587 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13588 fi
13589 if test "$cf_cv_enable_rpath" = yes ; then
13590 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13591 fi
13592 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13593
13594 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13595 if test "$cf_cv_shlib_version" = rel; then
13596 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13597 else
13598 cf_cv_shared_soname='`basename $@`'
13599 fi
13600
13601 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13602 ;;
13603 (nskJ*)
13604 CC_SHARED_OPTS=
13605 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
13606 ;;
13607 (nskL*)
13608 CC_SHARED_OPTS=
13609 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
13610 ;;
13611 (nto-qnx*|openbsd*|freebsd[12].*)
13612 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13613 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
13614 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13615 ;;
13616 (dragonfly*|freebsd*)
13617 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13618 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13619 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13620 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
13621 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13622 fi
13623
13624 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13625 if test "$cf_cv_shlib_version" = rel; then
13626 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13627 else
13628 cf_cv_shared_soname='`basename $@`'
13629 fi
13630
13631 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13632 ;;
13633 (netbsd*)
13634 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13635 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13636 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13637 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13638 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13639 if test "$cf_cv_shlib_version" = auto; then
13640 if test -f /usr/libexec/ld.elf_so; then
13641 cf_cv_shlib_version=abi
13642 else
13643 cf_cv_shlib_version=rel
13644 fi
13645 fi
13646
13647 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13648 if test "$cf_cv_shlib_version" = rel; then
13649 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13650 else
13651 cf_cv_shared_soname='`basename $@`'
13652 fi
13653
13654 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
13655 else
13656 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
13657 fi
13658 ;;
13659 (osf*|mls+*)
13660 # tested with OSF/1 V3.2 and 'cc'
13661 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
13662 # link with shared libs).
13663 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
13664 case "$host_os" in
13665 (osf4*)
13666 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
13667 ;;
13668 esac
13669 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
13670 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13671 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13672 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13673 fi
13674 cf_cv_rm_so_locs=yes
13675 ;;
13676 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
13677 # tested with osr5.0.5
13678 if test "$GCC" != yes; then
13679 CC_SHARED_OPTS='-belf -KPIC'
13680 fi
13681 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
13682 if test "$cf_cv_enable_rpath" = yes ; then
13683 # only way is to set LD_RUN_PATH but no switch for it
13684 RUN_PATH=$libdir
13685 fi
13686 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13687 LINK_PROGS='LD_RUN_PATH=${libdir}'
13688 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
13689 ;;
13690 (sunos4*)
13691 # tested with SunOS 4.1.1 and gcc 2.7.0
13692 if test "$GCC" != yes; then
13693 CC_SHARED_OPTS='-KPIC'
13694 fi
13695 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
13696 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13697 ;;
13698 (solaris2*)
13699 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
13700 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
13701 if test "$DFT_LWR_MODEL" = "shared" ; then
13702 LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
13703 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13704 fi
13705 if test "$cf_cv_enable_rpath" = yes ; then
13706 EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
13707 fi
13708
13709 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13710 if test "$cf_cv_shlib_version" = rel; then
13711 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13712 else
13713 cf_cv_shared_soname='`basename $@`'
13714 fi
13715
13716 if test "$GCC" != yes; then
13717 cf_save_CFLAGS="$CFLAGS"
13718 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
13719 do
13720 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
13721 cat >"conftest.$ac_ext" <<_ACEOF
13722 #line 13722 "configure"
13723 #include "confdefs.h"
13724 #include <stdio.h>
13725 int
13726 main (void)
13727 {
13728 printf("Hello\\n");
13729 ;
13730 return 0;
13731 }
13732 _ACEOF
13733 rm -f "conftest.$ac_objext"
13734 if { (eval echo "$as_me:13734: \"$ac_compile\"") >&5
13735 (eval $ac_compile) 2>&5
13736 ac_status=$?
13737 echo "$as_me:13737: \$? = $ac_status" >&5
13738 (exit "$ac_status"); } &&
13739 { ac_try='test -s "conftest.$ac_objext"'
13740 { (eval echo "$as_me:13740: \"$ac_try\"") >&5
13741 (eval $ac_try) 2>&5
13742 ac_status=$?
13743 echo "$as_me:13743: \$? = $ac_status" >&5
13744 (exit "$ac_status"); }; }; then
13745 break
13746 else
13747 echo "$as_me: failed program was:" >&5
13748 cat "conftest.$ac_ext" >&5
13749 fi
13750 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13751 done
13752 CFLAGS="$cf_save_CFLAGS"
13753 CC_SHARED_OPTS=$cf_shared_opts
13754 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
13755 else
13756 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
13757 fi
13758 ;;
13759 (sysv5uw7*|unix_sv*)
13760 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
13761 if test "$GCC" != yes; then
13762 CC_SHARED_OPTS='-KPIC'
13763 fi
13764 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
13765 ;;
13766 (*)
13767 CC_SHARED_OPTS='unknown'
13768 MK_SHARED_LIB='echo unknown'
13769 ;;
13770 esac
13771
13772 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
13773 case "$cf_cv_shlib_version" in
13774 (rel|abi)
13775 case "$MK_SHARED_LIB" in
13776 (*'-o $@')
13777 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
13778 ;;
13779 (*)
13780 { echo "$as_me:13780: WARNING: ignored --with-shlib-version" >&5
13781 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
13782 ;;
13783 esac
13784 ;;
13785 esac
13786
13787 if test -n "$cf_try_cflags"
13788 then
13789 cat > conftest.$ac_ext <<EOF
13790 #line 13790 "${as_me:-configure}"
13791 #include <stdio.h>
13792 int main(int argc, char *argv[])
13793 {
13794 printf("hello\\n");
13795 return (argv[argc-1] == NULL) ;
13796 }
13797 EOF
13798 cf_save_CFLAGS="$CFLAGS"
13799 for cf_opt in $cf_try_cflags
13800 do
13801 CFLAGS="$cf_save_CFLAGS -$cf_opt"
13802 echo "$as_me:13802: checking if CFLAGS option -$cf_opt works" >&5
13803 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
13804 if { (eval echo "$as_me:13804: \"$ac_compile\"") >&5
13805 (eval $ac_compile) 2>&5
13806 ac_status=$?
13807 echo "$as_me:13807: \$? = $ac_status" >&5
13808 (exit "$ac_status"); }; then
13809 echo "$as_me:13809: result: yes" >&5
13810 echo "${ECHO_T}yes" >&6
13811 cf_save_CFLAGS="$CFLAGS"
13812 else
13813 echo "$as_me:13813: result: no" >&5
13814 echo "${ECHO_T}no" >&6
13815 fi
13816 done
13817 CFLAGS="$cf_save_CFLAGS"
13818 fi
13819
13820 # RPATH_LIST is a colon-separated list of directories
13821 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
13822 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
13823
13824 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
13825
13826 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
13827
13828 echo "${as_me:-configure}:13828: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
13829
13830 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
13831
13832 echo "${as_me:-configure}:13832: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
13833
13834 # The test/sample programs in the original tree link using rpath option.
13835 # Make it optional for packagers.
13836 if test -n "$LOCAL_LDFLAGS"
13837 then
13838 echo "$as_me:13838: checking if you want to link sample programs with rpath option" >&5
13839 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
13840
13841 # Check whether --enable-rpath-link or --disable-rpath-link was given.
13842 if test "${enable_rpath_link+set}" = set; then
13843 enableval="$enable_rpath_link"
13844 with_rpath_link=$enableval
13845 else
13846 with_rpath_link=yes
13847 fi;
13848 echo "$as_me:13848: result: $with_rpath_link" >&5
13849 echo "${ECHO_T}$with_rpath_link" >&6
13850 if test "$with_rpath_link" = no
13851 then
13852 LOCAL_LDFLAGS=
13853 LOCAL_LDFLAGS2=
13854 fi
13855 fi
13856
13857 ###############################################################################
13858
13859 ### use option --enable-broken-linker to force on use of broken-linker support
13860
13861 echo "$as_me:13861: checking if you want broken-linker support code" >&5
13862 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
13863
13864 # Check whether --enable-broken_linker or --disable-broken_linker was given.
13865 if test "${enable_broken_linker+set}" = set; then
13866 enableval="$enable_broken_linker"
13867 with_broken_linker=$enableval
13868 else
13869 with_broken_linker=no
13870 fi;
13871 echo "$as_me:13871: result: $with_broken_linker" >&5
13872 echo "${ECHO_T}$with_broken_linker" >&6
13873
13874 : "${BROKEN_LINKER:=0}"
13875 if test "x$with_broken_linker" = xyes ; then
13876
13877 cat >>confdefs.h <<\EOF
13878 #define BROKEN_LINKER 1
13879 EOF
13880
13881 BROKEN_LINKER=1
13882 fi
13883
13884 # Check to define _XOPEN_SOURCE "automatically"
13885
13886 echo "$as_me:13886: checking if the POSIX test-macros are already defined" >&5
13887 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
13888 if test "${cf_cv_posix_visible+set}" = set; then
13889 echo $ECHO_N "(cached) $ECHO_C" >&6
13890 else
13891
13892 cat >"conftest.$ac_ext" <<_ACEOF
13893 #line 13893 "configure"
13894 #include "confdefs.h"
13895 #include <stdio.h>
13896 int
13897 main (void)
13898 {
13899
13900 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
13901 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
13902 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
13903 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
13904 #error conflicting symbols found
13905 #endif
13906
13907 ;
13908 return 0;
13909 }
13910 _ACEOF
13911 rm -f "conftest.$ac_objext"
13912 if { (eval echo "$as_me:13912: \"$ac_compile\"") >&5
13913 (eval $ac_compile) 2>&5
13914 ac_status=$?
13915 echo "$as_me:13915: \$? = $ac_status" >&5
13916 (exit "$ac_status"); } &&
13917 { ac_try='test -s "conftest.$ac_objext"'
13918 { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919 (eval $ac_try) 2>&5
13920 ac_status=$?
13921 echo "$as_me:13921: \$? = $ac_status" >&5
13922 (exit "$ac_status"); }; }; then
13923 cf_cv_posix_visible=no
13924 else
13925 echo "$as_me: failed program was:" >&5
13926 cat "conftest.$ac_ext" >&5
13927 cf_cv_posix_visible=yes
13928 fi
13929 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13930
13931 fi
13932 echo "$as_me:13932: result: $cf_cv_posix_visible" >&5
13933 echo "${ECHO_T}$cf_cv_posix_visible" >&6
13934
13935 if test "$cf_cv_posix_visible" = no; then
13936
13937 cf_XOPEN_SOURCE=600
13938 cf_POSIX_C_SOURCE=199506L
13939 cf_xopen_source=
13940
13941 case "$host_os" in
13942 (aix[4-7]*)
13943 cf_xopen_source="-D_ALL_SOURCE"
13944 ;;
13945 (darwin[0-8].*)
13946 cf_xopen_source="-D_APPLE_C_SOURCE"
13947 ;;
13948 (darwin*)
13949 cf_xopen_source="-D_DARWIN_C_SOURCE"
13950 cf_XOPEN_SOURCE=
13951 ;;
13952 (freebsd*|dragonfly*|midnightbsd*)
13953 # 5.x headers associate
13954 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
13955 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
13956 cf_POSIX_C_SOURCE=200112L
13957 cf_XOPEN_SOURCE=600
13958 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13959 ;;
13960 (hpux11*)
13961 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
13962 ;;
13963 (hpux*)
13964 cf_xopen_source="-D_HPUX_SOURCE"
13965 ;;
13966 (irix[56].*)
13967 cf_xopen_source="-D_SGI_SOURCE"
13968 cf_XOPEN_SOURCE=
13969 ;;
13970 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
13971
13972 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
13973
13974 echo "$as_me:13974: checking if this is the GNU C library" >&5
13975 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
13976 if test "${cf_cv_gnu_library+set}" = set; then
13977 echo $ECHO_N "(cached) $ECHO_C" >&6
13978 else
13979
13980 cat >"conftest.$ac_ext" <<_ACEOF
13981 #line 13981 "configure"
13982 #include "confdefs.h"
13983 #include <sys/types.h>
13984 int
13985 main (void)
13986 {
13987
13988 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
13989 return 0;
13990 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
13991 return 0;
13992 #else
13993 # error not GNU C library
13994 #endif
13995 ;
13996 return 0;
13997 }
13998 _ACEOF
13999 rm -f "conftest.$ac_objext"
14000 if { (eval echo "$as_me:14000: \"$ac_compile\"") >&5
14001 (eval $ac_compile) 2>&5
14002 ac_status=$?
14003 echo "$as_me:14003: \$? = $ac_status" >&5
14004 (exit "$ac_status"); } &&
14005 { ac_try='test -s "conftest.$ac_objext"'
14006 { (eval echo "$as_me:14006: \"$ac_try\"") >&5
14007 (eval $ac_try) 2>&5
14008 ac_status=$?
14009 echo "$as_me:14009: \$? = $ac_status" >&5
14010 (exit "$ac_status"); }; }; then
14011 cf_cv_gnu_library=yes
14012 else
14013 echo "$as_me: failed program was:" >&5
14014 cat "conftest.$ac_ext" >&5
14015 cf_cv_gnu_library=no
14016 fi
14017 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14018
14019 fi
14020 echo "$as_me:14020: result: $cf_cv_gnu_library" >&5
14021 echo "${ECHO_T}$cf_cv_gnu_library" >&6
14022
14023 if test x$cf_cv_gnu_library = xyes; then
14024
14025 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
14026 # was changed to help a little. newlib incorporated the change about 4
14027 # years later.
14028 echo "$as_me:14028: checking if _DEFAULT_SOURCE can be used as a basis" >&5
14029 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
14030 if test "${cf_cv_gnu_library_219+set}" = set; then
14031 echo $ECHO_N "(cached) $ECHO_C" >&6
14032 else
14033
14034 cf_save="$CPPFLAGS"
14035
14036 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14037 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
14038
14039 cat >"conftest.$ac_ext" <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042 #include <sys/types.h>
14043 int
14044 main (void)
14045 {
14046
14047 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
14048 return 0;
14049 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
14050 return 0;
14051 #else
14052 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
14053 #endif
14054 ;
14055 return 0;
14056 }
14057 _ACEOF
14058 rm -f "conftest.$ac_objext"
14059 if { (eval echo "$as_me:14059: \"$ac_compile\"") >&5
14060 (eval $ac_compile) 2>&5
14061 ac_status=$?
14062 echo "$as_me:14062: \$? = $ac_status" >&5
14063 (exit "$ac_status"); } &&
14064 { ac_try='test -s "conftest.$ac_objext"'
14065 { (eval echo "$as_me:14065: \"$ac_try\"") >&5
14066 (eval $ac_try) 2>&5
14067 ac_status=$?
14068 echo "$as_me:14068: \$? = $ac_status" >&5
14069 (exit "$ac_status"); }; }; then
14070 cf_cv_gnu_library_219=yes
14071 else
14072 echo "$as_me: failed program was:" >&5
14073 cat "conftest.$ac_ext" >&5
14074 cf_cv_gnu_library_219=no
14075 fi
14076 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14077 CPPFLAGS="$cf_save"
14078
14079 fi
14080 echo "$as_me:14080: result: $cf_cv_gnu_library_219" >&5
14081 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
14082
14083 if test "x$cf_cv_gnu_library_219" = xyes; then
14084 cf_save="$CPPFLAGS"
14085 echo "$as_me:14085: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
14086 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
14087 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
14088 echo $ECHO_N "(cached) $ECHO_C" >&6
14089 else
14090
14091 cf_fix_cppflags=no
14092 cf_new_cflags=
14093 cf_new_cppflags=
14094 cf_new_extra_cppflags=
14095
14096 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
14097 do
14098 case "$cf_fix_cppflags" in
14099 (no)
14100 case "$cf_add_cflags" in
14101 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14102 case "$cf_add_cflags" in
14103 (-D*)
14104 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14105
14106 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14107 && test -z "${cf_tst_cflags}" \
14108 && cf_fix_cppflags=yes
14109
14110 if test "$cf_fix_cppflags" = yes ; then
14111
14112 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14113 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14114
14115 continue
14116 elif test "${cf_tst_cflags}" = "\"'" ; then
14117
14118 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14119 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14120
14121 continue
14122 fi
14123 ;;
14124 esac
14125 case "$CPPFLAGS" in
14126 (*$cf_add_cflags)
14127 ;;
14128 (*)
14129 case "$cf_add_cflags" in
14130 (-D*)
14131 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14132
14133 CPPFLAGS=`echo "$CPPFLAGS" | \
14134 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14135 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14136
14137 ;;
14138 esac
14139
14140 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14141 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14142
14143 ;;
14144 esac
14145 ;;
14146 (*)
14147
14148 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14149 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14150
14151 ;;
14152 esac
14153 ;;
14154 (yes)
14155
14156 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14157 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14158
14159 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14160
14161 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14162 && test -z "${cf_tst_cflags}" \
14163 && cf_fix_cppflags=no
14164 ;;
14165 esac
14166 done
14167
14168 if test -n "$cf_new_cflags" ; then
14169
14170 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14171 CFLAGS="${CFLAGS}$cf_new_cflags"
14172
14173 fi
14174
14175 if test -n "$cf_new_cppflags" ; then
14176
14177 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14178 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14179
14180 fi
14181
14182 if test -n "$cf_new_extra_cppflags" ; then
14183
14184 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14185 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14186
14187 fi
14188
14189 cat >"conftest.$ac_ext" <<_ACEOF
14190 #line 14190 "configure"
14191 #include "confdefs.h"
14192
14193 #include <limits.h>
14194 #include <sys/types.h>
14195
14196 int
14197 main (void)
14198 {
14199
14200 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
14201 return 0;
14202 #else
14203 # error GNU C library is too old
14204 #endif
14205 ;
14206 return 0;
14207 }
14208 _ACEOF
14209 rm -f "conftest.$ac_objext"
14210 if { (eval echo "$as_me:14210: \"$ac_compile\"") >&5
14211 (eval $ac_compile) 2>&5
14212 ac_status=$?
14213 echo "$as_me:14213: \$? = $ac_status" >&5
14214 (exit "$ac_status"); } &&
14215 { ac_try='test -s "conftest.$ac_objext"'
14216 { (eval echo "$as_me:14216: \"$ac_try\"") >&5
14217 (eval $ac_try) 2>&5
14218 ac_status=$?
14219 echo "$as_me:14219: \$? = $ac_status" >&5
14220 (exit "$ac_status"); }; }; then
14221 cf_cv_gnu_dftsrc_219=yes
14222 else
14223 echo "$as_me: failed program was:" >&5
14224 cat "conftest.$ac_ext" >&5
14225 cf_cv_gnu_dftsrc_219=no
14226 fi
14227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14228
14229 fi
14230 echo "$as_me:14230: result: $cf_cv_gnu_dftsrc_219" >&5
14231 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
14232 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
14233 else
14234 cf_cv_gnu_dftsrc_219=maybe
14235 fi
14236
14237 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
14238
14239 echo "$as_me:14239: checking if we must define _GNU_SOURCE" >&5
14240 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
14241 if test "${cf_cv_gnu_source+set}" = set; then
14242 echo $ECHO_N "(cached) $ECHO_C" >&6
14243 else
14244
14245 cat >"conftest.$ac_ext" <<_ACEOF
14246 #line 14246 "configure"
14247 #include "confdefs.h"
14248 #include <sys/types.h>
14249 int
14250 main (void)
14251 {
14252
14253 #ifndef _XOPEN_SOURCE
14254 #error expected _XOPEN_SOURCE to be defined
14255 #endif
14256 ;
14257 return 0;
14258 }
14259 _ACEOF
14260 rm -f "conftest.$ac_objext"
14261 if { (eval echo "$as_me:14261: \"$ac_compile\"") >&5
14262 (eval $ac_compile) 2>&5
14263 ac_status=$?
14264 echo "$as_me:14264: \$? = $ac_status" >&5
14265 (exit "$ac_status"); } &&
14266 { ac_try='test -s "conftest.$ac_objext"'
14267 { (eval echo "$as_me:14267: \"$ac_try\"") >&5
14268 (eval $ac_try) 2>&5
14269 ac_status=$?
14270 echo "$as_me:14270: \$? = $ac_status" >&5
14271 (exit "$ac_status"); }; }; then
14272 cf_cv_gnu_source=no
14273 else
14274 echo "$as_me: failed program was:" >&5
14275 cat "conftest.$ac_ext" >&5
14276 cf_save="$CPPFLAGS"
14277
14278 cf_fix_cppflags=no
14279 cf_new_cflags=
14280 cf_new_cppflags=
14281 cf_new_extra_cppflags=
14282
14283 for cf_add_cflags in -D_GNU_SOURCE
14284 do
14285 case "$cf_fix_cppflags" in
14286 (no)
14287 case "$cf_add_cflags" in
14288 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14289 case "$cf_add_cflags" in
14290 (-D*)
14291 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14292
14293 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14294 && test -z "${cf_tst_cflags}" \
14295 && cf_fix_cppflags=yes
14296
14297 if test "$cf_fix_cppflags" = yes ; then
14298
14299 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14300 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14301
14302 continue
14303 elif test "${cf_tst_cflags}" = "\"'" ; then
14304
14305 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14306 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14307
14308 continue
14309 fi
14310 ;;
14311 esac
14312 case "$CPPFLAGS" in
14313 (*$cf_add_cflags)
14314 ;;
14315 (*)
14316 case "$cf_add_cflags" in
14317 (-D*)
14318 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14319
14320 CPPFLAGS=`echo "$CPPFLAGS" | \
14321 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14322 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14323
14324 ;;
14325 esac
14326
14327 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14328 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14329
14330 ;;
14331 esac
14332 ;;
14333 (*)
14334
14335 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14336 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14337
14338 ;;
14339 esac
14340 ;;
14341 (yes)
14342
14343 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14344 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14345
14346 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14347
14348 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14349 && test -z "${cf_tst_cflags}" \
14350 && cf_fix_cppflags=no
14351 ;;
14352 esac
14353 done
14354
14355 if test -n "$cf_new_cflags" ; then
14356
14357 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14358 CFLAGS="${CFLAGS}$cf_new_cflags"
14359
14360 fi
14361
14362 if test -n "$cf_new_cppflags" ; then
14363
14364 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14365 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14366
14367 fi
14368
14369 if test -n "$cf_new_extra_cppflags" ; then
14370
14371 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14372 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14373
14374 fi
14375
14376 cat >"conftest.$ac_ext" <<_ACEOF
14377 #line 14377 "configure"
14378 #include "confdefs.h"
14379 #include <sys/types.h>
14380 int
14381 main (void)
14382 {
14383
14384 #ifdef _XOPEN_SOURCE
14385 #error expected _XOPEN_SOURCE to be undefined
14386 #endif
14387 ;
14388 return 0;
14389 }
14390 _ACEOF
14391 rm -f "conftest.$ac_objext"
14392 if { (eval echo "$as_me:14392: \"$ac_compile\"") >&5
14393 (eval $ac_compile) 2>&5
14394 ac_status=$?
14395 echo "$as_me:14395: \$? = $ac_status" >&5
14396 (exit "$ac_status"); } &&
14397 { ac_try='test -s "conftest.$ac_objext"'
14398 { (eval echo "$as_me:14398: \"$ac_try\"") >&5
14399 (eval $ac_try) 2>&5
14400 ac_status=$?
14401 echo "$as_me:14401: \$? = $ac_status" >&5
14402 (exit "$ac_status"); }; }; then
14403 cf_cv_gnu_source=no
14404 else
14405 echo "$as_me: failed program was:" >&5
14406 cat "conftest.$ac_ext" >&5
14407 cf_cv_gnu_source=yes
14408 fi
14409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14410 CPPFLAGS="$cf_save"
14411
14412 fi
14413 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14414
14415 fi
14416 echo "$as_me:14416: result: $cf_cv_gnu_source" >&5
14417 echo "${ECHO_T}$cf_cv_gnu_source" >&6
14418
14419 if test "$cf_cv_gnu_source" = yes
14420 then
14421 echo "$as_me:14421: checking if we should also define _DEFAULT_SOURCE" >&5
14422 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
14423 if test "${cf_cv_default_source+set}" = set; then
14424 echo $ECHO_N "(cached) $ECHO_C" >&6
14425 else
14426
14427 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14428 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
14429
14430 cat >"conftest.$ac_ext" <<_ACEOF
14431 #line 14431 "configure"
14432 #include "confdefs.h"
14433 #include <sys/types.h>
14434 int
14435 main (void)
14436 {
14437
14438 #ifdef _DEFAULT_SOURCE
14439 #error expected _DEFAULT_SOURCE to be undefined
14440 #endif
14441 ;
14442 return 0;
14443 }
14444 _ACEOF
14445 rm -f "conftest.$ac_objext"
14446 if { (eval echo "$as_me:14446: \"$ac_compile\"") >&5
14447 (eval $ac_compile) 2>&5
14448 ac_status=$?
14449 echo "$as_me:14449: \$? = $ac_status" >&5
14450 (exit "$ac_status"); } &&
14451 { ac_try='test -s "conftest.$ac_objext"'
14452 { (eval echo "$as_me:14452: \"$ac_try\"") >&5
14453 (eval $ac_try) 2>&5
14454 ac_status=$?
14455 echo "$as_me:14455: \$? = $ac_status" >&5
14456 (exit "$ac_status"); }; }; then
14457 cf_cv_default_source=no
14458 else
14459 echo "$as_me: failed program was:" >&5
14460 cat "conftest.$ac_ext" >&5
14461 cf_cv_default_source=yes
14462 fi
14463 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14464
14465 fi
14466 echo "$as_me:14466: result: $cf_cv_default_source" >&5
14467 echo "${ECHO_T}$cf_cv_default_source" >&6
14468 if test "$cf_cv_default_source" = yes
14469 then
14470
14471 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14472 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
14473
14474 fi
14475 fi
14476 fi
14477
14478 fi
14479
14480 ;;
14481 linux*musl)
14482 cf_xopen_source="-D_BSD_SOURCE"
14483 ;;
14484 (minix*)
14485 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
14486 ;;
14487 (mirbsd*)
14488 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
14489 cf_XOPEN_SOURCE=
14490
14491 if test "$cf_cv_posix_visible" = no; then
14492
14493 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
14494
14495 cf_save_CFLAGS="$CFLAGS"
14496 cf_save_CPPFLAGS="$CPPFLAGS"
14497
14498 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
14499 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14500 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
14501
14502 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
14503 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14504 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
14505
14506 echo "$as_me:14506: checking if we should define _POSIX_C_SOURCE" >&5
14507 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
14508 if test "${cf_cv_posix_c_source+set}" = set; then
14509 echo $ECHO_N "(cached) $ECHO_C" >&6
14510 else
14511
14512 echo "${as_me:-configure}:14512: testing if the symbol is already defined go no further ..." 1>&5
14513
14514 cat >"conftest.$ac_ext" <<_ACEOF
14515 #line 14515 "configure"
14516 #include "confdefs.h"
14517 #include <sys/types.h>
14518 int
14519 main (void)
14520 {
14521
14522 #ifndef _POSIX_C_SOURCE
14523 #error _POSIX_C_SOURCE is not defined
14524 #endif
14525 ;
14526 return 0;
14527 }
14528 _ACEOF
14529 rm -f "conftest.$ac_objext"
14530 if { (eval echo "$as_me:14530: \"$ac_compile\"") >&5
14531 (eval $ac_compile) 2>&5
14532 ac_status=$?
14533 echo "$as_me:14533: \$? = $ac_status" >&5
14534 (exit "$ac_status"); } &&
14535 { ac_try='test -s "conftest.$ac_objext"'
14536 { (eval echo "$as_me:14536: \"$ac_try\"") >&5
14537 (eval $ac_try) 2>&5
14538 ac_status=$?
14539 echo "$as_me:14539: \$? = $ac_status" >&5
14540 (exit "$ac_status"); }; }; then
14541 cf_cv_posix_c_source=no
14542 else
14543 echo "$as_me: failed program was:" >&5
14544 cat "conftest.$ac_ext" >&5
14545 cf_want_posix_source=no
14546 case .$cf_POSIX_C_SOURCE in
14547 (.[12]??*)
14548 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
14549 ;;
14550 (.2)
14551 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
14552 cf_want_posix_source=yes
14553 ;;
14554 (.*)
14555 cf_want_posix_source=yes
14556 ;;
14557 esac
14558 if test "$cf_want_posix_source" = yes ; then
14559 cat >"conftest.$ac_ext" <<_ACEOF
14560 #line 14560 "configure"
14561 #include "confdefs.h"
14562 #include <sys/types.h>
14563 int
14564 main (void)
14565 {
14566
14567 #ifdef _POSIX_SOURCE
14568 #error _POSIX_SOURCE is defined
14569 #endif
14570 ;
14571 return 0;
14572 }
14573 _ACEOF
14574 rm -f "conftest.$ac_objext"
14575 if { (eval echo "$as_me:14575: \"$ac_compile\"") >&5
14576 (eval $ac_compile) 2>&5
14577 ac_status=$?
14578 echo "$as_me:14578: \$? = $ac_status" >&5
14579 (exit "$ac_status"); } &&
14580 { ac_try='test -s "conftest.$ac_objext"'
14581 { (eval echo "$as_me:14581: \"$ac_try\"") >&5
14582 (eval $ac_try) 2>&5
14583 ac_status=$?
14584 echo "$as_me:14584: \$? = $ac_status" >&5
14585 (exit "$ac_status"); }; }; then
14586 :
14587 else
14588 echo "$as_me: failed program was:" >&5
14589 cat "conftest.$ac_ext" >&5
14590 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
14591 fi
14592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14593 fi
14594
14595 echo "${as_me:-configure}:14595: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
14596
14597 CFLAGS="$cf_trim_CFLAGS"
14598 CPPFLAGS="$cf_trim_CPPFLAGS"
14599
14600 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14601 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
14602
14603 echo "${as_me:-configure}:14603: testing if the second compile does not leave our definition intact error ..." 1>&5
14604
14605 cat >"conftest.$ac_ext" <<_ACEOF
14606 #line 14606 "configure"
14607 #include "confdefs.h"
14608 #include <sys/types.h>
14609 int
14610 main (void)
14611 {
14612
14613 #ifndef _POSIX_C_SOURCE
14614 #error _POSIX_C_SOURCE is not defined
14615 #endif
14616 ;
14617 return 0;
14618 }
14619 _ACEOF
14620 rm -f "conftest.$ac_objext"
14621 if { (eval echo "$as_me:14621: \"$ac_compile\"") >&5
14622 (eval $ac_compile) 2>&5
14623 ac_status=$?
14624 echo "$as_me:14624: \$? = $ac_status" >&5
14625 (exit "$ac_status"); } &&
14626 { ac_try='test -s "conftest.$ac_objext"'
14627 { (eval echo "$as_me:14627: \"$ac_try\"") >&5
14628 (eval $ac_try) 2>&5
14629 ac_status=$?
14630 echo "$as_me:14630: \$? = $ac_status" >&5
14631 (exit "$ac_status"); }; }; then
14632 :
14633 else
14634 echo "$as_me: failed program was:" >&5
14635 cat "conftest.$ac_ext" >&5
14636 cf_cv_posix_c_source=no
14637 fi
14638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14639 CFLAGS="$cf_save_CFLAGS"
14640 CPPFLAGS="$cf_save_CPPFLAGS"
14641
14642 fi
14643 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14644
14645 fi
14646 echo "$as_me:14646: result: $cf_cv_posix_c_source" >&5
14647 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
14648
14649 if test "$cf_cv_posix_c_source" != no ; then
14650 CFLAGS="$cf_trim_CFLAGS"
14651 CPPFLAGS="$cf_trim_CPPFLAGS"
14652
14653 cf_fix_cppflags=no
14654 cf_new_cflags=
14655 cf_new_cppflags=
14656 cf_new_extra_cppflags=
14657
14658 for cf_add_cflags in $cf_cv_posix_c_source
14659 do
14660 case "$cf_fix_cppflags" in
14661 (no)
14662 case "$cf_add_cflags" in
14663 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14664 case "$cf_add_cflags" in
14665 (-D*)
14666 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14667
14668 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14669 && test -z "${cf_tst_cflags}" \
14670 && cf_fix_cppflags=yes
14671
14672 if test "$cf_fix_cppflags" = yes ; then
14673
14674 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14675 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14676
14677 continue
14678 elif test "${cf_tst_cflags}" = "\"'" ; then
14679
14680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14682
14683 continue
14684 fi
14685 ;;
14686 esac
14687 case "$CPPFLAGS" in
14688 (*$cf_add_cflags)
14689 ;;
14690 (*)
14691 case "$cf_add_cflags" in
14692 (-D*)
14693 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14694
14695 CPPFLAGS=`echo "$CPPFLAGS" | \
14696 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14697 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14698
14699 ;;
14700 esac
14701
14702 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14703 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14704
14705 ;;
14706 esac
14707 ;;
14708 (*)
14709
14710 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14711 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14712
14713 ;;
14714 esac
14715 ;;
14716 (yes)
14717
14718 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14719 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14720
14721 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14722
14723 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14724 && test -z "${cf_tst_cflags}" \
14725 && cf_fix_cppflags=no
14726 ;;
14727 esac
14728 done
14729
14730 if test -n "$cf_new_cflags" ; then
14731
14732 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14733 CFLAGS="${CFLAGS}$cf_new_cflags"
14734
14735 fi
14736
14737 if test -n "$cf_new_cppflags" ; then
14738
14739 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14740 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14741
14742 fi
14743
14744 if test -n "$cf_new_extra_cppflags" ; then
14745
14746 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14747 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14748
14749 fi
14750
14751 fi
14752
14753 fi # cf_cv_posix_visible
14754
14755 ;;
14756 (netbsd*)
14757 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
14758 ;;
14759 (openbsd[6-9]*)
14760 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
14761 # see https://www.mail-archive.com/[email protected]/msg13200.html
14762 # Abusing the conformance level is a workaround.
14763 { echo "$as_me:14763: WARNING: this system does not provide usable locale support" >&5
14764 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
14765 cf_xopen_source="-D_BSD_SOURCE"
14766 cf_XOPEN_SOURCE=700
14767 ;;
14768 (openbsd[4-5]*)
14769 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
14770 cf_xopen_source="-D_BSD_SOURCE"
14771 cf_XOPEN_SOURCE=600
14772 ;;
14773 (openbsd*)
14774 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
14775 ;;
14776 (osf[45]*)
14777 cf_xopen_source="-D_OSF_SOURCE"
14778 ;;
14779 (nto-qnx*)
14780 cf_xopen_source="-D_QNX_SOURCE"
14781 ;;
14782 (sco*)
14783 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
14784 ;;
14785 (solaris2.*)
14786 cf_xopen_source="-D__EXTENSIONS__"
14787 cf_cv_xopen_source=broken
14788 ;;
14789 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
14790 cf_XOPEN_SOURCE=
14791 cf_POSIX_C_SOURCE=
14792 ;;
14793 (*)
14794
14795 echo "$as_me:14795: checking if we should define _XOPEN_SOURCE" >&5
14796 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14797 if test "${cf_cv_xopen_source+set}" = set; then
14798 echo $ECHO_N "(cached) $ECHO_C" >&6
14799 else
14800
14801 cat >"conftest.$ac_ext" <<_ACEOF
14802 #line 14802 "configure"
14803 #include "confdefs.h"
14804
14805 $ac_includes_default
14806
14807 int
14808 main (void)
14809 {
14810
14811 #ifndef _XOPEN_SOURCE
14812 #error _XOPEN_SOURCE is not defined
14813 #endif
14814
14815 ;
14816 return 0;
14817 }
14818 _ACEOF
14819 rm -f "conftest.$ac_objext"
14820 if { (eval echo "$as_me:14820: \"$ac_compile\"") >&5
14821 (eval $ac_compile) 2>&5
14822 ac_status=$?
14823 echo "$as_me:14823: \$? = $ac_status" >&5
14824 (exit "$ac_status"); } &&
14825 { ac_try='test -s "conftest.$ac_objext"'
14826 { (eval echo "$as_me:14826: \"$ac_try\"") >&5
14827 (eval $ac_try) 2>&5
14828 ac_status=$?
14829 echo "$as_me:14829: \$? = $ac_status" >&5
14830 (exit "$ac_status"); }; }; then
14831 cf_cv_xopen_source=no
14832 else
14833 echo "$as_me: failed program was:" >&5
14834 cat "conftest.$ac_ext" >&5
14835 cf_save="$CPPFLAGS"
14836
14837 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14838 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14839
14840 cat >"conftest.$ac_ext" <<_ACEOF
14841 #line 14841 "configure"
14842 #include "confdefs.h"
14843
14844 $ac_includes_default
14845
14846 int
14847 main (void)
14848 {
14849
14850 #ifndef _XOPEN_SOURCE
14851 #error _XOPEN_SOURCE is not defined
14852 #endif
14853
14854 ;
14855 return 0;
14856 }
14857 _ACEOF
14858 rm -f "conftest.$ac_objext"
14859 if { (eval echo "$as_me:14859: \"$ac_compile\"") >&5
14860 (eval $ac_compile) 2>&5
14861 ac_status=$?
14862 echo "$as_me:14862: \$? = $ac_status" >&5
14863 (exit "$ac_status"); } &&
14864 { ac_try='test -s "conftest.$ac_objext"'
14865 { (eval echo "$as_me:14865: \"$ac_try\"") >&5
14866 (eval $ac_try) 2>&5
14867 ac_status=$?
14868 echo "$as_me:14868: \$? = $ac_status" >&5
14869 (exit "$ac_status"); }; }; then
14870 cf_cv_xopen_source=no
14871 else
14872 echo "$as_me: failed program was:" >&5
14873 cat "conftest.$ac_ext" >&5
14874 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14875 fi
14876 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14877 CPPFLAGS="$cf_save"
14878
14879 fi
14880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14881
14882 fi
14883 echo "$as_me:14883: result: $cf_cv_xopen_source" >&5
14884 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14885
14886 if test "$cf_cv_xopen_source" != no ; then
14887
14888 CFLAGS=`echo "$CFLAGS" | \
14889 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14890 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14891
14892 CPPFLAGS=`echo "$CPPFLAGS" | \
14893 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14894 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14895
14896 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14897
14898 for cf_add_cflags in $cf_temp_xopen_source
14899 do
14900 case "x$cf_add_cflags" in
14901 (x-[DU]*)
14902
14903 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14904 while true
14905 do
14906 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'`
14907 test "$CFLAGS" != "$cf_old_cflag" || break
14908
14909 CFLAGS="$cf_old_cflag"
14910 done
14911
14912 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14913 while true
14914 do
14915 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'`
14916 test "$CPPFLAGS" != "$cf_old_cflag" || break
14917
14918 CPPFLAGS="$cf_old_cflag"
14919 done
14920
14921 ;;
14922 esac
14923
14924 cf_fix_cppflags=no
14925 cf_new_cflags=
14926 cf_new_cppflags=
14927 cf_new_extra_cppflags=
14928
14929 for cf_add_cflags in $cf_add_cflags
14930 do
14931 case "$cf_fix_cppflags" in
14932 (no)
14933 case "$cf_add_cflags" in
14934 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14935 case "$cf_add_cflags" in
14936 (-D*)
14937 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14938
14939 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14940 && test -z "${cf_tst_cflags}" \
14941 && cf_fix_cppflags=yes
14942
14943 if test "$cf_fix_cppflags" = yes ; then
14944
14945 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14946 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14947
14948 continue
14949 elif test "${cf_tst_cflags}" = "\"'" ; then
14950
14951 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14952 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14953
14954 continue
14955 fi
14956 ;;
14957 esac
14958 case "$CPPFLAGS" in
14959 (*$cf_add_cflags)
14960 ;;
14961 (*)
14962 case "$cf_add_cflags" in
14963 (-D*)
14964 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14965
14966 CPPFLAGS=`echo "$CPPFLAGS" | \
14967 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14968 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14969
14970 ;;
14971 esac
14972
14973 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14974 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14975
14976 ;;
14977 esac
14978 ;;
14979 (*)
14980
14981 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14982 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14983
14984 ;;
14985 esac
14986 ;;
14987 (yes)
14988
14989 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14990 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14991
14992 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14993
14994 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14995 && test -z "${cf_tst_cflags}" \
14996 && cf_fix_cppflags=no
14997 ;;
14998 esac
14999 done
15000
15001 if test -n "$cf_new_cflags" ; then
15002
15003 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15004 CFLAGS="${CFLAGS}$cf_new_cflags"
15005
15006 fi
15007
15008 if test -n "$cf_new_cppflags" ; then
15009
15010 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15011 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15012
15013 fi
15014
15015 if test -n "$cf_new_extra_cppflags" ; then
15016
15017 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15018 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15019
15020 fi
15021
15022 done
15023
15024 fi
15025
15026 cf_save_xopen_cppflags="$CPPFLAGS"
15027
15028 if test "$cf_cv_posix_visible" = no; then
15029
15030 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
15031
15032 cf_save_CFLAGS="$CFLAGS"
15033 cf_save_CPPFLAGS="$CPPFLAGS"
15034
15035 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
15036 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
15037 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
15038
15039 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
15040 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
15041 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
15042
15043 echo "$as_me:15043: checking if we should define _POSIX_C_SOURCE" >&5
15044 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
15045 if test "${cf_cv_posix_c_source+set}" = set; then
15046 echo $ECHO_N "(cached) $ECHO_C" >&6
15047 else
15048
15049 echo "${as_me:-configure}:15049: testing if the symbol is already defined go no further ..." 1>&5
15050
15051 cat >"conftest.$ac_ext" <<_ACEOF
15052 #line 15052 "configure"
15053 #include "confdefs.h"
15054 #include <sys/types.h>
15055 int
15056 main (void)
15057 {
15058
15059 #ifndef _POSIX_C_SOURCE
15060 #error _POSIX_C_SOURCE is not defined
15061 #endif
15062 ;
15063 return 0;
15064 }
15065 _ACEOF
15066 rm -f "conftest.$ac_objext"
15067 if { (eval echo "$as_me:15067: \"$ac_compile\"") >&5
15068 (eval $ac_compile) 2>&5
15069 ac_status=$?
15070 echo "$as_me:15070: \$? = $ac_status" >&5
15071 (exit "$ac_status"); } &&
15072 { ac_try='test -s "conftest.$ac_objext"'
15073 { (eval echo "$as_me:15073: \"$ac_try\"") >&5
15074 (eval $ac_try) 2>&5
15075 ac_status=$?
15076 echo "$as_me:15076: \$? = $ac_status" >&5
15077 (exit "$ac_status"); }; }; then
15078 cf_cv_posix_c_source=no
15079 else
15080 echo "$as_me: failed program was:" >&5
15081 cat "conftest.$ac_ext" >&5
15082 cf_want_posix_source=no
15083 case .$cf_POSIX_C_SOURCE in
15084 (.[12]??*)
15085 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
15086 ;;
15087 (.2)
15088 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
15089 cf_want_posix_source=yes
15090 ;;
15091 (.*)
15092 cf_want_posix_source=yes
15093 ;;
15094 esac
15095 if test "$cf_want_posix_source" = yes ; then
15096 cat >"conftest.$ac_ext" <<_ACEOF
15097 #line 15097 "configure"
15098 #include "confdefs.h"
15099 #include <sys/types.h>
15100 int
15101 main (void)
15102 {
15103
15104 #ifdef _POSIX_SOURCE
15105 #error _POSIX_SOURCE is defined
15106 #endif
15107 ;
15108 return 0;
15109 }
15110 _ACEOF
15111 rm -f "conftest.$ac_objext"
15112 if { (eval echo "$as_me:15112: \"$ac_compile\"") >&5
15113 (eval $ac_compile) 2>&5
15114 ac_status=$?
15115 echo "$as_me:15115: \$? = $ac_status" >&5
15116 (exit "$ac_status"); } &&
15117 { ac_try='test -s "conftest.$ac_objext"'
15118 { (eval echo "$as_me:15118: \"$ac_try\"") >&5
15119 (eval $ac_try) 2>&5
15120 ac_status=$?
15121 echo "$as_me:15121: \$? = $ac_status" >&5
15122 (exit "$ac_status"); }; }; then
15123 :
15124 else
15125 echo "$as_me: failed program was:" >&5
15126 cat "conftest.$ac_ext" >&5
15127 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
15128 fi
15129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15130 fi
15131
15132 echo "${as_me:-configure}:15132: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
15133
15134 CFLAGS="$cf_trim_CFLAGS"
15135 CPPFLAGS="$cf_trim_CPPFLAGS"
15136
15137 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15138 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
15139
15140 echo "${as_me:-configure}:15140: testing if the second compile does not leave our definition intact error ..." 1>&5
15141
15142 cat >"conftest.$ac_ext" <<_ACEOF
15143 #line 15143 "configure"
15144 #include "confdefs.h"
15145 #include <sys/types.h>
15146 int
15147 main (void)
15148 {
15149
15150 #ifndef _POSIX_C_SOURCE
15151 #error _POSIX_C_SOURCE is not defined
15152 #endif
15153 ;
15154 return 0;
15155 }
15156 _ACEOF
15157 rm -f "conftest.$ac_objext"
15158 if { (eval echo "$as_me:15158: \"$ac_compile\"") >&5
15159 (eval $ac_compile) 2>&5
15160 ac_status=$?
15161 echo "$as_me:15161: \$? = $ac_status" >&5
15162 (exit "$ac_status"); } &&
15163 { ac_try='test -s "conftest.$ac_objext"'
15164 { (eval echo "$as_me:15164: \"$ac_try\"") >&5
15165 (eval $ac_try) 2>&5
15166 ac_status=$?
15167 echo "$as_me:15167: \$? = $ac_status" >&5
15168 (exit "$ac_status"); }; }; then
15169 :
15170 else
15171 echo "$as_me: failed program was:" >&5
15172 cat "conftest.$ac_ext" >&5
15173 cf_cv_posix_c_source=no
15174 fi
15175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15176 CFLAGS="$cf_save_CFLAGS"
15177 CPPFLAGS="$cf_save_CPPFLAGS"
15178
15179 fi
15180 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15181
15182 fi
15183 echo "$as_me:15183: result: $cf_cv_posix_c_source" >&5
15184 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
15185
15186 if test "$cf_cv_posix_c_source" != no ; then
15187 CFLAGS="$cf_trim_CFLAGS"
15188 CPPFLAGS="$cf_trim_CPPFLAGS"
15189
15190 cf_fix_cppflags=no
15191 cf_new_cflags=
15192 cf_new_cppflags=
15193 cf_new_extra_cppflags=
15194
15195 for cf_add_cflags in $cf_cv_posix_c_source
15196 do
15197 case "$cf_fix_cppflags" in
15198 (no)
15199 case "$cf_add_cflags" in
15200 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15201 case "$cf_add_cflags" in
15202 (-D*)
15203 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15204
15205 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15206 && test -z "${cf_tst_cflags}" \
15207 && cf_fix_cppflags=yes
15208
15209 if test "$cf_fix_cppflags" = yes ; then
15210
15211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15213
15214 continue
15215 elif test "${cf_tst_cflags}" = "\"'" ; then
15216
15217 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15218 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15219
15220 continue
15221 fi
15222 ;;
15223 esac
15224 case "$CPPFLAGS" in
15225 (*$cf_add_cflags)
15226 ;;
15227 (*)
15228 case "$cf_add_cflags" in
15229 (-D*)
15230 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15231
15232 CPPFLAGS=`echo "$CPPFLAGS" | \
15233 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15234 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15235
15236 ;;
15237 esac
15238
15239 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15240 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15241
15242 ;;
15243 esac
15244 ;;
15245 (*)
15246
15247 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15248 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15249
15250 ;;
15251 esac
15252 ;;
15253 (yes)
15254
15255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15257
15258 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15259
15260 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15261 && test -z "${cf_tst_cflags}" \
15262 && cf_fix_cppflags=no
15263 ;;
15264 esac
15265 done
15266
15267 if test -n "$cf_new_cflags" ; then
15268
15269 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15270 CFLAGS="${CFLAGS}$cf_new_cflags"
15271
15272 fi
15273
15274 if test -n "$cf_new_cppflags" ; then
15275
15276 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15277 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15278
15279 fi
15280
15281 if test -n "$cf_new_extra_cppflags" ; then
15282
15283 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15284 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15285
15286 fi
15287
15288 fi
15289
15290 fi # cf_cv_posix_visible
15291
15292 # Some of these niche implementations use copy/paste, double-check...
15293 if test "$cf_cv_xopen_source" = no ; then
15294 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
15295
15296 echo "${as_me:-configure}:15296: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
15297
15298 cat >"conftest.$ac_ext" <<_ACEOF
15299 #line 15299 "configure"
15300 #include "confdefs.h"
15301
15302 $ac_includes_default
15303
15304 int
15305 main (void)
15306 {
15307
15308 #ifndef _XOPEN_SOURCE
15309 #error _XOPEN_SOURCE is not defined
15310 #endif
15311
15312 ;
15313 return 0;
15314 }
15315 _ACEOF
15316 rm -f "conftest.$ac_objext"
15317 if { (eval echo "$as_me:15317: \"$ac_compile\"") >&5
15318 (eval $ac_compile) 2>&5
15319 ac_status=$?
15320 echo "$as_me:15320: \$? = $ac_status" >&5
15321 (exit "$ac_status"); } &&
15322 { ac_try='test -s "conftest.$ac_objext"'
15323 { (eval echo "$as_me:15323: \"$ac_try\"") >&5
15324 (eval $ac_try) 2>&5
15325 ac_status=$?
15326 echo "$as_me:15326: \$? = $ac_status" >&5
15327 (exit "$ac_status"); }; }; then
15328 :
15329 else
15330 echo "$as_me: failed program was:" >&5
15331 cat "conftest.$ac_ext" >&5
15332
15333 { echo "$as_me:15333: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
15334 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
15335 CPPFLAGS="$cf_save_xopen_cppflags"
15336 fi
15337 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15338 fi
15339 ;;
15340 esac
15341
15342 if test -n "$cf_xopen_source" ; then
15343
15344 for cf_add_cflags in $cf_xopen_source
15345 do
15346 case "x$cf_add_cflags" in
15347 (x-[DU]*)
15348
15349 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
15350 while true
15351 do
15352 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'`
15353 test "$CFLAGS" != "$cf_old_cflag" || break
15354 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
15355
15356 echo "${as_me:-configure}:15356: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
15357
15358 CFLAGS="$cf_old_cflag"
15359 done
15360
15361 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
15362 while true
15363 do
15364 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'`
15365 test "$CPPFLAGS" != "$cf_old_cflag" || break
15366 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
15367
15368 echo "${as_me:-configure}:15368: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
15369
15370 CPPFLAGS="$cf_old_cflag"
15371 done
15372
15373 ;;
15374 esac
15375
15376 cf_fix_cppflags=no
15377 cf_new_cflags=
15378 cf_new_cppflags=
15379 cf_new_extra_cppflags=
15380
15381 for cf_add_cflags in $cf_add_cflags
15382 do
15383 case "$cf_fix_cppflags" in
15384 (no)
15385 case "$cf_add_cflags" in
15386 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15387 case "$cf_add_cflags" in
15388 (-D*)
15389 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15390
15391 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15392 && test -z "${cf_tst_cflags}" \
15393 && cf_fix_cppflags=yes
15394
15395 if test "$cf_fix_cppflags" = yes ; then
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 continue
15401 elif test "${cf_tst_cflags}" = "\"'" ; then
15402
15403 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15404 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15405
15406 continue
15407 fi
15408 ;;
15409 esac
15410 case "$CPPFLAGS" in
15411 (*$cf_add_cflags)
15412 ;;
15413 (*)
15414 case "$cf_add_cflags" in
15415 (-D*)
15416 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15417
15418 CPPFLAGS=`echo "$CPPFLAGS" | \
15419 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15420 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15421
15422 ;;
15423 esac
15424
15425 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15426 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15427
15428 ;;
15429 esac
15430 ;;
15431 (*)
15432
15433 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15434 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15435
15436 ;;
15437 esac
15438 ;;
15439 (yes)
15440
15441 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15442 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15443
15444 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15445
15446 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15447 && test -z "${cf_tst_cflags}" \
15448 && cf_fix_cppflags=no
15449 ;;
15450 esac
15451 done
15452
15453 if test -n "$cf_new_cflags" ; then
15454 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15455
15456 echo "${as_me:-configure}:15456: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15457
15458 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15459 CFLAGS="${CFLAGS}$cf_new_cflags"
15460
15461 fi
15462
15463 if test -n "$cf_new_cppflags" ; then
15464 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15465
15466 echo "${as_me:-configure}:15466: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15467
15468 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15469 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15470
15471 fi
15472
15473 if test -n "$cf_new_extra_cppflags" ; then
15474 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15475
15476 echo "${as_me:-configure}:15476: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15477
15478 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15479 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15480
15481 fi
15482
15483 done
15484
15485 fi
15486
15487 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
15488 echo "$as_me:15488: checking if _XOPEN_SOURCE really is set" >&5
15489 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
15490 cat >"conftest.$ac_ext" <<_ACEOF
15491 #line 15491 "configure"
15492 #include "confdefs.h"
15493 #include <stdlib.h>
15494 int
15495 main (void)
15496 {
15497
15498 #ifndef _XOPEN_SOURCE
15499 #error _XOPEN_SOURCE is not defined
15500 #endif
15501 ;
15502 return 0;
15503 }
15504 _ACEOF
15505 rm -f "conftest.$ac_objext"
15506 if { (eval echo "$as_me:15506: \"$ac_compile\"") >&5
15507 (eval $ac_compile) 2>&5
15508 ac_status=$?
15509 echo "$as_me:15509: \$? = $ac_status" >&5
15510 (exit "$ac_status"); } &&
15511 { ac_try='test -s "conftest.$ac_objext"'
15512 { (eval echo "$as_me:15512: \"$ac_try\"") >&5
15513 (eval $ac_try) 2>&5
15514 ac_status=$?
15515 echo "$as_me:15515: \$? = $ac_status" >&5
15516 (exit "$ac_status"); }; }; then
15517 cf_XOPEN_SOURCE_set=yes
15518 else
15519 echo "$as_me: failed program was:" >&5
15520 cat "conftest.$ac_ext" >&5
15521 cf_XOPEN_SOURCE_set=no
15522 fi
15523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15524 echo "$as_me:15524: result: $cf_XOPEN_SOURCE_set" >&5
15525 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
15526 if test "$cf_XOPEN_SOURCE_set" = yes
15527 then
15528 cat >"conftest.$ac_ext" <<_ACEOF
15529 #line 15529 "configure"
15530 #include "confdefs.h"
15531 #include <stdlib.h>
15532 int
15533 main (void)
15534 {
15535
15536 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
15537 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
15538 #endif
15539 ;
15540 return 0;
15541 }
15542 _ACEOF
15543 rm -f "conftest.$ac_objext"
15544 if { (eval echo "$as_me:15544: \"$ac_compile\"") >&5
15545 (eval $ac_compile) 2>&5
15546 ac_status=$?
15547 echo "$as_me:15547: \$? = $ac_status" >&5
15548 (exit "$ac_status"); } &&
15549 { ac_try='test -s "conftest.$ac_objext"'
15550 { (eval echo "$as_me:15550: \"$ac_try\"") >&5
15551 (eval $ac_try) 2>&5
15552 ac_status=$?
15553 echo "$as_me:15553: \$? = $ac_status" >&5
15554 (exit "$ac_status"); }; }; then
15555 cf_XOPEN_SOURCE_set_ok=yes
15556 else
15557 echo "$as_me: failed program was:" >&5
15558 cat "conftest.$ac_ext" >&5
15559 cf_XOPEN_SOURCE_set_ok=no
15560 fi
15561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15562 if test "$cf_XOPEN_SOURCE_set_ok" = no
15563 then
15564 { echo "$as_me:15564: WARNING: _XOPEN_SOURCE is lower than requested" >&5
15565 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
15566 fi
15567 else
15568
15569 echo "$as_me:15569: checking if we should define _XOPEN_SOURCE" >&5
15570 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
15571 if test "${cf_cv_xopen_source+set}" = set; then
15572 echo $ECHO_N "(cached) $ECHO_C" >&6
15573 else
15574
15575 cat >"conftest.$ac_ext" <<_ACEOF
15576 #line 15576 "configure"
15577 #include "confdefs.h"
15578
15579 $ac_includes_default
15580
15581 int
15582 main (void)
15583 {
15584
15585 #ifndef _XOPEN_SOURCE
15586 #error _XOPEN_SOURCE is not defined
15587 #endif
15588
15589 ;
15590 return 0;
15591 }
15592 _ACEOF
15593 rm -f "conftest.$ac_objext"
15594 if { (eval echo "$as_me:15594: \"$ac_compile\"") >&5
15595 (eval $ac_compile) 2>&5
15596 ac_status=$?
15597 echo "$as_me:15597: \$? = $ac_status" >&5
15598 (exit "$ac_status"); } &&
15599 { ac_try='test -s "conftest.$ac_objext"'
15600 { (eval echo "$as_me:15600: \"$ac_try\"") >&5
15601 (eval $ac_try) 2>&5
15602 ac_status=$?
15603 echo "$as_me:15603: \$? = $ac_status" >&5
15604 (exit "$ac_status"); }; }; then
15605 cf_cv_xopen_source=no
15606 else
15607 echo "$as_me: failed program was:" >&5
15608 cat "conftest.$ac_ext" >&5
15609 cf_save="$CPPFLAGS"
15610
15611 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15612 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
15613
15614 cat >"conftest.$ac_ext" <<_ACEOF
15615 #line 15615 "configure"
15616 #include "confdefs.h"
15617
15618 $ac_includes_default
15619
15620 int
15621 main (void)
15622 {
15623
15624 #ifndef _XOPEN_SOURCE
15625 #error _XOPEN_SOURCE is not defined
15626 #endif
15627
15628 ;
15629 return 0;
15630 }
15631 _ACEOF
15632 rm -f "conftest.$ac_objext"
15633 if { (eval echo "$as_me:15633: \"$ac_compile\"") >&5
15634 (eval $ac_compile) 2>&5
15635 ac_status=$?
15636 echo "$as_me:15636: \$? = $ac_status" >&5
15637 (exit "$ac_status"); } &&
15638 { ac_try='test -s "conftest.$ac_objext"'
15639 { (eval echo "$as_me:15639: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15641 ac_status=$?
15642 echo "$as_me:15642: \$? = $ac_status" >&5
15643 (exit "$ac_status"); }; }; then
15644 cf_cv_xopen_source=no
15645 else
15646 echo "$as_me: failed program was:" >&5
15647 cat "conftest.$ac_ext" >&5
15648 cf_cv_xopen_source=$cf_XOPEN_SOURCE
15649 fi
15650 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15651 CPPFLAGS="$cf_save"
15652
15653 fi
15654 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15655
15656 fi
15657 echo "$as_me:15657: result: $cf_cv_xopen_source" >&5
15658 echo "${ECHO_T}$cf_cv_xopen_source" >&6
15659
15660 if test "$cf_cv_xopen_source" != no ; then
15661
15662 CFLAGS=`echo "$CFLAGS" | \
15663 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
15664 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
15665
15666 CPPFLAGS=`echo "$CPPFLAGS" | \
15667 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
15668 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
15669
15670 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
15671
15672 for cf_add_cflags in $cf_temp_xopen_source
15673 do
15674 case "x$cf_add_cflags" in
15675 (x-[DU]*)
15676
15677 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
15678 while true
15679 do
15680 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'`
15681 test "$CFLAGS" != "$cf_old_cflag" || break
15682
15683 CFLAGS="$cf_old_cflag"
15684 done
15685
15686 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
15687 while true
15688 do
15689 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'`
15690 test "$CPPFLAGS" != "$cf_old_cflag" || break
15691
15692 CPPFLAGS="$cf_old_cflag"
15693 done
15694
15695 ;;
15696 esac
15697
15698 cf_fix_cppflags=no
15699 cf_new_cflags=
15700 cf_new_cppflags=
15701 cf_new_extra_cppflags=
15702
15703 for cf_add_cflags in $cf_add_cflags
15704 do
15705 case "$cf_fix_cppflags" in
15706 (no)
15707 case "$cf_add_cflags" in
15708 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15709 case "$cf_add_cflags" in
15710 (-D*)
15711 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15712
15713 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15714 && test -z "${cf_tst_cflags}" \
15715 && cf_fix_cppflags=yes
15716
15717 if test "$cf_fix_cppflags" = yes ; then
15718
15719 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15720 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15721
15722 continue
15723 elif test "${cf_tst_cflags}" = "\"'" ; then
15724
15725 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15726 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15727
15728 continue
15729 fi
15730 ;;
15731 esac
15732 case "$CPPFLAGS" in
15733 (*$cf_add_cflags)
15734 ;;
15735 (*)
15736 case "$cf_add_cflags" in
15737 (-D*)
15738 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15739
15740 CPPFLAGS=`echo "$CPPFLAGS" | \
15741 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15742 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15743
15744 ;;
15745 esac
15746
15747 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15748 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15749
15750 ;;
15751 esac
15752 ;;
15753 (*)
15754
15755 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15756 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15757
15758 ;;
15759 esac
15760 ;;
15761 (yes)
15762
15763 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15764 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15765
15766 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15767
15768 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15769 && test -z "${cf_tst_cflags}" \
15770 && cf_fix_cppflags=no
15771 ;;
15772 esac
15773 done
15774
15775 if test -n "$cf_new_cflags" ; then
15776
15777 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15778 CFLAGS="${CFLAGS}$cf_new_cflags"
15779
15780 fi
15781
15782 if test -n "$cf_new_cppflags" ; then
15783
15784 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15785 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15786
15787 fi
15788
15789 if test -n "$cf_new_extra_cppflags" ; then
15790
15791 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15792 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15793
15794 fi
15795
15796 done
15797
15798 fi
15799
15800 fi
15801 fi
15802 fi # cf_cv_posix_visible
15803
15804 echo "$as_me:15804: checking for ANSI C header files" >&5
15805 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15806 if test "${ac_cv_header_stdc+set}" = set; then
15807 echo $ECHO_N "(cached) $ECHO_C" >&6
15808 else
15809 cat >"conftest.$ac_ext" <<_ACEOF
15810 #line 15810 "configure"
15811 #include "confdefs.h"
15812 #include <stdlib.h>
15813 #include <stdarg.h>
15814 #include <string.h>
15815 #include <float.h>
15816
15817 _ACEOF
15818 if { (eval echo "$as_me:15818: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15819 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15820 ac_status=$?
15821 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15822 rm -f conftest.er1
15823 cat conftest.err >&5
15824 echo "$as_me:15824: \$? = $ac_status" >&5
15825 (exit "$ac_status"); } >/dev/null; then
15826 if test -s conftest.err; then
15827 ac_cpp_err=$ac_c_preproc_warn_flag
15828 else
15829 ac_cpp_err=
15830 fi
15831 else
15832 ac_cpp_err=yes
15833 fi
15834 if test -z "$ac_cpp_err"; then
15835 ac_cv_header_stdc=yes
15836 else
15837 echo "$as_me: failed program was:" >&5
15838 cat "conftest.$ac_ext" >&5
15839 ac_cv_header_stdc=no
15840 fi
15841 rm -f conftest.err "conftest.$ac_ext"
15842
15843 if test $ac_cv_header_stdc = yes; then
15844 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15845 cat >"conftest.$ac_ext" <<_ACEOF
15846 #line 15846 "configure"
15847 #include "confdefs.h"
15848 #include <string.h>
15849
15850 _ACEOF
15851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15852 $EGREP "memchr" >/dev/null 2>&1; then
15853 :
15854 else
15855 ac_cv_header_stdc=no
15856 fi
15857 rm -rf conftest*
15858
15859 fi
15860
15861 if test $ac_cv_header_stdc = yes; then
15862 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15863 cat >"conftest.$ac_ext" <<_ACEOF
15864 #line 15864 "configure"
15865 #include "confdefs.h"
15866 #include <stdlib.h>
15867
15868 _ACEOF
15869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15870 $EGREP "free" >/dev/null 2>&1; then
15871 :
15872 else
15873 ac_cv_header_stdc=no
15874 fi
15875 rm -rf conftest*
15876
15877 fi
15878
15879 if test $ac_cv_header_stdc = yes; then
15880 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15881 if test "$cross_compiling" = yes; then
15882 :
15883 else
15884 cat >"conftest.$ac_ext" <<_ACEOF
15885 #line 15885 "configure"
15886 #include "confdefs.h"
15887 #include <ctype.h>
15888 #if ((' ' & 0x0FF) == 0x020)
15889 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15890 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15891 #else
15892 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15893 || ('j' <= (c) && (c) <= 'r') \
15894 || ('s' <= (c) && (c) <= 'z'))
15895 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15896 #endif
15897
15898 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15899 int
15900 main (void)
15901 {
15902 int i;
15903 for (i = 0; i < 256; i++)
15904 if (XOR (islower (i), ISLOWER (i))
15905 || toupper (i) != TOUPPER (i))
15906 $ac_main_return(2);
15907 $ac_main_return (0);
15908 }
15909 _ACEOF
15910 rm -f "conftest$ac_exeext"
15911 if { (eval echo "$as_me:15911: \"$ac_link\"") >&5
15912 (eval $ac_link) 2>&5
15913 ac_status=$?
15914 echo "$as_me:15914: \$? = $ac_status" >&5
15915 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15916 { (eval echo "$as_me:15916: \"$ac_try\"") >&5
15917 (eval $ac_try) 2>&5
15918 ac_status=$?
15919 echo "$as_me:15919: \$? = $ac_status" >&5
15920 (exit "$ac_status"); }; }; then
15921 :
15922 else
15923 echo "$as_me: program exited with status $ac_status" >&5
15924 echo "$as_me: failed program was:" >&5
15925 cat "conftest.$ac_ext" >&5
15926 ac_cv_header_stdc=no
15927 fi
15928 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15929 fi
15930 fi
15931 fi
15932 echo "$as_me:15932: result: $ac_cv_header_stdc" >&5
15933 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15934 if test $ac_cv_header_stdc = yes; then
15935
15936 cat >>confdefs.h <<\EOF
15937 #define STDC_HEADERS 1
15938 EOF
15939
15940 fi
15941
15942 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15943
15944 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15945 inttypes.h stdint.h unistd.h
15946 do
15947 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15948 echo "$as_me:15948: checking for $ac_header" >&5
15949 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15950 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15951 echo $ECHO_N "(cached) $ECHO_C" >&6
15952 else
15953 cat >"conftest.$ac_ext" <<_ACEOF
15954 #line 15954 "configure"
15955 #include "confdefs.h"
15956 $ac_includes_default
15957 #include <$ac_header>
15958 _ACEOF
15959 rm -f "conftest.$ac_objext"
15960 if { (eval echo "$as_me:15960: \"$ac_compile\"") >&5
15961 (eval $ac_compile) 2>&5
15962 ac_status=$?
15963 echo "$as_me:15963: \$? = $ac_status" >&5
15964 (exit "$ac_status"); } &&
15965 { ac_try='test -s "conftest.$ac_objext"'
15966 { (eval echo "$as_me:15966: \"$ac_try\"") >&5
15967 (eval $ac_try) 2>&5
15968 ac_status=$?
15969 echo "$as_me:15969: \$? = $ac_status" >&5
15970 (exit "$ac_status"); }; }; then
15971 eval "$as_ac_Header=yes"
15972 else
15973 echo "$as_me: failed program was:" >&5
15974 cat "conftest.$ac_ext" >&5
15975 eval "$as_ac_Header=no"
15976 fi
15977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15978 fi
15979 echo "$as_me:15979: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15980 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15981 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15982 cat >>confdefs.h <<EOF
15983 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15984 EOF
15985
15986 fi
15987 done
15988
15989 echo "$as_me:15989: checking whether exit is declared" >&5
15990 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
15991 if test "${ac_cv_have_decl_exit+set}" = set; then
15992 echo $ECHO_N "(cached) $ECHO_C" >&6
15993 else
15994 cat >"conftest.$ac_ext" <<_ACEOF
15995 #line 15995 "configure"
15996 #include "confdefs.h"
15997 $ac_includes_default
15998 int
15999 main (void)
16000 {
16001 #ifndef exit
16002 (void) exit;
16003 #endif
16004
16005 ;
16006 return 0;
16007 }
16008 _ACEOF
16009 rm -f "conftest.$ac_objext"
16010 if { (eval echo "$as_me:16010: \"$ac_compile\"") >&5
16011 (eval $ac_compile) 2>&5
16012 ac_status=$?
16013 echo "$as_me:16013: \$? = $ac_status" >&5
16014 (exit "$ac_status"); } &&
16015 { ac_try='test -s "conftest.$ac_objext"'
16016 { (eval echo "$as_me:16016: \"$ac_try\"") >&5
16017 (eval $ac_try) 2>&5
16018 ac_status=$?
16019 echo "$as_me:16019: \$? = $ac_status" >&5
16020 (exit "$ac_status"); }; }; then
16021 ac_cv_have_decl_exit=yes
16022 else
16023 echo "$as_me: failed program was:" >&5
16024 cat "conftest.$ac_ext" >&5
16025 ac_cv_have_decl_exit=no
16026 fi
16027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16028 fi
16029 echo "$as_me:16029: result: $ac_cv_have_decl_exit" >&5
16030 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
16031
16032 # Check whether --enable-largefile or --disable-largefile was given.
16033 if test "${enable_largefile+set}" = set; then
16034 enableval="$enable_largefile"
16035
16036 fi;
16037 if test "$enable_largefile" != no; then
16038
16039 echo "$as_me:16039: checking for special C compiler options needed for large files" >&5
16040 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
16041 if test "${ac_cv_sys_largefile_CC+set}" = set; then
16042 echo $ECHO_N "(cached) $ECHO_C" >&6
16043 else
16044 ac_cv_sys_largefile_CC=no
16045 if test "$GCC" != yes; then
16046 ac_save_CC=$CC
16047 while :; do
16048 # IRIX 6.2 and later do not support large files by default,
16049 # so use the C compiler's -n32 option if that helps.
16050 cat >"conftest.$ac_ext" <<_ACEOF
16051 #line 16051 "configure"
16052 #include "confdefs.h"
16053 #include <sys/types.h>
16054 /* Check that off_t can represent 2**63 - 1 correctly.
16055 We can't simply define LARGE_OFF_T to be 9223372036854775807,
16056 since some C++ compilers masquerading as C compilers
16057 incorrectly reject 9223372036854775807. */
16058 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16059 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16060 && LARGE_OFF_T % 2147483647 == 1)
16061 ? 1 : -1];
16062 int
16063 main (void)
16064 {
16065
16066 ;
16067 return 0;
16068 }
16069 _ACEOF
16070 rm -f "conftest.$ac_objext"
16071 if { (eval echo "$as_me:16071: \"$ac_compile\"") >&5
16072 (eval $ac_compile) 2>&5
16073 ac_status=$?
16074 echo "$as_me:16074: \$? = $ac_status" >&5
16075 (exit "$ac_status"); } &&
16076 { ac_try='test -s "conftest.$ac_objext"'
16077 { (eval echo "$as_me:16077: \"$ac_try\"") >&5
16078 (eval $ac_try) 2>&5
16079 ac_status=$?
16080 echo "$as_me:16080: \$? = $ac_status" >&5
16081 (exit "$ac_status"); }; }; then
16082 break
16083 else
16084 echo "$as_me: failed program was:" >&5
16085 cat "conftest.$ac_ext" >&5
16086 fi
16087 rm -f "conftest.$ac_objext"
16088 CC="$CC -n32"
16089 rm -f "conftest.$ac_objext"
16090 if { (eval echo "$as_me:16090: \"$ac_compile\"") >&5
16091 (eval $ac_compile) 2>&5
16092 ac_status=$?
16093 echo "$as_me:16093: \$? = $ac_status" >&5
16094 (exit "$ac_status"); } &&
16095 { ac_try='test -s "conftest.$ac_objext"'
16096 { (eval echo "$as_me:16096: \"$ac_try\"") >&5
16097 (eval $ac_try) 2>&5
16098 ac_status=$?
16099 echo "$as_me:16099: \$? = $ac_status" >&5
16100 (exit "$ac_status"); }; }; then
16101 ac_cv_sys_largefile_CC=' -n32'; break
16102 else
16103 echo "$as_me: failed program was:" >&5
16104 cat "conftest.$ac_ext" >&5
16105 fi
16106 rm -f "conftest.$ac_objext"
16107 break
16108 done
16109 CC=$ac_save_CC
16110 rm -f "conftest.$ac_ext"
16111 fi
16112 fi
16113 echo "$as_me:16113: result: $ac_cv_sys_largefile_CC" >&5
16114 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
16115 if test "$ac_cv_sys_largefile_CC" != no; then
16116 CC=$CC$ac_cv_sys_largefile_CC
16117 fi
16118
16119 echo "$as_me:16119: checking for _FILE_OFFSET_BITS value needed for large files" >&5
16120 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
16121 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
16122 echo $ECHO_N "(cached) $ECHO_C" >&6
16123 else
16124 while :; do
16125 ac_cv_sys_file_offset_bits=no
16126 cat >"conftest.$ac_ext" <<_ACEOF
16127 #line 16127 "configure"
16128 #include "confdefs.h"
16129 #include <sys/types.h>
16130 /* Check that off_t can represent 2**63 - 1 correctly.
16131 We can't simply define LARGE_OFF_T to be 9223372036854775807,
16132 since some C++ compilers masquerading as C compilers
16133 incorrectly reject 9223372036854775807. */
16134 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16135 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16136 && LARGE_OFF_T % 2147483647 == 1)
16137 ? 1 : -1];
16138 int
16139 main (void)
16140 {
16141
16142 ;
16143 return 0;
16144 }
16145 _ACEOF
16146 rm -f "conftest.$ac_objext"
16147 if { (eval echo "$as_me:16147: \"$ac_compile\"") >&5
16148 (eval $ac_compile) 2>&5
16149 ac_status=$?
16150 echo "$as_me:16150: \$? = $ac_status" >&5
16151 (exit "$ac_status"); } &&
16152 { ac_try='test -s "conftest.$ac_objext"'
16153 { (eval echo "$as_me:16153: \"$ac_try\"") >&5
16154 (eval $ac_try) 2>&5
16155 ac_status=$?
16156 echo "$as_me:16156: \$? = $ac_status" >&5
16157 (exit "$ac_status"); }; }; then
16158 break
16159 else
16160 echo "$as_me: failed program was:" >&5
16161 cat "conftest.$ac_ext" >&5
16162 fi
16163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16164 cat >"conftest.$ac_ext" <<_ACEOF
16165 #line 16165 "configure"
16166 #include "confdefs.h"
16167 #define _FILE_OFFSET_BITS 64
16168 #include <sys/types.h>
16169 /* Check that off_t can represent 2**63 - 1 correctly.
16170 We can't simply define LARGE_OFF_T to be 9223372036854775807,
16171 since some C++ compilers masquerading as C compilers
16172 incorrectly reject 9223372036854775807. */
16173 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16174 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16175 && LARGE_OFF_T % 2147483647 == 1)
16176 ? 1 : -1];
16177 int
16178 main (void)
16179 {
16180
16181 ;
16182 return 0;
16183 }
16184 _ACEOF
16185 rm -f "conftest.$ac_objext"
16186 if { (eval echo "$as_me:16186: \"$ac_compile\"") >&5
16187 (eval $ac_compile) 2>&5
16188 ac_status=$?
16189 echo "$as_me:16189: \$? = $ac_status" >&5
16190 (exit "$ac_status"); } &&
16191 { ac_try='test -s "conftest.$ac_objext"'
16192 { (eval echo "$as_me:16192: \"$ac_try\"") >&5
16193 (eval $ac_try) 2>&5
16194 ac_status=$?
16195 echo "$as_me:16195: \$? = $ac_status" >&5
16196 (exit "$ac_status"); }; }; then
16197 ac_cv_sys_file_offset_bits=64; break
16198 else
16199 echo "$as_me: failed program was:" >&5
16200 cat "conftest.$ac_ext" >&5
16201 fi
16202 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16203 break
16204 done
16205 fi
16206 echo "$as_me:16206: result: $ac_cv_sys_file_offset_bits" >&5
16207 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
16208 if test "$ac_cv_sys_file_offset_bits" != no; then
16209
16210 cat >>confdefs.h <<EOF
16211 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
16212 EOF
16213
16214 fi
16215 rm -rf conftest*
16216 echo "$as_me:16216: checking for _LARGE_FILES value needed for large files" >&5
16217 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
16218 if test "${ac_cv_sys_large_files+set}" = set; then
16219 echo $ECHO_N "(cached) $ECHO_C" >&6
16220 else
16221 while :; do
16222 ac_cv_sys_large_files=no
16223 cat >"conftest.$ac_ext" <<_ACEOF
16224 #line 16224 "configure"
16225 #include "confdefs.h"
16226 #include <sys/types.h>
16227 /* Check that off_t can represent 2**63 - 1 correctly.
16228 We can't simply define LARGE_OFF_T to be 9223372036854775807,
16229 since some C++ compilers masquerading as C compilers
16230 incorrectly reject 9223372036854775807. */
16231 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16232 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16233 && LARGE_OFF_T % 2147483647 == 1)
16234 ? 1 : -1];
16235 int
16236 main (void)
16237 {
16238
16239 ;
16240 return 0;
16241 }
16242 _ACEOF
16243 rm -f "conftest.$ac_objext"
16244 if { (eval echo "$as_me:16244: \"$ac_compile\"") >&5
16245 (eval $ac_compile) 2>&5
16246 ac_status=$?
16247 echo "$as_me:16247: \$? = $ac_status" >&5
16248 (exit "$ac_status"); } &&
16249 { ac_try='test -s "conftest.$ac_objext"'
16250 { (eval echo "$as_me:16250: \"$ac_try\"") >&5
16251 (eval $ac_try) 2>&5
16252 ac_status=$?
16253 echo "$as_me:16253: \$? = $ac_status" >&5
16254 (exit "$ac_status"); }; }; then
16255 break
16256 else
16257 echo "$as_me: failed program was:" >&5
16258 cat "conftest.$ac_ext" >&5
16259 fi
16260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16261 cat >"conftest.$ac_ext" <<_ACEOF
16262 #line 16262 "configure"
16263 #include "confdefs.h"
16264 #define _LARGE_FILES 1
16265 #include <sys/types.h>
16266 /* Check that off_t can represent 2**63 - 1 correctly.
16267 We can't simply define LARGE_OFF_T to be 9223372036854775807,
16268 since some C++ compilers masquerading as C compilers
16269 incorrectly reject 9223372036854775807. */
16270 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
16271 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
16272 && LARGE_OFF_T % 2147483647 == 1)
16273 ? 1 : -1];
16274 int
16275 main (void)
16276 {
16277
16278 ;
16279 return 0;
16280 }
16281 _ACEOF
16282 rm -f "conftest.$ac_objext"
16283 if { (eval echo "$as_me:16283: \"$ac_compile\"") >&5
16284 (eval $ac_compile) 2>&5
16285 ac_status=$?
16286 echo "$as_me:16286: \$? = $ac_status" >&5
16287 (exit "$ac_status"); } &&
16288 { ac_try='test -s "conftest.$ac_objext"'
16289 { (eval echo "$as_me:16289: \"$ac_try\"") >&5
16290 (eval $ac_try) 2>&5
16291 ac_status=$?
16292 echo "$as_me:16292: \$? = $ac_status" >&5
16293 (exit "$ac_status"); }; }; then
16294 ac_cv_sys_large_files=1; break
16295 else
16296 echo "$as_me: failed program was:" >&5
16297 cat "conftest.$ac_ext" >&5
16298 fi
16299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16300 break
16301 done
16302 fi
16303 echo "$as_me:16303: result: $ac_cv_sys_large_files" >&5
16304 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
16305 if test "$ac_cv_sys_large_files" != no; then
16306
16307 cat >>confdefs.h <<EOF
16308 #define _LARGE_FILES $ac_cv_sys_large_files
16309 EOF
16310
16311 fi
16312 rm -rf conftest*
16313 fi
16314
16315 if test "$enable_largefile" != no ; then
16316 echo "$as_me:16316: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16317 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
16318 if test "${ac_cv_sys_largefile_source+set}" = set; then
16319 echo $ECHO_N "(cached) $ECHO_C" >&6
16320 else
16321 while :; do
16322 ac_cv_sys_largefile_source=no
16323 cat >"conftest.$ac_ext" <<_ACEOF
16324 #line 16324 "configure"
16325 #include "confdefs.h"
16326 #include <stdio.h>
16327 #include <sys/types.h>
16328 int
16329 main (void)
16330 {
16331
16332 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
16333 return my_fseeko(stdin, 0, 0);
16334 ;
16335 return 0;
16336 }
16337 _ACEOF
16338 rm -f "conftest.$ac_objext"
16339 if { (eval echo "$as_me:16339: \"$ac_compile\"") >&5
16340 (eval $ac_compile) 2>&5
16341 ac_status=$?
16342 echo "$as_me:16342: \$? = $ac_status" >&5
16343 (exit "$ac_status"); } &&
16344 { ac_try='test -s "conftest.$ac_objext"'
16345 { (eval echo "$as_me:16345: \"$ac_try\"") >&5
16346 (eval $ac_try) 2>&5
16347 ac_status=$?
16348 echo "$as_me:16348: \$? = $ac_status" >&5
16349 (exit "$ac_status"); }; }; then
16350 break
16351 else
16352 echo "$as_me: failed program was:" >&5
16353 cat "conftest.$ac_ext" >&5
16354 fi
16355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16356 cat >"conftest.$ac_ext" <<_ACEOF
16357 #line 16357 "configure"
16358 #include "confdefs.h"
16359 #define _LARGEFILE_SOURCE 1
16360 #include <stdio.h>
16361 #include <sys/types.h>
16362 int
16363 main (void)
16364 {
16365
16366 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
16367 return my_fseeko(stdin, 0, 0);
16368 ;
16369 return 0;
16370 }
16371 _ACEOF
16372 rm -f "conftest.$ac_objext"
16373 if { (eval echo "$as_me:16373: \"$ac_compile\"") >&5
16374 (eval $ac_compile) 2>&5
16375 ac_status=$?
16376 echo "$as_me:16376: \$? = $ac_status" >&5
16377 (exit "$ac_status"); } &&
16378 { ac_try='test -s "conftest.$ac_objext"'
16379 { (eval echo "$as_me:16379: \"$ac_try\"") >&5
16380 (eval $ac_try) 2>&5
16381 ac_status=$?
16382 echo "$as_me:16382: \$? = $ac_status" >&5
16383 (exit "$ac_status"); }; }; then
16384 ac_cv_sys_largefile_source=1; break
16385 else
16386 echo "$as_me: failed program was:" >&5
16387 cat "conftest.$ac_ext" >&5
16388 fi
16389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16390 break
16391 done
16392 fi
16393 echo "$as_me:16393: result: $ac_cv_sys_largefile_source" >&5
16394 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
16395 if test "$ac_cv_sys_largefile_source" != no; then
16396
16397 cat >>confdefs.h <<EOF
16398 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16399 EOF
16400
16401 fi
16402 rm -rf conftest*
16403
16404 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16405 # in glibc 2.1.3, but that breaks too many other things.
16406 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16407 echo "$as_me:16407: checking for fseeko" >&5
16408 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
16409 if test "${ac_cv_func_fseeko+set}" = set; then
16410 echo $ECHO_N "(cached) $ECHO_C" >&6
16411 else
16412 cat >"conftest.$ac_ext" <<_ACEOF
16413 #line 16413 "configure"
16414 #include "confdefs.h"
16415 #include <stdio.h>
16416 #include <sys/types.h>
16417 int
16418 main (void)
16419 {
16420 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
16421 return my_fseeko && my_fseeko (stdin, 0, 0);
16422 ;
16423 return 0;
16424 }
16425 _ACEOF
16426 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16427 if { (eval echo "$as_me:16427: \"$ac_link\"") >&5
16428 (eval $ac_link) 2>&5
16429 ac_status=$?
16430 echo "$as_me:16430: \$? = $ac_status" >&5
16431 (exit "$ac_status"); } &&
16432 { ac_try='test -s "conftest$ac_exeext"'
16433 { (eval echo "$as_me:16433: \"$ac_try\"") >&5
16434 (eval $ac_try) 2>&5
16435 ac_status=$?
16436 echo "$as_me:16436: \$? = $ac_status" >&5
16437 (exit "$ac_status"); }; }; then
16438 ac_cv_func_fseeko=yes
16439 else
16440 echo "$as_me: failed program was:" >&5
16441 cat "conftest.$ac_ext" >&5
16442 ac_cv_func_fseeko=no
16443 fi
16444 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16445 fi
16446 echo "$as_me:16446: result: $ac_cv_func_fseeko" >&5
16447 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
16448 if test $ac_cv_func_fseeko = yes; then
16449
16450 cat >>confdefs.h <<\EOF
16451 #define HAVE_FSEEKO 1
16452 EOF
16453
16454 fi
16455
16456 # Normally we would collect these definitions in the config.h,
16457 # but (like _XOPEN_SOURCE), some environments rely on having these
16458 # defined before any of the system headers are included. Another
16459 # case comes up with C++, e.g., on AIX the compiler compiles the
16460 # header files by themselves before looking at the body files it is
16461 # told to compile. For ncurses, those header files do not include
16462 # the config.h
16463 if test "$ac_cv_sys_large_files" != no
16464 then
16465
16466 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16467 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
16468
16469 fi
16470 if test "$ac_cv_sys_largefile_source" != no
16471 then
16472
16473 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16474 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
16475
16476 fi
16477 if test "$ac_cv_sys_file_offset_bits" != no
16478 then
16479
16480 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16481 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
16482
16483 fi
16484
16485 echo "$as_me:16485: checking whether to use struct dirent64" >&5
16486 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
16487 if test "${cf_cv_struct_dirent64+set}" = set; then
16488 echo $ECHO_N "(cached) $ECHO_C" >&6
16489 else
16490
16491 cat >"conftest.$ac_ext" <<_ACEOF
16492 #line 16492 "configure"
16493 #include "confdefs.h"
16494
16495 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
16496 #include <sys/types.h>
16497 #include <dirent.h>
16498
16499 #ifndef __REDIRECT
16500 /* if transitional largefile support is setup, this is true */
16501 extern struct dirent64 * readdir(DIR *);
16502 #endif
16503
16504 int
16505 main (void)
16506 {
16507
16508 DIR *dp = opendir(".");
16509 struct dirent64 *x = readdir(dp);
16510 struct dirent *y = readdir(dp);
16511 int z = x - y;
16512 (void)z;
16513
16514 ;
16515 return 0;
16516 }
16517 _ACEOF
16518 rm -f "conftest.$ac_objext"
16519 if { (eval echo "$as_me:16519: \"$ac_compile\"") >&5
16520 (eval $ac_compile) 2>&5
16521 ac_status=$?
16522 echo "$as_me:16522: \$? = $ac_status" >&5
16523 (exit "$ac_status"); } &&
16524 { ac_try='test -s "conftest.$ac_objext"'
16525 { (eval echo "$as_me:16525: \"$ac_try\"") >&5
16526 (eval $ac_try) 2>&5
16527 ac_status=$?
16528 echo "$as_me:16528: \$? = $ac_status" >&5
16529 (exit "$ac_status"); }; }; then
16530 cf_cv_struct_dirent64=yes
16531 else
16532 echo "$as_me: failed program was:" >&5
16533 cat "conftest.$ac_ext" >&5
16534 cf_cv_struct_dirent64=no
16535 fi
16536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16537
16538 fi
16539 echo "$as_me:16539: result: $cf_cv_struct_dirent64" >&5
16540 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
16541 test "$cf_cv_struct_dirent64" = yes &&
16542 cat >>confdefs.h <<\EOF
16543 #define HAVE_STRUCT_DIRENT64 1
16544 EOF
16545
16546 fi
16547
16548 ### Enable compiling-in rcs id's
16549 echo "$as_me:16549: checking if RCS identifiers should be compiled-in" >&5
16550 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
16551
16552 # Check whether --with-rcs-ids or --without-rcs-ids was given.
16553 if test "${with_rcs_ids+set}" = set; then
16554 withval="$with_rcs_ids"
16555 with_rcs_ids=$withval
16556 else
16557 with_rcs_ids=no
16558 fi;
16559 echo "$as_me:16559: result: $with_rcs_ids" >&5
16560 echo "${ECHO_T}$with_rcs_ids" >&6
16561 test "$with_rcs_ids" = yes &&
16562 cat >>confdefs.h <<\EOF
16563 #define USE_RCS_IDS 1
16564 EOF
16565
16566 ###############################################################################
16567
16568 ### Note that some functions (such as const) are normally disabled anyway.
16569 echo "$as_me:16569: checking if you want to build with function extensions" >&5
16570 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
16571
16572 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
16573 if test "${enable_ext_funcs+set}" = set; then
16574 enableval="$enable_ext_funcs"
16575 with_ext_funcs=$enableval
16576 else
16577 with_ext_funcs=yes
16578 fi;
16579 echo "$as_me:16579: result: $with_ext_funcs" >&5
16580 echo "${ECHO_T}$with_ext_funcs" >&6
16581 if test "$with_ext_funcs" = yes ; then
16582 NCURSES_EXT_FUNCS=1
16583
16584 cat >>confdefs.h <<\EOF
16585 #define HAVE_USE_DEFAULT_COLORS 1
16586 EOF
16587
16588 cat >>confdefs.h <<\EOF
16589 #define NCURSES_EXT_FUNCS 1
16590 EOF
16591
16592 else
16593 NCURSES_EXT_FUNCS=0
16594 fi
16595
16596 ### use option --enable-const to turn on use of const beyond that in XSI.
16597 echo "$as_me:16597: checking for extended use of const keyword" >&5
16598 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
16599
16600 # Check whether --enable-const or --disable-const was given.
16601 if test "${enable_const+set}" = set; then
16602 enableval="$enable_const"
16603 with_ext_const=$enableval
16604 else
16605 with_ext_const=no
16606 fi;
16607 echo "$as_me:16607: result: $with_ext_const" >&5
16608 echo "${ECHO_T}$with_ext_const" >&6
16609 NCURSES_CONST='/*nothing*/'
16610 if test "$with_ext_const" = yes ; then
16611 NCURSES_CONST=const
16612 fi
16613
16614 ###############################################################################
16615 # These options are relatively safe to experiment with.
16616
16617 echo "$as_me:16617: checking if you want all development code" >&5
16618 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16619
16620 # Check whether --with-develop or --without-develop was given.
16621 if test "${with_develop+set}" = set; then
16622 withval="$with_develop"
16623 with_develop=$withval
16624 else
16625 with_develop=no
16626 fi;
16627 echo "$as_me:16627: result: $with_develop" >&5
16628 echo "${ECHO_T}$with_develop" >&6
16629
16630 ###############################################################################
16631 # These are just experimental, probably should not be in a package:
16632
16633 # This is still experimental (20080329), but should ultimately be moved to
16634 # the script-block --with-normal, etc.
16635
16636 echo "$as_me:16636: checking if you want to link with the pthread library" >&5
16637 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
16638
16639 # Check whether --with-pthread or --without-pthread was given.
16640 if test "${with_pthread+set}" = set; then
16641 withval="$with_pthread"
16642 with_pthread=$withval
16643 else
16644 with_pthread=no
16645 fi;
16646 echo "$as_me:16646: result: $with_pthread" >&5
16647 echo "${ECHO_T}$with_pthread" >&6
16648
16649 if test "$with_pthread" != no ; then
16650 echo "$as_me:16650: checking for pthread.h" >&5
16651 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16652 if test "${ac_cv_header_pthread_h+set}" = set; then
16653 echo $ECHO_N "(cached) $ECHO_C" >&6
16654 else
16655 cat >"conftest.$ac_ext" <<_ACEOF
16656 #line 16656 "configure"
16657 #include "confdefs.h"
16658 #include <pthread.h>
16659 _ACEOF
16660 if { (eval echo "$as_me:16660: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16661 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16662 ac_status=$?
16663 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16664 rm -f conftest.er1
16665 cat conftest.err >&5
16666 echo "$as_me:16666: \$? = $ac_status" >&5
16667 (exit "$ac_status"); } >/dev/null; then
16668 if test -s conftest.err; then
16669 ac_cpp_err=$ac_c_preproc_warn_flag
16670 else
16671 ac_cpp_err=
16672 fi
16673 else
16674 ac_cpp_err=yes
16675 fi
16676 if test -z "$ac_cpp_err"; then
16677 ac_cv_header_pthread_h=yes
16678 else
16679 echo "$as_me: failed program was:" >&5
16680 cat "conftest.$ac_ext" >&5
16681 ac_cv_header_pthread_h=no
16682 fi
16683 rm -f conftest.err "conftest.$ac_ext"
16684 fi
16685 echo "$as_me:16685: result: $ac_cv_header_pthread_h" >&5
16686 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16687 if test "$ac_cv_header_pthread_h" = yes; then
16688
16689 cat >>confdefs.h <<\EOF
16690 #define HAVE_PTHREADS_H 1
16691 EOF
16692
16693 for cf_lib_pthread in pthread c_r
16694 do
16695 echo "$as_me:16695: checking if we can link with the $cf_lib_pthread library" >&5
16696 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
16697 cf_save_LIBS="$LIBS"
16698
16699 cf_add_libs="$LIBS"
16700 # reverse order
16701 cf_add_0lib=
16702 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16703 # filter duplicates
16704 for cf_add_1lib in $cf_add_0lib; do
16705 for cf_add_2lib in $cf_add_libs; do
16706 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16707 cf_add_1lib=
16708 break
16709 fi
16710 done
16711 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16712 done
16713 LIBS="$cf_add_libs"
16714
16715 cat >"conftest.$ac_ext" <<_ACEOF
16716 #line 16716 "configure"
16717 #include "confdefs.h"
16718
16719 #include <pthread.h>
16720
16721 int
16722 main (void)
16723 {
16724
16725 int rc = pthread_create(0,0,0,0);
16726 int r2 = pthread_mutexattr_settype(0, 0);
16727
16728 ;
16729 return 0;
16730 }
16731 _ACEOF
16732 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16733 if { (eval echo "$as_me:16733: \"$ac_link\"") >&5
16734 (eval $ac_link) 2>&5
16735 ac_status=$?
16736 echo "$as_me:16736: \$? = $ac_status" >&5
16737 (exit "$ac_status"); } &&
16738 { ac_try='test -s "conftest$ac_exeext"'
16739 { (eval echo "$as_me:16739: \"$ac_try\"") >&5
16740 (eval $ac_try) 2>&5
16741 ac_status=$?
16742 echo "$as_me:16742: \$? = $ac_status" >&5
16743 (exit "$ac_status"); }; }; then
16744 with_pthread=yes
16745 else
16746 echo "$as_me: failed program was:" >&5
16747 cat "conftest.$ac_ext" >&5
16748 with_pthread=no
16749 fi
16750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16751 LIBS="$cf_save_LIBS"
16752 echo "$as_me:16752: result: $with_pthread" >&5
16753 echo "${ECHO_T}$with_pthread" >&6
16754 test "$with_pthread" = yes && break
16755 done
16756
16757 if test "$with_pthread" = yes ; then
16758
16759 cf_add_libs="$LIBS"
16760 # reverse order
16761 cf_add_0lib=
16762 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16763 # filter duplicates
16764 for cf_add_1lib in $cf_add_0lib; do
16765 for cf_add_2lib in $cf_add_libs; do
16766 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16767 cf_add_1lib=
16768 break
16769 fi
16770 done
16771 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16772 done
16773 LIBS="$cf_add_libs"
16774
16775 cat >>confdefs.h <<\EOF
16776 #define HAVE_LIBPTHREADS 1
16777 EOF
16778
16779 else
16780 { { echo "$as_me:16780: error: Cannot link with pthread library" >&5
16781 echo "$as_me: error: Cannot link with pthread library" >&2;}
16782 { (exit 1); exit 1; }; }
16783 fi
16784
16785 fi
16786
16787 fi
16788
16789 echo "$as_me:16789: checking if you want to use weak-symbols for pthreads" >&5
16790 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16791
16792 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16793 if test "${enable_weak_symbols+set}" = set; then
16794 enableval="$enable_weak_symbols"
16795 use_weak_symbols=$withval
16796 else
16797 use_weak_symbols=no
16798 fi;
16799 echo "$as_me:16799: result: $use_weak_symbols" >&5
16800 echo "${ECHO_T}$use_weak_symbols" >&6
16801 if test "$use_weak_symbols" = yes ; then
16802
16803 echo "$as_me:16803: checking if $CC supports weak symbols" >&5
16804 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16805 if test "${cf_cv_weak_symbols+set}" = set; then
16806 echo $ECHO_N "(cached) $ECHO_C" >&6
16807 else
16808
16809 cat >"conftest.$ac_ext" <<_ACEOF
16810 #line 16810 "configure"
16811 #include "confdefs.h"
16812
16813 #include <stdio.h>
16814 int
16815 main (void)
16816 {
16817
16818 #if defined(__GNUC__)
16819 # if defined __USE_ISOC99
16820 # define _cat_pragma(exp) _Pragma(#exp)
16821 # define _weak_pragma(exp) _cat_pragma(weak name)
16822 # else
16823 # define _weak_pragma(exp)
16824 # endif
16825 # define _declare(name) __extension__ extern __typeof__(name) name
16826 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
16827 #endif
16828
16829 weak_symbol(fopen);
16830
16831 ;
16832 return 0;
16833 }
16834 _ACEOF
16835 rm -f "conftest.$ac_objext"
16836 if { (eval echo "$as_me:16836: \"$ac_compile\"") >&5
16837 (eval $ac_compile) 2>&5
16838 ac_status=$?
16839 echo "$as_me:16839: \$? = $ac_status" >&5
16840 (exit "$ac_status"); } &&
16841 { ac_try='test -s "conftest.$ac_objext"'
16842 { (eval echo "$as_me:16842: \"$ac_try\"") >&5
16843 (eval $ac_try) 2>&5
16844 ac_status=$?
16845 echo "$as_me:16845: \$? = $ac_status" >&5
16846 (exit "$ac_status"); }; }; then
16847 cf_cv_weak_symbols=yes
16848 else
16849 echo "$as_me: failed program was:" >&5
16850 cat "conftest.$ac_ext" >&5
16851 cf_cv_weak_symbols=no
16852 fi
16853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16854
16855 fi
16856 echo "$as_me:16856: result: $cf_cv_weak_symbols" >&5
16857 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16858
16859 else
16860 cf_cv_weak_symbols=no
16861 fi
16862
16863 if test $cf_cv_weak_symbols = yes ; then
16864
16865 cat >>confdefs.h <<\EOF
16866 #define USE_WEAK_SYMBOLS 1
16867 EOF
16868
16869 fi
16870
16871 PTHREAD=
16872 if test "$with_pthread" = "yes" ; then
16873
16874 cat >>confdefs.h <<\EOF
16875 #define USE_PTHREADS 1
16876 EOF
16877
16878 enable_reentrant=yes
16879 if test $cf_cv_weak_symbols = yes ; then
16880 PTHREAD=-lpthread
16881 fi
16882 fi
16883
16884 # OpenSUSE is installing ncurses6, using reentrant option.
16885 echo "$as_me:16885: checking for _nc_TABSIZE" >&5
16886 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
16887 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
16888 echo $ECHO_N "(cached) $ECHO_C" >&6
16889 else
16890 cat >"conftest.$ac_ext" <<_ACEOF
16891 #line 16891 "configure"
16892 #include "confdefs.h"
16893 #define _nc_TABSIZE autoconf_temporary
16894 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16895 #undef _nc_TABSIZE
16896
16897 #ifdef __cplusplus
16898 extern "C"
16899 #endif
16900
16901 /* We use char because int might match the return type of a gcc2
16902 builtin and then its argument prototype would still apply. */
16903 char _nc_TABSIZE (void);
16904
16905 int
16906 main (void)
16907 {
16908
16909 /* The GNU C library defines stubs for functions which it implements
16910 to always fail with ENOSYS. Some functions are actually named
16911 something starting with __ and the normal name is an alias. */
16912 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
16913 #error found stub for _nc_TABSIZE
16914 #endif
16915
16916 return _nc_TABSIZE ();
16917 ;
16918 return 0;
16919 }
16920 _ACEOF
16921 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16922 if { (eval echo "$as_me:16922: \"$ac_link\"") >&5
16923 (eval $ac_link) 2>&5
16924 ac_status=$?
16925 echo "$as_me:16925: \$? = $ac_status" >&5
16926 (exit "$ac_status"); } &&
16927 { ac_try='test -s "conftest$ac_exeext"'
16928 { (eval echo "$as_me:16928: \"$ac_try\"") >&5
16929 (eval $ac_try) 2>&5
16930 ac_status=$?
16931 echo "$as_me:16931: \$? = $ac_status" >&5
16932 (exit "$ac_status"); }; }; then
16933 ac_cv_func__nc_TABSIZE=yes
16934 else
16935 echo "$as_me: failed program was:" >&5
16936 cat "conftest.$ac_ext" >&5
16937 ac_cv_func__nc_TABSIZE=no
16938 fi
16939 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16940 fi
16941 echo "$as_me:16941: result: $ac_cv_func__nc_TABSIZE" >&5
16942 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
16943 if test "$ac_cv_func__nc_TABSIZE" = yes; then
16944 assume_reentrant=yes
16945 else
16946 assume_reentrant=no
16947 fi
16948
16949 # Reentrant code has to be opaque; there's little advantage to making ncurses
16950 # opaque outside of that, so there is no --enable-opaque option. We can use
16951 # this option without --with-pthreads, but this will be always set for
16952 # pthreads.
16953 echo "$as_me:16953: checking if you want experimental reentrant code" >&5
16954 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
16955
16956 # Check whether --enable-reentrant or --disable-reentrant was given.
16957 if test "${enable_reentrant+set}" = set; then
16958 enableval="$enable_reentrant"
16959 with_reentrant=$enableval
16960 else
16961 with_reentrant=$assume_reentrant
16962 fi;
16963 echo "$as_me:16963: result: $with_reentrant" >&5
16964 echo "${ECHO_T}$with_reentrant" >&6
16965 if test "$with_reentrant" = yes ; then
16966 cf_cv_enable_reentrant=1
16967 if test $cf_cv_weak_symbols = yes ; then
16968
16969 # remove pthread library from $LIBS
16970 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
16971
16972 elif test "$assume_reentrant" = no ; then
16973 LIB_SUFFIX="t${LIB_SUFFIX}"
16974 fi
16975
16976 cat >>confdefs.h <<\EOF
16977 #define USE_REENTRANT 1
16978 EOF
16979
16980 else
16981 cf_cv_enable_reentrant=0
16982 fi
16983
16984 ### Allow using a different wrap-prefix
16985 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16986 echo "$as_me:16986: checking for prefix used to wrap public variables" >&5
16987 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16988
16989 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16990 if test "${with_wrap_prefix+set}" = set; then
16991 withval="$with_wrap_prefix"
16992 NCURSES_WRAP_PREFIX=$withval
16993 else
16994 NCURSES_WRAP_PREFIX=_nc_
16995 fi;
16996 echo "$as_me:16996: result: $NCURSES_WRAP_PREFIX" >&5
16997 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16998 else
16999 NCURSES_WRAP_PREFIX=_nc_
17000 fi
17001
17002 cat >>confdefs.h <<EOF
17003 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
17004 EOF
17005
17006 ###############################################################################
17007
17008 ### use option --disable-echo to suppress full display compiling commands
17009
17010 echo "$as_me:17010: checking if you want to see long compiling messages" >&5
17011 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
17012
17013 # Check whether --enable-echo or --disable-echo was given.
17014 if test "${enable_echo+set}" = set; then
17015 enableval="$enable_echo"
17016 test "$enableval" != no && enableval=yes
17017 if test "$enableval" != "yes" ; then
17018
17019 ECHO_LT='--silent'
17020 ECHO_LD='@echo linking $@;'
17021 RULE_CC='@echo compiling $<'
17022 SHOW_CC='@echo compiling $@'
17023 ECHO_CC='@'
17024
17025 else
17026
17027 ECHO_LT=''
17028 ECHO_LD=''
17029 RULE_CC=''
17030 SHOW_CC=''
17031 ECHO_CC=''
17032
17033 fi
17034 else
17035 enableval=yes
17036
17037 ECHO_LT=''
17038 ECHO_LD=''
17039 RULE_CC=''
17040 SHOW_CC=''
17041 ECHO_CC=''
17042
17043 fi;
17044 echo "$as_me:17044: result: $enableval" >&5
17045 echo "${ECHO_T}$enableval" >&6
17046
17047 echo "$as_me:17047: checking if you want to use C11 _Noreturn feature" >&5
17048 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17049
17050 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17051 if test "${enable_stdnoreturn+set}" = set; then
17052 enableval="$enable_stdnoreturn"
17053 test "$enableval" != yes && enableval=no
17054 if test "$enableval" != "no" ; then
17055 enable_stdnoreturn=yes
17056 else
17057 enable_stdnoreturn=no
17058 fi
17059 else
17060 enableval=no
17061 enable_stdnoreturn=no
17062
17063 fi;
17064 echo "$as_me:17064: result: $enable_stdnoreturn" >&5
17065 echo "${ECHO_T}$enable_stdnoreturn" >&6
17066
17067 if test $enable_stdnoreturn = yes; then
17068 echo "$as_me:17068: checking for C11 _Noreturn feature" >&5
17069 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17070 if test "${cf_cv_c11_noreturn+set}" = set; then
17071 echo $ECHO_N "(cached) $ECHO_C" >&6
17072 else
17073 cat >"conftest.$ac_ext" <<_ACEOF
17074 #line 17074 "configure"
17075 #include "confdefs.h"
17076
17077 $ac_includes_default
17078 #include <stdnoreturn.h>
17079 static _Noreturn void giveup(void) { exit(0); }
17080
17081 int
17082 main (void)
17083 {
17084 if (feof(stdin)) giveup()
17085 ;
17086 return 0;
17087 }
17088 _ACEOF
17089 rm -f "conftest.$ac_objext"
17090 if { (eval echo "$as_me:17090: \"$ac_compile\"") >&5
17091 (eval $ac_compile) 2>&5
17092 ac_status=$?
17093 echo "$as_me:17093: \$? = $ac_status" >&5
17094 (exit "$ac_status"); } &&
17095 { ac_try='test -s "conftest.$ac_objext"'
17096 { (eval echo "$as_me:17096: \"$ac_try\"") >&5
17097 (eval $ac_try) 2>&5
17098 ac_status=$?
17099 echo "$as_me:17099: \$? = $ac_status" >&5
17100 (exit "$ac_status"); }; }; then
17101 cf_cv_c11_noreturn=yes
17102 else
17103 echo "$as_me: failed program was:" >&5
17104 cat "conftest.$ac_ext" >&5
17105 cf_cv_c11_noreturn=no
17106 fi
17107 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17108
17109 fi
17110 echo "$as_me:17110: result: $cf_cv_c11_noreturn" >&5
17111 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17112 else
17113 cf_cv_c11_noreturn=no,
17114 fi
17115
17116 if test "$cf_cv_c11_noreturn" = yes; then
17117
17118 cat >>confdefs.h <<\EOF
17119 #define HAVE_STDNORETURN_H 1
17120 EOF
17121
17122 cat >>confdefs.h <<EOF
17123 #define STDC_NORETURN _Noreturn
17124 EOF
17125
17126 HAVE_STDNORETURN_H=1
17127 else
17128 HAVE_STDNORETURN_H=0
17129 fi
17130
17131 if test "$GCC" = yes || test "$GXX" = yes
17132 then
17133
17134 if test "$GCC" = yes || test "$GXX" = yes
17135 then
17136 case $CFLAGS in
17137 (*-Werror=*)
17138 cf_temp_flags=
17139 for cf_temp_scan in $CFLAGS
17140 do
17141 case "x$cf_temp_scan" in
17142 (x-Werror=format*)
17143
17144 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17145 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17146
17147 ;;
17148 (x-Werror=*)
17149
17150 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17151 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17152
17153 ;;
17154 (*)
17155
17156 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17157 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17158
17159 ;;
17160 esac
17161 done
17162 if test "x$CFLAGS" != "x$cf_temp_flags"
17163 then
17164 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
17165
17166 echo "${as_me:-configure}:17166: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17167
17168 CFLAGS="$cf_temp_flags"
17169 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
17170
17171 echo "${as_me:-configure}:17171: testing ... fixed $CFLAGS ..." 1>&5
17172
17173 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17174
17175 echo "${as_me:-configure}:17175: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17176
17177 fi
17178 ;;
17179 esac
17180 fi
17181
17182 if test "$GCC" = yes || test "$GXX" = yes
17183 then
17184 case $CPPFLAGS in
17185 (*-Werror=*)
17186 cf_temp_flags=
17187 for cf_temp_scan in $CPPFLAGS
17188 do
17189 case "x$cf_temp_scan" in
17190 (x-Werror=format*)
17191
17192 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17193 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17194
17195 ;;
17196 (x-Werror=*)
17197
17198 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17199 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17200
17201 ;;
17202 (*)
17203
17204 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17205 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17206
17207 ;;
17208 esac
17209 done
17210 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17211 then
17212 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
17213
17214 echo "${as_me:-configure}:17214: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17215
17216 CPPFLAGS="$cf_temp_flags"
17217 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
17218
17219 echo "${as_me:-configure}:17219: testing ... fixed $CPPFLAGS ..." 1>&5
17220
17221 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17222
17223 echo "${as_me:-configure}:17223: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17224
17225 fi
17226 ;;
17227 esac
17228 fi
17229
17230 if test "$GCC" = yes || test "$GXX" = yes
17231 then
17232 case $LDFLAGS in
17233 (*-Werror=*)
17234 cf_temp_flags=
17235 for cf_temp_scan in $LDFLAGS
17236 do
17237 case "x$cf_temp_scan" in
17238 (x-Werror=format*)
17239
17240 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17241 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17242
17243 ;;
17244 (x-Werror=*)
17245
17246 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17247 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17248
17249 ;;
17250 (*)
17251
17252 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17253 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17254
17255 ;;
17256 esac
17257 done
17258 if test "x$LDFLAGS" != "x$cf_temp_flags"
17259 then
17260 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
17261
17262 echo "${as_me:-configure}:17262: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17263
17264 LDFLAGS="$cf_temp_flags"
17265 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
17266
17267 echo "${as_me:-configure}:17267: testing ... fixed $LDFLAGS ..." 1>&5
17268
17269 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17270
17271 echo "${as_me:-configure}:17271: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17272
17273 fi
17274 ;;
17275 esac
17276 fi
17277
17278 echo "$as_me:17278: checking if you want to turn on gcc warnings" >&5
17279 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17280
17281 # Check whether --enable-warnings or --disable-warnings was given.
17282 if test "${enable_warnings+set}" = set; then
17283 enableval="$enable_warnings"
17284 test "$enableval" != yes && enableval=no
17285 if test "$enableval" != "no" ; then
17286 enable_warnings=yes
17287 else
17288 enable_warnings=no
17289 fi
17290 else
17291 enableval=no
17292 enable_warnings=no
17293
17294 fi;
17295 echo "$as_me:17295: result: $enable_warnings" >&5
17296 echo "${ECHO_T}$enable_warnings" >&6
17297 if test "$enable_warnings" = "yes"
17298 then
17299
17300 if test "x$have_x" = xyes; then
17301
17302 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17303 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17304 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17305 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17306 for cf_X_CFLAGS in $X_CFLAGS
17307 do
17308 case "x$cf_X_CFLAGS" in
17309 x-[IUD]*)
17310 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17311 ;;
17312 *)
17313 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17314 ;;
17315 esac
17316 done
17317
17318 cat >"conftest.$ac_ext" <<_ACEOF
17319 #line 17319 "configure"
17320 #include "confdefs.h"
17321
17322 $ac_includes_default
17323 #include <X11/Intrinsic.h>
17324
17325 int
17326 main (void)
17327 {
17328 String foo = malloc(1); free((void*)foo)
17329 ;
17330 return 0;
17331 }
17332 _ACEOF
17333 rm -f "conftest.$ac_objext"
17334 if { (eval echo "$as_me:17334: \"$ac_compile\"") >&5
17335 (eval $ac_compile) 2>&5
17336 ac_status=$?
17337 echo "$as_me:17337: \$? = $ac_status" >&5
17338 (exit "$ac_status"); } &&
17339 { ac_try='test -s "conftest.$ac_objext"'
17340 { (eval echo "$as_me:17340: \"$ac_try\"") >&5
17341 (eval $ac_try) 2>&5
17342 ac_status=$?
17343 echo "$as_me:17343: \$? = $ac_status" >&5
17344 (exit "$ac_status"); }; }; then
17345
17346 echo "$as_me:17346: checking for X11/Xt const-feature" >&5
17347 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17348 if test "${cf_cv_const_x_string+set}" = set; then
17349 echo $ECHO_N "(cached) $ECHO_C" >&6
17350 else
17351
17352 cat >"conftest.$ac_ext" <<_ACEOF
17353 #line 17353 "configure"
17354 #include "confdefs.h"
17355
17356 #undef _CONST_X_STRING
17357 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17358 #undef XTSTRINGDEFINES /* X11R5 and later */
17359 $ac_includes_default
17360 #include <X11/Intrinsic.h>
17361
17362 int
17363 main (void)
17364 {
17365 String foo = malloc(1); *foo = 0
17366 ;
17367 return 0;
17368 }
17369 _ACEOF
17370 rm -f "conftest.$ac_objext"
17371 if { (eval echo "$as_me:17371: \"$ac_compile\"") >&5
17372 (eval $ac_compile) 2>&5
17373 ac_status=$?
17374 echo "$as_me:17374: \$? = $ac_status" >&5
17375 (exit "$ac_status"); } &&
17376 { ac_try='test -s "conftest.$ac_objext"'
17377 { (eval echo "$as_me:17377: \"$ac_try\"") >&5
17378 (eval $ac_try) 2>&5
17379 ac_status=$?
17380 echo "$as_me:17380: \$? = $ac_status" >&5
17381 (exit "$ac_status"); }; }; then
17382
17383 cf_cv_const_x_string=no
17384
17385 else
17386 echo "$as_me: failed program was:" >&5
17387 cat "conftest.$ac_ext" >&5
17388
17389 cf_cv_const_x_string=yes
17390
17391 fi
17392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17393
17394 fi
17395 echo "$as_me:17395: result: $cf_cv_const_x_string" >&5
17396 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17397
17398 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17399 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17400 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17401
17402 case "$cf_cv_const_x_string" in
17403 (no)
17404
17405 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17406 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17407
17408 ;;
17409 (*)
17410
17411 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17412 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17413
17414 ;;
17415 esac
17416
17417 else
17418 echo "$as_me: failed program was:" >&5
17419 cat "conftest.$ac_ext" >&5
17420 fi
17421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17422 fi
17423 cat > "conftest.$ac_ext" <<EOF
17424 #line 17424 "${as_me:-configure}"
17425 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17426 EOF
17427 if test "$INTEL_COMPILER" = yes
17428 then
17429 # The "-wdXXX" options suppress warnings:
17430 # remark #1419: external declaration in primary source file
17431 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17432 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17433 # remark #193: zero used for undefined preprocessing identifier
17434 # remark #593: variable "curs_sb_left_arrow" was set but never used
17435 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17436 # remark #869: parameter "tw" was never referenced
17437 # remark #981: operands are evaluated in unspecified order
17438 # warning #279: controlling expression is constant
17439
17440 echo "$as_me:17440: checking for $CC warning options" >&5
17441 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17442 test -n "$verbose" && echo "$as_me:17442: result: " >&5
17443 echo "${ECHO_T}" >&6
17444 cf_save_CFLAGS="$CFLAGS"
17445 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17446 for cf_opt in \
17447 wd1419 \
17448 wd1683 \
17449 wd1684 \
17450 wd193 \
17451 wd593 \
17452 wd279 \
17453 wd810 \
17454 wd869 \
17455 wd981
17456 do
17457 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17458 if { (eval echo "$as_me:17458: \"$ac_compile\"") >&5
17459 (eval $ac_compile) 2>&5
17460 ac_status=$?
17461 echo "$as_me:17461: \$? = $ac_status" >&5
17462 (exit "$ac_status"); }; then
17463 test -n "$verbose" && echo "$as_me:17463: result: ... -$cf_opt" >&5
17464 echo "${ECHO_T}... -$cf_opt" >&6
17465 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17466 fi
17467 done
17468 CFLAGS="$cf_save_CFLAGS"
17469 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17470 then
17471 echo "$as_me:17471: checking for $CC warning options" >&5
17472 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
17473 test -n "$verbose" && echo "$as_me:17473: result: " >&5
17474 echo "${ECHO_T}" >&6
17475 cf_save_CFLAGS="$CFLAGS"
17476 cf_warn_CONST=""
17477 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17478 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17479 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17480 for cf_opt in W Wall \
17481 Wbad-function-cast \
17482 Wcast-align \
17483 Wcast-qual \
17484 Wdeclaration-after-statement \
17485 Wextra \
17486 Winline \
17487 Wmissing-declarations \
17488 Wmissing-prototypes \
17489 Wnested-externs \
17490 Wpointer-arith \
17491 Wshadow \
17492 Wstrict-prototypes \
17493 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17494 do
17495 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17496 if { (eval echo "$as_me:17496: \"$ac_compile\"") >&5
17497 (eval $ac_compile) 2>&5
17498 ac_status=$?
17499 echo "$as_me:17499: \$? = $ac_status" >&5
17500 (exit "$ac_status"); }; then
17501 test -n "$verbose" && echo "$as_me:17501: result: ... -$cf_opt" >&5
17502 echo "${ECHO_T}... -$cf_opt" >&6
17503 case "$cf_opt" in
17504 (Winline)
17505 case "$GCC_VERSION" in
17506 ([34].*)
17507 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17508
17509 echo "${as_me:-configure}:17509: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17510
17511 continue;;
17512 esac
17513 ;;
17514 (Wpointer-arith)
17515 case "$GCC_VERSION" in
17516 ([12].*)
17517 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17518
17519 echo "${as_me:-configure}:17519: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17520
17521 continue;;
17522 esac
17523 ;;
17524 esac
17525 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17526 fi
17527 done
17528 CFLAGS="$cf_save_CFLAGS"
17529 fi
17530 rm -rf ./conftest*
17531
17532 fi
17533
17534 if test "$GCC" = yes || test "$GXX" = yes
17535 then
17536 cat > conftest.i <<EOF
17537 #ifndef GCC_PRINTF
17538 #define GCC_PRINTF 0
17539 #endif
17540 #ifndef GCC_SCANF
17541 #define GCC_SCANF 0
17542 #endif
17543 #ifndef GCC_NORETURN
17544 #define GCC_NORETURN /* nothing */
17545 #endif
17546 #ifndef GCC_UNUSED
17547 #define GCC_UNUSED /* nothing */
17548 #endif
17549 EOF
17550 if test "$GCC" = yes
17551 then
17552 echo "$as_me:17552: checking for $CC __attribute__ directives" >&5
17553 echo $ECHO_N "checking for $CC __attribute__ directives... $ECHO_C" >&6
17554 test -n "$verbose" && echo "$as_me:17554: result: " >&5
17555 echo "${ECHO_T}" >&6
17556 cat > "conftest.$ac_ext" <<EOF
17557 #line 17557 "${as_me:-configure}"
17558 #include <stdio.h>
17559 #include "confdefs.h"
17560 #include "conftest.h"
17561 #include "conftest.i"
17562 #if GCC_PRINTF
17563 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17564 #else
17565 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17566 #endif
17567 #if GCC_SCANF
17568 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
17569 #else
17570 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
17571 #endif
17572 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17573 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17574 extern GCC_NORETURN void foo(void);
17575 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17576 EOF
17577 cf_printf_attribute=no
17578 cf_scanf_attribute=no
17579 for cf_attribute in scanf printf unused noreturn
17580 do
17581
17582 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17583
17584 cf_directive="__attribute__(($cf_attribute))"
17585 echo "checking for $CC $cf_directive" 1>&5
17586
17587 case "$cf_attribute" in
17588 (printf)
17589 cf_printf_attribute=yes
17590 cat >conftest.h <<EOF
17591 #define GCC_$cf_ATTRIBUTE 1
17592 EOF
17593 ;;
17594 (scanf)
17595 cf_scanf_attribute=yes
17596 cat >conftest.h <<EOF
17597 #define GCC_$cf_ATTRIBUTE 1
17598 EOF
17599 ;;
17600 (*)
17601 cat >conftest.h <<EOF
17602 #define GCC_$cf_ATTRIBUTE $cf_directive
17603 EOF
17604 ;;
17605 esac
17606
17607 if { (eval echo "$as_me:17607: \"$ac_compile\"") >&5
17608 (eval $ac_compile) 2>&5
17609 ac_status=$?
17610 echo "$as_me:17610: \$? = $ac_status" >&5
17611 (exit "$ac_status"); }; then
17612 test -n "$verbose" && echo "$as_me:17612: result: ... $cf_attribute" >&5
17613 echo "${ECHO_T}... $cf_attribute" >&6
17614 cat conftest.h >>confdefs.h
17615 case "$cf_attribute" in
17616 (noreturn)
17617
17618 cat >>confdefs.h <<EOF
17619 #define GCC_NORETURN $cf_directive
17620 EOF
17621
17622 ;;
17623 (printf)
17624 cf_value='/* nothing */'
17625 if test "$cf_printf_attribute" != no ; then
17626 cf_value='__attribute__((format(printf,fmt,var)))'
17627
17628 cat >>confdefs.h <<\EOF
17629 #define GCC_PRINTF 1
17630 EOF
17631
17632 fi
17633
17634 cat >>confdefs.h <<EOF
17635 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17636 EOF
17637
17638 ;;
17639 (scanf)
17640 cf_value='/* nothing */'
17641 if test "$cf_scanf_attribute" != no ; then
17642 cf_value='__attribute__((format(scanf,fmt,var)))'
17643
17644 cat >>confdefs.h <<\EOF
17645 #define GCC_SCANF 1
17646 EOF
17647
17648 fi
17649
17650 cat >>confdefs.h <<EOF
17651 #define GCC_SCANFLIKE(fmt,var) $cf_value
17652 EOF
17653
17654 ;;
17655 (unused)
17656
17657 cat >>confdefs.h <<EOF
17658 #define GCC_UNUSED $cf_directive
17659 EOF
17660
17661 ;;
17662 esac
17663 fi
17664 done
17665 else
17666 ${FGREP-fgrep} define conftest.i >>confdefs.h
17667 fi
17668 rm -rf ./conftest*
17669 fi
17670
17671 fi
17672
17673 if test "x$enable_warnings" = "xyes"; then
17674
17675 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17676
17677 fi
17678
17679 ### use option --enable-assertions to turn on generation of assertion code
17680 echo "$as_me:17680: checking if you want to enable runtime assertions" >&5
17681 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17682
17683 # Check whether --enable-assertions or --disable-assertions was given.
17684 if test "${enable_assertions+set}" = set; then
17685 enableval="$enable_assertions"
17686 with_assertions=$enableval
17687 else
17688 with_assertions=no
17689 fi;
17690 echo "$as_me:17690: result: $with_assertions" >&5
17691 echo "${ECHO_T}$with_assertions" >&6
17692 if test -n "$GCC"
17693 then
17694 if test "$with_assertions" = no
17695 then
17696 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17697 else
17698
17699 ADAFLAGS="$ADAFLAGS -gnata"
17700
17701 fi
17702 fi
17703
17704 ### use option --disable-leaks to suppress "permanent" leaks, for testing
17705
17706 cat >>confdefs.h <<\EOF
17707 #define HAVE_NC_ALLOC_H 1
17708 EOF
17709
17710 ### use option --enable-expanded to generate certain macros as functions
17711
17712 # Check whether --enable-expanded or --disable-expanded was given.
17713 if test "${enable_expanded+set}" = set; then
17714 enableval="$enable_expanded"
17715 test "$enableval" = yes &&
17716 cat >>confdefs.h <<\EOF
17717 #define NCURSES_EXPANDED 1
17718 EOF
17719
17720 fi;
17721
17722 ### use option --disable-macros to suppress macros in favor of functions
17723
17724 # Check whether --enable-macros or --disable-macros was given.
17725 if test "${enable_macros+set}" = set; then
17726 enableval="$enable_macros"
17727 test "$enableval" = no &&
17728 cat >>confdefs.h <<\EOF
17729 #define NCURSES_NOMACROS 1
17730 EOF
17731
17732 fi;
17733
17734 # Normally we only add trace() to the debug-library. Allow this to be
17735 # extended to all models of the ncurses library:
17736 cf_all_traces=no
17737 case "$CFLAGS $CPPFLAGS" in
17738 (*-DTRACE*)
17739 cf_all_traces=yes
17740 ;;
17741 esac
17742
17743 echo "$as_me:17743: checking whether to add trace feature to all models" >&5
17744 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17745
17746 # Check whether --with-trace or --without-trace was given.
17747 if test "${with_trace+set}" = set; then
17748 withval="$with_trace"
17749 cf_with_trace=$withval
17750 else
17751 cf_with_trace=$cf_all_traces
17752 fi;
17753 echo "$as_me:17753: result: $cf_with_trace" >&5
17754 echo "${ECHO_T}$cf_with_trace" >&6
17755
17756 if test "$cf_with_trace" = yes ; then
17757 ADA_TRACE=TRUE
17758
17759 cat >>confdefs.h <<\EOF
17760 #define TRACE 1
17761 EOF
17762
17763 else
17764 ADA_TRACE=FALSE
17765 fi
17766
17767 echo "$as_me:17767: checking if we want to use GNAT projects" >&5
17768 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17769
17770 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17771 if test "${enable_gnat_projects+set}" = set; then
17772 enableval="$enable_gnat_projects"
17773 test "$enableval" != no && enableval=yes
17774 if test "$enableval" != "yes" ; then
17775 enable_gnat_projects=no
17776 else
17777 enable_gnat_projects=yes
17778 fi
17779 else
17780 enableval=yes
17781 enable_gnat_projects=yes
17782
17783 fi;
17784 echo "$as_me:17784: result: $enable_gnat_projects" >&5
17785 echo "${ECHO_T}$enable_gnat_projects" >&6
17786
17787 ### Checks for libraries.
17788 case $cf_cv_system_name in
17789 (*mingw32*)
17790
17791 echo "$as_me:17791: checking if ssp library is needed" >&5
17792 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
17793 if test "${cf_cv_need_libssp+set}" = set; then
17794 echo $ECHO_N "(cached) $ECHO_C" >&6
17795 else
17796
17797 cat >"conftest.$ac_ext" <<_ACEOF
17798 #line 17798 "configure"
17799 #include "confdefs.h"
17800
17801 #include <sys/types.h>
17802 #include <dirent.h>
17803
17804 int
17805 main (void)
17806 {
17807
17808 DIR *dp = opendir(".");
17809
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 cf_cv_need_libssp=no
17827 else
17828 echo "$as_me: failed program was:" >&5
17829 cat "conftest.$ac_ext" >&5
17830
17831 cf_save_LIBS="$LIBS"
17832 LIBS="$LIBS -lssp"
17833 cat >"conftest.$ac_ext" <<_ACEOF
17834 #line 17834 "configure"
17835 #include "confdefs.h"
17836
17837 #include <sys/types.h>
17838 #include <dirent.h>
17839
17840 int
17841 main (void)
17842 {
17843
17844 DIR *dp = opendir(".");
17845
17846 ;
17847 return 0;
17848 }
17849 _ACEOF
17850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17851 if { (eval echo "$as_me:17851: \"$ac_link\"") >&5
17852 (eval $ac_link) 2>&5
17853 ac_status=$?
17854 echo "$as_me:17854: \$? = $ac_status" >&5
17855 (exit "$ac_status"); } &&
17856 { ac_try='test -s "conftest$ac_exeext"'
17857 { (eval echo "$as_me:17857: \"$ac_try\"") >&5
17858 (eval $ac_try) 2>&5
17859 ac_status=$?
17860 echo "$as_me:17860: \$? = $ac_status" >&5
17861 (exit "$ac_status"); }; }; then
17862 cf_cv_need_libssp=yes
17863 else
17864 echo "$as_me: failed program was:" >&5
17865 cat "conftest.$ac_ext" >&5
17866 cf_cv_need_libssp=maybe
17867 fi
17868 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17869 LIBS="$cf_save_LIBS"
17870
17871 fi
17872 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17873 fi
17874 echo "$as_me:17874: result: $cf_cv_need_libssp" >&5
17875 echo "${ECHO_T}$cf_cv_need_libssp" >&6
17876
17877 if test "x$cf_cv_need_libssp" = xyes
17878 then
17879
17880 cf_add_libs="$LIBS"
17881 # reverse order
17882 cf_add_0lib=
17883 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17884 # filter duplicates
17885 for cf_add_1lib in $cf_add_0lib; do
17886 for cf_add_2lib in $cf_add_libs; do
17887 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17888 cf_add_1lib=
17889 break
17890 fi
17891 done
17892 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17893 done
17894 LIBS="$cf_add_libs"
17895
17896 fi
17897
17898 ;;
17899 (*)
17900
17901 cf_save_libs="$LIBS"
17902 echo "$as_me:17902: checking for clock_gettime" >&5
17903 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
17904 if test "${ac_cv_func_clock_gettime+set}" = set; then
17905 echo $ECHO_N "(cached) $ECHO_C" >&6
17906 else
17907 cat >"conftest.$ac_ext" <<_ACEOF
17908 #line 17908 "configure"
17909 #include "confdefs.h"
17910 #define clock_gettime autoconf_temporary
17911 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17912 #undef clock_gettime
17913
17914 #ifdef __cplusplus
17915 extern "C"
17916 #endif
17917
17918 /* We use char because int might match the return type of a gcc2
17919 builtin and then its argument prototype would still apply. */
17920 char clock_gettime (void);
17921
17922 int
17923 main (void)
17924 {
17925
17926 /* The GNU C library defines stubs for functions which it implements
17927 to always fail with ENOSYS. Some functions are actually named
17928 something starting with __ and the normal name is an alias. */
17929 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
17930 #error found stub for clock_gettime
17931 #endif
17932
17933 return clock_gettime ();
17934 ;
17935 return 0;
17936 }
17937 _ACEOF
17938 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17939 if { (eval echo "$as_me:17939: \"$ac_link\"") >&5
17940 (eval $ac_link) 2>&5
17941 ac_status=$?
17942 echo "$as_me:17942: \$? = $ac_status" >&5
17943 (exit "$ac_status"); } &&
17944 { ac_try='test -s "conftest$ac_exeext"'
17945 { (eval echo "$as_me:17945: \"$ac_try\"") >&5
17946 (eval $ac_try) 2>&5
17947 ac_status=$?
17948 echo "$as_me:17948: \$? = $ac_status" >&5
17949 (exit "$ac_status"); }; }; then
17950 ac_cv_func_clock_gettime=yes
17951 else
17952 echo "$as_me: failed program was:" >&5
17953 cat "conftest.$ac_ext" >&5
17954 ac_cv_func_clock_gettime=no
17955 fi
17956 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17957 fi
17958 echo "$as_me:17958: result: $ac_cv_func_clock_gettime" >&5
17959 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
17960 if test "$ac_cv_func_clock_gettime" = yes; then
17961 cf_cv_test_clock_gettime=yes
17962 else
17963 echo "$as_me:17963: checking for clock_gettime in -lrt" >&5
17964 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
17965 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
17966 echo $ECHO_N "(cached) $ECHO_C" >&6
17967 else
17968 ac_check_lib_save_LIBS=$LIBS
17969 LIBS="-lrt $LIBS"
17970 cat >"conftest.$ac_ext" <<_ACEOF
17971 #line 17971 "configure"
17972 #include "confdefs.h"
17973
17974 /* Override any gcc2 internal prototype to avoid an error. */
17975 #ifdef __cplusplus
17976 extern "C"
17977 #endif
17978 /* We use char because int might match the return type of a gcc2
17979 builtin and then its argument prototype would still apply. */
17980 char clock_gettime (void);
17981 int
17982 main (void)
17983 {
17984 clock_gettime ();
17985 ;
17986 return 0;
17987 }
17988 _ACEOF
17989 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17990 if { (eval echo "$as_me:17990: \"$ac_link\"") >&5
17991 (eval $ac_link) 2>&5
17992 ac_status=$?
17993 echo "$as_me:17993: \$? = $ac_status" >&5
17994 (exit "$ac_status"); } &&
17995 { ac_try='test -s "conftest$ac_exeext"'
17996 { (eval echo "$as_me:17996: \"$ac_try\"") >&5
17997 (eval $ac_try) 2>&5
17998 ac_status=$?
17999 echo "$as_me:17999: \$? = $ac_status" >&5
18000 (exit "$ac_status"); }; }; then
18001 ac_cv_lib_rt_clock_gettime=yes
18002 else
18003 echo "$as_me: failed program was:" >&5
18004 cat "conftest.$ac_ext" >&5
18005 ac_cv_lib_rt_clock_gettime=no
18006 fi
18007 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18008 LIBS=$ac_check_lib_save_LIBS
18009 fi
18010 echo "$as_me:18010: result: $ac_cv_lib_rt_clock_gettime" >&5
18011 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
18012 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
18013 LIBS="-lrt $LIBS"
18014 cf_cv_test_clock_gettime=yes
18015 else
18016 cf_cv_test_clock_gettime=no
18017 fi
18018
18019 fi
18020
18021 if test "$cf_cv_test_clock_gettime" = yes ; then
18022 echo "$as_me:18022: checking if clock_gettime links" >&5
18023 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
18024 if test "${cf_cv_func_clock_gettime+set}" = set; then
18025 echo $ECHO_N "(cached) $ECHO_C" >&6
18026 else
18027
18028 cat >"conftest.$ac_ext" <<_ACEOF
18029 #line 18029 "configure"
18030 #include "confdefs.h"
18031
18032 $ac_includes_default
18033 #include <time.h>
18034
18035 int
18036 main (void)
18037 {
18038 struct timespec ts;
18039 int rc = clock_gettime(CLOCK_REALTIME, &ts)
18040 + clock_gettime(CLOCK_MONOTONIC, &ts);
18041 (void) rc; (void)ts
18042 ;
18043 return 0;
18044 }
18045 _ACEOF
18046 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18047 if { (eval echo "$as_me:18047: \"$ac_link\"") >&5
18048 (eval $ac_link) 2>&5
18049 ac_status=$?
18050 echo "$as_me:18050: \$? = $ac_status" >&5
18051 (exit "$ac_status"); } &&
18052 { ac_try='test -s "conftest$ac_exeext"'
18053 { (eval echo "$as_me:18053: \"$ac_try\"") >&5
18054 (eval $ac_try) 2>&5
18055 ac_status=$?
18056 echo "$as_me:18056: \$? = $ac_status" >&5
18057 (exit "$ac_status"); }; }; then
18058 cf_cv_func_clock_gettime=yes
18059 else
18060 echo "$as_me: failed program was:" >&5
18061 cat "conftest.$ac_ext" >&5
18062 cf_cv_func_clock_gettime=no
18063 fi
18064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18065
18066 fi
18067 echo "$as_me:18067: result: $cf_cv_func_clock_gettime" >&5
18068 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
18069 else
18070 cf_cv_func_clock_gettime=no
18071 fi
18072
18073 if test "$cf_cv_func_clock_gettime" = yes
18074 then
18075
18076 cat >>confdefs.h <<\EOF
18077 #define HAVE_CLOCK_GETTIME 1
18078 EOF
18079
18080 else
18081 echo "$as_me:18081: checking for gettimeofday" >&5
18082 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18083 if test "${ac_cv_func_gettimeofday+set}" = set; then
18084 echo $ECHO_N "(cached) $ECHO_C" >&6
18085 else
18086 cat >"conftest.$ac_ext" <<_ACEOF
18087 #line 18087 "configure"
18088 #include "confdefs.h"
18089 #define gettimeofday autoconf_temporary
18090 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18091 #undef gettimeofday
18092
18093 #ifdef __cplusplus
18094 extern "C"
18095 #endif
18096
18097 /* We use char because int might match the return type of a gcc2
18098 builtin and then its argument prototype would still apply. */
18099 char gettimeofday (void);
18100
18101 int
18102 main (void)
18103 {
18104
18105 /* The GNU C library defines stubs for functions which it implements
18106 to always fail with ENOSYS. Some functions are actually named
18107 something starting with __ and the normal name is an alias. */
18108 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18109 #error found stub for gettimeofday
18110 #endif
18111
18112 return gettimeofday ();
18113 ;
18114 return 0;
18115 }
18116 _ACEOF
18117 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18118 if { (eval echo "$as_me:18118: \"$ac_link\"") >&5
18119 (eval $ac_link) 2>&5
18120 ac_status=$?
18121 echo "$as_me:18121: \$? = $ac_status" >&5
18122 (exit "$ac_status"); } &&
18123 { ac_try='test -s "conftest$ac_exeext"'
18124 { (eval echo "$as_me:18124: \"$ac_try\"") >&5
18125 (eval $ac_try) 2>&5
18126 ac_status=$?
18127 echo "$as_me:18127: \$? = $ac_status" >&5
18128 (exit "$ac_status"); }; }; then
18129 ac_cv_func_gettimeofday=yes
18130 else
18131 echo "$as_me: failed program was:" >&5
18132 cat "conftest.$ac_ext" >&5
18133 ac_cv_func_gettimeofday=no
18134 fi
18135 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18136 fi
18137 echo "$as_me:18137: result: $ac_cv_func_gettimeofday" >&5
18138 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18139 if test "$ac_cv_func_gettimeofday" = yes; then
18140
18141 cat >>confdefs.h <<\EOF
18142 #define HAVE_GETTIMEOFDAY 1
18143 EOF
18144
18145 else
18146
18147 echo "$as_me:18147: checking for gettimeofday in -lbsd" >&5
18148 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18149 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18150 echo $ECHO_N "(cached) $ECHO_C" >&6
18151 else
18152 ac_check_lib_save_LIBS=$LIBS
18153 LIBS="-lbsd $LIBS"
18154 cat >"conftest.$ac_ext" <<_ACEOF
18155 #line 18155 "configure"
18156 #include "confdefs.h"
18157
18158 /* Override any gcc2 internal prototype to avoid an error. */
18159 #ifdef __cplusplus
18160 extern "C"
18161 #endif
18162 /* We use char because int might match the return type of a gcc2
18163 builtin and then its argument prototype would still apply. */
18164 char gettimeofday (void);
18165 int
18166 main (void)
18167 {
18168 gettimeofday ();
18169 ;
18170 return 0;
18171 }
18172 _ACEOF
18173 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18174 if { (eval echo "$as_me:18174: \"$ac_link\"") >&5
18175 (eval $ac_link) 2>&5
18176 ac_status=$?
18177 echo "$as_me:18177: \$? = $ac_status" >&5
18178 (exit "$ac_status"); } &&
18179 { ac_try='test -s "conftest$ac_exeext"'
18180 { (eval echo "$as_me:18180: \"$ac_try\"") >&5
18181 (eval $ac_try) 2>&5
18182 ac_status=$?
18183 echo "$as_me:18183: \$? = $ac_status" >&5
18184 (exit "$ac_status"); }; }; then
18185 ac_cv_lib_bsd_gettimeofday=yes
18186 else
18187 echo "$as_me: failed program was:" >&5
18188 cat "conftest.$ac_ext" >&5
18189 ac_cv_lib_bsd_gettimeofday=no
18190 fi
18191 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18192 LIBS=$ac_check_lib_save_LIBS
18193 fi
18194 echo "$as_me:18194: result: $ac_cv_lib_bsd_gettimeofday" >&5
18195 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18196 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18197
18198 cat >>confdefs.h <<\EOF
18199 #define HAVE_GETTIMEOFDAY 1
18200 EOF
18201
18202 cf_add_libs="$LIBS"
18203 # reverse order
18204 cf_add_0lib=
18205 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18206 # filter duplicates
18207 for cf_add_1lib in $cf_add_0lib; do
18208 for cf_add_2lib in $cf_add_libs; do
18209 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18210 cf_add_1lib=
18211 break
18212 fi
18213 done
18214 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18215 done
18216 LIBS="$cf_add_libs"
18217
18218 fi
18219
18220 fi
18221 fi
18222
18223 ;;
18224 esac
18225
18226 ### Checks for header files.
18227 echo "$as_me:18227: checking for signed char" >&5
18228 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
18229 if test "${ac_cv_type_signed_char+set}" = set; then
18230 echo $ECHO_N "(cached) $ECHO_C" >&6
18231 else
18232 cat >"conftest.$ac_ext" <<_ACEOF
18233 #line 18233 "configure"
18234 #include "confdefs.h"
18235 $ac_includes_default
18236 int
18237 main (void)
18238 {
18239 if ((signed char *) 0)
18240 return 0;
18241 if (sizeof (signed char))
18242 return 0;
18243 ;
18244 return 0;
18245 }
18246 _ACEOF
18247 rm -f "conftest.$ac_objext"
18248 if { (eval echo "$as_me:18248: \"$ac_compile\"") >&5
18249 (eval $ac_compile) 2>&5
18250 ac_status=$?
18251 echo "$as_me:18251: \$? = $ac_status" >&5
18252 (exit "$ac_status"); } &&
18253 { ac_try='test -s "conftest.$ac_objext"'
18254 { (eval echo "$as_me:18254: \"$ac_try\"") >&5
18255 (eval $ac_try) 2>&5
18256 ac_status=$?
18257 echo "$as_me:18257: \$? = $ac_status" >&5
18258 (exit "$ac_status"); }; }; then
18259 ac_cv_type_signed_char=yes
18260 else
18261 echo "$as_me: failed program was:" >&5
18262 cat "conftest.$ac_ext" >&5
18263 ac_cv_type_signed_char=no
18264 fi
18265 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18266 fi
18267 echo "$as_me:18267: result: $ac_cv_type_signed_char" >&5
18268 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
18269
18270 echo "$as_me:18270: checking size of signed char" >&5
18271 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
18272 if test "${ac_cv_sizeof_signed_char+set}" = set; then
18273 echo $ECHO_N "(cached) $ECHO_C" >&6
18274 else
18275 if test "$ac_cv_type_signed_char" = yes; then
18276 if test "$cross_compiling" = yes; then
18277 # Depending upon the size, compute the lo and hi bounds.
18278 cat >"conftest.$ac_ext" <<_ACEOF
18279 #line 18279 "configure"
18280 #include "confdefs.h"
18281 $ac_includes_default
18282 int
18283 main (void)
18284 {
18285 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
18286 ;
18287 return 0;
18288 }
18289 _ACEOF
18290 rm -f "conftest.$ac_objext"
18291 if { (eval echo "$as_me:18291: \"$ac_compile\"") >&5
18292 (eval $ac_compile) 2>&5
18293 ac_status=$?
18294 echo "$as_me:18294: \$? = $ac_status" >&5
18295 (exit "$ac_status"); } &&
18296 { ac_try='test -s "conftest.$ac_objext"'
18297 { (eval echo "$as_me:18297: \"$ac_try\"") >&5
18298 (eval $ac_try) 2>&5
18299 ac_status=$?
18300 echo "$as_me:18300: \$? = $ac_status" >&5
18301 (exit "$ac_status"); }; }; then
18302 ac_lo=0 ac_mid=0
18303 while :; do
18304 cat >"conftest.$ac_ext" <<_ACEOF
18305 #line 18305 "configure"
18306 #include "confdefs.h"
18307 $ac_includes_default
18308 int
18309 main (void)
18310 {
18311 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
18312 ;
18313 return 0;
18314 }
18315 _ACEOF
18316 rm -f "conftest.$ac_objext"
18317 if { (eval echo "$as_me:18317: \"$ac_compile\"") >&5
18318 (eval $ac_compile) 2>&5
18319 ac_status=$?
18320 echo "$as_me:18320: \$? = $ac_status" >&5
18321 (exit "$ac_status"); } &&
18322 { ac_try='test -s "conftest.$ac_objext"'
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 ac_hi=$ac_mid; break
18329 else
18330 echo "$as_me: failed program was:" >&5
18331 cat "conftest.$ac_ext" >&5
18332 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
18333 fi
18334 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18335 done
18336 else
18337 echo "$as_me: failed program was:" >&5
18338 cat "conftest.$ac_ext" >&5
18339 ac_hi=-1 ac_mid=-1
18340 while :; do
18341 cat >"conftest.$ac_ext" <<_ACEOF
18342 #line 18342 "configure"
18343 #include "confdefs.h"
18344 $ac_includes_default
18345 int
18346 main (void)
18347 {
18348 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
18349 ;
18350 return 0;
18351 }
18352 _ACEOF
18353 rm -f "conftest.$ac_objext"
18354 if { (eval echo "$as_me:18354: \"$ac_compile\"") >&5
18355 (eval $ac_compile) 2>&5
18356 ac_status=$?
18357 echo "$as_me:18357: \$? = $ac_status" >&5
18358 (exit "$ac_status"); } &&
18359 { ac_try='test -s "conftest.$ac_objext"'
18360 { (eval echo "$as_me:18360: \"$ac_try\"") >&5
18361 (eval $ac_try) 2>&5
18362 ac_status=$?
18363 echo "$as_me:18363: \$? = $ac_status" >&5
18364 (exit "$ac_status"); }; }; then
18365 ac_lo=$ac_mid; break
18366 else
18367 echo "$as_me: failed program was:" >&5
18368 cat "conftest.$ac_ext" >&5
18369 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
18370 fi
18371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18372 done
18373 fi
18374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18375 # Binary search between lo and hi bounds.
18376 while test "x$ac_lo" != "x$ac_hi"; do
18377 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
18378 cat >"conftest.$ac_ext" <<_ACEOF
18379 #line 18379 "configure"
18380 #include "confdefs.h"
18381 $ac_includes_default
18382 int
18383 main (void)
18384 {
18385 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
18386 ;
18387 return 0;
18388 }
18389 _ACEOF
18390 rm -f "conftest.$ac_objext"
18391 if { (eval echo "$as_me:18391: \"$ac_compile\"") >&5
18392 (eval $ac_compile) 2>&5
18393 ac_status=$?
18394 echo "$as_me:18394: \$? = $ac_status" >&5
18395 (exit "$ac_status"); } &&
18396 { ac_try='test -s "conftest.$ac_objext"'
18397 { (eval echo "$as_me:18397: \"$ac_try\"") >&5
18398 (eval $ac_try) 2>&5
18399 ac_status=$?
18400 echo "$as_me:18400: \$? = $ac_status" >&5
18401 (exit "$ac_status"); }; }; then
18402 ac_hi=$ac_mid
18403 else
18404 echo "$as_me: failed program was:" >&5
18405 cat "conftest.$ac_ext" >&5
18406 ac_lo=`expr "$ac_mid" + 1`
18407 fi
18408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18409 done
18410 ac_cv_sizeof_signed_char=$ac_lo
18411 else
18412 if test "$cross_compiling" = yes; then
18413 { { echo "$as_me:18413: error: cannot run test program while cross compiling" >&5
18414 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18415 { (exit 1); exit 1; }; }
18416 else
18417 cat >"conftest.$ac_ext" <<_ACEOF
18418 #line 18418 "configure"
18419 #include "confdefs.h"
18420 $ac_includes_default
18421 int
18422 main (void)
18423 {
18424 FILE *f = fopen ("conftest.val", "w");
18425 if (!f)
18426 $ac_main_return (1);
18427 fprintf (f, "%ld", (long)(sizeof (signed char)));
18428 fclose (f);
18429 ;
18430 return 0;
18431 }
18432 _ACEOF
18433 rm -f "conftest$ac_exeext"
18434 if { (eval echo "$as_me:18434: \"$ac_link\"") >&5
18435 (eval $ac_link) 2>&5
18436 ac_status=$?
18437 echo "$as_me:18437: \$? = $ac_status" >&5
18438 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18439 { (eval echo "$as_me:18439: \"$ac_try\"") >&5
18440 (eval $ac_try) 2>&5
18441 ac_status=$?
18442 echo "$as_me:18442: \$? = $ac_status" >&5
18443 (exit "$ac_status"); }; }; then
18444 ac_cv_sizeof_signed_char=`cat conftest.val`
18445 else
18446 echo "$as_me: program exited with status $ac_status" >&5
18447 echo "$as_me: failed program was:" >&5
18448 cat "conftest.$ac_ext" >&5
18449 fi
18450 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18451 fi
18452 fi
18453 rm -f conftest.val
18454 else
18455 ac_cv_sizeof_signed_char=0
18456 fi
18457 fi
18458 echo "$as_me:18458: result: $ac_cv_sizeof_signed_char" >&5
18459 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
18460 cat >>confdefs.h <<EOF
18461 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
18462 EOF
18463
18464 ac_header_dirent=no
18465 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18466 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18467 echo "$as_me:18467: checking for $ac_hdr that defines DIR" >&5
18468 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18469 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18470 echo $ECHO_N "(cached) $ECHO_C" >&6
18471 else
18472 cat >"conftest.$ac_ext" <<_ACEOF
18473 #line 18473 "configure"
18474 #include "confdefs.h"
18475 #include <sys/types.h>
18476 #include <$ac_hdr>
18477
18478 int
18479 main (void)
18480 {
18481 if ((DIR *) 0)
18482 return 0;
18483 ;
18484 return 0;
18485 }
18486 _ACEOF
18487 rm -f "conftest.$ac_objext"
18488 if { (eval echo "$as_me:18488: \"$ac_compile\"") >&5
18489 (eval $ac_compile) 2>&5
18490 ac_status=$?
18491 echo "$as_me:18491: \$? = $ac_status" >&5
18492 (exit "$ac_status"); } &&
18493 { ac_try='test -s "conftest.$ac_objext"'
18494 { (eval echo "$as_me:18494: \"$ac_try\"") >&5
18495 (eval $ac_try) 2>&5
18496 ac_status=$?
18497 echo "$as_me:18497: \$? = $ac_status" >&5
18498 (exit "$ac_status"); }; }; then
18499 eval "$as_ac_Header=yes"
18500 else
18501 echo "$as_me: failed program was:" >&5
18502 cat "conftest.$ac_ext" >&5
18503 eval "$as_ac_Header=no"
18504 fi
18505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18506 fi
18507 echo "$as_me:18507: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18508 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18509 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18510 cat >>confdefs.h <<EOF
18511 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18512 EOF
18513
18514 ac_header_dirent=$ac_hdr; break
18515 fi
18516
18517 done
18518 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18519 if test $ac_header_dirent = dirent.h; then
18520 echo "$as_me:18520: checking for opendir in -ldir" >&5
18521 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18522 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18523 echo $ECHO_N "(cached) $ECHO_C" >&6
18524 else
18525 ac_check_lib_save_LIBS=$LIBS
18526 LIBS="-ldir $LIBS"
18527 cat >"conftest.$ac_ext" <<_ACEOF
18528 #line 18528 "configure"
18529 #include "confdefs.h"
18530
18531 /* Override any gcc2 internal prototype to avoid an error. */
18532 #ifdef __cplusplus
18533 extern "C"
18534 #endif
18535 /* We use char because int might match the return type of a gcc2
18536 builtin and then its argument prototype would still apply. */
18537 char opendir (void);
18538 int
18539 main (void)
18540 {
18541 opendir ();
18542 ;
18543 return 0;
18544 }
18545 _ACEOF
18546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18547 if { (eval echo "$as_me:18547: \"$ac_link\"") >&5
18548 (eval $ac_link) 2>&5
18549 ac_status=$?
18550 echo "$as_me:18550: \$? = $ac_status" >&5
18551 (exit "$ac_status"); } &&
18552 { ac_try='test -s "conftest$ac_exeext"'
18553 { (eval echo "$as_me:18553: \"$ac_try\"") >&5
18554 (eval $ac_try) 2>&5
18555 ac_status=$?
18556 echo "$as_me:18556: \$? = $ac_status" >&5
18557 (exit "$ac_status"); }; }; then
18558 ac_cv_lib_dir_opendir=yes
18559 else
18560 echo "$as_me: failed program was:" >&5
18561 cat "conftest.$ac_ext" >&5
18562 ac_cv_lib_dir_opendir=no
18563 fi
18564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18565 LIBS=$ac_check_lib_save_LIBS
18566 fi
18567 echo "$as_me:18567: result: $ac_cv_lib_dir_opendir" >&5
18568 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18569 if test "$ac_cv_lib_dir_opendir" = yes; then
18570 LIBS="$LIBS -ldir"
18571 fi
18572
18573 else
18574 echo "$as_me:18574: checking for opendir in -lx" >&5
18575 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18576 if test "${ac_cv_lib_x_opendir+set}" = set; then
18577 echo $ECHO_N "(cached) $ECHO_C" >&6
18578 else
18579 ac_check_lib_save_LIBS=$LIBS
18580 LIBS="-lx $LIBS"
18581 cat >"conftest.$ac_ext" <<_ACEOF
18582 #line 18582 "configure"
18583 #include "confdefs.h"
18584
18585 /* Override any gcc2 internal prototype to avoid an error. */
18586 #ifdef __cplusplus
18587 extern "C"
18588 #endif
18589 /* We use char because int might match the return type of a gcc2
18590 builtin and then its argument prototype would still apply. */
18591 char opendir (void);
18592 int
18593 main (void)
18594 {
18595 opendir ();
18596 ;
18597 return 0;
18598 }
18599 _ACEOF
18600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18601 if { (eval echo "$as_me:18601: \"$ac_link\"") >&5
18602 (eval $ac_link) 2>&5
18603 ac_status=$?
18604 echo "$as_me:18604: \$? = $ac_status" >&5
18605 (exit "$ac_status"); } &&
18606 { ac_try='test -s "conftest$ac_exeext"'
18607 { (eval echo "$as_me:18607: \"$ac_try\"") >&5
18608 (eval $ac_try) 2>&5
18609 ac_status=$?
18610 echo "$as_me:18610: \$? = $ac_status" >&5
18611 (exit "$ac_status"); }; }; then
18612 ac_cv_lib_x_opendir=yes
18613 else
18614 echo "$as_me: failed program was:" >&5
18615 cat "conftest.$ac_ext" >&5
18616 ac_cv_lib_x_opendir=no
18617 fi
18618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18619 LIBS=$ac_check_lib_save_LIBS
18620 fi
18621 echo "$as_me:18621: result: $ac_cv_lib_x_opendir" >&5
18622 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18623 if test "$ac_cv_lib_x_opendir" = yes; then
18624 LIBS="$LIBS -lx"
18625 fi
18626
18627 fi
18628
18629 echo "$as_me:18629: checking whether time.h and sys/time.h may both be included" >&5
18630 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18631 if test "${ac_cv_header_time+set}" = set; then
18632 echo $ECHO_N "(cached) $ECHO_C" >&6
18633 else
18634 cat >"conftest.$ac_ext" <<_ACEOF
18635 #line 18635 "configure"
18636 #include "confdefs.h"
18637 #include <sys/types.h>
18638 #include <sys/time.h>
18639 #include <time.h>
18640
18641 int
18642 main (void)
18643 {
18644 if ((struct tm *) 0)
18645 return 0;
18646 ;
18647 return 0;
18648 }
18649 _ACEOF
18650 rm -f "conftest.$ac_objext"
18651 if { (eval echo "$as_me:18651: \"$ac_compile\"") >&5
18652 (eval $ac_compile) 2>&5
18653 ac_status=$?
18654 echo "$as_me:18654: \$? = $ac_status" >&5
18655 (exit "$ac_status"); } &&
18656 { ac_try='test -s "conftest.$ac_objext"'
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 ac_cv_header_time=yes
18663 else
18664 echo "$as_me: failed program was:" >&5
18665 cat "conftest.$ac_ext" >&5
18666 ac_cv_header_time=no
18667 fi
18668 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18669 fi
18670 echo "$as_me:18670: result: $ac_cv_header_time" >&5
18671 echo "${ECHO_T}$ac_cv_header_time" >&6
18672 if test $ac_cv_header_time = yes; then
18673
18674 cat >>confdefs.h <<\EOF
18675 #define TIME_WITH_SYS_TIME 1
18676 EOF
18677
18678 fi
18679
18680 ### checks for compiler characteristics
18681 ac_ext=c
18682 ac_cpp='$CPP $CPPFLAGS'
18683 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18684 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18685 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18686 ac_main_return="return"
18687
18688 echo "$as_me:18688: checking for an ANSI C-conforming const" >&5
18689 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
18690 if test "${ac_cv_c_const+set}" = set; then
18691 echo $ECHO_N "(cached) $ECHO_C" >&6
18692 else
18693 cat >"conftest.$ac_ext" <<_ACEOF
18694 #line 18694 "configure"
18695 #include "confdefs.h"
18696
18697 int
18698 main (void)
18699 {
18700 /* FIXME: Include the comments suggested by Paul. */
18701 #ifndef __cplusplus
18702 /* Ultrix mips cc rejects this. */
18703 typedef int charset[2];
18704 const charset x;
18705 /* SunOS 4.1.1 cc rejects this. */
18706 char const *const *ccp;
18707 char **p;
18708 /* NEC SVR4.0.2 mips cc rejects this. */
18709 struct point {int x, y;};
18710 static struct point const zero = {0,0};
18711 /* AIX XL C 1.02.0.0 rejects this.
18712 It does not let you subtract one const X* pointer from another in
18713 an arm of an if-expression whose if-part is not a constant
18714 expression */
18715 const char *g = "string";
18716 ccp = &g + (g ? g-g : 0);
18717 /* HPUX 7.0 cc rejects these. */
18718 ++ccp;
18719 p = (char**) ccp;
18720 ccp = (char const *const *) p;
18721 { /* SCO 3.2v4 cc rejects this. */
18722 char *t;
18723 char const *s = 0 ? (char *) 0 : (char const *) 0;
18724
18725 *t++ = 0;
18726 (void)s; (void)x; (void)zero;
18727 }
18728 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
18729 int x[] = {25, 17};
18730 const int *foo = &x[0];
18731 ++foo;
18732 (void)foo;
18733 }
18734 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18735 typedef const int *iptr;
18736 iptr p = 0;
18737 ++p;
18738 (void)p;
18739 }
18740 { /* AIX XL C 1.02.0.0 rejects this saying
18741 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18742 struct s { int j; const int *ap[3]; };
18743 struct s *b; b->j = 5;
18744 }
18745 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18746 const int foo = 10;
18747 (void)foo;
18748 }
18749 #endif
18750
18751 ;
18752 return 0;
18753 }
18754 _ACEOF
18755 rm -f "conftest.$ac_objext"
18756 if { (eval echo "$as_me:18756: \"$ac_compile\"") >&5
18757 (eval $ac_compile) 2>&5
18758 ac_status=$?
18759 echo "$as_me:18759: \$? = $ac_status" >&5
18760 (exit "$ac_status"); } &&
18761 { ac_try='test -s "conftest.$ac_objext"'
18762 { (eval echo "$as_me:18762: \"$ac_try\"") >&5
18763 (eval $ac_try) 2>&5
18764 ac_status=$?
18765 echo "$as_me:18765: \$? = $ac_status" >&5
18766 (exit "$ac_status"); }; }; then
18767 ac_cv_c_const=yes
18768 else
18769 echo "$as_me: failed program was:" >&5
18770 cat "conftest.$ac_ext" >&5
18771 ac_cv_c_const=no
18772 fi
18773 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18774 fi
18775 echo "$as_me:18775: result: $ac_cv_c_const" >&5
18776 echo "${ECHO_T}$ac_cv_c_const" >&6
18777 if test $ac_cv_c_const = no; then
18778
18779 cat >>confdefs.h <<\EOF
18780 #define const
18781 EOF
18782
18783 fi
18784
18785 ### Checks for external-data
18786
18787 echo "$as_me:18787: checking if data-only library module links" >&5
18788 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18789 if test "${cf_cv_link_dataonly+set}" = set; then
18790 echo $ECHO_N "(cached) $ECHO_C" >&6
18791 else
18792
18793 rm -f conftest.a
18794 cat >conftest.$ac_ext <<EOF
18795 #line 18795 "configure"
18796 int testdata[3] = { 123, 456, 789 };
18797 EOF
18798 if { (eval echo "$as_me:18798: \"$ac_compile\"") >&5
18799 (eval $ac_compile) 2>&5
18800 ac_status=$?
18801 echo "$as_me:18801: \$? = $ac_status" >&5
18802 (exit "$ac_status"); } ; then
18803 mv conftest.$OBJEXT data.$OBJEXT && \
18804 ( $AR $ARFLAGS conftest.a data.$OBJEXT ) 2>&5 1>/dev/null
18805 fi
18806 rm -f conftest.$ac_ext data.$OBJEXT
18807 cat >conftest.$ac_ext <<EOF
18808 #line 18808 "configure"
18809 extern int testfunc(void);
18810 #if defined(NeXT)
18811 int testfunc(void)
18812 {
18813 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
18814 }
18815 #else
18816 extern int testdata[3];
18817 int testfunc(void)
18818 {
18819 return testdata[0] == 123
18820 && testdata[1] == 456
18821 && testdata[2] == 789;
18822 }
18823 #endif
18824 EOF
18825 if { (eval echo "$as_me:18825: \"$ac_compile\"") >&5
18826 (eval $ac_compile) 2>&5
18827 ac_status=$?
18828 echo "$as_me:18828: \$? = $ac_status" >&5
18829 (exit "$ac_status"); }; then
18830 mv conftest.$OBJEXT func.$OBJEXT && \
18831 ( $AR $ARFLAGS conftest.a func.$OBJEXT ) 2>&5 1>/dev/null
18832 fi
18833 rm -f conftest.$ac_ext func.$OBJEXT
18834 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18835 cf_saveLIBS="$LIBS"
18836 LIBS="conftest.a $LIBS"
18837 if test "$cross_compiling" = yes; then
18838 cf_cv_link_dataonly=unknown
18839 else
18840 cat >"conftest.$ac_ext" <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843
18844 extern int testfunc(void);
18845 int main(void)
18846 {
18847 ${cf_cv_main_return:-return} (!testfunc());
18848 }
18849
18850 _ACEOF
18851 rm -f "conftest$ac_exeext"
18852 if { (eval echo "$as_me:18852: \"$ac_link\"") >&5
18853 (eval $ac_link) 2>&5
18854 ac_status=$?
18855 echo "$as_me:18855: \$? = $ac_status" >&5
18856 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18857 { (eval echo "$as_me:18857: \"$ac_try\"") >&5
18858 (eval $ac_try) 2>&5
18859 ac_status=$?
18860 echo "$as_me:18860: \$? = $ac_status" >&5
18861 (exit "$ac_status"); }; }; then
18862 cf_cv_link_dataonly=yes
18863 else
18864 echo "$as_me: program exited with status $ac_status" >&5
18865 echo "$as_me: failed program was:" >&5
18866 cat "conftest.$ac_ext" >&5
18867 cf_cv_link_dataonly=no
18868 fi
18869 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18870 fi
18871 LIBS="$cf_saveLIBS"
18872
18873 fi
18874
18875 echo "$as_me:18875: result: $cf_cv_link_dataonly" >&5
18876 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18877
18878 if test "$cf_cv_link_dataonly" = no ; then
18879
18880 cat >>confdefs.h <<\EOF
18881 #define BROKEN_LINKER 1
18882 EOF
18883
18884 BROKEN_LINKER=1
18885 fi
18886
18887 ### Checks for library functions.
18888
18889 for ac_header in \
18890 unistd.h \
18891
18892 do
18893 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18894 echo "$as_me:18894: checking for $ac_header" >&5
18895 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18896 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18897 echo $ECHO_N "(cached) $ECHO_C" >&6
18898 else
18899 cat >"conftest.$ac_ext" <<_ACEOF
18900 #line 18900 "configure"
18901 #include "confdefs.h"
18902 #include <$ac_header>
18903 _ACEOF
18904 if { (eval echo "$as_me:18904: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18905 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18906 ac_status=$?
18907 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18908 rm -f conftest.er1
18909 cat conftest.err >&5
18910 echo "$as_me:18910: \$? = $ac_status" >&5
18911 (exit "$ac_status"); } >/dev/null; then
18912 if test -s conftest.err; then
18913 ac_cpp_err=$ac_c_preproc_warn_flag
18914 else
18915 ac_cpp_err=
18916 fi
18917 else
18918 ac_cpp_err=yes
18919 fi
18920 if test -z "$ac_cpp_err"; then
18921 eval "$as_ac_Header=yes"
18922 else
18923 echo "$as_me: failed program was:" >&5
18924 cat "conftest.$ac_ext" >&5
18925 eval "$as_ac_Header=no"
18926 fi
18927 rm -f conftest.err "conftest.$ac_ext"
18928 fi
18929 echo "$as_me:18929: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18930 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18931 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18932 cat >>confdefs.h <<EOF
18933 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18934 EOF
18935
18936 fi
18937 done
18938
18939 echo "$as_me:18939: checking for working mkstemp" >&5
18940 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18941 if test "${cf_cv_func_mkstemp+set}" = set; then
18942 echo $ECHO_N "(cached) $ECHO_C" >&6
18943 else
18944
18945 rm -rf ./conftest*
18946 if test "$cross_compiling" = yes; then
18947 cf_cv_func_mkstemp=maybe
18948 else
18949 cat >"conftest.$ac_ext" <<_ACEOF
18950 #line 18950 "configure"
18951 #include "confdefs.h"
18952
18953 $ac_includes_default
18954
18955 int main(void)
18956 {
18957 static char tmpl[] = "conftestXXXXXX";
18958 char name[2][80];
18959 int n;
18960 int result = 0;
18961 int fd;
18962 struct stat sb;
18963
18964 umask(077);
18965 for (n = 0; n < 2; ++n) {
18966 strcpy(name[n], tmpl);
18967 if ((fd = mkstemp(name[n])) >= 0) {
18968 if (!strcmp(name[n], tmpl)
18969 || stat(name[n], &sb) != 0
18970 || (sb.st_mode & S_IFMT) != S_IFREG
18971 || (sb.st_mode & 077) != 0) {
18972 result = 1;
18973 }
18974 close(fd);
18975 }
18976 }
18977 if (result == 0
18978 && !strcmp(name[0], name[1]))
18979 result = 1;
18980 ${cf_cv_main_return:-return}(result);
18981 }
18982
18983 _ACEOF
18984 rm -f "conftest$ac_exeext"
18985 if { (eval echo "$as_me:18985: \"$ac_link\"") >&5
18986 (eval $ac_link) 2>&5
18987 ac_status=$?
18988 echo "$as_me:18988: \$? = $ac_status" >&5
18989 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18990 { (eval echo "$as_me:18990: \"$ac_try\"") >&5
18991 (eval $ac_try) 2>&5
18992 ac_status=$?
18993 echo "$as_me:18993: \$? = $ac_status" >&5
18994 (exit "$ac_status"); }; }; then
18995 cf_cv_func_mkstemp=yes
18996
18997 else
18998 echo "$as_me: program exited with status $ac_status" >&5
18999 echo "$as_me: failed program was:" >&5
19000 cat "conftest.$ac_ext" >&5
19001 cf_cv_func_mkstemp=no
19002
19003 fi
19004 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19005 fi
19006
19007 fi
19008 echo "$as_me:19008: result: $cf_cv_func_mkstemp" >&5
19009 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19010 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19011 echo "$as_me:19011: checking for mkstemp" >&5
19012 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19013 if test "${ac_cv_func_mkstemp+set}" = set; then
19014 echo $ECHO_N "(cached) $ECHO_C" >&6
19015 else
19016 cat >"conftest.$ac_ext" <<_ACEOF
19017 #line 19017 "configure"
19018 #include "confdefs.h"
19019 #define mkstemp autoconf_temporary
19020 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19021 #undef mkstemp
19022
19023 #ifdef __cplusplus
19024 extern "C"
19025 #endif
19026
19027 /* We use char because int might match the return type of a gcc2
19028 builtin and then its argument prototype would still apply. */
19029 char mkstemp (void);
19030
19031 int
19032 main (void)
19033 {
19034
19035 /* The GNU C library defines stubs for functions which it implements
19036 to always fail with ENOSYS. Some functions are actually named
19037 something starting with __ and the normal name is an alias. */
19038 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19039 #error found stub for mkstemp
19040 #endif
19041
19042 return mkstemp ();
19043 ;
19044 return 0;
19045 }
19046 _ACEOF
19047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19048 if { (eval echo "$as_me:19048: \"$ac_link\"") >&5
19049 (eval $ac_link) 2>&5
19050 ac_status=$?
19051 echo "$as_me:19051: \$? = $ac_status" >&5
19052 (exit "$ac_status"); } &&
19053 { ac_try='test -s "conftest$ac_exeext"'
19054 { (eval echo "$as_me:19054: \"$ac_try\"") >&5
19055 (eval $ac_try) 2>&5
19056 ac_status=$?
19057 echo "$as_me:19057: \$? = $ac_status" >&5
19058 (exit "$ac_status"); }; }; then
19059 ac_cv_func_mkstemp=yes
19060 else
19061 echo "$as_me: failed program was:" >&5
19062 cat "conftest.$ac_ext" >&5
19063 ac_cv_func_mkstemp=no
19064 fi
19065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19066 fi
19067 echo "$as_me:19067: result: $ac_cv_func_mkstemp" >&5
19068 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19069
19070 fi
19071 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19072
19073 cat >>confdefs.h <<\EOF
19074 #define HAVE_MKSTEMP 1
19075 EOF
19076
19077 fi
19078
19079 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19080 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
19081 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
19082 fi
19083
19084 cf_with_ada=yes
19085 if test "$cf_with_ada" != "no" ; then
19086 if test "$cf_cv_prog_gnat_correct" = yes; then
19087
19088 echo "$as_me:19088: checking optimization options for ADAFLAGS" >&5
19089 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19090 case "$CFLAGS" in
19091 (*-g*)
19092
19093 ADAFLAGS="$ADAFLAGS -g"
19094
19095 ;;
19096 esac
19097 case "$CFLAGS" in
19098 (*-O*)
19099 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
19100
19101 ADAFLAGS="$ADAFLAGS $cf_O_flag"
19102
19103 ;;
19104 esac
19105 echo "$as_me:19105: result: $ADAFLAGS" >&5
19106 echo "${ECHO_T}$ADAFLAGS" >&6
19107
19108 echo "$as_me:19108: checking if GNATPREP supports -T option" >&5
19109 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
19110 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
19111 echo $ECHO_N "(cached) $ECHO_C" >&6
19112 else
19113
19114 cf_cv_gnatprep_opt_t=no
19115 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
19116
19117 fi
19118 echo "$as_me:19118: result: $cf_cv_gnatprep_opt_t" >&5
19119 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
19120 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
19121
19122 echo "$as_me:19122: checking if GNAT supports generics" >&5
19123 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19124 case "$cf_cv_gnat_version" in
19125 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
19126 cf_gnat_generics=yes
19127 ;;
19128 (*)
19129 cf_gnat_generics=no
19130 ;;
19131 esac
19132 echo "$as_me:19132: result: $cf_gnat_generics" >&5
19133 echo "${ECHO_T}$cf_gnat_generics" >&6
19134
19135 if test "$cf_gnat_generics" = yes
19136 then
19137 cf_compile_generics=generics
19138 cf_generic_objects="\${GENOBJS}"
19139 else
19140 cf_compile_generics=
19141 cf_generic_objects=
19142 fi
19143
19144 echo "$as_me:19144: checking if GNAT supports SIGINT" >&5
19145 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19146 if test "${cf_cv_gnat_sigint+set}" = set; then
19147 echo $ECHO_N "(cached) $ECHO_C" >&6
19148 else
19149
19150 rm -rf ./conftest* ./*~conftest*
19151 cat >>conftest.ads <<CF_EOF
19152 with Ada.Interrupts.Names;
19153
19154 package ConfTest is
19155
19156 pragma Warnings (Off); -- the next pragma exists since 3.11p
19157 pragma Unreserve_All_Interrupts;
19158 pragma Warnings (On);
19159
19160 protected Process is
19161 procedure Stop;
19162 function Continue return Boolean;
19163 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19164 private
19165 Done : Boolean := False;
19166 end Process;
19167
19168 end ConfTest;
19169 CF_EOF
19170 cat >>conftest.adb <<CF_EOF
19171 package body ConfTest is
19172 protected body Process is
19173 procedure Stop is
19174 begin
19175 Done := True;
19176 end Stop;
19177 function Continue return Boolean is
19178 begin
19179 return not Done;
19180 end Continue;
19181 end Process;
19182 end ConfTest;
19183 CF_EOF
19184 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19185 cf_cv_gnat_sigint=yes
19186 else
19187 cf_cv_gnat_sigint=no
19188 fi
19189 rm -rf ./conftest* ./*~conftest*
19190
19191 fi
19192 echo "$as_me:19192: result: $cf_cv_gnat_sigint" >&5
19193 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19194
19195 if test "$cf_cv_gnat_sigint" = yes ; then
19196 USE_GNAT_SIGINT=""
19197 else
19198 USE_GNAT_SIGINT="#"
19199 fi
19200
19201 cf_gnat_libraries=no
19202 cf_gnat_projects=no
19203
19204 if test "$enable_gnat_projects" != no ; then
19205 echo "$as_me:19205: checking if GNAT supports project files" >&5
19206 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19207 case "$cf_cv_gnat_version" in
19208 (3.[0-9]*)
19209 ;;
19210 (*)
19211 case "$cf_cv_system_name" in
19212 (cygwin*|msys*)
19213 ;;
19214 (*)
19215 rm -rf ./conftest* ./*~conftest*
19216 if mkdir conftest.src conftest.bin conftest.lib
19217 then
19218 cd conftest.src
19219 rm -rf ./conftest* ./*~conftest*
19220 cat >>library.gpr <<CF_EOF
19221 project Library is
19222 Kind := External ("LIB_KIND");
19223 for Library_Name use "ConfTest";
19224 for Object_Dir use ".";
19225 for Library_ALI_Dir use External("LIBRARY_DIR");
19226 for Library_Version use External ("SONAME");
19227 for Library_Kind use Kind;
19228 for Library_Dir use External("BUILD_DIR");
19229 Source_Dir := External ("SOURCE_DIR");
19230 for Source_Dirs use (Source_Dir);
19231 end Library;
19232 CF_EOF
19233 cat >>confpackage.ads <<CF_EOF
19234 package ConfPackage is
19235 procedure conftest;
19236 end ConfPackage;
19237 CF_EOF
19238 cat >>confpackage.adb <<CF_EOF
19239 with Text_IO;
19240 package body ConfPackage is
19241 procedure conftest is
19242 begin
19243 Text_IO.Put ("Hello World");
19244 Text_IO.New_Line;
19245 end conftest;
19246 end ConfPackage;
19247 CF_EOF
19248 if ( "$cf_ada_make" $ADAFLAGS \
19249 -Plibrary.gpr \
19250 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
19251 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
19252 -XSOURCE_DIR="`pwd`" \
19253 -XSONAME=libConfTest.so.1 \
19254 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19255 cf_gnat_projects=yes
19256 fi
19257 cd ..
19258 fi
19259 if test -f conftest.lib/confpackage.ali
19260 then
19261 cf_gnat_libraries=yes
19262 fi
19263 rm -rf ./conftest* ./*~conftest*
19264 ;;
19265 esac
19266 ;;
19267 esac
19268 echo "$as_me:19268: result: $cf_gnat_projects" >&5
19269 echo "${ECHO_T}$cf_gnat_projects" >&6
19270 fi # enable_gnat_projects
19271
19272 if test "$cf_gnat_projects" = yes
19273 then
19274 echo "$as_me:19274: checking if GNAT supports libraries" >&5
19275 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19276 echo "$as_me:19276: result: $cf_gnat_libraries" >&5
19277 echo "${ECHO_T}$cf_gnat_libraries" >&6
19278 fi
19279
19280 USE_OLD_MAKERULES=""
19281 USE_GNAT_PROJECTS="#"
19282 USE_GNAT_MAKE_GPR="#"
19283 USE_GNAT_GPRBUILD="#"
19284
19285 if test "$cf_gnat_projects" = yes
19286 then
19287 USE_OLD_MAKERULES="#"
19288 USE_GNAT_PROJECTS=""
19289 if test "$cf_cv_VERSION_GPRBUILD" != no
19290 then
19291 USE_GNAT_GPRBUILD=""
19292 elif test "$cf_cv_VERSION_GNATMAKE" != no
19293 then
19294 USE_GNAT_MAKE_GPR=""
19295 else
19296 { echo "$as_me:19296: WARNING: use old makefile rules since tools are missing" >&5
19297 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
19298 fi
19299 fi
19300
19301 if test "$cf_gnat_libraries" = yes
19302 then
19303 USE_GNAT_LIBRARIES=""
19304 else
19305 USE_GNAT_LIBRARIES="#"
19306 fi
19307
19308 echo "$as_me:19308: checking for Ada95 compiler" >&5
19309 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
19310
19311 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19312 if test "${with_ada_compiler+set}" = set; then
19313 withval="$with_ada_compiler"
19314 cf_ada_compiler=$withval
19315 else
19316 cf_ada_compiler=gnatmake
19317 fi;
19318
19319 echo "$as_me:19319: result: $cf_ada_compiler" >&5
19320 echo "${ECHO_T}$cf_ada_compiler" >&6
19321
19322 cf_ada_package=terminal_interface
19323
19324 echo "$as_me:19324: checking for Ada95 include directory" >&5
19325 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
19326
19327 # Check whether --with-ada-include or --without-ada-include was given.
19328 if test "${with_ada_include+set}" = set; then
19329 withval="$with_ada_include"
19330
19331 else
19332 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19333 fi; if test -n "$prefix/share/ada/adainclude" ; then
19334
19335 if test "x$prefix" != xNONE; then
19336 cf_path_syntax="$prefix"
19337 else
19338 cf_path_syntax="$ac_default_prefix"
19339 fi
19340
19341 case "x$withval" in
19342 (x\$\(*\)*|x\'*\'*)
19343 ;;
19344 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
19345 ;;
19346 (x\$\{*prefix\}*|x\$\{*dir\}*)
19347 eval withval="$withval"
19348 case "x$withval" in
19349 (xNONE/*)
19350 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
19351 ;;
19352 esac
19353 ;;
19354 (xno|xNONE/*)
19355 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
19356 ;;
19357 (*)
19358 { { echo "$as_me:19358: error: expected a pathname, not \"$withval\"" >&5
19359 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19360 { (exit 1); exit 1; }; }
19361 ;;
19362 esac
19363
19364 fi
19365 eval ADA_INCLUDE="$withval"
19366
19367 echo "$as_me:19367: result: $ADA_INCLUDE" >&5
19368 echo "${ECHO_T}$ADA_INCLUDE" >&6
19369
19370 echo "$as_me:19370: checking for Ada95 object directory" >&5
19371 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
19372
19373 # Check whether --with-ada-objects or --without-ada-objects was given.
19374 if test "${with_ada_objects+set}" = set; then
19375 withval="$with_ada_objects"
19376
19377 else
19378 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19379 fi; if test -n "$prefix/lib/ada/adalib" ; then
19380
19381 if test "x$prefix" != xNONE; then
19382 cf_path_syntax="$prefix"
19383 else
19384 cf_path_syntax="$ac_default_prefix"
19385 fi
19386
19387 case "x$withval" in
19388 (x\$\(*\)*|x\'*\'*)
19389 ;;
19390 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
19391 ;;
19392 (x\$\{*prefix\}*|x\$\{*dir\}*)
19393 eval withval="$withval"
19394 case "x$withval" in
19395 (xNONE/*)
19396 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
19397 ;;
19398 esac
19399 ;;
19400 (xno|xNONE/*)
19401 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
19402 ;;
19403 (*)
19404 { { echo "$as_me:19404: error: expected a pathname, not \"$withval\"" >&5
19405 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19406 { (exit 1); exit 1; }; }
19407 ;;
19408 esac
19409
19410 fi
19411 eval ADA_OBJECTS="$withval"
19412
19413 echo "$as_me:19413: result: $ADA_OBJECTS" >&5
19414 echo "${ECHO_T}$ADA_OBJECTS" >&6
19415
19416 echo "$as_me:19416: checking whether to build an Ada95 shared library" >&5
19417 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
19418
19419 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19420 if test "${with_ada_sharedlib+set}" = set; then
19421 withval="$with_ada_sharedlib"
19422 with_ada_sharedlib=$withval
19423 else
19424 with_ada_sharedlib=no
19425 fi;
19426 cf_ada_sharedlib_warn=no
19427
19428 if test "x$with_ada_sharedlib" != xno
19429 then
19430 if test "x$cf_gnat_projects" != xyes
19431 then
19432 with_ada_sharedlib=no
19433 cf_ada_sharedlib_warn=yes
19434 fi
19435 fi
19436
19437 echo "$as_me:19437: result: $with_ada_sharedlib" >&5
19438 echo "${ECHO_T}$with_ada_sharedlib" >&6
19439 if test "x$cf_ada_sharedlib_warn" != xno
19440 then
19441 { echo "$as_me:19441: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
19442 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
19443 fi
19444
19445 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19446 MAKE_ADA_SHAREDLIB="#"
19447
19448 if test "x$with_ada_sharedlib" != xno
19449 then
19450 MAKE_ADA_SHAREDLIB=
19451 if test "x$with_ada_sharedlib" != xyes
19452 then
19453 ADA_SHAREDLIB="$with_ada_sharedlib"
19454 fi
19455 fi
19456
19457 # allow the Ada binding to be renamed
19458
19459 echo "$as_me:19459: checking for Ada95 curses library name" >&5
19460 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
19461
19462 # Check whether --with-ada-libname or --without-ada-libname was given.
19463 if test "${with_ada_libname+set}" = set; then
19464 withval="$with_ada_libname"
19465 ADA_LIBNAME=$withval
19466 else
19467 ADA_LIBNAME=AdaCurses
19468 fi;
19469 case "x$ADA_LIBNAME" in
19470 (x|xyes|xno)
19471 ADA_LIBNAME=AdaCurses
19472 ;;
19473 esac
19474
19475 echo "$as_me:19475: result: $ADA_LIBNAME" >&5
19476 echo "${ECHO_T}$ADA_LIBNAME" >&6
19477
19478 else
19479 { { echo "$as_me:19479: error: No usable Ada compiler found" >&5
19480 echo "$as_me: error: No usable Ada compiler found" >&2;}
19481 { (exit 1); exit 1; }; }
19482 fi
19483 else
19484 { { echo "$as_me:19484: error: The Ada compiler is needed for this package" >&5
19485 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
19486 { (exit 1); exit 1; }; }
19487 fi
19488
19489 ################################################################################
19490
19491 # not needed
19492 TINFO_LDFLAGS2=
19493
19494 TINFO_LIBS=
19495
19496 ### Construct the list of include-directories to be generated
19497
19498 if test "$srcdir" != "."; then
19499 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19500 fi
19501 CPPFLAGS="-I../include $CPPFLAGS"
19502 if test "$srcdir" != "."; then
19503 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
19504 fi
19505 CPPFLAGS="-I. $CPPFLAGS"
19506
19507 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19508 if test "$srcdir" != "."; then
19509 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19510 fi
19511 if test "$GCC" != yes; then
19512 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19513 elif test "$includedir" != "/usr/include"; then
19514 if test "$includedir" = '${prefix}/include' ; then
19515 if test x$prefix != x/usr ; then
19516 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19517 fi
19518 else
19519 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19520 fi
19521 fi
19522
19523 ### Build up pieces for makefile rules
19524 echo "$as_me:19524: checking default library suffix" >&5
19525 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19526
19527 case $DFT_LWR_MODEL in
19528 (libtool) DFT_ARG_SUFFIX='' ;;
19529 (normal) DFT_ARG_SUFFIX='' ;;
19530 (debug) DFT_ARG_SUFFIX='_g' ;;
19531 (profile) DFT_ARG_SUFFIX='_p' ;;
19532 (shared) DFT_ARG_SUFFIX='' ;;
19533 esac
19534 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19535 echo "$as_me:19535: result: $DFT_ARG_SUFFIX" >&5
19536 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19537
19538 echo "$as_me:19538: checking default library-dependency suffix" >&5
19539 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19540
19541 case X$DFT_LWR_MODEL in
19542 (Xlibtool)
19543 DFT_LIB_SUFFIX='.la'
19544 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19545 ;;
19546 (Xdebug)
19547 case "$cf_cv_system_name" in
19548 (*-msvc*)
19549 DFT_LIB_SUFFIX='_g.lib'
19550 ;;
19551 (*)
19552 DFT_LIB_SUFFIX='_g.a'
19553 ;;
19554 esac
19555 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19556 ;;
19557 (Xprofile)
19558 case "$cf_cv_system_name" in
19559 (*-msvc*)
19560 DFT_LIB_SUFFIX='_p.lib'
19561 ;;
19562 (*)
19563 DFT_LIB_SUFFIX='_p.a'
19564 ;;
19565 esac
19566 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19567 ;;
19568 (Xshared)
19569 case "$cf_cv_system_name" in
19570 (aix[5-7]*)
19571 DFT_LIB_SUFFIX='.so'
19572 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19573 ;;
19574 (*-msvc*)
19575 DFT_LIB_SUFFIX='.dll'
19576 DFT_DEP_SUFFIX='.dll.lib'
19577 ;;
19578 (cygwin*|msys*|mingw*)
19579 DFT_LIB_SUFFIX='.dll'
19580 DFT_DEP_SUFFIX='.dll.a'
19581 ;;
19582 (darwin*)
19583 DFT_LIB_SUFFIX='.dylib'
19584 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19585 ;;
19586 (hpux*)
19587 case "$target" in
19588 (ia64*)
19589 DFT_LIB_SUFFIX='.so'
19590 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19591 ;;
19592 (*)
19593 DFT_LIB_SUFFIX='.sl'
19594 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19595 ;;
19596 esac
19597 ;;
19598 (*)
19599 DFT_LIB_SUFFIX='.so'
19600 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19601 ;;
19602 esac
19603 ;;
19604 (*)
19605 case "$target" in
19606 (*-msvc*)
19607 DFT_LIB_SUFFIX='.lib'
19608 ;;
19609 (*)
19610 DFT_LIB_SUFFIX='.a'
19611 ;;
19612 esac
19613 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19614 ;;
19615 esac
19616 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
19617 then
19618 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
19619 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
19620 fi
19621 echo "$as_me:19621: result: $DFT_DEP_SUFFIX" >&5
19622 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19623
19624 echo "$as_me:19624: checking default object directory" >&5
19625 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19626
19627 case $DFT_LWR_MODEL in
19628 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
19629 (normal) DFT_OBJ_SUBDIR='objects' ;;
19630 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
19631 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
19632 (shared)
19633 case "$cf_cv_system_name" in
19634 (cygwin|msys)
19635 DFT_OBJ_SUBDIR='objects' ;;
19636 (*)
19637 DFT_OBJ_SUBDIR='obj_s' ;;
19638 esac
19639 esac
19640 echo "$as_me:19640: result: $DFT_OBJ_SUBDIR" >&5
19641 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19642
19643 ### Set up low-level terminfo dependencies for makefiles.
19644
19645 if test "$DFT_LWR_MODEL" = shared ; then
19646 case $cf_cv_system_name in
19647 (cygwin*)
19648 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19649 ;;
19650 (msys*)
19651 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
19652 ;;
19653 esac
19654 fi
19655
19656 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
19657
19658 ABI_SUFFIX=${DFT_ARG_SUFFIX}
19659
19660 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
19661
19662 ### Construct the list of subdirectories for which we'll customize makefiles
19663 ### with the appropriate compile-rules.
19664
19665 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
19666
19667 cat >>confdefs.h <<EOF
19668 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19669 EOF
19670
19671 ################################################################################
19672
19673 TEST_ARG2=
19674
19675 TEST_LIBS2=
19676
19677 NCURSES_SHLIB2="sh -c"
19678
19679 ADA_SUBDIRS="include gen src doc"
19680 if test "x$cf_with_tests" != "xno" ; then
19681 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19682 fi
19683 for cf_dir in $ADA_SUBDIRS
19684 do
19685 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19686 done
19687
19688 NCURSES_TREE="#"
19689
19690 EXTERNAL_TREE=
19691
19692 # match layout used by make-tar.sh
19693 ADAHTML_DIR=../doc/ada
19694
19695 if test "x$cross_compiling" = xyes ; then
19696 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
19697 else
19698 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
19699 fi
19700
19701 ac_config_files="$ac_config_files $SUB_MAKEFILES src/library.gpr:src/library.gpr.in doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
19702
19703 ac_config_commands="$ac_config_commands default"
19704
19705 DEFS=-DHAVE_CONFIG_H
19706
19707 cat >confcache <<\_ACEOF
19708 # This file is a shell script that caches the results of configure
19709 # tests run on this system so they can be shared between configure
19710 # scripts and configure runs, see configure's option --config-cache.
19711 # It is not useful on other systems. If it contains results you don't
19712 # want to keep, you may remove or edit it.
19713 #
19714 # config.status only pays attention to the cache file if you give it
19715 # the --recheck option to rerun configure.
19716 #
19717 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19718 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19719 # following values.
19720
19721 _ACEOF
19722
19723 # The following way of writing the cache mishandles newlines in values,
19724 # but we know of no workaround that is simple, portable, and efficient.
19725 # So, don't put newlines in cache variables' values.
19726 # Ultrix sh set writes to stderr and can't be redirected directly,
19727 # and sets the high bit in the cache file unless we assign to the vars.
19728 {
19729 (set) 2>&1 |
19730 case `(ac_space=' '; set | grep ac_space) 2>&1` in
19731 *ac_space=\ *)
19732 # `set' does not quote correctly, so add quotes (double-quote
19733 # substitution turns \\\\ into \\, and sed turns \\ into \).
19734 sed -n \
19735 "s/'/'\\\\''/g;
19736 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19737 ;;
19738 *)
19739 # `set' quotes correctly as required by POSIX, so do not add quotes.
19740 sed -n \
19741 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19742 ;;
19743 esac;
19744 } |
19745 sed '
19746 t clear
19747 : clear
19748 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19749 t end
19750 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19751 : end' >>confcache
19752 if cmp -s $cache_file confcache; then :; else
19753 if test -w $cache_file; then
19754 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19755 cat confcache >$cache_file
19756 else
19757 echo "not updating unwritable cache $cache_file"
19758 fi
19759 fi
19760 rm -f confcache
19761
19762 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19763 # Let make expand exec_prefix.
19764 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19765
19766 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19767 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19768 # trailing colons and then remove the whole line if VPATH becomes empty
19769 # (actually we leave an empty line to preserve line numbers).
19770 if test "x$srcdir" = x.; then
19771 ac_vpsub='/^[ ]*VPATH[ ]*=/{
19772 s/:*\$(srcdir):*/:/;
19773 s/:*\${srcdir}:*/:/;
19774 s/:*@srcdir@:*/:/;
19775 s/^\([^=]*=[ ]*\):*/\1/;
19776 s/:*$//;
19777 s/^[^=]*=[ ]*$//;
19778 }'
19779 fi
19780
19781 DEFS=-DHAVE_CONFIG_H
19782
19783 : "${CONFIG_STATUS=./config.status}"
19784 ac_clean_files_save=$ac_clean_files
19785 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19786 { echo "$as_me:19786: creating $CONFIG_STATUS" >&5
19787 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19788 cat >"$CONFIG_STATUS" <<_ACEOF
19789 #! $SHELL
19790 # Generated automatically by configure.
19791 # Run this file to recreate the current configuration.
19792 # Compiler output produced by configure, useful for debugging
19793 # configure, is in config.log if it exists.
19794
19795 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
19796
19797 debug=false
19798 SHELL=\${CONFIG_SHELL-$SHELL}
19799 ac_cs_invocation="\$0 \$@"
19800
19801 CLICOLOR_FORCE= GREP_OPTIONS=
19802 unset CLICOLOR_FORCE GREP_OPTIONS
19803 _ACEOF
19804
19805 cat >>"$CONFIG_STATUS" <<\_ACEOF
19806 # Be Bourne compatible
19807 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19808 emulate sh
19809 NULLCMD=:
19810 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19811 set -o posix
19812 fi
19813
19814 # Name of the executable.
19815 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19816
19817 if expr a : '\(a\)' >/dev/null 2>&1; then
19818 as_expr="expr"
19819 else
19820 as_expr="false"
19821 fi
19822
19823 rm -f conf$$ conf$$.exe conf$$.file
19824 echo >conf$$.file
19825 if ln -s conf$$.file conf$$ 2>/dev/null; then
19826 # We could just check for DJGPP; but this test a) works b) is more generic
19827 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19828 if test -f conf$$.exe; then
19829 # Don't use ln at all; we don't have any links
19830 as_ln_s='cp -p'
19831 else
19832 as_ln_s='ln -s'
19833 fi
19834 elif ln conf$$.file conf$$ 2>/dev/null; then
19835 as_ln_s='ln'
19836 else
19837 as_ln_s='cp -p'
19838 fi
19839 rm -f conf$$ conf$$.exe conf$$.file
19840
19841 as_executable_p="test -f"
19842
19843 # Support unset when possible.
19844 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19845 as_unset="unset"
19846 else
19847 as_unset="false"
19848 fi
19849
19850 # NLS nuisances.
19851 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19852 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19853 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19854 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19855 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19856 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19857 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19858 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19859
19860 # IFS
19861 # We need space, tab and new line, in precisely that order.
19862 as_nl='
19863 '
19864 IFS=" $as_nl"
19865
19866 # CDPATH.
19867 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19868
19869 exec 6>&1
19870
19871 _ACEOF
19872
19873 # Files that config.status was made for.
19874 if test -n "$ac_config_files"; then
19875 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
19876 fi
19877
19878 if test -n "$ac_config_headers"; then
19879 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
19880 fi
19881
19882 if test -n "$ac_config_links"; then
19883 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
19884 fi
19885
19886 if test -n "$ac_config_commands"; then
19887 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
19888 fi
19889
19890 cat >>"$CONFIG_STATUS" <<\EOF
19891
19892 ac_cs_usage="\
19893 \`$as_me' instantiates files from templates according to the
19894 current configuration.
19895
19896 Usage: $0 [OPTIONS] [FILE]...
19897
19898 -h, --help print this help, then exit
19899 -V, --version print version number, then exit
19900 -d, --debug don't remove temporary files
19901 --recheck update $as_me by reconfiguring in the same conditions
19902 --file=FILE[:TEMPLATE]
19903 instantiate the configuration file FILE
19904 --header=FILE[:TEMPLATE]
19905 instantiate the configuration header FILE
19906
19907 Configuration files:
19908 $config_files
19909
19910 Configuration headers:
19911 $config_headers
19912
19913 Configuration commands:
19914 $config_commands
19915
19916 Report bugs to <[email protected]>."
19917 EOF
19918
19919 cat >>"$CONFIG_STATUS" <<EOF
19920 ac_cs_version="\\
19921 config.status
19922 configured by $0, generated by GNU Autoconf 2.52.20250126,
19923 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19924
19925 Copyright 2003-2022,2023 Thomas E. Dickey
19926 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19927 Free Software Foundation, Inc.
19928 This config.status script is free software; the Free Software Foundation
19929 gives unlimited permission to copy, distribute and modify it."
19930 srcdir="$srcdir"
19931 INSTALL="$INSTALL"
19932 EOF
19933
19934 cat >>"$CONFIG_STATUS" <<\EOF
19935 # If no file are specified by the user, then we need to provide default
19936 # value. By we need to know if files were specified by the user.
19937 ac_need_defaults=:
19938 while test $# != 0
19939 do
19940 case $1 in
19941 --*=*)
19942 ac_option=`expr "x$1" : 'x\([^=]*\)='`
19943 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19944 shift
19945 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19946 shift
19947 ;;
19948 -*);;
19949 *) # This is not an option, so the user has probably given explicit
19950 # arguments.
19951 ac_need_defaults=false;;
19952 esac
19953
19954 case $1 in
19955 # Handling of the options.
19956 EOF
19957 cat >>"$CONFIG_STATUS" <<EOF
19958 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19959 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19960 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19961 EOF
19962 cat >>"$CONFIG_STATUS" <<\EOF
19963 --version | --vers* | -V )
19964 echo "$ac_cs_version"; exit 0 ;;
19965 --he | --h)
19966 # Conflict between --help and --header
19967 { { echo "$as_me:19967: error: ambiguous option: $1
19968 Try \`$0 --help' for more information." >&5
19969 echo "$as_me: error: ambiguous option: $1
19970 Try \`$0 --help' for more information." >&2;}
19971 { (exit 1); exit 1; }; };;
19972 --help | --hel | -h )
19973 echo "$ac_cs_usage"; exit 0 ;;
19974 --debug | --d* | -d )
19975 debug=: ;;
19976 --file | --fil | --fi | --f )
19977 shift
19978 CONFIG_FILES="$CONFIG_FILES $1"
19979 ac_need_defaults=false;;
19980 --header | --heade | --head | --hea )
19981 shift
19982 CONFIG_HEADERS="$CONFIG_HEADERS $1"
19983 ac_need_defaults=false;;
19984
19985 # This is an error.
19986 -*) { { echo "$as_me:19986: error: unrecognized option: $1
19987 Try \`$0 --help' for more information." >&5
19988 echo "$as_me: error: unrecognized option: $1
19989 Try \`$0 --help' for more information." >&2;}
19990 { (exit 1); exit 1; }; } ;;
19991
19992 *) ac_config_targets="$ac_config_targets $1" ;;
19993
19994 esac
19995 shift
19996 done
19997
19998 exec 5>>config.log
19999 cat >&5 << _ACEOF
20000
20001 ## ----------------------- ##
20002 ## Running config.status. ##
20003 ## ----------------------- ##
20004
20005 This file was extended by $as_me 2.52.20250126, executed with
20006 CONFIG_FILES = $CONFIG_FILES
20007 CONFIG_HEADERS = $CONFIG_HEADERS
20008 CONFIG_LINKS = $CONFIG_LINKS
20009 CONFIG_COMMANDS = $CONFIG_COMMANDS
20010 > "$ac_cs_invocation"
20011 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20012
20013 _ACEOF
20014 EOF
20015
20016 cat >>"$CONFIG_STATUS" <<EOF
20017 #
20018 # INIT-COMMANDS section.
20019 #
20020
20021 ### Special initialization commands, used to pass information from the
20022 ### configuration-run into config.status
20023
20024 AWK="$AWK"
20025 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20026 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20027 LIB_NAME="$LIB_NAME"
20028 LIB_PREFIX="$LIB_PREFIX"
20029 LIB_SUFFIX="$LIB_SUFFIX"
20030 LN_S="$LN_S"
20031 NCURSES_MAJOR="$NCURSES_MAJOR"
20032 NCURSES_MINOR="$NCURSES_MINOR"
20033 NCURSES_PATCH="$NCURSES_PATCH"
20034 PACKAGE="$PACKAGE"
20035 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20036 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
20037 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
20038 cf_cv_abi_version="$cf_cv_abi_version"
20039 cf_cv_rel_version="$cf_cv_rel_version"
20040 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20041 cf_cv_shared_soname='$cf_cv_shared_soname'
20042 cf_cv_shlib_version="$cf_cv_shlib_version"
20043 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20044 cf_cv_system_name="$cf_cv_system_name"
20045 host="$host"
20046 target="$target"
20047
20048 EOF
20049
20050 cat >>"$CONFIG_STATUS" <<\EOF
20051 for ac_config_target in $ac_config_targets
20052 do
20053 case "$ac_config_target" in
20054 # Handling of arguments.
20055 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20056 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
20057 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
20058 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20059 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20060 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20061 *) { { echo "$as_me:20061: error: invalid argument: $ac_config_target" >&5
20062 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20063 { (exit 1); exit 1; }; };;
20064 esac
20065 done
20066
20067 # If the user did not use the arguments to specify the items to instantiate,
20068 # then the envvar interface is used. Set only those that are not.
20069 # We use the long form for the default assignment because of an extremely
20070 # bizarre bug on SunOS 4.1.3.
20071 if "$ac_need_defaults"; then
20072 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20073 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20074 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20075 fi
20076
20077 # Create a temporary directory, and hook for its removal unless debugging.
20078 $debug ||
20079 {
20080 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20081 trap '{ (exit 1); exit 1; }' 1 2 13 15
20082 }
20083
20084 # Create a (secure) tmp directory for tmp files.
20085 : "${TMPDIR=/tmp}"
20086 {
20087 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20088 test -n "$tmp" && test -d "$tmp"
20089 } ||
20090 {
20091 tmp=$TMPDIR/cs$$-$RANDOM
20092 (umask 077 && mkdir "$tmp")
20093 } ||
20094 {
20095 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20096 { (exit 1); exit 1; }
20097 }
20098
20099 EOF
20100
20101 cat >>"$CONFIG_STATUS" <<EOF
20102
20103 #
20104 # CONFIG_FILES section.
20105 #
20106
20107 # No need to generate the scripts if there are no CONFIG_FILES.
20108 # This happens for instance when ./config.status config.h
20109 if test -n "\$CONFIG_FILES"; then
20110 # Protect against being on the right side of a sed subst in config.status.
20111 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20112 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
20113 s,@SHELL@,$SHELL,;t t
20114 s,@exec_prefix@,$exec_prefix,;t t
20115 s,@prefix@,$prefix,;t t
20116 s,@program_transform_name@,$program_transform_name,;t t
20117 s,@bindir@,$bindir,;t t
20118 s,@sbindir@,$sbindir,;t t
20119 s,@libexecdir@,$libexecdir,;t t
20120 s,@datarootdir@,$datarootdir,;t t
20121 s,@datadir@,$datadir,;t t
20122 s,@sysconfdir@,$sysconfdir,;t t
20123 s,@sharedstatedir@,$sharedstatedir,;t t
20124 s,@localstatedir@,$localstatedir,;t t
20125 s,@runstatedir@,$runstatedir,;t t
20126 s,@libdir@,$libdir,;t t
20127 s,@includedir@,$includedir,;t t
20128 s,@oldincludedir@,$oldincludedir,;t t
20129 s,@infodir@,$infodir,;t t
20130 s,@mandir@,$mandir,;t t
20131 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20132 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20133 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20134 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20135 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20136 s,@build_alias@,$build_alias,;t t
20137 s,@host_alias@,$host_alias,;t t
20138 s,@target_alias@,$target_alias,;t t
20139 s,@ECHO_C@,$ECHO_C,;t t
20140 s,@ECHO_N@,$ECHO_N,;t t
20141 s,@ECHO_T@,$ECHO_T,;t t
20142 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20143 s,@DEFS@,$DEFS,;t t
20144 s,@LIBS@,$LIBS,;t t
20145 s,@PACKAGE@,$PACKAGE,;t t
20146 s,@top_builddir@,$top_builddir,;t t
20147 s,@build@,$build,;t t
20148 s,@build_cpu@,$build_cpu,;t t
20149 s,@build_vendor@,$build_vendor,;t t
20150 s,@build_os@,$build_os,;t t
20151 s,@host@,$host,;t t
20152 s,@host_cpu@,$host_cpu,;t t
20153 s,@host_vendor@,$host_vendor,;t t
20154 s,@host_os@,$host_os,;t t
20155 s,@target@,$target,;t t
20156 s,@target_cpu@,$target_cpu,;t t
20157 s,@target_vendor@,$target_vendor,;t t
20158 s,@target_os@,$target_os,;t t
20159 s,@GREP@,$GREP,;t t
20160 s,@FGREP@,$FGREP,;t t
20161 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
20162 s,@M4_exists@,$M4_exists,;t t
20163 s,@cf_ada_make@,$cf_ada_make,;t t
20164 s,@cf_ada_config@,$cf_ada_config,;t t
20165 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
20166 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
20167 s,@cf_cv_path_gnatgcc@,$cf_cv_path_gnatgcc,;t t
20168 s,@CC@,$CC,;t t
20169 s,@CFLAGS@,$CFLAGS,;t t
20170 s,@LDFLAGS@,$LDFLAGS,;t t
20171 s,@CPPFLAGS@,$CPPFLAGS,;t t
20172 s,@ac_ct_CC@,$ac_ct_CC,;t t
20173 s,@EXEEXT@,$EXEEXT,;t t
20174 s,@OBJEXT@,$OBJEXT,;t t
20175 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20176 s,@CPP@,$CPP,;t t
20177 s,@EGREP@,$EGREP,;t t
20178 s,@AWK@,$AWK,;t t
20179 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20180 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20181 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20182 s,@LN_S@,$LN_S,;t t
20183 s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
20184 s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
20185 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
20186 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
20187 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20188 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20189 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20190 s,@SET_MAKE@,$SET_MAKE,;t t
20191 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
20192 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
20193 s,@CTAGS@,$CTAGS,;t t
20194 s,@ETAGS@,$ETAGS,;t t
20195 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20196 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20197 s,@RANLIB@,$RANLIB,;t t
20198 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20199 s,@LD@,$LD,;t t
20200 s,@ac_ct_LD@,$ac_ct_LD,;t t
20201 s,@AR@,$AR,;t t
20202 s,@ac_ct_AR@,$ac_ct_AR,;t t
20203 s,@ARFLAGS@,$ARFLAGS,;t t
20204 s,@DESTDIR@,$DESTDIR,;t t
20205 s,@SET_DESTDIR@,$SET_DESTDIR,;t t
20206 s,@MERGE_PREFIX@,$MERGE_PREFIX,;t t
20207 s,@BUILD_CC@,$BUILD_CC,;t t
20208 s,@BUILD_CPP@,$BUILD_CPP,;t t
20209 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20210 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20211 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20212 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20213 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20214 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20215 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20216 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20217 s,@REQUIRE_PKG@,$REQUIRE_PKG,;t t
20218 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
20219 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
20220 s,@cf_cv_screen@,$cf_cv_screen,;t t
20221 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20222 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20223 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20224 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20225 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20226 s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
20227 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20228 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20229 s,@CC_G_OPT@,$CC_G_OPT,;t t
20230 s,@LD_MODEL@,$LD_MODEL,;t t
20231 s,@shlibdir@,$shlibdir,;t t
20232 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
20233 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20234 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20235 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20236 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20237 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
20238 s,@LINK_PROGS@,$LINK_PROGS,;t t
20239 s,@LINK_TESTS@,$LINK_TESTS,;t t
20240 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20241 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20242 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20243 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20244 s,@RPATH_LIST@,$RPATH_LIST,;t t
20245 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20246 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20247 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20248 s,@PTHREAD@,$PTHREAD,;t t
20249 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20250 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20251 s,@ECHO_LT@,$ECHO_LT,;t t
20252 s,@ECHO_LD@,$ECHO_LD,;t t
20253 s,@RULE_CC@,$RULE_CC,;t t
20254 s,@SHOW_CC@,$SHOW_CC,;t t
20255 s,@ECHO_CC@,$ECHO_CC,;t t
20256 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20257 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
20258 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
20259 s,@ADAFLAGS@,$ADAFLAGS,;t t
20260 s,@ADA_TRACE@,$ADA_TRACE,;t t
20261 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
20262 s,@cf_compile_generics@,$cf_compile_generics,;t t
20263 s,@cf_generic_objects@,$cf_generic_objects,;t t
20264 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20265 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20266 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20267 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20268 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
20269 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
20270 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20271 s,@cf_ada_package@,$cf_ada_package,;t t
20272 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20273 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20274 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20275 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20276 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
20277 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
20278 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
20279 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20280 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20281 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20282 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20283 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
20284 s,@ABI_SUFFIX@,$ABI_SUFFIX,;t t
20285 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
20286 s,@TEST_ARG2@,$TEST_ARG2,;t t
20287 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20288 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20289 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20290 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20291 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
20292 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20293 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
20294 CEOF
20295
20296 EOF
20297
20298 cat >>"$CONFIG_STATUS" <<\EOF
20299 # Split the substitutions into bite-sized pieces for seds with
20300 # small command number limits, like on Digital OSF/1 and HP-UX.
20301 ac_max_sed_lines=48
20302 ac_sed_frag=1 # Number of current file.
20303 ac_beg=1 # First line for current file.
20304 ac_end=$ac_max_sed_lines # Line after last line for current file.
20305 ac_more_lines=:
20306 ac_sed_cmds=
20307 while "$ac_more_lines"; do
20308 if test "$ac_beg" -gt 1; then
20309 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
20310 else
20311 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
20312 fi
20313 if test ! -s "$tmp"/subs.frag; then
20314 ac_more_lines=false
20315 else
20316 # The purpose of the label and of the branching condition is to
20317 # speed up the sed processing (if there are no `@' at all, there
20318 # is no need to browse any of the substitutions).
20319 # These are the two extra sed commands mentioned above.
20320 (echo ':t
20321 /@[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
20322 # It is possible to make a multiline substitution using escaped newlines.
20323 # Ensure that we do not split the substitution between script fragments.
20324 ac_BEG=$ac_end
20325 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
20326 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
20327 if test -s "$tmp"/subs.next; then
20328 grep '^s,@[^@,][^@,]*@,.*$' "$tmp"/subs.next | grep -v '^s,@.*;t t$' >"$tmp"/subs.edit
20329 if test ! -s "$tmp"/subs.edit; then
20330 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
20331 if test ! -s "$tmp"/subs.edit; then
20332 if test "$ac_beg" -gt 1; then
20333 ac_end=`expr "$ac_end" - 1`
20334 continue
20335 fi
20336 fi
20337 fi
20338 fi
20339
20340 if test -z "$ac_sed_cmds"; then
20341 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
20342 else
20343 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
20344 fi
20345 ac_sed_frag=`expr "$ac_sed_frag" + 1`
20346 ac_beg=$ac_end
20347 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
20348 fi
20349 done
20350 if test -z "$ac_sed_cmds"; then
20351 ac_sed_cmds="cat"
20352 fi
20353 fi # test -n "$CONFIG_FILES"
20354
20355 EOF
20356 cat >>"$CONFIG_STATUS" <<\EOF
20357 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20358 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20359 case "$ac_file" in
20360 - | *:- | *:-:* ) # input from stdin
20361 cat >"$tmp"/stdin
20362 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20363 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20364 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20365 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20366 * ) ac_file_in=$ac_file.in ;;
20367 esac
20368
20369 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20370 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20371 X"$ac_file" : 'X\(//\)[^/]' \| \
20372 X"$ac_file" : 'X\(//\)$' \| \
20373 X"$ac_file" : 'X\(/\)' \| \
20374 . : '\(.\)' 2>/dev/null ||
20375 echo X"$ac_file" |
20376 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20377 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20378 /^X\(\/\/\)$/{ s//\1/; q; }
20379 /^X\(\/\).*/{ s//\1/; q; }
20380 s/.*/./; q'`
20381 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20382 { case "$ac_dir" in
20383 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20384 *) as_incr_dir=.;;
20385 esac
20386 as_dummy="$ac_dir"
20387 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20388 case $as_mkdir_dir in
20389 # Skip DOS drivespec
20390 ?:) as_incr_dir=$as_mkdir_dir ;;
20391 *)
20392 as_incr_dir=$as_incr_dir/$as_mkdir_dir
20393 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20394 ;;
20395 esac
20396 done; }
20397
20398 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
20399 # A "../" for each directory in $ac_dir_suffix.
20400 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20401 else
20402 ac_dir_suffix= ac_dots=
20403 fi
20404
20405 case "$srcdir" in
20406 .) ac_srcdir=.
20407 if test -z "$ac_dots"; then
20408 ac_top_srcdir=.
20409 else
20410 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
20411 fi ;;
20412 [\\/]* | ?:[\\/]* )
20413 ac_srcdir="$srcdir$ac_dir_suffix";
20414 ac_top_srcdir="$srcdir" ;;
20415 *) # Relative path.
20416 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
20417 ac_top_srcdir="$ac_dots$srcdir" ;;
20418 esac
20419
20420 case $INSTALL in
20421 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20422 *) ac_INSTALL=$ac_dots$INSTALL ;;
20423 esac
20424
20425 if test x"$ac_file" != x-; then
20426 { echo "$as_me:20426: creating $ac_file" >&5
20427 echo "$as_me: creating $ac_file" >&6;}
20428 rm -f "$ac_file"
20429 fi
20430 # Let's still pretend it is `configure' which instantiates (i.e., don't
20431 # use $as_me), people would be surprised to read:
20432 # /* config.h. Generated automatically by config.status. */
20433 configure_input="Generated automatically from `echo $ac_file_in |
20434 sed 's,.*/,,'` by configure."
20435
20436 # First look for the input files in the build tree, otherwise in the
20437 # src tree.
20438 ac_file_inputs=`IFS=:
20439 for f in $ac_file_in; do
20440 case $f in
20441 -) echo "$tmp"/stdin ;;
20442 [\\/$]*)
20443 # Absolute (can't be DOS-style, as IFS=:)
20444 test -f "$f" || { { echo "$as_me:20444: error: cannot find input file: $f" >&5
20445 echo "$as_me: error: cannot find input file: $f" >&2;}
20446 { (exit 1); exit 1; }; }
20447 echo "$f";;
20448 *) # Relative
20449 if test -f "$f"; then
20450 # Build tree
20451 echo "$f"
20452 elif test -f "$srcdir/$f"; then
20453 # Source tree
20454 echo "$srcdir/$f"
20455 else
20456 # /dev/null tree
20457 { { echo "$as_me:20457: error: cannot find input file: $f" >&5
20458 echo "$as_me: error: cannot find input file: $f" >&2;}
20459 { (exit 1); exit 1; }; }
20460 fi;;
20461 esac
20462 done` || { (exit 1); exit 1; }
20463 EOF
20464 cat >>"$CONFIG_STATUS" <<\EOF
20465 ac_warn_datarootdir=no
20466 if test x"$ac_file" != x-; then
20467 for ac_item in $ac_file_inputs
20468 do
20469 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
20470 if test -n "$ac_seen"; then
20471 ac_used=`grep '@datarootdir@' "$ac_item"`
20472 if test -z "$ac_used"; then
20473 { echo "$as_me:20473: WARNING: datarootdir was used implicitly but not set:
20474 $ac_seen" >&5
20475 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
20476 $ac_seen" >&2;}
20477 ac_warn_datarootdir=yes
20478 fi
20479 fi
20480 ac_seen=`grep '${datarootdir}' "$ac_item"`
20481 if test -n "$ac_seen"; then
20482 { echo "$as_me:20482: WARNING: datarootdir was used explicitly but not set:
20483 $ac_seen" >&5
20484 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
20485 $ac_seen" >&2;}
20486 ac_warn_datarootdir=yes
20487 fi
20488 done
20489 fi
20490
20491 if test "x$ac_warn_datarootdir" = xyes; then
20492 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
20493 fi
20494
20495 EOF
20496 cat >>"$CONFIG_STATUS" <<EOF
20497 sed "$ac_vpsub
20498 $extrasub
20499 EOF
20500 cat >>"$CONFIG_STATUS" <<\EOF
20501 :t
20502 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20503 s,@configure_input@,$configure_input,;t t
20504 s,@srcdir@,$ac_srcdir,;t t
20505 s,@top_srcdir@,$ac_top_srcdir,;t t
20506 s,@INSTALL@,$ac_INSTALL,;t t
20507 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
20508 rm -f "$tmp"/stdin
20509 EOF
20510 test -n "${FGREP}" || FGREP="grep -F"
20511 test -n "${EGREP}" || EGREP="grep -E"
20512 cat >>"$CONFIG_STATUS" <<EOF
20513 test -n "\${FGREP}" || FGREP="$FGREP"
20514 test -n "\${EGREP}" || EGREP="$EGREP"
20515 EOF
20516 cat >>"$CONFIG_STATUS" <<\EOF
20517 if test x"$ac_file" != x-; then
20518 cp "$tmp/out" "$ac_file"
20519
20520 for ac_name in prefix exec_prefix datarootdir
20521 do
20522 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
20523 if test -n "$ac_seen"; then
20524 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
20525 if test -z "$ac_init"; then
20526 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
20527 { echo "$as_me:20527: WARNING: Variable $ac_name is used but was not set:
20528 $ac_seen" >&5
20529 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
20530 $ac_seen" >&2;}
20531 fi
20532 fi
20533 done
20534 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
20535 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
20536 if test -s "$tmp"/out; then
20537 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
20538 { echo "$as_me:20538: WARNING: Some variables may not be substituted:
20539 $ac_seen" >&5
20540 echo "$as_me: WARNING: Some variables may not be substituted:
20541 $ac_seen" >&2;}
20542 fi
20543 else
20544 cat "$tmp"/out
20545 fi
20546 rm -f "$tmp"/out
20547
20548 done
20549 EOF
20550 cat >>"$CONFIG_STATUS" <<\EOF
20551
20552 #
20553 # CONFIG_HEADER section.
20554 #
20555
20556 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20557 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20558 #
20559 # ac_d sets the value in "#define NAME VALUE" lines.
20560 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
20561 ac_dB='[ ].*$,\1#\2'
20562 ac_dC=' '
20563 ac_dD=',;t'
20564 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20565 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20566 ac_iB='\([ ]\),\1#\2define\3'
20567 ac_iC=' '
20568 ac_iD='\4,;t'
20569 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20570 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
20571 ac_uB='$,\1#\2define\3'
20572 ac_uC=' '
20573 ac_uD=',;t'
20574
20575 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20576 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20577 case "$ac_file" in
20578 - | *:- | *:-:* ) # input from stdin
20579 cat >"$tmp"/stdin
20580 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20581 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20582 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20583 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20584 * ) ac_file_in=$ac_file.in ;;
20585 esac
20586
20587 test x"$ac_file" != x- && { echo "$as_me:20587: creating $ac_file" >&5
20588 echo "$as_me: creating $ac_file" >&6;}
20589
20590 # First look for the input files in the build tree, otherwise in the
20591 # src tree.
20592 ac_file_inputs=`IFS=:
20593 for f in $ac_file_in; do
20594 case $f in
20595 -) echo "$tmp"/stdin ;;
20596 [\\/$]*)
20597 # Absolute (can't be DOS-style, as IFS=:)
20598 test -f "$f" || { { echo "$as_me:20598: error: cannot find input file: $f" >&5
20599 echo "$as_me: error: cannot find input file: $f" >&2;}
20600 { (exit 1); exit 1; }; }
20601 echo $f;;
20602 *) # Relative
20603 if test -f "$f"; then
20604 # Build tree
20605 echo $f
20606 elif test -f "$srcdir/$f"; then
20607 # Source tree
20608 echo "$srcdir/$f"
20609 else
20610 # /dev/null tree
20611 { { echo "$as_me:20611: error: cannot find input file: $f" >&5
20612 echo "$as_me: error: cannot find input file: $f" >&2;}
20613 { (exit 1); exit 1; }; }
20614 fi;;
20615 esac
20616 done` || { (exit 1); exit 1; }
20617 # Remove the trailing spaces.
20618 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
20619
20620 EOF
20621
20622 # Transform confdefs.h into a list of #define's. We won't use it as a sed
20623 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
20624 # be either 'cat' or 'sort'.
20625 cat confdefs.h | uniq >conftest.vals
20626
20627 # Break up conftest.vals because some shells have a limit on
20628 # the size of here documents, and old seds have small limits too.
20629
20630 rm -f conftest.tail
20631 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
20632 while grep . conftest.vals >/dev/null
20633 do
20634 # Write chunks of a limited-size here document to conftest.frag.
20635 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
20636 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
20637 echo 'CEOF' >> "$CONFIG_STATUS"
20638 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
20639 rm -f conftest.vals
20640 mv conftest.tail conftest.vals
20641 done
20642 rm -f conftest.vals
20643
20644 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20645 # marker @DEFS@.
20646 echo ' cat >> conftest.edit <<CEOF
20647 /@DEFS@/r conftest.frag
20648 /@DEFS@/d
20649 CEOF
20650 sed -f conftest.edit "$tmp"/in > "$tmp"/out
20651 rm -f "$tmp"/in
20652 mv "$tmp"/out "$tmp"/in
20653 rm -f conftest.edit conftest.frag
20654 ' >> "$CONFIG_STATUS"
20655
20656 cat >>"$CONFIG_STATUS" <<\EOF
20657 # Let's still pretend it is `configure' which instantiates (i.e., don't
20658 # use $as_me), people would be surprised to read:
20659 # /* config.h. Generated automatically by config.status. */
20660 if test x"$ac_file" = x-; then
20661 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
20662 else
20663 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
20664 fi
20665 cat "$tmp"/in >>"$tmp"/config.h
20666 rm -f "$tmp"/in
20667 if test x"$ac_file" != x-; then
20668 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
20669 { echo "$as_me:20669: $ac_file is unchanged" >&5
20670 echo "$as_me: $ac_file is unchanged" >&6;}
20671 else
20672 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20673 X"$ac_file" : 'X\(//\)[^/]' \| \
20674 X"$ac_file" : 'X\(//\)$' \| \
20675 X"$ac_file" : 'X\(/\)' \| \
20676 . : '\(.\)' 2>/dev/null ||
20677 echo X"$ac_file" |
20678 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20679 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20680 /^X\(\/\/\)$/{ s//\1/; q; }
20681 /^X\(\/\).*/{ s//\1/; q; }
20682 s/.*/./; q'`
20683 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20684 { case "$ac_dir" in
20685 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20686 *) as_incr_dir=.;;
20687 esac
20688 as_dummy="$ac_dir"
20689 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20690 case $as_mkdir_dir in
20691 # Skip DOS drivespec
20692 ?:) as_incr_dir=$as_mkdir_dir ;;
20693 *)
20694 as_incr_dir=$as_incr_dir/$as_mkdir_dir
20695 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20696 ;;
20697 esac
20698 done; }
20699
20700 fi
20701 rm -f "$ac_file"
20702 mv "$tmp/config.h" "$ac_file"
20703 fi
20704 else
20705 cat "$tmp"/config.h
20706 rm -f "$tmp"/config.h
20707 fi
20708 done
20709 EOF
20710 cat >>"$CONFIG_STATUS" <<\EOF
20711 #
20712 # CONFIG_COMMANDS section.
20713 #
20714 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20715 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20716 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20717
20718 case "$ac_dest" in
20719 default )
20720 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
20721 if test -z "$USE_OLD_MAKERULES" ; then
20722 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
20723 fi
20724 ;;
20725 esac
20726 done
20727 EOF
20728
20729 cat >>"$CONFIG_STATUS" <<\EOF
20730
20731 { (exit 0); exit 0; }
20732 EOF
20733 chmod +x "$CONFIG_STATUS"
20734 ac_clean_files=$ac_clean_files_save
20735
20736 # configure is writing to config.log, and then calls config.status.
20737 # config.status does its own redirection, appending to config.log.
20738 # Unfortunately, on DOS this fails, as config.log is still kept open
20739 # by configure, so config.status won't be able to write to it; its
20740 # output is simply discarded. So we exec the FD to /dev/null,
20741 # effectively closing config.log, so it can be properly (re)opened and
20742 # appended to by config.status. When coming back to configure, we
20743 # need to make the FD available again.
20744 if test "$no_create" != yes; then
20745 ac_cs_success=:
20746 exec 5>/dev/null
20747 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
20748 exec 5>>config.log
20749 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20750 # would make configure fail if this is the last instruction.
20751 "$ac_cs_success" || { (exit 1); exit 1; }
20752 fi
20753
20754 ${MAKE:-make} preinstall