Debian Codegraph @

configure

raw
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20250126.
4 #
5 # Copyright 2003-2022,2023 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26 emulate sh
27 NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29 set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36 as_expr="expr"
37 else
38 as_expr="false"
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
48 as_ln_s='cp -p'
49 else
50 as_ln_s='ln -s'
51 fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53 as_ln_s='ln'
54 else
55 as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63 as_unset="unset"
64 else
65 as_unset="false"
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS=" $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS=
101 MAKEFLAGS=
102 SHELL=${CONFIG_SHELL-/bin/sh}
103
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
108
109 ac_unique_file="dialog.h"
110 # Factoring default headers for most tests.
111 ac_includes_default="\
112 #include <stdio.h>
113 #if HAVE_SYS_TYPES_H
114 # include <sys/types.h>
115 #endif
116 #if HAVE_SYS_STAT_H
117 # include <sys/stat.h>
118 #endif
119 #if STDC_HEADERS
120 # include <stdlib.h>
121 # include <stddef.h>
122 #else
123 # if HAVE_STDLIB_H
124 # include <stdlib.h>
125 # endif
126 #endif
127 #if HAVE_STRING_H
128 # if !STDC_HEADERS && HAVE_MEMORY_H
129 # include <memory.h>
130 # endif
131 # include <string.h>
132 #endif
133 #if HAVE_STRINGS_H
134 # include <strings.h>
135 #endif
136 #if HAVE_INTTYPES_H
137 # include <inttypes.h>
138 #else
139 # if HAVE_STDINT_H
140 # include <stdint.h>
141 # endif
142 #endif
143 #if HAVE_UNISTD_H
144 # include <unistd.h>
145 #endif"
146
147 # Initialize some variables set by options.
148 ac_init_help=
149 ac_init_version=false
150 # The variables have the same names as the options, with
151 # dashes changed to underlines.
152 cache_file=/dev/null
153 exec_prefix=NONE
154 no_create=
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 verbose=
164 x_includes=NONE
165 x_libraries=NONE
166
167 # Installation directory options.
168 # These are left unexpanded so users can "make install exec_prefix=/foo"
169 # and all the variables that are supposed to be based on exec_prefix
170 # by default will actually change.
171 # Use braces instead of parens because sh, perl, etc. also accept them.
172 bindir='${exec_prefix}/bin'
173 sbindir='${exec_prefix}/sbin'
174 libexecdir='${exec_prefix}/libexec'
175 datarootdir='${prefix}/share'
176 datadir='${datarootdir}'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 runstatedir='${localstatedir}/run'
181 libdir='${exec_prefix}/lib'
182 includedir='${prefix}/include'
183 oldincludedir='/usr/include'
184 infodir='${datarootdir}/info'
185 mandir='${datarootdir}/man'
186
187 # Identity of this package.
188 PACKAGE_NAME=
189 PACKAGE_TARNAME=
190 PACKAGE_VERSION=
191 PACKAGE_STRING=
192 PACKAGE_BUGREPORT=
193
194 ac_prev=
195 for ac_option
196 do
197 # If the previous option needs an argument, assign it.
198 if test -n "$ac_prev"; then
199 eval "$ac_prev=\$ac_option"
200 ac_prev=
201 continue
202 fi
203
204 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205
206 # Accept the important Cygnus configure options, so we can diagnose typos.
207
208 case "$ac_option" in
209
210 -bindir | --bindir | --bindi | --bind | --bin | --bi)
211 ac_prev=bindir ;;
212 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213 bindir=$ac_optarg ;;
214
215 -build | --build | --buil | --bui | --bu)
216 ac_prev=build_alias ;;
217 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218 build_alias=$ac_optarg ;;
219
220 -cache-file | --cache-file | --cache-fil | --cache-fi \
221 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222 ac_prev=cache_file ;;
223 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225 cache_file=$ac_optarg ;;
226
227 --config-cache | -C)
228 cache_file=config.cache ;;
229
230 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231 ac_prev=datadir ;;
232 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233 | --da=*)
234 datadir=$ac_optarg ;;
235
236 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237 | --dataroo | --dataro | --datar)
238 ac_prev=datarootdir ;;
239 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241 datarootdir=$ac_optarg ;;
242
243 -disable-* | --disable-*)
244 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245 # Reject names that are not valid shell variable names.
246 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248 { (exit 1); exit 1; }; }
249 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250 eval "enable_$ac_feature=no" ;;
251
252 -enable-* | --enable-*)
253 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254 # Reject names that are not valid shell variable names.
255 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257 { (exit 1); exit 1; }; }
258 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
259 case "$ac_option" in
260 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261 *) ac_optarg=yes ;;
262 esac
263 eval "enable_$ac_feature='$ac_optarg'" ;;
264
265 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267 | --exec | --exe | --ex)
268 ac_prev=exec_prefix ;;
269 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271 | --exec=* | --exe=* | --ex=*)
272 exec_prefix=$ac_optarg ;;
273
274 -gas | --gas | --ga | --g)
275 # Obsolete; use --with-gas.
276 with_gas=yes ;;
277
278 -help | --help | --hel | --he | -h)
279 ac_init_help=long ;;
280 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281 ac_init_help=recursive ;;
282 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283 ac_init_help=short ;;
284
285 -host | --host | --hos | --ho)
286 ac_prev=host_alias ;;
287 -host=* | --host=* | --hos=* | --ho=*)
288 host_alias=$ac_optarg ;;
289
290 -includedir | --includedir | --includedi | --included | --include \
291 | --includ | --inclu | --incl | --inc)
292 ac_prev=includedir ;;
293 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294 | --includ=* | --inclu=* | --incl=* | --inc=*)
295 includedir=$ac_optarg ;;
296
297 -infodir | --infodir | --infodi | --infod | --info | --inf)
298 ac_prev=infodir ;;
299 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300 infodir=$ac_optarg ;;
301
302 -libdir | --libdir | --libdi | --libd)
303 ac_prev=libdir ;;
304 -libdir=* | --libdir=* | --libdi=* | --libd=*)
305 libdir=$ac_optarg ;;
306
307 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308 | --libexe | --libex | --libe)
309 ac_prev=libexecdir ;;
310 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311 | --libexe=* | --libex=* | --libe=*)
312 libexecdir=$ac_optarg ;;
313
314 -localstatedir | --localstatedir | --localstatedi | --localstated \
315 | --localstate | --localstat | --localsta | --localst \
316 | --locals | --local | --loca | --loc | --lo)
317 ac_prev=localstatedir ;;
318 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321 localstatedir=$ac_optarg ;;
322
323 -runstatedir | --runstatedir | --runstatedi | --runstated \
324 | --runstate | --runstat | --runsta | --runst \
325 | --runs | --run | --ru)
326 ac_prev=runstatedir ;;
327 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329 | --runs=* | --run=* | --ru=*)
330 runstatedir=$ac_optarg ;;
331
332 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333 ac_prev=mandir ;;
334 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335 mandir=$ac_optarg ;;
336
337 -nfp | --nfp | --nf)
338 # Obsolete; use --without-fp.
339 with_fp=no ;;
340
341 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342 | --no-cr | --no-c)
343 no_create=yes ;;
344
345 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347 no_recursion=yes ;;
348
349 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351 | --oldin | --oldi | --old | --ol | --o)
352 ac_prev=oldincludedir ;;
353 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356 oldincludedir=$ac_optarg ;;
357
358 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359 ac_prev=prefix ;;
360 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361 prefix=$ac_optarg ;;
362
363 -program-prefix | --program-prefix | --program-prefi | --program-pref \
364 | --program-pre | --program-pr | --program-p)
365 ac_prev=program_prefix ;;
366 -program-prefix=* | --program-prefix=* | --program-prefi=* \
367 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368 program_prefix=$ac_optarg ;;
369
370 -program-suffix | --program-suffix | --program-suffi | --program-suff \
371 | --program-suf | --program-su | --program-s)
372 ac_prev=program_suffix ;;
373 -program-suffix=* | --program-suffix=* | --program-suffi=* \
374 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375 program_suffix=$ac_optarg ;;
376
377 -program-transform-name | --program-transform-name \
378 | --program-transform-nam | --program-transform-na \
379 | --program-transform-n | --program-transform- \
380 | --program-transform | --program-transfor \
381 | --program-transfo | --program-transf \
382 | --program-trans | --program-tran \
383 | --progr-tra | --program-tr | --program-t)
384 ac_prev=program_transform_name ;;
385 -program-transform-name=* | --program-transform-name=* \
386 | --program-transform-nam=* | --program-transform-na=* \
387 | --program-transform-n=* | --program-transform-=* \
388 | --program-transform=* | --program-transfor=* \
389 | --program-transfo=* | --program-transf=* \
390 | --program-trans=* | --program-tran=* \
391 | --progr-tra=* | --program-tr=* | --program-t=*)
392 program_transform_name=$ac_optarg ;;
393
394 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395 | -silent | --silent | --silen | --sile | --sil)
396 silent=yes ;;
397
398 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399 ac_prev=sbindir ;;
400 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401 | --sbi=* | --sb=*)
402 sbindir=$ac_optarg ;;
403
404 -sharedstatedir | --sharedstatedir | --sharedstatedi \
405 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406 | --sharedst | --shareds | --shared | --share | --shar \
407 | --sha | --sh)
408 ac_prev=sharedstatedir ;;
409 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412 | --sha=* | --sh=*)
413 sharedstatedir=$ac_optarg ;;
414
415 -site | --site | --sit)
416 ac_prev=site ;;
417 -site=* | --site=* | --sit=*)
418 site=$ac_optarg ;;
419
420 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421 ac_prev=srcdir ;;
422 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423 srcdir=$ac_optarg ;;
424
425 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426 | --syscon | --sysco | --sysc | --sys | --sy)
427 ac_prev=sysconfdir ;;
428 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430 sysconfdir=$ac_optarg ;;
431
432 -target | --target | --targe | --targ | --tar | --ta | --t)
433 ac_prev=target_alias ;;
434 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435 target_alias=$ac_optarg ;;
436
437 -v | -verbose | --verbose | --verbos | --verbo | --verb)
438 verbose=yes ;;
439
440 -version | --version | --versio | --versi | --vers | -V)
441 ac_init_version=: ;;
442
443 -with-* | --with-*)
444 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445 # Reject names that are not valid shell variable names.
446 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447 { echo "$as_me: error: invalid package name: $ac_package" >&2
448 { (exit 1); exit 1; }; }
449 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
450 case "$ac_option" in
451 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
452 *) ac_optarg=yes ;;
453 esac
454 eval "with_$ac_package='$ac_optarg'" ;;
455
456 -without-* | --without-*)
457 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458 # Reject names that are not valid shell variable names.
459 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460 { echo "$as_me: error: invalid package name: $ac_package" >&2
461 { (exit 1); exit 1; }; }
462 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463 eval "with_$ac_package=no" ;;
464
465 --x)
466 # Obsolete; use --with-x.
467 with_x=yes ;;
468
469 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470 | --x-incl | --x-inc | --x-in | --x-i)
471 ac_prev=x_includes ;;
472 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474 x_includes=$ac_optarg ;;
475
476 -x-libraries | --x-libraries | --x-librarie | --x-librari \
477 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478 ac_prev=x_libraries ;;
479 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481 x_libraries=$ac_optarg ;;
482
483 -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
484 echo "$as_me: WARNING: unsupported option: $ac_option" >&2
485 ;;
486
487 -*) { echo "$as_me: error: unrecognized option: $ac_option
488 Try \`$0 --help' for more information." >&2
489 { (exit 1); exit 1; }; }
490 ;;
491
492 *=*)
493 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
494 # Reject names that are not valid shell variable names.
495 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
496 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
497 { (exit 1); exit 1; }; }
498 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
499 eval "$ac_envvar='$ac_optarg'"
500 export "$ac_envvar" ;;
501
502 *)
503 # FIXME: should be removed in autoconf 3.0.
504 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
505 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
506 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
507 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
508 ;;
509
510 esac
511 done
512
513 if test -n "$ac_prev"; then
514 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
515 { echo "$as_me: error: missing argument to $ac_option" >&2
516 { (exit 1); exit 1; }; }
517 fi
518
519 # Be sure to have absolute paths.
520 for ac_var in exec_prefix prefix
521 do
522 eval ac_val=$`echo "$ac_var"`
523 case "$ac_val" in
524 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
525 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
526 { (exit 1); exit 1; }; };;
527 esac
528 done
529
530 # Be sure to have absolute paths.
531 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
532 localstatedir libdir includedir oldincludedir infodir mandir
533 do
534 eval ac_val=$`echo "$ac_var"`
535 case "$ac_val" in
536 [\\/$]* | ?:[\\/]* ) ;;
537 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
538 { (exit 1); exit 1; }; };;
539 esac
540 done
541
542 # There might be people who depend on the old broken behavior: `$host'
543 # used to hold the argument of --host etc.
544 build=$build_alias
545 host=$host_alias
546 target=$target_alias
547
548 # FIXME: should be removed in autoconf 3.0.
549 if test "x$host_alias" != x; then
550 if test "x$build_alias" = x; then
551 cross_compiling=maybe
552 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
553 If a cross compiler is detected then cross compile mode will be used." >&2
554 elif test "x$build_alias" != "x$host_alias"; then
555 cross_compiling=yes
556 fi
557 fi
558
559 ac_tool_prefix=
560 test -n "$host_alias" && ac_tool_prefix=$host_alias-
561
562 test "$silent" = yes && exec 6>/dev/null
563
564 # Find the source files, if location was not specified.
565 if test -z "$srcdir"; then
566 ac_srcdir_defaulted=yes
567 # Try the directory containing this script, then its parent.
568 ac_prog=$0
569 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
570 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
571 srcdir=$ac_confdir
572 if test ! -r "$srcdir/$ac_unique_file"; then
573 srcdir=..
574 fi
575 else
576 ac_srcdir_defaulted=no
577 fi
578 if test ! -r "$srcdir/$ac_unique_file"; then
579 if test "$ac_srcdir_defaulted" = yes; then
580 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
581 { (exit 1); exit 1; }; }
582 else
583 { echo "$as_me: error: cannot find sources in $srcdir" >&2
584 { (exit 1); exit 1; }; }
585 fi
586 fi
587 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
588 ac_env_build_alias_set=${build_alias+set}
589 ac_env_build_alias_value=$build_alias
590 ac_cv_env_build_alias_set=${build_alias+set}
591 ac_cv_env_build_alias_value=$build_alias
592 ac_env_host_alias_set=${host_alias+set}
593 ac_env_host_alias_value=$host_alias
594 ac_cv_env_host_alias_set=${host_alias+set}
595 ac_cv_env_host_alias_value=$host_alias
596 ac_env_target_alias_set=${target_alias+set}
597 ac_env_target_alias_value=$target_alias
598 ac_cv_env_target_alias_set=${target_alias+set}
599 ac_cv_env_target_alias_value=$target_alias
600 ac_env_CC_set=${CC+set}
601 ac_env_CC_value=$CC
602 ac_cv_env_CC_set=${CC+set}
603 ac_cv_env_CC_value=$CC
604 ac_env_CFLAGS_set=${CFLAGS+set}
605 ac_env_CFLAGS_value=$CFLAGS
606 ac_cv_env_CFLAGS_set=${CFLAGS+set}
607 ac_cv_env_CFLAGS_value=$CFLAGS
608 ac_env_LDFLAGS_set=${LDFLAGS+set}
609 ac_env_LDFLAGS_value=$LDFLAGS
610 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
611 ac_cv_env_LDFLAGS_value=$LDFLAGS
612 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
613 ac_env_CPPFLAGS_value=$CPPFLAGS
614 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
615 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
616 ac_env_CPP_set=${CPP+set}
617 ac_env_CPP_value=$CPP
618 ac_cv_env_CPP_set=${CPP+set}
619 ac_cv_env_CPP_value=$CPP
620
621 #
622 # Report the --help message.
623 #
624 if test "$ac_init_help" = "long"; then
625 # Omit some internal or obsolete options to make the list less imposing.
626 # This message is too long to be a string in the A/UX 3.1 sh.
627 cat <<EOF
628 \`configure' configures this package to adapt to many kinds of systems.
629
630 Usage: $0 [OPTION]... [VAR=VALUE]...
631
632 To assign environment variables (e.g., CC, CFLAGS...), specify them as
633 VAR=VALUE. See below for descriptions of some of the useful variables.
634
635 Defaults for the options are specified in brackets.
636
637 Configuration:
638 -h, --help display this help and exit
639 --help=short display options specific to this package
640 --help=recursive display the short help of all the included packages
641 -V, --version display version information and exit
642 -q, --quiet, --silent do not print \`checking...' messages
643 --cache-file=FILE cache test results in FILE [disabled]
644 -C, --config-cache alias for \`--cache-file=config.cache'
645 -n, --no-create do not create output files
646 --srcdir=DIR find the sources in DIR [configure dir or \`..']
647
648 EOF
649
650 cat <<EOF
651 Installation directories:
652 --prefix=PREFIX install architecture-independent files in PREFIX
653 [$ac_default_prefix]
654 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
655 [PREFIX]
656
657 By default, \`make install' will install all the files in
658 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
659 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
660 for instance \`--prefix=\$HOME'.
661
662 For better control, use the options below.
663
664 Fine tuning of the installation directories:
665 --bindir=DIR user executables [EPREFIX/bin]
666 --sbindir=DIR system admin executables [EPREFIX/sbin]
667 --libexecdir=DIR program executables [EPREFIX/libexec]
668 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
669 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
670 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
671 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
672 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
673 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
674 --libdir=DIR object code libraries [EPREFIX/lib]
675 --includedir=DIR C header files [PREFIX/include]
676 --oldincludedir=DIR C header files for non-gcc [/usr/include]
677 --infodir=DIR info documentation [DATAROOTDIR/info]
678 --mandir=DIR man documentation [DATAROOTDIR/man]
679 EOF
680
681 cat <<\EOF
682
683 Program names:
684 --program-prefix=PREFIX prepend PREFIX to installed program names
685 --program-suffix=SUFFIX append SUFFIX to installed program names
686 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
687
688 X features:
689 --x-includes=DIR X include files are in DIR
690 --x-libraries=DIR X library files are in DIR
691
692 System types:
693 --build=BUILD configure for building on BUILD [guessed]
694 --host=HOST build programs to run on HOST [BUILD]
695 --target=TARGET configure for building compilers for TARGET [HOST]
696 EOF
697 fi
698
699 if test -n "$ac_init_help"; then
700
701 cat <<\EOF
702
703 Optional Packages:
704 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
705 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
706
707 Optional Features:
708 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
709 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
710
711 --with-system-type=XXX test: override derived host system-type
712 --disable-echo do not display "compiling" commands
713 --disable-largefile omit support for large files
714 --with-install-prefix=XXX sets DESTDIR, useful for packaging
715 --with-x use the X Window System
716 --enable-warnings test: turn on gcc compiler warnings
717 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
718 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
719 --with-pkg-config-libdir[=XXX] use given directory for installing pc-files
720 --enable-pc-files generate and install .pc files for pkg-config
721 --with-package=XXX rename dialog to XXX, library to libXXX.a, etc
722 --enable-header-subdir install dlg_XXX headers to subdirectory
723 --with-man2html[=XXX] use XXX rather than groff
724 --with-libiconv-prefix=DIR
725 search for libiconv in DIR/include and DIR/lib
726 --enable-nls use Native Language Support
727 --with-libintl-prefix=DIR
728 search for libintl in DIR/include and DIR/lib
729 --with-textdomain=PKG NLS text-domain (default is package name)
730 --disable-included-msgs do not use included messages for i18n support
731 --with-dmalloc test: use Gray Watson's dmalloc library
732 --with-dbmalloc test: use Conor Cahill's dbmalloc library
733 --with-purify test: use Purify
734 --with-valgrind test: use valgrind
735 --with-no-leaks test: free permanent memory, analyze leaks
736 --disable-trace do not support --trace option
737 --enable-rpath use rpath option when generating shared libraries
738 --with-rel-version=XXX override derived release version
739 --with-abi-version=XXX override derived ABI version
740 --disable-libtool-version enable to use libtool's incompatible naming scheme
741 --with-libtool generate libraries with libtool
742 --with-libtool-opts[=XXX] give libtool additional options XXX
743 --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE
744 --with-shared generate shared-libraries
745 --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
746 --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE
747 --with-curses-dir=DIR directory in which (n)curses is installed
748 --with-screen=XXX use specified curses-libraries
749 --with-ncursesw use wide ncurses-libraries
750 --with-ncurses use ncurses-libraries
751 --with-pdcurses compile/link with pdcurses X11 library
752 --with-curses-colr compile/link with HPUX 10.x color-curses
753 --with-curses-5lib compile/link with SunOS 5lib curses
754 --with-Xaw3d link with Xaw 3d library
755 --with-Xaw3dxft link with Xaw 3d xft library
756 --with-neXtaw link with neXT Athena library
757 --with-XawPlus link with Athena-Plus library
758 --disable-extras do not include extra dialogs
759 --disable-rc-file do not include config-file support
760 --disable-rc-file2 do not use extra attributes in config-file
761 --disable-Xdialog do not include Xdialog-style dialogs (1.1)
762 --disable-Xdialog2 do not include extra Xdialog-style dialogs (1.2)
763 --disable-whiptail do not map extra whiptail options
764 --disable-form do not include the form dialog
765 --disable-gauge do not include the gauge dialogs
766 --disable-tailbox do not include the tailbox dialog
767 --disable-mixedform do not include the mixedform dialog
768 --disable-mixedgauge do not include the mixedgauge dialog
769 --enable-widec enable wide-curses features
770 --disable-rpath-hack don't add rpath options for additional libraries
771
772 Some influential environment variables:
773 CC C compiler command
774 CFLAGS C compiler flags
775 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
776 nonstandard directory <lib dir>
777 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
778 headers in a nonstandard directory <include dir>
779 CPP C preprocessor
780
781 Use these variables to override the choices made by `configure' or to help
782 it to find libraries and programs with nonstandard names/locations.
783
784 EOF
785 fi
786
787 if test "$ac_init_help" = "recursive"; then
788 # If there are subdirs, report their specific --help.
789 ac_popdir=`pwd`
790 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
791 cd "$ac_subdir"
792 # A "../" for each directory in /$ac_subdir.
793 ac_dots=`echo "$ac_subdir" |
794 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
795
796 case "$srcdir" in
797 .) # No --srcdir option. We are building in place.
798 ac_sub_srcdir="$srcdir" ;;
799 [\\/]* | ?:[\\/]* ) # Absolute path.
800 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
801 *) # Relative path.
802 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
803 esac
804
805 # Check for guested configure; otherwise get Cygnus style configure.
806 if test -f "$ac_sub_srcdir/configure.gnu"; then
807 echo
808 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
809 elif test -f "$ac_sub_srcdir/configure"; then
810 echo
811 $SHELL "$ac_sub_srcdir/configure" --help=recursive
812 elif test -f "$ac_sub_srcdir/configure.ac" ||
813 test -f "$ac_sub_srcdir/configure.in"; then
814 echo
815 "$ac_configure" --help
816 else
817 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
818 fi
819 cd "$ac_popdir"
820 done
821 fi
822
823 test -n "$ac_init_help" && exit 0
824 if "$ac_init_version"; then
825 cat <<\EOF
826
827 Copyright 2003-2022,2023 Thomas E. Dickey
828 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
829 Free Software Foundation, Inc.
830 This configure script is free software; the Free Software Foundation
831 gives unlimited permission to copy, distribute and modify it.
832 EOF
833 exit 0
834 fi
835 exec 5>config.log
836 cat >&5 <<EOF
837 This file contains any messages produced by compilers while
838 running configure, to aid debugging if configure makes a mistake.
839
840 It was created by $as_me, which was
841 generated by GNU Autoconf 2.52.20250126. Invocation command line was
842
843 $ $0 $@
844
845 EOF
846 {
847 cat <<_ASUNAME
848 ## ---------- ##
849 ## Platform. ##
850 ## ---------- ##
851
852 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
853 uname -m = `(uname -m) 2>/dev/null || echo unknown`
854 uname -r = `(uname -r) 2>/dev/null || echo unknown`
855 uname -s = `(uname -s) 2>/dev/null || echo unknown`
856 uname -v = `(uname -v) 2>/dev/null || echo unknown`
857
858 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
859 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
860
861 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
862 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
863 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
864 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
865 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
866 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
867 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
868
869 PATH = $PATH
870
871 _ASUNAME
872 } >&5
873
874 cat >&5 <<EOF
875 ## ------------ ##
876 ## Core tests. ##
877 ## ------------ ##
878
879 EOF
880
881 # Keep a trace of the command line.
882 # Strip out --no-create and --no-recursion so they do not pile up.
883 # Also quote any args containing shell meta-characters.
884 ac_configure_args=
885 ac_sep=
886 for ac_arg
887 do
888 case "$ac_arg" in
889 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
890 | --no-cr | --no-c) ;;
891 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
892 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
893 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
894 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
895 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
896 ac_sep=" " ;;
897 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
898 ac_sep=" " ;;
899 esac
900 # Get rid of the leading space.
901 done
902
903 # When interrupted or exit'd, cleanup temporary files, and complete
904 # config.log. We remove comments because anyway the quotes in there
905 # would cause problems or look ugly.
906 trap 'exit_status=$?
907 # Save into config.log some information that might help in debugging.
908 echo >&5
909 echo "## ----------------- ##" >&5
910 echo "## Cache variables. ##" >&5
911 echo "## ----------------- ##" >&5
912 echo >&5
913 # The following way of writing the cache mishandles newlines in values,
914 {
915 (set) 2>&1 |
916 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
917 *ac_space=\ *)
918 sed -n \
919 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
920 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
921 ;;
922 *)
923 sed -n \
924 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
925 ;;
926 esac;
927 } >&5
928 sed "/^$/d" confdefs.h >conftest.log
929 if test -s conftest.log; then
930 echo >&5
931 echo "## ------------ ##" >&5
932 echo "## confdefs.h. ##" >&5
933 echo "## ------------ ##" >&5
934 echo >&5
935 cat conftest.log >&5
936 fi
937 (echo; echo) >&5
938 test "$ac_signal" != 0 &&
939 echo "$as_me: caught signal $ac_signal" >&5
940 echo "$as_me: exit $exit_status" >&5
941 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
942 exit $exit_status
943 ' 0
944 for ac_signal in 1 2 13 15; do
945 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
946 done
947 ac_signal=0
948
949 # confdefs.h avoids OS command line length limits that DEFS can exceed.
950 rm -rf conftest* confdefs.h
951 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
952 echo >confdefs.h
953
954 # Let the site file select an alternate cache file if it wants to.
955 # Prefer explicitly selected file to automatically selected ones.
956 if test -z "$CONFIG_SITE"; then
957 if test "x$prefix" != xNONE; then
958 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
959 else
960 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
961 fi
962 fi
963 for ac_site_file in $CONFIG_SITE; do
964 if test -r "$ac_site_file"; then
965 { echo "$as_me:965: loading site script $ac_site_file" >&5
966 echo "$as_me: loading site script $ac_site_file" >&6;}
967 cat "$ac_site_file" >&5
968 . "$ac_site_file"
969 fi
970 done
971
972 if test -r "$cache_file"; then
973 # Some versions of bash will fail to source /dev/null (special
974 # files actually), so we avoid doing that.
975 if test -f "$cache_file"; then
976 { echo "$as_me:976: loading cache $cache_file" >&5
977 echo "$as_me: loading cache $cache_file" >&6;}
978 case $cache_file in
979 [\\/]* | ?:[\\/]* ) . $cache_file;;
980 *) . ./$cache_file;;
981 esac
982 fi
983 else
984 { echo "$as_me:984: creating cache $cache_file" >&5
985 echo "$as_me: creating cache $cache_file" >&6;}
986 >$cache_file
987 fi
988
989 # Check that the precious variables saved in the cache have kept the same
990 # value.
991 ac_cache_corrupted=false
992 for ac_var in `(set) 2>&1 |
993 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
994 eval ac_old_set=\$ac_cv_env_${ac_var}_set
995 eval ac_new_set=\$ac_env_${ac_var}_set
996 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
997 eval ac_new_val="\$ac_env_${ac_var}_value"
998 case "$ac_old_set,$ac_new_set" in
999 set,)
1000 { echo "$as_me:1000: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1001 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1002 ac_cache_corrupted=: ;;
1003 ,set)
1004 { echo "$as_me:1004: error: \`$ac_var' was not set in the previous run" >&5
1005 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1006 ac_cache_corrupted=: ;;
1007 ,);;
1008 *)
1009 if test "x$ac_old_val" != "x$ac_new_val"; then
1010 { echo "$as_me:1010: error: \`$ac_var' has changed since the previous run:" >&5
1011 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1012 { echo "$as_me:1012: former value: $ac_old_val" >&5
1013 echo "$as_me: former value: $ac_old_val" >&2;}
1014 { echo "$as_me:1014: current value: $ac_new_val" >&5
1015 echo "$as_me: current value: $ac_new_val" >&2;}
1016 ac_cache_corrupted=:
1017 fi;;
1018 esac
1019 # Pass precious variables to config.status. It doesn't matter if
1020 # we pass some twice (in addition to the command line arguments).
1021 if test "$ac_new_set" = set; then
1022 case "$ac_new_val" in
1023 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1024 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1025 ac_configure_args="$ac_configure_args '$ac_arg'"
1026 ;;
1027 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1028 ;;
1029 esac
1030 fi
1031 done
1032 if "$ac_cache_corrupted"; then
1033 { echo "$as_me:1033: error: changes in the environment can compromise the build" >&5
1034 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1035 { { echo "$as_me:1035: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1036 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1037 { (exit 1); exit 1; }; }
1038 fi
1039
1040 ac_ext=c
1041 ac_cpp='$CPP $CPPFLAGS'
1042 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1043 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1044 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1045 ac_main_return="return"
1046
1047 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1048 *c*,-n*) ECHO_N=
1049 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1050 ECHO_T=' '
1051 ;;
1052 *c*,* ) ECHO_N=-n
1053 ECHO_C=
1054 ECHO_T=
1055 ;;
1056 *) ECHO_N=
1057 ECHO_C='\c'
1058 ECHO_T=
1059 ;;
1060 esac
1061 echo "#! $SHELL" >conftest.sh
1062 echo "exit 0" >>conftest.sh
1063 chmod +x conftest.sh
1064 if { (echo "$as_me:1064: PATH=\".;.\"; conftest.sh") >&5
1065 (PATH=".;."; conftest.sh) 2>&5
1066 ac_status=$?
1067 echo "$as_me:1067: \$? = $ac_status" >&5
1068 (exit "$ac_status"); }; then
1069 ac_path_separator=';'
1070 else
1071 ac_path_separator=:
1072 fi
1073 PATH_SEPARATOR="$ac_path_separator"
1074 rm -f conftest.sh
1075
1076 ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1077
1078 ac_aux_dir=
1079 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1080 if test -f "$ac_dir/install-sh"; then
1081 ac_aux_dir=$ac_dir
1082 ac_install_sh="$ac_aux_dir/install-sh -c"
1083 break
1084 elif test -f "$ac_dir/install.sh"; then
1085 ac_aux_dir=$ac_dir
1086 ac_install_sh="$ac_aux_dir/install.sh -c"
1087 break
1088 elif test -f "$ac_dir/shtool"; then
1089 ac_aux_dir=$ac_dir
1090 ac_install_sh="$ac_aux_dir/shtool install -c"
1091 break
1092 fi
1093 done
1094 if test -z "$ac_aux_dir"; then
1095 { { echo "$as_me:1095: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1096 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1097 { (exit 1); exit 1; }; }
1098 fi
1099 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1100 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1101 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1102
1103 # Make sure we can run config.sub.
1104 $ac_config_sub sun4 >/dev/null 2>&1 ||
1105 { { echo "$as_me:1105: error: cannot run $ac_config_sub" >&5
1106 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1107 { (exit 1); exit 1; }; }
1108
1109 echo "$as_me:1109: checking build system type" >&5
1110 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1111 if test "${ac_cv_build+set}" = set; then
1112 echo $ECHO_N "(cached) $ECHO_C" >&6
1113 else
1114 ac_cv_build_alias=$build_alias
1115 test -z "$ac_cv_build_alias" &&
1116 ac_cv_build_alias=`$ac_config_guess`
1117 test -z "$ac_cv_build_alias" &&
1118 { { echo "$as_me:1118: error: cannot guess build type; you must specify one" >&5
1119 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1120 { (exit 1); exit 1; }; }
1121 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1122 { { echo "$as_me:1122: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1123 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1124 { (exit 1); exit 1; }; }
1125
1126 fi
1127 echo "$as_me:1127: result: $ac_cv_build" >&5
1128 echo "${ECHO_T}$ac_cv_build" >&6
1129 build=$ac_cv_build
1130 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1131 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1132 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1133
1134 echo "$as_me:1134: checking host system type" >&5
1135 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1136 if test "${ac_cv_host+set}" = set; then
1137 echo $ECHO_N "(cached) $ECHO_C" >&6
1138 else
1139 ac_cv_host_alias=$host_alias
1140 test -z "$ac_cv_host_alias" &&
1141 ac_cv_host_alias=$ac_cv_build_alias
1142 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1143 { { echo "$as_me:1143: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1144 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1145 { (exit 1); exit 1; }; }
1146
1147 fi
1148 echo "$as_me:1148: result: $ac_cv_host" >&5
1149 echo "${ECHO_T}$ac_cv_host" >&6
1150 host=$ac_cv_host
1151 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1152 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1153 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1154
1155 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1156 echo "$as_me:1156: checking target system type" >&5
1157 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1158 if test "${ac_cv_target+set}" = set; then
1159 echo $ECHO_N "(cached) $ECHO_C" >&6
1160 else
1161 ac_cv_target_alias=$target_alias
1162 test "x$ac_cv_target_alias" = "x" &&
1163 ac_cv_target_alias=$ac_cv_host_alias
1164 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1165 { { echo "$as_me:1165: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1166 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1167 { (exit 1); exit 1; }; }
1168
1169 fi
1170 echo "$as_me:1170: result: $ac_cv_target" >&5
1171 echo "${ECHO_T}$ac_cv_target" >&6
1172 target=$ac_cv_target
1173 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1174 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1175 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1176
1177 # The aliases save the names the user supplied, while $host etc.
1178 # will get canonicalized.
1179 test -n "$target_alias" &&
1180 test "$program_prefix$program_suffix$program_transform_name" = \
1181 NONENONEs,x,x, &&
1182 program_prefix=${target_alias}-
1183 system_name="$host_os"
1184 else
1185 system_name="`(uname -s -r) 2>/dev/null`"
1186 if test -z "$system_name" ; then
1187 system_name="`(hostname) 2>/dev/null`"
1188 fi
1189 fi
1190 test -n "$system_name" &&
1191 cat >>confdefs.h <<EOF
1192 #define SYSTEM_NAME "$system_name"
1193 EOF
1194
1195 if test "${cf_cv_system_name+set}" = set; then
1196 echo $ECHO_N "(cached) $ECHO_C" >&6
1197 else
1198 cf_cv_system_name="$system_name"
1199 fi
1200
1201 test -z "$system_name" && system_name="$cf_cv_system_name"
1202 test -n "$cf_cv_system_name" && echo "$as_me:1202: result: Configuring for $cf_cv_system_name" >&5
1203 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1204
1205 if test ".$system_name" != ".$cf_cv_system_name" ; then
1206 echo "$as_me:1206: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1207 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1208 { { echo "$as_me:1208: error: \"Please remove config.cache and try again.\"" >&5
1209 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1210 { (exit 1); exit 1; }; }
1211 fi
1212
1213 # Check whether --with-system-type or --without-system-type was given.
1214 if test "${with_system_type+set}" = set; then
1215 withval="$with_system_type"
1216 { echo "$as_me:1216: WARNING: overriding system type to $withval" >&5
1217 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1218 cf_cv_system_name=$withval
1219 host_os=$withval
1220
1221 fi;
1222
1223 test "$program_prefix" != NONE &&
1224 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1225 # Use a double $ so make ignores it.
1226 test "$program_suffix" != NONE &&
1227 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1228 # Double any \ or $. echo might interpret backslashes.
1229 # By default was `s,x,x', remove it if useless.
1230 cat <<\_ACEOF >conftest.sed
1231 s/[\\$]/&&/g;s/;s,x,x,$//
1232 _ACEOF
1233 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1234 rm conftest.sed
1235
1236 DESTDIR=
1237
1238 ac_ext=c
1239 ac_cpp='$CPP $CPPFLAGS'
1240 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1241 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1242 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1243 ac_main_return="return"
1244 if test -n "$ac_tool_prefix"; then
1245 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1246 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1247 echo "$as_me:1247: checking for $ac_word" >&5
1248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1249 if test "${ac_cv_prog_CC+set}" = set; then
1250 echo $ECHO_N "(cached) $ECHO_C" >&6
1251 else
1252 if test -n "$CC"; then
1253 ac_cv_prog_CC="$CC" # Let the user override the test.
1254 else
1255 ac_save_IFS=$IFS; IFS=$ac_path_separator
1256 ac_dummy="$PATH"
1257 for ac_dir in $ac_dummy; do
1258 IFS=$ac_save_IFS
1259 test -z "$ac_dir" && ac_dir=.
1260 $as_executable_p "$ac_dir/$ac_word" || continue
1261 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1262 echo "$as_me:1262: found $ac_dir/$ac_word" >&5
1263 break
1264 done
1265
1266 fi
1267 fi
1268 CC=$ac_cv_prog_CC
1269 if test -n "$CC"; then
1270 echo "$as_me:1270: result: $CC" >&5
1271 echo "${ECHO_T}$CC" >&6
1272 else
1273 echo "$as_me:1273: result: no" >&5
1274 echo "${ECHO_T}no" >&6
1275 fi
1276
1277 fi
1278 if test -z "$ac_cv_prog_CC"; then
1279 ac_ct_CC=$CC
1280 # Extract the first word of "gcc", so it can be a program name with args.
1281 set dummy gcc; ac_word=$2
1282 echo "$as_me:1282: checking for $ac_word" >&5
1283 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1284 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1285 echo $ECHO_N "(cached) $ECHO_C" >&6
1286 else
1287 if test -n "$ac_ct_CC"; then
1288 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1289 else
1290 ac_save_IFS=$IFS; IFS=$ac_path_separator
1291 ac_dummy="$PATH"
1292 for ac_dir in $ac_dummy; do
1293 IFS=$ac_save_IFS
1294 test -z "$ac_dir" && ac_dir=.
1295 $as_executable_p "$ac_dir/$ac_word" || continue
1296 ac_cv_prog_ac_ct_CC="gcc"
1297 echo "$as_me:1297: found $ac_dir/$ac_word" >&5
1298 break
1299 done
1300
1301 fi
1302 fi
1303 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1304 if test -n "$ac_ct_CC"; then
1305 echo "$as_me:1305: result: $ac_ct_CC" >&5
1306 echo "${ECHO_T}$ac_ct_CC" >&6
1307 else
1308 echo "$as_me:1308: result: no" >&5
1309 echo "${ECHO_T}no" >&6
1310 fi
1311
1312 CC=$ac_ct_CC
1313 else
1314 CC="$ac_cv_prog_CC"
1315 fi
1316
1317 if test -z "$CC"; then
1318 if test -n "$ac_tool_prefix"; then
1319 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1320 set dummy ${ac_tool_prefix}cc; ac_word=$2
1321 echo "$as_me:1321: checking for $ac_word" >&5
1322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1323 if test "${ac_cv_prog_CC+set}" = set; then
1324 echo $ECHO_N "(cached) $ECHO_C" >&6
1325 else
1326 if test -n "$CC"; then
1327 ac_cv_prog_CC="$CC" # Let the user override the test.
1328 else
1329 ac_save_IFS=$IFS; IFS=$ac_path_separator
1330 ac_dummy="$PATH"
1331 for ac_dir in $ac_dummy; do
1332 IFS=$ac_save_IFS
1333 test -z "$ac_dir" && ac_dir=.
1334 $as_executable_p "$ac_dir/$ac_word" || continue
1335 ac_cv_prog_CC="${ac_tool_prefix}cc"
1336 echo "$as_me:1336: found $ac_dir/$ac_word" >&5
1337 break
1338 done
1339
1340 fi
1341 fi
1342 CC=$ac_cv_prog_CC
1343 if test -n "$CC"; then
1344 echo "$as_me:1344: result: $CC" >&5
1345 echo "${ECHO_T}$CC" >&6
1346 else
1347 echo "$as_me:1347: result: no" >&5
1348 echo "${ECHO_T}no" >&6
1349 fi
1350
1351 fi
1352 if test -z "$ac_cv_prog_CC"; then
1353 ac_ct_CC=$CC
1354 # Extract the first word of "cc", so it can be a program name with args.
1355 set dummy cc; ac_word=$2
1356 echo "$as_me:1356: checking for $ac_word" >&5
1357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1358 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1359 echo $ECHO_N "(cached) $ECHO_C" >&6
1360 else
1361 if test -n "$ac_ct_CC"; then
1362 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1363 else
1364 ac_save_IFS=$IFS; IFS=$ac_path_separator
1365 ac_dummy="$PATH"
1366 for ac_dir in $ac_dummy; do
1367 IFS=$ac_save_IFS
1368 test -z "$ac_dir" && ac_dir=.
1369 $as_executable_p "$ac_dir/$ac_word" || continue
1370 ac_cv_prog_ac_ct_CC="cc"
1371 echo "$as_me:1371: found $ac_dir/$ac_word" >&5
1372 break
1373 done
1374
1375 fi
1376 fi
1377 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1378 if test -n "$ac_ct_CC"; then
1379 echo "$as_me:1379: result: $ac_ct_CC" >&5
1380 echo "${ECHO_T}$ac_ct_CC" >&6
1381 else
1382 echo "$as_me:1382: result: no" >&5
1383 echo "${ECHO_T}no" >&6
1384 fi
1385
1386 CC=$ac_ct_CC
1387 else
1388 CC="$ac_cv_prog_CC"
1389 fi
1390
1391 fi
1392 if test -z "$CC"; then
1393 # Extract the first word of "cc", so it can be a program name with args.
1394 set dummy cc; ac_word=$2
1395 echo "$as_me:1395: checking for $ac_word" >&5
1396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1397 if test "${ac_cv_prog_CC+set}" = set; then
1398 echo $ECHO_N "(cached) $ECHO_C" >&6
1399 else
1400 if test -n "$CC"; then
1401 ac_cv_prog_CC="$CC" # Let the user override the test.
1402 else
1403 ac_prog_rejected=no
1404 ac_save_IFS=$IFS; IFS=$ac_path_separator
1405 ac_dummy="$PATH"
1406 for ac_dir in $ac_dummy; do
1407 IFS=$ac_save_IFS
1408 test -z "$ac_dir" && ac_dir=.
1409 $as_executable_p "$ac_dir/$ac_word" || continue
1410 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1411 ac_prog_rejected=yes
1412 continue
1413 fi
1414 ac_cv_prog_CC="cc"
1415 echo "$as_me:1415: found $ac_dir/$ac_word" >&5
1416 break
1417 done
1418
1419 if test "$ac_prog_rejected" = yes; then
1420 # We found a bogon in the path, so make sure we never use it.
1421 set dummy $ac_cv_prog_CC
1422 shift
1423 if test $# != 0; then
1424 # We chose a different compiler from the bogus one.
1425 # However, it has the same basename, so the bogon will be chosen
1426 # first if we set CC to just the basename; use the full file name.
1427 shift
1428 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1429 shift
1430 ac_cv_prog_CC="$@"
1431 fi
1432 fi
1433 fi
1434 fi
1435 CC=$ac_cv_prog_CC
1436 if test -n "$CC"; then
1437 echo "$as_me:1437: result: $CC" >&5
1438 echo "${ECHO_T}$CC" >&6
1439 else
1440 echo "$as_me:1440: result: no" >&5
1441 echo "${ECHO_T}no" >&6
1442 fi
1443
1444 fi
1445 if test -z "$CC"; then
1446 if test -n "$ac_tool_prefix"; then
1447 for ac_prog in cl
1448 do
1449 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1450 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1451 echo "$as_me:1451: checking for $ac_word" >&5
1452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1453 if test "${ac_cv_prog_CC+set}" = set; then
1454 echo $ECHO_N "(cached) $ECHO_C" >&6
1455 else
1456 if test -n "$CC"; then
1457 ac_cv_prog_CC="$CC" # Let the user override the test.
1458 else
1459 ac_save_IFS=$IFS; IFS=$ac_path_separator
1460 ac_dummy="$PATH"
1461 for ac_dir in $ac_dummy; do
1462 IFS=$ac_save_IFS
1463 test -z "$ac_dir" && ac_dir=.
1464 $as_executable_p "$ac_dir/$ac_word" || continue
1465 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1466 echo "$as_me:1466: found $ac_dir/$ac_word" >&5
1467 break
1468 done
1469
1470 fi
1471 fi
1472 CC=$ac_cv_prog_CC
1473 if test -n "$CC"; then
1474 echo "$as_me:1474: result: $CC" >&5
1475 echo "${ECHO_T}$CC" >&6
1476 else
1477 echo "$as_me:1477: result: no" >&5
1478 echo "${ECHO_T}no" >&6
1479 fi
1480
1481 test -n "$CC" && break
1482 done
1483 fi
1484 if test -z "$CC"; then
1485 ac_ct_CC=$CC
1486 for ac_prog in cl
1487 do
1488 # Extract the first word of "$ac_prog", so it can be a program name with args.
1489 set dummy $ac_prog; ac_word=$2
1490 echo "$as_me:1490: checking for $ac_word" >&5
1491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1492 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1493 echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495 if test -n "$ac_ct_CC"; then
1496 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1497 else
1498 ac_save_IFS=$IFS; IFS=$ac_path_separator
1499 ac_dummy="$PATH"
1500 for ac_dir in $ac_dummy; do
1501 IFS=$ac_save_IFS
1502 test -z "$ac_dir" && ac_dir=.
1503 $as_executable_p "$ac_dir/$ac_word" || continue
1504 ac_cv_prog_ac_ct_CC="$ac_prog"
1505 echo "$as_me:1505: found $ac_dir/$ac_word" >&5
1506 break
1507 done
1508
1509 fi
1510 fi
1511 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1512 if test -n "$ac_ct_CC"; then
1513 echo "$as_me:1513: result: $ac_ct_CC" >&5
1514 echo "${ECHO_T}$ac_ct_CC" >&6
1515 else
1516 echo "$as_me:1516: result: no" >&5
1517 echo "${ECHO_T}no" >&6
1518 fi
1519
1520 test -n "$ac_ct_CC" && break
1521 done
1522
1523 CC=$ac_ct_CC
1524 fi
1525
1526 fi
1527
1528 test -z "$CC" && { { echo "$as_me:1528: error: no acceptable cc found in \$PATH" >&5
1529 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1530 { (exit 1); exit 1; }; }
1531
1532 # Provide some information about the compiler.
1533 echo "$as_me:1533:" \
1534 "checking for C compiler version" >&5
1535 ac_compiler=`set X $ac_compile; echo "$2"`
1536 { (eval echo "$as_me:1536: \"$ac_compiler --version </dev/null >&5\"") >&5
1537 (eval $ac_compiler --version </dev/null >&5) 2>&5
1538 ac_status=$?
1539 echo "$as_me:1539: \$? = $ac_status" >&5
1540 (exit "$ac_status"); }
1541 { (eval echo "$as_me:1541: \"$ac_compiler -v </dev/null >&5\"") >&5
1542 (eval $ac_compiler -v </dev/null >&5) 2>&5
1543 ac_status=$?
1544 echo "$as_me:1544: \$? = $ac_status" >&5
1545 (exit "$ac_status"); }
1546 { (eval echo "$as_me:1546: \"$ac_compiler -V </dev/null >&5\"") >&5
1547 (eval $ac_compiler -V </dev/null >&5) 2>&5
1548 ac_status=$?
1549 echo "$as_me:1549: \$? = $ac_status" >&5
1550 (exit "$ac_status"); }
1551
1552 cat >"conftest.$ac_ext" <<_ACEOF
1553 #line 1553 "configure"
1554 #include "confdefs.h"
1555
1556 int
1557 main (void)
1558 {
1559
1560 ;
1561 return 0;
1562 }
1563 _ACEOF
1564 ac_clean_files_save=$ac_clean_files
1565 ac_clean_files="$ac_clean_files a.out a.exe"
1566 # Try to create an executable without -o first, disregard a.out.
1567 # It will help us diagnose broken compilers, and finding out an intuition
1568 # of exeext.
1569 echo "$as_me:1569: checking for C compiler default output" >&5
1570 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1571 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1572 if { (eval echo "$as_me:1572: \"$ac_link_default\"") >&5
1573 (eval $ac_link_default) 2>&5
1574 ac_status=$?
1575 echo "$as_me:1575: \$? = $ac_status" >&5
1576 (exit "$ac_status"); }; then
1577 # Find the output, starting from the most likely. This scheme is
1578 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579 # resort.
1580 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1581 ls a.out conftest 2>/dev/null;
1582 ls a.* conftest.* 2>/dev/null`; do
1583 case $ac_file in
1584 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1585 a.out ) # We found the default executable, but exeext='' is most
1586 # certainly right.
1587 break;;
1588 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1589 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1590 export ac_cv_exeext
1591 break;;
1592 * ) break;;
1593 esac
1594 done
1595 else
1596 echo "$as_me: failed program was:" >&5
1597 cat "conftest.$ac_ext" >&5
1598 { { echo "$as_me:1598: error: C compiler cannot create executables" >&5
1599 echo "$as_me: error: C compiler cannot create executables" >&2;}
1600 { (exit 77); exit 77; }; }
1601 fi
1602
1603 ac_exeext=$ac_cv_exeext
1604 echo "$as_me:1604: result: $ac_file" >&5
1605 echo "${ECHO_T}$ac_file" >&6
1606
1607 # Check the compiler produces executables we can run. If not, either
1608 # the compiler is broken, or we cross compile.
1609 echo "$as_me:1609: checking whether the C compiler works" >&5
1610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1612 # If not cross compiling, check that we can run a simple program.
1613 if test "$cross_compiling" != yes; then
1614 if { ac_try='./$ac_file'
1615 { (eval echo "$as_me:1615: \"$ac_try\"") >&5
1616 (eval $ac_try) 2>&5
1617 ac_status=$?
1618 echo "$as_me:1618: \$? = $ac_status" >&5
1619 (exit "$ac_status"); }; }; then
1620 cross_compiling=no
1621 else
1622 if test "$cross_compiling" = maybe; then
1623 cross_compiling=yes
1624 else
1625 { { echo "$as_me:1625: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&5
1627 echo "$as_me: error: cannot run C compiled programs.
1628 If you meant to cross compile, use \`--host'." >&2;}
1629 { (exit 1); exit 1; }; }
1630 fi
1631 fi
1632 fi
1633 echo "$as_me:1633: result: yes" >&5
1634 echo "${ECHO_T}yes" >&6
1635
1636 rm -f a.out a.exe "conftest$ac_cv_exeext"
1637 ac_clean_files=$ac_clean_files_save
1638 # Check the compiler produces executables we can run. If not, either
1639 # the compiler is broken, or we cross compile.
1640 echo "$as_me:1640: checking whether we are cross compiling" >&5
1641 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1642 echo "$as_me:1642: result: $cross_compiling" >&5
1643 echo "${ECHO_T}$cross_compiling" >&6
1644
1645 echo "$as_me:1645: checking for executable suffix" >&5
1646 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1647 if { (eval echo "$as_me:1647: \"$ac_link\"") >&5
1648 (eval $ac_link) 2>&5
1649 ac_status=$?
1650 echo "$as_me:1650: \$? = $ac_status" >&5
1651 (exit "$ac_status"); }; then
1652 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1653 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1654 # work properly (i.e., refer to `conftest.exe'), while it won't with
1655 # `rm'.
1656 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1657 case $ac_file in
1658 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1659 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1660 export ac_cv_exeext
1661 break;;
1662 * ) break;;
1663 esac
1664 done
1665 else
1666 { { echo "$as_me:1666: error: cannot compute EXEEXT: cannot compile and link" >&5
1667 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1668 { (exit 1); exit 1; }; }
1669 fi
1670
1671 rm -f "conftest$ac_cv_exeext"
1672 echo "$as_me:1672: result: $ac_cv_exeext" >&5
1673 echo "${ECHO_T}$ac_cv_exeext" >&6
1674
1675 rm -f "conftest.$ac_ext"
1676 EXEEXT=$ac_cv_exeext
1677 ac_exeext=$EXEEXT
1678 echo "$as_me:1678: checking for object suffix" >&5
1679 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1680 if test "${ac_cv_objext+set}" = set; then
1681 echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683 cat >"conftest.$ac_ext" <<_ACEOF
1684 #line 1684 "configure"
1685 #include "confdefs.h"
1686
1687 int
1688 main (void)
1689 {
1690
1691 ;
1692 return 0;
1693 }
1694 _ACEOF
1695 rm -f conftest.o conftest.obj
1696 if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
1697 (eval $ac_compile) 2>&5
1698 ac_status=$?
1699 echo "$as_me:1699: \$? = $ac_status" >&5
1700 (exit "$ac_status"); }; then
1701 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1702 case $ac_file in
1703 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1704 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1705 break;;
1706 esac
1707 done
1708 else
1709 echo "$as_me: failed program was:" >&5
1710 cat "conftest.$ac_ext" >&5
1711 { { echo "$as_me:1711: error: cannot compute OBJEXT: cannot compile" >&5
1712 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1713 { (exit 1); exit 1; }; }
1714 fi
1715
1716 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1717 fi
1718 echo "$as_me:1718: result: $ac_cv_objext" >&5
1719 echo "${ECHO_T}$ac_cv_objext" >&6
1720 OBJEXT=$ac_cv_objext
1721 ac_objext=$OBJEXT
1722 echo "$as_me:1722: checking whether we are using the GNU C compiler" >&5
1723 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1724 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1725 echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727 cat >"conftest.$ac_ext" <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main (void)
1733 {
1734 #ifndef __GNUC__
1735 choke me
1736 #endif
1737
1738 ;
1739 return 0;
1740 }
1741 _ACEOF
1742 rm -f "conftest.$ac_objext"
1743 if { (eval echo "$as_me:1743: \"$ac_compile\"") >&5
1744 (eval $ac_compile) 2>&5
1745 ac_status=$?
1746 echo "$as_me:1746: \$? = $ac_status" >&5
1747 (exit "$ac_status"); } &&
1748 { ac_try='test -s "conftest.$ac_objext"'
1749 { (eval echo "$as_me:1749: \"$ac_try\"") >&5
1750 (eval $ac_try) 2>&5
1751 ac_status=$?
1752 echo "$as_me:1752: \$? = $ac_status" >&5
1753 (exit "$ac_status"); }; }; then
1754 ac_compiler_gnu=yes
1755 else
1756 echo "$as_me: failed program was:" >&5
1757 cat "conftest.$ac_ext" >&5
1758 ac_compiler_gnu=no
1759 fi
1760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1762
1763 fi
1764 echo "$as_me:1764: result: $ac_cv_c_compiler_gnu" >&5
1765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1766 GCC=`test $ac_compiler_gnu = yes && echo yes`
1767 ac_test_CFLAGS=${CFLAGS+set}
1768 ac_save_CFLAGS=$CFLAGS
1769 CFLAGS="-g"
1770 echo "$as_me:1770: checking whether $CC accepts -g" >&5
1771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1772 if test "${ac_cv_prog_cc_g+set}" = set; then
1773 echo $ECHO_N "(cached) $ECHO_C" >&6
1774 else
1775 cat >"conftest.$ac_ext" <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778
1779 int
1780 main (void)
1781 {
1782
1783 ;
1784 return 0;
1785 }
1786 _ACEOF
1787 rm -f "conftest.$ac_objext"
1788 if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5
1789 (eval $ac_compile) 2>&5
1790 ac_status=$?
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); } &&
1793 { ac_try='test -s "conftest.$ac_objext"'
1794 { (eval echo "$as_me:1794: \"$ac_try\"") >&5
1795 (eval $ac_try) 2>&5
1796 ac_status=$?
1797 echo "$as_me:1797: \$? = $ac_status" >&5
1798 (exit "$ac_status"); }; }; then
1799 ac_cv_prog_cc_g=yes
1800 else
1801 echo "$as_me: failed program was:" >&5
1802 cat "conftest.$ac_ext" >&5
1803 ac_cv_prog_cc_g=no
1804 fi
1805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_prog_cc_g" >&5
1808 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1809 if test "$ac_test_CFLAGS" = set; then
1810 CFLAGS=$ac_save_CFLAGS
1811 elif test $ac_cv_prog_cc_g = yes; then
1812 if test "$GCC" = yes; then
1813 CFLAGS="-g -O2"
1814 else
1815 CFLAGS="-g"
1816 fi
1817 else
1818 if test "$GCC" = yes; then
1819 CFLAGS="-O2"
1820 else
1821 CFLAGS=
1822 fi
1823 fi
1824 # Some people use a C++ compiler to compile C. Since we use `exit',
1825 # in C++ we need to declare it. In case someone uses the same compiler
1826 # for both compiling C and C++ we need to have the C++ compiler decide
1827 # the declaration of exit, since it's the most demanding environment.
1828 cat >"conftest.$ac_ext" <<_ACEOF
1829 #ifndef __cplusplus
1830 choke me
1831 #endif
1832 _ACEOF
1833 rm -f "conftest.$ac_objext"
1834 if { (eval echo "$as_me:1834: \"$ac_compile\"") >&5
1835 (eval $ac_compile) 2>&5
1836 ac_status=$?
1837 echo "$as_me:1837: \$? = $ac_status" >&5
1838 (exit "$ac_status"); } &&
1839 { ac_try='test -s "conftest.$ac_objext"'
1840 { (eval echo "$as_me:1840: \"$ac_try\"") >&5
1841 (eval $ac_try) 2>&5
1842 ac_status=$?
1843 echo "$as_me:1843: \$? = $ac_status" >&5
1844 (exit "$ac_status"); }; }; then
1845 for ac_declaration in \
1846 ''\
1847 '#include <stdlib.h>' \
1848 'extern "C" void std::exit (int) throw (); using std::exit;' \
1849 'extern "C" void std::exit (int); using std::exit;' \
1850 'extern "C" void exit (int) throw ();' \
1851 'extern "C" void exit (int);' \
1852 'void exit (int);'
1853 do
1854 cat >"conftest.$ac_ext" <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857 #include <stdlib.h>
1858 $ac_declaration
1859 int
1860 main (void)
1861 {
1862 exit (42);
1863 ;
1864 return 0;
1865 }
1866 _ACEOF
1867 rm -f "conftest.$ac_objext"
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869 (eval $ac_compile) 2>&5
1870 ac_status=$?
1871 echo "$as_me:1871: \$? = $ac_status" >&5
1872 (exit "$ac_status"); } &&
1873 { ac_try='test -s "conftest.$ac_objext"'
1874 { (eval echo "$as_me:1874: \"$ac_try\"") >&5
1875 (eval $ac_try) 2>&5
1876 ac_status=$?
1877 echo "$as_me:1877: \$? = $ac_status" >&5
1878 (exit "$ac_status"); }; }; then
1879 :
1880 else
1881 echo "$as_me: failed program was:" >&5
1882 cat "conftest.$ac_ext" >&5
1883 continue
1884 fi
1885 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1886 cat >"conftest.$ac_ext" <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889 $ac_declaration
1890 int
1891 main (void)
1892 {
1893 exit (42);
1894 ;
1895 return 0;
1896 }
1897 _ACEOF
1898 rm -f "conftest.$ac_objext"
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900 (eval $ac_compile) 2>&5
1901 ac_status=$?
1902 echo "$as_me:1902: \$? = $ac_status" >&5
1903 (exit "$ac_status"); } &&
1904 { ac_try='test -s "conftest.$ac_objext"'
1905 { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906 (eval $ac_try) 2>&5
1907 ac_status=$?
1908 echo "$as_me:1908: \$? = $ac_status" >&5
1909 (exit "$ac_status"); }; }; then
1910 break
1911 else
1912 echo "$as_me: failed program was:" >&5
1913 cat "conftest.$ac_ext" >&5
1914 fi
1915 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1916 done
1917 rm -rf conftest*
1918 if test -n "$ac_declaration"; then
1919 echo '#ifdef __cplusplus' >>confdefs.h
1920 echo "$ac_declaration" >>confdefs.h
1921 echo '#endif' >>confdefs.h
1922 fi
1923
1924 else
1925 echo "$as_me: failed program was:" >&5
1926 cat "conftest.$ac_ext" >&5
1927 fi
1928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1929 ac_ext=c
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1932 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1934 ac_main_return="return"
1935
1936 GCC_VERSION=none
1937 if test "$GCC" = yes ; then
1938 echo "$as_me:1938: checking version of $CC" >&5
1939 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1940 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1941 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1942 echo "$as_me:1942: result: $GCC_VERSION" >&5
1943 echo "${ECHO_T}$GCC_VERSION" >&6
1944 fi
1945
1946 INTEL_COMPILER=no
1947
1948 if test "$GCC" = yes ; then
1949 case "$host_os" in
1950 (linux*|gnu*)
1951 echo "$as_me:1951: checking if this is really Intel C compiler" >&5
1952 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1953 cf_save_CFLAGS="$CFLAGS"
1954 CFLAGS="$CFLAGS -no-gcc"
1955 cat >"conftest.$ac_ext" <<_ACEOF
1956 #line 1956 "configure"
1957 #include "confdefs.h"
1958
1959 int
1960 main (void)
1961 {
1962
1963 #ifdef __INTEL_COMPILER
1964 #else
1965 #error __INTEL_COMPILER is not defined
1966 #endif
1967
1968 ;
1969 return 0;
1970 }
1971 _ACEOF
1972 rm -f "conftest.$ac_objext"
1973 if { (eval echo "$as_me:1973: \"$ac_compile\"") >&5
1974 (eval $ac_compile) 2>&5
1975 ac_status=$?
1976 echo "$as_me:1976: \$? = $ac_status" >&5
1977 (exit "$ac_status"); } &&
1978 { ac_try='test -s "conftest.$ac_objext"'
1979 { (eval echo "$as_me:1979: \"$ac_try\"") >&5
1980 (eval $ac_try) 2>&5
1981 ac_status=$?
1982 echo "$as_me:1982: \$? = $ac_status" >&5
1983 (exit "$ac_status"); }; }; then
1984 INTEL_COMPILER=yes
1985 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1986
1987 else
1988 echo "$as_me: failed program was:" >&5
1989 cat "conftest.$ac_ext" >&5
1990 fi
1991 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1992 CFLAGS="$cf_save_CFLAGS"
1993 echo "$as_me:1993: result: $INTEL_COMPILER" >&5
1994 echo "${ECHO_T}$INTEL_COMPILER" >&6
1995 ;;
1996 esac
1997 fi
1998
1999 CLANG_COMPILER=no
2000
2001 if test "$GCC" = yes ; then
2002 echo "$as_me:2002: checking if this is really Clang C compiler" >&5
2003 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2004 cf_save_CFLAGS="$CFLAGS"
2005 cat >"conftest.$ac_ext" <<_ACEOF
2006 #line 2006 "configure"
2007 #include "confdefs.h"
2008
2009 int
2010 main (void)
2011 {
2012
2013 #ifdef __clang__
2014 #else
2015 #error __clang__ is not defined
2016 #endif
2017
2018 ;
2019 return 0;
2020 }
2021 _ACEOF
2022 rm -f "conftest.$ac_objext"
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024 (eval $ac_compile) 2>&5
2025 ac_status=$?
2026 echo "$as_me:2026: \$? = $ac_status" >&5
2027 (exit "$ac_status"); } &&
2028 { ac_try='test -s "conftest.$ac_objext"'
2029 { (eval echo "$as_me:2029: \"$ac_try\"") >&5
2030 (eval $ac_try) 2>&5
2031 ac_status=$?
2032 echo "$as_me:2032: \$? = $ac_status" >&5
2033 (exit "$ac_status"); }; }; then
2034 CLANG_COMPILER=yes
2035
2036 else
2037 echo "$as_me: failed program was:" >&5
2038 cat "conftest.$ac_ext" >&5
2039 fi
2040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2041 CFLAGS="$cf_save_CFLAGS"
2042 echo "$as_me:2042: result: $CLANG_COMPILER" >&5
2043 echo "${ECHO_T}$CLANG_COMPILER" >&6
2044 fi
2045
2046 CLANG_VERSION=none
2047
2048 if test "x$CLANG_COMPILER" = "xyes" ; then
2049 case "$CC" in
2050 (c[1-9][0-9]|*/c[1-9][0-9])
2051 { echo "$as_me:2051: WARNING: replacing broken compiler alias $CC" >&5
2052 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2053 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2054 CC=clang
2055 ;;
2056 esac
2057
2058 echo "$as_me:2058: checking version of $CC" >&5
2059 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2060 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.].*//'`"
2061 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2062 echo "$as_me:2062: result: $CLANG_VERSION" >&5
2063 echo "${ECHO_T}$CLANG_VERSION" >&6
2064
2065 for cf_clang_opt in \
2066 -Qunused-arguments \
2067 -Wno-error=implicit-function-declaration
2068 do
2069 echo "$as_me:2069: checking if option $cf_clang_opt works" >&5
2070 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2071 cf_save_CFLAGS="$CFLAGS"
2072 CFLAGS="$CFLAGS $cf_clang_opt"
2073 cat >"conftest.$ac_ext" <<_ACEOF
2074 #line 2074 "configure"
2075 #include "confdefs.h"
2076
2077 #include <stdio.h>
2078 int
2079 main (void)
2080 {
2081
2082 printf("hello!\\n");
2083 ;
2084 return 0;
2085 }
2086 _ACEOF
2087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2088 if { (eval echo "$as_me:2088: \"$ac_link\"") >&5
2089 (eval $ac_link) 2>&5
2090 ac_status=$?
2091 echo "$as_me:2091: \$? = $ac_status" >&5
2092 (exit "$ac_status"); } &&
2093 { ac_try='test -s "conftest$ac_exeext"'
2094 { (eval echo "$as_me:2094: \"$ac_try\"") >&5
2095 (eval $ac_try) 2>&5
2096 ac_status=$?
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); }; }; then
2099
2100 cf_clang_optok=yes
2101 else
2102 echo "$as_me: failed program was:" >&5
2103 cat "conftest.$ac_ext" >&5
2104
2105 cf_clang_optok=no
2106 fi
2107 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2108 echo "$as_me:2108: result: $cf_clang_optok" >&5
2109 echo "${ECHO_T}$cf_clang_optok" >&6
2110 CFLAGS="$cf_save_CFLAGS"
2111 if test "$cf_clang_optok" = yes; then
2112 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2113
2114 echo "${as_me:-configure}:2114: testing adding option $cf_clang_opt ..." 1>&5
2115
2116 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2117 CFLAGS="${CFLAGS}$cf_clang_opt"
2118
2119 fi
2120 done
2121 fi
2122
2123 echo "$as_me:2123: checking for $CC option to accept ANSI C" >&5
2124 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2125 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2126 echo $ECHO_N "(cached) $ECHO_C" >&6
2127 else
2128 ac_cv_prog_cc_stdc=no
2129 ac_save_CC=$CC
2130 cat >"conftest.$ac_ext" <<_ACEOF
2131 #line 2131 "configure"
2132 #include "confdefs.h"
2133 #include <stdarg.h>
2134 #include <stdio.h>
2135 #include <sys/types.h>
2136 #include <sys/stat.h>
2137 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2138 struct buf { int x; };
2139 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2140 static char *e (char **p, int i)
2141 {
2142 return p[i];
2143 }
2144 static char *f (char * (*g) (char **, int), char **p, ...)
2145 {
2146 char *s;
2147 va_list v;
2148 va_start (v,p);
2149 s = g (p, va_arg (v,int));
2150 va_end (v);
2151 return s;
2152 }
2153 int test (int i, double x);
2154 struct s1 {int (*f) (int a);};
2155 struct s2 {int (*f) (double a);};
2156 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2157 int argc;
2158 char **argv;
2159 int
2160 main (void)
2161 {
2162 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2163 ;
2164 return 0;
2165 }
2166 _ACEOF
2167 # Don't try gcc -ansi; that turns off useful extensions and
2168 # breaks some systems' header files.
2169 # AIX -qlanglvl=ansi
2170 # Ultrix and OSF/1 -std1
2171 # HP-UX 10.20 and later -Ae
2172 # HP-UX older versions -Aa -D_HPUX_SOURCE
2173 # SVR4 -Xc -D__EXTENSIONS__
2174 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2175 do
2176 CC="$ac_save_CC $ac_arg"
2177 rm -f "conftest.$ac_objext"
2178 if { (eval echo "$as_me:2178: \"$ac_compile\"") >&5
2179 (eval $ac_compile) 2>&5
2180 ac_status=$?
2181 echo "$as_me:2181: \$? = $ac_status" >&5
2182 (exit "$ac_status"); } &&
2183 { ac_try='test -s "conftest.$ac_objext"'
2184 { (eval echo "$as_me:2184: \"$ac_try\"") >&5
2185 (eval $ac_try) 2>&5
2186 ac_status=$?
2187 echo "$as_me:2187: \$? = $ac_status" >&5
2188 (exit "$ac_status"); }; }; then
2189 ac_cv_prog_cc_stdc=$ac_arg
2190 break
2191 else
2192 echo "$as_me: failed program was:" >&5
2193 cat "conftest.$ac_ext" >&5
2194 fi
2195 rm -f "conftest.$ac_objext"
2196 done
2197 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2198 CC=$ac_save_CC
2199
2200 fi
2201
2202 case "x$ac_cv_prog_cc_stdc" in
2203 x|xno)
2204 echo "$as_me:2204: result: none needed" >&5
2205 echo "${ECHO_T}none needed" >&6 ;;
2206 *)
2207 echo "$as_me:2207: result: $ac_cv_prog_cc_stdc" >&5
2208 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2209 CC="$CC $ac_cv_prog_cc_stdc" ;;
2210 esac
2211
2212 # This should have been defined by AC_PROG_CC
2213 : "${CC:=cc}"
2214
2215 echo "$as_me:2215: checking \$CFLAGS variable" >&5
2216 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2217 case "x$CFLAGS" in
2218 (*-[IUD]*)
2219 echo "$as_me:2219: result: broken" >&5
2220 echo "${ECHO_T}broken" >&6
2221 { echo "$as_me:2221: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2222 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2223 cf_flags="$CFLAGS"
2224 CFLAGS=
2225 for cf_arg in $cf_flags
2226 do
2227
2228 cf_fix_cppflags=no
2229 cf_new_cflags=
2230 cf_new_cppflags=
2231 cf_new_extra_cppflags=
2232
2233 for cf_add_cflags in $cf_arg
2234 do
2235 case "$cf_fix_cppflags" in
2236 (no)
2237 case "$cf_add_cflags" in
2238 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2239 case "$cf_add_cflags" in
2240 (-D*)
2241 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2242
2243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2244 && test -z "${cf_tst_cflags}" \
2245 && cf_fix_cppflags=yes
2246
2247 if test "$cf_fix_cppflags" = yes ; then
2248
2249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2251
2252 continue
2253 elif test "${cf_tst_cflags}" = "\"'" ; then
2254
2255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2257
2258 continue
2259 fi
2260 ;;
2261 esac
2262 case "$CPPFLAGS" in
2263 (*$cf_add_cflags)
2264 ;;
2265 (*)
2266 case "$cf_add_cflags" in
2267 (-D*)
2268 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2269
2270 CPPFLAGS=`echo "$CPPFLAGS" | \
2271 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2272 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2273
2274 ;;
2275 esac
2276
2277 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2278 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2279
2280 ;;
2281 esac
2282 ;;
2283 (*)
2284
2285 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2286 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2287
2288 ;;
2289 esac
2290 ;;
2291 (yes)
2292
2293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2295
2296 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2297
2298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2299 && test -z "${cf_tst_cflags}" \
2300 && cf_fix_cppflags=no
2301 ;;
2302 esac
2303 done
2304
2305 if test -n "$cf_new_cflags" ; then
2306
2307 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2308 CFLAGS="${CFLAGS}$cf_new_cflags"
2309
2310 fi
2311
2312 if test -n "$cf_new_cppflags" ; then
2313
2314 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2315 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2316
2317 fi
2318
2319 if test -n "$cf_new_extra_cppflags" ; then
2320
2321 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2322 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2323
2324 fi
2325
2326 done
2327 ;;
2328 (*)
2329 echo "$as_me:2329: result: ok" >&5
2330 echo "${ECHO_T}ok" >&6
2331 ;;
2332 esac
2333
2334 echo "$as_me:2334: checking \$CC variable" >&5
2335 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2336 case "$CC" in
2337 (*[\ \ ]-*)
2338 echo "$as_me:2338: result: broken" >&5
2339 echo "${ECHO_T}broken" >&6
2340 { echo "$as_me:2340: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2341 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2342 # humor him...
2343 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2344 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2345 CC="$cf_prog"
2346 for cf_arg in $cf_flags
2347 do
2348 case "x$cf_arg" in
2349 (x-[IUDfgOW]*)
2350
2351 cf_fix_cppflags=no
2352 cf_new_cflags=
2353 cf_new_cppflags=
2354 cf_new_extra_cppflags=
2355
2356 for cf_add_cflags in $cf_arg
2357 do
2358 case "$cf_fix_cppflags" in
2359 (no)
2360 case "$cf_add_cflags" in
2361 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2362 case "$cf_add_cflags" in
2363 (-D*)
2364 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2365
2366 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2367 && test -z "${cf_tst_cflags}" \
2368 && cf_fix_cppflags=yes
2369
2370 if test "$cf_fix_cppflags" = yes ; then
2371
2372 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2373 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2374
2375 continue
2376 elif test "${cf_tst_cflags}" = "\"'" ; then
2377
2378 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2379 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2380
2381 continue
2382 fi
2383 ;;
2384 esac
2385 case "$CPPFLAGS" in
2386 (*$cf_add_cflags)
2387 ;;
2388 (*)
2389 case "$cf_add_cflags" in
2390 (-D*)
2391 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2392
2393 CPPFLAGS=`echo "$CPPFLAGS" | \
2394 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2395 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2396
2397 ;;
2398 esac
2399
2400 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2401 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2402
2403 ;;
2404 esac
2405 ;;
2406 (*)
2407
2408 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2409 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2410
2411 ;;
2412 esac
2413 ;;
2414 (yes)
2415
2416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2418
2419 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2420
2421 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2422 && test -z "${cf_tst_cflags}" \
2423 && cf_fix_cppflags=no
2424 ;;
2425 esac
2426 done
2427
2428 if test -n "$cf_new_cflags" ; then
2429
2430 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2431 CFLAGS="${CFLAGS}$cf_new_cflags"
2432
2433 fi
2434
2435 if test -n "$cf_new_cppflags" ; then
2436
2437 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2438 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2439
2440 fi
2441
2442 if test -n "$cf_new_extra_cppflags" ; then
2443
2444 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2445 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2446
2447 fi
2448
2449 ;;
2450 (*)
2451 CC="$CC $cf_arg"
2452 ;;
2453 esac
2454 done
2455 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2456
2457 echo "${as_me:-configure}:2457: testing resulting CC: '$CC' ..." 1>&5
2458
2459 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2460
2461 echo "${as_me:-configure}:2461: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2462
2463 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2464
2465 echo "${as_me:-configure}:2465: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2466
2467 ;;
2468 (*)
2469 echo "$as_me:2469: result: ok" >&5
2470 echo "${ECHO_T}ok" >&6
2471 ;;
2472 esac
2473
2474 for ac_prog in ggrep grep
2475 do
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477 set dummy $ac_prog; ac_word=$2
2478 echo "$as_me:2478: checking for $ac_word" >&5
2479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2480 if test "${ac_cv_prog_GREP+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482 else
2483 if test -n "$GREP"; then
2484 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2485 else
2486 ac_save_IFS=$IFS; IFS=$ac_path_separator
2487 ac_dummy="$PATH"
2488 for ac_dir in $ac_dummy; do
2489 IFS=$ac_save_IFS
2490 test -z "$ac_dir" && ac_dir=.
2491 $as_executable_p "$ac_dir/$ac_word" || continue
2492 ac_cv_prog_GREP="$ac_prog"
2493 echo "$as_me:2493: found $ac_dir/$ac_word" >&5
2494 break
2495 done
2496
2497 fi
2498 fi
2499 GREP=$ac_cv_prog_GREP
2500 if test -n "$GREP"; then
2501 echo "$as_me:2501: result: $GREP" >&5
2502 echo "${ECHO_T}$GREP" >&6
2503 else
2504 echo "$as_me:2504: result: no" >&5
2505 echo "${ECHO_T}no" >&6
2506 fi
2507
2508 test -n "$GREP" && break
2509 done
2510 test -n "$GREP" || GREP=": "
2511
2512 echo "$as_me:2512: checking for egrep" >&5
2513 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2514 if test "${ac_cv_path_EGREP+set}" = set; then
2515 echo $ECHO_N "(cached) $ECHO_C" >&6
2516 else
2517 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2518 then ac_cv_path_EGREP="$GREP -E"
2519 else
2520 for ac_prog in gegrep egrep
2521 do
2522 # Extract the first word of "$ac_prog", so it can be a program name with args.
2523 set dummy $ac_prog; ac_word=$2
2524 echo "$as_me:2524: checking for $ac_word" >&5
2525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2526 if test "${ac_cv_path_EGREP+set}" = set; then
2527 echo $ECHO_N "(cached) $ECHO_C" >&6
2528 else
2529 case $EGREP in
2530 [\\/]* | ?:[\\/]*)
2531 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2532 ;;
2533 *)
2534 ac_save_IFS=$IFS; IFS=$ac_path_separator
2535 ac_dummy="$PATH"
2536 for ac_dir in $ac_dummy; do
2537 IFS=$ac_save_IFS
2538 test -z "$ac_dir" && ac_dir=.
2539 if $as_executable_p "$ac_dir/$ac_word"; then
2540 ac_cv_path_EGREP="$ac_dir/$ac_word"
2541 echo "$as_me:2541: found $ac_dir/$ac_word" >&5
2542 break
2543 fi
2544 done
2545
2546 ;;
2547 esac
2548 fi
2549 EGREP=$ac_cv_path_EGREP
2550
2551 if test -n "$EGREP"; then
2552 echo "$as_me:2552: result: $EGREP" >&5
2553 echo "${ECHO_T}$EGREP" >&6
2554 else
2555 echo "$as_me:2555: result: no" >&5
2556 echo "${ECHO_T}no" >&6
2557 fi
2558
2559 test -n "$EGREP" && break
2560 done
2561 test -n "$EGREP" || EGREP=": "
2562
2563 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2563: error: cannot find workable egrep" >&5
2564 echo "$as_me: error: cannot find workable egrep" >&2;}
2565 { (exit 1); exit 1; }; }
2566 fi
2567 fi
2568 echo "$as_me:2568: result: $ac_cv_path_EGREP" >&5
2569 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2570 EGREP="$ac_cv_path_EGREP"
2571
2572 ac_ext=c
2573 ac_cpp='$CPP $CPPFLAGS'
2574 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2575 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2576 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2577 ac_main_return="return"
2578 echo "$as_me:2578: checking how to run the C preprocessor" >&5
2579 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2580 # On Suns, sometimes $CPP names a directory.
2581 if test -n "$CPP" && test -d "$CPP"; then
2582 CPP=
2583 fi
2584 if test -z "$CPP"; then
2585 if test "${ac_cv_prog_CPP+set}" = set; then
2586 echo $ECHO_N "(cached) $ECHO_C" >&6
2587 else
2588 # Double quotes because CPP needs to be expanded
2589 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2590 do
2591 ac_preproc_ok=false
2592 for ac_c_preproc_warn_flag in '' yes
2593 do
2594 # Use a header file that comes with gcc, so configuring glibc
2595 # with a fresh cross-compiler works.
2596 # On the NeXT, cc -E runs the code through the compiler's parser,
2597 # not just through cpp. "Syntax error" is here to catch this case.
2598 cat >"conftest.$ac_ext" <<_ACEOF
2599 #line 2599 "configure"
2600 #include "confdefs.h"
2601 #include <assert.h>
2602 Syntax error
2603 _ACEOF
2604 if { (eval echo "$as_me:2604: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2605 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2606 ac_status=$?
2607 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2608 rm -f conftest.er1
2609 cat conftest.err >&5
2610 echo "$as_me:2610: \$? = $ac_status" >&5
2611 (exit "$ac_status"); } >/dev/null; then
2612 if test -s conftest.err; then
2613 ac_cpp_err=$ac_c_preproc_warn_flag
2614 else
2615 ac_cpp_err=
2616 fi
2617 else
2618 ac_cpp_err=yes
2619 fi
2620 if test -z "$ac_cpp_err"; then
2621 :
2622 else
2623 echo "$as_me: failed program was:" >&5
2624 cat "conftest.$ac_ext" >&5
2625 # Broken: fails on valid input.
2626 continue
2627 fi
2628 rm -f conftest.err "conftest.$ac_ext"
2629
2630 # OK, works on sane cases. Now check whether non-existent headers
2631 # can be detected and how.
2632 cat >"conftest.$ac_ext" <<_ACEOF
2633 #line 2633 "configure"
2634 #include "confdefs.h"
2635 #include <ac_nonexistent.h>
2636 _ACEOF
2637 if { (eval echo "$as_me:2637: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2638 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2639 ac_status=$?
2640 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2641 rm -f conftest.er1
2642 cat conftest.err >&5
2643 echo "$as_me:2643: \$? = $ac_status" >&5
2644 (exit "$ac_status"); } >/dev/null; then
2645 if test -s conftest.err; then
2646 ac_cpp_err=$ac_c_preproc_warn_flag
2647 else
2648 ac_cpp_err=
2649 fi
2650 else
2651 ac_cpp_err=yes
2652 fi
2653 if test -z "$ac_cpp_err"; then
2654 # Broken: success on invalid input.
2655 continue
2656 else
2657 echo "$as_me: failed program was:" >&5
2658 cat "conftest.$ac_ext" >&5
2659 # Passes both tests.
2660 ac_preproc_ok=:
2661 break
2662 fi
2663 rm -f conftest.err "conftest.$ac_ext"
2664
2665 done
2666 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2667 rm -f conftest.err "conftest.$ac_ext"
2668 if $ac_preproc_ok; then
2669 break
2670 fi
2671
2672 done
2673 ac_cv_prog_CPP=$CPP
2674
2675 fi
2676 CPP=$ac_cv_prog_CPP
2677 else
2678 ac_cv_prog_CPP=$CPP
2679 fi
2680 echo "$as_me:2680: result: $CPP" >&5
2681 echo "${ECHO_T}$CPP" >&6
2682 ac_preproc_ok=false
2683 for ac_c_preproc_warn_flag in '' yes
2684 do
2685 # Use a header file that comes with gcc, so configuring glibc
2686 # with a fresh cross-compiler works.
2687 # On the NeXT, cc -E runs the code through the compiler's parser,
2688 # not just through cpp. "Syntax error" is here to catch this case.
2689 cat >"conftest.$ac_ext" <<_ACEOF
2690 #line 2690 "configure"
2691 #include "confdefs.h"
2692 #include <assert.h>
2693 Syntax error
2694 _ACEOF
2695 if { (eval echo "$as_me:2695: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2696 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2697 ac_status=$?
2698 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2699 rm -f conftest.er1
2700 cat conftest.err >&5
2701 echo "$as_me:2701: \$? = $ac_status" >&5
2702 (exit "$ac_status"); } >/dev/null; then
2703 if test -s conftest.err; then
2704 ac_cpp_err=$ac_c_preproc_warn_flag
2705 else
2706 ac_cpp_err=
2707 fi
2708 else
2709 ac_cpp_err=yes
2710 fi
2711 if test -z "$ac_cpp_err"; then
2712 :
2713 else
2714 echo "$as_me: failed program was:" >&5
2715 cat "conftest.$ac_ext" >&5
2716 # Broken: fails on valid input.
2717 continue
2718 fi
2719 rm -f conftest.err "conftest.$ac_ext"
2720
2721 # OK, works on sane cases. Now check whether non-existent headers
2722 # can be detected and how.
2723 cat >"conftest.$ac_ext" <<_ACEOF
2724 #line 2724 "configure"
2725 #include "confdefs.h"
2726 #include <ac_nonexistent.h>
2727 _ACEOF
2728 if { (eval echo "$as_me:2728: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2729 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2730 ac_status=$?
2731 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2732 rm -f conftest.er1
2733 cat conftest.err >&5
2734 echo "$as_me:2734: \$? = $ac_status" >&5
2735 (exit "$ac_status"); } >/dev/null; then
2736 if test -s conftest.err; then
2737 ac_cpp_err=$ac_c_preproc_warn_flag
2738 else
2739 ac_cpp_err=
2740 fi
2741 else
2742 ac_cpp_err=yes
2743 fi
2744 if test -z "$ac_cpp_err"; then
2745 # Broken: success on invalid input.
2746 continue
2747 else
2748 echo "$as_me: failed program was:" >&5
2749 cat "conftest.$ac_ext" >&5
2750 # Passes both tests.
2751 ac_preproc_ok=:
2752 break
2753 fi
2754 rm -f conftest.err "conftest.$ac_ext"
2755
2756 done
2757 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2758 rm -f conftest.err "conftest.$ac_ext"
2759 if $ac_preproc_ok; then
2760 :
2761 else
2762 { { echo "$as_me:2762: error: C preprocessor \"$CPP\" fails sanity check" >&5
2763 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2764 { (exit 1); exit 1; }; }
2765 fi
2766
2767 ac_ext=c
2768 ac_cpp='$CPP $CPPFLAGS'
2769 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2770 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2771 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2772 ac_main_return="return"
2773
2774 echo "$as_me:2774: checking whether ${MAKE-make} sets \${MAKE}" >&5
2775 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2776 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2777 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2778 echo $ECHO_N "(cached) $ECHO_C" >&6
2779 else
2780 cat >conftest.make <<\EOF
2781 all:
2782 @echo 'ac_maketemp="${MAKE}"'
2783 EOF
2784 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2785 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2786 if test -n "$ac_maketemp"; then
2787 eval ac_cv_prog_make_${ac_make}_set=yes
2788 else
2789 eval ac_cv_prog_make_${ac_make}_set=no
2790 fi
2791 rm -f conftest.make
2792 fi
2793 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2794 echo "$as_me:2794: result: yes" >&5
2795 echo "${ECHO_T}yes" >&6
2796 SET_MAKE=
2797 else
2798 echo "$as_me:2798: result: no" >&5
2799 echo "${ECHO_T}no" >&6
2800 SET_MAKE="MAKE=${MAKE-make}"
2801 fi
2802
2803 if test -n "$ac_tool_prefix"; then
2804 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2805 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2806 echo "$as_me:2806: checking for $ac_word" >&5
2807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2808 if test "${ac_cv_prog_RANLIB+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2810 else
2811 if test -n "$RANLIB"; then
2812 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2813 else
2814 ac_save_IFS=$IFS; IFS=$ac_path_separator
2815 ac_dummy="$PATH"
2816 for ac_dir in $ac_dummy; do
2817 IFS=$ac_save_IFS
2818 test -z "$ac_dir" && ac_dir=.
2819 $as_executable_p "$ac_dir/$ac_word" || continue
2820 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2821 echo "$as_me:2821: found $ac_dir/$ac_word" >&5
2822 break
2823 done
2824
2825 fi
2826 fi
2827 RANLIB=$ac_cv_prog_RANLIB
2828 if test -n "$RANLIB"; then
2829 echo "$as_me:2829: result: $RANLIB" >&5
2830 echo "${ECHO_T}$RANLIB" >&6
2831 else
2832 echo "$as_me:2832: result: no" >&5
2833 echo "${ECHO_T}no" >&6
2834 fi
2835
2836 fi
2837 if test -z "$ac_cv_prog_RANLIB"; then
2838 ac_ct_RANLIB=$RANLIB
2839 # Extract the first word of "ranlib", so it can be a program name with args.
2840 set dummy ranlib; ac_word=$2
2841 echo "$as_me:2841: checking for $ac_word" >&5
2842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2843 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2844 echo $ECHO_N "(cached) $ECHO_C" >&6
2845 else
2846 if test -n "$ac_ct_RANLIB"; then
2847 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2848 else
2849 ac_save_IFS=$IFS; IFS=$ac_path_separator
2850 ac_dummy="$PATH"
2851 for ac_dir in $ac_dummy; do
2852 IFS=$ac_save_IFS
2853 test -z "$ac_dir" && ac_dir=.
2854 $as_executable_p "$ac_dir/$ac_word" || continue
2855 ac_cv_prog_ac_ct_RANLIB="ranlib"
2856 echo "$as_me:2856: found $ac_dir/$ac_word" >&5
2857 break
2858 done
2859
2860 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2861 fi
2862 fi
2863 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2864 if test -n "$ac_ct_RANLIB"; then
2865 echo "$as_me:2865: result: $ac_ct_RANLIB" >&5
2866 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2867 else
2868 echo "$as_me:2868: result: no" >&5
2869 echo "${ECHO_T}no" >&6
2870 fi
2871
2872 RANLIB=$ac_ct_RANLIB
2873 else
2874 RANLIB="$ac_cv_prog_RANLIB"
2875 fi
2876
2877 case "$cf_cv_system_name" in
2878 (cygwin*|msys*|mingw32*|mingw64|os2*)
2879 GLOB_FULLPATH_POSIX='/*'
2880 GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
2881 ;;
2882 (*)
2883 GLOB_FULLPATH_POSIX='/*'
2884 GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
2885 ;;
2886 esac
2887
2888 # Find a good install program. We prefer a C program (faster),
2889 # so one script is as good as another. But avoid the broken or
2890 # incompatible versions:
2891 # SysV /etc/install, /usr/sbin/install
2892 # SunOS /usr/etc/install
2893 # IRIX /sbin/install
2894 # AIX /bin/install
2895 # AmigaOS /C/install, which installs bootblocks on floppy discs
2896 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2897 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2898 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2899 # ./install, which can be erroneously created by make from ./install.sh.
2900 echo "$as_me:2900: checking for a BSD compatible install" >&5
2901 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2902 if test -z "$INSTALL"; then
2903 if test "${ac_cv_path_install+set}" = set; then
2904 echo $ECHO_N "(cached) $ECHO_C" >&6
2905 else
2906 ac_save_IFS=$IFS; IFS=$ac_path_separator
2907 for ac_dir in $PATH; do
2908 IFS=$ac_save_IFS
2909 # Account for people who put trailing slashes in PATH elements.
2910 case $ac_dir/ in
2911 / | ./ | .// | /cC/* \
2912 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2913 | /usr/ucb/* ) ;;
2914 *)
2915 # OSF1 and SCO ODT 3.0 have their own names for install.
2916 # Don't use installbsd from OSF since it installs stuff as root
2917 # by default.
2918 for ac_prog in ginstall scoinst install; do
2919 if $as_executable_p "$ac_dir/$ac_prog"; then
2920 if test $ac_prog = install &&
2921 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2922 # AIX install. It has an incompatible calling convention.
2923 :
2924 elif test $ac_prog = install &&
2925 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2926 # program-specific install script used by HP pwplus--don't use.
2927 :
2928 else
2929 ac_cv_path_install="$ac_dir/$ac_prog -c"
2930 break 2
2931 fi
2932 fi
2933 done
2934 ;;
2935 esac
2936 done
2937
2938 fi
2939 if test "${ac_cv_path_install+set}" = set; then
2940 INSTALL=$ac_cv_path_install
2941 else
2942 # As a last resort, use the slow shell script. We don't cache a
2943 # path for INSTALL within a source directory, because that will
2944 # break other packages using the cache if that directory is
2945 # removed, or if the path is relative.
2946 INSTALL=$ac_install_sh
2947 fi
2948 fi
2949 echo "$as_me:2949: result: $INSTALL" >&5
2950 echo "${ECHO_T}$INSTALL" >&6
2951
2952 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2953 # It thinks the first close brace ends the variable substitution.
2954 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2955
2956 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2957
2958 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2959
2960 if test "x$INSTALL" = "x./install-sh -c"; then
2961 if test -f /usr/sbin/install ; then
2962 case "$host_os" in
2963 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
2964 INSTALL=/usr/sbin/install
2965 ;;
2966 esac
2967 fi
2968 fi
2969 case x$INSTALL in
2970 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
2971 ;;
2972 (*)
2973 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2974 test -z "$cf_dir" && cf_dir=.
2975 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2976 ;;
2977 esac
2978
2979 echo "$as_me:2979: checking whether ln -s works" >&5
2980 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2981 LN_S=$as_ln_s
2982 if test "$LN_S" = "ln -s"; then
2983 echo "$as_me:2983: result: yes" >&5
2984 echo "${ECHO_T}yes" >&6
2985 else
2986 echo "$as_me:2986: result: no, using $LN_S" >&5
2987 echo "${ECHO_T}no, using $LN_S" >&6
2988 fi
2989
2990 echo "$as_me:2990: checking if $LN_S -f options work" >&5
2991 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2992
2993 rm -f conf$$.src conf$$dst
2994 echo >conf$$.dst
2995 echo first >conf$$.src
2996 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2997 cf_prog_ln_sf=yes
2998 else
2999 cf_prog_ln_sf=no
3000 fi
3001 rm -f conf$$.dst conf$$src
3002 echo "$as_me:3002: result: $cf_prog_ln_sf" >&5
3003 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3004
3005 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3006
3007 for ac_prog in lint cppcheck splint
3008 do
3009 # Extract the first word of "$ac_prog", so it can be a program name with args.
3010 set dummy $ac_prog; ac_word=$2
3011 echo "$as_me:3011: checking for $ac_word" >&5
3012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3013 if test "${ac_cv_prog_LINT+set}" = set; then
3014 echo $ECHO_N "(cached) $ECHO_C" >&6
3015 else
3016 if test -n "$LINT"; then
3017 ac_cv_prog_LINT="$LINT" # Let the user override the test.
3018 else
3019 ac_save_IFS=$IFS; IFS=$ac_path_separator
3020 ac_dummy="$PATH"
3021 for ac_dir in $ac_dummy; do
3022 IFS=$ac_save_IFS
3023 test -z "$ac_dir" && ac_dir=.
3024 $as_executable_p "$ac_dir/$ac_word" || continue
3025 ac_cv_prog_LINT="$ac_prog"
3026 echo "$as_me:3026: found $ac_dir/$ac_word" >&5
3027 break
3028 done
3029
3030 fi
3031 fi
3032 LINT=$ac_cv_prog_LINT
3033 if test -n "$LINT"; then
3034 echo "$as_me:3034: result: $LINT" >&5
3035 echo "${ECHO_T}$LINT" >&6
3036 else
3037 echo "$as_me:3037: result: no" >&5
3038 echo "${ECHO_T}no" >&6
3039 fi
3040
3041 test -n "$LINT" && break
3042 done
3043
3044 case "x$LINT" in
3045 (xlint|x*/lint) # NetBSD 10
3046 test -z "$LINT_OPTS" && LINT_OPTS="-chapbrxzgFS -v -Ac11"
3047 ;;
3048 (xcppcheck|x*/cppcheck)
3049 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all -D__CPPCHECK__"
3050 ;;
3051 esac
3052
3053 # Extract the first word of "groff", so it can be a program name with args.
3054 set dummy groff; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_GROFF_PATH+set}" = set; then
3058 echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060 case $GROFF_PATH in
3061 [\\/]* | ?:[\\/]*)
3062 ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
3063 ;;
3064 *)
3065 ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068 IFS=$ac_save_IFS
3069 test -z "$ac_dir" && ac_dir=.
3070 if $as_executable_p "$ac_dir/$ac_word"; then
3071 ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
3072 echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073 break
3074 fi
3075 done
3076
3077 test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
3078 ;;
3079 esac
3080 fi
3081 GROFF_PATH=$ac_cv_path_GROFF_PATH
3082
3083 if test -n "$GROFF_PATH"; then
3084 echo "$as_me:3084: result: $GROFF_PATH" >&5
3085 echo "${ECHO_T}$GROFF_PATH" >&6
3086 else
3087 echo "$as_me:3087: result: no" >&5
3088 echo "${ECHO_T}no" >&6
3089 fi
3090
3091 for ac_prog in nroff mandoc
3092 do
3093 # Extract the first word of "$ac_prog", so it can be a program name with args.
3094 set dummy $ac_prog; ac_word=$2
3095 echo "$as_me:3095: checking for $ac_word" >&5
3096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3097 if test "${ac_cv_path_NROFF_PATH+set}" = set; then
3098 echo $ECHO_N "(cached) $ECHO_C" >&6
3099 else
3100 case $NROFF_PATH in
3101 [\\/]* | ?:[\\/]*)
3102 ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
3103 ;;
3104 *)
3105 ac_save_IFS=$IFS; IFS=$ac_path_separator
3106 ac_dummy="$PATH"
3107 for ac_dir in $ac_dummy; do
3108 IFS=$ac_save_IFS
3109 test -z "$ac_dir" && ac_dir=.
3110 if $as_executable_p "$ac_dir/$ac_word"; then
3111 ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
3112 echo "$as_me:3112: found $ac_dir/$ac_word" >&5
3113 break
3114 fi
3115 done
3116
3117 ;;
3118 esac
3119 fi
3120 NROFF_PATH=$ac_cv_path_NROFF_PATH
3121
3122 if test -n "$NROFF_PATH"; then
3123 echo "$as_me:3123: result: $NROFF_PATH" >&5
3124 echo "${ECHO_T}$NROFF_PATH" >&6
3125 else
3126 echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3128 fi
3129
3130 test -n "$NROFF_PATH" && break
3131 done
3132 test -n "$NROFF_PATH" || NROFF_PATH="no"
3133
3134 # Extract the first word of "tbl", so it can be a program name with args.
3135 set dummy tbl; ac_word=$2
3136 echo "$as_me:3136: checking for $ac_word" >&5
3137 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3138 if test "${ac_cv_path_TBL_PATH+set}" = set; then
3139 echo $ECHO_N "(cached) $ECHO_C" >&6
3140 else
3141 case $TBL_PATH in
3142 [\\/]* | ?:[\\/]*)
3143 ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
3144 ;;
3145 *)
3146 ac_save_IFS=$IFS; IFS=$ac_path_separator
3147 ac_dummy="$PATH"
3148 for ac_dir in $ac_dummy; do
3149 IFS=$ac_save_IFS
3150 test -z "$ac_dir" && ac_dir=.
3151 if $as_executable_p "$ac_dir/$ac_word"; then
3152 ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
3153 echo "$as_me:3153: found $ac_dir/$ac_word" >&5
3154 break
3155 fi
3156 done
3157
3158 test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
3159 ;;
3160 esac
3161 fi
3162 TBL_PATH=$ac_cv_path_TBL_PATH
3163
3164 if test -n "$TBL_PATH"; then
3165 echo "$as_me:3165: result: $TBL_PATH" >&5
3166 echo "${ECHO_T}$TBL_PATH" >&6
3167 else
3168 echo "$as_me:3168: result: no" >&5
3169 echo "${ECHO_T}no" >&6
3170 fi
3171
3172 if test "x$GROFF_PATH" = xno
3173 then
3174 NROFF_NOTE=
3175 GROFF_NOTE="#"
3176 else
3177 NROFF_NOTE="#"
3178 GROFF_NOTE=
3179 fi
3180
3181 test -z "$GROFF_NOTE" && NROFF_NOTE=
3182
3183 if test -n "$ac_tool_prefix"; then
3184 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3185 set dummy ${ac_tool_prefix}ar; ac_word=$2
3186 echo "$as_me:3186: checking for $ac_word" >&5
3187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3188 if test "${ac_cv_prog_AR+set}" = set; then
3189 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 else
3191 if test -n "$AR"; then
3192 ac_cv_prog_AR="$AR" # Let the user override the test.
3193 else
3194 ac_save_IFS=$IFS; IFS=$ac_path_separator
3195 ac_dummy="$PATH"
3196 for ac_dir in $ac_dummy; do
3197 IFS=$ac_save_IFS
3198 test -z "$ac_dir" && ac_dir=.
3199 $as_executable_p "$ac_dir/$ac_word" || continue
3200 ac_cv_prog_AR="${ac_tool_prefix}ar"
3201 echo "$as_me:3201: found $ac_dir/$ac_word" >&5
3202 break
3203 done
3204
3205 fi
3206 fi
3207 AR=$ac_cv_prog_AR
3208 if test -n "$AR"; then
3209 echo "$as_me:3209: result: $AR" >&5
3210 echo "${ECHO_T}$AR" >&6
3211 else
3212 echo "$as_me:3212: result: no" >&5
3213 echo "${ECHO_T}no" >&6
3214 fi
3215
3216 fi
3217 if test -z "$ac_cv_prog_AR"; then
3218 ac_ct_AR=$AR
3219 # Extract the first word of "ar", so it can be a program name with args.
3220 set dummy ar; ac_word=$2
3221 echo "$as_me:3221: checking for $ac_word" >&5
3222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3223 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3224 echo $ECHO_N "(cached) $ECHO_C" >&6
3225 else
3226 if test -n "$ac_ct_AR"; then
3227 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3228 else
3229 ac_save_IFS=$IFS; IFS=$ac_path_separator
3230 ac_dummy="$PATH"
3231 for ac_dir in $ac_dummy; do
3232 IFS=$ac_save_IFS
3233 test -z "$ac_dir" && ac_dir=.
3234 $as_executable_p "$ac_dir/$ac_word" || continue
3235 ac_cv_prog_ac_ct_AR="ar"
3236 echo "$as_me:3236: found $ac_dir/$ac_word" >&5
3237 break
3238 done
3239
3240 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3241 fi
3242 fi
3243 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3244 if test -n "$ac_ct_AR"; then
3245 echo "$as_me:3245: result: $ac_ct_AR" >&5
3246 echo "${ECHO_T}$ac_ct_AR" >&6
3247 else
3248 echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252 AR=$ac_ct_AR
3253 else
3254 AR="$ac_cv_prog_AR"
3255 fi
3256
3257 echo "$as_me:3257: checking for options to update archives" >&5
3258 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3259 if test "${cf_cv_ar_flags+set}" = set; then
3260 echo $ECHO_N "(cached) $ECHO_C" >&6
3261 else
3262
3263 case "$cf_cv_system_name" in
3264 (*-msvc*)
3265 cf_cv_ar_flags=''
3266 cat >mk_static_lib.sh <<-EOF
3267 #!$SHELL
3268 MSVC_BIN="$AR"
3269 out="\$1"
3270 shift
3271 exec \$MSVC_BIN -out:"\$out" \$@
3272 EOF
3273 chmod +x mk_static_lib.sh
3274 AR=`pwd`/mk_static_lib.sh
3275 ;;
3276 (*)
3277 cf_cv_ar_flags=unknown
3278 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3279 do
3280
3281 # check if $ARFLAGS already contains this choice
3282 if test "x$ARFLAGS" != "x" ; then
3283 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3284 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3285 cf_cv_ar_flags=
3286 break
3287 fi
3288 fi
3289
3290 rm -f "conftest.$ac_cv_objext"
3291 rm -f conftest.a
3292
3293 cat >"conftest.$ac_ext" <<EOF
3294 #line 3294 "configure"
3295 int testdata[3] = { 123, 456, 789 };
3296 EOF
3297 if { (eval echo "$as_me:3297: \"$ac_compile\"") >&5
3298 (eval $ac_compile) 2>&5
3299 ac_status=$?
3300 echo "$as_me:3300: \$? = $ac_status" >&5
3301 (exit "$ac_status"); } ; then
3302 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3303 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
3304 if test -f conftest.a ; then
3305 cf_cv_ar_flags="$cf_ar_flags"
3306 break
3307 fi
3308 else
3309 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3310
3311 echo "${as_me:-configure}:3311: testing cannot compile test-program ..." 1>&5
3312
3313 break
3314 fi
3315 done
3316 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
3317 ;;
3318 esac
3319
3320 fi
3321 echo "$as_me:3321: result: $cf_cv_ar_flags" >&5
3322 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3323
3324 if test -n "$ARFLAGS" ; then
3325 if test -n "$cf_cv_ar_flags" ; then
3326 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3327 fi
3328 else
3329 ARFLAGS=$cf_cv_ar_flags
3330 fi
3331
3332 echo "$as_me:3332: checking for fgrep" >&5
3333 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3334 if test "${ac_cv_path_FGREP+set}" = set; then
3335 echo $ECHO_N "(cached) $ECHO_C" >&6
3336 else
3337 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3338 then ac_cv_path_FGREP="$GREP -F"
3339 else
3340 for ac_prog in gfgrep fgrep
3341 do
3342 # Extract the first word of "$ac_prog", so it can be a program name with args.
3343 set dummy $ac_prog; ac_word=$2
3344 echo "$as_me:3344: checking for $ac_word" >&5
3345 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3346 if test "${ac_cv_path_FGREP+set}" = set; then
3347 echo $ECHO_N "(cached) $ECHO_C" >&6
3348 else
3349 case $FGREP in
3350 [\\/]* | ?:[\\/]*)
3351 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3352 ;;
3353 *)
3354 ac_save_IFS=$IFS; IFS=$ac_path_separator
3355 ac_dummy="$PATH"
3356 for ac_dir in $ac_dummy; do
3357 IFS=$ac_save_IFS
3358 test -z "$ac_dir" && ac_dir=.
3359 if $as_executable_p "$ac_dir/$ac_word"; then
3360 ac_cv_path_FGREP="$ac_dir/$ac_word"
3361 echo "$as_me:3361: found $ac_dir/$ac_word" >&5
3362 break
3363 fi
3364 done
3365
3366 ;;
3367 esac
3368 fi
3369 FGREP=$ac_cv_path_FGREP
3370
3371 if test -n "$FGREP"; then
3372 echo "$as_me:3372: result: $FGREP" >&5
3373 echo "${ECHO_T}$FGREP" >&6
3374 else
3375 echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3377 fi
3378
3379 test -n "$FGREP" && break
3380 done
3381 test -n "$FGREP" || FGREP=": "
3382
3383 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3383: error: cannot find workable fgrep" >&5
3384 echo "$as_me: error: cannot find workable fgrep" >&2;}
3385 { (exit 1); exit 1; }; }
3386 fi
3387 fi
3388 echo "$as_me:3388: result: $ac_cv_path_FGREP" >&5
3389 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3390 FGREP="$ac_cv_path_FGREP"
3391
3392 echo "$as_me:3392: checking for makeflags variable" >&5
3393 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3394 if test "${cf_cv_makeflags+set}" = set; then
3395 echo $ECHO_N "(cached) $ECHO_C" >&6
3396 else
3397
3398 cf_save_makeflags="$MAKEFLAGS"; unset MAKEFLAGS
3399 cf_save_mflags="$MFLAGS"; unset MFLAGS
3400 cf_cv_makeflags=''
3401 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3402 do
3403 cat >cf_makeflags.tmp <<CF_EOF
3404 SHELL = $SHELL
3405 all :
3406 @ echo '.$cf_option'
3407 CF_EOF
3408 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3409 case "$cf_result" in
3410 (.*k|.*kw)
3411 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3412 case "$cf_result" in
3413 (.*CC=*) cf_cv_makeflags=
3414 ;;
3415 (*) cf_cv_makeflags=$cf_option
3416 ;;
3417 esac
3418 break
3419 ;;
3420 (.-)
3421 ;;
3422 (*)
3423
3424 echo "${as_me:-configure}:3424: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3425
3426 ;;
3427 esac
3428 done
3429 test -n "$cf_save_makeflags" && MAKEFLAGS="$cf_save_makeflags"
3430 test -n "$cf_save_mflags" && MFLAGS="$cf_save_mflags"
3431 rm -f cf_makeflags.tmp
3432
3433 fi
3434 echo "$as_me:3434: result: $cf_cv_makeflags" >&5
3435 echo "${ECHO_T}$cf_cv_makeflags" >&6
3436
3437 echo "$as_me:3437: checking if filesystem supports mixed-case filenames" >&5
3438 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3439 if test "${cf_cv_mixedcase+set}" = set; then
3440 echo $ECHO_N "(cached) $ECHO_C" >&6
3441 else
3442
3443 if test "$cross_compiling" = yes ; then
3444 case "$target_alias" in
3445 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3446 cf_cv_mixedcase=no
3447 ;;
3448 (*)
3449 cf_cv_mixedcase=yes
3450 ;;
3451 esac
3452 else
3453 rm -f conftest CONFTEST
3454 echo test >conftest
3455 if test -f CONFTEST ; then
3456 cf_cv_mixedcase=no
3457 else
3458 cf_cv_mixedcase=yes
3459 fi
3460 rm -f conftest CONFTEST
3461 fi
3462
3463 fi
3464 echo "$as_me:3464: result: $cf_cv_mixedcase" >&5
3465 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3466 test "$cf_cv_mixedcase" = yes &&
3467 cat >>confdefs.h <<\EOF
3468 #define MIXEDCASE_FILENAMES 1
3469 EOF
3470
3471 for ac_prog in exctags ctags
3472 do
3473 # Extract the first word of "$ac_prog", so it can be a program name with args.
3474 set dummy $ac_prog; ac_word=$2
3475 echo "$as_me:3475: checking for $ac_word" >&5
3476 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3477 if test "${ac_cv_prog_CTAGS+set}" = set; then
3478 echo $ECHO_N "(cached) $ECHO_C" >&6
3479 else
3480 if test -n "$CTAGS"; then
3481 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3482 else
3483 ac_save_IFS=$IFS; IFS=$ac_path_separator
3484 ac_dummy="$PATH"
3485 for ac_dir in $ac_dummy; do
3486 IFS=$ac_save_IFS
3487 test -z "$ac_dir" && ac_dir=.
3488 $as_executable_p "$ac_dir/$ac_word" || continue
3489 ac_cv_prog_CTAGS="$ac_prog"
3490 echo "$as_me:3490: found $ac_dir/$ac_word" >&5
3491 break
3492 done
3493
3494 fi
3495 fi
3496 CTAGS=$ac_cv_prog_CTAGS
3497 if test -n "$CTAGS"; then
3498 echo "$as_me:3498: result: $CTAGS" >&5
3499 echo "${ECHO_T}$CTAGS" >&6
3500 else
3501 echo "$as_me:3501: result: no" >&5
3502 echo "${ECHO_T}no" >&6
3503 fi
3504
3505 test -n "$CTAGS" && break
3506 done
3507
3508 for ac_prog in exetags etags
3509 do
3510 # Extract the first word of "$ac_prog", so it can be a program name with args.
3511 set dummy $ac_prog; ac_word=$2
3512 echo "$as_me:3512: checking for $ac_word" >&5
3513 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3514 if test "${ac_cv_prog_ETAGS+set}" = set; then
3515 echo $ECHO_N "(cached) $ECHO_C" >&6
3516 else
3517 if test -n "$ETAGS"; then
3518 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3519 else
3520 ac_save_IFS=$IFS; IFS=$ac_path_separator
3521 ac_dummy="$PATH"
3522 for ac_dir in $ac_dummy; do
3523 IFS=$ac_save_IFS
3524 test -z "$ac_dir" && ac_dir=.
3525 $as_executable_p "$ac_dir/$ac_word" || continue
3526 ac_cv_prog_ETAGS="$ac_prog"
3527 echo "$as_me:3527: found $ac_dir/$ac_word" >&5
3528 break
3529 done
3530
3531 fi
3532 fi
3533 ETAGS=$ac_cv_prog_ETAGS
3534 if test -n "$ETAGS"; then
3535 echo "$as_me:3535: result: $ETAGS" >&5
3536 echo "${ECHO_T}$ETAGS" >&6
3537 else
3538 echo "$as_me:3538: result: no" >&5
3539 echo "${ECHO_T}no" >&6
3540 fi
3541
3542 test -n "$ETAGS" && break
3543 done
3544
3545 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3546 set dummy ${CTAGS:-ctags}; ac_word=$2
3547 echo "$as_me:3547: checking for $ac_word" >&5
3548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3549 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3550 echo $ECHO_N "(cached) $ECHO_C" >&6
3551 else
3552 if test -n "$MAKE_LOWER_TAGS"; then
3553 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3554 else
3555 ac_save_IFS=$IFS; IFS=$ac_path_separator
3556 ac_dummy="$PATH"
3557 for ac_dir in $ac_dummy; do
3558 IFS=$ac_save_IFS
3559 test -z "$ac_dir" && ac_dir=.
3560 $as_executable_p "$ac_dir/$ac_word" || continue
3561 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3562 echo "$as_me:3562: found $ac_dir/$ac_word" >&5
3563 break
3564 done
3565
3566 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3567 fi
3568 fi
3569 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3570 if test -n "$MAKE_LOWER_TAGS"; then
3571 echo "$as_me:3571: result: $MAKE_LOWER_TAGS" >&5
3572 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3573 else
3574 echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3576 fi
3577
3578 if test "$cf_cv_mixedcase" = yes ; then
3579 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3580 set dummy ${ETAGS:-etags}; ac_word=$2
3581 echo "$as_me:3581: checking for $ac_word" >&5
3582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3584 echo $ECHO_N "(cached) $ECHO_C" >&6
3585 else
3586 if test -n "$MAKE_UPPER_TAGS"; then
3587 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3588 else
3589 ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 ac_dummy="$PATH"
3591 for ac_dir in $ac_dummy; do
3592 IFS=$ac_save_IFS
3593 test -z "$ac_dir" && ac_dir=.
3594 $as_executable_p "$ac_dir/$ac_word" || continue
3595 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3596 echo "$as_me:3596: found $ac_dir/$ac_word" >&5
3597 break
3598 done
3599
3600 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3601 fi
3602 fi
3603 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3604 if test -n "$MAKE_UPPER_TAGS"; then
3605 echo "$as_me:3605: result: $MAKE_UPPER_TAGS" >&5
3606 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3607 else
3608 echo "$as_me:3608: result: no" >&5
3609 echo "${ECHO_T}no" >&6
3610 fi
3611
3612 else
3613 MAKE_UPPER_TAGS=no
3614 fi
3615
3616 if test "$MAKE_UPPER_TAGS" = yes ; then
3617 MAKE_UPPER_TAGS=
3618 else
3619 MAKE_UPPER_TAGS="#"
3620 fi
3621
3622 if test "$MAKE_LOWER_TAGS" = yes ; then
3623 MAKE_LOWER_TAGS=
3624 else
3625 MAKE_LOWER_TAGS="#"
3626 fi
3627
3628 echo "$as_me:3628: checking if you want to see long compiling messages" >&5
3629 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3630
3631 # Check whether --enable-echo or --disable-echo was given.
3632 if test "${enable_echo+set}" = set; then
3633 enableval="$enable_echo"
3634 test "$enableval" != no && enableval=yes
3635 if test "$enableval" != "yes" ; then
3636
3637 ECHO_LT='--silent'
3638 ECHO_LD='@echo linking $@;'
3639 RULE_CC='@echo compiling $<'
3640 SHOW_CC='@echo compiling $@'
3641 ECHO_CC='@'
3642
3643 else
3644
3645 ECHO_LT=''
3646 ECHO_LD=''
3647 RULE_CC=''
3648 SHOW_CC=''
3649 ECHO_CC=''
3650
3651 fi
3652 else
3653 enableval=yes
3654
3655 ECHO_LT=''
3656 ECHO_LD=''
3657 RULE_CC=''
3658 SHOW_CC=''
3659 ECHO_CC=''
3660
3661 fi;
3662 echo "$as_me:3662: result: $enableval" >&5
3663 echo "${ECHO_T}$enableval" >&6
3664
3665 case "$cf_cv_system_name" in
3666 (os2*)
3667 CFLAGS="$CFLAGS -Zmt"
3668
3669 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3670 CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
3671
3672 CXXFLAGS="$CXXFLAGS -Zmt"
3673 # autoconf's macro sets -Zexe and suffix both, which conflict:w
3674 LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
3675 ac_cv_exeext=.exe
3676 ;;
3677 esac
3678
3679 PROG_EXT="$EXEEXT"
3680
3681 test -n "$PROG_EXT" &&
3682 cat >>confdefs.h <<EOF
3683 #define PROG_EXT "$PROG_EXT"
3684 EOF
3685
3686 echo "$as_me:3686: checking for PATH separator" >&5
3687 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3688 case "$cf_cv_system_name" in
3689 (os2*) PATH_SEPARATOR=';' ;;
3690 (*) ${PATH_SEPARATOR:=':'} ;;
3691 esac
3692
3693 echo "$as_me:3693: result: $PATH_SEPARATOR" >&5
3694 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3695
3696 case "$cf_cv_system_name" in
3697 (OS/2*|os2*)
3698 if test "$DFT_LWR_MODEL" = libtool; then
3699 LIB_PREFIX='lib'
3700 else
3701 LIB_PREFIX=''
3702 fi
3703 ;;
3704 (*-msvc*)
3705 LIB_PREFIX=''
3706 ;;
3707 (*) LIB_PREFIX='lib'
3708 ;;
3709 esac
3710
3711 echo "$as_me:3711: checking if the POSIX test-macros are already defined" >&5
3712 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3713 if test "${cf_cv_posix_visible+set}" = set; then
3714 echo $ECHO_N "(cached) $ECHO_C" >&6
3715 else
3716
3717 cat >"conftest.$ac_ext" <<_ACEOF
3718 #line 3718 "configure"
3719 #include "confdefs.h"
3720 #include <stdio.h>
3721 int
3722 main (void)
3723 {
3724
3725 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3726 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3727 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3728 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3729 #error conflicting symbols found
3730 #endif
3731
3732 ;
3733 return 0;
3734 }
3735 _ACEOF
3736 rm -f "conftest.$ac_objext"
3737 if { (eval echo "$as_me:3737: \"$ac_compile\"") >&5
3738 (eval $ac_compile) 2>&5
3739 ac_status=$?
3740 echo "$as_me:3740: \$? = $ac_status" >&5
3741 (exit "$ac_status"); } &&
3742 { ac_try='test -s "conftest.$ac_objext"'
3743 { (eval echo "$as_me:3743: \"$ac_try\"") >&5
3744 (eval $ac_try) 2>&5
3745 ac_status=$?
3746 echo "$as_me:3746: \$? = $ac_status" >&5
3747 (exit "$ac_status"); }; }; then
3748 cf_cv_posix_visible=no
3749 else
3750 echo "$as_me: failed program was:" >&5
3751 cat "conftest.$ac_ext" >&5
3752 cf_cv_posix_visible=yes
3753 fi
3754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3755
3756 fi
3757 echo "$as_me:3757: result: $cf_cv_posix_visible" >&5
3758 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3759
3760 if test "$cf_cv_posix_visible" = no; then
3761
3762 cf_XOPEN_SOURCE=500
3763 cf_POSIX_C_SOURCE=199506L
3764 cf_xopen_source=
3765
3766 case "$host_os" in
3767 (aix[4-7]*)
3768 cf_xopen_source="-D_ALL_SOURCE"
3769 ;;
3770 (darwin[0-8].*)
3771 cf_xopen_source="-D_APPLE_C_SOURCE"
3772 ;;
3773 (darwin*)
3774 cf_xopen_source="-D_DARWIN_C_SOURCE"
3775 cf_XOPEN_SOURCE=
3776 ;;
3777 (freebsd*|dragonfly*|midnightbsd*)
3778 # 5.x headers associate
3779 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3780 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3781 cf_POSIX_C_SOURCE=200112L
3782 cf_XOPEN_SOURCE=600
3783 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3784 ;;
3785 (hpux11*)
3786 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3787 ;;
3788 (hpux*)
3789 cf_xopen_source="-D_HPUX_SOURCE"
3790 ;;
3791 (irix[56].*)
3792 cf_xopen_source="-D_SGI_SOURCE"
3793 cf_XOPEN_SOURCE=
3794 ;;
3795 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
3796
3797 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3798
3799 echo "$as_me:3799: checking if this is the GNU C library" >&5
3800 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3801 if test "${cf_cv_gnu_library+set}" = set; then
3802 echo $ECHO_N "(cached) $ECHO_C" >&6
3803 else
3804
3805 cat >"conftest.$ac_ext" <<_ACEOF
3806 #line 3806 "configure"
3807 #include "confdefs.h"
3808 #include <sys/types.h>
3809 int
3810 main (void)
3811 {
3812
3813 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3814 return 0;
3815 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3816 return 0;
3817 #else
3818 # error not GNU C library
3819 #endif
3820 ;
3821 return 0;
3822 }
3823 _ACEOF
3824 rm -f "conftest.$ac_objext"
3825 if { (eval echo "$as_me:3825: \"$ac_compile\"") >&5
3826 (eval $ac_compile) 2>&5
3827 ac_status=$?
3828 echo "$as_me:3828: \$? = $ac_status" >&5
3829 (exit "$ac_status"); } &&
3830 { ac_try='test -s "conftest.$ac_objext"'
3831 { (eval echo "$as_me:3831: \"$ac_try\"") >&5
3832 (eval $ac_try) 2>&5
3833 ac_status=$?
3834 echo "$as_me:3834: \$? = $ac_status" >&5
3835 (exit "$ac_status"); }; }; then
3836 cf_cv_gnu_library=yes
3837 else
3838 echo "$as_me: failed program was:" >&5
3839 cat "conftest.$ac_ext" >&5
3840 cf_cv_gnu_library=no
3841 fi
3842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3843
3844 fi
3845 echo "$as_me:3845: result: $cf_cv_gnu_library" >&5
3846 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3847
3848 if test x$cf_cv_gnu_library = xyes; then
3849
3850 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3851 # was changed to help a little. newlib incorporated the change about 4
3852 # years later.
3853 echo "$as_me:3853: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3854 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3855 if test "${cf_cv_gnu_library_219+set}" = set; then
3856 echo $ECHO_N "(cached) $ECHO_C" >&6
3857 else
3858
3859 cf_save="$CPPFLAGS"
3860
3861 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3862 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3863
3864 cat >"conftest.$ac_ext" <<_ACEOF
3865 #line 3865 "configure"
3866 #include "confdefs.h"
3867 #include <sys/types.h>
3868 int
3869 main (void)
3870 {
3871
3872 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3873 return 0;
3874 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3875 return 0;
3876 #else
3877 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3878 #endif
3879 ;
3880 return 0;
3881 }
3882 _ACEOF
3883 rm -f "conftest.$ac_objext"
3884 if { (eval echo "$as_me:3884: \"$ac_compile\"") >&5
3885 (eval $ac_compile) 2>&5
3886 ac_status=$?
3887 echo "$as_me:3887: \$? = $ac_status" >&5
3888 (exit "$ac_status"); } &&
3889 { ac_try='test -s "conftest.$ac_objext"'
3890 { (eval echo "$as_me:3890: \"$ac_try\"") >&5
3891 (eval $ac_try) 2>&5
3892 ac_status=$?
3893 echo "$as_me:3893: \$? = $ac_status" >&5
3894 (exit "$ac_status"); }; }; then
3895 cf_cv_gnu_library_219=yes
3896 else
3897 echo "$as_me: failed program was:" >&5
3898 cat "conftest.$ac_ext" >&5
3899 cf_cv_gnu_library_219=no
3900 fi
3901 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3902 CPPFLAGS="$cf_save"
3903
3904 fi
3905 echo "$as_me:3905: result: $cf_cv_gnu_library_219" >&5
3906 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3907
3908 if test "x$cf_cv_gnu_library_219" = xyes; then
3909 cf_save="$CPPFLAGS"
3910 echo "$as_me:3910: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3911 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3912 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3913 echo $ECHO_N "(cached) $ECHO_C" >&6
3914 else
3915
3916 cf_fix_cppflags=no
3917 cf_new_cflags=
3918 cf_new_cppflags=
3919 cf_new_extra_cppflags=
3920
3921 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3922 do
3923 case "$cf_fix_cppflags" in
3924 (no)
3925 case "$cf_add_cflags" in
3926 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3927 case "$cf_add_cflags" in
3928 (-D*)
3929 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3930
3931 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3932 && test -z "${cf_tst_cflags}" \
3933 && cf_fix_cppflags=yes
3934
3935 if test "$cf_fix_cppflags" = yes ; then
3936
3937 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3938 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3939
3940 continue
3941 elif test "${cf_tst_cflags}" = "\"'" ; then
3942
3943 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3944 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3945
3946 continue
3947 fi
3948 ;;
3949 esac
3950 case "$CPPFLAGS" in
3951 (*$cf_add_cflags)
3952 ;;
3953 (*)
3954 case "$cf_add_cflags" in
3955 (-D*)
3956 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3957
3958 CPPFLAGS=`echo "$CPPFLAGS" | \
3959 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3960 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3961
3962 ;;
3963 esac
3964
3965 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3966 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3967
3968 ;;
3969 esac
3970 ;;
3971 (*)
3972
3973 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3974 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3975
3976 ;;
3977 esac
3978 ;;
3979 (yes)
3980
3981 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3982 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3983
3984 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3985
3986 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3987 && test -z "${cf_tst_cflags}" \
3988 && cf_fix_cppflags=no
3989 ;;
3990 esac
3991 done
3992
3993 if test -n "$cf_new_cflags" ; then
3994
3995 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3996 CFLAGS="${CFLAGS}$cf_new_cflags"
3997
3998 fi
3999
4000 if test -n "$cf_new_cppflags" ; then
4001
4002 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4003 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4004
4005 fi
4006
4007 if test -n "$cf_new_extra_cppflags" ; then
4008
4009 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4010 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4011
4012 fi
4013
4014 cat >"conftest.$ac_ext" <<_ACEOF
4015 #line 4015 "configure"
4016 #include "confdefs.h"
4017
4018 #include <limits.h>
4019 #include <sys/types.h>
4020
4021 int
4022 main (void)
4023 {
4024
4025 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4026 return 0;
4027 #else
4028 # error GNU C library is too old
4029 #endif
4030 ;
4031 return 0;
4032 }
4033 _ACEOF
4034 rm -f "conftest.$ac_objext"
4035 if { (eval echo "$as_me:4035: \"$ac_compile\"") >&5
4036 (eval $ac_compile) 2>&5
4037 ac_status=$?
4038 echo "$as_me:4038: \$? = $ac_status" >&5
4039 (exit "$ac_status"); } &&
4040 { ac_try='test -s "conftest.$ac_objext"'
4041 { (eval echo "$as_me:4041: \"$ac_try\"") >&5
4042 (eval $ac_try) 2>&5
4043 ac_status=$?
4044 echo "$as_me:4044: \$? = $ac_status" >&5
4045 (exit "$ac_status"); }; }; then
4046 cf_cv_gnu_dftsrc_219=yes
4047 else
4048 echo "$as_me: failed program was:" >&5
4049 cat "conftest.$ac_ext" >&5
4050 cf_cv_gnu_dftsrc_219=no
4051 fi
4052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4053
4054 fi
4055 echo "$as_me:4055: result: $cf_cv_gnu_dftsrc_219" >&5
4056 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4057 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4058 else
4059 cf_cv_gnu_dftsrc_219=maybe
4060 fi
4061
4062 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4063
4064 echo "$as_me:4064: checking if we must define _GNU_SOURCE" >&5
4065 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4066 if test "${cf_cv_gnu_source+set}" = set; then
4067 echo $ECHO_N "(cached) $ECHO_C" >&6
4068 else
4069
4070 cat >"conftest.$ac_ext" <<_ACEOF
4071 #line 4071 "configure"
4072 #include "confdefs.h"
4073 #include <sys/types.h>
4074 int
4075 main (void)
4076 {
4077
4078 #ifndef _XOPEN_SOURCE
4079 #error expected _XOPEN_SOURCE to be defined
4080 #endif
4081 ;
4082 return 0;
4083 }
4084 _ACEOF
4085 rm -f "conftest.$ac_objext"
4086 if { (eval echo "$as_me:4086: \"$ac_compile\"") >&5
4087 (eval $ac_compile) 2>&5
4088 ac_status=$?
4089 echo "$as_me:4089: \$? = $ac_status" >&5
4090 (exit "$ac_status"); } &&
4091 { ac_try='test -s "conftest.$ac_objext"'
4092 { (eval echo "$as_me:4092: \"$ac_try\"") >&5
4093 (eval $ac_try) 2>&5
4094 ac_status=$?
4095 echo "$as_me:4095: \$? = $ac_status" >&5
4096 (exit "$ac_status"); }; }; then
4097 cf_cv_gnu_source=no
4098 else
4099 echo "$as_me: failed program was:" >&5
4100 cat "conftest.$ac_ext" >&5
4101 cf_save="$CPPFLAGS"
4102
4103 cf_fix_cppflags=no
4104 cf_new_cflags=
4105 cf_new_cppflags=
4106 cf_new_extra_cppflags=
4107
4108 for cf_add_cflags in -D_GNU_SOURCE
4109 do
4110 case "$cf_fix_cppflags" in
4111 (no)
4112 case "$cf_add_cflags" in
4113 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4114 case "$cf_add_cflags" in
4115 (-D*)
4116 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4117
4118 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4119 && test -z "${cf_tst_cflags}" \
4120 && cf_fix_cppflags=yes
4121
4122 if test "$cf_fix_cppflags" = yes ; then
4123
4124 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4125 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4126
4127 continue
4128 elif test "${cf_tst_cflags}" = "\"'" ; then
4129
4130 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4131 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4132
4133 continue
4134 fi
4135 ;;
4136 esac
4137 case "$CPPFLAGS" in
4138 (*$cf_add_cflags)
4139 ;;
4140 (*)
4141 case "$cf_add_cflags" in
4142 (-D*)
4143 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4144
4145 CPPFLAGS=`echo "$CPPFLAGS" | \
4146 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4147 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4148
4149 ;;
4150 esac
4151
4152 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4153 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4154
4155 ;;
4156 esac
4157 ;;
4158 (*)
4159
4160 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4161 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4162
4163 ;;
4164 esac
4165 ;;
4166 (yes)
4167
4168 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4169 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4170
4171 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4172
4173 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4174 && test -z "${cf_tst_cflags}" \
4175 && cf_fix_cppflags=no
4176 ;;
4177 esac
4178 done
4179
4180 if test -n "$cf_new_cflags" ; then
4181
4182 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4183 CFLAGS="${CFLAGS}$cf_new_cflags"
4184
4185 fi
4186
4187 if test -n "$cf_new_cppflags" ; then
4188
4189 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4190 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4191
4192 fi
4193
4194 if test -n "$cf_new_extra_cppflags" ; then
4195
4196 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4197 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4198
4199 fi
4200
4201 cat >"conftest.$ac_ext" <<_ACEOF
4202 #line 4202 "configure"
4203 #include "confdefs.h"
4204 #include <sys/types.h>
4205 int
4206 main (void)
4207 {
4208
4209 #ifdef _XOPEN_SOURCE
4210 #error expected _XOPEN_SOURCE to be undefined
4211 #endif
4212 ;
4213 return 0;
4214 }
4215 _ACEOF
4216 rm -f "conftest.$ac_objext"
4217 if { (eval echo "$as_me:4217: \"$ac_compile\"") >&5
4218 (eval $ac_compile) 2>&5
4219 ac_status=$?
4220 echo "$as_me:4220: \$? = $ac_status" >&5
4221 (exit "$ac_status"); } &&
4222 { ac_try='test -s "conftest.$ac_objext"'
4223 { (eval echo "$as_me:4223: \"$ac_try\"") >&5
4224 (eval $ac_try) 2>&5
4225 ac_status=$?
4226 echo "$as_me:4226: \$? = $ac_status" >&5
4227 (exit "$ac_status"); }; }; then
4228 cf_cv_gnu_source=no
4229 else
4230 echo "$as_me: failed program was:" >&5
4231 cat "conftest.$ac_ext" >&5
4232 cf_cv_gnu_source=yes
4233 fi
4234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4235 CPPFLAGS="$cf_save"
4236
4237 fi
4238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4239
4240 fi
4241 echo "$as_me:4241: result: $cf_cv_gnu_source" >&5
4242 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4243
4244 if test "$cf_cv_gnu_source" = yes
4245 then
4246 echo "$as_me:4246: checking if we should also define _DEFAULT_SOURCE" >&5
4247 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4248 if test "${cf_cv_default_source+set}" = set; then
4249 echo $ECHO_N "(cached) $ECHO_C" >&6
4250 else
4251
4252 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4253 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4254
4255 cat >"conftest.$ac_ext" <<_ACEOF
4256 #line 4256 "configure"
4257 #include "confdefs.h"
4258 #include <sys/types.h>
4259 int
4260 main (void)
4261 {
4262
4263 #ifdef _DEFAULT_SOURCE
4264 #error expected _DEFAULT_SOURCE to be undefined
4265 #endif
4266 ;
4267 return 0;
4268 }
4269 _ACEOF
4270 rm -f "conftest.$ac_objext"
4271 if { (eval echo "$as_me:4271: \"$ac_compile\"") >&5
4272 (eval $ac_compile) 2>&5
4273 ac_status=$?
4274 echo "$as_me:4274: \$? = $ac_status" >&5
4275 (exit "$ac_status"); } &&
4276 { ac_try='test -s "conftest.$ac_objext"'
4277 { (eval echo "$as_me:4277: \"$ac_try\"") >&5
4278 (eval $ac_try) 2>&5
4279 ac_status=$?
4280 echo "$as_me:4280: \$? = $ac_status" >&5
4281 (exit "$ac_status"); }; }; then
4282 cf_cv_default_source=no
4283 else
4284 echo "$as_me: failed program was:" >&5
4285 cat "conftest.$ac_ext" >&5
4286 cf_cv_default_source=yes
4287 fi
4288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4289
4290 fi
4291 echo "$as_me:4291: result: $cf_cv_default_source" >&5
4292 echo "${ECHO_T}$cf_cv_default_source" >&6
4293 if test "$cf_cv_default_source" = yes
4294 then
4295
4296 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4297 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4298
4299 fi
4300 fi
4301 fi
4302
4303 fi
4304
4305 ;;
4306 linux*musl)
4307 cf_xopen_source="-D_BSD_SOURCE"
4308 ;;
4309 (minix*)
4310 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4311 ;;
4312 (mirbsd*)
4313 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4314 cf_XOPEN_SOURCE=
4315
4316 if test "$cf_cv_posix_visible" = no; then
4317
4318 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4319
4320 cf_save_CFLAGS="$CFLAGS"
4321 cf_save_CPPFLAGS="$CPPFLAGS"
4322
4323 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4324 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4325 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4326
4327 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4328 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4329 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4330
4331 echo "$as_me:4331: checking if we should define _POSIX_C_SOURCE" >&5
4332 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4333 if test "${cf_cv_posix_c_source+set}" = set; then
4334 echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336
4337 echo "${as_me:-configure}:4337: testing if the symbol is already defined go no further ..." 1>&5
4338
4339 cat >"conftest.$ac_ext" <<_ACEOF
4340 #line 4340 "configure"
4341 #include "confdefs.h"
4342 #include <sys/types.h>
4343 int
4344 main (void)
4345 {
4346
4347 #ifndef _POSIX_C_SOURCE
4348 #error _POSIX_C_SOURCE is not defined
4349 #endif
4350 ;
4351 return 0;
4352 }
4353 _ACEOF
4354 rm -f "conftest.$ac_objext"
4355 if { (eval echo "$as_me:4355: \"$ac_compile\"") >&5
4356 (eval $ac_compile) 2>&5
4357 ac_status=$?
4358 echo "$as_me:4358: \$? = $ac_status" >&5
4359 (exit "$ac_status"); } &&
4360 { ac_try='test -s "conftest.$ac_objext"'
4361 { (eval echo "$as_me:4361: \"$ac_try\"") >&5
4362 (eval $ac_try) 2>&5
4363 ac_status=$?
4364 echo "$as_me:4364: \$? = $ac_status" >&5
4365 (exit "$ac_status"); }; }; then
4366 cf_cv_posix_c_source=no
4367 else
4368 echo "$as_me: failed program was:" >&5
4369 cat "conftest.$ac_ext" >&5
4370 cf_want_posix_source=no
4371 case .$cf_POSIX_C_SOURCE in
4372 (.[12]??*)
4373 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4374 ;;
4375 (.2)
4376 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4377 cf_want_posix_source=yes
4378 ;;
4379 (.*)
4380 cf_want_posix_source=yes
4381 ;;
4382 esac
4383 if test "$cf_want_posix_source" = yes ; then
4384 cat >"conftest.$ac_ext" <<_ACEOF
4385 #line 4385 "configure"
4386 #include "confdefs.h"
4387 #include <sys/types.h>
4388 int
4389 main (void)
4390 {
4391
4392 #ifdef _POSIX_SOURCE
4393 #error _POSIX_SOURCE is defined
4394 #endif
4395 ;
4396 return 0;
4397 }
4398 _ACEOF
4399 rm -f "conftest.$ac_objext"
4400 if { (eval echo "$as_me:4400: \"$ac_compile\"") >&5
4401 (eval $ac_compile) 2>&5
4402 ac_status=$?
4403 echo "$as_me:4403: \$? = $ac_status" >&5
4404 (exit "$ac_status"); } &&
4405 { ac_try='test -s "conftest.$ac_objext"'
4406 { (eval echo "$as_me:4406: \"$ac_try\"") >&5
4407 (eval $ac_try) 2>&5
4408 ac_status=$?
4409 echo "$as_me:4409: \$? = $ac_status" >&5
4410 (exit "$ac_status"); }; }; then
4411 :
4412 else
4413 echo "$as_me: failed program was:" >&5
4414 cat "conftest.$ac_ext" >&5
4415 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4416 fi
4417 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4418 fi
4419
4420 echo "${as_me:-configure}:4420: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4421
4422 CFLAGS="$cf_trim_CFLAGS"
4423 CPPFLAGS="$cf_trim_CPPFLAGS"
4424
4425 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4426 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4427
4428 echo "${as_me:-configure}:4428: testing if the second compile does not leave our definition intact error ..." 1>&5
4429
4430 cat >"conftest.$ac_ext" <<_ACEOF
4431 #line 4431 "configure"
4432 #include "confdefs.h"
4433 #include <sys/types.h>
4434 int
4435 main (void)
4436 {
4437
4438 #ifndef _POSIX_C_SOURCE
4439 #error _POSIX_C_SOURCE is not defined
4440 #endif
4441 ;
4442 return 0;
4443 }
4444 _ACEOF
4445 rm -f "conftest.$ac_objext"
4446 if { (eval echo "$as_me:4446: \"$ac_compile\"") >&5
4447 (eval $ac_compile) 2>&5
4448 ac_status=$?
4449 echo "$as_me:4449: \$? = $ac_status" >&5
4450 (exit "$ac_status"); } &&
4451 { ac_try='test -s "conftest.$ac_objext"'
4452 { (eval echo "$as_me:4452: \"$ac_try\"") >&5
4453 (eval $ac_try) 2>&5
4454 ac_status=$?
4455 echo "$as_me:4455: \$? = $ac_status" >&5
4456 (exit "$ac_status"); }; }; then
4457 :
4458 else
4459 echo "$as_me: failed program was:" >&5
4460 cat "conftest.$ac_ext" >&5
4461 cf_cv_posix_c_source=no
4462 fi
4463 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4464 CFLAGS="$cf_save_CFLAGS"
4465 CPPFLAGS="$cf_save_CPPFLAGS"
4466
4467 fi
4468 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4469
4470 fi
4471 echo "$as_me:4471: result: $cf_cv_posix_c_source" >&5
4472 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4473
4474 if test "$cf_cv_posix_c_source" != no ; then
4475 CFLAGS="$cf_trim_CFLAGS"
4476 CPPFLAGS="$cf_trim_CPPFLAGS"
4477
4478 cf_fix_cppflags=no
4479 cf_new_cflags=
4480 cf_new_cppflags=
4481 cf_new_extra_cppflags=
4482
4483 for cf_add_cflags in $cf_cv_posix_c_source
4484 do
4485 case "$cf_fix_cppflags" in
4486 (no)
4487 case "$cf_add_cflags" in
4488 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4489 case "$cf_add_cflags" in
4490 (-D*)
4491 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4492
4493 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4494 && test -z "${cf_tst_cflags}" \
4495 && cf_fix_cppflags=yes
4496
4497 if test "$cf_fix_cppflags" = yes ; then
4498
4499 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4500 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4501
4502 continue
4503 elif test "${cf_tst_cflags}" = "\"'" ; then
4504
4505 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4506 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4507
4508 continue
4509 fi
4510 ;;
4511 esac
4512 case "$CPPFLAGS" in
4513 (*$cf_add_cflags)
4514 ;;
4515 (*)
4516 case "$cf_add_cflags" in
4517 (-D*)
4518 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4519
4520 CPPFLAGS=`echo "$CPPFLAGS" | \
4521 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4522 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4523
4524 ;;
4525 esac
4526
4527 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4528 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4529
4530 ;;
4531 esac
4532 ;;
4533 (*)
4534
4535 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4536 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4537
4538 ;;
4539 esac
4540 ;;
4541 (yes)
4542
4543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4545
4546 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4547
4548 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4549 && test -z "${cf_tst_cflags}" \
4550 && cf_fix_cppflags=no
4551 ;;
4552 esac
4553 done
4554
4555 if test -n "$cf_new_cflags" ; then
4556
4557 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4558 CFLAGS="${CFLAGS}$cf_new_cflags"
4559
4560 fi
4561
4562 if test -n "$cf_new_cppflags" ; then
4563
4564 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4565 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4566
4567 fi
4568
4569 if test -n "$cf_new_extra_cppflags" ; then
4570
4571 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4572 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4573
4574 fi
4575
4576 fi
4577
4578 fi # cf_cv_posix_visible
4579
4580 ;;
4581 (netbsd*)
4582 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4583 ;;
4584 (openbsd[6-9]*)
4585 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4586 # see https://www.mail-archive.com/[email protected]/msg13200.html
4587 # Abusing the conformance level is a workaround.
4588 { echo "$as_me:4588: WARNING: this system does not provide usable locale support" >&5
4589 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4590 cf_xopen_source="-D_BSD_SOURCE"
4591 cf_XOPEN_SOURCE=700
4592 ;;
4593 (openbsd[4-5]*)
4594 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4595 cf_xopen_source="-D_BSD_SOURCE"
4596 cf_XOPEN_SOURCE=600
4597 ;;
4598 (openbsd*)
4599 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4600 ;;
4601 (osf[45]*)
4602 cf_xopen_source="-D_OSF_SOURCE"
4603 ;;
4604 (nto-qnx*)
4605 cf_xopen_source="-D_QNX_SOURCE"
4606 ;;
4607 (sco*)
4608 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4609 ;;
4610 (solaris2.*)
4611 cf_xopen_source="-D__EXTENSIONS__"
4612 cf_cv_xopen_source=broken
4613 ;;
4614 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4615 cf_XOPEN_SOURCE=
4616 cf_POSIX_C_SOURCE=
4617 ;;
4618 (*)
4619
4620 echo "$as_me:4620: checking if we should define _XOPEN_SOURCE" >&5
4621 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4622 if test "${cf_cv_xopen_source+set}" = set; then
4623 echo $ECHO_N "(cached) $ECHO_C" >&6
4624 else
4625
4626 cat >"conftest.$ac_ext" <<_ACEOF
4627 #line 4627 "configure"
4628 #include "confdefs.h"
4629
4630 $ac_includes_default
4631
4632 int
4633 main (void)
4634 {
4635
4636 #ifndef _XOPEN_SOURCE
4637 #error _XOPEN_SOURCE is not defined
4638 #endif
4639
4640 ;
4641 return 0;
4642 }
4643 _ACEOF
4644 rm -f "conftest.$ac_objext"
4645 if { (eval echo "$as_me:4645: \"$ac_compile\"") >&5
4646 (eval $ac_compile) 2>&5
4647 ac_status=$?
4648 echo "$as_me:4648: \$? = $ac_status" >&5
4649 (exit "$ac_status"); } &&
4650 { ac_try='test -s "conftest.$ac_objext"'
4651 { (eval echo "$as_me:4651: \"$ac_try\"") >&5
4652 (eval $ac_try) 2>&5
4653 ac_status=$?
4654 echo "$as_me:4654: \$? = $ac_status" >&5
4655 (exit "$ac_status"); }; }; then
4656 cf_cv_xopen_source=no
4657 else
4658 echo "$as_me: failed program was:" >&5
4659 cat "conftest.$ac_ext" >&5
4660 cf_save="$CPPFLAGS"
4661
4662 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4663 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4664
4665 cat >"conftest.$ac_ext" <<_ACEOF
4666 #line 4666 "configure"
4667 #include "confdefs.h"
4668
4669 $ac_includes_default
4670
4671 int
4672 main (void)
4673 {
4674
4675 #ifndef _XOPEN_SOURCE
4676 #error _XOPEN_SOURCE is not defined
4677 #endif
4678
4679 ;
4680 return 0;
4681 }
4682 _ACEOF
4683 rm -f "conftest.$ac_objext"
4684 if { (eval echo "$as_me:4684: \"$ac_compile\"") >&5
4685 (eval $ac_compile) 2>&5
4686 ac_status=$?
4687 echo "$as_me:4687: \$? = $ac_status" >&5
4688 (exit "$ac_status"); } &&
4689 { ac_try='test -s "conftest.$ac_objext"'
4690 { (eval echo "$as_me:4690: \"$ac_try\"") >&5
4691 (eval $ac_try) 2>&5
4692 ac_status=$?
4693 echo "$as_me:4693: \$? = $ac_status" >&5
4694 (exit "$ac_status"); }; }; then
4695 cf_cv_xopen_source=no
4696 else
4697 echo "$as_me: failed program was:" >&5
4698 cat "conftest.$ac_ext" >&5
4699 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4700 fi
4701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4702 CPPFLAGS="$cf_save"
4703
4704 fi
4705 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4706
4707 fi
4708 echo "$as_me:4708: result: $cf_cv_xopen_source" >&5
4709 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4710
4711 if test "$cf_cv_xopen_source" != no ; then
4712
4713 CFLAGS=`echo "$CFLAGS" | \
4714 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4715 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4716
4717 CPPFLAGS=`echo "$CPPFLAGS" | \
4718 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4719 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4720
4721 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4722
4723 for cf_add_cflags in $cf_temp_xopen_source
4724 do
4725 case "x$cf_add_cflags" in
4726 (x-[DU]*)
4727
4728 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4729 while true
4730 do
4731 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'`
4732 test "$CFLAGS" != "$cf_old_cflag" || break
4733
4734 CFLAGS="$cf_old_cflag"
4735 done
4736
4737 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4738 while true
4739 do
4740 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'`
4741 test "$CPPFLAGS" != "$cf_old_cflag" || break
4742
4743 CPPFLAGS="$cf_old_cflag"
4744 done
4745
4746 ;;
4747 esac
4748
4749 cf_fix_cppflags=no
4750 cf_new_cflags=
4751 cf_new_cppflags=
4752 cf_new_extra_cppflags=
4753
4754 for cf_add_cflags in $cf_add_cflags
4755 do
4756 case "$cf_fix_cppflags" in
4757 (no)
4758 case "$cf_add_cflags" in
4759 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4760 case "$cf_add_cflags" in
4761 (-D*)
4762 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4763
4764 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4765 && test -z "${cf_tst_cflags}" \
4766 && cf_fix_cppflags=yes
4767
4768 if test "$cf_fix_cppflags" = yes ; then
4769
4770 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4771 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4772
4773 continue
4774 elif test "${cf_tst_cflags}" = "\"'" ; then
4775
4776 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4777 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4778
4779 continue
4780 fi
4781 ;;
4782 esac
4783 case "$CPPFLAGS" in
4784 (*$cf_add_cflags)
4785 ;;
4786 (*)
4787 case "$cf_add_cflags" in
4788 (-D*)
4789 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4790
4791 CPPFLAGS=`echo "$CPPFLAGS" | \
4792 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4793 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4794
4795 ;;
4796 esac
4797
4798 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4799 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4800
4801 ;;
4802 esac
4803 ;;
4804 (*)
4805
4806 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4807 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4808
4809 ;;
4810 esac
4811 ;;
4812 (yes)
4813
4814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4816
4817 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4818
4819 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4820 && test -z "${cf_tst_cflags}" \
4821 && cf_fix_cppflags=no
4822 ;;
4823 esac
4824 done
4825
4826 if test -n "$cf_new_cflags" ; then
4827
4828 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4829 CFLAGS="${CFLAGS}$cf_new_cflags"
4830
4831 fi
4832
4833 if test -n "$cf_new_cppflags" ; then
4834
4835 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4836 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4837
4838 fi
4839
4840 if test -n "$cf_new_extra_cppflags" ; then
4841
4842 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4843 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4844
4845 fi
4846
4847 done
4848
4849 fi
4850
4851 cf_save_xopen_cppflags="$CPPFLAGS"
4852
4853 if test "$cf_cv_posix_visible" = no; then
4854
4855 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4856
4857 cf_save_CFLAGS="$CFLAGS"
4858 cf_save_CPPFLAGS="$CPPFLAGS"
4859
4860 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4861 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4862 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4863
4864 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4865 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4866 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4867
4868 echo "$as_me:4868: checking if we should define _POSIX_C_SOURCE" >&5
4869 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4870 if test "${cf_cv_posix_c_source+set}" = set; then
4871 echo $ECHO_N "(cached) $ECHO_C" >&6
4872 else
4873
4874 echo "${as_me:-configure}:4874: testing if the symbol is already defined go no further ..." 1>&5
4875
4876 cat >"conftest.$ac_ext" <<_ACEOF
4877 #line 4877 "configure"
4878 #include "confdefs.h"
4879 #include <sys/types.h>
4880 int
4881 main (void)
4882 {
4883
4884 #ifndef _POSIX_C_SOURCE
4885 #error _POSIX_C_SOURCE is not defined
4886 #endif
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 cf_cv_posix_c_source=no
4904 else
4905 echo "$as_me: failed program was:" >&5
4906 cat "conftest.$ac_ext" >&5
4907 cf_want_posix_source=no
4908 case .$cf_POSIX_C_SOURCE in
4909 (.[12]??*)
4910 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4911 ;;
4912 (.2)
4913 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4914 cf_want_posix_source=yes
4915 ;;
4916 (.*)
4917 cf_want_posix_source=yes
4918 ;;
4919 esac
4920 if test "$cf_want_posix_source" = yes ; then
4921 cat >"conftest.$ac_ext" <<_ACEOF
4922 #line 4922 "configure"
4923 #include "confdefs.h"
4924 #include <sys/types.h>
4925 int
4926 main (void)
4927 {
4928
4929 #ifdef _POSIX_SOURCE
4930 #error _POSIX_SOURCE is defined
4931 #endif
4932 ;
4933 return 0;
4934 }
4935 _ACEOF
4936 rm -f "conftest.$ac_objext"
4937 if { (eval echo "$as_me:4937: \"$ac_compile\"") >&5
4938 (eval $ac_compile) 2>&5
4939 ac_status=$?
4940 echo "$as_me:4940: \$? = $ac_status" >&5
4941 (exit "$ac_status"); } &&
4942 { ac_try='test -s "conftest.$ac_objext"'
4943 { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4944 (eval $ac_try) 2>&5
4945 ac_status=$?
4946 echo "$as_me:4946: \$? = $ac_status" >&5
4947 (exit "$ac_status"); }; }; then
4948 :
4949 else
4950 echo "$as_me: failed program was:" >&5
4951 cat "conftest.$ac_ext" >&5
4952 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4953 fi
4954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4955 fi
4956
4957 echo "${as_me:-configure}:4957: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4958
4959 CFLAGS="$cf_trim_CFLAGS"
4960 CPPFLAGS="$cf_trim_CPPFLAGS"
4961
4962 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4963 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4964
4965 echo "${as_me:-configure}:4965: testing if the second compile does not leave our definition intact error ..." 1>&5
4966
4967 cat >"conftest.$ac_ext" <<_ACEOF
4968 #line 4968 "configure"
4969 #include "confdefs.h"
4970 #include <sys/types.h>
4971 int
4972 main (void)
4973 {
4974
4975 #ifndef _POSIX_C_SOURCE
4976 #error _POSIX_C_SOURCE is not defined
4977 #endif
4978 ;
4979 return 0;
4980 }
4981 _ACEOF
4982 rm -f "conftest.$ac_objext"
4983 if { (eval echo "$as_me:4983: \"$ac_compile\"") >&5
4984 (eval $ac_compile) 2>&5
4985 ac_status=$?
4986 echo "$as_me:4986: \$? = $ac_status" >&5
4987 (exit "$ac_status"); } &&
4988 { ac_try='test -s "conftest.$ac_objext"'
4989 { (eval echo "$as_me:4989: \"$ac_try\"") >&5
4990 (eval $ac_try) 2>&5
4991 ac_status=$?
4992 echo "$as_me:4992: \$? = $ac_status" >&5
4993 (exit "$ac_status"); }; }; then
4994 :
4995 else
4996 echo "$as_me: failed program was:" >&5
4997 cat "conftest.$ac_ext" >&5
4998 cf_cv_posix_c_source=no
4999 fi
5000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5001 CFLAGS="$cf_save_CFLAGS"
5002 CPPFLAGS="$cf_save_CPPFLAGS"
5003
5004 fi
5005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5006
5007 fi
5008 echo "$as_me:5008: result: $cf_cv_posix_c_source" >&5
5009 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5010
5011 if test "$cf_cv_posix_c_source" != no ; then
5012 CFLAGS="$cf_trim_CFLAGS"
5013 CPPFLAGS="$cf_trim_CPPFLAGS"
5014
5015 cf_fix_cppflags=no
5016 cf_new_cflags=
5017 cf_new_cppflags=
5018 cf_new_extra_cppflags=
5019
5020 for cf_add_cflags in $cf_cv_posix_c_source
5021 do
5022 case "$cf_fix_cppflags" in
5023 (no)
5024 case "$cf_add_cflags" in
5025 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5026 case "$cf_add_cflags" in
5027 (-D*)
5028 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5029
5030 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5031 && test -z "${cf_tst_cflags}" \
5032 && cf_fix_cppflags=yes
5033
5034 if test "$cf_fix_cppflags" = yes ; then
5035
5036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5038
5039 continue
5040 elif test "${cf_tst_cflags}" = "\"'" ; then
5041
5042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5044
5045 continue
5046 fi
5047 ;;
5048 esac
5049 case "$CPPFLAGS" in
5050 (*$cf_add_cflags)
5051 ;;
5052 (*)
5053 case "$cf_add_cflags" in
5054 (-D*)
5055 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5056
5057 CPPFLAGS=`echo "$CPPFLAGS" | \
5058 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5059 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5060
5061 ;;
5062 esac
5063
5064 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5065 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5066
5067 ;;
5068 esac
5069 ;;
5070 (*)
5071
5072 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5073 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5074
5075 ;;
5076 esac
5077 ;;
5078 (yes)
5079
5080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5082
5083 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5084
5085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5086 && test -z "${cf_tst_cflags}" \
5087 && cf_fix_cppflags=no
5088 ;;
5089 esac
5090 done
5091
5092 if test -n "$cf_new_cflags" ; then
5093
5094 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5095 CFLAGS="${CFLAGS}$cf_new_cflags"
5096
5097 fi
5098
5099 if test -n "$cf_new_cppflags" ; then
5100
5101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5102 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5103
5104 fi
5105
5106 if test -n "$cf_new_extra_cppflags" ; then
5107
5108 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5109 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5110
5111 fi
5112
5113 fi
5114
5115 fi # cf_cv_posix_visible
5116
5117 # Some of these niche implementations use copy/paste, double-check...
5118 if test "$cf_cv_xopen_source" = no ; then
5119 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
5120
5121 echo "${as_me:-configure}:5121: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
5122
5123 cat >"conftest.$ac_ext" <<_ACEOF
5124 #line 5124 "configure"
5125 #include "confdefs.h"
5126
5127 $ac_includes_default
5128
5129 int
5130 main (void)
5131 {
5132
5133 #ifndef _XOPEN_SOURCE
5134 #error _XOPEN_SOURCE is not defined
5135 #endif
5136
5137 ;
5138 return 0;
5139 }
5140 _ACEOF
5141 rm -f "conftest.$ac_objext"
5142 if { (eval echo "$as_me:5142: \"$ac_compile\"") >&5
5143 (eval $ac_compile) 2>&5
5144 ac_status=$?
5145 echo "$as_me:5145: \$? = $ac_status" >&5
5146 (exit "$ac_status"); } &&
5147 { ac_try='test -s "conftest.$ac_objext"'
5148 { (eval echo "$as_me:5148: \"$ac_try\"") >&5
5149 (eval $ac_try) 2>&5
5150 ac_status=$?
5151 echo "$as_me:5151: \$? = $ac_status" >&5
5152 (exit "$ac_status"); }; }; then
5153 :
5154 else
5155 echo "$as_me: failed program was:" >&5
5156 cat "conftest.$ac_ext" >&5
5157
5158 { echo "$as_me:5158: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
5159 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
5160 CPPFLAGS="$cf_save_xopen_cppflags"
5161 fi
5162 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5163 fi
5164 ;;
5165 esac
5166
5167 if test -n "$cf_xopen_source" ; then
5168
5169 for cf_add_cflags in $cf_xopen_source
5170 do
5171 case "x$cf_add_cflags" in
5172 (x-[DU]*)
5173
5174 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5175 while true
5176 do
5177 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'`
5178 test "$CFLAGS" != "$cf_old_cflag" || break
5179 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
5180
5181 echo "${as_me:-configure}:5181: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
5182
5183 CFLAGS="$cf_old_cflag"
5184 done
5185
5186 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5187 while true
5188 do
5189 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'`
5190 test "$CPPFLAGS" != "$cf_old_cflag" || break
5191 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
5192
5193 echo "${as_me:-configure}:5193: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
5194
5195 CPPFLAGS="$cf_old_cflag"
5196 done
5197
5198 ;;
5199 esac
5200
5201 cf_fix_cppflags=no
5202 cf_new_cflags=
5203 cf_new_cppflags=
5204 cf_new_extra_cppflags=
5205
5206 for cf_add_cflags in $cf_add_cflags
5207 do
5208 case "$cf_fix_cppflags" in
5209 (no)
5210 case "$cf_add_cflags" in
5211 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5212 case "$cf_add_cflags" in
5213 (-D*)
5214 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5215
5216 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5217 && test -z "${cf_tst_cflags}" \
5218 && cf_fix_cppflags=yes
5219
5220 if test "$cf_fix_cppflags" = yes ; then
5221
5222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5224
5225 continue
5226 elif test "${cf_tst_cflags}" = "\"'" ; then
5227
5228 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5229 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5230
5231 continue
5232 fi
5233 ;;
5234 esac
5235 case "$CPPFLAGS" in
5236 (*$cf_add_cflags)
5237 ;;
5238 (*)
5239 case "$cf_add_cflags" in
5240 (-D*)
5241 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5242
5243 CPPFLAGS=`echo "$CPPFLAGS" | \
5244 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5245 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5246
5247 ;;
5248 esac
5249
5250 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5251 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5252
5253 ;;
5254 esac
5255 ;;
5256 (*)
5257
5258 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5259 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5260
5261 ;;
5262 esac
5263 ;;
5264 (yes)
5265
5266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5268
5269 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5270
5271 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5272 && test -z "${cf_tst_cflags}" \
5273 && cf_fix_cppflags=no
5274 ;;
5275 esac
5276 done
5277
5278 if test -n "$cf_new_cflags" ; then
5279 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5280
5281 echo "${as_me:-configure}:5281: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5282
5283 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5284 CFLAGS="${CFLAGS}$cf_new_cflags"
5285
5286 fi
5287
5288 if test -n "$cf_new_cppflags" ; then
5289 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5290
5291 echo "${as_me:-configure}:5291: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5292
5293 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5294 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5295
5296 fi
5297
5298 if test -n "$cf_new_extra_cppflags" ; then
5299 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5300
5301 echo "${as_me:-configure}:5301: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5302
5303 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5304 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5305
5306 fi
5307
5308 done
5309
5310 fi
5311
5312 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5313 echo "$as_me:5313: checking if _XOPEN_SOURCE really is set" >&5
5314 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5315 cat >"conftest.$ac_ext" <<_ACEOF
5316 #line 5316 "configure"
5317 #include "confdefs.h"
5318 #include <stdlib.h>
5319 int
5320 main (void)
5321 {
5322
5323 #ifndef _XOPEN_SOURCE
5324 #error _XOPEN_SOURCE is not defined
5325 #endif
5326 ;
5327 return 0;
5328 }
5329 _ACEOF
5330 rm -f "conftest.$ac_objext"
5331 if { (eval echo "$as_me:5331: \"$ac_compile\"") >&5
5332 (eval $ac_compile) 2>&5
5333 ac_status=$?
5334 echo "$as_me:5334: \$? = $ac_status" >&5
5335 (exit "$ac_status"); } &&
5336 { ac_try='test -s "conftest.$ac_objext"'
5337 { (eval echo "$as_me:5337: \"$ac_try\"") >&5
5338 (eval $ac_try) 2>&5
5339 ac_status=$?
5340 echo "$as_me:5340: \$? = $ac_status" >&5
5341 (exit "$ac_status"); }; }; then
5342 cf_XOPEN_SOURCE_set=yes
5343 else
5344 echo "$as_me: failed program was:" >&5
5345 cat "conftest.$ac_ext" >&5
5346 cf_XOPEN_SOURCE_set=no
5347 fi
5348 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5349 echo "$as_me:5349: result: $cf_XOPEN_SOURCE_set" >&5
5350 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5351 if test "$cf_XOPEN_SOURCE_set" = yes
5352 then
5353 cat >"conftest.$ac_ext" <<_ACEOF
5354 #line 5354 "configure"
5355 #include "confdefs.h"
5356 #include <stdlib.h>
5357 int
5358 main (void)
5359 {
5360
5361 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5362 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5363 #endif
5364 ;
5365 return 0;
5366 }
5367 _ACEOF
5368 rm -f "conftest.$ac_objext"
5369 if { (eval echo "$as_me:5369: \"$ac_compile\"") >&5
5370 (eval $ac_compile) 2>&5
5371 ac_status=$?
5372 echo "$as_me:5372: \$? = $ac_status" >&5
5373 (exit "$ac_status"); } &&
5374 { ac_try='test -s "conftest.$ac_objext"'
5375 { (eval echo "$as_me:5375: \"$ac_try\"") >&5
5376 (eval $ac_try) 2>&5
5377 ac_status=$?
5378 echo "$as_me:5378: \$? = $ac_status" >&5
5379 (exit "$ac_status"); }; }; then
5380 cf_XOPEN_SOURCE_set_ok=yes
5381 else
5382 echo "$as_me: failed program was:" >&5
5383 cat "conftest.$ac_ext" >&5
5384 cf_XOPEN_SOURCE_set_ok=no
5385 fi
5386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5387 if test "$cf_XOPEN_SOURCE_set_ok" = no
5388 then
5389 { echo "$as_me:5389: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5390 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5391 fi
5392 else
5393
5394 echo "$as_me:5394: checking if we should define _XOPEN_SOURCE" >&5
5395 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5396 if test "${cf_cv_xopen_source+set}" = set; then
5397 echo $ECHO_N "(cached) $ECHO_C" >&6
5398 else
5399
5400 cat >"conftest.$ac_ext" <<_ACEOF
5401 #line 5401 "configure"
5402 #include "confdefs.h"
5403
5404 $ac_includes_default
5405
5406 int
5407 main (void)
5408 {
5409
5410 #ifndef _XOPEN_SOURCE
5411 #error _XOPEN_SOURCE is not defined
5412 #endif
5413
5414 ;
5415 return 0;
5416 }
5417 _ACEOF
5418 rm -f "conftest.$ac_objext"
5419 if { (eval echo "$as_me:5419: \"$ac_compile\"") >&5
5420 (eval $ac_compile) 2>&5
5421 ac_status=$?
5422 echo "$as_me:5422: \$? = $ac_status" >&5
5423 (exit "$ac_status"); } &&
5424 { ac_try='test -s "conftest.$ac_objext"'
5425 { (eval echo "$as_me:5425: \"$ac_try\"") >&5
5426 (eval $ac_try) 2>&5
5427 ac_status=$?
5428 echo "$as_me:5428: \$? = $ac_status" >&5
5429 (exit "$ac_status"); }; }; then
5430 cf_cv_xopen_source=no
5431 else
5432 echo "$as_me: failed program was:" >&5
5433 cat "conftest.$ac_ext" >&5
5434 cf_save="$CPPFLAGS"
5435
5436 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5437 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5438
5439 cat >"conftest.$ac_ext" <<_ACEOF
5440 #line 5440 "configure"
5441 #include "confdefs.h"
5442
5443 $ac_includes_default
5444
5445 int
5446 main (void)
5447 {
5448
5449 #ifndef _XOPEN_SOURCE
5450 #error _XOPEN_SOURCE is not defined
5451 #endif
5452
5453 ;
5454 return 0;
5455 }
5456 _ACEOF
5457 rm -f "conftest.$ac_objext"
5458 if { (eval echo "$as_me:5458: \"$ac_compile\"") >&5
5459 (eval $ac_compile) 2>&5
5460 ac_status=$?
5461 echo "$as_me:5461: \$? = $ac_status" >&5
5462 (exit "$ac_status"); } &&
5463 { ac_try='test -s "conftest.$ac_objext"'
5464 { (eval echo "$as_me:5464: \"$ac_try\"") >&5
5465 (eval $ac_try) 2>&5
5466 ac_status=$?
5467 echo "$as_me:5467: \$? = $ac_status" >&5
5468 (exit "$ac_status"); }; }; then
5469 cf_cv_xopen_source=no
5470 else
5471 echo "$as_me: failed program was:" >&5
5472 cat "conftest.$ac_ext" >&5
5473 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5474 fi
5475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5476 CPPFLAGS="$cf_save"
5477
5478 fi
5479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5480
5481 fi
5482 echo "$as_me:5482: result: $cf_cv_xopen_source" >&5
5483 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5484
5485 if test "$cf_cv_xopen_source" != no ; then
5486
5487 CFLAGS=`echo "$CFLAGS" | \
5488 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5489 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5490
5491 CPPFLAGS=`echo "$CPPFLAGS" | \
5492 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5493 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5494
5495 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5496
5497 for cf_add_cflags in $cf_temp_xopen_source
5498 do
5499 case "x$cf_add_cflags" in
5500 (x-[DU]*)
5501
5502 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5503 while true
5504 do
5505 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'`
5506 test "$CFLAGS" != "$cf_old_cflag" || break
5507
5508 CFLAGS="$cf_old_cflag"
5509 done
5510
5511 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5512 while true
5513 do
5514 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'`
5515 test "$CPPFLAGS" != "$cf_old_cflag" || break
5516
5517 CPPFLAGS="$cf_old_cflag"
5518 done
5519
5520 ;;
5521 esac
5522
5523 cf_fix_cppflags=no
5524 cf_new_cflags=
5525 cf_new_cppflags=
5526 cf_new_extra_cppflags=
5527
5528 for cf_add_cflags in $cf_add_cflags
5529 do
5530 case "$cf_fix_cppflags" in
5531 (no)
5532 case "$cf_add_cflags" in
5533 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5534 case "$cf_add_cflags" in
5535 (-D*)
5536 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5537
5538 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5539 && test -z "${cf_tst_cflags}" \
5540 && cf_fix_cppflags=yes
5541
5542 if test "$cf_fix_cppflags" = yes ; then
5543
5544 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5545 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5546
5547 continue
5548 elif test "${cf_tst_cflags}" = "\"'" ; then
5549
5550 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5551 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5552
5553 continue
5554 fi
5555 ;;
5556 esac
5557 case "$CPPFLAGS" in
5558 (*$cf_add_cflags)
5559 ;;
5560 (*)
5561 case "$cf_add_cflags" in
5562 (-D*)
5563 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5564
5565 CPPFLAGS=`echo "$CPPFLAGS" | \
5566 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5567 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5568
5569 ;;
5570 esac
5571
5572 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5573 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5574
5575 ;;
5576 esac
5577 ;;
5578 (*)
5579
5580 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5581 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5582
5583 ;;
5584 esac
5585 ;;
5586 (yes)
5587
5588 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5589 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5590
5591 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5592
5593 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5594 && test -z "${cf_tst_cflags}" \
5595 && cf_fix_cppflags=no
5596 ;;
5597 esac
5598 done
5599
5600 if test -n "$cf_new_cflags" ; then
5601
5602 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5603 CFLAGS="${CFLAGS}$cf_new_cflags"
5604
5605 fi
5606
5607 if test -n "$cf_new_cppflags" ; then
5608
5609 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5610 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5611
5612 fi
5613
5614 if test -n "$cf_new_extra_cppflags" ; then
5615
5616 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5617 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5618
5619 fi
5620
5621 done
5622
5623 fi
5624
5625 fi
5626 fi
5627 fi # cf_cv_posix_visible
5628
5629 # Check whether --enable-largefile or --disable-largefile was given.
5630 if test "${enable_largefile+set}" = set; then
5631 enableval="$enable_largefile"
5632
5633 fi;
5634 if test "$enable_largefile" != no; then
5635
5636 echo "$as_me:5636: checking for special C compiler options needed for large files" >&5
5637 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
5638 if test "${ac_cv_sys_largefile_CC+set}" = set; then
5639 echo $ECHO_N "(cached) $ECHO_C" >&6
5640 else
5641 ac_cv_sys_largefile_CC=no
5642 if test "$GCC" != yes; then
5643 ac_save_CC=$CC
5644 while :; do
5645 # IRIX 6.2 and later do not support large files by default,
5646 # so use the C compiler's -n32 option if that helps.
5647 cat >"conftest.$ac_ext" <<_ACEOF
5648 #line 5648 "configure"
5649 #include "confdefs.h"
5650 #include <sys/types.h>
5651 /* Check that off_t can represent 2**63 - 1 correctly.
5652 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5653 since some C++ compilers masquerading as C compilers
5654 incorrectly reject 9223372036854775807. */
5655 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5656 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5657 && LARGE_OFF_T % 2147483647 == 1)
5658 ? 1 : -1];
5659 int
5660 main (void)
5661 {
5662
5663 ;
5664 return 0;
5665 }
5666 _ACEOF
5667 rm -f "conftest.$ac_objext"
5668 if { (eval echo "$as_me:5668: \"$ac_compile\"") >&5
5669 (eval $ac_compile) 2>&5
5670 ac_status=$?
5671 echo "$as_me:5671: \$? = $ac_status" >&5
5672 (exit "$ac_status"); } &&
5673 { ac_try='test -s "conftest.$ac_objext"'
5674 { (eval echo "$as_me:5674: \"$ac_try\"") >&5
5675 (eval $ac_try) 2>&5
5676 ac_status=$?
5677 echo "$as_me:5677: \$? = $ac_status" >&5
5678 (exit "$ac_status"); }; }; then
5679 break
5680 else
5681 echo "$as_me: failed program was:" >&5
5682 cat "conftest.$ac_ext" >&5
5683 fi
5684 rm -f "conftest.$ac_objext"
5685 CC="$CC -n32"
5686 rm -f "conftest.$ac_objext"
5687 if { (eval echo "$as_me:5687: \"$ac_compile\"") >&5
5688 (eval $ac_compile) 2>&5
5689 ac_status=$?
5690 echo "$as_me:5690: \$? = $ac_status" >&5
5691 (exit "$ac_status"); } &&
5692 { ac_try='test -s "conftest.$ac_objext"'
5693 { (eval echo "$as_me:5693: \"$ac_try\"") >&5
5694 (eval $ac_try) 2>&5
5695 ac_status=$?
5696 echo "$as_me:5696: \$? = $ac_status" >&5
5697 (exit "$ac_status"); }; }; then
5698 ac_cv_sys_largefile_CC=' -n32'; break
5699 else
5700 echo "$as_me: failed program was:" >&5
5701 cat "conftest.$ac_ext" >&5
5702 fi
5703 rm -f "conftest.$ac_objext"
5704 break
5705 done
5706 CC=$ac_save_CC
5707 rm -f "conftest.$ac_ext"
5708 fi
5709 fi
5710 echo "$as_me:5710: result: $ac_cv_sys_largefile_CC" >&5
5711 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
5712 if test "$ac_cv_sys_largefile_CC" != no; then
5713 CC=$CC$ac_cv_sys_largefile_CC
5714 fi
5715
5716 echo "$as_me:5716: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5717 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
5718 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5719 echo $ECHO_N "(cached) $ECHO_C" >&6
5720 else
5721 while :; do
5722 ac_cv_sys_file_offset_bits=no
5723 cat >"conftest.$ac_ext" <<_ACEOF
5724 #line 5724 "configure"
5725 #include "confdefs.h"
5726 #include <sys/types.h>
5727 /* Check that off_t can represent 2**63 - 1 correctly.
5728 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5729 since some C++ compilers masquerading as C compilers
5730 incorrectly reject 9223372036854775807. */
5731 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5732 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5733 && LARGE_OFF_T % 2147483647 == 1)
5734 ? 1 : -1];
5735 int
5736 main (void)
5737 {
5738
5739 ;
5740 return 0;
5741 }
5742 _ACEOF
5743 rm -f "conftest.$ac_objext"
5744 if { (eval echo "$as_me:5744: \"$ac_compile\"") >&5
5745 (eval $ac_compile) 2>&5
5746 ac_status=$?
5747 echo "$as_me:5747: \$? = $ac_status" >&5
5748 (exit "$ac_status"); } &&
5749 { ac_try='test -s "conftest.$ac_objext"'
5750 { (eval echo "$as_me:5750: \"$ac_try\"") >&5
5751 (eval $ac_try) 2>&5
5752 ac_status=$?
5753 echo "$as_me:5753: \$? = $ac_status" >&5
5754 (exit "$ac_status"); }; }; then
5755 break
5756 else
5757 echo "$as_me: failed program was:" >&5
5758 cat "conftest.$ac_ext" >&5
5759 fi
5760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5761 cat >"conftest.$ac_ext" <<_ACEOF
5762 #line 5762 "configure"
5763 #include "confdefs.h"
5764 #define _FILE_OFFSET_BITS 64
5765 #include <sys/types.h>
5766 /* Check that off_t can represent 2**63 - 1 correctly.
5767 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5768 since some C++ compilers masquerading as C compilers
5769 incorrectly reject 9223372036854775807. */
5770 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5771 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5772 && LARGE_OFF_T % 2147483647 == 1)
5773 ? 1 : -1];
5774 int
5775 main (void)
5776 {
5777
5778 ;
5779 return 0;
5780 }
5781 _ACEOF
5782 rm -f "conftest.$ac_objext"
5783 if { (eval echo "$as_me:5783: \"$ac_compile\"") >&5
5784 (eval $ac_compile) 2>&5
5785 ac_status=$?
5786 echo "$as_me:5786: \$? = $ac_status" >&5
5787 (exit "$ac_status"); } &&
5788 { ac_try='test -s "conftest.$ac_objext"'
5789 { (eval echo "$as_me:5789: \"$ac_try\"") >&5
5790 (eval $ac_try) 2>&5
5791 ac_status=$?
5792 echo "$as_me:5792: \$? = $ac_status" >&5
5793 (exit "$ac_status"); }; }; then
5794 ac_cv_sys_file_offset_bits=64; break
5795 else
5796 echo "$as_me: failed program was:" >&5
5797 cat "conftest.$ac_ext" >&5
5798 fi
5799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5800 break
5801 done
5802 fi
5803 echo "$as_me:5803: result: $ac_cv_sys_file_offset_bits" >&5
5804 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5805 if test "$ac_cv_sys_file_offset_bits" != no; then
5806
5807 cat >>confdefs.h <<EOF
5808 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5809 EOF
5810
5811 fi
5812 rm -rf conftest*
5813 echo "$as_me:5813: checking for _LARGE_FILES value needed for large files" >&5
5814 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5815 if test "${ac_cv_sys_large_files+set}" = set; then
5816 echo $ECHO_N "(cached) $ECHO_C" >&6
5817 else
5818 while :; do
5819 ac_cv_sys_large_files=no
5820 cat >"conftest.$ac_ext" <<_ACEOF
5821 #line 5821 "configure"
5822 #include "confdefs.h"
5823 #include <sys/types.h>
5824 /* Check that off_t can represent 2**63 - 1 correctly.
5825 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5826 since some C++ compilers masquerading as C compilers
5827 incorrectly reject 9223372036854775807. */
5828 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5829 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5830 && LARGE_OFF_T % 2147483647 == 1)
5831 ? 1 : -1];
5832 int
5833 main (void)
5834 {
5835
5836 ;
5837 return 0;
5838 }
5839 _ACEOF
5840 rm -f "conftest.$ac_objext"
5841 if { (eval echo "$as_me:5841: \"$ac_compile\"") >&5
5842 (eval $ac_compile) 2>&5
5843 ac_status=$?
5844 echo "$as_me:5844: \$? = $ac_status" >&5
5845 (exit "$ac_status"); } &&
5846 { ac_try='test -s "conftest.$ac_objext"'
5847 { (eval echo "$as_me:5847: \"$ac_try\"") >&5
5848 (eval $ac_try) 2>&5
5849 ac_status=$?
5850 echo "$as_me:5850: \$? = $ac_status" >&5
5851 (exit "$ac_status"); }; }; then
5852 break
5853 else
5854 echo "$as_me: failed program was:" >&5
5855 cat "conftest.$ac_ext" >&5
5856 fi
5857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5858 cat >"conftest.$ac_ext" <<_ACEOF
5859 #line 5859 "configure"
5860 #include "confdefs.h"
5861 #define _LARGE_FILES 1
5862 #include <sys/types.h>
5863 /* Check that off_t can represent 2**63 - 1 correctly.
5864 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5865 since some C++ compilers masquerading as C compilers
5866 incorrectly reject 9223372036854775807. */
5867 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5868 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5869 && LARGE_OFF_T % 2147483647 == 1)
5870 ? 1 : -1];
5871 int
5872 main (void)
5873 {
5874
5875 ;
5876 return 0;
5877 }
5878 _ACEOF
5879 rm -f "conftest.$ac_objext"
5880 if { (eval echo "$as_me:5880: \"$ac_compile\"") >&5
5881 (eval $ac_compile) 2>&5
5882 ac_status=$?
5883 echo "$as_me:5883: \$? = $ac_status" >&5
5884 (exit "$ac_status"); } &&
5885 { ac_try='test -s "conftest.$ac_objext"'
5886 { (eval echo "$as_me:5886: \"$ac_try\"") >&5
5887 (eval $ac_try) 2>&5
5888 ac_status=$?
5889 echo "$as_me:5889: \$? = $ac_status" >&5
5890 (exit "$ac_status"); }; }; then
5891 ac_cv_sys_large_files=1; break
5892 else
5893 echo "$as_me: failed program was:" >&5
5894 cat "conftest.$ac_ext" >&5
5895 fi
5896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5897 break
5898 done
5899 fi
5900 echo "$as_me:5900: result: $ac_cv_sys_large_files" >&5
5901 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5902 if test "$ac_cv_sys_large_files" != no; then
5903
5904 cat >>confdefs.h <<EOF
5905 #define _LARGE_FILES $ac_cv_sys_large_files
5906 EOF
5907
5908 fi
5909 rm -rf conftest*
5910 fi
5911
5912 if test "$enable_largefile" != no ; then
5913 echo "$as_me:5913: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5914 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
5915 if test "${ac_cv_sys_largefile_source+set}" = set; then
5916 echo $ECHO_N "(cached) $ECHO_C" >&6
5917 else
5918 while :; do
5919 ac_cv_sys_largefile_source=no
5920 cat >"conftest.$ac_ext" <<_ACEOF
5921 #line 5921 "configure"
5922 #include "confdefs.h"
5923 #include <stdio.h>
5924 #include <sys/types.h>
5925 int
5926 main (void)
5927 {
5928
5929 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
5930 return my_fseeko(stdin, 0, 0);
5931 ;
5932 return 0;
5933 }
5934 _ACEOF
5935 rm -f "conftest.$ac_objext"
5936 if { (eval echo "$as_me:5936: \"$ac_compile\"") >&5
5937 (eval $ac_compile) 2>&5
5938 ac_status=$?
5939 echo "$as_me:5939: \$? = $ac_status" >&5
5940 (exit "$ac_status"); } &&
5941 { ac_try='test -s "conftest.$ac_objext"'
5942 { (eval echo "$as_me:5942: \"$ac_try\"") >&5
5943 (eval $ac_try) 2>&5
5944 ac_status=$?
5945 echo "$as_me:5945: \$? = $ac_status" >&5
5946 (exit "$ac_status"); }; }; then
5947 break
5948 else
5949 echo "$as_me: failed program was:" >&5
5950 cat "conftest.$ac_ext" >&5
5951 fi
5952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5953 cat >"conftest.$ac_ext" <<_ACEOF
5954 #line 5954 "configure"
5955 #include "confdefs.h"
5956 #define _LARGEFILE_SOURCE 1
5957 #include <stdio.h>
5958 #include <sys/types.h>
5959 int
5960 main (void)
5961 {
5962
5963 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
5964 return my_fseeko(stdin, 0, 0);
5965 ;
5966 return 0;
5967 }
5968 _ACEOF
5969 rm -f "conftest.$ac_objext"
5970 if { (eval echo "$as_me:5970: \"$ac_compile\"") >&5
5971 (eval $ac_compile) 2>&5
5972 ac_status=$?
5973 echo "$as_me:5973: \$? = $ac_status" >&5
5974 (exit "$ac_status"); } &&
5975 { ac_try='test -s "conftest.$ac_objext"'
5976 { (eval echo "$as_me:5976: \"$ac_try\"") >&5
5977 (eval $ac_try) 2>&5
5978 ac_status=$?
5979 echo "$as_me:5979: \$? = $ac_status" >&5
5980 (exit "$ac_status"); }; }; then
5981 ac_cv_sys_largefile_source=1; break
5982 else
5983 echo "$as_me: failed program was:" >&5
5984 cat "conftest.$ac_ext" >&5
5985 fi
5986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5987 break
5988 done
5989 fi
5990 echo "$as_me:5990: result: $ac_cv_sys_largefile_source" >&5
5991 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
5992 if test "$ac_cv_sys_largefile_source" != no; then
5993
5994 cat >>confdefs.h <<EOF
5995 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5996 EOF
5997
5998 fi
5999 rm -rf conftest*
6000
6001 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6002 # in glibc 2.1.3, but that breaks too many other things.
6003 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6004 echo "$as_me:6004: checking for fseeko" >&5
6005 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
6006 if test "${ac_cv_func_fseeko+set}" = set; then
6007 echo $ECHO_N "(cached) $ECHO_C" >&6
6008 else
6009 cat >"conftest.$ac_ext" <<_ACEOF
6010 #line 6010 "configure"
6011 #include "confdefs.h"
6012 #include <stdio.h>
6013 #include <sys/types.h>
6014 int
6015 main (void)
6016 {
6017 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
6018 return my_fseeko && my_fseeko (stdin, 0, 0);
6019 ;
6020 return 0;
6021 }
6022 _ACEOF
6023 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6024 if { (eval echo "$as_me:6024: \"$ac_link\"") >&5
6025 (eval $ac_link) 2>&5
6026 ac_status=$?
6027 echo "$as_me:6027: \$? = $ac_status" >&5
6028 (exit "$ac_status"); } &&
6029 { ac_try='test -s "conftest$ac_exeext"'
6030 { (eval echo "$as_me:6030: \"$ac_try\"") >&5
6031 (eval $ac_try) 2>&5
6032 ac_status=$?
6033 echo "$as_me:6033: \$? = $ac_status" >&5
6034 (exit "$ac_status"); }; }; then
6035 ac_cv_func_fseeko=yes
6036 else
6037 echo "$as_me: failed program was:" >&5
6038 cat "conftest.$ac_ext" >&5
6039 ac_cv_func_fseeko=no
6040 fi
6041 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6042 fi
6043 echo "$as_me:6043: result: $ac_cv_func_fseeko" >&5
6044 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
6045 if test $ac_cv_func_fseeko = yes; then
6046
6047 cat >>confdefs.h <<\EOF
6048 #define HAVE_FSEEKO 1
6049 EOF
6050
6051 fi
6052
6053 # Normally we would collect these definitions in the config.h,
6054 # but (like _XOPEN_SOURCE), some environments rely on having these
6055 # defined before any of the system headers are included. Another
6056 # case comes up with C++, e.g., on AIX the compiler compiles the
6057 # header files by themselves before looking at the body files it is
6058 # told to compile. For ncurses, those header files do not include
6059 # the config.h
6060 if test "$ac_cv_sys_large_files" != no
6061 then
6062
6063 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6064 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
6065
6066 fi
6067 if test "$ac_cv_sys_largefile_source" != no
6068 then
6069
6070 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6071 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
6072
6073 fi
6074 if test "$ac_cv_sys_file_offset_bits" != no
6075 then
6076
6077 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6078 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
6079
6080 fi
6081
6082 echo "$as_me:6082: checking whether to use struct dirent64" >&5
6083 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
6084 if test "${cf_cv_struct_dirent64+set}" = set; then
6085 echo $ECHO_N "(cached) $ECHO_C" >&6
6086 else
6087
6088 cat >"conftest.$ac_ext" <<_ACEOF
6089 #line 6089 "configure"
6090 #include "confdefs.h"
6091
6092 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
6093 #include <sys/types.h>
6094 #include <dirent.h>
6095
6096 #ifndef __REDIRECT
6097 /* if transitional largefile support is setup, this is true */
6098 extern struct dirent64 * readdir(DIR *);
6099 #endif
6100
6101 int
6102 main (void)
6103 {
6104
6105 DIR *dp = opendir(".");
6106 struct dirent64 *x = readdir(dp);
6107 struct dirent *y = readdir(dp);
6108 int z = x - y;
6109 (void)z;
6110
6111 ;
6112 return 0;
6113 }
6114 _ACEOF
6115 rm -f "conftest.$ac_objext"
6116 if { (eval echo "$as_me:6116: \"$ac_compile\"") >&5
6117 (eval $ac_compile) 2>&5
6118 ac_status=$?
6119 echo "$as_me:6119: \$? = $ac_status" >&5
6120 (exit "$ac_status"); } &&
6121 { ac_try='test -s "conftest.$ac_objext"'
6122 { (eval echo "$as_me:6122: \"$ac_try\"") >&5
6123 (eval $ac_try) 2>&5
6124 ac_status=$?
6125 echo "$as_me:6125: \$? = $ac_status" >&5
6126 (exit "$ac_status"); }; }; then
6127 cf_cv_struct_dirent64=yes
6128 else
6129 echo "$as_me: failed program was:" >&5
6130 cat "conftest.$ac_ext" >&5
6131 cf_cv_struct_dirent64=no
6132 fi
6133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6134
6135 fi
6136 echo "$as_me:6136: result: $cf_cv_struct_dirent64" >&5
6137 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
6138 test "$cf_cv_struct_dirent64" = yes &&
6139 cat >>confdefs.h <<\EOF
6140 #define HAVE_STRUCT_DIRENT64 1
6141 EOF
6142
6143 fi
6144
6145 echo "$as_me:6145: checking for install-prefix" >&5
6146 echo $ECHO_N "checking for install-prefix... $ECHO_C" >&6
6147
6148 # Check whether --with-install-prefix or --without-install-prefix was given.
6149 if test "${with_install_prefix+set}" = set; then
6150 withval="$with_install_prefix"
6151 cf_opt_with_install_prefix=$withval
6152 else
6153 cf_opt_with_install_prefix=${DESTDIR:-no}
6154 fi;
6155 echo "$as_me:6155: result: $cf_opt_with_install_prefix" >&5
6156 echo "${ECHO_T}$cf_opt_with_install_prefix" >&6
6157 if test "$cf_opt_with_install_prefix" != no ; then
6158
6159 if test "x$prefix" != xNONE; then
6160 cf_path_syntax="$prefix"
6161 else
6162 cf_path_syntax="$ac_default_prefix"
6163 fi
6164
6165 case "x$cf_opt_with_install_prefix" in
6166 (x\$\(*\)*|x\'*\'*)
6167 ;;
6168 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
6169 ;;
6170 (x\$\{*prefix\}*|x\$\{*dir\}*)
6171 eval cf_opt_with_install_prefix="$cf_opt_with_install_prefix"
6172 case "x$cf_opt_with_install_prefix" in
6173 (xNONE/*)
6174 cf_opt_with_install_prefix=`echo "$cf_opt_with_install_prefix" | sed -e s%NONE%$cf_path_syntax%`
6175 ;;
6176 esac
6177 ;;
6178 (xno|xNONE/*)
6179 cf_opt_with_install_prefix=`echo "$cf_opt_with_install_prefix" | sed -e s%NONE%$cf_path_syntax%`
6180 ;;
6181 (*)
6182 { { echo "$as_me:6182: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&5
6183 echo "$as_me: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&2;}
6184 { (exit 1); exit 1; }; }
6185 ;;
6186 esac
6187
6188 DESTDIR=$cf_opt_with_install_prefix
6189 fi
6190
6191 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
6192 then
6193 echo "$as_me:6193: checking for X" >&5
6194 echo $ECHO_N "checking for X... $ECHO_C" >&6
6195
6196 # Check whether --with-x or --without-x was given.
6197 if test "${with_x+set}" = set; then
6198 withval="$with_x"
6199
6200 fi;
6201 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6202 if test "x$with_x" = xno; then
6203 # The user explicitly disabled X.
6204 have_x=disabled
6205 else
6206 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6207 # Both variables are already set.
6208 have_x=yes
6209 else
6210 if test "${ac_cv_have_x+set}" = set; then
6211 echo $ECHO_N "(cached) $ECHO_C" >&6
6212 else
6213 # One or both of the vars are not set, and there is no cached value.
6214 ac_x_includes=no ac_x_libraries=no
6215 rm -fr conftest.dir
6216 if mkdir conftest.dir; then
6217 cd conftest.dir
6218 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6219 cat >Imakefile <<'EOF'
6220 acfindx:
6221 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6222 EOF
6223 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6224 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6225 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
6226 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6227 for ac_extension in a so sl dylib dll; do
6228 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6229 test -f "$ac_im_libdir/libX11.$ac_extension"; then
6230 ac_im_usrlibdir=$ac_im_libdir; break
6231 fi
6232 done
6233 # Screen out bogus values from the imake configuration. They are
6234 # bogus both because they are the default anyway, and because
6235 # using them would break gcc on systems where it needs fixed includes.
6236 case $ac_im_incroot in
6237 /usr/include) ;;
6238 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6239 esac
6240 case $ac_im_usrlibdir in
6241 /usr/lib | /lib) ;;
6242 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6243 esac
6244 fi
6245 cd ..
6246 rm -fr conftest.dir
6247 fi
6248
6249 # Standard set of common directories for X headers.
6250 # Check X11 before X11Rn because it is often a symlink to the current release.
6251 ac_x_header_dirs='
6252 /usr/X11/include
6253 /usr/X11R7/include
6254 /usr/X11R6/include
6255 /usr/X11R5/include
6256 /usr/X11R4/include
6257
6258 /opt/local/include
6259 /opt/X11/include
6260
6261 /usr/include/X11
6262 /usr/include/X11R7
6263 /usr/include/X11R6
6264 /usr/include/X11R5
6265 /usr/include/X11R4
6266
6267 /usr/local/X11/include
6268 /usr/local/X11R7/include
6269 /usr/local/X11R6/include
6270 /usr/local/X11R5/include
6271 /usr/local/X11R4/include
6272
6273 /usr/local/include/X11
6274 /usr/local/include/X11R7
6275 /usr/local/include/X11R6
6276 /usr/local/include/X11R5
6277 /usr/local/include/X11R4
6278
6279 /usr/X386/include
6280 /usr/x386/include
6281 /usr/XFree86/include/X11
6282
6283 /usr/include
6284 /usr/local/include
6285 /usr/unsupported/include
6286 /usr/athena/include
6287 /usr/local/x11r5/include
6288 /usr/lpp/Xamples/include
6289
6290 /usr/openwin/include
6291 /usr/openwin/share/include'
6292
6293 if test "$ac_x_includes" = no; then
6294 # Guess where to find include files, by looking for Intrinsic.h.
6295 # First, try using that file with no special directory specified.
6296 cat >"conftest.$ac_ext" <<_ACEOF
6297 #line 6297 "configure"
6298 #include "confdefs.h"
6299 #include <X11/Intrinsic.h>
6300 _ACEOF
6301 if { (eval echo "$as_me:6301: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6302 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6303 ac_status=$?
6304 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6305 rm -f conftest.er1
6306 cat conftest.err >&5
6307 echo "$as_me:6307: \$? = $ac_status" >&5
6308 (exit "$ac_status"); } >/dev/null; then
6309 if test -s conftest.err; then
6310 ac_cpp_err=$ac_c_preproc_warn_flag
6311 else
6312 ac_cpp_err=
6313 fi
6314 else
6315 ac_cpp_err=yes
6316 fi
6317 if test -z "$ac_cpp_err"; then
6318 # We can compile using X headers with no special include directory.
6319 ac_x_includes=
6320 else
6321 echo "$as_me: failed program was:" >&5
6322 cat "conftest.$ac_ext" >&5
6323 for ac_dir in $ac_x_header_dirs; do
6324 if test -r "$ac_dir/X11/Intrinsic.h"; then
6325 ac_x_includes=$ac_dir
6326 break
6327 fi
6328 done
6329 fi
6330 rm -f conftest.err "conftest.$ac_ext"
6331 fi # $ac_x_includes = no
6332
6333 if test "$ac_x_libraries" = no; then
6334 # Check for the libraries.
6335 # See if we find them without any special options.
6336 # Don't add to $LIBS permanently.
6337 ac_save_LIBS=$LIBS
6338 LIBS="-lXt $LIBS"
6339 cat >"conftest.$ac_ext" <<_ACEOF
6340 #line 6340 "configure"
6341 #include "confdefs.h"
6342 #include <X11/Intrinsic.h>
6343 int
6344 main (void)
6345 {
6346 XtMalloc (0)
6347 ;
6348 return 0;
6349 }
6350 _ACEOF
6351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6352 if { (eval echo "$as_me:6352: \"$ac_link\"") >&5
6353 (eval $ac_link) 2>&5
6354 ac_status=$?
6355 echo "$as_me:6355: \$? = $ac_status" >&5
6356 (exit "$ac_status"); } &&
6357 { ac_try='test -s "conftest$ac_exeext"'
6358 { (eval echo "$as_me:6358: \"$ac_try\"") >&5
6359 (eval $ac_try) 2>&5
6360 ac_status=$?
6361 echo "$as_me:6361: \$? = $ac_status" >&5
6362 (exit "$ac_status"); }; }; then
6363 LIBS=$ac_save_LIBS
6364 # We can link X programs with no special library path.
6365 ac_x_libraries=
6366 else
6367 echo "$as_me: failed program was:" >&5
6368 cat "conftest.$ac_ext" >&5
6369 LIBS=$ac_save_LIBS
6370 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6371 do
6372 # Don't even attempt the hair of trying to link an X program!
6373 for ac_extension in a so sl dylib dll; do
6374 if test -r "$ac_dir/libXt.$ac_extension"; then
6375 ac_x_libraries=$ac_dir
6376 break 2
6377 fi
6378 done
6379 done
6380 fi
6381 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6382 fi # $ac_x_libraries = no
6383
6384 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6385 # Didn't find X anywhere. Cache the known absence of X.
6386 ac_cv_have_x="have_x=no"
6387 else
6388 # Record where we found X for the cache.
6389 ac_cv_have_x="have_x=yes \
6390 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6391 fi
6392 fi
6393
6394 fi
6395 eval "$ac_cv_have_x"
6396 fi # $with_x != no
6397
6398 if test "$have_x" != yes; then
6399 echo "$as_me:6399: result: $have_x" >&5
6400 echo "${ECHO_T}$have_x" >&6
6401 no_x=yes
6402 else
6403 # If each of the values was on the command line, it overrides each guess.
6404 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6405 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6406 # Update the cache value to reflect the command line values.
6407 ac_cv_have_x="have_x=yes \
6408 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6409 echo "$as_me:6409: result: libraries $x_libraries, headers $x_includes" >&5
6410 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6411 fi
6412
6413 if test "$no_x" = yes; then
6414 # Not all programs may use this symbol, but it does not hurt to define it.
6415
6416 cat >>confdefs.h <<\EOF
6417 #define X_DISPLAY_MISSING 1
6418 EOF
6419
6420 X_CFLAGS=
6421 X_PRE_LIBS=
6422 X_LIBS=
6423 X_EXTRA_LIBS=
6424 else
6425 if test -n "$x_includes"; then
6426 X_CFLAGS="$X_CFLAGS -I$x_includes"
6427 fi
6428
6429 # It would also be nice to do this for all -L options, not just this one.
6430 if test -n "$x_libraries"; then
6431 X_LIBS="$X_LIBS -L$x_libraries"
6432 # For Solaris; some versions of Sun CC require a space after -R and
6433 # others require no space. Words are not sufficient . . . .
6434 case `(uname -sr) 2>/dev/null` in
6435 "SunOS 5"*)
6436 echo "$as_me:6436: checking whether -R must be followed by a space" >&5
6437 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
6438 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6439 cat >"conftest.$ac_ext" <<_ACEOF
6440 #line 6440 "configure"
6441 #include "confdefs.h"
6442
6443 int
6444 main (void)
6445 {
6446
6447 ;
6448 return 0;
6449 }
6450 _ACEOF
6451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6452 if { (eval echo "$as_me:6452: \"$ac_link\"") >&5
6453 (eval $ac_link) 2>&5
6454 ac_status=$?
6455 echo "$as_me:6455: \$? = $ac_status" >&5
6456 (exit "$ac_status"); } &&
6457 { ac_try='test -s "conftest$ac_exeext"'
6458 { (eval echo "$as_me:6458: \"$ac_try\"") >&5
6459 (eval $ac_try) 2>&5
6460 ac_status=$?
6461 echo "$as_me:6461: \$? = $ac_status" >&5
6462 (exit "$ac_status"); }; }; then
6463 ac_R_nospace=yes
6464 else
6465 echo "$as_me: failed program was:" >&5
6466 cat "conftest.$ac_ext" >&5
6467 ac_R_nospace=no
6468 fi
6469 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6470 if test $ac_R_nospace = yes; then
6471 echo "$as_me:6471: result: no" >&5
6472 echo "${ECHO_T}no" >&6
6473 X_LIBS="$X_LIBS -R$x_libraries"
6474 else
6475 LIBS="$ac_xsave_LIBS -R $x_libraries"
6476 cat >"conftest.$ac_ext" <<_ACEOF
6477 #line 6477 "configure"
6478 #include "confdefs.h"
6479
6480 int
6481 main (void)
6482 {
6483
6484 ;
6485 return 0;
6486 }
6487 _ACEOF
6488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6489 if { (eval echo "$as_me:6489: \"$ac_link\"") >&5
6490 (eval $ac_link) 2>&5
6491 ac_status=$?
6492 echo "$as_me:6492: \$? = $ac_status" >&5
6493 (exit "$ac_status"); } &&
6494 { ac_try='test -s "conftest$ac_exeext"'
6495 { (eval echo "$as_me:6495: \"$ac_try\"") >&5
6496 (eval $ac_try) 2>&5
6497 ac_status=$?
6498 echo "$as_me:6498: \$? = $ac_status" >&5
6499 (exit "$ac_status"); }; }; then
6500 ac_R_space=yes
6501 else
6502 echo "$as_me: failed program was:" >&5
6503 cat "conftest.$ac_ext" >&5
6504 ac_R_space=no
6505 fi
6506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6507 if test $ac_R_space = yes; then
6508 echo "$as_me:6508: result: yes" >&5
6509 echo "${ECHO_T}yes" >&6
6510 X_LIBS="$X_LIBS -R $x_libraries"
6511 else
6512 echo "$as_me:6512: result: neither works" >&5
6513 echo "${ECHO_T}neither works" >&6
6514 fi
6515 fi
6516 LIBS=$ac_xsave_LIBS
6517 esac
6518 fi
6519
6520 # Check for system-dependent libraries X programs must link with.
6521 # Do this before checking for the system-independent R6 libraries
6522 # (-lICE), since we may need -lsocket or whatever for X linking.
6523
6524 if test "$ISC" = yes; then
6525 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6526 else
6527 # Martyn Johnson says this is needed for Ultrix, if the X
6528 # libraries were built with DECnet support. And Karl Berry says
6529 # the Alpha needs dnet_stub (dnet does not exist).
6530 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6531 cat >"conftest.$ac_ext" <<_ACEOF
6532 #line 6532 "configure"
6533 #include "confdefs.h"
6534
6535 /* Override any gcc2 internal prototype to avoid an error. */
6536 #ifdef __cplusplus
6537 extern "C"
6538 #endif
6539 /* We use char because int might match the return type of a gcc2
6540 builtin and then its argument prototype would still apply. */
6541 char XOpenDisplay (void);
6542 int
6543 main (void)
6544 {
6545 XOpenDisplay ();
6546 ;
6547 return 0;
6548 }
6549 _ACEOF
6550 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6551 if { (eval echo "$as_me:6551: \"$ac_link\"") >&5
6552 (eval $ac_link) 2>&5
6553 ac_status=$?
6554 echo "$as_me:6554: \$? = $ac_status" >&5
6555 (exit "$ac_status"); } &&
6556 { ac_try='test -s "conftest$ac_exeext"'
6557 { (eval echo "$as_me:6557: \"$ac_try\"") >&5
6558 (eval $ac_try) 2>&5
6559 ac_status=$?
6560 echo "$as_me:6560: \$? = $ac_status" >&5
6561 (exit "$ac_status"); }; }; then
6562 :
6563 else
6564 echo "$as_me: failed program was:" >&5
6565 cat "conftest.$ac_ext" >&5
6566 echo "$as_me:6566: checking for dnet_ntoa in -ldnet" >&5
6567 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
6568 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6569 echo $ECHO_N "(cached) $ECHO_C" >&6
6570 else
6571 ac_check_lib_save_LIBS=$LIBS
6572 LIBS="-ldnet $LIBS"
6573 cat >"conftest.$ac_ext" <<_ACEOF
6574 #line 6574 "configure"
6575 #include "confdefs.h"
6576
6577 /* Override any gcc2 internal prototype to avoid an error. */
6578 #ifdef __cplusplus
6579 extern "C"
6580 #endif
6581 /* We use char because int might match the return type of a gcc2
6582 builtin and then its argument prototype would still apply. */
6583 char dnet_ntoa (void);
6584 int
6585 main (void)
6586 {
6587 dnet_ntoa ();
6588 ;
6589 return 0;
6590 }
6591 _ACEOF
6592 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6593 if { (eval echo "$as_me:6593: \"$ac_link\"") >&5
6594 (eval $ac_link) 2>&5
6595 ac_status=$?
6596 echo "$as_me:6596: \$? = $ac_status" >&5
6597 (exit "$ac_status"); } &&
6598 { ac_try='test -s "conftest$ac_exeext"'
6599 { (eval echo "$as_me:6599: \"$ac_try\"") >&5
6600 (eval $ac_try) 2>&5
6601 ac_status=$?
6602 echo "$as_me:6602: \$? = $ac_status" >&5
6603 (exit "$ac_status"); }; }; then
6604 ac_cv_lib_dnet_dnet_ntoa=yes
6605 else
6606 echo "$as_me: failed program was:" >&5
6607 cat "conftest.$ac_ext" >&5
6608 ac_cv_lib_dnet_dnet_ntoa=no
6609 fi
6610 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6611 LIBS=$ac_check_lib_save_LIBS
6612 fi
6613 echo "$as_me:6613: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6614 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6615 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
6616 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6617 fi
6618
6619 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6620 echo "$as_me:6620: checking for dnet_ntoa in -ldnet_stub" >&5
6621 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
6622 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6623 echo $ECHO_N "(cached) $ECHO_C" >&6
6624 else
6625 ac_check_lib_save_LIBS=$LIBS
6626 LIBS="-ldnet_stub $LIBS"
6627 cat >"conftest.$ac_ext" <<_ACEOF
6628 #line 6628 "configure"
6629 #include "confdefs.h"
6630
6631 /* Override any gcc2 internal prototype to avoid an error. */
6632 #ifdef __cplusplus
6633 extern "C"
6634 #endif
6635 /* We use char because int might match the return type of a gcc2
6636 builtin and then its argument prototype would still apply. */
6637 char dnet_ntoa (void);
6638 int
6639 main (void)
6640 {
6641 dnet_ntoa ();
6642 ;
6643 return 0;
6644 }
6645 _ACEOF
6646 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6647 if { (eval echo "$as_me:6647: \"$ac_link\"") >&5
6648 (eval $ac_link) 2>&5
6649 ac_status=$?
6650 echo "$as_me:6650: \$? = $ac_status" >&5
6651 (exit "$ac_status"); } &&
6652 { ac_try='test -s "conftest$ac_exeext"'
6653 { (eval echo "$as_me:6653: \"$ac_try\"") >&5
6654 (eval $ac_try) 2>&5
6655 ac_status=$?
6656 echo "$as_me:6656: \$? = $ac_status" >&5
6657 (exit "$ac_status"); }; }; then
6658 ac_cv_lib_dnet_stub_dnet_ntoa=yes
6659 else
6660 echo "$as_me: failed program was:" >&5
6661 cat "conftest.$ac_ext" >&5
6662 ac_cv_lib_dnet_stub_dnet_ntoa=no
6663 fi
6664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6665 LIBS=$ac_check_lib_save_LIBS
6666 fi
6667 echo "$as_me:6667: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6668 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
6669 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
6670 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6671 fi
6672
6673 fi
6674 fi
6675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6676 LIBS="$ac_xsave_LIBS"
6677
6678 # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
6679 # to get the SysV transport functions.
6680 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6681 # needs -lnsl.
6682 # The nsl library prevents programs from opening the X display
6683 # on Irix 5.2, according to T.E. Dickey.
6684 # The functions gethostbyname, getservbyname, and inet_addr are
6685 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6686 echo "$as_me:6686: checking for gethostbyname" >&5
6687 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6688 if test "${ac_cv_func_gethostbyname+set}" = set; then
6689 echo $ECHO_N "(cached) $ECHO_C" >&6
6690 else
6691 cat >"conftest.$ac_ext" <<_ACEOF
6692 #line 6692 "configure"
6693 #include "confdefs.h"
6694 #define gethostbyname autoconf_temporary
6695 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6696 #undef gethostbyname
6697
6698 #ifdef __cplusplus
6699 extern "C"
6700 #endif
6701
6702 /* We use char because int might match the return type of a gcc2
6703 builtin and then its argument prototype would still apply. */
6704 char gethostbyname (void);
6705
6706 int
6707 main (void)
6708 {
6709
6710 /* The GNU C library defines stubs for functions which it implements
6711 to always fail with ENOSYS. Some functions are actually named
6712 something starting with __ and the normal name is an alias. */
6713 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6714 #error found stub for gethostbyname
6715 #endif
6716
6717 return gethostbyname ();
6718 ;
6719 return 0;
6720 }
6721 _ACEOF
6722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6723 if { (eval echo "$as_me:6723: \"$ac_link\"") >&5
6724 (eval $ac_link) 2>&5
6725 ac_status=$?
6726 echo "$as_me:6726: \$? = $ac_status" >&5
6727 (exit "$ac_status"); } &&
6728 { ac_try='test -s "conftest$ac_exeext"'
6729 { (eval echo "$as_me:6729: \"$ac_try\"") >&5
6730 (eval $ac_try) 2>&5
6731 ac_status=$?
6732 echo "$as_me:6732: \$? = $ac_status" >&5
6733 (exit "$ac_status"); }; }; then
6734 ac_cv_func_gethostbyname=yes
6735 else
6736 echo "$as_me: failed program was:" >&5
6737 cat "conftest.$ac_ext" >&5
6738 ac_cv_func_gethostbyname=no
6739 fi
6740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6741 fi
6742 echo "$as_me:6742: result: $ac_cv_func_gethostbyname" >&5
6743 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6744
6745 if test $ac_cv_func_gethostbyname = no; then
6746 echo "$as_me:6746: checking for gethostbyname in -lnsl" >&5
6747 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6748 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6749 echo $ECHO_N "(cached) $ECHO_C" >&6
6750 else
6751 ac_check_lib_save_LIBS=$LIBS
6752 LIBS="-lnsl $LIBS"
6753 cat >"conftest.$ac_ext" <<_ACEOF
6754 #line 6754 "configure"
6755 #include "confdefs.h"
6756
6757 /* Override any gcc2 internal prototype to avoid an error. */
6758 #ifdef __cplusplus
6759 extern "C"
6760 #endif
6761 /* We use char because int might match the return type of a gcc2
6762 builtin and then its argument prototype would still apply. */
6763 char gethostbyname (void);
6764 int
6765 main (void)
6766 {
6767 gethostbyname ();
6768 ;
6769 return 0;
6770 }
6771 _ACEOF
6772 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6773 if { (eval echo "$as_me:6773: \"$ac_link\"") >&5
6774 (eval $ac_link) 2>&5
6775 ac_status=$?
6776 echo "$as_me:6776: \$? = $ac_status" >&5
6777 (exit "$ac_status"); } &&
6778 { ac_try='test -s "conftest$ac_exeext"'
6779 { (eval echo "$as_me:6779: \"$ac_try\"") >&5
6780 (eval $ac_try) 2>&5
6781 ac_status=$?
6782 echo "$as_me:6782: \$? = $ac_status" >&5
6783 (exit "$ac_status"); }; }; then
6784 ac_cv_lib_nsl_gethostbyname=yes
6785 else
6786 echo "$as_me: failed program was:" >&5
6787 cat "conftest.$ac_ext" >&5
6788 ac_cv_lib_nsl_gethostbyname=no
6789 fi
6790 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6791 LIBS=$ac_check_lib_save_LIBS
6792 fi
6793 echo "$as_me:6793: result: $ac_cv_lib_nsl_gethostbyname" >&5
6794 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6795 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
6796 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6797 fi
6798
6799 if test $ac_cv_lib_nsl_gethostbyname = no; then
6800 echo "$as_me:6800: checking for gethostbyname in -lbsd" >&5
6801 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
6802 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6803 echo $ECHO_N "(cached) $ECHO_C" >&6
6804 else
6805 ac_check_lib_save_LIBS=$LIBS
6806 LIBS="-lbsd $LIBS"
6807 cat >"conftest.$ac_ext" <<_ACEOF
6808 #line 6808 "configure"
6809 #include "confdefs.h"
6810
6811 /* Override any gcc2 internal prototype to avoid an error. */
6812 #ifdef __cplusplus
6813 extern "C"
6814 #endif
6815 /* We use char because int might match the return type of a gcc2
6816 builtin and then its argument prototype would still apply. */
6817 char gethostbyname (void);
6818 int
6819 main (void)
6820 {
6821 gethostbyname ();
6822 ;
6823 return 0;
6824 }
6825 _ACEOF
6826 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6827 if { (eval echo "$as_me:6827: \"$ac_link\"") >&5
6828 (eval $ac_link) 2>&5
6829 ac_status=$?
6830 echo "$as_me:6830: \$? = $ac_status" >&5
6831 (exit "$ac_status"); } &&
6832 { ac_try='test -s "conftest$ac_exeext"'
6833 { (eval echo "$as_me:6833: \"$ac_try\"") >&5
6834 (eval $ac_try) 2>&5
6835 ac_status=$?
6836 echo "$as_me:6836: \$? = $ac_status" >&5
6837 (exit "$ac_status"); }; }; then
6838 ac_cv_lib_bsd_gethostbyname=yes
6839 else
6840 echo "$as_me: failed program was:" >&5
6841 cat "conftest.$ac_ext" >&5
6842 ac_cv_lib_bsd_gethostbyname=no
6843 fi
6844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6845 LIBS=$ac_check_lib_save_LIBS
6846 fi
6847 echo "$as_me:6847: result: $ac_cv_lib_bsd_gethostbyname" >&5
6848 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6849 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
6850 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6851 fi
6852
6853 fi
6854 fi
6855
6856 # [email protected] says without -lsocket,
6857 # socket/setsockopt and other routines are undefined under SCO ODT
6858 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6859 # on later versions), says Simon Leinen: it contains gethostby*
6860 # variants that don't use the nameserver (or something). -lsocket
6861 # must be given before -lnsl if both are needed. We assume that
6862 # if connect needs -lnsl, so does gethostbyname.
6863 echo "$as_me:6863: checking for connect" >&5
6864 echo $ECHO_N "checking for connect... $ECHO_C" >&6
6865 if test "${ac_cv_func_connect+set}" = set; then
6866 echo $ECHO_N "(cached) $ECHO_C" >&6
6867 else
6868 cat >"conftest.$ac_ext" <<_ACEOF
6869 #line 6869 "configure"
6870 #include "confdefs.h"
6871 #define connect autoconf_temporary
6872 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6873 #undef connect
6874
6875 #ifdef __cplusplus
6876 extern "C"
6877 #endif
6878
6879 /* We use char because int might match the return type of a gcc2
6880 builtin and then its argument prototype would still apply. */
6881 char connect (void);
6882
6883 int
6884 main (void)
6885 {
6886
6887 /* The GNU C library defines stubs for functions which it implements
6888 to always fail with ENOSYS. Some functions are actually named
6889 something starting with __ and the normal name is an alias. */
6890 #if defined (__stub_connect) || defined (__stub___connect)
6891 #error found stub for connect
6892 #endif
6893
6894 return connect ();
6895 ;
6896 return 0;
6897 }
6898 _ACEOF
6899 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6900 if { (eval echo "$as_me:6900: \"$ac_link\"") >&5
6901 (eval $ac_link) 2>&5
6902 ac_status=$?
6903 echo "$as_me:6903: \$? = $ac_status" >&5
6904 (exit "$ac_status"); } &&
6905 { ac_try='test -s "conftest$ac_exeext"'
6906 { (eval echo "$as_me:6906: \"$ac_try\"") >&5
6907 (eval $ac_try) 2>&5
6908 ac_status=$?
6909 echo "$as_me:6909: \$? = $ac_status" >&5
6910 (exit "$ac_status"); }; }; then
6911 ac_cv_func_connect=yes
6912 else
6913 echo "$as_me: failed program was:" >&5
6914 cat "conftest.$ac_ext" >&5
6915 ac_cv_func_connect=no
6916 fi
6917 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6918 fi
6919 echo "$as_me:6919: result: $ac_cv_func_connect" >&5
6920 echo "${ECHO_T}$ac_cv_func_connect" >&6
6921
6922 if test $ac_cv_func_connect = no; then
6923 echo "$as_me:6923: checking for connect in -lsocket" >&5
6924 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
6925 if test "${ac_cv_lib_socket_connect+set}" = set; then
6926 echo $ECHO_N "(cached) $ECHO_C" >&6
6927 else
6928 ac_check_lib_save_LIBS=$LIBS
6929 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6930 cat >"conftest.$ac_ext" <<_ACEOF
6931 #line 6931 "configure"
6932 #include "confdefs.h"
6933
6934 /* Override any gcc2 internal prototype to avoid an error. */
6935 #ifdef __cplusplus
6936 extern "C"
6937 #endif
6938 /* We use char because int might match the return type of a gcc2
6939 builtin and then its argument prototype would still apply. */
6940 char connect (void);
6941 int
6942 main (void)
6943 {
6944 connect ();
6945 ;
6946 return 0;
6947 }
6948 _ACEOF
6949 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6950 if { (eval echo "$as_me:6950: \"$ac_link\"") >&5
6951 (eval $ac_link) 2>&5
6952 ac_status=$?
6953 echo "$as_me:6953: \$? = $ac_status" >&5
6954 (exit "$ac_status"); } &&
6955 { ac_try='test -s "conftest$ac_exeext"'
6956 { (eval echo "$as_me:6956: \"$ac_try\"") >&5
6957 (eval $ac_try) 2>&5
6958 ac_status=$?
6959 echo "$as_me:6959: \$? = $ac_status" >&5
6960 (exit "$ac_status"); }; }; then
6961 ac_cv_lib_socket_connect=yes
6962 else
6963 echo "$as_me: failed program was:" >&5
6964 cat "conftest.$ac_ext" >&5
6965 ac_cv_lib_socket_connect=no
6966 fi
6967 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6968 LIBS=$ac_check_lib_save_LIBS
6969 fi
6970 echo "$as_me:6970: result: $ac_cv_lib_socket_connect" >&5
6971 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
6972 if test "$ac_cv_lib_socket_connect" = yes; then
6973 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6974 fi
6975
6976 fi
6977
6978 # Guillermo Gomez says -lposix is necessary on A/UX.
6979 echo "$as_me:6979: checking for remove" >&5
6980 echo $ECHO_N "checking for remove... $ECHO_C" >&6
6981 if test "${ac_cv_func_remove+set}" = set; then
6982 echo $ECHO_N "(cached) $ECHO_C" >&6
6983 else
6984 cat >"conftest.$ac_ext" <<_ACEOF
6985 #line 6985 "configure"
6986 #include "confdefs.h"
6987 #define remove autoconf_temporary
6988 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6989 #undef remove
6990
6991 #ifdef __cplusplus
6992 extern "C"
6993 #endif
6994
6995 /* We use char because int might match the return type of a gcc2
6996 builtin and then its argument prototype would still apply. */
6997 char remove (void);
6998
6999 int
7000 main (void)
7001 {
7002
7003 /* The GNU C library defines stubs for functions which it implements
7004 to always fail with ENOSYS. Some functions are actually named
7005 something starting with __ and the normal name is an alias. */
7006 #if defined (__stub_remove) || defined (__stub___remove)
7007 #error found stub for remove
7008 #endif
7009
7010 return remove ();
7011 ;
7012 return 0;
7013 }
7014 _ACEOF
7015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7016 if { (eval echo "$as_me:7016: \"$ac_link\"") >&5
7017 (eval $ac_link) 2>&5
7018 ac_status=$?
7019 echo "$as_me:7019: \$? = $ac_status" >&5
7020 (exit "$ac_status"); } &&
7021 { ac_try='test -s "conftest$ac_exeext"'
7022 { (eval echo "$as_me:7022: \"$ac_try\"") >&5
7023 (eval $ac_try) 2>&5
7024 ac_status=$?
7025 echo "$as_me:7025: \$? = $ac_status" >&5
7026 (exit "$ac_status"); }; }; then
7027 ac_cv_func_remove=yes
7028 else
7029 echo "$as_me: failed program was:" >&5
7030 cat "conftest.$ac_ext" >&5
7031 ac_cv_func_remove=no
7032 fi
7033 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7034 fi
7035 echo "$as_me:7035: result: $ac_cv_func_remove" >&5
7036 echo "${ECHO_T}$ac_cv_func_remove" >&6
7037
7038 if test $ac_cv_func_remove = no; then
7039 echo "$as_me:7039: checking for remove in -lposix" >&5
7040 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
7041 if test "${ac_cv_lib_posix_remove+set}" = set; then
7042 echo $ECHO_N "(cached) $ECHO_C" >&6
7043 else
7044 ac_check_lib_save_LIBS=$LIBS
7045 LIBS="-lposix $LIBS"
7046 cat >"conftest.$ac_ext" <<_ACEOF
7047 #line 7047 "configure"
7048 #include "confdefs.h"
7049
7050 /* Override any gcc2 internal prototype to avoid an error. */
7051 #ifdef __cplusplus
7052 extern "C"
7053 #endif
7054 /* We use char because int might match the return type of a gcc2
7055 builtin and then its argument prototype would still apply. */
7056 char remove (void);
7057 int
7058 main (void)
7059 {
7060 remove ();
7061 ;
7062 return 0;
7063 }
7064 _ACEOF
7065 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7066 if { (eval echo "$as_me:7066: \"$ac_link\"") >&5
7067 (eval $ac_link) 2>&5
7068 ac_status=$?
7069 echo "$as_me:7069: \$? = $ac_status" >&5
7070 (exit "$ac_status"); } &&
7071 { ac_try='test -s "conftest$ac_exeext"'
7072 { (eval echo "$as_me:7072: \"$ac_try\"") >&5
7073 (eval $ac_try) 2>&5
7074 ac_status=$?
7075 echo "$as_me:7075: \$? = $ac_status" >&5
7076 (exit "$ac_status"); }; }; then
7077 ac_cv_lib_posix_remove=yes
7078 else
7079 echo "$as_me: failed program was:" >&5
7080 cat "conftest.$ac_ext" >&5
7081 ac_cv_lib_posix_remove=no
7082 fi
7083 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7084 LIBS=$ac_check_lib_save_LIBS
7085 fi
7086 echo "$as_me:7086: result: $ac_cv_lib_posix_remove" >&5
7087 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
7088 if test "$ac_cv_lib_posix_remove" = yes; then
7089 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7090 fi
7091
7092 fi
7093
7094 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7095 echo "$as_me:7095: checking for shmat" >&5
7096 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
7097 if test "${ac_cv_func_shmat+set}" = set; then
7098 echo $ECHO_N "(cached) $ECHO_C" >&6
7099 else
7100 cat >"conftest.$ac_ext" <<_ACEOF
7101 #line 7101 "configure"
7102 #include "confdefs.h"
7103 #define shmat autoconf_temporary
7104 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7105 #undef shmat
7106
7107 #ifdef __cplusplus
7108 extern "C"
7109 #endif
7110
7111 /* We use char because int might match the return type of a gcc2
7112 builtin and then its argument prototype would still apply. */
7113 char shmat (void);
7114
7115 int
7116 main (void)
7117 {
7118
7119 /* The GNU C library defines stubs for functions which it implements
7120 to always fail with ENOSYS. Some functions are actually named
7121 something starting with __ and the normal name is an alias. */
7122 #if defined (__stub_shmat) || defined (__stub___shmat)
7123 #error found stub for shmat
7124 #endif
7125
7126 return shmat ();
7127 ;
7128 return 0;
7129 }
7130 _ACEOF
7131 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7132 if { (eval echo "$as_me:7132: \"$ac_link\"") >&5
7133 (eval $ac_link) 2>&5
7134 ac_status=$?
7135 echo "$as_me:7135: \$? = $ac_status" >&5
7136 (exit "$ac_status"); } &&
7137 { ac_try='test -s "conftest$ac_exeext"'
7138 { (eval echo "$as_me:7138: \"$ac_try\"") >&5
7139 (eval $ac_try) 2>&5
7140 ac_status=$?
7141 echo "$as_me:7141: \$? = $ac_status" >&5
7142 (exit "$ac_status"); }; }; then
7143 ac_cv_func_shmat=yes
7144 else
7145 echo "$as_me: failed program was:" >&5
7146 cat "conftest.$ac_ext" >&5
7147 ac_cv_func_shmat=no
7148 fi
7149 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7150 fi
7151 echo "$as_me:7151: result: $ac_cv_func_shmat" >&5
7152 echo "${ECHO_T}$ac_cv_func_shmat" >&6
7153
7154 if test $ac_cv_func_shmat = no; then
7155 echo "$as_me:7155: checking for shmat in -lipc" >&5
7156 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
7157 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7158 echo $ECHO_N "(cached) $ECHO_C" >&6
7159 else
7160 ac_check_lib_save_LIBS=$LIBS
7161 LIBS="-lipc $LIBS"
7162 cat >"conftest.$ac_ext" <<_ACEOF
7163 #line 7163 "configure"
7164 #include "confdefs.h"
7165
7166 /* Override any gcc2 internal prototype to avoid an error. */
7167 #ifdef __cplusplus
7168 extern "C"
7169 #endif
7170 /* We use char because int might match the return type of a gcc2
7171 builtin and then its argument prototype would still apply. */
7172 char shmat (void);
7173 int
7174 main (void)
7175 {
7176 shmat ();
7177 ;
7178 return 0;
7179 }
7180 _ACEOF
7181 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7182 if { (eval echo "$as_me:7182: \"$ac_link\"") >&5
7183 (eval $ac_link) 2>&5
7184 ac_status=$?
7185 echo "$as_me:7185: \$? = $ac_status" >&5
7186 (exit "$ac_status"); } &&
7187 { ac_try='test -s "conftest$ac_exeext"'
7188 { (eval echo "$as_me:7188: \"$ac_try\"") >&5
7189 (eval $ac_try) 2>&5
7190 ac_status=$?
7191 echo "$as_me:7191: \$? = $ac_status" >&5
7192 (exit "$ac_status"); }; }; then
7193 ac_cv_lib_ipc_shmat=yes
7194 else
7195 echo "$as_me: failed program was:" >&5
7196 cat "conftest.$ac_ext" >&5
7197 ac_cv_lib_ipc_shmat=no
7198 fi
7199 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7200 LIBS=$ac_check_lib_save_LIBS
7201 fi
7202 echo "$as_me:7202: result: $ac_cv_lib_ipc_shmat" >&5
7203 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
7204 if test "$ac_cv_lib_ipc_shmat" = yes; then
7205 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7206 fi
7207
7208 fi
7209 fi
7210
7211 # Check for libraries that X11R6 Xt/Xaw programs need.
7212 ac_save_LDFLAGS=$LDFLAGS
7213 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7214 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7215 # check for ICE first), but we must link in the order -lSM -lICE or
7216 # we get undefined symbols. So assume we have SM if we have ICE.
7217 # These have to be linked with before -lX11, unlike the other
7218 # libraries we check for below, so use a different variable.
7219 # John Interrante, Karl Berry
7220 echo "$as_me:7220: checking for IceConnectionNumber in -lICE" >&5
7221 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
7222 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7223 echo $ECHO_N "(cached) $ECHO_C" >&6
7224 else
7225 ac_check_lib_save_LIBS=$LIBS
7226 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7227 cat >"conftest.$ac_ext" <<_ACEOF
7228 #line 7228 "configure"
7229 #include "confdefs.h"
7230
7231 /* Override any gcc2 internal prototype to avoid an error. */
7232 #ifdef __cplusplus
7233 extern "C"
7234 #endif
7235 /* We use char because int might match the return type of a gcc2
7236 builtin and then its argument prototype would still apply. */
7237 char IceConnectionNumber (void);
7238 int
7239 main (void)
7240 {
7241 IceConnectionNumber ();
7242 ;
7243 return 0;
7244 }
7245 _ACEOF
7246 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7247 if { (eval echo "$as_me:7247: \"$ac_link\"") >&5
7248 (eval $ac_link) 2>&5
7249 ac_status=$?
7250 echo "$as_me:7250: \$? = $ac_status" >&5
7251 (exit "$ac_status"); } &&
7252 { ac_try='test -s "conftest$ac_exeext"'
7253 { (eval echo "$as_me:7253: \"$ac_try\"") >&5
7254 (eval $ac_try) 2>&5
7255 ac_status=$?
7256 echo "$as_me:7256: \$? = $ac_status" >&5
7257 (exit "$ac_status"); }; }; then
7258 ac_cv_lib_ICE_IceConnectionNumber=yes
7259 else
7260 echo "$as_me: failed program was:" >&5
7261 cat "conftest.$ac_ext" >&5
7262 ac_cv_lib_ICE_IceConnectionNumber=no
7263 fi
7264 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7265 LIBS=$ac_check_lib_save_LIBS
7266 fi
7267 echo "$as_me:7267: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7268 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
7269 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
7270 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7271 fi
7272
7273 LDFLAGS=$ac_save_LDFLAGS
7274
7275 fi
7276
7277 fi
7278
7279 echo "$as_me:7279: checking if you want to use C11 _Noreturn feature" >&5
7280 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
7281
7282 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
7283 if test "${enable_stdnoreturn+set}" = set; then
7284 enableval="$enable_stdnoreturn"
7285 test "$enableval" != yes && enableval=no
7286 if test "$enableval" != "no" ; then
7287 enable_stdnoreturn=yes
7288 else
7289 enable_stdnoreturn=no
7290 fi
7291 else
7292 enableval=no
7293 enable_stdnoreturn=no
7294
7295 fi;
7296 echo "$as_me:7296: result: $enable_stdnoreturn" >&5
7297 echo "${ECHO_T}$enable_stdnoreturn" >&6
7298
7299 if test $enable_stdnoreturn = yes; then
7300 echo "$as_me:7300: checking for C11 _Noreturn feature" >&5
7301 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
7302 if test "${cf_cv_c11_noreturn+set}" = set; then
7303 echo $ECHO_N "(cached) $ECHO_C" >&6
7304 else
7305 cat >"conftest.$ac_ext" <<_ACEOF
7306 #line 7306 "configure"
7307 #include "confdefs.h"
7308
7309 $ac_includes_default
7310 #include <stdnoreturn.h>
7311 static _Noreturn void giveup(void) { exit(0); }
7312
7313 int
7314 main (void)
7315 {
7316 if (feof(stdin)) giveup()
7317 ;
7318 return 0;
7319 }
7320 _ACEOF
7321 rm -f "conftest.$ac_objext"
7322 if { (eval echo "$as_me:7322: \"$ac_compile\"") >&5
7323 (eval $ac_compile) 2>&5
7324 ac_status=$?
7325 echo "$as_me:7325: \$? = $ac_status" >&5
7326 (exit "$ac_status"); } &&
7327 { ac_try='test -s "conftest.$ac_objext"'
7328 { (eval echo "$as_me:7328: \"$ac_try\"") >&5
7329 (eval $ac_try) 2>&5
7330 ac_status=$?
7331 echo "$as_me:7331: \$? = $ac_status" >&5
7332 (exit "$ac_status"); }; }; then
7333 cf_cv_c11_noreturn=yes
7334 else
7335 echo "$as_me: failed program was:" >&5
7336 cat "conftest.$ac_ext" >&5
7337 cf_cv_c11_noreturn=no
7338 fi
7339 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7340
7341 fi
7342 echo "$as_me:7342: result: $cf_cv_c11_noreturn" >&5
7343 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
7344 else
7345 cf_cv_c11_noreturn=no,
7346 fi
7347
7348 if test "$cf_cv_c11_noreturn" = yes; then
7349
7350 cat >>confdefs.h <<\EOF
7351 #define HAVE_STDNORETURN_H 1
7352 EOF
7353
7354 cat >>confdefs.h <<EOF
7355 #define STDC_NORETURN _Noreturn
7356 EOF
7357
7358 HAVE_STDNORETURN_H=1
7359 else
7360 HAVE_STDNORETURN_H=0
7361 fi
7362
7363 if test "$GCC" = yes || test "$GXX" = yes
7364 then
7365
7366 if test "$GCC" = yes || test "$GXX" = yes
7367 then
7368 case $CFLAGS in
7369 (*-Werror=*)
7370 cf_temp_flags=
7371 for cf_temp_scan in $CFLAGS
7372 do
7373 case "x$cf_temp_scan" in
7374 (x-Werror=format*)
7375
7376 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7377 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7378
7379 ;;
7380 (x-Werror=*)
7381
7382 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7383 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7384
7385 ;;
7386 (*)
7387
7388 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7389 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7390
7391 ;;
7392 esac
7393 done
7394 if test "x$CFLAGS" != "x$cf_temp_flags"
7395 then
7396 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
7397
7398 echo "${as_me:-configure}:7398: testing repairing CFLAGS: $CFLAGS ..." 1>&5
7399
7400 CFLAGS="$cf_temp_flags"
7401 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
7402
7403 echo "${as_me:-configure}:7403: testing ... fixed $CFLAGS ..." 1>&5
7404
7405 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
7406
7407 echo "${as_me:-configure}:7407: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7408
7409 fi
7410 ;;
7411 esac
7412 fi
7413
7414 if test "$GCC" = yes || test "$GXX" = yes
7415 then
7416 case $CPPFLAGS in
7417 (*-Werror=*)
7418 cf_temp_flags=
7419 for cf_temp_scan in $CPPFLAGS
7420 do
7421 case "x$cf_temp_scan" in
7422 (x-Werror=format*)
7423
7424 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7425 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7426
7427 ;;
7428 (x-Werror=*)
7429
7430 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7431 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7432
7433 ;;
7434 (*)
7435
7436 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7437 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7438
7439 ;;
7440 esac
7441 done
7442 if test "x$CPPFLAGS" != "x$cf_temp_flags"
7443 then
7444 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
7445
7446 echo "${as_me:-configure}:7446: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
7447
7448 CPPFLAGS="$cf_temp_flags"
7449 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
7450
7451 echo "${as_me:-configure}:7451: testing ... fixed $CPPFLAGS ..." 1>&5
7452
7453 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
7454
7455 echo "${as_me:-configure}:7455: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7456
7457 fi
7458 ;;
7459 esac
7460 fi
7461
7462 if test "$GCC" = yes || test "$GXX" = yes
7463 then
7464 case $LDFLAGS in
7465 (*-Werror=*)
7466 cf_temp_flags=
7467 for cf_temp_scan in $LDFLAGS
7468 do
7469 case "x$cf_temp_scan" in
7470 (x-Werror=format*)
7471
7472 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7473 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7474
7475 ;;
7476 (x-Werror=*)
7477
7478 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
7479 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
7480
7481 ;;
7482 (*)
7483
7484 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
7485 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
7486
7487 ;;
7488 esac
7489 done
7490 if test "x$LDFLAGS" != "x$cf_temp_flags"
7491 then
7492 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
7493
7494 echo "${as_me:-configure}:7494: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
7495
7496 LDFLAGS="$cf_temp_flags"
7497 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
7498
7499 echo "${as_me:-configure}:7499: testing ... fixed $LDFLAGS ..." 1>&5
7500
7501 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
7502
7503 echo "${as_me:-configure}:7503: testing ... extra $EXTRA_CFLAGS ..." 1>&5
7504
7505 fi
7506 ;;
7507 esac
7508 fi
7509
7510 echo "$as_me:7510: checking if you want to turn on gcc warnings" >&5
7511 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
7512
7513 # Check whether --enable-warnings or --disable-warnings was given.
7514 if test "${enable_warnings+set}" = set; then
7515 enableval="$enable_warnings"
7516 test "$enableval" != yes && enableval=no
7517 if test "$enableval" != "no" ; then
7518 enable_warnings=yes
7519 else
7520 enable_warnings=no
7521 fi
7522 else
7523 enableval=no
7524 enable_warnings=no
7525
7526 fi;
7527 echo "$as_me:7527: result: $enable_warnings" >&5
7528 echo "${ECHO_T}$enable_warnings" >&6
7529 if test "$enable_warnings" = "yes"
7530 then
7531
7532 if test "x$have_x" = xyes; then
7533
7534 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
7535 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
7536 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
7537 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
7538 for cf_X_CFLAGS in $X_CFLAGS
7539 do
7540 case "x$cf_X_CFLAGS" in
7541 x-[IUD]*)
7542 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
7543 ;;
7544 *)
7545 CFLAGS="$CFLAGS $cf_X_CFLAGS"
7546 ;;
7547 esac
7548 done
7549
7550 cat >"conftest.$ac_ext" <<_ACEOF
7551 #line 7551 "configure"
7552 #include "confdefs.h"
7553
7554 $ac_includes_default
7555 #include <X11/Intrinsic.h>
7556
7557 int
7558 main (void)
7559 {
7560 String foo = malloc(1); free((void*)foo)
7561 ;
7562 return 0;
7563 }
7564 _ACEOF
7565 rm -f "conftest.$ac_objext"
7566 if { (eval echo "$as_me:7566: \"$ac_compile\"") >&5
7567 (eval $ac_compile) 2>&5
7568 ac_status=$?
7569 echo "$as_me:7569: \$? = $ac_status" >&5
7570 (exit "$ac_status"); } &&
7571 { ac_try='test -s "conftest.$ac_objext"'
7572 { (eval echo "$as_me:7572: \"$ac_try\"") >&5
7573 (eval $ac_try) 2>&5
7574 ac_status=$?
7575 echo "$as_me:7575: \$? = $ac_status" >&5
7576 (exit "$ac_status"); }; }; then
7577
7578 echo "$as_me:7578: checking for X11/Xt const-feature" >&5
7579 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
7580 if test "${cf_cv_const_x_string+set}" = set; then
7581 echo $ECHO_N "(cached) $ECHO_C" >&6
7582 else
7583
7584 cat >"conftest.$ac_ext" <<_ACEOF
7585 #line 7585 "configure"
7586 #include "confdefs.h"
7587
7588 #undef _CONST_X_STRING
7589 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
7590 #undef XTSTRINGDEFINES /* X11R5 and later */
7591 $ac_includes_default
7592 #include <X11/Intrinsic.h>
7593
7594 int
7595 main (void)
7596 {
7597 String foo = malloc(1); *foo = 0
7598 ;
7599 return 0;
7600 }
7601 _ACEOF
7602 rm -f "conftest.$ac_objext"
7603 if { (eval echo "$as_me:7603: \"$ac_compile\"") >&5
7604 (eval $ac_compile) 2>&5
7605 ac_status=$?
7606 echo "$as_me:7606: \$? = $ac_status" >&5
7607 (exit "$ac_status"); } &&
7608 { ac_try='test -s "conftest.$ac_objext"'
7609 { (eval echo "$as_me:7609: \"$ac_try\"") >&5
7610 (eval $ac_try) 2>&5
7611 ac_status=$?
7612 echo "$as_me:7612: \$? = $ac_status" >&5
7613 (exit "$ac_status"); }; }; then
7614
7615 cf_cv_const_x_string=no
7616
7617 else
7618 echo "$as_me: failed program was:" >&5
7619 cat "conftest.$ac_ext" >&5
7620
7621 cf_cv_const_x_string=yes
7622
7623 fi
7624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7625
7626 fi
7627 echo "$as_me:7627: result: $cf_cv_const_x_string" >&5
7628 echo "${ECHO_T}$cf_cv_const_x_string" >&6
7629
7630 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
7631 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
7632 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
7633
7634 case "$cf_cv_const_x_string" in
7635 (no)
7636
7637 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7638 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
7639
7640 ;;
7641 (*)
7642
7643 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7644 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
7645
7646 ;;
7647 esac
7648
7649 else
7650 echo "$as_me: failed program was:" >&5
7651 cat "conftest.$ac_ext" >&5
7652 fi
7653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7654 fi
7655 cat > "conftest.$ac_ext" <<EOF
7656 #line 7656 "${as_me:-configure}"
7657 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
7658 EOF
7659 if test "$INTEL_COMPILER" = yes
7660 then
7661 # The "-wdXXX" options suppress warnings:
7662 # remark #1419: external declaration in primary source file
7663 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
7664 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
7665 # remark #193: zero used for undefined preprocessing identifier
7666 # remark #593: variable "curs_sb_left_arrow" was set but never used
7667 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
7668 # remark #869: parameter "tw" was never referenced
7669 # remark #981: operands are evaluated in unspecified order
7670 # warning #279: controlling expression is constant
7671
7672 echo "$as_me:7672: checking for $CC warning options" >&5
7673 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
7674 test -n "$verbose" && echo "$as_me:7674: result: " >&5
7675 echo "${ECHO_T}" >&6
7676 cf_save_CFLAGS="$CFLAGS"
7677 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
7678 for cf_opt in \
7679 wd1419 \
7680 wd1683 \
7681 wd1684 \
7682 wd193 \
7683 wd593 \
7684 wd279 \
7685 wd810 \
7686 wd869 \
7687 wd981
7688 do
7689 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
7690 if { (eval echo "$as_me:7690: \"$ac_compile\"") >&5
7691 (eval $ac_compile) 2>&5
7692 ac_status=$?
7693 echo "$as_me:7693: \$? = $ac_status" >&5
7694 (exit "$ac_status"); }; then
7695 test -n "$verbose" && echo "$as_me:7695: result: ... -$cf_opt" >&5
7696 echo "${ECHO_T}... -$cf_opt" >&6
7697 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
7698 fi
7699 done
7700 CFLAGS="$cf_save_CFLAGS"
7701 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
7702 then
7703 echo "$as_me:7703: checking for $CC warning options" >&5
7704 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
7705 test -n "$verbose" && echo "$as_me:7705: result: " >&5
7706 echo "${ECHO_T}" >&6
7707 cf_save_CFLAGS="$CFLAGS"
7708 cf_warn_CONST=""
7709 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
7710 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
7711 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
7712 for cf_opt in W Wall \
7713 Wbad-function-cast \
7714 Wcast-align \
7715 Wcast-qual \
7716 Wdeclaration-after-statement \
7717 Wextra \
7718 Winline \
7719 Wmissing-declarations \
7720 Wmissing-prototypes \
7721 Wnested-externs \
7722 Wpointer-arith \
7723 Wshadow \
7724 Wstrict-prototypes \
7725 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST
7726 do
7727 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
7728 if { (eval echo "$as_me:7728: \"$ac_compile\"") >&5
7729 (eval $ac_compile) 2>&5
7730 ac_status=$?
7731 echo "$as_me:7731: \$? = $ac_status" >&5
7732 (exit "$ac_status"); }; then
7733 test -n "$verbose" && echo "$as_me:7733: result: ... -$cf_opt" >&5
7734 echo "${ECHO_T}... -$cf_opt" >&6
7735 case "$cf_opt" in
7736 (Winline)
7737 case "$GCC_VERSION" in
7738 ([34].*)
7739 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
7740
7741 echo "${as_me:-configure}:7741: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
7742
7743 continue;;
7744 esac
7745 ;;
7746 (Wpointer-arith)
7747 case "$GCC_VERSION" in
7748 ([12].*)
7749 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
7750
7751 echo "${as_me:-configure}:7751: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
7752
7753 continue;;
7754 esac
7755 ;;
7756 esac
7757 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
7758 fi
7759 done
7760 CFLAGS="$cf_save_CFLAGS"
7761 fi
7762 rm -rf ./conftest*
7763
7764 fi
7765
7766 if test "$GCC" = yes || test "$GXX" = yes
7767 then
7768 cat > conftest.i <<EOF
7769 #ifndef GCC_PRINTF
7770 #define GCC_PRINTF 0
7771 #endif
7772 #ifndef GCC_SCANF
7773 #define GCC_SCANF 0
7774 #endif
7775 #ifndef GCC_NORETURN
7776 #define GCC_NORETURN /* nothing */
7777 #endif
7778 #ifndef GCC_UNUSED
7779 #define GCC_UNUSED /* nothing */
7780 #endif
7781 EOF
7782 if test "$GCC" = yes
7783 then
7784 echo "$as_me:7784: checking for $CC __attribute__ directives" >&5
7785 echo $ECHO_N "checking for $CC __attribute__ directives... $ECHO_C" >&6
7786 test -n "$verbose" && echo "$as_me:7786: result: " >&5
7787 echo "${ECHO_T}" >&6
7788 cat > "conftest.$ac_ext" <<EOF
7789 #line 7789 "${as_me:-configure}"
7790 #include <stdio.h>
7791 #include "confdefs.h"
7792 #include "conftest.h"
7793 #include "conftest.i"
7794 #if GCC_PRINTF
7795 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
7796 #else
7797 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
7798 #endif
7799 #if GCC_SCANF
7800 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
7801 #else
7802 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
7803 #endif
7804 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
7805 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
7806 extern GCC_NORETURN void foo(void);
7807 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
7808 EOF
7809 cf_printf_attribute=no
7810 cf_scanf_attribute=no
7811 for cf_attribute in scanf printf unused noreturn
7812 do
7813
7814 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7815
7816 cf_directive="__attribute__(($cf_attribute))"
7817 echo "checking for $CC $cf_directive" 1>&5
7818
7819 case "$cf_attribute" in
7820 (printf)
7821 cf_printf_attribute=yes
7822 cat >conftest.h <<EOF
7823 #define GCC_$cf_ATTRIBUTE 1
7824 EOF
7825 ;;
7826 (scanf)
7827 cf_scanf_attribute=yes
7828 cat >conftest.h <<EOF
7829 #define GCC_$cf_ATTRIBUTE 1
7830 EOF
7831 ;;
7832 (*)
7833 cat >conftest.h <<EOF
7834 #define GCC_$cf_ATTRIBUTE $cf_directive
7835 EOF
7836 ;;
7837 esac
7838
7839 if { (eval echo "$as_me:7839: \"$ac_compile\"") >&5
7840 (eval $ac_compile) 2>&5
7841 ac_status=$?
7842 echo "$as_me:7842: \$? = $ac_status" >&5
7843 (exit "$ac_status"); }; then
7844 test -n "$verbose" && echo "$as_me:7844: result: ... $cf_attribute" >&5
7845 echo "${ECHO_T}... $cf_attribute" >&6
7846 cat conftest.h >>confdefs.h
7847 case "$cf_attribute" in
7848 (noreturn)
7849
7850 cat >>confdefs.h <<EOF
7851 #define GCC_NORETURN $cf_directive
7852 EOF
7853
7854 ;;
7855 (printf)
7856 cf_value='/* nothing */'
7857 if test "$cf_printf_attribute" != no ; then
7858 cf_value='__attribute__((format(printf,fmt,var)))'
7859
7860 cat >>confdefs.h <<\EOF
7861 #define GCC_PRINTF 1
7862 EOF
7863
7864 fi
7865
7866 cat >>confdefs.h <<EOF
7867 #define GCC_PRINTFLIKE(fmt,var) $cf_value
7868 EOF
7869
7870 ;;
7871 (scanf)
7872 cf_value='/* nothing */'
7873 if test "$cf_scanf_attribute" != no ; then
7874 cf_value='__attribute__((format(scanf,fmt,var)))'
7875
7876 cat >>confdefs.h <<\EOF
7877 #define GCC_SCANF 1
7878 EOF
7879
7880 fi
7881
7882 cat >>confdefs.h <<EOF
7883 #define GCC_SCANFLIKE(fmt,var) $cf_value
7884 EOF
7885
7886 ;;
7887 (unused)
7888
7889 cat >>confdefs.h <<EOF
7890 #define GCC_UNUSED $cf_directive
7891 EOF
7892
7893 ;;
7894 esac
7895 fi
7896 done
7897 else
7898 ${FGREP-fgrep} define conftest.i >>confdefs.h
7899 fi
7900 rm -rf ./conftest*
7901 fi
7902
7903 fi
7904
7905 echo "$as_me:7905: checking if you want to use pkg-config" >&5
7906 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
7907
7908 # Check whether --with-pkg-config or --without-pkg-config was given.
7909 if test "${with_pkg_config+set}" = set; then
7910 withval="$with_pkg_config"
7911 cf_pkg_config=$withval
7912 else
7913 cf_pkg_config=yes
7914 fi;
7915 echo "$as_me:7915: result: $cf_pkg_config" >&5
7916 echo "${ECHO_T}$cf_pkg_config" >&6
7917
7918 case "$cf_pkg_config" in
7919 (no)
7920 PKG_CONFIG=none
7921 ;;
7922 (yes)
7923
7924 if test -n "$ac_tool_prefix"; then
7925 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7926 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7927 echo "$as_me:7927: checking for $ac_word" >&5
7928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7929 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
7930 echo $ECHO_N "(cached) $ECHO_C" >&6
7931 else
7932 case $PKG_CONFIG in
7933 [\\/]* | ?:[\\/]*)
7934 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7935 ;;
7936 *)
7937 ac_save_IFS=$IFS; IFS=$ac_path_separator
7938 ac_dummy="$PATH"
7939 for ac_dir in $ac_dummy; do
7940 IFS=$ac_save_IFS
7941 test -z "$ac_dir" && ac_dir=.
7942 if $as_executable_p "$ac_dir/$ac_word"; then
7943 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
7944 echo "$as_me:7944: found $ac_dir/$ac_word" >&5
7945 break
7946 fi
7947 done
7948
7949 ;;
7950 esac
7951 fi
7952 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7953
7954 if test -n "$PKG_CONFIG"; then
7955 echo "$as_me:7955: result: $PKG_CONFIG" >&5
7956 echo "${ECHO_T}$PKG_CONFIG" >&6
7957 else
7958 echo "$as_me:7958: result: no" >&5
7959 echo "${ECHO_T}no" >&6
7960 fi
7961
7962 fi
7963 if test -z "$ac_cv_path_PKG_CONFIG"; then
7964 ac_pt_PKG_CONFIG=$PKG_CONFIG
7965 # Extract the first word of "pkg-config", so it can be a program name with args.
7966 set dummy pkg-config; ac_word=$2
7967 echo "$as_me:7967: checking for $ac_word" >&5
7968 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7969 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
7970 echo $ECHO_N "(cached) $ECHO_C" >&6
7971 else
7972 case $ac_pt_PKG_CONFIG in
7973 [\\/]* | ?:[\\/]*)
7974 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7975 ;;
7976 *)
7977 ac_save_IFS=$IFS; IFS=$ac_path_separator
7978 ac_dummy="$PATH"
7979 for ac_dir in $ac_dummy; do
7980 IFS=$ac_save_IFS
7981 test -z "$ac_dir" && ac_dir=.
7982 if $as_executable_p "$ac_dir/$ac_word"; then
7983 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
7984 echo "$as_me:7984: found $ac_dir/$ac_word" >&5
7985 break
7986 fi
7987 done
7988
7989 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
7990 ;;
7991 esac
7992 fi
7993 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7994
7995 if test -n "$ac_pt_PKG_CONFIG"; then
7996 echo "$as_me:7996: result: $ac_pt_PKG_CONFIG" >&5
7997 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
7998 else
7999 echo "$as_me:7999: result: no" >&5
8000 echo "${ECHO_T}no" >&6
8001 fi
8002
8003 PKG_CONFIG=$ac_pt_PKG_CONFIG
8004 else
8005 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8006 fi
8007
8008 ;;
8009 (*)
8010 PKG_CONFIG=$withval
8011 ;;
8012 esac
8013
8014 test -z "$PKG_CONFIG" && PKG_CONFIG=none
8015 if test "$PKG_CONFIG" != none ; then
8016
8017 if test "x$prefix" != xNONE; then
8018 cf_path_syntax="$prefix"
8019 else
8020 cf_path_syntax="$ac_default_prefix"
8021 fi
8022
8023 case "x$PKG_CONFIG" in
8024 (x\$\(*\)*|x\'*\'*)
8025 ;;
8026 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
8027 ;;
8028 (x\$\{*prefix\}*|x\$\{*dir\}*)
8029 eval PKG_CONFIG="$PKG_CONFIG"
8030 case "x$PKG_CONFIG" in
8031 (xNONE/*)
8032 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
8033 ;;
8034 esac
8035 ;;
8036 (xno|xNONE/*)
8037 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
8038 ;;
8039 (*)
8040 { { echo "$as_me:8040: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
8041 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
8042 { (exit 1); exit 1; }; }
8043 ;;
8044 esac
8045
8046 elif test "x$cf_pkg_config" != xno ; then
8047 { echo "$as_me:8047: WARNING: pkg-config is not installed" >&5
8048 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
8049 fi
8050
8051 case "$PKG_CONFIG" in
8052 (no|none|yes)
8053 echo "$as_me:8053: checking for pkg-config library directory" >&5
8054 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
8055 ;;
8056 (*)
8057 echo "$as_me:8057: checking for $PKG_CONFIG library directory" >&5
8058 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
8059 ;;
8060 esac
8061
8062 # if $PKG_CONFIG_LIBDIR is set, try to use that
8063 if test -n "$PKG_CONFIG_PATH"; then
8064 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
8065 elif test -n "$PKG_CONFIG_LIBDIR"; then
8066 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
8067 else
8068 cf_search_path=auto
8069 fi
8070
8071 # if the option is used, let that override. otherwise default to "libdir"
8072
8073 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
8074 if test "${with_pkg_config_libdir+set}" = set; then
8075 withval="$with_pkg_config_libdir"
8076 cf_search_path=$withval
8077 else
8078 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
8079 fi;
8080
8081 case "x$cf_search_path" in
8082 (xlibdir)
8083 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
8084 echo "$as_me:8084: result: $PKG_CONFIG_LIBDIR" >&5
8085 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
8086 cf_search_path=
8087 ;;
8088 (x)
8089 ;;
8090 (x$GLOB_FULLPATH_POSIX\ *|x$GLOB_FULLPATH_OTHER\ *)
8091 PKG_CONFIG_LIBDIR=
8092 ;;
8093 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
8094 PKG_CONFIG_LIBDIR="$cf_search_path"
8095 echo "$as_me:8095: result: $PKG_CONFIG_LIBDIR" >&5
8096 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
8097 cf_search_path=
8098 ;;
8099 (xyes|xauto)
8100 echo "$as_me:8100: result: auto" >&5
8101 echo "${ECHO_T}auto" >&6
8102 cf_search_path=
8103 # Look for the library directory using the same prefix as the executable
8104 echo "$as_me:8104: checking for search-list" >&5
8105 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
8106 if test "x$PKG_CONFIG" != xnone
8107 then
8108 # works for pkg-config since version 0.24 (2009)
8109 # works for pkgconf since version 0.8.3 (2012)
8110 for cf_pkg_program in \
8111 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
8112 pkg-config \
8113 pkgconf
8114 do
8115 cf_raw_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null`
8116 case "$cf_raw_search_path" in
8117 (*\\*)
8118 cf_search_path=`echo "$cf_raw_search_path" | tr ';' ' ' | tr '\' '/'`
8119 ;;
8120 (*/*)
8121 cf_search_path=`echo "$cf_raw_search_path" | tr : ' '`
8122 ;;
8123 esac
8124 test -n "$cf_search_path" && break
8125 done
8126
8127 # works for pkg-config since import in 2005 of original 2001 HP code.
8128 test -z "$cf_search_path" && \
8129 cf_search_path=`
8130 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
8131 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
8132 sub(\"^[^']*'\",\"\"); \
8133 sub(\"'.*\",\"\"); \
8134 printf \" %s\", \\$0; } \
8135 { next; } \
8136 "`
8137 fi
8138
8139 echo "$as_me:8139: result: $cf_search_path" >&5
8140 echo "${ECHO_T}$cf_search_path" >&6
8141 ;;
8142 (*)
8143 { { echo "$as_me:8143: error: Unexpected option value: $cf_search_path" >&5
8144 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
8145 { (exit 1); exit 1; }; }
8146 ;;
8147 esac
8148
8149 if test -n "$cf_search_path"
8150 then
8151 echo "$as_me:8151: checking for first directory" >&5
8152 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
8153 cf_pkg_config_path=none
8154 for cf_config in $cf_search_path
8155 do
8156 if test -d "$cf_config"
8157 then
8158 cf_pkg_config_path=$cf_config
8159 break
8160 fi
8161 done
8162 echo "$as_me:8162: result: $cf_pkg_config_path" >&5
8163 echo "${ECHO_T}$cf_pkg_config_path" >&6
8164
8165 if test "x$cf_pkg_config_path" != xnone ; then
8166 # limit this to the first directory found
8167 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
8168 fi
8169
8170 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
8171 then
8172 echo "$as_me:8172: checking for workaround" >&5
8173 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
8174 if test "$prefix" = "NONE" ; then
8175 cf_prefix="$ac_default_prefix"
8176 else
8177 cf_prefix="$prefix"
8178 fi
8179 eval cf_libdir=$libdir
8180 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
8181 cf_backup=
8182 for cf_config in $cf_search_path
8183 do
8184 case $cf_config in
8185 $cf_libdir/pkgconfig)
8186 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
8187 break
8188 ;;
8189 *)
8190 test -z "$cf_backup" && cf_backup=$cf_config
8191 ;;
8192 esac
8193 done
8194 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
8195 echo "$as_me:8195: result: $PKG_CONFIG_LIBDIR" >&5
8196 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
8197 fi
8198 fi
8199
8200 if test "x$PKG_CONFIG" != xnone
8201 then
8202 echo "$as_me:8202: checking if we should install .pc files for $PKG_CONFIG" >&5
8203 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
8204 else
8205 echo "$as_me:8205: checking if we should install .pc files" >&5
8206 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
8207 fi
8208
8209 # Check whether --enable-pc-files or --disable-pc-files was given.
8210 if test "${enable_pc_files+set}" = set; then
8211 enableval="$enable_pc_files"
8212 enable_pc_files=$enableval
8213 else
8214 enable_pc_files=no
8215 fi;
8216 echo "$as_me:8216: result: $enable_pc_files" >&5
8217 echo "${ECHO_T}$enable_pc_files" >&6
8218
8219 if test "x$enable_pc_files" != xno
8220 then
8221 MAKE_PC_FILES=
8222 case "x$PKG_CONFIG_LIBDIR" in
8223 (xno|xnone|xyes|x)
8224 { echo "$as_me:8224: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
8225 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
8226 ;;
8227 (*)
8228 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
8229
8230 if test "x$prefix" != xNONE; then
8231 cf_path_syntax="$prefix"
8232 else
8233 cf_path_syntax="$ac_default_prefix"
8234 fi
8235
8236 case "x$cf_pkg_config_libdir" in
8237 (x\$\(*\)*|x\'*\'*)
8238 ;;
8239 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
8240 ;;
8241 (x\$\{*prefix\}*|x\$\{*dir\}*)
8242 eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
8243 case "x$cf_pkg_config_libdir" in
8244 (xNONE/*)
8245 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
8246 ;;
8247 esac
8248 ;;
8249 (xno|xNONE/*)
8250 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
8251 ;;
8252 (*)
8253 { { echo "$as_me:8253: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
8254 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
8255 { (exit 1); exit 1; }; }
8256 ;;
8257 esac
8258
8259 ;;
8260 esac
8261 else
8262 MAKE_PC_FILES="#"
8263 fi
8264
8265 echo "$as_me:8265: checking for this package's name" >&5
8266 echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
8267
8268 # Check whether --with-package or --without-package was given.
8269 if test "${with_package+set}" = set; then
8270 withval="$with_package"
8271 PACKAGE=$withval
8272 else
8273 PACKAGE=dialog
8274 fi;
8275 echo "$as_me:8275: result: $PACKAGE" >&5
8276 echo "${ECHO_T}$PACKAGE" >&6
8277
8278 if test -f "$srcdir/VERSION" ; then
8279 echo "$as_me:8279: checking for package version" >&5
8280 echo $ECHO_N "checking for package version... $ECHO_C" >&6
8281
8282 # if there are not enough fields, cut returns the last one...
8283 cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
8284 cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
8285 cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
8286
8287 # this is how CF_BUNDLED_INTL uses $VERSION:
8288 VERSION="$cf_field1"
8289
8290 VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
8291 test -z "$VERSION_MAJOR" && { { echo "$as_me:8291: error: missing major-version" >&5
8292 echo "$as_me: error: missing major-version" >&2;}
8293 { (exit 1); exit 1; }; }
8294
8295 VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
8296 test -z "$VERSION_MINOR" && { { echo "$as_me:8296: error: missing minor-version" >&5
8297 echo "$as_me: error: missing minor-version" >&2;}
8298 { (exit 1); exit 1; }; }
8299
8300 echo "$as_me:8300: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
8301 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
8302
8303 echo "$as_me:8303: checking for package patch date" >&5
8304 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
8305 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
8306 case .$VERSION_PATCH in
8307 (.)
8308 { { echo "$as_me:8308: error: missing patch-date $VERSION_PATCH" >&5
8309 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
8310 { (exit 1); exit 1; }; }
8311 ;;
8312 (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
8313 ;;
8314 (*)
8315 { { echo "$as_me:8315: error: illegal patch-date $VERSION_PATCH" >&5
8316 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
8317 { (exit 1); exit 1; }; }
8318 ;;
8319 esac
8320 echo "$as_me:8320: result: $VERSION_PATCH" >&5
8321 echo "${ECHO_T}$VERSION_PATCH" >&6
8322 else
8323 { { echo "$as_me:8323: error: did not find $srcdir/VERSION" >&5
8324 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
8325 { (exit 1); exit 1; }; }
8326 fi
8327
8328 # show the actual data that we have for versions:
8329 test -n "$verbose" && echo " ABI VERSION $VERSION" 1>&6
8330
8331 echo "${as_me:-configure}:8331: testing ABI VERSION $VERSION ..." 1>&5
8332
8333 test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
8334
8335 echo "${as_me:-configure}:8335: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
8336
8337 test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
8338
8339 echo "${as_me:-configure}:8339: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
8340
8341 test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
8342
8343 echo "${as_me:-configure}:8343: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
8344
8345 PROGRAM=dialog
8346 PACKAGE=$PACKAGE
8347
8348 cat >>confdefs.h <<EOF
8349 #define PACKAGE "$PACKAGE"
8350 EOF
8351
8352 cat >>confdefs.h <<EOF
8353 #define DIALOG_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
8354 EOF
8355
8356 cat >>confdefs.h <<EOF
8357 #define DIALOG_PATCHDATE ${VERSION_PATCH}
8358 EOF
8359
8360 CFG_ROOTNAME=$PACKAGE
8361 HDR_ROOTNAME=$PACKAGE
8362 LIB_ROOTNAME=$PACKAGE
8363
8364 echo "$as_me:8364: checking if we should install dlg_XXX headers to subdirectory" >&5
8365 echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
8366
8367 # Check whether --enable-header-subdir or --disable-header-subdir was given.
8368 if test "${enable_header_subdir+set}" = set; then
8369 enableval="$enable_header_subdir"
8370 SUB_INC=$enableval
8371 else
8372 SUB_INC=no
8373 fi;
8374 echo "$as_me:8374: result: $SUB_INC" >&5
8375 echo "${ECHO_T}$SUB_INC" >&6
8376
8377 case "x${with_man2html}" in
8378 (xno)
8379 cf_man2html=no
8380 ;;
8381 (x|xyes)
8382 # Extract the first word of "man2html", so it can be a program name with args.
8383 set dummy man2html; ac_word=$2
8384 echo "$as_me:8384: checking for $ac_word" >&5
8385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8386 if test "${ac_cv_path_cf_man2html+set}" = set; then
8387 echo $ECHO_N "(cached) $ECHO_C" >&6
8388 else
8389 case $cf_man2html in
8390 [\\/]* | ?:[\\/]*)
8391 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
8392 ;;
8393 *)
8394 ac_save_IFS=$IFS; IFS=$ac_path_separator
8395 ac_dummy="$PATH"
8396 for ac_dir in $ac_dummy; do
8397 IFS=$ac_save_IFS
8398 test -z "$ac_dir" && ac_dir=.
8399 if $as_executable_p "$ac_dir/$ac_word"; then
8400 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
8401 echo "$as_me:8401: found $ac_dir/$ac_word" >&5
8402 break
8403 fi
8404 done
8405
8406 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
8407 ;;
8408 esac
8409 fi
8410 cf_man2html=$ac_cv_path_cf_man2html
8411
8412 if test -n "$cf_man2html"; then
8413 echo "$as_me:8413: result: $cf_man2html" >&5
8414 echo "${ECHO_T}$cf_man2html" >&6
8415 else
8416 echo "$as_me:8416: result: no" >&5
8417 echo "${ECHO_T}no" >&6
8418 fi
8419
8420 case "x$cf_man2html" in
8421 (x/*)
8422 echo "$as_me:8422: checking for the modified Earl Hood script" >&5
8423 echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
8424 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
8425 then
8426 cf_man2html_ok=yes
8427 else
8428 cf_man2html=no
8429 cf_man2html_ok=no
8430 fi
8431 echo "$as_me:8431: result: $cf_man2html_ok" >&5
8432 echo "${ECHO_T}$cf_man2html_ok" >&6
8433 ;;
8434 (*)
8435 cf_man2html=no
8436 ;;
8437 esac
8438 esac
8439
8440 echo "$as_me:8440: checking for program to convert manpage to html" >&5
8441 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
8442
8443 # Check whether --with-man2html or --without-man2html was given.
8444 if test "${with_man2html+set}" = set; then
8445 withval="$with_man2html"
8446 cf_man2html=$withval
8447 else
8448 cf_man2html=$cf_man2html
8449 fi;
8450
8451 cf_with_groff=no
8452
8453 case $cf_man2html in
8454 (yes)
8455 echo "$as_me:8455: result: man2html" >&5
8456 echo "${ECHO_T}man2html" >&6
8457 # Extract the first word of "man2html", so it can be a program name with args.
8458 set dummy man2html; ac_word=$2
8459 echo "$as_me:8459: checking for $ac_word" >&5
8460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8461 if test "${ac_cv_path_cf_man2html+set}" = set; then
8462 echo $ECHO_N "(cached) $ECHO_C" >&6
8463 else
8464 case $cf_man2html in
8465 [\\/]* | ?:[\\/]*)
8466 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
8467 ;;
8468 *)
8469 ac_save_IFS=$IFS; IFS=$ac_path_separator
8470 ac_dummy="$PATH"
8471 for ac_dir in $ac_dummy; do
8472 IFS=$ac_save_IFS
8473 test -z "$ac_dir" && ac_dir=.
8474 if $as_executable_p "$ac_dir/$ac_word"; then
8475 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
8476 echo "$as_me:8476: found $ac_dir/$ac_word" >&5
8477 break
8478 fi
8479 done
8480
8481 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
8482 ;;
8483 esac
8484 fi
8485 cf_man2html=$ac_cv_path_cf_man2html
8486
8487 if test -n "$cf_man2html"; then
8488 echo "$as_me:8488: result: $cf_man2html" >&5
8489 echo "${ECHO_T}$cf_man2html" >&6
8490 else
8491 echo "$as_me:8491: result: no" >&5
8492 echo "${ECHO_T}no" >&6
8493 fi
8494
8495 ;;
8496 (no|groff|*/groff*)
8497 cf_with_groff=yes
8498 cf_man2html=$GROFF_PATH
8499 echo "$as_me:8499: result: $cf_man2html" >&5
8500 echo "${ECHO_T}$cf_man2html" >&6
8501 ;;
8502 (*)
8503 echo "$as_me:8503: result: $cf_man2html" >&5
8504 echo "${ECHO_T}$cf_man2html" >&6
8505 ;;
8506 esac
8507
8508 MAN2HTML_TEMP="man2html.tmp"
8509 cat >$MAN2HTML_TEMP <<CF_EOF
8510 #!$SHELL
8511 # Temporary script generated by CF_WITH_MAN2HTML
8512 # Convert inputs to html, sending result to standard output.
8513 #
8514 # Parameters:
8515 # \${1} = rootname of file to convert
8516 # \${2} = suffix of file to convert, e.g., "1"
8517 # \${3} = macros to use, e.g., "man"
8518 #
8519 ROOT=\$1
8520 TYPE=\$2
8521 MACS=\$3
8522
8523 unset LANG
8524 unset LC_ALL
8525 unset LC_CTYPE
8526 unset LANGUAGE
8527 GROFF_NO_SGR=stupid
8528 export GROFF_NO_SGR
8529
8530 CF_EOF
8531
8532 NROFF_OPTS=
8533 if test "x$cf_with_groff" = xyes
8534 then
8535 MAN2HTML_NOTE="$GROFF_NOTE"
8536 MAN2HTML_PATH="$GROFF_PATH"
8537 cat >>$MAN2HTML_TEMP <<CF_EOF
8538 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
8539 CF_EOF
8540 else
8541 # disable hyphenation if this is groff
8542 if test "x$GROFF_PATH" != xno
8543 then
8544 echo "$as_me:8544: checking if nroff is really groff" >&5
8545 echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
8546 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
8547 test -n "$cf_check_groff" && cf_check_groff=yes
8548 test -n "$cf_check_groff" || cf_check_groff=no
8549 echo "$as_me:8549: result: $cf_check_groff" >&5
8550 echo "${ECHO_T}$cf_check_groff" >&6
8551 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
8552 fi
8553 MAN2HTML_NOTE=""
8554
8555 if test "x$prefix" != xNONE; then
8556 cf_path_syntax="$prefix"
8557 else
8558 cf_path_syntax="$ac_default_prefix"
8559 fi
8560
8561 case "x$cf_man2html" in
8562 (x\$\(*\)*|x\'*\'*)
8563 ;;
8564 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
8565 ;;
8566 (x\$\{*prefix\}*|x\$\{*dir\}*)
8567 eval cf_man2html="$cf_man2html"
8568 case "x$cf_man2html" in
8569 (xNONE/*)
8570 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
8571 ;;
8572 esac
8573 ;;
8574 (xno|xNONE/*)
8575 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
8576 ;;
8577 (*)
8578 { { echo "$as_me:8578: error: expected a pathname, not \"$cf_man2html\"" >&5
8579 echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
8580 { (exit 1); exit 1; }; }
8581 ;;
8582 esac
8583
8584 MAN2HTML_PATH="$cf_man2html"
8585 echo "$as_me:8585: checking for $cf_man2html top/bottom margins" >&5
8586 echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
8587
8588 # for this example, expect 3 lines of content, the remainder is head/foot
8589 cat >conftest.in <<CF_EOF
8590 .TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
8591 .SH SECTION
8592 MARKER
8593 CF_EOF
8594
8595 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
8596
8597 cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
8598 cf_man2html_top=`expr "$cf_man2html_1st" - 2`
8599 cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
8600 cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
8601 cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
8602
8603 echo "$as_me:8603: result: $cf_man2html_top_bot" >&5
8604 echo "${ECHO_T}$cf_man2html_top_bot" >&6
8605
8606 echo "$as_me:8606: checking for pagesize to use" >&5
8607 echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
8608 for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8609 do
8610 cat >>conftest.in <<CF_EOF
8611 .nf
8612 0
8613 1
8614 2
8615 3
8616 4
8617 5
8618 6
8619 7
8620 8
8621 9
8622 CF_EOF
8623 done
8624
8625 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
8626 cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
8627 test -z "$cf_man2html_page" && cf_man2html_page=99999
8628 test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
8629
8630 rm -rf conftest*
8631 echo "$as_me:8631: result: $cf_man2html_page" >&5
8632 echo "${ECHO_T}$cf_man2html_page" >&6
8633
8634 cat >>$MAN2HTML_TEMP <<CF_EOF
8635 : \${MAN2HTML_PATH=$MAN2HTML_PATH}
8636 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
8637 case \${TYPE} in
8638 (ms)
8639 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
8640 ;;
8641 (*)
8642 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
8643 ;;
8644 esac
8645 CF_EOF
8646 fi
8647
8648 chmod 700 $MAN2HTML_TEMP
8649
8650 EXTRAOBJS=""
8651
8652 cf_makefile=makefile
8653
8654 test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
8655
8656 # Allow override of "config.h" definition:
8657 : ${CONFIG_H:=config.h}
8658
8659 if test -z "$PACKAGE" ; then
8660 { { echo "$as_me:8660: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
8661 echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
8662 { (exit 1); exit 1; }; }
8663 fi
8664
8665 if test -z "$VERSION" ; then
8666 if test -f "$srcdir/VERSION" ; then
8667 VERSION=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
8668 else
8669 VERSION=unknown
8670 fi
8671 fi
8672
8673 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8674 if test "${with_libiconv_prefix+set}" = set; then
8675 withval="$with_libiconv_prefix"
8676
8677 case "x$withval" in
8678 (xno|xyes|x)
8679 ;;
8680 (*)
8681
8682 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
8683 if test -d "$cf_searchpath/include" ; then
8684
8685 if test -n "$cf_searchpath/include" ; then
8686 for cf_add_incdir in $cf_searchpath/include
8687 do
8688 while test "$cf_add_incdir" != /usr/include
8689 do
8690 if test -d "$cf_add_incdir"
8691 then
8692 cf_have_incdir=no
8693 if test -n "$CFLAGS$CPPFLAGS" ; then
8694 # a loop is needed to ensure we can add subdirs of existing dirs
8695 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8696 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8697 cf_have_incdir=yes; break
8698 fi
8699 done
8700 fi
8701
8702 if test "$cf_have_incdir" = no ; then
8703 if test "$cf_add_incdir" = /usr/local/include ; then
8704 if test "$GCC" = yes
8705 then
8706 cf_save_CPPFLAGS=$CPPFLAGS
8707
8708 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8709 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8710
8711 cat >"conftest.$ac_ext" <<_ACEOF
8712 #line 8712 "configure"
8713 #include "confdefs.h"
8714 #include <stdio.h>
8715 int
8716 main (void)
8717 {
8718 printf("Hello")
8719 ;
8720 return 0;
8721 }
8722 _ACEOF
8723 rm -f "conftest.$ac_objext"
8724 if { (eval echo "$as_me:8724: \"$ac_compile\"") >&5
8725 (eval $ac_compile) 2>&5
8726 ac_status=$?
8727 echo "$as_me:8727: \$? = $ac_status" >&5
8728 (exit "$ac_status"); } &&
8729 { ac_try='test -s "conftest.$ac_objext"'
8730 { (eval echo "$as_me:8730: \"$ac_try\"") >&5
8731 (eval $ac_try) 2>&5
8732 ac_status=$?
8733 echo "$as_me:8733: \$? = $ac_status" >&5
8734 (exit "$ac_status"); }; }; then
8735 :
8736 else
8737 echo "$as_me: failed program was:" >&5
8738 cat "conftest.$ac_ext" >&5
8739 cf_have_incdir=yes
8740 fi
8741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8742 CPPFLAGS=$cf_save_CPPFLAGS
8743 fi
8744 fi
8745 fi
8746
8747 if test "$cf_have_incdir" = no ; then
8748 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8749
8750 echo "${as_me:-configure}:8750: testing adding $cf_add_incdir to include-path ..." 1>&5
8751
8752 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8753
8754 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8755 test "$cf_top_incdir" = "$cf_add_incdir" && break
8756 cf_add_incdir="$cf_top_incdir"
8757 else
8758 break
8759 fi
8760 else
8761 break
8762 fi
8763 done
8764 done
8765 fi
8766
8767 elif test -d "$cf_searchpath/../include" ; then
8768
8769 if test -n "$cf_searchpath/../include" ; then
8770 for cf_add_incdir in $cf_searchpath/../include
8771 do
8772 while test "$cf_add_incdir" != /usr/include
8773 do
8774 if test -d "$cf_add_incdir"
8775 then
8776 cf_have_incdir=no
8777 if test -n "$CFLAGS$CPPFLAGS" ; then
8778 # a loop is needed to ensure we can add subdirs of existing dirs
8779 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8780 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8781 cf_have_incdir=yes; break
8782 fi
8783 done
8784 fi
8785
8786 if test "$cf_have_incdir" = no ; then
8787 if test "$cf_add_incdir" = /usr/local/include ; then
8788 if test "$GCC" = yes
8789 then
8790 cf_save_CPPFLAGS=$CPPFLAGS
8791
8792 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8793 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8794
8795 cat >"conftest.$ac_ext" <<_ACEOF
8796 #line 8796 "configure"
8797 #include "confdefs.h"
8798 #include <stdio.h>
8799 int
8800 main (void)
8801 {
8802 printf("Hello")
8803 ;
8804 return 0;
8805 }
8806 _ACEOF
8807 rm -f "conftest.$ac_objext"
8808 if { (eval echo "$as_me:8808: \"$ac_compile\"") >&5
8809 (eval $ac_compile) 2>&5
8810 ac_status=$?
8811 echo "$as_me:8811: \$? = $ac_status" >&5
8812 (exit "$ac_status"); } &&
8813 { ac_try='test -s "conftest.$ac_objext"'
8814 { (eval echo "$as_me:8814: \"$ac_try\"") >&5
8815 (eval $ac_try) 2>&5
8816 ac_status=$?
8817 echo "$as_me:8817: \$? = $ac_status" >&5
8818 (exit "$ac_status"); }; }; then
8819 :
8820 else
8821 echo "$as_me: failed program was:" >&5
8822 cat "conftest.$ac_ext" >&5
8823 cf_have_incdir=yes
8824 fi
8825 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8826 CPPFLAGS=$cf_save_CPPFLAGS
8827 fi
8828 fi
8829 fi
8830
8831 if test "$cf_have_incdir" = no ; then
8832 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8833
8834 echo "${as_me:-configure}:8834: testing adding $cf_add_incdir to include-path ..." 1>&5
8835
8836 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8837
8838 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8839 test "$cf_top_incdir" = "$cf_add_incdir" && break
8840 cf_add_incdir="$cf_top_incdir"
8841 else
8842 break
8843 fi
8844 else
8845 break
8846 fi
8847 done
8848 done
8849 fi
8850
8851 else
8852 { { echo "$as_me:8852: error: cannot find libiconv under $withval" >&5
8853 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
8854 { (exit 1); exit 1; }; }
8855 fi
8856 if test -d "$cf_searchpath/lib" ; then
8857
8858 if test -n "$cf_searchpath/lib" ; then
8859 for cf_add_libdir in $cf_searchpath/lib
8860 do
8861 if test "$cf_add_libdir" = /usr/lib ; then
8862 :
8863 elif test -d "$cf_add_libdir"
8864 then
8865 cf_have_libdir=no
8866 if test -n "$LDFLAGS$LIBS" ; then
8867 # a loop is needed to ensure we can add subdirs of existing dirs
8868 for cf_test_libdir in $LDFLAGS $LIBS ; do
8869 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8870 cf_have_libdir=yes; break
8871 fi
8872 done
8873 fi
8874 if test "$cf_have_libdir" = no ; then
8875 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8876
8877 echo "${as_me:-configure}:8877: testing adding $cf_add_libdir to library-path ..." 1>&5
8878
8879 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8880 fi
8881 fi
8882 done
8883 fi
8884
8885 elif test -d "$cf_searchpath" ; then
8886
8887 if test -n "$cf_searchpath" ; then
8888 for cf_add_libdir in $cf_searchpath
8889 do
8890 if test "$cf_add_libdir" = /usr/lib ; then
8891 :
8892 elif test -d "$cf_add_libdir"
8893 then
8894 cf_have_libdir=no
8895 if test -n "$LDFLAGS$LIBS" ; then
8896 # a loop is needed to ensure we can add subdirs of existing dirs
8897 for cf_test_libdir in $LDFLAGS $LIBS ; do
8898 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8899 cf_have_libdir=yes; break
8900 fi
8901 done
8902 fi
8903 if test "$cf_have_libdir" = no ; then
8904 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8905
8906 echo "${as_me:-configure}:8906: testing adding $cf_add_libdir to library-path ..." 1>&5
8907
8908 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8909 fi
8910 fi
8911 done
8912 fi
8913
8914 else
8915 { { echo "$as_me:8915: error: cannot find libiconv under $withval" >&5
8916 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
8917 { (exit 1); exit 1; }; }
8918 fi
8919 done
8920
8921 test -n "$verbose" && echo " setting path value for libiconv to $withval" 1>&6
8922
8923 echo "${as_me:-configure}:8923: testing setting path value for libiconv to $withval ..." 1>&5
8924
8925 ;;
8926 esac
8927
8928 fi;
8929
8930 echo "$as_me:8930: checking for iconv" >&5
8931 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
8932 if test "${am_cv_func_iconv+set}" = set; then
8933 echo $ECHO_N "(cached) $ECHO_C" >&6
8934 else
8935
8936 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8937 # will be set on completion of the AC_LINK_IFELSE below.
8938 cf_cv_header_path_iconv=
8939 cf_cv_library_path_iconv=
8940
8941 echo "${as_me:-configure}:8941: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
8942
8943 cf_save_LIBS="$LIBS"
8944
8945 cat >"conftest.$ac_ext" <<_ACEOF
8946 #line 8946 "configure"
8947 #include "confdefs.h"
8948
8949 #include <stdlib.h>
8950 #include <iconv.h>
8951
8952 int
8953 main (void)
8954 {
8955
8956 iconv_t cd = iconv_open("","");
8957 iconv(cd,NULL,NULL,NULL,NULL);
8958 iconv_close(cd);
8959
8960 ;
8961 return 0;
8962 }
8963 _ACEOF
8964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8965 if { (eval echo "$as_me:8965: \"$ac_link\"") >&5
8966 (eval $ac_link) 2>&5
8967 ac_status=$?
8968 echo "$as_me:8968: \$? = $ac_status" >&5
8969 (exit "$ac_status"); } &&
8970 { ac_try='test -s "conftest$ac_exeext"'
8971 { (eval echo "$as_me:8971: \"$ac_try\"") >&5
8972 (eval $ac_try) 2>&5
8973 ac_status=$?
8974 echo "$as_me:8974: \$? = $ac_status" >&5
8975 (exit "$ac_status"); }; }; then
8976
8977 cf_cv_find_linkage_iconv=yes
8978 cf_cv_header_path_iconv=/usr/include
8979 cf_cv_library_path_iconv=/usr/lib
8980
8981 else
8982 echo "$as_me: failed program was:" >&5
8983 cat "conftest.$ac_ext" >&5
8984
8985 LIBS="-liconv $cf_save_LIBS"
8986
8987 cat >"conftest.$ac_ext" <<_ACEOF
8988 #line 8988 "configure"
8989 #include "confdefs.h"
8990
8991 #include <stdlib.h>
8992 #include <iconv.h>
8993
8994 int
8995 main (void)
8996 {
8997
8998 iconv_t cd = iconv_open("","");
8999 iconv(cd,NULL,NULL,NULL,NULL);
9000 iconv_close(cd);
9001
9002 ;
9003 return 0;
9004 }
9005 _ACEOF
9006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9007 if { (eval echo "$as_me:9007: \"$ac_link\"") >&5
9008 (eval $ac_link) 2>&5
9009 ac_status=$?
9010 echo "$as_me:9010: \$? = $ac_status" >&5
9011 (exit "$ac_status"); } &&
9012 { ac_try='test -s "conftest$ac_exeext"'
9013 { (eval echo "$as_me:9013: \"$ac_try\"") >&5
9014 (eval $ac_try) 2>&5
9015 ac_status=$?
9016 echo "$as_me:9016: \$? = $ac_status" >&5
9017 (exit "$ac_status"); }; }; then
9018
9019 cf_cv_find_linkage_iconv=yes
9020 cf_cv_header_path_iconv=/usr/include
9021 cf_cv_library_path_iconv=/usr/lib
9022 cf_cv_library_file_iconv="-liconv"
9023
9024 else
9025 echo "$as_me: failed program was:" >&5
9026 cat "conftest.$ac_ext" >&5
9027
9028 cf_cv_find_linkage_iconv=no
9029 LIBS="$cf_save_LIBS"
9030
9031 test -n "$verbose" && echo " find linkage for iconv library" 1>&6
9032
9033 echo "${as_me:-configure}:9033: testing find linkage for iconv library ..." 1>&5
9034
9035 echo "${as_me:-configure}:9035: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
9036
9037 cf_save_CPPFLAGS="$CPPFLAGS"
9038 cf_test_CPPFLAGS="$CPPFLAGS"
9039
9040 cf_search=
9041
9042 # collect the current set of include-directories from compiler flags
9043 cf_header_path_list=""
9044 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9045 for cf_header_path in $CPPFLAGS $CFLAGS
9046 do
9047 case "$cf_header_path" in
9048 (-I*)
9049 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9050
9051 test "x$cf_header_path" != "xNONE" && \
9052 test -d "$cf_header_path" && \
9053 {
9054 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9055 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9056 test -d "$cf_header_path/include/iconv" && cf_search="$cf_search $cf_header_path/include/iconv"
9057 test -d "$cf_header_path/include/iconv/include" && cf_search="$cf_search $cf_header_path/include/iconv/include"
9058 test -d "$cf_header_path/iconv/include" && cf_search="$cf_search $cf_header_path/iconv/include"
9059 test -d "$cf_header_path/iconv/include/iconv" && cf_search="$cf_search $cf_header_path/iconv/include/iconv"
9060 }
9061
9062 cf_header_path_list="$cf_header_path_list $cf_search"
9063 ;;
9064 esac
9065 done
9066 fi
9067
9068 # add the variations for the package we are looking for
9069
9070 cf_search=
9071
9072 test "x$prefix" != "xNONE" && \
9073 test -d "$prefix" && \
9074 {
9075 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9076 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9077 test -d "$prefix/include/iconv" && cf_search="$cf_search $prefix/include/iconv"
9078 test -d "$prefix/include/iconv/include" && cf_search="$cf_search $prefix/include/iconv/include"
9079 test -d "$prefix/iconv/include" && cf_search="$cf_search $prefix/iconv/include"
9080 test -d "$prefix/iconv/include/iconv" && cf_search="$cf_search $prefix/iconv/include/iconv"
9081 }
9082
9083 for cf_subdir_prefix in \
9084 /usr \
9085 /usr/local \
9086 /usr/pkg \
9087 /opt \
9088 /opt/local \
9089 $HOME
9090 do
9091
9092 test "x$cf_subdir_prefix" != "x$prefix" && \
9093 test -d "$cf_subdir_prefix" && \
9094 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9095 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9096 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9097 test -d "$cf_subdir_prefix/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/include/iconv"
9098 test -d "$cf_subdir_prefix/include/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
9099 test -d "$cf_subdir_prefix/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/iconv/include"
9100 test -d "$cf_subdir_prefix/iconv/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
9101 }
9102
9103 done
9104
9105 test "$includedir" != NONE && \
9106 test "$includedir" != "/usr/include" && \
9107 test -d "$includedir" && {
9108 test -d "$includedir" && cf_search="$cf_search $includedir"
9109 test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
9110 }
9111
9112 test "$oldincludedir" != NONE && \
9113 test "$oldincludedir" != "/usr/include" && \
9114 test -d "$oldincludedir" && {
9115 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9116 test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
9117 }
9118
9119 cf_search="$cf_search $cf_header_path_list"
9120
9121 for cf_cv_header_path_iconv in $cf_search
9122 do
9123 if test -d "$cf_cv_header_path_iconv" ; then
9124 test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
9125
9126 echo "${as_me:-configure}:9126: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
9127
9128 CPPFLAGS="$cf_save_CPPFLAGS"
9129
9130 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9131 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
9132
9133 cat >"conftest.$ac_ext" <<_ACEOF
9134 #line 9134 "configure"
9135 #include "confdefs.h"
9136
9137 #include <stdlib.h>
9138 #include <iconv.h>
9139
9140 int
9141 main (void)
9142 {
9143
9144 iconv_t cd = iconv_open("","");
9145 iconv(cd,NULL,NULL,NULL,NULL);
9146 iconv_close(cd);
9147
9148 ;
9149 return 0;
9150 }
9151 _ACEOF
9152 rm -f "conftest.$ac_objext"
9153 if { (eval echo "$as_me:9153: \"$ac_compile\"") >&5
9154 (eval $ac_compile) 2>&5
9155 ac_status=$?
9156 echo "$as_me:9156: \$? = $ac_status" >&5
9157 (exit "$ac_status"); } &&
9158 { ac_try='test -s "conftest.$ac_objext"'
9159 { (eval echo "$as_me:9159: \"$ac_try\"") >&5
9160 (eval $ac_try) 2>&5
9161 ac_status=$?
9162 echo "$as_me:9162: \$? = $ac_status" >&5
9163 (exit "$ac_status"); }; }; then
9164
9165 test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
9166
9167 echo "${as_me:-configure}:9167: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
9168
9169 cf_cv_find_linkage_iconv=maybe
9170 cf_test_CPPFLAGS="$CPPFLAGS"
9171 break
9172 else
9173 echo "$as_me: failed program was:" >&5
9174 cat "conftest.$ac_ext" >&5
9175
9176 CPPFLAGS="$cf_save_CPPFLAGS"
9177
9178 fi
9179 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9180 fi
9181 done
9182
9183 if test "$cf_cv_find_linkage_iconv" = maybe ; then
9184
9185 echo "${as_me:-configure}:9185: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
9186
9187 cf_save_LIBS="$LIBS"
9188 cf_save_LDFLAGS="$LDFLAGS"
9189
9190 if test "$cf_cv_find_linkage_iconv" != yes ; then
9191
9192 cf_search=
9193 cf_library_path_list=""
9194 if test -n "${LDFLAGS}${LIBS}" ; then
9195 for cf_library_path in $LDFLAGS $LIBS
9196 do
9197 case "$cf_library_path" in
9198 (-L*)
9199 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9200
9201 test "x$cf_library_path" != "xNONE" && \
9202 test -d "$cf_library_path" && \
9203 {
9204 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9205 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9206 test -d "$cf_library_path/lib/iconv" && cf_search="$cf_search $cf_library_path/lib/iconv"
9207 test -d "$cf_library_path/lib/iconv/lib" && cf_search="$cf_search $cf_library_path/lib/iconv/lib"
9208 test -d "$cf_library_path/iconv/lib" && cf_search="$cf_search $cf_library_path/iconv/lib"
9209 test -d "$cf_library_path/iconv/lib/iconv" && cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
9210 }
9211
9212 cf_library_path_list="$cf_library_path_list $cf_search"
9213 ;;
9214 esac
9215 done
9216 fi
9217
9218 cf_search=
9219
9220 test "x$prefix" != "xNONE" && \
9221 test -d "$prefix" && \
9222 {
9223 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9224 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9225 test -d "$prefix/lib/iconv" && cf_search="$cf_search $prefix/lib/iconv"
9226 test -d "$prefix/lib/iconv/lib" && cf_search="$cf_search $prefix/lib/iconv/lib"
9227 test -d "$prefix/iconv/lib" && cf_search="$cf_search $prefix/iconv/lib"
9228 test -d "$prefix/iconv/lib/iconv" && cf_search="$cf_search $prefix/iconv/lib/iconv"
9229 }
9230
9231 for cf_subdir_prefix in \
9232 /usr \
9233 /usr/local \
9234 /usr/pkg \
9235 /opt \
9236 /opt/local \
9237 $HOME
9238 do
9239
9240 test "x$cf_subdir_prefix" != "x$prefix" && \
9241 test -d "$cf_subdir_prefix" && \
9242 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9243 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9244 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9245 test -d "$cf_subdir_prefix/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
9246 test -d "$cf_subdir_prefix/lib/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
9247 test -d "$cf_subdir_prefix/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
9248 test -d "$cf_subdir_prefix/iconv/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
9249 }
9250
9251 done
9252
9253 cf_search="$cf_library_path_list $cf_search"
9254
9255 for cf_cv_library_path_iconv in $cf_search
9256 do
9257 if test -d "$cf_cv_library_path_iconv" ; then
9258 test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
9259
9260 echo "${as_me:-configure}:9260: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
9261
9262 CPPFLAGS="$cf_test_CPPFLAGS"
9263 LIBS="-liconv $cf_save_LIBS"
9264 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
9265 cat >"conftest.$ac_ext" <<_ACEOF
9266 #line 9266 "configure"
9267 #include "confdefs.h"
9268
9269 #include <stdlib.h>
9270 #include <iconv.h>
9271
9272 int
9273 main (void)
9274 {
9275
9276 iconv_t cd = iconv_open("","");
9277 iconv(cd,NULL,NULL,NULL,NULL);
9278 iconv_close(cd);
9279
9280 ;
9281 return 0;
9282 }
9283 _ACEOF
9284 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9285 if { (eval echo "$as_me:9285: \"$ac_link\"") >&5
9286 (eval $ac_link) 2>&5
9287 ac_status=$?
9288 echo "$as_me:9288: \$? = $ac_status" >&5
9289 (exit "$ac_status"); } &&
9290 { ac_try='test -s "conftest$ac_exeext"'
9291 { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9292 (eval $ac_try) 2>&5
9293 ac_status=$?
9294 echo "$as_me:9294: \$? = $ac_status" >&5
9295 (exit "$ac_status"); }; }; then
9296
9297 test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
9298
9299 echo "${as_me:-configure}:9299: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
9300
9301 cf_cv_find_linkage_iconv=yes
9302 cf_cv_library_file_iconv="-liconv"
9303 break
9304 else
9305 echo "$as_me: failed program was:" >&5
9306 cat "conftest.$ac_ext" >&5
9307
9308 CPPFLAGS="$cf_save_CPPFLAGS"
9309 LIBS="$cf_save_LIBS"
9310 LDFLAGS="$cf_save_LDFLAGS"
9311
9312 fi
9313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9314 fi
9315 done
9316 CPPFLAGS="$cf_save_CPPFLAGS"
9317 LDFLAGS="$cf_save_LDFLAGS"
9318 fi
9319
9320 else
9321 cf_cv_find_linkage_iconv=no
9322 fi
9323
9324 fi
9325 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9326
9327 fi
9328 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9329
9330 LIBS="$cf_save_LIBS"
9331
9332 if test "$cf_cv_find_linkage_iconv" = yes ; then
9333 am_cv_func_iconv=yes
9334 else
9335 am_cv_func_iconv="no, consider installing GNU libiconv"
9336 fi
9337
9338 fi
9339 echo "$as_me:9339: result: $am_cv_func_iconv" >&5
9340 echo "${ECHO_T}$am_cv_func_iconv" >&6
9341
9342 if test "$am_cv_func_iconv" = yes; then
9343
9344 cat >>confdefs.h <<\EOF
9345 #define HAVE_ICONV 1
9346 EOF
9347
9348 echo "$as_me:9348: checking if the declaration of iconv() needs const." >&5
9349 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
9350 if test "${am_cv_proto_iconv_const+set}" = set; then
9351 echo $ECHO_N "(cached) $ECHO_C" >&6
9352 else
9353
9354 cat >"conftest.$ac_ext" <<_ACEOF
9355 #line 9355 "configure"
9356 #include "confdefs.h"
9357
9358 #include <stdlib.h>
9359 #include <iconv.h>
9360
9361 extern
9362 #ifdef __cplusplus
9363 "C"
9364 #endif
9365 #if defined(__STDC__) || defined(__cplusplus)
9366 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9367 #else
9368 size_t iconv();
9369 #endif
9370
9371 int
9372 main (void)
9373 {
9374
9375 ;
9376 return 0;
9377 }
9378 _ACEOF
9379 rm -f "conftest.$ac_objext"
9380 if { (eval echo "$as_me:9380: \"$ac_compile\"") >&5
9381 (eval $ac_compile) 2>&5
9382 ac_status=$?
9383 echo "$as_me:9383: \$? = $ac_status" >&5
9384 (exit "$ac_status"); } &&
9385 { ac_try='test -s "conftest.$ac_objext"'
9386 { (eval echo "$as_me:9386: \"$ac_try\"") >&5
9387 (eval $ac_try) 2>&5
9388 ac_status=$?
9389 echo "$as_me:9389: \$? = $ac_status" >&5
9390 (exit "$ac_status"); }; }; then
9391 am_cv_proto_iconv_const=no
9392 else
9393 echo "$as_me: failed program was:" >&5
9394 cat "conftest.$ac_ext" >&5
9395 am_cv_proto_iconv_const=yes
9396 fi
9397 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9398 fi
9399 echo "$as_me:9399: result: $am_cv_proto_iconv_const" >&5
9400 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
9401
9402 if test "$am_cv_proto_iconv_const" = yes ; then
9403 am_cv_proto_iconv_arg1="const"
9404 else
9405 am_cv_proto_iconv_arg1="/* nothing */"
9406 fi
9407
9408 cat >>confdefs.h <<EOF
9409 #define ICONV_CONST $am_cv_proto_iconv_arg1
9410 EOF
9411
9412 fi
9413
9414 LIBICONV=
9415 if test "$cf_cv_find_linkage_iconv" = yes; then
9416
9417 if test -n "$cf_cv_header_path_iconv" ; then
9418 for cf_add_incdir in $cf_cv_header_path_iconv
9419 do
9420 while test "$cf_add_incdir" != /usr/include
9421 do
9422 if test -d "$cf_add_incdir"
9423 then
9424 cf_have_incdir=no
9425 if test -n "$CFLAGS$CPPFLAGS" ; then
9426 # a loop is needed to ensure we can add subdirs of existing dirs
9427 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9428 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9429 cf_have_incdir=yes; break
9430 fi
9431 done
9432 fi
9433
9434 if test "$cf_have_incdir" = no ; then
9435 if test "$cf_add_incdir" = /usr/local/include ; then
9436 if test "$GCC" = yes
9437 then
9438 cf_save_CPPFLAGS=$CPPFLAGS
9439
9440 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9441 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9442
9443 cat >"conftest.$ac_ext" <<_ACEOF
9444 #line 9444 "configure"
9445 #include "confdefs.h"
9446 #include <stdio.h>
9447 int
9448 main (void)
9449 {
9450 printf("Hello")
9451 ;
9452 return 0;
9453 }
9454 _ACEOF
9455 rm -f "conftest.$ac_objext"
9456 if { (eval echo "$as_me:9456: \"$ac_compile\"") >&5
9457 (eval $ac_compile) 2>&5
9458 ac_status=$?
9459 echo "$as_me:9459: \$? = $ac_status" >&5
9460 (exit "$ac_status"); } &&
9461 { ac_try='test -s "conftest.$ac_objext"'
9462 { (eval echo "$as_me:9462: \"$ac_try\"") >&5
9463 (eval $ac_try) 2>&5
9464 ac_status=$?
9465 echo "$as_me:9465: \$? = $ac_status" >&5
9466 (exit "$ac_status"); }; }; then
9467 :
9468 else
9469 echo "$as_me: failed program was:" >&5
9470 cat "conftest.$ac_ext" >&5
9471 cf_have_incdir=yes
9472 fi
9473 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9474 CPPFLAGS=$cf_save_CPPFLAGS
9475 fi
9476 fi
9477 fi
9478
9479 if test "$cf_have_incdir" = no ; then
9480 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9481
9482 echo "${as_me:-configure}:9482: testing adding $cf_add_incdir to include-path ..." 1>&5
9483
9484 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9485
9486 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9487 test "$cf_top_incdir" = "$cf_add_incdir" && break
9488 cf_add_incdir="$cf_top_incdir"
9489 else
9490 break
9491 fi
9492 else
9493 break
9494 fi
9495 done
9496 done
9497 fi
9498
9499 if test -n "$cf_cv_library_file_iconv" ; then
9500 LIBICONV="-liconv"
9501
9502 if test -n "$cf_cv_library_path_iconv" ; then
9503 for cf_add_libdir in $cf_cv_library_path_iconv
9504 do
9505 if test "$cf_add_libdir" = /usr/lib ; then
9506 :
9507 elif test -d "$cf_add_libdir"
9508 then
9509 cf_have_libdir=no
9510 if test -n "$LDFLAGS$LIBS" ; then
9511 # a loop is needed to ensure we can add subdirs of existing dirs
9512 for cf_test_libdir in $LDFLAGS $LIBS ; do
9513 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9514 cf_have_libdir=yes; break
9515 fi
9516 done
9517 fi
9518 if test "$cf_have_libdir" = no ; then
9519 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9520
9521 echo "${as_me:-configure}:9521: testing adding $cf_add_libdir to library-path ..." 1>&5
9522
9523 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9524 fi
9525 fi
9526 done
9527 fi
9528
9529 fi
9530 fi
9531
9532 echo "$as_me:9532: checking for nl_langinfo and CODESET" >&5
9533 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9534 if test "${am_cv_langinfo_codeset+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
9541 $ac_includes_default
9542 #include <langinfo.h>
9543 int
9544 main (void)
9545 {
9546 char* cs = nl_langinfo(CODESET); (void)cs
9547 ;
9548 return 0;
9549 }
9550 _ACEOF
9551 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9552 if { (eval echo "$as_me:9552: \"$ac_link\"") >&5
9553 (eval $ac_link) 2>&5
9554 ac_status=$?
9555 echo "$as_me:9555: \$? = $ac_status" >&5
9556 (exit "$ac_status"); } &&
9557 { ac_try='test -s "conftest$ac_exeext"'
9558 { (eval echo "$as_me:9558: \"$ac_try\"") >&5
9559 (eval $ac_try) 2>&5
9560 ac_status=$?
9561 echo "$as_me:9561: \$? = $ac_status" >&5
9562 (exit "$ac_status"); }; }; then
9563 am_cv_langinfo_codeset=yes
9564 else
9565 echo "$as_me: failed program was:" >&5
9566 cat "conftest.$ac_ext" >&5
9567 am_cv_langinfo_codeset=no
9568 fi
9569 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9570
9571 fi
9572 echo "$as_me:9572: result: $am_cv_langinfo_codeset" >&5
9573 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9574 if test "$am_cv_langinfo_codeset" = yes; then
9575
9576 cat >>confdefs.h <<\EOF
9577 #define HAVE_LANGINFO_CODESET 1
9578 EOF
9579
9580 fi
9581
9582 if test "$ac_cv_header_locale_h" = yes; then
9583 echo "$as_me:9583: checking for LC_MESSAGES" >&5
9584 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
9585 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9586 echo $ECHO_N "(cached) $ECHO_C" >&6
9587 else
9588 cat >"conftest.$ac_ext" <<_ACEOF
9589 #line 9589 "configure"
9590 #include "confdefs.h"
9591 #include <locale.h>
9592 int
9593 main (void)
9594 {
9595 return LC_MESSAGES
9596 ;
9597 return 0;
9598 }
9599 _ACEOF
9600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9601 if { (eval echo "$as_me:9601: \"$ac_link\"") >&5
9602 (eval $ac_link) 2>&5
9603 ac_status=$?
9604 echo "$as_me:9604: \$? = $ac_status" >&5
9605 (exit "$ac_status"); } &&
9606 { ac_try='test -s "conftest$ac_exeext"'
9607 { (eval echo "$as_me:9607: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:9610: \$? = $ac_status" >&5
9611 (exit "$ac_status"); }; }; then
9612 am_cv_val_LC_MESSAGES=yes
9613 else
9614 echo "$as_me: failed program was:" >&5
9615 cat "conftest.$ac_ext" >&5
9616 am_cv_val_LC_MESSAGES=no
9617 fi
9618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9619 fi
9620 echo "$as_me:9620: result: $am_cv_val_LC_MESSAGES" >&5
9621 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
9622 if test "$am_cv_val_LC_MESSAGES" = yes; then
9623
9624 cat >>confdefs.h <<\EOF
9625 #define HAVE_LC_MESSAGES 1
9626 EOF
9627
9628 fi
9629 fi
9630 echo "$as_me:9630: checking whether NLS is requested" >&5
9631 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
9632
9633 # Check whether --enable-nls or --disable-nls was given.
9634 if test "${enable_nls+set}" = set; then
9635 enableval="$enable_nls"
9636 USE_NLS=$enableval
9637 else
9638 USE_NLS=no
9639 fi;
9640 echo "$as_me:9640: result: $USE_NLS" >&5
9641 echo "${ECHO_T}$USE_NLS" >&6
9642
9643 if test "$USE_NLS" = "yes"; then
9644
9645 # Extract the first word of "msgfmt", so it can be a program name with args.
9646
9647 set dummy msgfmt; ac_word=$2
9648 echo "$as_me:9648: checking for $ac_word" >&5
9649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9650 if test "${ac_cv_path_MSGFMT+set}" = set; then
9651 echo $ECHO_N "(cached) $ECHO_C" >&6
9652 else
9653 case "$MSGFMT" in
9654 ([\\/]*|?:[\\/]*)
9655 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
9656 ;;
9657 (*)
9658 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9659 for ac_dir in $PATH; do
9660 test -z "$ac_dir" && ac_dir=.
9661 if test -f "$ac_dir/$ac_word$ac_exeext" ; then
9662 if "$ac_dir/$ac_word" --statistics /dev/null >/dev/null 2>&1; then
9663 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
9664 break
9665 fi
9666 fi
9667 done
9668 IFS="$ac_save_ifs"
9669 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
9670 ;;
9671 esac
9672 fi
9673 MSGFMT="$ac_cv_path_MSGFMT"
9674 if test "$MSGFMT" != ":"; then
9675 echo "$as_me:9675: result: $MSGFMT" >&5
9676 echo "${ECHO_T}$MSGFMT" >&6
9677 else
9678 echo "$as_me:9678: result: no" >&5
9679 echo "${ECHO_T}no" >&6
9680 fi
9681
9682 # Extract the first word of "gmsgfmt", so it can be a program name with args.
9683 set dummy gmsgfmt; ac_word=$2
9684 echo "$as_me:9684: checking for $ac_word" >&5
9685 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9686 if test "${ac_cv_path_GMSGFMT+set}" = set; then
9687 echo $ECHO_N "(cached) $ECHO_C" >&6
9688 else
9689 case $GMSGFMT in
9690 [\\/]* | ?:[\\/]*)
9691 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
9692 ;;
9693 *)
9694 ac_save_IFS=$IFS; IFS=$ac_path_separator
9695 ac_dummy="$PATH"
9696 for ac_dir in $ac_dummy; do
9697 IFS=$ac_save_IFS
9698 test -z "$ac_dir" && ac_dir=.
9699 if $as_executable_p "$ac_dir/$ac_word"; then
9700 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
9701 echo "$as_me:9701: found $ac_dir/$ac_word" >&5
9702 break
9703 fi
9704 done
9705
9706 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
9707 ;;
9708 esac
9709 fi
9710 GMSGFMT=$ac_cv_path_GMSGFMT
9711
9712 if test -n "$GMSGFMT"; then
9713 echo "$as_me:9713: result: $GMSGFMT" >&5
9714 echo "${ECHO_T}$GMSGFMT" >&6
9715 else
9716 echo "$as_me:9716: result: no" >&5
9717 echo "${ECHO_T}no" >&6
9718 fi
9719
9720 # Extract the first word of "xgettext", so it can be a program name with args.
9721
9722 set dummy xgettext; ac_word=$2
9723 echo "$as_me:9723: checking for $ac_word" >&5
9724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9725 if test "${ac_cv_path_XGETTEXT+set}" = set; then
9726 echo $ECHO_N "(cached) $ECHO_C" >&6
9727 else
9728 case "$XGETTEXT" in
9729 ([\\/]*|?:[\\/]*)
9730 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
9731 ;;
9732 (*)
9733 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9734 for ac_dir in $PATH; do
9735 test -z "$ac_dir" && ac_dir=.
9736 if test -f "$ac_dir/$ac_word$ac_exeext" ; then
9737 if "$ac_dir/$ac_word" --omit-header /dev/null >/dev/null 2>&1; then
9738 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
9739 break
9740 fi
9741 fi
9742 done
9743 IFS="$ac_save_ifs"
9744 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
9745 ;;
9746 esac
9747 fi
9748 XGETTEXT="$ac_cv_path_XGETTEXT"
9749 if test "$XGETTEXT" != ":"; then
9750 echo "$as_me:9750: result: $XGETTEXT" >&5
9751 echo "${ECHO_T}$XGETTEXT" >&6
9752 else
9753 echo "$as_me:9753: result: no" >&5
9754 echo "${ECHO_T}no" >&6
9755 fi
9756
9757 CATOBJEXT=NONE
9758
9759 cf_save_msgfmt_path="$MSGFMT"
9760 cf_save_xgettext_path="$XGETTEXT"
9761
9762 cf_add_libs="$LIBS"
9763 # reverse order
9764 cf_add_0lib=
9765 for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9766 # filter duplicates
9767 for cf_add_1lib in $cf_add_0lib; do
9768 for cf_add_2lib in $cf_add_libs; do
9769 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9770 cf_add_1lib=
9771 break
9772 fi
9773 done
9774 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9775 done
9776 LIBS="$cf_add_libs"
9777
9778 cf_save_LIBS_1="$LIBS"
9779 cf_save_OPTS_1="$CPPFLAGS"
9780
9781 # Check whether --with-libintl-prefix or --without-libintl-prefix was given.
9782 if test "${with_libintl_prefix+set}" = set; then
9783 withval="$with_libintl_prefix"
9784
9785 case "x$withval" in
9786 (xno|xyes|x)
9787 ;;
9788 (*)
9789
9790 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
9791 if test -d "$cf_searchpath/include" ; then
9792
9793 if test -n "$cf_searchpath/include" ; then
9794 for cf_add_incdir in $cf_searchpath/include
9795 do
9796 while test "$cf_add_incdir" != /usr/include
9797 do
9798 if test -d "$cf_add_incdir"
9799 then
9800 cf_have_incdir=no
9801 if test -n "$CFLAGS$CPPFLAGS" ; then
9802 # a loop is needed to ensure we can add subdirs of existing dirs
9803 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9804 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9805 cf_have_incdir=yes; break
9806 fi
9807 done
9808 fi
9809
9810 if test "$cf_have_incdir" = no ; then
9811 if test "$cf_add_incdir" = /usr/local/include ; then
9812 if test "$GCC" = yes
9813 then
9814 cf_save_CPPFLAGS=$CPPFLAGS
9815
9816 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9817 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9818
9819 cat >"conftest.$ac_ext" <<_ACEOF
9820 #line 9820 "configure"
9821 #include "confdefs.h"
9822 #include <stdio.h>
9823 int
9824 main (void)
9825 {
9826 printf("Hello")
9827 ;
9828 return 0;
9829 }
9830 _ACEOF
9831 rm -f "conftest.$ac_objext"
9832 if { (eval echo "$as_me:9832: \"$ac_compile\"") >&5
9833 (eval $ac_compile) 2>&5
9834 ac_status=$?
9835 echo "$as_me:9835: \$? = $ac_status" >&5
9836 (exit "$ac_status"); } &&
9837 { ac_try='test -s "conftest.$ac_objext"'
9838 { (eval echo "$as_me:9838: \"$ac_try\"") >&5
9839 (eval $ac_try) 2>&5
9840 ac_status=$?
9841 echo "$as_me:9841: \$? = $ac_status" >&5
9842 (exit "$ac_status"); }; }; then
9843 :
9844 else
9845 echo "$as_me: failed program was:" >&5
9846 cat "conftest.$ac_ext" >&5
9847 cf_have_incdir=yes
9848 fi
9849 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9850 CPPFLAGS=$cf_save_CPPFLAGS
9851 fi
9852 fi
9853 fi
9854
9855 if test "$cf_have_incdir" = no ; then
9856 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9857
9858 echo "${as_me:-configure}:9858: testing adding $cf_add_incdir to include-path ..." 1>&5
9859
9860 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9861
9862 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9863 test "$cf_top_incdir" = "$cf_add_incdir" && break
9864 cf_add_incdir="$cf_top_incdir"
9865 else
9866 break
9867 fi
9868 else
9869 break
9870 fi
9871 done
9872 done
9873 fi
9874
9875 elif test -d "$cf_searchpath/../include" ; then
9876
9877 if test -n "$cf_searchpath/../include" ; then
9878 for cf_add_incdir in $cf_searchpath/../include
9879 do
9880 while test "$cf_add_incdir" != /usr/include
9881 do
9882 if test -d "$cf_add_incdir"
9883 then
9884 cf_have_incdir=no
9885 if test -n "$CFLAGS$CPPFLAGS" ; then
9886 # a loop is needed to ensure we can add subdirs of existing dirs
9887 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9888 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9889 cf_have_incdir=yes; break
9890 fi
9891 done
9892 fi
9893
9894 if test "$cf_have_incdir" = no ; then
9895 if test "$cf_add_incdir" = /usr/local/include ; then
9896 if test "$GCC" = yes
9897 then
9898 cf_save_CPPFLAGS=$CPPFLAGS
9899
9900 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9901 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9902
9903 cat >"conftest.$ac_ext" <<_ACEOF
9904 #line 9904 "configure"
9905 #include "confdefs.h"
9906 #include <stdio.h>
9907 int
9908 main (void)
9909 {
9910 printf("Hello")
9911 ;
9912 return 0;
9913 }
9914 _ACEOF
9915 rm -f "conftest.$ac_objext"
9916 if { (eval echo "$as_me:9916: \"$ac_compile\"") >&5
9917 (eval $ac_compile) 2>&5
9918 ac_status=$?
9919 echo "$as_me:9919: \$? = $ac_status" >&5
9920 (exit "$ac_status"); } &&
9921 { ac_try='test -s "conftest.$ac_objext"'
9922 { (eval echo "$as_me:9922: \"$ac_try\"") >&5
9923 (eval $ac_try) 2>&5
9924 ac_status=$?
9925 echo "$as_me:9925: \$? = $ac_status" >&5
9926 (exit "$ac_status"); }; }; then
9927 :
9928 else
9929 echo "$as_me: failed program was:" >&5
9930 cat "conftest.$ac_ext" >&5
9931 cf_have_incdir=yes
9932 fi
9933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9934 CPPFLAGS=$cf_save_CPPFLAGS
9935 fi
9936 fi
9937 fi
9938
9939 if test "$cf_have_incdir" = no ; then
9940 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9941
9942 echo "${as_me:-configure}:9942: testing adding $cf_add_incdir to include-path ..." 1>&5
9943
9944 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9945
9946 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9947 test "$cf_top_incdir" = "$cf_add_incdir" && break
9948 cf_add_incdir="$cf_top_incdir"
9949 else
9950 break
9951 fi
9952 else
9953 break
9954 fi
9955 done
9956 done
9957 fi
9958
9959 else
9960 { { echo "$as_me:9960: error: cannot find libintl under $withval" >&5
9961 echo "$as_me: error: cannot find libintl under $withval" >&2;}
9962 { (exit 1); exit 1; }; }
9963 fi
9964 if test -d "$cf_searchpath/lib" ; then
9965
9966 if test -n "$cf_searchpath/lib" ; then
9967 for cf_add_libdir in $cf_searchpath/lib
9968 do
9969 if test "$cf_add_libdir" = /usr/lib ; then
9970 :
9971 elif test -d "$cf_add_libdir"
9972 then
9973 cf_have_libdir=no
9974 if test -n "$LDFLAGS$LIBS" ; then
9975 # a loop is needed to ensure we can add subdirs of existing dirs
9976 for cf_test_libdir in $LDFLAGS $LIBS ; do
9977 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9978 cf_have_libdir=yes; break
9979 fi
9980 done
9981 fi
9982 if test "$cf_have_libdir" = no ; then
9983 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9984
9985 echo "${as_me:-configure}:9985: testing adding $cf_add_libdir to library-path ..." 1>&5
9986
9987 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9988 fi
9989 fi
9990 done
9991 fi
9992
9993 elif test -d "$cf_searchpath" ; then
9994
9995 if test -n "$cf_searchpath" ; then
9996 for cf_add_libdir in $cf_searchpath
9997 do
9998 if test "$cf_add_libdir" = /usr/lib ; then
9999 :
10000 elif test -d "$cf_add_libdir"
10001 then
10002 cf_have_libdir=no
10003 if test -n "$LDFLAGS$LIBS" ; then
10004 # a loop is needed to ensure we can add subdirs of existing dirs
10005 for cf_test_libdir in $LDFLAGS $LIBS ; do
10006 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10007 cf_have_libdir=yes; break
10008 fi
10009 done
10010 fi
10011 if test "$cf_have_libdir" = no ; then
10012 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
10013
10014 echo "${as_me:-configure}:10014: testing adding $cf_add_libdir to library-path ..." 1>&5
10015
10016 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10017 fi
10018 fi
10019 done
10020 fi
10021
10022 else
10023 { { echo "$as_me:10023: error: cannot find libintl under $withval" >&5
10024 echo "$as_me: error: cannot find libintl under $withval" >&2;}
10025 { (exit 1); exit 1; }; }
10026 fi
10027 done
10028
10029 test -n "$verbose" && echo " setting path value for libintl to $withval" 1>&6
10030
10031 echo "${as_me:-configure}:10031: testing setting path value for libintl to $withval ..." 1>&5
10032
10033 ;;
10034 esac
10035
10036 fi;
10037
10038 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10039 # will be set on completion of the AC_LINK_IFELSE below.
10040 cf_cv_header_path_intl=
10041 cf_cv_library_path_intl=
10042
10043 echo "${as_me:-configure}:10043: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
10044
10045 cf_save_LIBS="$LIBS"
10046
10047 cat >"conftest.$ac_ext" <<_ACEOF
10048 #line 10048 "configure"
10049 #include "confdefs.h"
10050
10051 #include <libintl.h>
10052 extern int _nl_msg_cat_cntr;
10053
10054 int
10055 main (void)
10056 {
10057
10058 bindtextdomain ("", "");
10059 return (gettext ("") != 0)
10060
10061 #ifdef USE_MSGFMT_HACK
10062 + _nl_msg_cat_cntr
10063 #endif
10064
10065 ;
10066 return 0;
10067 }
10068 _ACEOF
10069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10070 if { (eval echo "$as_me:10070: \"$ac_link\"") >&5
10071 (eval $ac_link) 2>&5
10072 ac_status=$?
10073 echo "$as_me:10073: \$? = $ac_status" >&5
10074 (exit "$ac_status"); } &&
10075 { ac_try='test -s "conftest$ac_exeext"'
10076 { (eval echo "$as_me:10076: \"$ac_try\"") >&5
10077 (eval $ac_try) 2>&5
10078 ac_status=$?
10079 echo "$as_me:10079: \$? = $ac_status" >&5
10080 (exit "$ac_status"); }; }; then
10081
10082 cf_cv_find_linkage_intl=yes
10083 cf_cv_header_path_intl=/usr/include
10084 cf_cv_library_path_intl=/usr/lib
10085
10086 else
10087 echo "$as_me: failed program was:" >&5
10088 cat "conftest.$ac_ext" >&5
10089
10090 LIBS="-lintl $cf_save_LIBS"
10091
10092 cat >"conftest.$ac_ext" <<_ACEOF
10093 #line 10093 "configure"
10094 #include "confdefs.h"
10095
10096 #include <libintl.h>
10097 extern int _nl_msg_cat_cntr;
10098
10099 int
10100 main (void)
10101 {
10102
10103 bindtextdomain ("", "");
10104 return (gettext ("") != 0)
10105
10106 #ifdef USE_MSGFMT_HACK
10107 + _nl_msg_cat_cntr
10108 #endif
10109
10110 ;
10111 return 0;
10112 }
10113 _ACEOF
10114 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10115 if { (eval echo "$as_me:10115: \"$ac_link\"") >&5
10116 (eval $ac_link) 2>&5
10117 ac_status=$?
10118 echo "$as_me:10118: \$? = $ac_status" >&5
10119 (exit "$ac_status"); } &&
10120 { ac_try='test -s "conftest$ac_exeext"'
10121 { (eval echo "$as_me:10121: \"$ac_try\"") >&5
10122 (eval $ac_try) 2>&5
10123 ac_status=$?
10124 echo "$as_me:10124: \$? = $ac_status" >&5
10125 (exit "$ac_status"); }; }; then
10126
10127 cf_cv_find_linkage_intl=yes
10128 cf_cv_header_path_intl=/usr/include
10129 cf_cv_library_path_intl=/usr/lib
10130 cf_cv_library_file_intl="-lintl"
10131
10132 else
10133 echo "$as_me: failed program was:" >&5
10134 cat "conftest.$ac_ext" >&5
10135
10136 cf_cv_find_linkage_intl=no
10137 LIBS="$cf_save_LIBS"
10138
10139 test -n "$verbose" && echo " find linkage for intl library" 1>&6
10140
10141 echo "${as_me:-configure}:10141: testing find linkage for intl library ..." 1>&5
10142
10143 echo "${as_me:-configure}:10143: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
10144
10145 cf_save_CPPFLAGS="$CPPFLAGS"
10146 cf_test_CPPFLAGS="$CPPFLAGS"
10147
10148 cf_search=
10149
10150 # collect the current set of include-directories from compiler flags
10151 cf_header_path_list=""
10152 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10153 for cf_header_path in $CPPFLAGS $CFLAGS
10154 do
10155 case "$cf_header_path" in
10156 (-I*)
10157 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10158
10159 test "x$cf_header_path" != "xNONE" && \
10160 test -d "$cf_header_path" && \
10161 {
10162 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10163 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10164 test -d "$cf_header_path/include/intl" && cf_search="$cf_search $cf_header_path/include/intl"
10165 test -d "$cf_header_path/include/intl/include" && cf_search="$cf_search $cf_header_path/include/intl/include"
10166 test -d "$cf_header_path/intl/include" && cf_search="$cf_search $cf_header_path/intl/include"
10167 test -d "$cf_header_path/intl/include/intl" && cf_search="$cf_search $cf_header_path/intl/include/intl"
10168 }
10169
10170 cf_header_path_list="$cf_header_path_list $cf_search"
10171 ;;
10172 esac
10173 done
10174 fi
10175
10176 # add the variations for the package we are looking for
10177
10178 cf_search=
10179
10180 test "x$prefix" != "xNONE" && \
10181 test -d "$prefix" && \
10182 {
10183 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10184 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10185 test -d "$prefix/include/intl" && cf_search="$cf_search $prefix/include/intl"
10186 test -d "$prefix/include/intl/include" && cf_search="$cf_search $prefix/include/intl/include"
10187 test -d "$prefix/intl/include" && cf_search="$cf_search $prefix/intl/include"
10188 test -d "$prefix/intl/include/intl" && cf_search="$cf_search $prefix/intl/include/intl"
10189 }
10190
10191 for cf_subdir_prefix in \
10192 /usr \
10193 /usr/local \
10194 /usr/pkg \
10195 /opt \
10196 /opt/local \
10197 $HOME
10198 do
10199
10200 test "x$cf_subdir_prefix" != "x$prefix" && \
10201 test -d "$cf_subdir_prefix" && \
10202 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10203 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10204 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10205 test -d "$cf_subdir_prefix/include/intl" && cf_search="$cf_search $cf_subdir_prefix/include/intl"
10206 test -d "$cf_subdir_prefix/include/intl/include" && cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
10207 test -d "$cf_subdir_prefix/intl/include" && cf_search="$cf_search $cf_subdir_prefix/intl/include"
10208 test -d "$cf_subdir_prefix/intl/include/intl" && cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
10209 }
10210
10211 done
10212
10213 test "$includedir" != NONE && \
10214 test "$includedir" != "/usr/include" && \
10215 test -d "$includedir" && {
10216 test -d "$includedir" && cf_search="$cf_search $includedir"
10217 test -d "$includedir/intl" && cf_search="$cf_search $includedir/intl"
10218 }
10219
10220 test "$oldincludedir" != NONE && \
10221 test "$oldincludedir" != "/usr/include" && \
10222 test -d "$oldincludedir" && {
10223 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10224 test -d "$oldincludedir/intl" && cf_search="$cf_search $oldincludedir/intl"
10225 }
10226
10227 cf_search="$cf_search $cf_header_path_list"
10228
10229 for cf_cv_header_path_intl in $cf_search
10230 do
10231 if test -d "$cf_cv_header_path_intl" ; then
10232 test -n "$verbose" && echo " ... testing $cf_cv_header_path_intl" 1>&6
10233
10234 echo "${as_me:-configure}:10234: testing ... testing $cf_cv_header_path_intl ..." 1>&5
10235
10236 CPPFLAGS="$cf_save_CPPFLAGS"
10237
10238 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10239 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
10240
10241 cat >"conftest.$ac_ext" <<_ACEOF
10242 #line 10242 "configure"
10243 #include "confdefs.h"
10244
10245 #include <libintl.h>
10246 extern int _nl_msg_cat_cntr;
10247
10248 int
10249 main (void)
10250 {
10251
10252 bindtextdomain ("", "");
10253 return (gettext ("") != 0)
10254
10255 #ifdef USE_MSGFMT_HACK
10256 + _nl_msg_cat_cntr
10257 #endif
10258
10259 ;
10260 return 0;
10261 }
10262 _ACEOF
10263 rm -f "conftest.$ac_objext"
10264 if { (eval echo "$as_me:10264: \"$ac_compile\"") >&5
10265 (eval $ac_compile) 2>&5
10266 ac_status=$?
10267 echo "$as_me:10267: \$? = $ac_status" >&5
10268 (exit "$ac_status"); } &&
10269 { ac_try='test -s "conftest.$ac_objext"'
10270 { (eval echo "$as_me:10270: \"$ac_try\"") >&5
10271 (eval $ac_try) 2>&5
10272 ac_status=$?
10273 echo "$as_me:10273: \$? = $ac_status" >&5
10274 (exit "$ac_status"); }; }; then
10275
10276 test -n "$verbose" && echo " ... found intl headers in $cf_cv_header_path_intl" 1>&6
10277
10278 echo "${as_me:-configure}:10278: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
10279
10280 cf_cv_find_linkage_intl=maybe
10281 cf_test_CPPFLAGS="$CPPFLAGS"
10282 break
10283 else
10284 echo "$as_me: failed program was:" >&5
10285 cat "conftest.$ac_ext" >&5
10286
10287 CPPFLAGS="$cf_save_CPPFLAGS"
10288
10289 fi
10290 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10291 fi
10292 done
10293
10294 if test "$cf_cv_find_linkage_intl" = maybe ; then
10295
10296 echo "${as_me:-configure}:10296: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
10297
10298 cf_save_LIBS="$LIBS"
10299 cf_save_LDFLAGS="$LDFLAGS"
10300
10301 if test "$cf_cv_find_linkage_intl" != yes ; then
10302
10303 cf_search=
10304 cf_library_path_list=""
10305 if test -n "${LDFLAGS}${LIBS}" ; then
10306 for cf_library_path in $LDFLAGS $LIBS
10307 do
10308 case "$cf_library_path" in
10309 (-L*)
10310 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10311
10312 test "x$cf_library_path" != "xNONE" && \
10313 test -d "$cf_library_path" && \
10314 {
10315 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10316 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10317 test -d "$cf_library_path/lib/intl" && cf_search="$cf_search $cf_library_path/lib/intl"
10318 test -d "$cf_library_path/lib/intl/lib" && cf_search="$cf_search $cf_library_path/lib/intl/lib"
10319 test -d "$cf_library_path/intl/lib" && cf_search="$cf_search $cf_library_path/intl/lib"
10320 test -d "$cf_library_path/intl/lib/intl" && cf_search="$cf_search $cf_library_path/intl/lib/intl"
10321 }
10322
10323 cf_library_path_list="$cf_library_path_list $cf_search"
10324 ;;
10325 esac
10326 done
10327 fi
10328
10329 cf_search=
10330
10331 test "x$prefix" != "xNONE" && \
10332 test -d "$prefix" && \
10333 {
10334 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10335 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10336 test -d "$prefix/lib/intl" && cf_search="$cf_search $prefix/lib/intl"
10337 test -d "$prefix/lib/intl/lib" && cf_search="$cf_search $prefix/lib/intl/lib"
10338 test -d "$prefix/intl/lib" && cf_search="$cf_search $prefix/intl/lib"
10339 test -d "$prefix/intl/lib/intl" && cf_search="$cf_search $prefix/intl/lib/intl"
10340 }
10341
10342 for cf_subdir_prefix in \
10343 /usr \
10344 /usr/local \
10345 /usr/pkg \
10346 /opt \
10347 /opt/local \
10348 $HOME
10349 do
10350
10351 test "x$cf_subdir_prefix" != "x$prefix" && \
10352 test -d "$cf_subdir_prefix" && \
10353 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10354 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10355 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10356 test -d "$cf_subdir_prefix/lib/intl" && cf_search="$cf_search $cf_subdir_prefix/lib/intl"
10357 test -d "$cf_subdir_prefix/lib/intl/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
10358 test -d "$cf_subdir_prefix/intl/lib" && cf_search="$cf_search $cf_subdir_prefix/intl/lib"
10359 test -d "$cf_subdir_prefix/intl/lib/intl" && cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
10360 }
10361
10362 done
10363
10364 cf_search="$cf_library_path_list $cf_search"
10365
10366 for cf_cv_library_path_intl in $cf_search
10367 do
10368 if test -d "$cf_cv_library_path_intl" ; then
10369 test -n "$verbose" && echo " ... testing $cf_cv_library_path_intl" 1>&6
10370
10371 echo "${as_me:-configure}:10371: testing ... testing $cf_cv_library_path_intl ..." 1>&5
10372
10373 CPPFLAGS="$cf_test_CPPFLAGS"
10374 LIBS="-lintl $cf_save_LIBS"
10375 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
10376 cat >"conftest.$ac_ext" <<_ACEOF
10377 #line 10377 "configure"
10378 #include "confdefs.h"
10379
10380 #include <libintl.h>
10381 extern int _nl_msg_cat_cntr;
10382
10383 int
10384 main (void)
10385 {
10386
10387 bindtextdomain ("", "");
10388 return (gettext ("") != 0)
10389
10390 #ifdef USE_MSGFMT_HACK
10391 + _nl_msg_cat_cntr
10392 #endif
10393
10394 ;
10395 return 0;
10396 }
10397 _ACEOF
10398 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10399 if { (eval echo "$as_me:10399: \"$ac_link\"") >&5
10400 (eval $ac_link) 2>&5
10401 ac_status=$?
10402 echo "$as_me:10402: \$? = $ac_status" >&5
10403 (exit "$ac_status"); } &&
10404 { ac_try='test -s "conftest$ac_exeext"'
10405 { (eval echo "$as_me:10405: \"$ac_try\"") >&5
10406 (eval $ac_try) 2>&5
10407 ac_status=$?
10408 echo "$as_me:10408: \$? = $ac_status" >&5
10409 (exit "$ac_status"); }; }; then
10410
10411 test -n "$verbose" && echo " ... found intl library in $cf_cv_library_path_intl" 1>&6
10412
10413 echo "${as_me:-configure}:10413: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
10414
10415 cf_cv_find_linkage_intl=yes
10416 cf_cv_library_file_intl="-lintl"
10417 break
10418 else
10419 echo "$as_me: failed program was:" >&5
10420 cat "conftest.$ac_ext" >&5
10421
10422 CPPFLAGS="$cf_save_CPPFLAGS"
10423 LIBS="$cf_save_LIBS"
10424 LDFLAGS="$cf_save_LDFLAGS"
10425
10426 fi
10427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10428 fi
10429 done
10430 CPPFLAGS="$cf_save_CPPFLAGS"
10431 LDFLAGS="$cf_save_LDFLAGS"
10432 fi
10433
10434 else
10435 cf_cv_find_linkage_intl=no
10436 fi
10437
10438 fi
10439 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10440
10441 fi
10442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10443
10444 LIBS="$cf_save_LIBS"
10445
10446 if test "$cf_cv_find_linkage_intl" = yes ; then
10447 cf_cv_func_gettext=yes
10448 else
10449 cf_cv_func_gettext=no
10450 fi
10451
10452 echo "$as_me:10452: checking for libintl.h and gettext()" >&5
10453 echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
10454 echo "$as_me:10454: result: $cf_cv_func_gettext" >&5
10455 echo "${ECHO_T}$cf_cv_func_gettext" >&6
10456
10457 if test "$cf_cv_func_gettext" = yes ; then
10458
10459 cat >>confdefs.h <<\EOF
10460 #define HAVE_LIBINTL_H 1
10461 EOF
10462
10463 cat >>confdefs.h <<\EOF
10464 #define HAVE_GETTEXT 1
10465 EOF
10466
10467 if test -n "$cf_cv_header_path_intl" ; then
10468 for cf_add_incdir in $cf_cv_header_path_intl
10469 do
10470 while test "$cf_add_incdir" != /usr/include
10471 do
10472 if test -d "$cf_add_incdir"
10473 then
10474 cf_have_incdir=no
10475 if test -n "$CFLAGS$CPPFLAGS" ; then
10476 # a loop is needed to ensure we can add subdirs of existing dirs
10477 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10478 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10479 cf_have_incdir=yes; break
10480 fi
10481 done
10482 fi
10483
10484 if test "$cf_have_incdir" = no ; then
10485 if test "$cf_add_incdir" = /usr/local/include ; then
10486 if test "$GCC" = yes
10487 then
10488 cf_save_CPPFLAGS=$CPPFLAGS
10489
10490 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10491 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10492
10493 cat >"conftest.$ac_ext" <<_ACEOF
10494 #line 10494 "configure"
10495 #include "confdefs.h"
10496 #include <stdio.h>
10497 int
10498 main (void)
10499 {
10500 printf("Hello")
10501 ;
10502 return 0;
10503 }
10504 _ACEOF
10505 rm -f "conftest.$ac_objext"
10506 if { (eval echo "$as_me:10506: \"$ac_compile\"") >&5
10507 (eval $ac_compile) 2>&5
10508 ac_status=$?
10509 echo "$as_me:10509: \$? = $ac_status" >&5
10510 (exit "$ac_status"); } &&
10511 { ac_try='test -s "conftest.$ac_objext"'
10512 { (eval echo "$as_me:10512: \"$ac_try\"") >&5
10513 (eval $ac_try) 2>&5
10514 ac_status=$?
10515 echo "$as_me:10515: \$? = $ac_status" >&5
10516 (exit "$ac_status"); }; }; then
10517 :
10518 else
10519 echo "$as_me: failed program was:" >&5
10520 cat "conftest.$ac_ext" >&5
10521 cf_have_incdir=yes
10522 fi
10523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10524 CPPFLAGS=$cf_save_CPPFLAGS
10525 fi
10526 fi
10527 fi
10528
10529 if test "$cf_have_incdir" = no ; then
10530 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10531
10532 echo "${as_me:-configure}:10532: testing adding $cf_add_incdir to include-path ..." 1>&5
10533
10534 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10535
10536 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10537 test "$cf_top_incdir" = "$cf_add_incdir" && break
10538 cf_add_incdir="$cf_top_incdir"
10539 else
10540 break
10541 fi
10542 else
10543 break
10544 fi
10545 done
10546 done
10547 fi
10548
10549 if test -n "$cf_cv_library_file_intl" ; then
10550 INTLLIBS="$cf_cv_library_file_intl"
10551
10552 if test -n "$cf_cv_library_path_intl" ; then
10553 for cf_add_libdir in $cf_cv_library_path_intl
10554 do
10555 if test "$cf_add_libdir" = /usr/lib ; then
10556 :
10557 elif test -d "$cf_add_libdir"
10558 then
10559 cf_have_libdir=no
10560 if test -n "$LDFLAGS$LIBS" ; then
10561 # a loop is needed to ensure we can add subdirs of existing dirs
10562 for cf_test_libdir in $LDFLAGS $LIBS ; do
10563 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10564 cf_have_libdir=yes; break
10565 fi
10566 done
10567 fi
10568 if test "$cf_have_libdir" = no ; then
10569 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
10570
10571 echo "${as_me:-configure}:10571: testing adding $cf_add_libdir to library-path ..." 1>&5
10572
10573 INTLLIBS="-L$cf_add_libdir $INTLLIBS"
10574 fi
10575 fi
10576 done
10577 fi
10578
10579 fi
10580
10581 echo "$as_me:10581: checking if this is GNU gettext" >&5
10582 echo $ECHO_N "checking if this is GNU gettext... $ECHO_C" >&6
10583 cat >"conftest.$ac_ext" <<_ACEOF
10584 #line 10584 "configure"
10585 #include "confdefs.h"
10586 #define USE_MSGFMT_HACK
10587
10588 #include <libintl.h>
10589 extern int _nl_msg_cat_cntr;
10590
10591 int
10592 main (void)
10593 {
10594
10595 bindtextdomain ("", "");
10596 return (gettext ("") != 0)
10597
10598 #ifdef USE_MSGFMT_HACK
10599 + _nl_msg_cat_cntr
10600 #endif
10601
10602 ;
10603 return 0;
10604 }
10605 _ACEOF
10606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10607 if { (eval echo "$as_me:10607: \"$ac_link\"") >&5
10608 (eval $ac_link) 2>&5
10609 ac_status=$?
10610 echo "$as_me:10610: \$? = $ac_status" >&5
10611 (exit "$ac_status"); } &&
10612 { ac_try='test -s "conftest$ac_exeext"'
10613 { (eval echo "$as_me:10613: \"$ac_try\"") >&5
10614 (eval $ac_try) 2>&5
10615 ac_status=$?
10616 echo "$as_me:10616: \$? = $ac_status" >&5
10617 (exit "$ac_status"); }; }; then
10618 cf_cv_gnu_gettext=yes
10619 else
10620 echo "$as_me: failed program was:" >&5
10621 cat "conftest.$ac_ext" >&5
10622 cf_cv_gnu_gettext=no
10623 fi
10624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10625 echo "$as_me:10625: result: $cf_cv_gnu_gettext" >&5
10626 echo "${ECHO_T}$cf_cv_gnu_gettext" >&6
10627 test "$" = yes &&
10628 cat >>confdefs.h <<\EOF
10629 #define HAVE__NL_MSG_CAT_CNTR 1
10630 EOF
10631
10632 LIBS="$LIBS $INTLLIBS"
10633
10634 for ac_func in dcgettext
10635 do
10636 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10637 echo "$as_me:10637: checking for $ac_func" >&5
10638 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10639 if eval "test \"\${$as_ac_var+set}\" = set"; then
10640 echo $ECHO_N "(cached) $ECHO_C" >&6
10641 else
10642 cat >"conftest.$ac_ext" <<_ACEOF
10643 #line 10643 "configure"
10644 #include "confdefs.h"
10645 #define $ac_func autoconf_temporary
10646 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10647 #undef $ac_func
10648
10649 #ifdef __cplusplus
10650 extern "C"
10651 #endif
10652
10653 /* We use char because int might match the return type of a gcc2
10654 builtin and then its argument prototype would still apply. */
10655 char $ac_func (void);
10656
10657 int
10658 main (void)
10659 {
10660
10661 /* The GNU C library defines stubs for functions which it implements
10662 to always fail with ENOSYS. Some functions are actually named
10663 something starting with __ and the normal name is an alias. */
10664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10665 #error found stub for $ac_func
10666 #endif
10667
10668 return $ac_func ();
10669 ;
10670 return 0;
10671 }
10672 _ACEOF
10673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10674 if { (eval echo "$as_me:10674: \"$ac_link\"") >&5
10675 (eval $ac_link) 2>&5
10676 ac_status=$?
10677 echo "$as_me:10677: \$? = $ac_status" >&5
10678 (exit "$ac_status"); } &&
10679 { ac_try='test -s "conftest$ac_exeext"'
10680 { (eval echo "$as_me:10680: \"$ac_try\"") >&5
10681 (eval $ac_try) 2>&5
10682 ac_status=$?
10683 echo "$as_me:10683: \$? = $ac_status" >&5
10684 (exit "$ac_status"); }; }; then
10685 eval "$as_ac_var=yes"
10686 else
10687 echo "$as_me: failed program was:" >&5
10688 cat "conftest.$ac_ext" >&5
10689 eval "$as_ac_var=no"
10690 fi
10691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10692 fi
10693 echo "$as_me:10693: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10694 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10695 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10696 cat >>confdefs.h <<EOF
10697 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10698 EOF
10699
10700 fi
10701 done
10702
10703 CATOBJEXT=.gmo
10704
10705 cat >>confdefs.h <<\EOF
10706 #define ENABLE_NLS 1
10707 EOF
10708
10709 elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
10710 { echo "$as_me:10710: WARNING: disabling NLS feature" >&5
10711 echo "$as_me: WARNING: disabling NLS feature" >&2;}
10712 ALL_LINGUAS=
10713 CATOBJEXT=.ignored
10714 MSGFMT=":"
10715 GMSGFMT=":"
10716 XGETTEXT=":"
10717 USE_NLS=no
10718 LIBS="$cf_save_LIBS_1"
10719 CPPFLAGS="$cf_save_OPTS_1"
10720 fi
10721
10722 if test "$GMSGFMT" != ":"; then
10723 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
10724 : ;
10725 else
10726 { echo "$as_me:10726: WARNING: found msgfmt program is not GNU msgfmt" >&5
10727 echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
10728 fi
10729 fi
10730
10731 if test "$XGETTEXT" != ":"; then
10732 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
10733 : ;
10734 else
10735 { echo "$as_me:10735: WARNING: found xgettext program is not GNU xgettext" >&5
10736 echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
10737 fi
10738 fi
10739 fi
10740
10741 if test "$XGETTEXT" != ":"; then
10742 ac_config_commands="$ac_config_commands default-1"
10743
10744 for lang in $ALL_LINGUAS; do
10745 GMOFILES="$GMOFILES $lang.gmo"
10746 POFILES="$POFILES $lang.po"
10747 done
10748 fi
10749
10750 nls_cv_header_intl=
10751 nls_cv_header_libgt=
10752
10753 DATADIRNAME=share
10754
10755 INSTOBJEXT=.mo
10756
10757 GENCAT=gencat
10758
10759 if test "$USE_NLS" = "yes"; then
10760 if test "x$ALL_LINGUAS" = "x"; then
10761 LINGUAS=
10762 else
10763 echo "$as_me:10763: checking for catalogs to be installed" >&5
10764 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
10765 NEW_LINGUAS=
10766 for presentlang in $ALL_LINGUAS; do
10767 useit=no
10768 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
10769 # Use the presentlang catalog if desiredlang is
10770 # a. equal to presentlang, or
10771 # b. a variant of presentlang (because in this case,
10772 # presentlang can be used as a fallback for messages
10773 # which are not translated in the desiredlang catalog).
10774 case "$desiredlang" in
10775 ("$presentlang"*) useit=yes;;
10776 esac
10777 done
10778 if test "$useit" = yes; then
10779 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
10780 fi
10781 done
10782 LINGUAS=$NEW_LINGUAS
10783 echo "$as_me:10783: result: $LINGUAS" >&5
10784 echo "${ECHO_T}$LINGUAS" >&6
10785 fi
10786
10787 if test -n "$LINGUAS"; then
10788 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
10789 fi
10790 else
10791 CATALOGS=
10792 fi
10793
10794 if test "$USE_NLS" = yes ; then
10795
10796 # Check whether --with-textdomain or --without-textdomain was given.
10797 if test "${with_textdomain+set}" = set; then
10798 withval="$with_textdomain"
10799 NLS_TEXTDOMAIN=$withval
10800 else
10801 NLS_TEXTDOMAIN=$PACKAGE
10802 fi;
10803
10804 cat >>confdefs.h <<EOF
10805 #define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
10806 EOF
10807
10808 fi
10809
10810 MSG_DIR_MAKE=
10811 SUB_MAKEFILE=
10812
10813 cf_makefile=makefile
10814
10815 use_our_messages=no
10816 if test "$USE_NLS" = yes ; then
10817 if test -d "$srcdir/po" ; then
10818 echo "$as_me:10818: checking if we should use included message-library" >&5
10819 echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
10820
10821 # Check whether --enable-included-msgs or --disable-included-msgs was given.
10822 if test "${enable_included_msgs+set}" = set; then
10823 enableval="$enable_included_msgs"
10824 use_our_messages=$enableval
10825 else
10826 use_our_messages=yes
10827 fi;
10828 fi
10829 echo "$as_me:10829: result: $use_our_messages" >&5
10830 echo "${ECHO_T}$use_our_messages" >&6
10831 fi
10832
10833 MSG_DIR_MAKE="#"
10834 if test "$use_our_messages" = yes
10835 then
10836 SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
10837 MSG_DIR_MAKE=
10838 fi
10839
10840 if test "$USE_NLS" = yes ; then
10841
10842 for ac_header in libintl.h
10843 do
10844 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10845 echo "$as_me:10845: checking for $ac_header" >&5
10846 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10847 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10848 echo $ECHO_N "(cached) $ECHO_C" >&6
10849 else
10850 cat >"conftest.$ac_ext" <<_ACEOF
10851 #line 10851 "configure"
10852 #include "confdefs.h"
10853 #include <$ac_header>
10854 _ACEOF
10855 if { (eval echo "$as_me:10855: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10856 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10857 ac_status=$?
10858 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10859 rm -f conftest.er1
10860 cat conftest.err >&5
10861 echo "$as_me:10861: \$? = $ac_status" >&5
10862 (exit "$ac_status"); } >/dev/null; then
10863 if test -s conftest.err; then
10864 ac_cpp_err=$ac_c_preproc_warn_flag
10865 else
10866 ac_cpp_err=
10867 fi
10868 else
10869 ac_cpp_err=yes
10870 fi
10871 if test -z "$ac_cpp_err"; then
10872 eval "$as_ac_Header=yes"
10873 else
10874 echo "$as_me: failed program was:" >&5
10875 cat "conftest.$ac_ext" >&5
10876 eval "$as_ac_Header=no"
10877 fi
10878 rm -f conftest.err "conftest.$ac_ext"
10879 fi
10880 echo "$as_me:10880: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10881 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10882 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10883 cat >>confdefs.h <<EOF
10884 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10885 EOF
10886
10887 fi
10888 done
10889
10890 fi
10891
10892 echo "$as_me:10892: checking if -lm needed for math functions" >&5
10893 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10894 if test "${cf_cv_need_libm+set}" = set; then
10895 echo $ECHO_N "(cached) $ECHO_C" >&6
10896 else
10897
10898 cat >"conftest.$ac_ext" <<_ACEOF
10899 #line 10899 "configure"
10900 #include "confdefs.h"
10901
10902 #include <stdio.h>
10903 #include <stdlib.h>
10904 #include <math.h>
10905
10906 int
10907 main (void)
10908 {
10909 double x = rand(); printf("result = %g\\n", sqrt(x))
10910 ;
10911 return 0;
10912 }
10913 _ACEOF
10914 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10915 if { (eval echo "$as_me:10915: \"$ac_link\"") >&5
10916 (eval $ac_link) 2>&5
10917 ac_status=$?
10918 echo "$as_me:10918: \$? = $ac_status" >&5
10919 (exit "$ac_status"); } &&
10920 { ac_try='test -s "conftest$ac_exeext"'
10921 { (eval echo "$as_me:10921: \"$ac_try\"") >&5
10922 (eval $ac_try) 2>&5
10923 ac_status=$?
10924 echo "$as_me:10924: \$? = $ac_status" >&5
10925 (exit "$ac_status"); }; }; then
10926 cf_cv_need_libm=no
10927 else
10928 echo "$as_me: failed program was:" >&5
10929 cat "conftest.$ac_ext" >&5
10930 cf_cv_need_libm=yes
10931 fi
10932 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10933 fi
10934 echo "$as_me:10934: result: $cf_cv_need_libm" >&5
10935 echo "${ECHO_T}$cf_cv_need_libm" >&6
10936
10937 if test "$cf_cv_need_libm" = yes
10938 then
10939
10940 cf_save_LIBS="$LIBS"
10941 LIBS="$LIBS -lm"
10942 echo "$as_me:10942: checking if -lm is available for math functions" >&5
10943 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
10944 if test "${cf_cv_have_libm+set}" = set; then
10945 echo $ECHO_N "(cached) $ECHO_C" >&6
10946 else
10947
10948 cat >"conftest.$ac_ext" <<_ACEOF
10949 #line 10949 "configure"
10950 #include "confdefs.h"
10951
10952 #include <stdio.h>
10953 #include <stdlib.h>
10954 #include <math.h>
10955
10956 int
10957 main (void)
10958 {
10959 double x = rand(); printf("result = %g\\n", sqrt(x))
10960 ;
10961 return 0;
10962 }
10963 _ACEOF
10964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10965 if { (eval echo "$as_me:10965: \"$ac_link\"") >&5
10966 (eval $ac_link) 2>&5
10967 ac_status=$?
10968 echo "$as_me:10968: \$? = $ac_status" >&5
10969 (exit "$ac_status"); } &&
10970 { ac_try='test -s "conftest$ac_exeext"'
10971 { (eval echo "$as_me:10971: \"$ac_try\"") >&5
10972 (eval $ac_try) 2>&5
10973 ac_status=$?
10974 echo "$as_me:10974: \$? = $ac_status" >&5
10975 (exit "$ac_status"); }; }; then
10976 cf_cv_have_libm=yes
10977 else
10978 echo "$as_me: failed program was:" >&5
10979 cat "conftest.$ac_ext" >&5
10980 cf_cv_have_libm=no
10981 fi
10982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10983 fi
10984 echo "$as_me:10984: result: $cf_cv_have_libm" >&5
10985 echo "${ECHO_T}$cf_cv_have_libm" >&6
10986 LIBS="$cf_save_LIBS"
10987
10988 if test "$cf_cv_have_libm" = yes
10989 then
10990
10991 cf_add_libs="$LIBS"
10992 # reverse order
10993 cf_add_0lib=
10994 for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10995 # filter duplicates
10996 for cf_add_1lib in $cf_add_0lib; do
10997 for cf_add_2lib in $cf_add_libs; do
10998 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10999 cf_add_1lib=
11000 break
11001 fi
11002 done
11003 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11004 done
11005 LIBS="$cf_add_libs"
11006
11007 fi
11008 else
11009 cf_cv_have_libm=yes
11010 fi
11011
11012 if test "$cf_cv_have_libm" = yes
11013 then
11014
11015 cat >>confdefs.h <<\EOF
11016 #define HAVE_MATH_FUNCS 1
11017 EOF
11018
11019 fi
11020
11021 echo "$as_me:11021: checking if you want to use dmalloc for testing" >&5
11022 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11023
11024 # Check whether --with-dmalloc or --without-dmalloc was given.
11025 if test "${with_dmalloc+set}" = set; then
11026 withval="$with_dmalloc"
11027 case "x$withval" in
11028 (x|xno) ;;
11029 (*)
11030 : "${with_cflags:=-g}"
11031 : "${enable_leaks:=no}"
11032 with_dmalloc=yes
11033
11034 cat >>confdefs.h <<EOF
11035 #define USE_DMALLOC 1
11036 EOF
11037
11038 ;;
11039 esac
11040 else
11041 with_dmalloc=
11042 fi;
11043 echo "$as_me:11043: result: ${with_dmalloc:-no}" >&5
11044 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11045
11046 case ".$with_cflags" in
11047 (.*-g*)
11048 case .$CFLAGS in
11049 (.*-g*)
11050 ;;
11051 (*)
11052
11053 cf_fix_cppflags=no
11054 cf_new_cflags=
11055 cf_new_cppflags=
11056 cf_new_extra_cppflags=
11057
11058 for cf_add_cflags in -g
11059 do
11060 case "$cf_fix_cppflags" in
11061 (no)
11062 case "$cf_add_cflags" in
11063 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11064 case "$cf_add_cflags" in
11065 (-D*)
11066 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11067
11068 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11069 && test -z "${cf_tst_cflags}" \
11070 && cf_fix_cppflags=yes
11071
11072 if test "$cf_fix_cppflags" = yes ; then
11073
11074 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11075 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11076
11077 continue
11078 elif test "${cf_tst_cflags}" = "\"'" ; then
11079
11080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11082
11083 continue
11084 fi
11085 ;;
11086 esac
11087 case "$CPPFLAGS" in
11088 (*$cf_add_cflags)
11089 ;;
11090 (*)
11091 case "$cf_add_cflags" in
11092 (-D*)
11093 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11094
11095 CPPFLAGS=`echo "$CPPFLAGS" | \
11096 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11097 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11098
11099 ;;
11100 esac
11101
11102 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11103 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11104
11105 ;;
11106 esac
11107 ;;
11108 (*)
11109
11110 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11111 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11112
11113 ;;
11114 esac
11115 ;;
11116 (yes)
11117
11118 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11119 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11120
11121 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11122
11123 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11124 && test -z "${cf_tst_cflags}" \
11125 && cf_fix_cppflags=no
11126 ;;
11127 esac
11128 done
11129
11130 if test -n "$cf_new_cflags" ; then
11131
11132 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11133 CFLAGS="${CFLAGS}$cf_new_cflags"
11134
11135 fi
11136
11137 if test -n "$cf_new_cppflags" ; then
11138
11139 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11140 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11141
11142 fi
11143
11144 if test -n "$cf_new_extra_cppflags" ; then
11145
11146 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11147 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11148
11149 fi
11150
11151 ;;
11152 esac
11153 ;;
11154 esac
11155
11156 if test "$with_dmalloc" = yes ; then
11157 echo "$as_me:11157: checking for dmalloc.h" >&5
11158 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11159 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11160 echo $ECHO_N "(cached) $ECHO_C" >&6
11161 else
11162 cat >"conftest.$ac_ext" <<_ACEOF
11163 #line 11163 "configure"
11164 #include "confdefs.h"
11165 #include <dmalloc.h>
11166 _ACEOF
11167 if { (eval echo "$as_me:11167: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11168 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11169 ac_status=$?
11170 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11171 rm -f conftest.er1
11172 cat conftest.err >&5
11173 echo "$as_me:11173: \$? = $ac_status" >&5
11174 (exit "$ac_status"); } >/dev/null; then
11175 if test -s conftest.err; then
11176 ac_cpp_err=$ac_c_preproc_warn_flag
11177 else
11178 ac_cpp_err=
11179 fi
11180 else
11181 ac_cpp_err=yes
11182 fi
11183 if test -z "$ac_cpp_err"; then
11184 ac_cv_header_dmalloc_h=yes
11185 else
11186 echo "$as_me: failed program was:" >&5
11187 cat "conftest.$ac_ext" >&5
11188 ac_cv_header_dmalloc_h=no
11189 fi
11190 rm -f conftest.err "conftest.$ac_ext"
11191 fi
11192 echo "$as_me:11192: result: $ac_cv_header_dmalloc_h" >&5
11193 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11194 if test "$ac_cv_header_dmalloc_h" = yes; then
11195
11196 echo "$as_me:11196: checking for dmalloc_debug in -ldmalloc" >&5
11197 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11198 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11199 echo $ECHO_N "(cached) $ECHO_C" >&6
11200 else
11201 ac_check_lib_save_LIBS=$LIBS
11202 LIBS="-ldmalloc $LIBS"
11203 cat >"conftest.$ac_ext" <<_ACEOF
11204 #line 11204 "configure"
11205 #include "confdefs.h"
11206
11207 /* Override any gcc2 internal prototype to avoid an error. */
11208 #ifdef __cplusplus
11209 extern "C"
11210 #endif
11211 /* We use char because int might match the return type of a gcc2
11212 builtin and then its argument prototype would still apply. */
11213 char dmalloc_debug (void);
11214 int
11215 main (void)
11216 {
11217 dmalloc_debug ();
11218 ;
11219 return 0;
11220 }
11221 _ACEOF
11222 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11223 if { (eval echo "$as_me:11223: \"$ac_link\"") >&5
11224 (eval $ac_link) 2>&5
11225 ac_status=$?
11226 echo "$as_me:11226: \$? = $ac_status" >&5
11227 (exit "$ac_status"); } &&
11228 { ac_try='test -s "conftest$ac_exeext"'
11229 { (eval echo "$as_me:11229: \"$ac_try\"") >&5
11230 (eval $ac_try) 2>&5
11231 ac_status=$?
11232 echo "$as_me:11232: \$? = $ac_status" >&5
11233 (exit "$ac_status"); }; }; then
11234 ac_cv_lib_dmalloc_dmalloc_debug=yes
11235 else
11236 echo "$as_me: failed program was:" >&5
11237 cat "conftest.$ac_ext" >&5
11238 ac_cv_lib_dmalloc_dmalloc_debug=no
11239 fi
11240 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11241 LIBS=$ac_check_lib_save_LIBS
11242 fi
11243 echo "$as_me:11243: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11244 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11245 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
11246 cat >>confdefs.h <<EOF
11247 #define HAVE_LIBDMALLOC 1
11248 EOF
11249
11250 LIBS="-ldmalloc $LIBS"
11251
11252 fi
11253
11254 fi
11255
11256 fi
11257
11258 echo "$as_me:11258: checking if you want to use dbmalloc for testing" >&5
11259 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11260
11261 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11262 if test "${with_dbmalloc+set}" = set; then
11263 withval="$with_dbmalloc"
11264 case "x$withval" in
11265 (x|xno) ;;
11266 (*)
11267 : "${with_cflags:=-g}"
11268 : "${enable_leaks:=no}"
11269 with_dbmalloc=yes
11270
11271 cat >>confdefs.h <<EOF
11272 #define USE_DBMALLOC 1
11273 EOF
11274
11275 ;;
11276 esac
11277 else
11278 with_dbmalloc=
11279 fi;
11280 echo "$as_me:11280: result: ${with_dbmalloc:-no}" >&5
11281 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11282
11283 case ".$with_cflags" in
11284 (.*-g*)
11285 case .$CFLAGS in
11286 (.*-g*)
11287 ;;
11288 (*)
11289
11290 cf_fix_cppflags=no
11291 cf_new_cflags=
11292 cf_new_cppflags=
11293 cf_new_extra_cppflags=
11294
11295 for cf_add_cflags in -g
11296 do
11297 case "$cf_fix_cppflags" in
11298 (no)
11299 case "$cf_add_cflags" in
11300 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11301 case "$cf_add_cflags" in
11302 (-D*)
11303 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11304
11305 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11306 && test -z "${cf_tst_cflags}" \
11307 && cf_fix_cppflags=yes
11308
11309 if test "$cf_fix_cppflags" = yes ; then
11310
11311 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11312 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11313
11314 continue
11315 elif test "${cf_tst_cflags}" = "\"'" ; then
11316
11317 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11318 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11319
11320 continue
11321 fi
11322 ;;
11323 esac
11324 case "$CPPFLAGS" in
11325 (*$cf_add_cflags)
11326 ;;
11327 (*)
11328 case "$cf_add_cflags" in
11329 (-D*)
11330 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11331
11332 CPPFLAGS=`echo "$CPPFLAGS" | \
11333 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11334 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11335
11336 ;;
11337 esac
11338
11339 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11340 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11341
11342 ;;
11343 esac
11344 ;;
11345 (*)
11346
11347 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11348 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11349
11350 ;;
11351 esac
11352 ;;
11353 (yes)
11354
11355 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11356 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11357
11358 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11359
11360 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11361 && test -z "${cf_tst_cflags}" \
11362 && cf_fix_cppflags=no
11363 ;;
11364 esac
11365 done
11366
11367 if test -n "$cf_new_cflags" ; then
11368
11369 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11370 CFLAGS="${CFLAGS}$cf_new_cflags"
11371
11372 fi
11373
11374 if test -n "$cf_new_cppflags" ; then
11375
11376 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11377 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11378
11379 fi
11380
11381 if test -n "$cf_new_extra_cppflags" ; then
11382
11383 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11384 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11385
11386 fi
11387
11388 ;;
11389 esac
11390 ;;
11391 esac
11392
11393 if test "$with_dbmalloc" = yes ; then
11394 echo "$as_me:11394: checking for dbmalloc.h" >&5
11395 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11396 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11397 echo $ECHO_N "(cached) $ECHO_C" >&6
11398 else
11399 cat >"conftest.$ac_ext" <<_ACEOF
11400 #line 11400 "configure"
11401 #include "confdefs.h"
11402 #include <dbmalloc.h>
11403 _ACEOF
11404 if { (eval echo "$as_me:11404: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11405 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11406 ac_status=$?
11407 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11408 rm -f conftest.er1
11409 cat conftest.err >&5
11410 echo "$as_me:11410: \$? = $ac_status" >&5
11411 (exit "$ac_status"); } >/dev/null; then
11412 if test -s conftest.err; then
11413 ac_cpp_err=$ac_c_preproc_warn_flag
11414 else
11415 ac_cpp_err=
11416 fi
11417 else
11418 ac_cpp_err=yes
11419 fi
11420 if test -z "$ac_cpp_err"; then
11421 ac_cv_header_dbmalloc_h=yes
11422 else
11423 echo "$as_me: failed program was:" >&5
11424 cat "conftest.$ac_ext" >&5
11425 ac_cv_header_dbmalloc_h=no
11426 fi
11427 rm -f conftest.err "conftest.$ac_ext"
11428 fi
11429 echo "$as_me:11429: result: $ac_cv_header_dbmalloc_h" >&5
11430 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11431 if test "$ac_cv_header_dbmalloc_h" = yes; then
11432
11433 echo "$as_me:11433: checking for debug_malloc in -ldbmalloc" >&5
11434 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11435 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11436 echo $ECHO_N "(cached) $ECHO_C" >&6
11437 else
11438 ac_check_lib_save_LIBS=$LIBS
11439 LIBS="-ldbmalloc $LIBS"
11440 cat >"conftest.$ac_ext" <<_ACEOF
11441 #line 11441 "configure"
11442 #include "confdefs.h"
11443
11444 /* Override any gcc2 internal prototype to avoid an error. */
11445 #ifdef __cplusplus
11446 extern "C"
11447 #endif
11448 /* We use char because int might match the return type of a gcc2
11449 builtin and then its argument prototype would still apply. */
11450 char debug_malloc (void);
11451 int
11452 main (void)
11453 {
11454 debug_malloc ();
11455 ;
11456 return 0;
11457 }
11458 _ACEOF
11459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11460 if { (eval echo "$as_me:11460: \"$ac_link\"") >&5
11461 (eval $ac_link) 2>&5
11462 ac_status=$?
11463 echo "$as_me:11463: \$? = $ac_status" >&5
11464 (exit "$ac_status"); } &&
11465 { ac_try='test -s "conftest$ac_exeext"'
11466 { (eval echo "$as_me:11466: \"$ac_try\"") >&5
11467 (eval $ac_try) 2>&5
11468 ac_status=$?
11469 echo "$as_me:11469: \$? = $ac_status" >&5
11470 (exit "$ac_status"); }; }; then
11471 ac_cv_lib_dbmalloc_debug_malloc=yes
11472 else
11473 echo "$as_me: failed program was:" >&5
11474 cat "conftest.$ac_ext" >&5
11475 ac_cv_lib_dbmalloc_debug_malloc=no
11476 fi
11477 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11478 LIBS=$ac_check_lib_save_LIBS
11479 fi
11480 echo "$as_me:11480: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11481 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11482 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
11483 cat >>confdefs.h <<EOF
11484 #define HAVE_LIBDBMALLOC 1
11485 EOF
11486
11487 LIBS="-ldbmalloc $LIBS"
11488
11489 fi
11490
11491 fi
11492
11493 fi
11494
11495 echo "$as_me:11495: checking if you want to use purify for testing" >&5
11496 echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
11497
11498 # Check whether --with-purify or --without-purify was given.
11499 if test "${with_purify+set}" = set; then
11500 withval="$with_purify"
11501 case "x$withval" in
11502 (x|xno) ;;
11503 (*)
11504 : "${with_cflags:=-g}"
11505 : "${enable_leaks:=no}"
11506 with_purify=yes
11507
11508 cat >>confdefs.h <<EOF
11509 #define USE_PURIFY 1
11510 EOF
11511
11512 ;;
11513 esac
11514 else
11515 with_purify=
11516 fi;
11517 echo "$as_me:11517: result: ${with_purify:-no}" >&5
11518 echo "${ECHO_T}${with_purify:-no}" >&6
11519
11520 case ".$with_cflags" in
11521 (.*-g*)
11522 case .$CFLAGS in
11523 (.*-g*)
11524 ;;
11525 (*)
11526
11527 cf_fix_cppflags=no
11528 cf_new_cflags=
11529 cf_new_cppflags=
11530 cf_new_extra_cppflags=
11531
11532 for cf_add_cflags in -g
11533 do
11534 case "$cf_fix_cppflags" in
11535 (no)
11536 case "$cf_add_cflags" in
11537 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11538 case "$cf_add_cflags" in
11539 (-D*)
11540 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11541
11542 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11543 && test -z "${cf_tst_cflags}" \
11544 && cf_fix_cppflags=yes
11545
11546 if test "$cf_fix_cppflags" = yes ; then
11547
11548 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11549 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11550
11551 continue
11552 elif test "${cf_tst_cflags}" = "\"'" ; then
11553
11554 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11555 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11556
11557 continue
11558 fi
11559 ;;
11560 esac
11561 case "$CPPFLAGS" in
11562 (*$cf_add_cflags)
11563 ;;
11564 (*)
11565 case "$cf_add_cflags" in
11566 (-D*)
11567 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11568
11569 CPPFLAGS=`echo "$CPPFLAGS" | \
11570 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11571 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11572
11573 ;;
11574 esac
11575
11576 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11577 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11578
11579 ;;
11580 esac
11581 ;;
11582 (*)
11583
11584 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11585 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11586
11587 ;;
11588 esac
11589 ;;
11590 (yes)
11591
11592 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11593 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11594
11595 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11596
11597 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11598 && test -z "${cf_tst_cflags}" \
11599 && cf_fix_cppflags=no
11600 ;;
11601 esac
11602 done
11603
11604 if test -n "$cf_new_cflags" ; then
11605
11606 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11607 CFLAGS="${CFLAGS}$cf_new_cflags"
11608
11609 fi
11610
11611 if test -n "$cf_new_cppflags" ; then
11612
11613 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11614 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11615
11616 fi
11617
11618 if test -n "$cf_new_extra_cppflags" ; then
11619
11620 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11621 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11622
11623 fi
11624
11625 ;;
11626 esac
11627 ;;
11628 esac
11629
11630 echo "$as_me:11630: checking if you want to use valgrind for testing" >&5
11631 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11632
11633 # Check whether --with-valgrind or --without-valgrind was given.
11634 if test "${with_valgrind+set}" = set; then
11635 withval="$with_valgrind"
11636 case "x$withval" in
11637 (x|xno) ;;
11638 (*)
11639 : "${with_cflags:=-g}"
11640 : "${enable_leaks:=no}"
11641 with_valgrind=yes
11642
11643 cat >>confdefs.h <<EOF
11644 #define USE_VALGRIND 1
11645 EOF
11646
11647 ;;
11648 esac
11649 else
11650 with_valgrind=
11651 fi;
11652 echo "$as_me:11652: result: ${with_valgrind:-no}" >&5
11653 echo "${ECHO_T}${with_valgrind:-no}" >&6
11654
11655 case ".$with_cflags" in
11656 (.*-g*)
11657 case .$CFLAGS in
11658 (.*-g*)
11659 ;;
11660 (*)
11661
11662 cf_fix_cppflags=no
11663 cf_new_cflags=
11664 cf_new_cppflags=
11665 cf_new_extra_cppflags=
11666
11667 for cf_add_cflags in -g
11668 do
11669 case "$cf_fix_cppflags" in
11670 (no)
11671 case "$cf_add_cflags" in
11672 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11673 case "$cf_add_cflags" in
11674 (-D*)
11675 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11676
11677 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11678 && test -z "${cf_tst_cflags}" \
11679 && cf_fix_cppflags=yes
11680
11681 if test "$cf_fix_cppflags" = yes ; then
11682
11683 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11684 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11685
11686 continue
11687 elif test "${cf_tst_cflags}" = "\"'" ; then
11688
11689 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11690 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11691
11692 continue
11693 fi
11694 ;;
11695 esac
11696 case "$CPPFLAGS" in
11697 (*$cf_add_cflags)
11698 ;;
11699 (*)
11700 case "$cf_add_cflags" in
11701 (-D*)
11702 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11703
11704 CPPFLAGS=`echo "$CPPFLAGS" | \
11705 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11706 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11707
11708 ;;
11709 esac
11710
11711 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11712 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11713
11714 ;;
11715 esac
11716 ;;
11717 (*)
11718
11719 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11720 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11721
11722 ;;
11723 esac
11724 ;;
11725 (yes)
11726
11727 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11728 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11729
11730 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11731
11732 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11733 && test -z "${cf_tst_cflags}" \
11734 && cf_fix_cppflags=no
11735 ;;
11736 esac
11737 done
11738
11739 if test -n "$cf_new_cflags" ; then
11740
11741 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11742 CFLAGS="${CFLAGS}$cf_new_cflags"
11743
11744 fi
11745
11746 if test -n "$cf_new_cppflags" ; then
11747
11748 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11749 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11750
11751 fi
11752
11753 if test -n "$cf_new_extra_cppflags" ; then
11754
11755 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11756 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11757
11758 fi
11759
11760 ;;
11761 esac
11762 ;;
11763 esac
11764
11765 echo "$as_me:11765: checking if you want to perform memory-leak testing" >&5
11766 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11767
11768 # Check whether --with-no-leaks or --without-no-leaks was given.
11769 if test "${with_no_leaks+set}" = set; then
11770 withval="$with_no_leaks"
11771 case "x$withval" in
11772 (xno|x)
11773 : ${enable_leaks:=yes}
11774 ;;
11775 (*)
11776 enable_leaks=no
11777 ;;
11778 esac
11779 else
11780 : ${enable_leaks:=yes}
11781 fi;
11782
11783 if test "x$enable_leaks" = xno
11784 then
11785 with_no_leaks=yes
11786 else
11787 with_no_leaks=no
11788 fi
11789
11790 echo "$as_me:11790: result: $with_no_leaks" >&5
11791 echo "${ECHO_T}$with_no_leaks" >&6
11792
11793 if test "x$enable_leaks" = xno
11794 then
11795
11796 cat >>confdefs.h <<\EOF
11797 #define NO_LEAKS 1
11798 EOF
11799
11800 cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
11801 case ${cf_doalloc} in
11802 (*yes*)
11803 ;;
11804 (*)
11805
11806 cat >>confdefs.h <<\EOF
11807 #define DOALLOC 10000
11808 EOF
11809
11810 ;;
11811 esac
11812 fi
11813
11814 echo "$as_me:11814: checking if you want --trace option" >&5
11815 echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
11816
11817 # Check whether --enable-trace or --disable-trace was given.
11818 if test "${enable_trace+set}" = set; then
11819 enableval="$enable_trace"
11820
11821 else
11822 enableval=yes
11823 fi;
11824 echo "$as_me:11824: result: $enableval" >&5
11825 echo "${ECHO_T}$enableval" >&6
11826 if test "$enableval" != no ; then
11827 EXTRAOBJS="$EXTRAOBJS trace\$o"
11828
11829 cat >>confdefs.h <<\EOF
11830 #define HAVE_DLG_TRACE 1
11831 EOF
11832
11833 else
11834 :
11835 fi
11836
11837 echo "$as_me:11837: checking if rpath option should be used" >&5
11838 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
11839
11840 # Check whether --enable-rpath or --disable-rpath was given.
11841 if test "${enable_rpath+set}" = set; then
11842 enableval="$enable_rpath"
11843 cf_cv_enable_rpath=$enableval
11844 else
11845 cf_cv_enable_rpath=no
11846 fi;
11847 echo "$as_me:11847: result: $cf_cv_enable_rpath" >&5
11848 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
11849
11850 LD_RPATH_OPT=
11851 if test "x$cf_cv_enable_rpath" != xno
11852 then
11853 echo "$as_me:11853: checking for an rpath option" >&5
11854 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11855 case "$cf_cv_system_name" in
11856 (irix*)
11857 if test "$GCC" = yes; then
11858 LD_RPATH_OPT="-Wl,-rpath,"
11859 else
11860 LD_RPATH_OPT="-rpath "
11861 fi
11862 ;;
11863 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11864 LD_RPATH_OPT="-Wl,-rpath,"
11865 ;;
11866 (openbsd[2-9].*|mirbsd*)
11867 LD_RPATH_OPT="-Wl,-rpath,"
11868 ;;
11869 (dragonfly*)
11870 LD_RPATH_OPT="-rpath "
11871 ;;
11872 (netbsd*)
11873 LD_RPATH_OPT="-Wl,-rpath,"
11874 ;;
11875 (osf*|mls+*)
11876 LD_RPATH_OPT="-rpath "
11877 ;;
11878 (solaris2*)
11879 LD_RPATH_OPT="-R"
11880 ;;
11881 (*)
11882 ;;
11883 esac
11884 echo "$as_me:11884: result: $LD_RPATH_OPT" >&5
11885 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11886
11887 case "x$LD_RPATH_OPT" in
11888 (x-R*)
11889 echo "$as_me:11889: checking if we need a space after rpath option" >&5
11890 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11891 cf_save_LIBS="$LIBS"
11892
11893 cf_add_libs="$LIBS"
11894 # reverse order
11895 cf_add_0lib=
11896 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11897 # filter duplicates
11898 for cf_add_1lib in $cf_add_0lib; do
11899 for cf_add_2lib in $cf_add_libs; do
11900 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11901 cf_add_1lib=
11902 break
11903 fi
11904 done
11905 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11906 done
11907 LIBS="$cf_add_libs"
11908
11909 cat >"conftest.$ac_ext" <<_ACEOF
11910 #line 11910 "configure"
11911 #include "confdefs.h"
11912
11913 int
11914 main (void)
11915 {
11916
11917 ;
11918 return 0;
11919 }
11920 _ACEOF
11921 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11922 if { (eval echo "$as_me:11922: \"$ac_link\"") >&5
11923 (eval $ac_link) 2>&5
11924 ac_status=$?
11925 echo "$as_me:11925: \$? = $ac_status" >&5
11926 (exit "$ac_status"); } &&
11927 { ac_try='test -s "conftest$ac_exeext"'
11928 { (eval echo "$as_me:11928: \"$ac_try\"") >&5
11929 (eval $ac_try) 2>&5
11930 ac_status=$?
11931 echo "$as_me:11931: \$? = $ac_status" >&5
11932 (exit "$ac_status"); }; }; then
11933 cf_rpath_space=no
11934 else
11935 echo "$as_me: failed program was:" >&5
11936 cat "conftest.$ac_ext" >&5
11937 cf_rpath_space=yes
11938 fi
11939 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11940 LIBS="$cf_save_LIBS"
11941 echo "$as_me:11941: result: $cf_rpath_space" >&5
11942 echo "${ECHO_T}$cf_rpath_space" >&6
11943 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11944 ;;
11945 esac
11946 fi
11947
11948 if test -n "$ac_tool_prefix"; then
11949 # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
11950 set dummy ${ac_tool_prefix}readelf; ac_word=$2
11951 echo "$as_me:11951: checking for $ac_word" >&5
11952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11953 if test "${ac_cv_path_READELF+set}" = set; then
11954 echo $ECHO_N "(cached) $ECHO_C" >&6
11955 else
11956 case $READELF in
11957 [\\/]* | ?:[\\/]*)
11958 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
11959 ;;
11960 *)
11961 ac_save_IFS=$IFS; IFS=$ac_path_separator
11962 ac_dummy="$PATH"
11963 for ac_dir in $ac_dummy; do
11964 IFS=$ac_save_IFS
11965 test -z "$ac_dir" && ac_dir=.
11966 if $as_executable_p "$ac_dir/$ac_word"; then
11967 ac_cv_path_READELF="$ac_dir/$ac_word"
11968 echo "$as_me:11968: found $ac_dir/$ac_word" >&5
11969 break
11970 fi
11971 done
11972
11973 ;;
11974 esac
11975 fi
11976 READELF=$ac_cv_path_READELF
11977
11978 if test -n "$READELF"; then
11979 echo "$as_me:11979: result: $READELF" >&5
11980 echo "${ECHO_T}$READELF" >&6
11981 else
11982 echo "$as_me:11982: result: no" >&5
11983 echo "${ECHO_T}no" >&6
11984 fi
11985
11986 fi
11987 if test -z "$ac_cv_path_READELF"; then
11988 ac_pt_READELF=$READELF
11989 # Extract the first word of "readelf", so it can be a program name with args.
11990 set dummy readelf; ac_word=$2
11991 echo "$as_me:11991: checking for $ac_word" >&5
11992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11993 if test "${ac_cv_path_ac_pt_READELF+set}" = set; then
11994 echo $ECHO_N "(cached) $ECHO_C" >&6
11995 else
11996 case $ac_pt_READELF in
11997 [\\/]* | ?:[\\/]*)
11998 ac_cv_path_ac_pt_READELF="$ac_pt_READELF" # Let the user override the test with a path.
11999 ;;
12000 *)
12001 ac_save_IFS=$IFS; IFS=$ac_path_separator
12002 ac_dummy="$PATH"
12003 for ac_dir in $ac_dummy; do
12004 IFS=$ac_save_IFS
12005 test -z "$ac_dir" && ac_dir=.
12006 if $as_executable_p "$ac_dir/$ac_word"; then
12007 ac_cv_path_ac_pt_READELF="$ac_dir/$ac_word"
12008 echo "$as_me:12008: found $ac_dir/$ac_word" >&5
12009 break
12010 fi
12011 done
12012
12013 test -z "$ac_cv_path_ac_pt_READELF" && ac_cv_path_ac_pt_READELF="none"
12014 ;;
12015 esac
12016 fi
12017 ac_pt_READELF=$ac_cv_path_ac_pt_READELF
12018
12019 if test -n "$ac_pt_READELF"; then
12020 echo "$as_me:12020: result: $ac_pt_READELF" >&5
12021 echo "${ECHO_T}$ac_pt_READELF" >&6
12022 else
12023 echo "$as_me:12023: result: no" >&5
12024 echo "${ECHO_T}no" >&6
12025 fi
12026
12027 READELF=$ac_pt_READELF
12028 else
12029 READELF="$ac_cv_path_READELF"
12030 fi
12031
12032 echo "$as_me:12032: checking if -fPIC option is needed in CFLAGS" >&5
12033 echo $ECHO_N "checking if -fPIC option is needed in CFLAGS... $ECHO_C" >&6
12034 if test "${cf_cv_pic_hack+set}" = set; then
12035 echo $ECHO_N "(cached) $ECHO_C" >&6
12036 else
12037
12038 cf_cv_pic_hack=unknown
12039
12040 case "${CFLAGS}${CC_SHARED_OPTS}" in
12041 (*-fPIC)
12042 cf_cv_pic_hack=no
12043 ;;
12044 esac
12045
12046 if test "$READELF" = none
12047 then
12048 cf_cv_pic_hack=unknown
12049 elif test $cf_cv_pic_hack = no
12050 then
12051 :
12052 elif test "$GCC" = yes
12053 then
12054 if $READELF --version >/dev/null 2>/dev/null
12055 then
12056 cat >conftest.$ac_ext <<EOF
12057 #line 12057 "configure"
12058 #include <stdio.h>
12059 int main(void) { FILE *fp = fopen("hello", "w"); return (fp != 0); }
12060 EOF
12061 if { (eval echo "$as_me:12061: \"$ac_compile\"") >&5
12062 (eval $ac_compile) 2>&5
12063 ac_status=$?
12064 echo "$as_me:12064: \$? = $ac_status" >&5
12065 (exit "$ac_status"); } ; then
12066 cf_cv_pic_hack=no
12067 for cf_pie_relocs in `$READELF --relocs conftest.$ac_cv_objext 2>/dev/null | awk '$3~/^R_/ && $5!~/^\.debug/{print $3}'`
12068 do
12069 case "x$cf_pie_relocs" in
12070 xR_X86_64_32|xR_X86_64_32S)
12071
12072 echo "${as_me:-configure}:12072: testing found $cf_pie_relocs ..." 1>&5
12073
12074 cf_cv_pic_hack=yes
12075 break
12076 ;;
12077 esac
12078 done
12079 else
12080
12081 echo "${as_me:-configure}:12081: testing cannot compile test-program ..." 1>&5
12082
12083 fi
12084 rm -f conftest.$ac_ext conftest.$ac_cv_objext
12085 fi
12086 fi
12087
12088 fi
12089 echo "$as_me:12089: result: $cf_cv_pic_hack" >&5
12090 echo "${ECHO_T}$cf_cv_pic_hack" >&6
12091
12092 if test "x$cf_cv_pic_hack" = xyes
12093 then
12094
12095 cf_fix_cppflags=no
12096 cf_new_cflags=
12097 cf_new_cppflags=
12098 cf_new_extra_cppflags=
12099
12100 for cf_add_cflags in -fPIC
12101 do
12102 case "$cf_fix_cppflags" in
12103 (no)
12104 case "$cf_add_cflags" in
12105 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12106 case "$cf_add_cflags" in
12107 (-D*)
12108 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12109
12110 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12111 && test -z "${cf_tst_cflags}" \
12112 && cf_fix_cppflags=yes
12113
12114 if test "$cf_fix_cppflags" = yes ; then
12115
12116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12118
12119 continue
12120 elif test "${cf_tst_cflags}" = "\"'" ; then
12121
12122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12124
12125 continue
12126 fi
12127 ;;
12128 esac
12129 case "$CPPFLAGS" in
12130 (*$cf_add_cflags)
12131 ;;
12132 (*)
12133 case "$cf_add_cflags" in
12134 (-D*)
12135 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12136
12137 CPPFLAGS=`echo "$CPPFLAGS" | \
12138 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12139 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12140
12141 ;;
12142 esac
12143
12144 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12145 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12146
12147 ;;
12148 esac
12149 ;;
12150 (*)
12151
12152 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12153 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12154
12155 ;;
12156 esac
12157 ;;
12158 (yes)
12159
12160 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12161 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12162
12163 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12164
12165 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12166 && test -z "${cf_tst_cflags}" \
12167 && cf_fix_cppflags=no
12168 ;;
12169 esac
12170 done
12171
12172 if test -n "$cf_new_cflags" ; then
12173
12174 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12175 CFLAGS="${CFLAGS}$cf_new_cflags"
12176
12177 fi
12178
12179 if test -n "$cf_new_cppflags" ; then
12180
12181 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12182 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12183
12184 fi
12185
12186 if test -n "$cf_new_extra_cppflags" ; then
12187
12188 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12189 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12190
12191 fi
12192
12193 fi
12194
12195 REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
12196 ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
12197 cf_cv_rel_version=$REL_VERSION
12198
12199 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
12200
12201 # Check whether --with-rel-version or --without-rel-version was given.
12202 if test "${with_rel_version+set}" = set; then
12203 withval="$with_rel_version"
12204 { echo "$as_me:12204: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
12205 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
12206 cf_cv_rel_version=$withval
12207 fi;
12208
12209 DIALOG_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
12210 DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
12211 test -n "DIALOG_MINOR" || DIALOG_MINOR=0
12212
12213 if test -n "$DIALOG_MAJOR" ; then
12214 case `echo "$DIALOG_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
12215 (0)
12216 ;;
12217 (*)
12218 { { echo "$as_me:12218: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
12219 echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
12220 { (exit 1); exit 1; }; }
12221 ;;
12222 esac
12223 else
12224 { { echo "$as_me:12224: error: Release major-version value is empty" >&5
12225 echo "$as_me: error: Release major-version value is empty" >&2;}
12226 { (exit 1); exit 1; }; }
12227 fi
12228
12229 if test -n "$DIALOG_MINOR" ; then
12230 case `echo "$DIALOG_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
12231 (0)
12232 ;;
12233 (*)
12234 { { echo "$as_me:12234: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
12235 echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
12236 { (exit 1); exit 1; }; }
12237 ;;
12238 esac
12239 else
12240 { { echo "$as_me:12240: error: Release minor-version value is empty" >&5
12241 echo "$as_me: error: Release minor-version value is empty" >&2;}
12242 { (exit 1); exit 1; }; }
12243 fi
12244
12245 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
12246
12247 # Check whether --with-abi-version or --without-abi-version was given.
12248 if test "${with_abi_version+set}" = set; then
12249 withval="$with_abi_version"
12250
12251 if test "x$cf_cv_abi_version" != "x$withval"
12252 then
12253 { echo "$as_me:12253: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
12254 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
12255 case "$cf_cv_rel_version" in
12256 (5.*)
12257 cf_cv_rel_version=$withval.0
12258 ;;
12259 (6.*)
12260 cf_cv_rel_version=$withval.9 # FIXME: should be 10 as of 6.0 release
12261 ;;
12262 esac
12263 fi
12264 cf_cv_abi_version=$withval
12265 fi;
12266
12267 if test -n "$cf_cv_abi_version" ; then
12268 case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
12269 (0)
12270 ;;
12271 (*)
12272 { { echo "$as_me:12272: error: ABI version is not a number: $cf_cv_abi_version" >&5
12273 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
12274 { (exit 1); exit 1; }; }
12275 ;;
12276 esac
12277 else
12278 { { echo "$as_me:12278: error: ABI version value is empty" >&5
12279 echo "$as_me: error: ABI version value is empty" >&2;}
12280 { (exit 1); exit 1; }; }
12281 fi
12282
12283 cf_cv_abi_default=$cf_cv_abi_version
12284
12285 LIB_MODEL=static
12286 DFT_LWR_MODEL=$LIB_MODEL
12287 LIBTOOL_MAKE="#"
12288
12289 # use to comment-out makefile lines
12290 MAKE_NORMAL=
12291 MAKE_STATIC=
12292 MAKE_SHARED="#"
12293 MAKE_DLLS="#"
12294
12295 shlibdir=$libdir
12296
12297 echo "$as_me:12297: checking if libtool -version-number should be used" >&5
12298 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
12299
12300 # Check whether --enable-libtool-version or --disable-libtool-version was given.
12301 if test "${enable_libtool_version+set}" = set; then
12302 enableval="$enable_libtool_version"
12303 test "$enableval" != no && enableval=yes
12304 if test "$enableval" != "yes" ; then
12305 cf_libtool_version=no
12306 else
12307 cf_libtool_version=yes
12308 fi
12309 else
12310 enableval=yes
12311 cf_libtool_version=yes
12312
12313 fi;
12314 echo "$as_me:12314: result: $cf_libtool_version" >&5
12315 echo "${ECHO_T}$cf_libtool_version" >&6
12316
12317 if test "$cf_libtool_version" = yes ; then
12318 LIBTOOL_VERSION="-version-number"
12319 else
12320 LIBTOOL_VERSION="-version-info"
12321 case "x$VERSION" in
12322 (x)
12323 { echo "$as_me:12323: WARNING: VERSION was not set" >&5
12324 echo "$as_me: WARNING: VERSION was not set" >&2;}
12325 ;;
12326 (x*.*.*)
12327 ABI_VERSION="$VERSION"
12328 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
12329
12330 echo "${as_me:-configure}:12330: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
12331
12332 ;;
12333 (x*:*:*)
12334 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
12335 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
12336
12337 echo "${as_me:-configure}:12337: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
12338
12339 ;;
12340 (*)
12341 { echo "$as_me:12341: WARNING: unexpected VERSION value: $VERSION" >&5
12342 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
12343 ;;
12344 esac
12345 fi
12346
12347 LIBTOOL=
12348
12349 # common library maintenance symbols that are convenient for libtool scripts:
12350 LIB_CREATE='${AR} -cr'
12351 LIB_OBJECT='${OBJECTS}'
12352 LIB_SUFFIX=.a
12353 LIB_PREP="$RANLIB"
12354
12355 # symbols used to prop libtool up to enable it to determine what it should be
12356 # doing:
12357 LIB_CLEAN=
12358 LIB_COMPILE=
12359 LIB_LINK='${CC}'
12360 LIB_INSTALL=
12361 LIB_UNINSTALL=
12362
12363 echo "$as_me:12363: checking if you want to build libraries with libtool" >&5
12364 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
12365
12366 # Check whether --with-libtool or --without-libtool was given.
12367 if test "${with_libtool+set}" = set; then
12368 withval="$with_libtool"
12369 with_libtool=$withval
12370 else
12371 with_libtool=no
12372 fi;
12373 echo "$as_me:12373: result: $with_libtool" >&5
12374 echo "${ECHO_T}$with_libtool" >&6
12375 if test "$with_libtool" != "no"; then
12376
12377 if test "$with_libtool" != "yes" ; then
12378
12379 if test "x$prefix" != xNONE; then
12380 cf_path_syntax="$prefix"
12381 else
12382 cf_path_syntax="$ac_default_prefix"
12383 fi
12384
12385 case "x$with_libtool" in
12386 (x\$\(*\)*|x\'*\'*)
12387 ;;
12388 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
12389 ;;
12390 (x\$\{*prefix\}*|x\$\{*dir\}*)
12391 eval with_libtool="$with_libtool"
12392 case "x$with_libtool" in
12393 (xNONE/*)
12394 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
12395 ;;
12396 esac
12397 ;;
12398 (xno|xNONE/*)
12399 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
12400 ;;
12401 (*)
12402 { { echo "$as_me:12402: error: expected a pathname, not \"$with_libtool\"" >&5
12403 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
12404 { (exit 1); exit 1; }; }
12405 ;;
12406 esac
12407
12408 LIBTOOL=$with_libtool
12409 else
12410 if test -n "$ac_tool_prefix"; then
12411 for ac_prog in libtool glibtool
12412 do
12413 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12414 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12415 echo "$as_me:12415: checking for $ac_word" >&5
12416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12417 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
12418 echo $ECHO_N "(cached) $ECHO_C" >&6
12419 else
12420 if test -n "$LIBTOOL"; then
12421 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
12422 else
12423 ac_save_IFS=$IFS; IFS=$ac_path_separator
12424 ac_dummy="$PATH"
12425 for ac_dir in $ac_dummy; do
12426 IFS=$ac_save_IFS
12427 test -z "$ac_dir" && ac_dir=.
12428 $as_executable_p "$ac_dir/$ac_word" || continue
12429 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
12430 echo "$as_me:12430: found $ac_dir/$ac_word" >&5
12431 break
12432 done
12433
12434 fi
12435 fi
12436 LIBTOOL=$ac_cv_prog_LIBTOOL
12437 if test -n "$LIBTOOL"; then
12438 echo "$as_me:12438: result: $LIBTOOL" >&5
12439 echo "${ECHO_T}$LIBTOOL" >&6
12440 else
12441 echo "$as_me:12441: result: no" >&5
12442 echo "${ECHO_T}no" >&6
12443 fi
12444
12445 test -n "$LIBTOOL" && break
12446 done
12447 fi
12448 if test -z "$LIBTOOL"; then
12449 ac_ct_LIBTOOL=$LIBTOOL
12450 for ac_prog in libtool glibtool
12451 do
12452 # Extract the first word of "$ac_prog", so it can be a program name with args.
12453 set dummy $ac_prog; ac_word=$2
12454 echo "$as_me:12454: checking for $ac_word" >&5
12455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12456 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
12457 echo $ECHO_N "(cached) $ECHO_C" >&6
12458 else
12459 if test -n "$ac_ct_LIBTOOL"; then
12460 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
12461 else
12462 ac_save_IFS=$IFS; IFS=$ac_path_separator
12463 ac_dummy="$PATH"
12464 for ac_dir in $ac_dummy; do
12465 IFS=$ac_save_IFS
12466 test -z "$ac_dir" && ac_dir=.
12467 $as_executable_p "$ac_dir/$ac_word" || continue
12468 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
12469 echo "$as_me:12469: found $ac_dir/$ac_word" >&5
12470 break
12471 done
12472
12473 fi
12474 fi
12475 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
12476 if test -n "$ac_ct_LIBTOOL"; then
12477 echo "$as_me:12477: result: $ac_ct_LIBTOOL" >&5
12478 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
12479 else
12480 echo "$as_me:12480: result: no" >&5
12481 echo "${ECHO_T}no" >&6
12482 fi
12483
12484 test -n "$ac_ct_LIBTOOL" && break
12485 done
12486 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
12487
12488 LIBTOOL=$ac_ct_LIBTOOL
12489 fi
12490
12491 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12492 then
12493 cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
12494 else
12495 cf_cv_libtool_version=
12496 fi
12497 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12498
12499 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
12500 then
12501
12502 unset ac_cv_prog_ac_ct_LIBTOOL
12503 unset ac_ct_LIBTOOL
12504 unset LIBTOOL
12505
12506 if test -n "$ac_tool_prefix"; then
12507 for ac_prog in glibtool
12508 do
12509 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12510 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12511 echo "$as_me:12511: checking for $ac_word" >&5
12512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12513 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
12514 echo $ECHO_N "(cached) $ECHO_C" >&6
12515 else
12516 if test -n "$LIBTOOL"; then
12517 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
12518 else
12519 ac_save_IFS=$IFS; IFS=$ac_path_separator
12520 ac_dummy="$PATH"
12521 for ac_dir in $ac_dummy; do
12522 IFS=$ac_save_IFS
12523 test -z "$ac_dir" && ac_dir=.
12524 $as_executable_p "$ac_dir/$ac_word" || continue
12525 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
12526 echo "$as_me:12526: found $ac_dir/$ac_word" >&5
12527 break
12528 done
12529
12530 fi
12531 fi
12532 LIBTOOL=$ac_cv_prog_LIBTOOL
12533 if test -n "$LIBTOOL"; then
12534 echo "$as_me:12534: result: $LIBTOOL" >&5
12535 echo "${ECHO_T}$LIBTOOL" >&6
12536 else
12537 echo "$as_me:12537: result: no" >&5
12538 echo "${ECHO_T}no" >&6
12539 fi
12540
12541 test -n "$LIBTOOL" && break
12542 done
12543 fi
12544 if test -z "$LIBTOOL"; then
12545 ac_ct_LIBTOOL=$LIBTOOL
12546 for ac_prog in glibtool
12547 do
12548 # Extract the first word of "$ac_prog", so it can be a program name with args.
12549 set dummy $ac_prog; ac_word=$2
12550 echo "$as_me:12550: checking for $ac_word" >&5
12551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12552 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
12553 echo $ECHO_N "(cached) $ECHO_C" >&6
12554 else
12555 if test -n "$ac_ct_LIBTOOL"; then
12556 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
12557 else
12558 ac_save_IFS=$IFS; IFS=$ac_path_separator
12559 ac_dummy="$PATH"
12560 for ac_dir in $ac_dummy; do
12561 IFS=$ac_save_IFS
12562 test -z "$ac_dir" && ac_dir=.
12563 $as_executable_p "$ac_dir/$ac_word" || continue
12564 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
12565 echo "$as_me:12565: found $ac_dir/$ac_word" >&5
12566 break
12567 done
12568
12569 fi
12570 fi
12571 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
12572 if test -n "$ac_ct_LIBTOOL"; then
12573 echo "$as_me:12573: result: $ac_ct_LIBTOOL" >&5
12574 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
12575 else
12576 echo "$as_me:12576: result: no" >&5
12577 echo "${ECHO_T}no" >&6
12578 fi
12579
12580 test -n "$ac_ct_LIBTOOL" && break
12581 done
12582 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
12583
12584 LIBTOOL=$ac_ct_LIBTOOL
12585 fi
12586
12587 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12588 then
12589 cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
12590 else
12591 cf_cv_libtool_version=
12592 fi
12593 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12594
12595 fi
12596 fi
12597 if test -z "$LIBTOOL" ; then
12598 { { echo "$as_me:12598: error: Cannot find libtool" >&5
12599 echo "$as_me: error: Cannot find libtool" >&2;}
12600 { (exit 1); exit 1; }; }
12601 fi
12602 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
12603 LIB_OBJECT='${OBJECTS:.${OBJEXT}=.lo}'
12604 LIB_SUFFIX=.la
12605 LIB_CLEAN='${LIBTOOL} --mode=clean'
12606 LIB_COMPILE='${LIBTOOL} --mode=compile'
12607 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
12608 LIB_INSTALL='${LIBTOOL} --mode=install'
12609 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
12610 LIB_PREP=:
12611
12612 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12613 then
12614 echo "$as_me:12614: checking version of $LIBTOOL" >&5
12615 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
12616
12617 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
12618 then
12619 cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
12620 else
12621 cf_cv_libtool_version=
12622 fi
12623 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
12624
12625 echo "$as_me:12625: result: $cf_cv_libtool_version" >&5
12626 echo "${ECHO_T}$cf_cv_libtool_version" >&6
12627
12628 if test -n "$cf_cv_libtool_version"
12629 then
12630 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
12631 case "x$cf_check_libtool_version" in
12632 (*...GNU-libtool...*)
12633 ;;
12634 (*)
12635 { { echo "$as_me:12635: error: This is not GNU libtool" >&5
12636 echo "$as_me: error: This is not GNU libtool" >&2;}
12637 { (exit 1); exit 1; }; }
12638 ;;
12639 esac
12640 else
12641 { { echo "$as_me:12641: error: No version found for $LIBTOOL" >&5
12642 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
12643 { (exit 1); exit 1; }; }
12644 fi
12645
12646 else
12647 { { echo "$as_me:12647: error: GNU libtool has not been found" >&5
12648 echo "$as_me: error: GNU libtool has not been found" >&2;}
12649 { (exit 1); exit 1; }; }
12650 fi
12651
12652 # special hack to add -no-undefined (which libtool should do for itself)
12653 LT_UNDEF=
12654 case "$cf_cv_system_name" in
12655 (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
12656 LT_UNDEF=-no-undefined
12657 ;;
12658 esac
12659
12660 # special hack to add --tag option for C++ compiler
12661 case "$cf_cv_libtool_version" in
12662 (1.[5-9]*|[2-9].[0-9.a-z]*)
12663 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
12664 LIBTOOL="$LIBTOOL --tag=CC"
12665 ;;
12666 (*)
12667 LIBTOOL_CXX="$LIBTOOL"
12668 ;;
12669 esac
12670 else
12671 LIBTOOL=""
12672 LIBTOOL_CXX=""
12673 fi
12674
12675 test -z "$LIBTOOL" && ECHO_LT=
12676
12677 LIB_CREATE="$LIB_CREATE \$@"
12678
12679 if test "$with_libtool" = "yes" ; then
12680 OBJEXT="lo"
12681 LIB_MODEL=libtool
12682 DFT_LWR_MODEL=$LIB_MODEL
12683 LIBTOOL_MAKE=
12684
12685 echo "$as_me:12685: checking for additional libtool options" >&5
12686 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
12687
12688 # Check whether --with-libtool-opts or --without-libtool-opts was given.
12689 if test "${with_libtool_opts+set}" = set; then
12690 withval="$with_libtool_opts"
12691 with_libtool_opts=$withval
12692 else
12693 with_libtool_opts=no
12694 fi;
12695 echo "$as_me:12695: result: $with_libtool_opts" >&5
12696 echo "${ECHO_T}$with_libtool_opts" >&6
12697
12698 case .$with_libtool_opts in
12699 (.yes|.no|.)
12700 ;;
12701 (*)
12702 LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
12703 ;;
12704 esac
12705
12706 echo "$as_me:12706: checking if exported-symbols file should be used" >&5
12707 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
12708
12709 # Check whether --with-export-syms or --without-export-syms was given.
12710 if test "${with_export_syms+set}" = set; then
12711 withval="$with_export_syms"
12712 with_export_syms=$withval
12713 else
12714 with_export_syms=no
12715 fi;
12716 if test "x$with_export_syms" = xyes
12717 then
12718 with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
12719
12720 fi
12721 echo "$as_me:12721: result: $with_export_syms" >&5
12722 echo "${ECHO_T}$with_export_syms" >&6
12723 if test "x$with_export_syms" != xno
12724 then
12725 EXPORT_SYMS="-export-symbols $with_export_syms"
12726
12727 fi
12728
12729 MAKE_NORMAL="#"
12730 MAKE_STATIC="#"
12731 MAKE_SHARED=
12732 else
12733 echo "$as_me:12733: checking if you want to build shared libraries" >&5
12734 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
12735
12736 # Check whether --with-shared or --without-shared was given.
12737 if test "${with_shared+set}" = set; then
12738 withval="$with_shared"
12739 with_shared=$withval
12740 else
12741 with_shared=no
12742 fi;
12743 echo "$as_me:12743: result: $with_shared" >&5
12744 echo "${ECHO_T}$with_shared" >&6
12745 if test "$with_shared" = "yes" ; then
12746 LIB_MODEL=shared
12747 DFT_LWR_MODEL=$LIB_MODEL
12748
12749 RM_SHARED_OPTS=
12750 LOCAL_LDFLAGS=
12751 LOCAL_LDFLAGS2=
12752 LD_SHARED_OPTS=
12753 INSTALL_LIB="-m 644"
12754 : ${rel_builddir:=.}
12755
12756 shlibdir=$libdir
12757
12758 MAKE_DLLS="#"
12759
12760 cf_cv_do_symlinks=no
12761 cf_ld_rpath_opt=
12762 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
12763
12764 echo "$as_me:12764: checking whether to use release or ABI version in shared library file names" >&5
12765 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
12766
12767 # Check whether --with-shlib-version or --without-shlib-version was given.
12768 if test "${with_shlib_version+set}" = set; then
12769 withval="$with_shlib_version"
12770 test -z "$withval" && withval=auto
12771 case "$withval" in
12772 (yes)
12773 cf_cv_shlib_version=auto
12774 ;;
12775 (rel|abi|auto)
12776 cf_cv_shlib_version=$withval
12777 ;;
12778 (*)
12779 echo "$as_me:12779: result: $withval" >&5
12780 echo "${ECHO_T}$withval" >&6
12781 { { echo "$as_me:12781: error: option value must be one of: rel, abi, or auto" >&5
12782 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
12783 { (exit 1); exit 1; }; }
12784 ;;
12785 esac
12786
12787 else
12788 cf_cv_shlib_version=auto
12789 fi;
12790 echo "$as_me:12790: result: $cf_cv_shlib_version" >&5
12791 echo "${ECHO_T}$cf_cv_shlib_version" >&6
12792
12793 cf_cv_rm_so_locs=no
12794 cf_try_cflags=
12795
12796 # Some less-capable ports of gcc support only -fpic
12797 CC_SHARED_OPTS=
12798
12799 cf_try_fPIC=no
12800 if test "$GCC" = yes
12801 then
12802 cf_try_fPIC=yes
12803 else
12804 case "$cf_cv_system_name" in
12805 (*linux*) # e.g., PGI compiler
12806 cf_try_fPIC=yes
12807 ;;
12808 esac
12809 fi
12810
12811 if test "$cf_try_fPIC" = yes
12812 then
12813 echo "$as_me:12813: checking which $CC option to use" >&5
12814 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
12815 cf_save_CFLAGS="$CFLAGS"
12816 for CC_SHARED_OPTS in -fPIC -fpic ''
12817 do
12818 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
12819 cat >"conftest.$ac_ext" <<_ACEOF
12820 #line 12820 "configure"
12821 #include "confdefs.h"
12822 #include <stdio.h>
12823 int
12824 main (void)
12825 {
12826 int x = 1; (void)x
12827 ;
12828 return 0;
12829 }
12830 _ACEOF
12831 rm -f "conftest.$ac_objext"
12832 if { (eval echo "$as_me:12832: \"$ac_compile\"") >&5
12833 (eval $ac_compile) 2>&5
12834 ac_status=$?
12835 echo "$as_me:12835: \$? = $ac_status" >&5
12836 (exit "$ac_status"); } &&
12837 { ac_try='test -s "conftest.$ac_objext"'
12838 { (eval echo "$as_me:12838: \"$ac_try\"") >&5
12839 (eval $ac_try) 2>&5
12840 ac_status=$?
12841 echo "$as_me:12841: \$? = $ac_status" >&5
12842 (exit "$ac_status"); }; }; then
12843 break
12844 else
12845 echo "$as_me: failed program was:" >&5
12846 cat "conftest.$ac_ext" >&5
12847 fi
12848 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12849 done
12850 echo "$as_me:12850: result: $CC_SHARED_OPTS" >&5
12851 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
12852 CFLAGS="$cf_save_CFLAGS"
12853 fi
12854
12855 cf_cv_shlib_version_infix=no
12856
12857 case "$cf_cv_system_name" in
12858 (aix4.3-9*|aix[5-7]*)
12859 if test "$GCC" = yes; then
12860 CC_SHARED_OPTS='-Wl,-brtl'
12861 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12862 else
12863 CC_SHARED_OPTS='-brtl'
12864 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
12865 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
12866 fi
12867 ;;
12868 (beos*)
12869 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
12870 ;;
12871 (cygwin*)
12872 CC_SHARED_OPTS=
12873 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12874 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12875 cf_cv_shlib_version=cygdll
12876 cf_cv_shlib_version_infix=cygdll
12877 shlibdir=$bindir
12878 MAKE_DLLS=
12879 cat >mk_shared_lib.sh <<-CF_EOF
12880 #!$SHELL
12881 SHARED_LIB=\$1
12882 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12883 shift
12884 cat <<-EOF
12885 Linking shared library
12886 ** SHARED_LIB \$SHARED_LIB
12887 ** IMPORT_LIB \$IMPORT_LIB
12888 EOF
12889 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12890 CF_EOF
12891 chmod +x mk_shared_lib.sh
12892 ;;
12893 (msys*)
12894 CC_SHARED_OPTS=
12895 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12896 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12897 cf_cv_shlib_version=msysdll
12898 cf_cv_shlib_version_infix=msysdll
12899 shlibdir=$bindir
12900 MAKE_DLLS=
12901 cat >mk_shared_lib.sh <<-CF_EOF
12902 #!$SHELL
12903 SHARED_LIB=\$1
12904 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
12905 shift
12906 cat <<-EOF
12907 Linking shared library
12908 ** SHARED_LIB \$SHARED_LIB
12909 ** IMPORT_LIB \$IMPORT_LIB
12910 EOF
12911 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12912 CF_EOF
12913 chmod +x mk_shared_lib.sh
12914 ;;
12915 (darwin*)
12916 cf_try_cflags="no-cpp-precomp"
12917 CC_SHARED_OPTS="-dynamic"
12918 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
12919 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
12920 cf_cv_shlib_version_infix=yes
12921 echo "$as_me:12921: checking if ld -search_paths_first works" >&5
12922 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
12923 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
12924 echo $ECHO_N "(cached) $ECHO_C" >&6
12925 else
12926
12927 cf_save_LDFLAGS=$LDFLAGS
12928 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
12929 cat >"conftest.$ac_ext" <<_ACEOF
12930 #line 12930 "configure"
12931 #include "confdefs.h"
12932
12933 int
12934 main (void)
12935 {
12936 int i;
12937 ;
12938 return 0;
12939 }
12940 _ACEOF
12941 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12942 if { (eval echo "$as_me:12942: \"$ac_link\"") >&5
12943 (eval $ac_link) 2>&5
12944 ac_status=$?
12945 echo "$as_me:12945: \$? = $ac_status" >&5
12946 (exit "$ac_status"); } &&
12947 { ac_try='test -s "conftest$ac_exeext"'
12948 { (eval echo "$as_me:12948: \"$ac_try\"") >&5
12949 (eval $ac_try) 2>&5
12950 ac_status=$?
12951 echo "$as_me:12951: \$? = $ac_status" >&5
12952 (exit "$ac_status"); }; }; then
12953 cf_cv_ldflags_search_paths_first=yes
12954 else
12955 echo "$as_me: failed program was:" >&5
12956 cat "conftest.$ac_ext" >&5
12957 cf_cv_ldflags_search_paths_first=no
12958 fi
12959 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12960 LDFLAGS=$cf_save_LDFLAGS
12961 fi
12962 echo "$as_me:12962: result: $cf_cv_ldflags_search_paths_first" >&5
12963 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
12964 if test "$cf_cv_ldflags_search_paths_first" = yes; then
12965 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
12966 fi
12967 ;;
12968 (haiku*)
12969
12970 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12971 if test "$cf_cv_shlib_version" = rel; then
12972 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12973 else
12974 cf_cv_shared_soname='`basename $@`'
12975 fi
12976
12977 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12978 ;;
12979 (hpux[7-8]*)
12980 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
12981 if test "$GCC" != yes; then
12982 CC_SHARED_OPTS='+Z'
12983 fi
12984 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
12985 INSTALL_LIB="-m 555"
12986 ;;
12987 (hpux*)
12988 # (tested with gcc 2.7.2 -- I don't have c89)
12989 if test "$GCC" = yes; then
12990 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
12991 else
12992 CC_SHARED_OPTS='+Z'
12993 LD_SHARED_OPTS='-Wl,+b,${libdir}'
12994 fi
12995 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
12996 # HP-UX shared libraries must be executable, and should be
12997 # readonly to exploit a quirk in the memory manager.
12998 INSTALL_LIB="-m 555"
12999 ;;
13000 (interix*)
13001 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13002 if test "$cf_cv_shlib_version" = rel; then
13003 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13004 else
13005 cf_shared_soname='`basename $@`'
13006 fi
13007 CC_SHARED_OPTS=
13008 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
13009 ;;
13010 (irix*)
13011 if test "$cf_cv_enable_rpath" = yes ; then
13012 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13013 fi
13014 # tested with IRIX 5.2 and 'cc'.
13015 if test "$GCC" != yes; then
13016 CC_SHARED_OPTS='-KPIC'
13017 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
13018 else
13019 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
13020 fi
13021 cf_cv_rm_so_locs=yes
13022 ;;
13023 (linux*|gnu*|k*bsd*-gnu)
13024 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13025 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13026 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13027 fi
13028 if test "$cf_cv_enable_rpath" = yes ; then
13029 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13030 fi
13031
13032 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13033 if test "$cf_cv_shlib_version" = rel; then
13034 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13035 else
13036 cf_cv_shared_soname='`basename $@`'
13037 fi
13038
13039 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13040 ;;
13041 (mingw*msvc*)
13042 cf_cv_shlib_version=msvcdll
13043 cf_cv_shlib_version_infix=msvcdll
13044 shlibdir=$bindir
13045 MAKE_DLLS=
13046 if test "$DFT_LWR_MODEL" = "shared" ; then
13047 LOCAL_LDFLAGS="-link -dll"
13048 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13049 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
13050 fi
13051 CC_SHARED_OPTS=
13052 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
13053 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
13054 cat >mk_shared_lib.sh <<-CF_EOF
13055 #!$SHELL
13056 SHARED_LIB=\$1
13057 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
13058 shift
13059 my_ld=\$1
13060 shift
13061 cat <<-EOF
13062 Linking shared library
13063 ** SHARED LIB \$SHARED_LIB
13064 ** IMPORT_LIB \$IMPORT_LIB
13065 EOF
13066 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
13067 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
13068 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
13069 CF_EOF
13070 chmod +x mk_shared_lib.sh
13071 cat >mk_prog.sh <<-CF_EOF
13072 #!$SHELL
13073 shift
13074 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
13075 LD="$LD"
13076 clopts=()
13077 ldopts=("/subsystem:console")
13078 libs=()
13079 isdll=0
13080 while test \$# -gt 0; do
13081 case "\$1" in
13082 -link)
13083 # ignore -link argument
13084 ;;
13085 -M[TD] | -M[TD]d)
13086 # ignore runtime-library option
13087 ;;
13088 -dll)
13089 isdll=1
13090 ;;
13091 -W* | -w*)
13092 # ignore warnings
13093 ;;
13094 -D*)
13095 clopts+=("\$1")
13096 ;;
13097 -I*)
13098 clopts+=("\$1")
13099 ;;
13100 -l*)
13101 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
13102 ;;
13103 -L*)
13104 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
13105 ;;
13106 *.obj | *.$OBJEXT)
13107 ldopts+=("\$1")
13108 ;;
13109 -Wl,*)
13110 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
13111 ldopts+=("\${linkarg}")
13112 done
13113 ;;
13114 *.lib)
13115 ldopts+=("\$1")
13116 ;;
13117 -o)
13118 shift
13119 ldopts+=("-out:\$1")
13120 ;;
13121 *)
13122 clopts+=("\$1")
13123 ldopts+=("\$1")
13124 ;;
13125 esac
13126 shift
13127 done
13128 if [ "\$isdll" -ne 0 ]; then
13129 for lib in \${libs[*]}; do
13130 ldopts+=("\$lib.dll.lib")
13131 done
13132 else
13133 for lib in \${libs[*]}; do
13134 ldopts+=("\$lib.lib")
13135 done
13136 fi
13137 cat <<-EOF
13138 Creating program
13139 ** ld options: "\${ldopts[@]}"
13140 EOF
13141 exec \$LD \${ldopts[@]}
13142 CF_EOF
13143 chmod +x mk_prog.sh
13144 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
13145 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
13146 ;;
13147 (mingw*)
13148 cf_cv_shlib_version=mingw
13149 cf_cv_shlib_version_infix=mingw
13150 shlibdir=$bindir
13151 MAKE_DLLS=
13152 if test "$DFT_LWR_MODEL" = "shared" ; then
13153 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
13154 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13155 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
13156 fi
13157 CC_SHARED_OPTS=
13158 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
13159 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
13160 cat >mk_shared_lib.sh <<-CF_EOF
13161 #!$SHELL
13162 SHARED_LIB=\$1
13163 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
13164 shift
13165 cat <<-EOF
13166 Linking shared library
13167 ** SHARED_LIB \$SHARED_LIB
13168 ** IMPORT_LIB \$IMPORT_LIB
13169 EOF
13170 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
13171 CF_EOF
13172 chmod +x mk_shared_lib.sh
13173 ;;
13174 (openbsd[2-9].*|mirbsd*)
13175 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13176 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13177 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13178 fi
13179 if test "$cf_cv_enable_rpath" = yes ; then
13180 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13181 fi
13182 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13183
13184 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13185 if test "$cf_cv_shlib_version" = rel; then
13186 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13187 else
13188 cf_cv_shared_soname='`basename $@`'
13189 fi
13190
13191 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13192 ;;
13193 (nskJ*)
13194 CC_SHARED_OPTS=
13195 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
13196 ;;
13197 (nskL*)
13198 CC_SHARED_OPTS=
13199 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
13200 ;;
13201 (nto-qnx*|openbsd*|freebsd[12].*)
13202 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13203 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
13204 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13205 ;;
13206 (dragonfly*|freebsd*)
13207 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13208 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13209 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13210 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
13211 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13212 fi
13213
13214 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13215 if test "$cf_cv_shlib_version" = rel; then
13216 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13217 else
13218 cf_cv_shared_soname='`basename $@`'
13219 fi
13220
13221 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
13222 ;;
13223 (netbsd*)
13224 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
13225 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
13226 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
13227 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13228 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
13229 if test "$cf_cv_shlib_version" = auto; then
13230 if test -f /usr/libexec/ld.elf_so; then
13231 cf_cv_shlib_version=abi
13232 else
13233 cf_cv_shlib_version=rel
13234 fi
13235 fi
13236
13237 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13238 if test "$cf_cv_shlib_version" = rel; then
13239 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13240 else
13241 cf_cv_shared_soname='`basename $@`'
13242 fi
13243
13244 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
13245 else
13246 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
13247 fi
13248 ;;
13249 (osf*|mls+*)
13250 # tested with OSF/1 V3.2 and 'cc'
13251 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
13252 # link with shared libs).
13253 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
13254 case "$host_os" in
13255 (osf4*)
13256 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
13257 ;;
13258 esac
13259 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
13260 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
13261 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
13262 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13263 fi
13264 cf_cv_rm_so_locs=yes
13265 ;;
13266 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
13267 # tested with osr5.0.5
13268 if test "$GCC" != yes; then
13269 CC_SHARED_OPTS='-belf -KPIC'
13270 fi
13271 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
13272 if test "$cf_cv_enable_rpath" = yes ; then
13273 # only way is to set LD_RUN_PATH but no switch for it
13274 RUN_PATH=$libdir
13275 fi
13276 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13277 LINK_PROGS='LD_RUN_PATH=${libdir}'
13278 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
13279 ;;
13280 (sunos4*)
13281 # tested with SunOS 4.1.1 and gcc 2.7.0
13282 if test "$GCC" != yes; then
13283 CC_SHARED_OPTS='-KPIC'
13284 fi
13285 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
13286 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13287 ;;
13288 (solaris2*)
13289 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
13290 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
13291 if test "$DFT_LWR_MODEL" = "shared" ; then
13292 LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
13293 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
13294 fi
13295 if test "$cf_cv_enable_rpath" = yes ; then
13296 EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
13297 fi
13298
13299 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
13300 if test "$cf_cv_shlib_version" = rel; then
13301 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
13302 else
13303 cf_cv_shared_soname='`basename $@`'
13304 fi
13305
13306 if test "$GCC" != yes; then
13307 cf_save_CFLAGS="$CFLAGS"
13308 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
13309 do
13310 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
13311 cat >"conftest.$ac_ext" <<_ACEOF
13312 #line 13312 "configure"
13313 #include "confdefs.h"
13314 #include <stdio.h>
13315 int
13316 main (void)
13317 {
13318 printf("Hello\\n");
13319 ;
13320 return 0;
13321 }
13322 _ACEOF
13323 rm -f "conftest.$ac_objext"
13324 if { (eval echo "$as_me:13324: \"$ac_compile\"") >&5
13325 (eval $ac_compile) 2>&5
13326 ac_status=$?
13327 echo "$as_me:13327: \$? = $ac_status" >&5
13328 (exit "$ac_status"); } &&
13329 { ac_try='test -s "conftest.$ac_objext"'
13330 { (eval echo "$as_me:13330: \"$ac_try\"") >&5
13331 (eval $ac_try) 2>&5
13332 ac_status=$?
13333 echo "$as_me:13333: \$? = $ac_status" >&5
13334 (exit "$ac_status"); }; }; then
13335 break
13336 else
13337 echo "$as_me: failed program was:" >&5
13338 cat "conftest.$ac_ext" >&5
13339 fi
13340 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13341 done
13342 CFLAGS="$cf_save_CFLAGS"
13343 CC_SHARED_OPTS=$cf_shared_opts
13344 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
13345 else
13346 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
13347 fi
13348 ;;
13349 (sysv5uw7*|unix_sv*)
13350 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
13351 if test "$GCC" != yes; then
13352 CC_SHARED_OPTS='-KPIC'
13353 fi
13354 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
13355 ;;
13356 (*)
13357 CC_SHARED_OPTS='unknown'
13358 MK_SHARED_LIB='echo unknown'
13359 ;;
13360 esac
13361
13362 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
13363 case "$cf_cv_shlib_version" in
13364 (rel|abi)
13365 case "$MK_SHARED_LIB" in
13366 (*'-o $@')
13367 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
13368 ;;
13369 (*)
13370 { echo "$as_me:13370: WARNING: ignored --with-shlib-version" >&5
13371 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
13372 ;;
13373 esac
13374 ;;
13375 esac
13376
13377 if test -n "$cf_try_cflags"
13378 then
13379 cat > conftest.$ac_ext <<EOF
13380 #line 13380 "${as_me:-configure}"
13381 #include <stdio.h>
13382 int main(int argc, char *argv[])
13383 {
13384 printf("hello\\n");
13385 return (argv[argc-1] == NULL) ;
13386 }
13387 EOF
13388 cf_save_CFLAGS="$CFLAGS"
13389 for cf_opt in $cf_try_cflags
13390 do
13391 CFLAGS="$cf_save_CFLAGS -$cf_opt"
13392 echo "$as_me:13392: checking if CFLAGS option -$cf_opt works" >&5
13393 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
13394 if { (eval echo "$as_me:13394: \"$ac_compile\"") >&5
13395 (eval $ac_compile) 2>&5
13396 ac_status=$?
13397 echo "$as_me:13397: \$? = $ac_status" >&5
13398 (exit "$ac_status"); }; then
13399 echo "$as_me:13399: result: yes" >&5
13400 echo "${ECHO_T}yes" >&6
13401 cf_save_CFLAGS="$CFLAGS"
13402 else
13403 echo "$as_me:13403: result: no" >&5
13404 echo "${ECHO_T}no" >&6
13405 fi
13406 done
13407 CFLAGS="$cf_save_CFLAGS"
13408 fi
13409
13410 # RPATH_LIST is a colon-separated list of directories
13411 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
13412 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
13413
13414 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
13415
13416 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
13417
13418 echo "${as_me:-configure}:13418: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
13419
13420 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
13421
13422 echo "${as_me:-configure}:13422: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
13423
13424 LIB_PREP=:
13425 LIB_CREATE="$MK_SHARED_LIB"
13426 CFLAGS="$CFLAGS $CC_SHARED_OPTS"
13427 MAKE_NORMAL="#"
13428 MAKE_STATIC="#"
13429 MAKE_SHARED=
13430 fi
13431 fi
13432
13433 LIB_SUFFIX=
13434
13435 case X$LIB_MODEL in
13436 (Xlibtool)
13437 DFT_LIB_SUFFIX='.la'
13438 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13439 ;;
13440 (Xdebug)
13441 case "$cf_cv_system_name" in
13442 (*-msvc*)
13443 DFT_LIB_SUFFIX='_g.lib'
13444 ;;
13445 (*)
13446 DFT_LIB_SUFFIX='_g.a'
13447 ;;
13448 esac
13449 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13450 ;;
13451 (Xprofile)
13452 case "$cf_cv_system_name" in
13453 (*-msvc*)
13454 DFT_LIB_SUFFIX='_p.lib'
13455 ;;
13456 (*)
13457 DFT_LIB_SUFFIX='_p.a'
13458 ;;
13459 esac
13460 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13461 ;;
13462 (Xshared)
13463 case "$cf_cv_system_name" in
13464 (aix[5-7]*)
13465 DFT_LIB_SUFFIX='.so'
13466 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13467 ;;
13468 (*-msvc*)
13469 DFT_LIB_SUFFIX='.dll'
13470 DFT_DEP_SUFFIX='.dll.lib'
13471 ;;
13472 (cygwin*|msys*|mingw*)
13473 DFT_LIB_SUFFIX='.dll'
13474 DFT_DEP_SUFFIX='.dll.a'
13475 ;;
13476 (darwin*)
13477 DFT_LIB_SUFFIX='.dylib'
13478 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13479 ;;
13480 (hpux*)
13481 case "$target" in
13482 (ia64*)
13483 DFT_LIB_SUFFIX='.so'
13484 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13485 ;;
13486 (*)
13487 DFT_LIB_SUFFIX='.sl'
13488 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13489 ;;
13490 esac
13491 ;;
13492 (*)
13493 DFT_LIB_SUFFIX='.so'
13494 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13495 ;;
13496 esac
13497 ;;
13498 (*)
13499 case "$target" in
13500 (*-msvc*)
13501 DFT_LIB_SUFFIX='.lib'
13502 ;;
13503 (*)
13504 DFT_LIB_SUFFIX='.a'
13505 ;;
13506 esac
13507 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
13508 ;;
13509 esac
13510 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
13511 then
13512 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
13513 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
13514 fi
13515
13516 LIB_SUFFIX=$DFT_LIB_SUFFIX
13517
13518 if test "$with_libtool" = "yes" ; then
13519 :
13520 elif test "$with_shared" = "yes" ; then
13521 echo "$as_me:13521: checking if versioned-symbols file should be used" >&5
13522 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
13523
13524 # Check whether --with-versioned-syms or --without-versioned-syms was given.
13525 if test "${with_versioned_syms+set}" = set; then
13526 withval="$with_versioned_syms"
13527 with_versioned_syms=$withval
13528 else
13529 with_versioned_syms=no
13530 fi;
13531 case "x$with_versioned_syms" in
13532 (xyes)
13533 with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
13534
13535 ;;
13536 (xno)
13537 ;;
13538 (x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
13539 test -f "$with_versioned_syms" || { { echo "$as_me:13539: error: expected a filename: $with_versioned_syms" >&5
13540 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
13541 { (exit 1); exit 1; }; }
13542 ;;
13543 (*)
13544 test -f "$with_versioned_syms" || { { echo "$as_me:13544: error: expected a filename: $with_versioned_syms" >&5
13545 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
13546 { (exit 1); exit 1; }; }
13547 with_versioned_syms=`pwd`/"$with_versioned_syms"
13548 ;;
13549 esac
13550 echo "$as_me:13550: result: $with_versioned_syms" >&5
13551 echo "${ECHO_T}$with_versioned_syms" >&6
13552
13553 RESULTING_SYMS=
13554 VERSIONED_SYMS=
13555 WILDCARD_SYMS=
13556
13557 if test "x$with_versioned_syms" != xno
13558 then
13559 RESULTING_SYMS=$with_versioned_syms
13560 case "x$MK_SHARED_LIB" in
13561 (*-Wl,*)
13562 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
13563 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
13564 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
13565
13566 echo "${as_me:-configure}:13566: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
13567
13568 LIB_CREATE="$MK_SHARED_LIB"
13569 ;;
13570 (*-dy\ *)
13571 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
13572 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
13573 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
13574
13575 echo "${as_me:-configure}:13575: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
13576
13577 LIB_CREATE="$MK_SHARED_LIB"
13578 ;;
13579 (*)
13580 { echo "$as_me:13580: WARNING: this system does not support versioned-symbols" >&5
13581 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
13582 ;;
13583 esac
13584
13585 # Linux ld can selectively override scope, e.g., of symbols beginning with
13586 # "_" by first declaring some as global, and then using a wildcard to
13587 # declare the others as local. Some other loaders cannot do this. Check
13588 # by constructing a (very) simple shared library and inspecting its
13589 # symbols.
13590 if test "x$VERSIONED_SYMS" != "x"
13591 then
13592 echo "$as_me:13592: checking if wildcards can be used to selectively omit symbols" >&5
13593 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
13594 WILDCARD_SYMS=no
13595
13596 # make sources
13597 rm -f conftest.*
13598
13599 cat >conftest.ver <<EOF
13600 module_1.0 {
13601 global:
13602 globalf1;
13603 local:
13604 localf1;
13605 };
13606 module_2.0 {
13607 global:
13608 globalf2;
13609 local:
13610 localf2;
13611 _*;
13612 } module_1.0;
13613 submodule_1.0 {
13614 global:
13615 subglobalf1;
13616 _ismissing;
13617 local:
13618 sublocalf1;
13619 };
13620 submodule_2.0 {
13621 global:
13622 subglobalf2;
13623 local:
13624 sublocalf2;
13625 _*;
13626 } submodule_1.0;
13627 EOF
13628 cat >conftest.$ac_ext <<EOF
13629 #line 13629 "configure"
13630 extern int _ismissing(void); int _ismissing(void) { return 1; }
13631 extern int _localf1(void); int _localf1(void) { return 1; }
13632 extern int _localf2(void); int _localf2(void) { return 2; }
13633 extern int globalf1(void); int globalf1(void) { return 1; }
13634 extern int globalf2(void); int globalf2(void) { return 2; }
13635 extern int _sublocalf1(void); int _sublocalf1(void) { return 1; }
13636 extern int _sublocalf2(void); int _sublocalf2(void) { return 2; }
13637 extern int subglobalf1(void); int subglobalf1(void) { return 1; }
13638 extern int subglobalf2(void); int subglobalf2(void) { return 2; }
13639 EOF
13640 cat >conftest.mk <<EOF
13641 CC=${CC}
13642 CFLAGS=${CFLAGS}
13643 CPPFLAGS=${CPPFLAGS}
13644 LDFLAGS=${LDFLAGS}
13645 LIBS=${LIBS}
13646 VERSIONED_SYMS=${VERSIONED_SYMS}
13647 RESULTING_SYMS=conftest.ver
13648 MK_SHARED_LIB=${MK_SHARED_LIB}
13649 conftest.so: conftest.$ac_cv_objext
13650 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
13651 EOF
13652
13653 # compile source, make library
13654 if make -f conftest.mk 2>&5 >/dev/null
13655 then
13656 # test for missing symbol in either Data or Text section
13657 cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[ ][DT][ ]'`"
13658 test -n "$cf_missing" && WILDCARD_SYMS=yes
13659 fi
13660 echo "$as_me:13660: result: $WILDCARD_SYMS" >&5
13661 echo "${ECHO_T}$WILDCARD_SYMS" >&6
13662 rm -f conftest.*
13663 fi
13664 fi
13665
13666 fi
13667
13668 echo "$as_me:13668: checking for specific curses-directory" >&5
13669 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
13670
13671 # Check whether --with-curses-dir or --without-curses-dir was given.
13672 if test "${with_curses_dir+set}" = set; then
13673 withval="$with_curses_dir"
13674 cf_cv_curses_dir=$withval
13675 else
13676 cf_cv_curses_dir=no
13677 fi;
13678 echo "$as_me:13678: result: $cf_cv_curses_dir" >&5
13679 echo "${ECHO_T}$cf_cv_curses_dir" >&6
13680
13681 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
13682 then
13683
13684 if test "x$prefix" != xNONE; then
13685 cf_path_syntax="$prefix"
13686 else
13687 cf_path_syntax="$ac_default_prefix"
13688 fi
13689
13690 case "x$withval" in
13691 (x\$\(*\)*|x\'*\'*)
13692 ;;
13693 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
13694 ;;
13695 (x\$\{*prefix\}*|x\$\{*dir\}*)
13696 eval withval="$withval"
13697 case "x$withval" in
13698 (xNONE/*)
13699 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13700 ;;
13701 esac
13702 ;;
13703 (xno|xNONE/*)
13704 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13705 ;;
13706 (*)
13707 { { echo "$as_me:13707: error: expected a pathname, not \"$withval\"" >&5
13708 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13709 { (exit 1); exit 1; }; }
13710 ;;
13711 esac
13712
13713 if test -d "$cf_cv_curses_dir"
13714 then
13715
13716 if test -n "$cf_cv_curses_dir/include" ; then
13717 for cf_add_incdir in $cf_cv_curses_dir/include
13718 do
13719 while test "$cf_add_incdir" != /usr/include
13720 do
13721 if test -d "$cf_add_incdir"
13722 then
13723 cf_have_incdir=no
13724 if test -n "$CFLAGS$CPPFLAGS" ; then
13725 # a loop is needed to ensure we can add subdirs of existing dirs
13726 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13727 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13728 cf_have_incdir=yes; break
13729 fi
13730 done
13731 fi
13732
13733 if test "$cf_have_incdir" = no ; then
13734 if test "$cf_add_incdir" = /usr/local/include ; then
13735 if test "$GCC" = yes
13736 then
13737 cf_save_CPPFLAGS=$CPPFLAGS
13738
13739 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13740 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13741
13742 cat >"conftest.$ac_ext" <<_ACEOF
13743 #line 13743 "configure"
13744 #include "confdefs.h"
13745 #include <stdio.h>
13746 int
13747 main (void)
13748 {
13749 printf("Hello")
13750 ;
13751 return 0;
13752 }
13753 _ACEOF
13754 rm -f "conftest.$ac_objext"
13755 if { (eval echo "$as_me:13755: \"$ac_compile\"") >&5
13756 (eval $ac_compile) 2>&5
13757 ac_status=$?
13758 echo "$as_me:13758: \$? = $ac_status" >&5
13759 (exit "$ac_status"); } &&
13760 { ac_try='test -s "conftest.$ac_objext"'
13761 { (eval echo "$as_me:13761: \"$ac_try\"") >&5
13762 (eval $ac_try) 2>&5
13763 ac_status=$?
13764 echo "$as_me:13764: \$? = $ac_status" >&5
13765 (exit "$ac_status"); }; }; then
13766 :
13767 else
13768 echo "$as_me: failed program was:" >&5
13769 cat "conftest.$ac_ext" >&5
13770 cf_have_incdir=yes
13771 fi
13772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13773 CPPFLAGS=$cf_save_CPPFLAGS
13774 fi
13775 fi
13776 fi
13777
13778 if test "$cf_have_incdir" = no ; then
13779 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
13780
13781 echo "${as_me:-configure}:13781: testing adding $cf_add_incdir to include-path ..." 1>&5
13782
13783 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13784
13785 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13786 test "$cf_top_incdir" = "$cf_add_incdir" && break
13787 cf_add_incdir="$cf_top_incdir"
13788 else
13789 break
13790 fi
13791 else
13792 break
13793 fi
13794 done
13795 done
13796 fi
13797
13798 if test -n "$cf_cv_curses_dir/lib" ; then
13799 for cf_add_libdir in $cf_cv_curses_dir/lib
13800 do
13801 if test "$cf_add_libdir" = /usr/lib ; then
13802 :
13803 elif test -d "$cf_add_libdir"
13804 then
13805 cf_have_libdir=no
13806 if test -n "$LDFLAGS$LIBS" ; then
13807 # a loop is needed to ensure we can add subdirs of existing dirs
13808 for cf_test_libdir in $LDFLAGS $LIBS ; do
13809 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13810 cf_have_libdir=yes; break
13811 fi
13812 done
13813 fi
13814 if test "$cf_have_libdir" = no ; then
13815 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
13816
13817 echo "${as_me:-configure}:13817: testing adding $cf_add_libdir to library-path ..." 1>&5
13818
13819 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13820 fi
13821 fi
13822 done
13823 fi
13824
13825 fi
13826 fi
13827
13828 echo "$as_me:13828: checking for specific curses-directory" >&5
13829 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
13830
13831 # Check whether --with-curses-dir or --without-curses-dir was given.
13832 if test "${with_curses_dir+set}" = set; then
13833 withval="$with_curses_dir"
13834 cf_cv_curses_dir=$withval
13835 else
13836 cf_cv_curses_dir=no
13837 fi;
13838 echo "$as_me:13838: result: $cf_cv_curses_dir" >&5
13839 echo "${ECHO_T}$cf_cv_curses_dir" >&6
13840
13841 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
13842 then
13843
13844 if test "x$prefix" != xNONE; then
13845 cf_path_syntax="$prefix"
13846 else
13847 cf_path_syntax="$ac_default_prefix"
13848 fi
13849
13850 case "x$withval" in
13851 (x\$\(*\)*|x\'*\'*)
13852 ;;
13853 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
13854 ;;
13855 (x\$\{*prefix\}*|x\$\{*dir\}*)
13856 eval withval="$withval"
13857 case "x$withval" in
13858 (xNONE/*)
13859 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13860 ;;
13861 esac
13862 ;;
13863 (xno|xNONE/*)
13864 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
13865 ;;
13866 (*)
13867 { { echo "$as_me:13867: error: expected a pathname, not \"$withval\"" >&5
13868 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13869 { (exit 1); exit 1; }; }
13870 ;;
13871 esac
13872
13873 if test -d "$cf_cv_curses_dir"
13874 then
13875
13876 if test -n "$cf_cv_curses_dir/include" ; then
13877 for cf_add_incdir in $cf_cv_curses_dir/include
13878 do
13879 while test "$cf_add_incdir" != /usr/include
13880 do
13881 if test -d "$cf_add_incdir"
13882 then
13883 cf_have_incdir=no
13884 if test -n "$CFLAGS$CPPFLAGS" ; then
13885 # a loop is needed to ensure we can add subdirs of existing dirs
13886 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13887 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13888 cf_have_incdir=yes; break
13889 fi
13890 done
13891 fi
13892
13893 if test "$cf_have_incdir" = no ; then
13894 if test "$cf_add_incdir" = /usr/local/include ; then
13895 if test "$GCC" = yes
13896 then
13897 cf_save_CPPFLAGS=$CPPFLAGS
13898
13899 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13900 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13901
13902 cat >"conftest.$ac_ext" <<_ACEOF
13903 #line 13903 "configure"
13904 #include "confdefs.h"
13905 #include <stdio.h>
13906 int
13907 main (void)
13908 {
13909 printf("Hello")
13910 ;
13911 return 0;
13912 }
13913 _ACEOF
13914 rm -f "conftest.$ac_objext"
13915 if { (eval echo "$as_me:13915: \"$ac_compile\"") >&5
13916 (eval $ac_compile) 2>&5
13917 ac_status=$?
13918 echo "$as_me:13918: \$? = $ac_status" >&5
13919 (exit "$ac_status"); } &&
13920 { ac_try='test -s "conftest.$ac_objext"'
13921 { (eval echo "$as_me:13921: \"$ac_try\"") >&5
13922 (eval $ac_try) 2>&5
13923 ac_status=$?
13924 echo "$as_me:13924: \$? = $ac_status" >&5
13925 (exit "$ac_status"); }; }; then
13926 :
13927 else
13928 echo "$as_me: failed program was:" >&5
13929 cat "conftest.$ac_ext" >&5
13930 cf_have_incdir=yes
13931 fi
13932 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13933 CPPFLAGS=$cf_save_CPPFLAGS
13934 fi
13935 fi
13936 fi
13937
13938 if test "$cf_have_incdir" = no ; then
13939 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
13940
13941 echo "${as_me:-configure}:13941: testing adding $cf_add_incdir to include-path ..." 1>&5
13942
13943 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13944
13945 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13946 test "$cf_top_incdir" = "$cf_add_incdir" && break
13947 cf_add_incdir="$cf_top_incdir"
13948 else
13949 break
13950 fi
13951 else
13952 break
13953 fi
13954 done
13955 done
13956 fi
13957
13958 if test -n "$cf_cv_curses_dir/lib" ; then
13959 for cf_add_libdir in $cf_cv_curses_dir/lib
13960 do
13961 if test "$cf_add_libdir" = /usr/lib ; then
13962 :
13963 elif test -d "$cf_add_libdir"
13964 then
13965 cf_have_libdir=no
13966 if test -n "$LDFLAGS$LIBS" ; then
13967 # a loop is needed to ensure we can add subdirs of existing dirs
13968 for cf_test_libdir in $LDFLAGS $LIBS ; do
13969 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13970 cf_have_libdir=yes; break
13971 fi
13972 done
13973 fi
13974 if test "$cf_have_libdir" = no ; then
13975 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
13976
13977 echo "${as_me:-configure}:13977: testing adding $cf_add_libdir to library-path ..." 1>&5
13978
13979 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13980 fi
13981 fi
13982 done
13983 fi
13984
13985 fi
13986 fi
13987
13988 cf_cv_screen=curses
13989
13990 echo "$as_me:13990: checking for specified curses library type" >&5
13991 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
13992
13993 # Check whether --with-screen or --without-screen was given.
13994 if test "${with_screen+set}" = set; then
13995 withval="$with_screen"
13996 cf_cv_screen=$withval
13997 else
13998
13999 # Check whether --with-ncursesw or --without-ncursesw was given.
14000 if test "${with_ncursesw+set}" = set; then
14001 withval="$with_ncursesw"
14002 cf_cv_screen=ncursesw
14003 else
14004
14005 # Check whether --with-ncurses or --without-ncurses was given.
14006 if test "${with_ncurses+set}" = set; then
14007 withval="$with_ncurses"
14008 cf_cv_screen=ncurses
14009 else
14010
14011 # Check whether --with-pdcurses or --without-pdcurses was given.
14012 if test "${with_pdcurses+set}" = set; then
14013 withval="$with_pdcurses"
14014 cf_cv_screen=pdcurses
14015 else
14016
14017 # Check whether --with-curses-colr or --without-curses-colr was given.
14018 if test "${with_curses_colr+set}" = set; then
14019 withval="$with_curses_colr"
14020 cf_cv_screen=curses_colr
14021 else
14022
14023 # Check whether --with-curses-5lib or --without-curses-5lib was given.
14024 if test "${with_curses_5lib+set}" = set; then
14025 withval="$with_curses_5lib"
14026 cf_cv_screen=curses_5lib
14027 fi;
14028 fi;
14029 fi;
14030 fi;
14031 fi;
14032 fi;
14033
14034 echo "$as_me:14034: result: $cf_cv_screen" >&5
14035 echo "${ECHO_T}$cf_cv_screen" >&6
14036
14037 case $cf_cv_screen in
14038 (curses|curses_*)
14039
14040 echo "$as_me:14040: checking for extra include directories" >&5
14041 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
14042 if test "${cf_cv_curses_incdir+set}" = set; then
14043 echo $ECHO_N "(cached) $ECHO_C" >&6
14044 else
14045
14046 cf_cv_curses_incdir=no
14047 case "$host_os" in
14048 (hpux10.*)
14049 if test "x$cf_cv_screen" = "xcurses_colr"
14050 then
14051 test -d /usr/include/curses_colr && \
14052 cf_cv_curses_incdir="-I/usr/include/curses_colr"
14053 fi
14054 ;;
14055 (sunos3*|sunos4*)
14056 if test "x$cf_cv_screen" = "xcurses_5lib"
14057 then
14058 test -d /usr/5lib && \
14059 test -d /usr/5include && \
14060 cf_cv_curses_incdir="-I/usr/5include"
14061 fi
14062 ;;
14063 esac
14064
14065 fi
14066 echo "$as_me:14066: result: $cf_cv_curses_incdir" >&5
14067 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
14068 if test "$cf_cv_curses_incdir" != no
14069 then
14070
14071 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14072 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
14073
14074 fi
14075
14076 echo "$as_me:14076: checking if we have identified curses headers" >&5
14077 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
14078 if test "${cf_cv_ncurses_header+set}" = set; then
14079 echo $ECHO_N "(cached) $ECHO_C" >&6
14080 else
14081
14082 cf_cv_ncurses_header=none
14083 for cf_header in \
14084 ncurses.h \
14085 curses.h ncurses/ncurses.h ncurses/curses.h
14086 do
14087 cat >"conftest.$ac_ext" <<_ACEOF
14088 #line 14088 "configure"
14089 #include "confdefs.h"
14090 #include <${cf_header}>
14091 int
14092 main (void)
14093 {
14094 initscr(); endwin()
14095 ;
14096 return 0;
14097 }
14098 _ACEOF
14099 rm -f "conftest.$ac_objext"
14100 if { (eval echo "$as_me:14100: \"$ac_compile\"") >&5
14101 (eval $ac_compile) 2>&5
14102 ac_status=$?
14103 echo "$as_me:14103: \$? = $ac_status" >&5
14104 (exit "$ac_status"); } &&
14105 { ac_try='test -s "conftest.$ac_objext"'
14106 { (eval echo "$as_me:14106: \"$ac_try\"") >&5
14107 (eval $ac_try) 2>&5
14108 ac_status=$?
14109 echo "$as_me:14109: \$? = $ac_status" >&5
14110 (exit "$ac_status"); }; }; then
14111 cf_cv_ncurses_header=$cf_header; break
14112 else
14113 echo "$as_me: failed program was:" >&5
14114 cat "conftest.$ac_ext" >&5
14115 fi
14116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14117 done
14118
14119 fi
14120 echo "$as_me:14120: result: $cf_cv_ncurses_header" >&5
14121 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
14122
14123 if test "$cf_cv_ncurses_header" = none ; then
14124 { { echo "$as_me:14124: error: No curses header-files found" >&5
14125 echo "$as_me: error: No curses header-files found" >&2;}
14126 { (exit 1); exit 1; }; }
14127 fi
14128
14129 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
14130
14131 for ac_header in $cf_cv_ncurses_header
14132 do
14133 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14134 echo "$as_me:14134: checking for $ac_header" >&5
14135 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14136 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14137 echo $ECHO_N "(cached) $ECHO_C" >&6
14138 else
14139 cat >"conftest.$ac_ext" <<_ACEOF
14140 #line 14140 "configure"
14141 #include "confdefs.h"
14142 #include <$ac_header>
14143 _ACEOF
14144 if { (eval echo "$as_me:14144: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14145 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14146 ac_status=$?
14147 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14148 rm -f conftest.er1
14149 cat conftest.err >&5
14150 echo "$as_me:14150: \$? = $ac_status" >&5
14151 (exit "$ac_status"); } >/dev/null; then
14152 if test -s conftest.err; then
14153 ac_cpp_err=$ac_c_preproc_warn_flag
14154 else
14155 ac_cpp_err=
14156 fi
14157 else
14158 ac_cpp_err=yes
14159 fi
14160 if test -z "$ac_cpp_err"; then
14161 eval "$as_ac_Header=yes"
14162 else
14163 echo "$as_me: failed program was:" >&5
14164 cat "conftest.$ac_ext" >&5
14165 eval "$as_ac_Header=no"
14166 fi
14167 rm -f conftest.err "conftest.$ac_ext"
14168 fi
14169 echo "$as_me:14169: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14170 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14171 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14172 cat >>confdefs.h <<EOF
14173 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14174 EOF
14175
14176 fi
14177 done
14178
14179 echo "$as_me:14179: checking for terminfo header" >&5
14180 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
14181 if test "${cf_cv_term_header+set}" = set; then
14182 echo $ECHO_N "(cached) $ECHO_C" >&6
14183 else
14184
14185 case "${cf_cv_ncurses_header}" in
14186 (*/ncurses.h|*/ncursesw.h)
14187 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
14188 ;;
14189 (*)
14190 cf_term_header=term.h
14191 ;;
14192 esac
14193
14194 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
14195 do
14196 cat >"conftest.$ac_ext" <<_ACEOF
14197 #line 14197 "configure"
14198 #include "confdefs.h"
14199 #include <stdio.h>
14200 #include <${cf_cv_ncurses_header:-curses.h}>
14201 #include <$cf_test>
14202
14203 int
14204 main (void)
14205 {
14206 int x = auto_left_margin; (void)x
14207 ;
14208 return 0;
14209 }
14210 _ACEOF
14211 rm -f "conftest.$ac_objext"
14212 if { (eval echo "$as_me:14212: \"$ac_compile\"") >&5
14213 (eval $ac_compile) 2>&5
14214 ac_status=$?
14215 echo "$as_me:14215: \$? = $ac_status" >&5
14216 (exit "$ac_status"); } &&
14217 { ac_try='test -s "conftest.$ac_objext"'
14218 { (eval echo "$as_me:14218: \"$ac_try\"") >&5
14219 (eval $ac_try) 2>&5
14220 ac_status=$?
14221 echo "$as_me:14221: \$? = $ac_status" >&5
14222 (exit "$ac_status"); }; }; then
14223
14224 cf_cv_term_header="$cf_test"
14225 else
14226 echo "$as_me: failed program was:" >&5
14227 cat "conftest.$ac_ext" >&5
14228
14229 cf_cv_term_header=unknown
14230
14231 fi
14232 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14233 test "$cf_cv_term_header" != unknown && break
14234 done
14235
14236 fi
14237 echo "$as_me:14237: result: $cf_cv_term_header" >&5
14238 echo "${ECHO_T}$cf_cv_term_header" >&6
14239
14240 # Set definitions to allow ifdef'ing to accommodate subdirectories
14241
14242 case "$cf_cv_term_header" in
14243 (*term.h)
14244
14245 cat >>confdefs.h <<\EOF
14246 #define HAVE_TERM_H 1
14247 EOF
14248
14249 ;;
14250 esac
14251
14252 case "$cf_cv_term_header" in
14253 (ncurses/term.h)
14254
14255 cat >>confdefs.h <<\EOF
14256 #define HAVE_NCURSES_TERM_H 1
14257 EOF
14258
14259 ;;
14260 (ncursesw/term.h)
14261
14262 cat >>confdefs.h <<\EOF
14263 #define HAVE_NCURSESW_TERM_H 1
14264 EOF
14265
14266 ;;
14267 esac
14268
14269 echo "$as_me:14269: checking for ncurses version" >&5
14270 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
14271 if test "${cf_cv_ncurses_version+set}" = set; then
14272 echo $ECHO_N "(cached) $ECHO_C" >&6
14273 else
14274
14275 cf_cv_ncurses_version=no
14276 cf_tempfile=out$$
14277 rm -f "$cf_tempfile"
14278 if test "$cross_compiling" = yes; then
14279
14280 # This will not work if the preprocessor splits the line after the
14281 # Autoconf token. The 'unproto' program does that.
14282 cat > "conftest.$ac_ext" <<EOF
14283 #include <${cf_cv_ncurses_header:-curses.h}>
14284 #undef Autoconf
14285 #ifdef NCURSES_VERSION
14286 Autoconf NCURSES_VERSION
14287 #else
14288 #ifdef __NCURSES_H
14289 Autoconf "old"
14290 #endif
14291 ;
14292 #endif
14293 EOF
14294 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
14295 { (eval echo "$as_me:14295: \"$cf_try\"") >&5
14296 (eval $cf_try) 2>&5
14297 ac_status=$?
14298 echo "$as_me:14298: \$? = $ac_status" >&5
14299 (exit "$ac_status"); }
14300 if test -f conftest.out ; then
14301 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
14302 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
14303 rm -f conftest.out
14304 fi
14305
14306 else
14307 cat >"conftest.$ac_ext" <<_ACEOF
14308 #line 14308 "configure"
14309 #include "confdefs.h"
14310
14311 $ac_includes_default
14312
14313 #include <${cf_cv_ncurses_header:-curses.h}>
14314
14315 int main(void)
14316 {
14317 FILE *fp = fopen("$cf_tempfile", "w");
14318 #ifdef NCURSES_VERSION
14319 # ifdef NCURSES_VERSION_PATCH
14320 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
14321 # else
14322 fprintf(fp, "%s\\n", NCURSES_VERSION);
14323 # endif
14324 #else
14325 # ifdef __NCURSES_H
14326 fprintf(fp, "old\\n");
14327 # else
14328 #error expected ncurses header to define __NCURSES_H
14329 # endif
14330 #endif
14331 ${cf_cv_main_return:-return}(0);
14332 }
14333 _ACEOF
14334 rm -f "conftest$ac_exeext"
14335 if { (eval echo "$as_me:14335: \"$ac_link\"") >&5
14336 (eval $ac_link) 2>&5
14337 ac_status=$?
14338 echo "$as_me:14338: \$? = $ac_status" >&5
14339 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14340 { (eval echo "$as_me:14340: \"$ac_try\"") >&5
14341 (eval $ac_try) 2>&5
14342 ac_status=$?
14343 echo "$as_me:14343: \$? = $ac_status" >&5
14344 (exit "$ac_status"); }; }; then
14345
14346 cf_cv_ncurses_version=`cat $cf_tempfile`
14347 else
14348 echo "$as_me: program exited with status $ac_status" >&5
14349 echo "$as_me: failed program was:" >&5
14350 cat "conftest.$ac_ext" >&5
14351 fi
14352 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14353 fi
14354 rm -f "$cf_tempfile"
14355
14356 fi
14357 echo "$as_me:14357: result: $cf_cv_ncurses_version" >&5
14358 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
14359 test "$cf_cv_ncurses_version" = no ||
14360 cat >>confdefs.h <<\EOF
14361 #define NCURSES 1
14362 EOF
14363
14364 echo "$as_me:14364: checking if we have identified curses libraries" >&5
14365 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
14366 cat >"conftest.$ac_ext" <<_ACEOF
14367 #line 14367 "configure"
14368 #include "confdefs.h"
14369 #include <${cf_cv_ncurses_header:-curses.h}>
14370 int
14371 main (void)
14372 {
14373 initscr(); endwin()
14374 ;
14375 return 0;
14376 }
14377 _ACEOF
14378 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14379 if { (eval echo "$as_me:14379: \"$ac_link\"") >&5
14380 (eval $ac_link) 2>&5
14381 ac_status=$?
14382 echo "$as_me:14382: \$? = $ac_status" >&5
14383 (exit "$ac_status"); } &&
14384 { ac_try='test -s "conftest$ac_exeext"'
14385 { (eval echo "$as_me:14385: \"$ac_try\"") >&5
14386 (eval $ac_try) 2>&5
14387 ac_status=$?
14388 echo "$as_me:14388: \$? = $ac_status" >&5
14389 (exit "$ac_status"); }; }; then
14390 cf_result=yes
14391 else
14392 echo "$as_me: failed program was:" >&5
14393 cat "conftest.$ac_ext" >&5
14394 cf_result=no
14395 fi
14396 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14397 echo "$as_me:14397: result: $cf_result" >&5
14398 echo "${ECHO_T}$cf_result" >&6
14399
14400 if test "$cf_result" = no ; then
14401 case "$host_os" in
14402 (freebsd*)
14403 echo "$as_me:14403: checking for tgoto in -lmytinfo" >&5
14404 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
14405 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
14406 echo $ECHO_N "(cached) $ECHO_C" >&6
14407 else
14408 ac_check_lib_save_LIBS=$LIBS
14409 LIBS="-lmytinfo $LIBS"
14410 cat >"conftest.$ac_ext" <<_ACEOF
14411 #line 14411 "configure"
14412 #include "confdefs.h"
14413
14414 /* Override any gcc2 internal prototype to avoid an error. */
14415 #ifdef __cplusplus
14416 extern "C"
14417 #endif
14418 /* We use char because int might match the return type of a gcc2
14419 builtin and then its argument prototype would still apply. */
14420 char tgoto (void);
14421 int
14422 main (void)
14423 {
14424 tgoto ();
14425 ;
14426 return 0;
14427 }
14428 _ACEOF
14429 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14430 if { (eval echo "$as_me:14430: \"$ac_link\"") >&5
14431 (eval $ac_link) 2>&5
14432 ac_status=$?
14433 echo "$as_me:14433: \$? = $ac_status" >&5
14434 (exit "$ac_status"); } &&
14435 { ac_try='test -s "conftest$ac_exeext"'
14436 { (eval echo "$as_me:14436: \"$ac_try\"") >&5
14437 (eval $ac_try) 2>&5
14438 ac_status=$?
14439 echo "$as_me:14439: \$? = $ac_status" >&5
14440 (exit "$ac_status"); }; }; then
14441 ac_cv_lib_mytinfo_tgoto=yes
14442 else
14443 echo "$as_me: failed program was:" >&5
14444 cat "conftest.$ac_ext" >&5
14445 ac_cv_lib_mytinfo_tgoto=no
14446 fi
14447 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14448 LIBS=$ac_check_lib_save_LIBS
14449 fi
14450 echo "$as_me:14450: result: $ac_cv_lib_mytinfo_tgoto" >&5
14451 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
14452 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
14453
14454 cf_add_libs="$LIBS"
14455 # reverse order
14456 cf_add_0lib=
14457 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14458 # filter duplicates
14459 for cf_add_1lib in $cf_add_0lib; do
14460 for cf_add_2lib in $cf_add_libs; do
14461 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14462 cf_add_1lib=
14463 break
14464 fi
14465 done
14466 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14467 done
14468 LIBS="$cf_add_libs"
14469
14470 fi
14471
14472 ;;
14473 (hpux10.*)
14474 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
14475 # next (1998), and xcurses "newer" (2000). There is no header file for
14476 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
14477 # term.h) for cur_colr
14478 if test "x$cf_cv_screen" = "xcurses_colr"
14479 then
14480 echo "$as_me:14480: checking for initscr in -lcur_colr" >&5
14481 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
14482 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
14483 echo $ECHO_N "(cached) $ECHO_C" >&6
14484 else
14485 ac_check_lib_save_LIBS=$LIBS
14486 LIBS="-lcur_colr $LIBS"
14487 cat >"conftest.$ac_ext" <<_ACEOF
14488 #line 14488 "configure"
14489 #include "confdefs.h"
14490
14491 /* Override any gcc2 internal prototype to avoid an error. */
14492 #ifdef __cplusplus
14493 extern "C"
14494 #endif
14495 /* We use char because int might match the return type of a gcc2
14496 builtin and then its argument prototype would still apply. */
14497 char initscr (void);
14498 int
14499 main (void)
14500 {
14501 initscr ();
14502 ;
14503 return 0;
14504 }
14505 _ACEOF
14506 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14507 if { (eval echo "$as_me:14507: \"$ac_link\"") >&5
14508 (eval $ac_link) 2>&5
14509 ac_status=$?
14510 echo "$as_me:14510: \$? = $ac_status" >&5
14511 (exit "$ac_status"); } &&
14512 { ac_try='test -s "conftest$ac_exeext"'
14513 { (eval echo "$as_me:14513: \"$ac_try\"") >&5
14514 (eval $ac_try) 2>&5
14515 ac_status=$?
14516 echo "$as_me:14516: \$? = $ac_status" >&5
14517 (exit "$ac_status"); }; }; then
14518 ac_cv_lib_cur_colr_initscr=yes
14519 else
14520 echo "$as_me: failed program was:" >&5
14521 cat "conftest.$ac_ext" >&5
14522 ac_cv_lib_cur_colr_initscr=no
14523 fi
14524 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14525 LIBS=$ac_check_lib_save_LIBS
14526 fi
14527 echo "$as_me:14527: result: $ac_cv_lib_cur_colr_initscr" >&5
14528 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
14529 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
14530
14531 cf_add_libs="$LIBS"
14532 # reverse order
14533 cf_add_0lib=
14534 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14535 # filter duplicates
14536 for cf_add_1lib in $cf_add_0lib; do
14537 for cf_add_2lib in $cf_add_libs; do
14538 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14539 cf_add_1lib=
14540 break
14541 fi
14542 done
14543 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14544 done
14545 LIBS="$cf_add_libs"
14546
14547 ac_cv_func_initscr=yes
14548
14549 else
14550
14551 echo "$as_me:14551: checking for initscr in -lHcurses" >&5
14552 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
14553 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
14554 echo $ECHO_N "(cached) $ECHO_C" >&6
14555 else
14556 ac_check_lib_save_LIBS=$LIBS
14557 LIBS="-lHcurses $LIBS"
14558 cat >"conftest.$ac_ext" <<_ACEOF
14559 #line 14559 "configure"
14560 #include "confdefs.h"
14561
14562 /* Override any gcc2 internal prototype to avoid an error. */
14563 #ifdef __cplusplus
14564 extern "C"
14565 #endif
14566 /* We use char because int might match the return type of a gcc2
14567 builtin and then its argument prototype would still apply. */
14568 char initscr (void);
14569 int
14570 main (void)
14571 {
14572 initscr ();
14573 ;
14574 return 0;
14575 }
14576 _ACEOF
14577 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14578 if { (eval echo "$as_me:14578: \"$ac_link\"") >&5
14579 (eval $ac_link) 2>&5
14580 ac_status=$?
14581 echo "$as_me:14581: \$? = $ac_status" >&5
14582 (exit "$ac_status"); } &&
14583 { ac_try='test -s "conftest$ac_exeext"'
14584 { (eval echo "$as_me:14584: \"$ac_try\"") >&5
14585 (eval $ac_try) 2>&5
14586 ac_status=$?
14587 echo "$as_me:14587: \$? = $ac_status" >&5
14588 (exit "$ac_status"); }; }; then
14589 ac_cv_lib_Hcurses_initscr=yes
14590 else
14591 echo "$as_me: failed program was:" >&5
14592 cat "conftest.$ac_ext" >&5
14593 ac_cv_lib_Hcurses_initscr=no
14594 fi
14595 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14596 LIBS=$ac_check_lib_save_LIBS
14597 fi
14598 echo "$as_me:14598: result: $ac_cv_lib_Hcurses_initscr" >&5
14599 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
14600 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
14601
14602 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
14603
14604 cf_add_libs="$LIBS"
14605 # reverse order
14606 cf_add_0lib=
14607 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14608 # filter duplicates
14609 for cf_add_1lib in $cf_add_0lib; do
14610 for cf_add_2lib in $cf_add_libs; do
14611 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14612 cf_add_1lib=
14613 break
14614 fi
14615 done
14616 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14617 done
14618 LIBS="$cf_add_libs"
14619
14620 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14621 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
14622
14623 ac_cv_func_initscr=yes
14624
14625 fi
14626
14627 fi
14628
14629 fi
14630 ;;
14631 (linux*)
14632 case `arch 2>/dev/null` in
14633 (x86_64)
14634 if test -d /lib64
14635 then
14636
14637 if test -n "/lib64" ; then
14638 for cf_add_libdir in /lib64
14639 do
14640 if test "$cf_add_libdir" = /usr/lib ; then
14641 :
14642 elif test -d "$cf_add_libdir"
14643 then
14644 cf_have_libdir=no
14645 if test -n "$LDFLAGS$LIBS" ; then
14646 # a loop is needed to ensure we can add subdirs of existing dirs
14647 for cf_test_libdir in $LDFLAGS $LIBS ; do
14648 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14649 cf_have_libdir=yes; break
14650 fi
14651 done
14652 fi
14653 if test "$cf_have_libdir" = no ; then
14654 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
14655
14656 echo "${as_me:-configure}:14656: testing adding $cf_add_libdir to library-path ..." 1>&5
14657
14658 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14659 fi
14660 fi
14661 done
14662 fi
14663
14664 else
14665
14666 if test -n "/lib" ; then
14667 for cf_add_libdir in /lib
14668 do
14669 if test "$cf_add_libdir" = /usr/lib ; then
14670 :
14671 elif test -d "$cf_add_libdir"
14672 then
14673 cf_have_libdir=no
14674 if test -n "$LDFLAGS$LIBS" ; then
14675 # a loop is needed to ensure we can add subdirs of existing dirs
14676 for cf_test_libdir in $LDFLAGS $LIBS ; do
14677 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14678 cf_have_libdir=yes; break
14679 fi
14680 done
14681 fi
14682 if test "$cf_have_libdir" = no ; then
14683 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
14684
14685 echo "${as_me:-configure}:14685: testing adding $cf_add_libdir to library-path ..." 1>&5
14686
14687 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14688 fi
14689 fi
14690 done
14691 fi
14692
14693 fi
14694 ;;
14695 (*)
14696
14697 if test -n "/lib" ; then
14698 for cf_add_libdir in /lib
14699 do
14700 if test "$cf_add_libdir" = /usr/lib ; then
14701 :
14702 elif test -d "$cf_add_libdir"
14703 then
14704 cf_have_libdir=no
14705 if test -n "$LDFLAGS$LIBS" ; then
14706 # a loop is needed to ensure we can add subdirs of existing dirs
14707 for cf_test_libdir in $LDFLAGS $LIBS ; do
14708 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14709 cf_have_libdir=yes; break
14710 fi
14711 done
14712 fi
14713 if test "$cf_have_libdir" = no ; then
14714 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
14715
14716 echo "${as_me:-configure}:14716: testing adding $cf_add_libdir to library-path ..." 1>&5
14717
14718 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14719 fi
14720 fi
14721 done
14722 fi
14723
14724 ;;
14725 esac
14726 ;;
14727 (sunos3*|sunos4*)
14728 if test "x$cf_cv_screen" = "xcurses_5lib"
14729 then
14730 if test -d /usr/5lib ; then
14731
14732 if test -n "/usr/5lib" ; then
14733 for cf_add_libdir in /usr/5lib
14734 do
14735 if test "$cf_add_libdir" = /usr/lib ; then
14736 :
14737 elif test -d "$cf_add_libdir"
14738 then
14739 cf_have_libdir=no
14740 if test -n "$LDFLAGS$LIBS" ; then
14741 # a loop is needed to ensure we can add subdirs of existing dirs
14742 for cf_test_libdir in $LDFLAGS $LIBS ; do
14743 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14744 cf_have_libdir=yes; break
14745 fi
14746 done
14747 fi
14748 if test "$cf_have_libdir" = no ; then
14749 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
14750
14751 echo "${as_me:-configure}:14751: testing adding $cf_add_libdir to library-path ..." 1>&5
14752
14753 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14754 fi
14755 fi
14756 done
14757 fi
14758
14759 cf_add_libs="$LIBS"
14760 # reverse order
14761 cf_add_0lib=
14762 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14763 # filter duplicates
14764 for cf_add_1lib in $cf_add_0lib; do
14765 for cf_add_2lib in $cf_add_libs; do
14766 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14767 cf_add_1lib=
14768 break
14769 fi
14770 done
14771 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14772 done
14773 LIBS="$cf_add_libs"
14774
14775 fi
14776 fi
14777 ac_cv_func_initscr=yes
14778 ;;
14779 esac
14780
14781 if test ".$ac_cv_func_initscr" != .yes ; then
14782 cf_save_LIBS="$LIBS"
14783
14784 if test ".${cf_cv_ncurses_version:-no}" != .no
14785 then
14786 cf_check_list="ncurses curses cursesX"
14787 else
14788 cf_check_list="cursesX curses ncurses"
14789 fi
14790
14791 # Check for library containing tgoto. Do this before curses library
14792 # because it may be needed to link the test-case for initscr.
14793 if test "x$cf_term_lib" = x
14794 then
14795 echo "$as_me:14795: checking for tgoto" >&5
14796 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
14797 if test "${ac_cv_func_tgoto+set}" = set; then
14798 echo $ECHO_N "(cached) $ECHO_C" >&6
14799 else
14800 cat >"conftest.$ac_ext" <<_ACEOF
14801 #line 14801 "configure"
14802 #include "confdefs.h"
14803 #define tgoto autoconf_temporary
14804 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14805 #undef tgoto
14806
14807 #ifdef __cplusplus
14808 extern "C"
14809 #endif
14810
14811 /* We use char because int might match the return type of a gcc2
14812 builtin and then its argument prototype would still apply. */
14813 char tgoto (void);
14814
14815 int
14816 main (void)
14817 {
14818
14819 /* The GNU C library defines stubs for functions which it implements
14820 to always fail with ENOSYS. Some functions are actually named
14821 something starting with __ and the normal name is an alias. */
14822 #if defined (__stub_tgoto) || defined (__stub___tgoto)
14823 #error found stub for tgoto
14824 #endif
14825
14826 return tgoto ();
14827 ;
14828 return 0;
14829 }
14830 _ACEOF
14831 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14832 if { (eval echo "$as_me:14832: \"$ac_link\"") >&5
14833 (eval $ac_link) 2>&5
14834 ac_status=$?
14835 echo "$as_me:14835: \$? = $ac_status" >&5
14836 (exit "$ac_status"); } &&
14837 { ac_try='test -s "conftest$ac_exeext"'
14838 { (eval echo "$as_me:14838: \"$ac_try\"") >&5
14839 (eval $ac_try) 2>&5
14840 ac_status=$?
14841 echo "$as_me:14841: \$? = $ac_status" >&5
14842 (exit "$ac_status"); }; }; then
14843 ac_cv_func_tgoto=yes
14844 else
14845 echo "$as_me: failed program was:" >&5
14846 cat "conftest.$ac_ext" >&5
14847 ac_cv_func_tgoto=no
14848 fi
14849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14850 fi
14851 echo "$as_me:14851: result: $ac_cv_func_tgoto" >&5
14852 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
14853 if test "$ac_cv_func_tgoto" = yes; then
14854 cf_term_lib=predefined
14855 else
14856
14857 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
14858 do
14859 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
14860 echo "$as_me:14860: checking for tgoto in -l$cf_term_lib" >&5
14861 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
14862 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14863 echo $ECHO_N "(cached) $ECHO_C" >&6
14864 else
14865 ac_check_lib_save_LIBS=$LIBS
14866 LIBS="-l$cf_term_lib $LIBS"
14867 cat >"conftest.$ac_ext" <<_ACEOF
14868 #line 14868 "configure"
14869 #include "confdefs.h"
14870
14871 /* Override any gcc2 internal prototype to avoid an error. */
14872 #ifdef __cplusplus
14873 extern "C"
14874 #endif
14875 /* We use char because int might match the return type of a gcc2
14876 builtin and then its argument prototype would still apply. */
14877 char tgoto (void);
14878 int
14879 main (void)
14880 {
14881 tgoto ();
14882 ;
14883 return 0;
14884 }
14885 _ACEOF
14886 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14887 if { (eval echo "$as_me:14887: \"$ac_link\"") >&5
14888 (eval $ac_link) 2>&5
14889 ac_status=$?
14890 echo "$as_me:14890: \$? = $ac_status" >&5
14891 (exit "$ac_status"); } &&
14892 { ac_try='test -s "conftest$ac_exeext"'
14893 { (eval echo "$as_me:14893: \"$ac_try\"") >&5
14894 (eval $ac_try) 2>&5
14895 ac_status=$?
14896 echo "$as_me:14896: \$? = $ac_status" >&5
14897 (exit "$ac_status"); }; }; then
14898 eval "$as_ac_Lib=yes"
14899 else
14900 echo "$as_me: failed program was:" >&5
14901 cat "conftest.$ac_ext" >&5
14902 eval "$as_ac_Lib=no"
14903 fi
14904 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14905 LIBS=$ac_check_lib_save_LIBS
14906 fi
14907 echo "$as_me:14907: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
14908 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
14909 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
14910
14911 : "${cf_nculib_root:=$cf_term_lib}"
14912 break
14913
14914 fi
14915
14916 done
14917
14918 fi
14919
14920 fi
14921
14922 # Check for library containing initscr
14923 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
14924 if test "x$cf_curs_lib" = x
14925 then
14926 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
14927 do
14928 LIBS="-l$cf_curs_lib $cf_save_LIBS"
14929 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
14930 echo "$as_me:14930: checking if we can link with $cf_curs_lib library" >&5
14931 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
14932 cat >"conftest.$ac_ext" <<_ACEOF
14933 #line 14933 "configure"
14934 #include "confdefs.h"
14935 #include <${cf_cv_ncurses_header:-curses.h}>
14936 int
14937 main (void)
14938 {
14939 initscr()
14940 ;
14941 return 0;
14942 }
14943 _ACEOF
14944 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14945 if { (eval echo "$as_me:14945: \"$ac_link\"") >&5
14946 (eval $ac_link) 2>&5
14947 ac_status=$?
14948 echo "$as_me:14948: \$? = $ac_status" >&5
14949 (exit "$ac_status"); } &&
14950 { ac_try='test -s "conftest$ac_exeext"'
14951 { (eval echo "$as_me:14951: \"$ac_try\"") >&5
14952 (eval $ac_try) 2>&5
14953 ac_status=$?
14954 echo "$as_me:14954: \$? = $ac_status" >&5
14955 (exit "$ac_status"); }; }; then
14956 cf_result=yes
14957 else
14958 echo "$as_me: failed program was:" >&5
14959 cat "conftest.$ac_ext" >&5
14960 cf_result=no
14961 fi
14962 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14963 echo "$as_me:14963: result: $cf_result" >&5
14964 echo "${ECHO_T}$cf_result" >&6
14965 test "$cf_result" = yes && break
14966 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
14967 cf_result=no
14968 elif test "$cf_term_lib" != predefined ; then
14969 echo "$as_me:14969: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
14970 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
14971 cat >"conftest.$ac_ext" <<_ACEOF
14972 #line 14972 "configure"
14973 #include "confdefs.h"
14974 #include <${cf_cv_ncurses_header:-curses.h}>
14975 int
14976 main (void)
14977 {
14978 initscr(); endwin();
14979 ;
14980 return 0;
14981 }
14982 _ACEOF
14983 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14984 if { (eval echo "$as_me:14984: \"$ac_link\"") >&5
14985 (eval $ac_link) 2>&5
14986 ac_status=$?
14987 echo "$as_me:14987: \$? = $ac_status" >&5
14988 (exit "$ac_status"); } &&
14989 { ac_try='test -s "conftest$ac_exeext"'
14990 { (eval echo "$as_me:14990: \"$ac_try\"") >&5
14991 (eval $ac_try) 2>&5
14992 ac_status=$?
14993 echo "$as_me:14993: \$? = $ac_status" >&5
14994 (exit "$ac_status"); }; }; then
14995 cf_result=no
14996 else
14997 echo "$as_me: failed program was:" >&5
14998 cat "conftest.$ac_ext" >&5
14999
15000 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
15001 cat >"conftest.$ac_ext" <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004 #include <${cf_cv_ncurses_header:-curses.h}>
15005 int
15006 main (void)
15007 {
15008 initscr()
15009 ;
15010 return 0;
15011 }
15012 _ACEOF
15013 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15014 if { (eval echo "$as_me:15014: \"$ac_link\"") >&5
15015 (eval $ac_link) 2>&5
15016 ac_status=$?
15017 echo "$as_me:15017: \$? = $ac_status" >&5
15018 (exit "$ac_status"); } &&
15019 { ac_try='test -s "conftest$ac_exeext"'
15020 { (eval echo "$as_me:15020: \"$ac_try\"") >&5
15021 (eval $ac_try) 2>&5
15022 ac_status=$?
15023 echo "$as_me:15023: \$? = $ac_status" >&5
15024 (exit "$ac_status"); }; }; then
15025 cf_result=yes
15026 else
15027 echo "$as_me: failed program was:" >&5
15028 cat "conftest.$ac_ext" >&5
15029 cf_result=error
15030 fi
15031 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15032
15033 fi
15034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15035 echo "$as_me:15035: result: $cf_result" >&5
15036 echo "${ECHO_T}$cf_result" >&6
15037 test "$cf_result" != error && break
15038 fi
15039 done
15040 fi
15041 test "$cf_curs_lib" = unknown && { { echo "$as_me:15041: error: no curses library found" >&5
15042 echo "$as_me: error: no curses library found" >&2;}
15043 { (exit 1); exit 1; }; }
15044 fi
15045 fi
15046
15047 ;;
15048 (ncursesw*)
15049
15050 for ac_header in wchar.h
15051 do
15052 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15053 echo "$as_me:15053: checking for $ac_header" >&5
15054 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15055 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15056 echo $ECHO_N "(cached) $ECHO_C" >&6
15057 else
15058 cat >"conftest.$ac_ext" <<_ACEOF
15059 #line 15059 "configure"
15060 #include "confdefs.h"
15061 #include <$ac_header>
15062 _ACEOF
15063 if { (eval echo "$as_me:15063: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15064 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15065 ac_status=$?
15066 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15067 rm -f conftest.er1
15068 cat conftest.err >&5
15069 echo "$as_me:15069: \$? = $ac_status" >&5
15070 (exit "$ac_status"); } >/dev/null; then
15071 if test -s conftest.err; then
15072 ac_cpp_err=$ac_c_preproc_warn_flag
15073 else
15074 ac_cpp_err=
15075 fi
15076 else
15077 ac_cpp_err=yes
15078 fi
15079 if test -z "$ac_cpp_err"; then
15080 eval "$as_ac_Header=yes"
15081 else
15082 echo "$as_me: failed program was:" >&5
15083 cat "conftest.$ac_ext" >&5
15084 eval "$as_ac_Header=no"
15085 fi
15086 rm -f conftest.err "conftest.$ac_ext"
15087 fi
15088 echo "$as_me:15088: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15089 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15090 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15091 cat >>confdefs.h <<EOF
15092 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15093 EOF
15094
15095 fi
15096 done
15097
15098 echo "$as_me:15098: checking for multibyte character support" >&5
15099 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
15100 if test "${cf_cv_utf8_lib+set}" = set; then
15101 echo $ECHO_N "(cached) $ECHO_C" >&6
15102 else
15103
15104 cf_save_LIBS="$LIBS"
15105 cat >"conftest.$ac_ext" <<_ACEOF
15106 #line 15106 "configure"
15107 #include "confdefs.h"
15108
15109 $ac_includes_default
15110 #ifdef HAVE_WCHAR_H
15111 #include <wchar.h>
15112 #endif
15113
15114 int
15115 main (void)
15116 {
15117 putwc(0,0);
15118 ;
15119 return 0;
15120 }
15121 _ACEOF
15122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15123 if { (eval echo "$as_me:15123: \"$ac_link\"") >&5
15124 (eval $ac_link) 2>&5
15125 ac_status=$?
15126 echo "$as_me:15126: \$? = $ac_status" >&5
15127 (exit "$ac_status"); } &&
15128 { ac_try='test -s "conftest$ac_exeext"'
15129 { (eval echo "$as_me:15129: \"$ac_try\"") >&5
15130 (eval $ac_try) 2>&5
15131 ac_status=$?
15132 echo "$as_me:15132: \$? = $ac_status" >&5
15133 (exit "$ac_status"); }; }; then
15134 cf_cv_utf8_lib=yes
15135 else
15136 echo "$as_me: failed program was:" >&5
15137 cat "conftest.$ac_ext" >&5
15138
15139 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
15140 # will be set on completion of the AC_LINK_IFELSE below.
15141 cf_cv_header_path_utf8=
15142 cf_cv_library_path_utf8=
15143
15144 echo "${as_me:-configure}:15144: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
15145
15146 cf_save_LIBS="$LIBS"
15147
15148 cat >"conftest.$ac_ext" <<_ACEOF
15149 #line 15149 "configure"
15150 #include "confdefs.h"
15151
15152 #include <libutf8.h>
15153 int
15154 main (void)
15155 {
15156 putwc(0,0);
15157 ;
15158 return 0;
15159 }
15160 _ACEOF
15161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15162 if { (eval echo "$as_me:15162: \"$ac_link\"") >&5
15163 (eval $ac_link) 2>&5
15164 ac_status=$?
15165 echo "$as_me:15165: \$? = $ac_status" >&5
15166 (exit "$ac_status"); } &&
15167 { ac_try='test -s "conftest$ac_exeext"'
15168 { (eval echo "$as_me:15168: \"$ac_try\"") >&5
15169 (eval $ac_try) 2>&5
15170 ac_status=$?
15171 echo "$as_me:15171: \$? = $ac_status" >&5
15172 (exit "$ac_status"); }; }; then
15173
15174 cf_cv_find_linkage_utf8=yes
15175 cf_cv_header_path_utf8=/usr/include
15176 cf_cv_library_path_utf8=/usr/lib
15177
15178 else
15179 echo "$as_me: failed program was:" >&5
15180 cat "conftest.$ac_ext" >&5
15181
15182 LIBS="-lutf8 $cf_save_LIBS"
15183
15184 cat >"conftest.$ac_ext" <<_ACEOF
15185 #line 15185 "configure"
15186 #include "confdefs.h"
15187
15188 #include <libutf8.h>
15189 int
15190 main (void)
15191 {
15192 putwc(0,0);
15193 ;
15194 return 0;
15195 }
15196 _ACEOF
15197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15198 if { (eval echo "$as_me:15198: \"$ac_link\"") >&5
15199 (eval $ac_link) 2>&5
15200 ac_status=$?
15201 echo "$as_me:15201: \$? = $ac_status" >&5
15202 (exit "$ac_status"); } &&
15203 { ac_try='test -s "conftest$ac_exeext"'
15204 { (eval echo "$as_me:15204: \"$ac_try\"") >&5
15205 (eval $ac_try) 2>&5
15206 ac_status=$?
15207 echo "$as_me:15207: \$? = $ac_status" >&5
15208 (exit "$ac_status"); }; }; then
15209
15210 cf_cv_find_linkage_utf8=yes
15211 cf_cv_header_path_utf8=/usr/include
15212 cf_cv_library_path_utf8=/usr/lib
15213 cf_cv_library_file_utf8="-lutf8"
15214
15215 else
15216 echo "$as_me: failed program was:" >&5
15217 cat "conftest.$ac_ext" >&5
15218
15219 cf_cv_find_linkage_utf8=no
15220 LIBS="$cf_save_LIBS"
15221
15222 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
15223
15224 echo "${as_me:-configure}:15224: testing find linkage for utf8 library ..." 1>&5
15225
15226 echo "${as_me:-configure}:15226: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
15227
15228 cf_save_CPPFLAGS="$CPPFLAGS"
15229 cf_test_CPPFLAGS="$CPPFLAGS"
15230
15231 cf_search=
15232
15233 # collect the current set of include-directories from compiler flags
15234 cf_header_path_list=""
15235 if test -n "${CFLAGS}${CPPFLAGS}" ; then
15236 for cf_header_path in $CPPFLAGS $CFLAGS
15237 do
15238 case "$cf_header_path" in
15239 (-I*)
15240 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
15241
15242 test "x$cf_header_path" != "xNONE" && \
15243 test -d "$cf_header_path" && \
15244 {
15245 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
15246 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
15247 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
15248 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
15249 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
15250 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
15251 }
15252
15253 cf_header_path_list="$cf_header_path_list $cf_search"
15254 ;;
15255 esac
15256 done
15257 fi
15258
15259 # add the variations for the package we are looking for
15260
15261 cf_search=
15262
15263 test "x$prefix" != "xNONE" && \
15264 test -d "$prefix" && \
15265 {
15266 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
15267 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
15268 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
15269 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
15270 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
15271 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
15272 }
15273
15274 for cf_subdir_prefix in \
15275 /usr \
15276 /usr/local \
15277 /usr/pkg \
15278 /opt \
15279 /opt/local \
15280 $HOME
15281 do
15282
15283 test "x$cf_subdir_prefix" != "x$prefix" && \
15284 test -d "$cf_subdir_prefix" && \
15285 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
15286 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
15287 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
15288 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
15289 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
15290 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
15291 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
15292 }
15293
15294 done
15295
15296 test "$includedir" != NONE && \
15297 test "$includedir" != "/usr/include" && \
15298 test -d "$includedir" && {
15299 test -d "$includedir" && cf_search="$cf_search $includedir"
15300 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
15301 }
15302
15303 test "$oldincludedir" != NONE && \
15304 test "$oldincludedir" != "/usr/include" && \
15305 test -d "$oldincludedir" && {
15306 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
15307 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
15308 }
15309
15310 cf_search="$cf_search $cf_header_path_list"
15311
15312 for cf_cv_header_path_utf8 in $cf_search
15313 do
15314 if test -d "$cf_cv_header_path_utf8" ; then
15315 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
15316
15317 echo "${as_me:-configure}:15317: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
15318
15319 CPPFLAGS="$cf_save_CPPFLAGS"
15320
15321 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15322 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
15323
15324 cat >"conftest.$ac_ext" <<_ACEOF
15325 #line 15325 "configure"
15326 #include "confdefs.h"
15327
15328 #include <libutf8.h>
15329 int
15330 main (void)
15331 {
15332 putwc(0,0);
15333 ;
15334 return 0;
15335 }
15336 _ACEOF
15337 rm -f "conftest.$ac_objext"
15338 if { (eval echo "$as_me:15338: \"$ac_compile\"") >&5
15339 (eval $ac_compile) 2>&5
15340 ac_status=$?
15341 echo "$as_me:15341: \$? = $ac_status" >&5
15342 (exit "$ac_status"); } &&
15343 { ac_try='test -s "conftest.$ac_objext"'
15344 { (eval echo "$as_me:15344: \"$ac_try\"") >&5
15345 (eval $ac_try) 2>&5
15346 ac_status=$?
15347 echo "$as_me:15347: \$? = $ac_status" >&5
15348 (exit "$ac_status"); }; }; then
15349
15350 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
15351
15352 echo "${as_me:-configure}:15352: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
15353
15354 cf_cv_find_linkage_utf8=maybe
15355 cf_test_CPPFLAGS="$CPPFLAGS"
15356 break
15357 else
15358 echo "$as_me: failed program was:" >&5
15359 cat "conftest.$ac_ext" >&5
15360
15361 CPPFLAGS="$cf_save_CPPFLAGS"
15362
15363 fi
15364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15365 fi
15366 done
15367
15368 if test "$cf_cv_find_linkage_utf8" = maybe ; then
15369
15370 echo "${as_me:-configure}:15370: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
15371
15372 cf_save_LIBS="$LIBS"
15373 cf_save_LDFLAGS="$LDFLAGS"
15374
15375 if test "$cf_cv_find_linkage_utf8" != yes ; then
15376
15377 cf_search=
15378 cf_library_path_list=""
15379 if test -n "${LDFLAGS}${LIBS}" ; then
15380 for cf_library_path in $LDFLAGS $LIBS
15381 do
15382 case "$cf_library_path" in
15383 (-L*)
15384 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
15385
15386 test "x$cf_library_path" != "xNONE" && \
15387 test -d "$cf_library_path" && \
15388 {
15389 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
15390 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
15391 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
15392 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
15393 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
15394 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
15395 }
15396
15397 cf_library_path_list="$cf_library_path_list $cf_search"
15398 ;;
15399 esac
15400 done
15401 fi
15402
15403 cf_search=
15404
15405 test "x$prefix" != "xNONE" && \
15406 test -d "$prefix" && \
15407 {
15408 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
15409 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
15410 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
15411 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
15412 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
15413 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
15414 }
15415
15416 for cf_subdir_prefix in \
15417 /usr \
15418 /usr/local \
15419 /usr/pkg \
15420 /opt \
15421 /opt/local \
15422 $HOME
15423 do
15424
15425 test "x$cf_subdir_prefix" != "x$prefix" && \
15426 test -d "$cf_subdir_prefix" && \
15427 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
15428 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
15429 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
15430 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
15431 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
15432 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
15433 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
15434 }
15435
15436 done
15437
15438 cf_search="$cf_library_path_list $cf_search"
15439
15440 for cf_cv_library_path_utf8 in $cf_search
15441 do
15442 if test -d "$cf_cv_library_path_utf8" ; then
15443 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
15444
15445 echo "${as_me:-configure}:15445: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
15446
15447 CPPFLAGS="$cf_test_CPPFLAGS"
15448 LIBS="-lutf8 $cf_save_LIBS"
15449 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
15450 cat >"conftest.$ac_ext" <<_ACEOF
15451 #line 15451 "configure"
15452 #include "confdefs.h"
15453
15454 #include <libutf8.h>
15455 int
15456 main (void)
15457 {
15458 putwc(0,0);
15459 ;
15460 return 0;
15461 }
15462 _ACEOF
15463 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15464 if { (eval echo "$as_me:15464: \"$ac_link\"") >&5
15465 (eval $ac_link) 2>&5
15466 ac_status=$?
15467 echo "$as_me:15467: \$? = $ac_status" >&5
15468 (exit "$ac_status"); } &&
15469 { ac_try='test -s "conftest$ac_exeext"'
15470 { (eval echo "$as_me:15470: \"$ac_try\"") >&5
15471 (eval $ac_try) 2>&5
15472 ac_status=$?
15473 echo "$as_me:15473: \$? = $ac_status" >&5
15474 (exit "$ac_status"); }; }; then
15475
15476 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
15477
15478 echo "${as_me:-configure}:15478: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
15479
15480 cf_cv_find_linkage_utf8=yes
15481 cf_cv_library_file_utf8="-lutf8"
15482 break
15483 else
15484 echo "$as_me: failed program was:" >&5
15485 cat "conftest.$ac_ext" >&5
15486
15487 CPPFLAGS="$cf_save_CPPFLAGS"
15488 LIBS="$cf_save_LIBS"
15489 LDFLAGS="$cf_save_LDFLAGS"
15490
15491 fi
15492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15493 fi
15494 done
15495 CPPFLAGS="$cf_save_CPPFLAGS"
15496 LDFLAGS="$cf_save_LDFLAGS"
15497 fi
15498
15499 else
15500 cf_cv_find_linkage_utf8=no
15501 fi
15502
15503 fi
15504 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15505
15506 fi
15507 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15508
15509 LIBS="$cf_save_LIBS"
15510
15511 if test "$cf_cv_find_linkage_utf8" = yes ; then
15512 cf_cv_utf8_lib=add-on
15513 else
15514 cf_cv_utf8_lib=no
15515 fi
15516
15517 fi
15518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15519 fi
15520 echo "$as_me:15520: result: $cf_cv_utf8_lib" >&5
15521 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
15522
15523 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
15524 # ncurses/ncursesw:
15525 if test "$cf_cv_utf8_lib" = "add-on" ; then
15526
15527 cat >>confdefs.h <<\EOF
15528 #define HAVE_LIBUTF8_H 1
15529 EOF
15530
15531 if test -n "$cf_cv_header_path_utf8" ; then
15532 for cf_add_incdir in $cf_cv_header_path_utf8
15533 do
15534 while test "$cf_add_incdir" != /usr/include
15535 do
15536 if test -d "$cf_add_incdir"
15537 then
15538 cf_have_incdir=no
15539 if test -n "$CFLAGS$CPPFLAGS" ; then
15540 # a loop is needed to ensure we can add subdirs of existing dirs
15541 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15542 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15543 cf_have_incdir=yes; break
15544 fi
15545 done
15546 fi
15547
15548 if test "$cf_have_incdir" = no ; then
15549 if test "$cf_add_incdir" = /usr/local/include ; then
15550 if test "$GCC" = yes
15551 then
15552 cf_save_CPPFLAGS=$CPPFLAGS
15553
15554 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15555 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15556
15557 cat >"conftest.$ac_ext" <<_ACEOF
15558 #line 15558 "configure"
15559 #include "confdefs.h"
15560 #include <stdio.h>
15561 int
15562 main (void)
15563 {
15564 printf("Hello")
15565 ;
15566 return 0;
15567 }
15568 _ACEOF
15569 rm -f "conftest.$ac_objext"
15570 if { (eval echo "$as_me:15570: \"$ac_compile\"") >&5
15571 (eval $ac_compile) 2>&5
15572 ac_status=$?
15573 echo "$as_me:15573: \$? = $ac_status" >&5
15574 (exit "$ac_status"); } &&
15575 { ac_try='test -s "conftest.$ac_objext"'
15576 { (eval echo "$as_me:15576: \"$ac_try\"") >&5
15577 (eval $ac_try) 2>&5
15578 ac_status=$?
15579 echo "$as_me:15579: \$? = $ac_status" >&5
15580 (exit "$ac_status"); }; }; then
15581 :
15582 else
15583 echo "$as_me: failed program was:" >&5
15584 cat "conftest.$ac_ext" >&5
15585 cf_have_incdir=yes
15586 fi
15587 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15588 CPPFLAGS=$cf_save_CPPFLAGS
15589 fi
15590 fi
15591 fi
15592
15593 if test "$cf_have_incdir" = no ; then
15594 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
15595
15596 echo "${as_me:-configure}:15596: testing adding $cf_add_incdir to include-path ..." 1>&5
15597
15598 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15599
15600 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
15601 test "$cf_top_incdir" = "$cf_add_incdir" && break
15602 cf_add_incdir="$cf_top_incdir"
15603 else
15604 break
15605 fi
15606 else
15607 break
15608 fi
15609 done
15610 done
15611 fi
15612
15613 if test -n "$cf_cv_library_path_utf8" ; then
15614 for cf_add_libdir in $cf_cv_library_path_utf8
15615 do
15616 if test "$cf_add_libdir" = /usr/lib ; then
15617 :
15618 elif test -d "$cf_add_libdir"
15619 then
15620 cf_have_libdir=no
15621 if test -n "$LDFLAGS$LIBS" ; then
15622 # a loop is needed to ensure we can add subdirs of existing dirs
15623 for cf_test_libdir in $LDFLAGS $LIBS ; do
15624 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15625 cf_have_libdir=yes; break
15626 fi
15627 done
15628 fi
15629 if test "$cf_have_libdir" = no ; then
15630 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
15631
15632 echo "${as_me:-configure}:15632: testing adding $cf_add_libdir to library-path ..." 1>&5
15633
15634 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15635 fi
15636 fi
15637 done
15638 fi
15639
15640 cf_add_libs="$LIBS"
15641 # reverse order
15642 cf_add_0lib=
15643 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15644 # filter duplicates
15645 for cf_add_1lib in $cf_add_0lib; do
15646 for cf_add_2lib in $cf_add_libs; do
15647 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15648 cf_add_1lib=
15649 break
15650 fi
15651 done
15652 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15653 done
15654 LIBS="$cf_add_libs"
15655
15656 fi
15657
15658 cf_ncuconfig_root=$cf_cv_screen
15659 cf_have_ncuconfig=no
15660
15661 if test "x${PKG_CONFIG:=none}" != xnone; then
15662 echo "$as_me:15662: checking pkg-config for $cf_ncuconfig_root" >&5
15663 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
15664 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
15665 echo "$as_me:15665: result: yes" >&5
15666 echo "${ECHO_T}yes" >&6
15667
15668 echo "$as_me:15668: checking if the $cf_ncuconfig_root package files work" >&5
15669 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
15670 cf_have_ncuconfig=unknown
15671
15672 cf_save_CFLAGS="$CFLAGS"
15673 cf_save_CPPFLAGS="$CPPFLAGS"
15674 cf_save_LIBS="$LIBS"
15675
15676 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
15677 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
15678
15679 # while -W for passing linker flags is prevalent, it is not "standard".
15680 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
15681 # incompatible _and_ non-standard -W option which gives an error. Work
15682 # around that pitfall.
15683 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
15684 (x*c[89]9@@*-W*)
15685
15686 cf_fix_cppflags=no
15687 cf_new_cflags=
15688 cf_new_cppflags=
15689 cf_new_extra_cppflags=
15690
15691 for cf_add_cflags in $cf_pkg_cflags
15692 do
15693 case "$cf_fix_cppflags" in
15694 (no)
15695 case "$cf_add_cflags" in
15696 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15697 case "$cf_add_cflags" in
15698 (-D*)
15699 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15700
15701 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15702 && test -z "${cf_tst_cflags}" \
15703 && cf_fix_cppflags=yes
15704
15705 if test "$cf_fix_cppflags" = yes ; then
15706
15707 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15708 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15709
15710 continue
15711 elif test "${cf_tst_cflags}" = "\"'" ; then
15712
15713 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15714 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15715
15716 continue
15717 fi
15718 ;;
15719 esac
15720 case "$CPPFLAGS" in
15721 (*$cf_add_cflags)
15722 ;;
15723 (*)
15724 case "$cf_add_cflags" in
15725 (-D*)
15726 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15727
15728 CPPFLAGS=`echo "$CPPFLAGS" | \
15729 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15730 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15731
15732 ;;
15733 esac
15734
15735 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15736 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15737
15738 ;;
15739 esac
15740 ;;
15741 (*)
15742
15743 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15744 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15745
15746 ;;
15747 esac
15748 ;;
15749 (yes)
15750
15751 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15752 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15753
15754 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15755
15756 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15757 && test -z "${cf_tst_cflags}" \
15758 && cf_fix_cppflags=no
15759 ;;
15760 esac
15761 done
15762
15763 if test -n "$cf_new_cflags" ; then
15764
15765 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15766 CFLAGS="${CFLAGS}$cf_new_cflags"
15767
15768 fi
15769
15770 if test -n "$cf_new_cppflags" ; then
15771
15772 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15773 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15774
15775 fi
15776
15777 if test -n "$cf_new_extra_cppflags" ; then
15778
15779 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15780 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15781
15782 fi
15783
15784 cf_add_libs="$LIBS"
15785 # reverse order
15786 cf_add_0lib=
15787 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15788 # filter duplicates
15789 for cf_add_1lib in $cf_add_0lib; do
15790 for cf_add_2lib in $cf_add_libs; do
15791 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15792 cf_add_1lib=
15793 break
15794 fi
15795 done
15796 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15797 done
15798 LIBS="$cf_add_libs"
15799
15800 cat >"conftest.$ac_ext" <<_ACEOF
15801 #line 15801 "configure"
15802 #include "confdefs.h"
15803 #include <${cf_cv_ncurses_header:-curses.h}>
15804 int
15805 main (void)
15806 {
15807 initscr(); mousemask(0,0); tigetstr((char *)0);
15808 ;
15809 return 0;
15810 }
15811 _ACEOF
15812 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15813 if { (eval echo "$as_me:15813: \"$ac_link\"") >&5
15814 (eval $ac_link) 2>&5
15815 ac_status=$?
15816 echo "$as_me:15816: \$? = $ac_status" >&5
15817 (exit "$ac_status"); } &&
15818 { ac_try='test -s "conftest$ac_exeext"'
15819 { (eval echo "$as_me:15819: \"$ac_try\"") >&5
15820 (eval $ac_try) 2>&5
15821 ac_status=$?
15822 echo "$as_me:15822: \$? = $ac_status" >&5
15823 (exit "$ac_status"); }; }; then
15824 if test "$cross_compiling" = yes; then
15825 cf_test_ncuconfig=maybe
15826 else
15827 cat >"conftest.$ac_ext" <<_ACEOF
15828 #line 15828 "configure"
15829 #include "confdefs.h"
15830 #include <${cf_cv_ncurses_header:-curses.h}>
15831 int main(void)
15832 { const char *xx = curses_version(); return (xx == 0); }
15833 _ACEOF
15834 rm -f "conftest$ac_exeext"
15835 if { (eval echo "$as_me:15835: \"$ac_link\"") >&5
15836 (eval $ac_link) 2>&5
15837 ac_status=$?
15838 echo "$as_me:15838: \$? = $ac_status" >&5
15839 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15840 { (eval echo "$as_me:15840: \"$ac_try\"") >&5
15841 (eval $ac_try) 2>&5
15842 ac_status=$?
15843 echo "$as_me:15843: \$? = $ac_status" >&5
15844 (exit "$ac_status"); }; }; then
15845 cf_test_ncuconfig=yes
15846 else
15847 echo "$as_me: program exited with status $ac_status" >&5
15848 echo "$as_me: failed program was:" >&5
15849 cat "conftest.$ac_ext" >&5
15850 cf_test_ncuconfig=no
15851 fi
15852 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15853 fi
15854 else
15855 echo "$as_me: failed program was:" >&5
15856 cat "conftest.$ac_ext" >&5
15857 cf_test_ncuconfig=no
15858 fi
15859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15860
15861 CFLAGS="$cf_save_CFLAGS"
15862 CPPFLAGS="$cf_save_CPPFLAGS"
15863 LIBS="$cf_save_LIBS"
15864
15865 if test "x$cf_test_ncuconfig" != xyes; then
15866 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
15867 cf_pkg_cflags="$cf_temp"
15868 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
15869 cf_pkg_libs="$cf_temp"
15870 fi
15871 ;;
15872 esac
15873
15874 for cf_required in $cf_ncuconfig_root
15875 do
15876 # check for duplicates
15877 for cf_require_pkg in $REQUIRE_PKG
15878 do
15879 if test "$cf_required" = "$cf_require_pkg"
15880 then
15881 cf_required=
15882 break
15883 fi
15884 done
15885 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
15886 done
15887
15888 for cf_add_cflags in $cf_pkg_cflags
15889 do
15890 case "x$cf_add_cflags" in
15891 (x-[DU]*)
15892
15893 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
15894 while true
15895 do
15896 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'`
15897 test "$CFLAGS" != "$cf_old_cflag" || break
15898
15899 CFLAGS="$cf_old_cflag"
15900 done
15901
15902 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
15903 while true
15904 do
15905 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'`
15906 test "$CPPFLAGS" != "$cf_old_cflag" || break
15907
15908 CPPFLAGS="$cf_old_cflag"
15909 done
15910
15911 ;;
15912 esac
15913
15914 cf_fix_cppflags=no
15915 cf_new_cflags=
15916 cf_new_cppflags=
15917 cf_new_extra_cppflags=
15918
15919 for cf_add_cflags in $cf_add_cflags
15920 do
15921 case "$cf_fix_cppflags" in
15922 (no)
15923 case "$cf_add_cflags" in
15924 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15925 case "$cf_add_cflags" in
15926 (-D*)
15927 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15928
15929 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15930 && test -z "${cf_tst_cflags}" \
15931 && cf_fix_cppflags=yes
15932
15933 if test "$cf_fix_cppflags" = yes ; then
15934
15935 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15936 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15937
15938 continue
15939 elif test "${cf_tst_cflags}" = "\"'" ; then
15940
15941 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15942 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15943
15944 continue
15945 fi
15946 ;;
15947 esac
15948 case "$CPPFLAGS" in
15949 (*$cf_add_cflags)
15950 ;;
15951 (*)
15952 case "$cf_add_cflags" in
15953 (-D*)
15954 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15955
15956 CPPFLAGS=`echo "$CPPFLAGS" | \
15957 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15958 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15959
15960 ;;
15961 esac
15962
15963 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15964 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15965
15966 ;;
15967 esac
15968 ;;
15969 (*)
15970
15971 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15972 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15973
15974 ;;
15975 esac
15976 ;;
15977 (yes)
15978
15979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15981
15982 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15983
15984 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15985 && test -z "${cf_tst_cflags}" \
15986 && cf_fix_cppflags=no
15987 ;;
15988 esac
15989 done
15990
15991 if test -n "$cf_new_cflags" ; then
15992
15993 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15994 CFLAGS="${CFLAGS}$cf_new_cflags"
15995
15996 fi
15997
15998 if test -n "$cf_new_cppflags" ; then
15999
16000 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16001 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16002
16003 fi
16004
16005 if test -n "$cf_new_extra_cppflags" ; then
16006
16007 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16008 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16009
16010 fi
16011
16012 done
16013
16014 cf_add_libs="$LIBS"
16015 # reverse order
16016 cf_add_0lib=
16017 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16018 # filter duplicates
16019 for cf_add_1lib in $cf_add_0lib; do
16020 for cf_add_2lib in $cf_add_libs; do
16021 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16022 cf_add_1lib=
16023 break
16024 fi
16025 done
16026 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16027 done
16028 LIBS="$cf_add_libs"
16029
16030 cat >"conftest.$ac_ext" <<_ACEOF
16031 #line 16031 "configure"
16032 #include "confdefs.h"
16033 #include <${cf_cv_ncurses_header:-curses.h}>
16034 int
16035 main (void)
16036 {
16037 initscr(); mousemask(0,0); tigetstr((char *)0);
16038 ;
16039 return 0;
16040 }
16041 _ACEOF
16042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16043 if { (eval echo "$as_me:16043: \"$ac_link\"") >&5
16044 (eval $ac_link) 2>&5
16045 ac_status=$?
16046 echo "$as_me:16046: \$? = $ac_status" >&5
16047 (exit "$ac_status"); } &&
16048 { ac_try='test -s "conftest$ac_exeext"'
16049 { (eval echo "$as_me:16049: \"$ac_try\"") >&5
16050 (eval $ac_try) 2>&5
16051 ac_status=$?
16052 echo "$as_me:16052: \$? = $ac_status" >&5
16053 (exit "$ac_status"); }; }; then
16054 if test "$cross_compiling" = yes; then
16055 cf_have_ncuconfig=maybe
16056 else
16057 cat >"conftest.$ac_ext" <<_ACEOF
16058 #line 16058 "configure"
16059 #include "confdefs.h"
16060 #include <${cf_cv_ncurses_header:-curses.h}>
16061 int main(void)
16062 { const char *xx = curses_version(); return (xx == 0); }
16063 _ACEOF
16064 rm -f "conftest$ac_exeext"
16065 if { (eval echo "$as_me:16065: \"$ac_link\"") >&5
16066 (eval $ac_link) 2>&5
16067 ac_status=$?
16068 echo "$as_me:16068: \$? = $ac_status" >&5
16069 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16070 { (eval echo "$as_me:16070: \"$ac_try\"") >&5
16071 (eval $ac_try) 2>&5
16072 ac_status=$?
16073 echo "$as_me:16073: \$? = $ac_status" >&5
16074 (exit "$ac_status"); }; }; then
16075 cf_have_ncuconfig=yes
16076 else
16077 echo "$as_me: program exited with status $ac_status" >&5
16078 echo "$as_me: failed program was:" >&5
16079 cat "conftest.$ac_ext" >&5
16080 cf_have_ncuconfig=no
16081 fi
16082 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16083 fi
16084 else
16085 echo "$as_me: failed program was:" >&5
16086 cat "conftest.$ac_ext" >&5
16087 cf_have_ncuconfig=no
16088 fi
16089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16090 echo "$as_me:16090: result: $cf_have_ncuconfig" >&5
16091 echo "${ECHO_T}$cf_have_ncuconfig" >&6
16092 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
16093 if test "$cf_have_ncuconfig" != "yes"
16094 then
16095 CPPFLAGS="$cf_save_CPPFLAGS"
16096 LIBS="$cf_save_LIBS"
16097 NCURSES_CONFIG_PKG=none
16098 else
16099
16100 cat >>confdefs.h <<\EOF
16101 #define NCURSES 1
16102 EOF
16103
16104 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
16105
16106 echo "$as_me:16106: checking for terminfo header" >&5
16107 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
16108 if test "${cf_cv_term_header+set}" = set; then
16109 echo $ECHO_N "(cached) $ECHO_C" >&6
16110 else
16111
16112 case "${cf_cv_ncurses_header}" in
16113 (*/ncurses.h|*/ncursesw.h)
16114 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
16115 ;;
16116 (*)
16117 cf_term_header=term.h
16118 ;;
16119 esac
16120
16121 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
16122 do
16123 cat >"conftest.$ac_ext" <<_ACEOF
16124 #line 16124 "configure"
16125 #include "confdefs.h"
16126 #include <stdio.h>
16127 #include <${cf_cv_ncurses_header:-curses.h}>
16128 #include <$cf_test>
16129
16130 int
16131 main (void)
16132 {
16133 int x = auto_left_margin; (void)x
16134 ;
16135 return 0;
16136 }
16137 _ACEOF
16138 rm -f "conftest.$ac_objext"
16139 if { (eval echo "$as_me:16139: \"$ac_compile\"") >&5
16140 (eval $ac_compile) 2>&5
16141 ac_status=$?
16142 echo "$as_me:16142: \$? = $ac_status" >&5
16143 (exit "$ac_status"); } &&
16144 { ac_try='test -s "conftest.$ac_objext"'
16145 { (eval echo "$as_me:16145: \"$ac_try\"") >&5
16146 (eval $ac_try) 2>&5
16147 ac_status=$?
16148 echo "$as_me:16148: \$? = $ac_status" >&5
16149 (exit "$ac_status"); }; }; then
16150
16151 cf_cv_term_header="$cf_test"
16152 else
16153 echo "$as_me: failed program was:" >&5
16154 cat "conftest.$ac_ext" >&5
16155
16156 cf_cv_term_header=unknown
16157
16158 fi
16159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16160 test "$cf_cv_term_header" != unknown && break
16161 done
16162
16163 fi
16164 echo "$as_me:16164: result: $cf_cv_term_header" >&5
16165 echo "${ECHO_T}$cf_cv_term_header" >&6
16166
16167 # Set definitions to allow ifdef'ing to accommodate subdirectories
16168
16169 case "$cf_cv_term_header" in
16170 (*term.h)
16171
16172 cat >>confdefs.h <<\EOF
16173 #define HAVE_TERM_H 1
16174 EOF
16175
16176 ;;
16177 esac
16178
16179 case "$cf_cv_term_header" in
16180 (ncurses/term.h)
16181
16182 cat >>confdefs.h <<\EOF
16183 #define HAVE_NCURSES_TERM_H 1
16184 EOF
16185
16186 ;;
16187 (ncursesw/term.h)
16188
16189 cat >>confdefs.h <<\EOF
16190 #define HAVE_NCURSESW_TERM_H 1
16191 EOF
16192
16193 ;;
16194 esac
16195
16196 fi
16197
16198 else
16199 echo "$as_me:16199: result: no" >&5
16200 echo "${ECHO_T}no" >&6
16201 NCURSES_CONFIG_PKG=none
16202 fi
16203 else
16204 NCURSES_CONFIG_PKG=none
16205 fi
16206
16207 if test "x$cf_have_ncuconfig" = "xno"; then
16208 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
16209
16210 if test -n "$ac_tool_prefix"; then
16211 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
16212 do
16213 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16214 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16215 echo "$as_me:16215: checking for $ac_word" >&5
16216 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16217 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
16218 echo $ECHO_N "(cached) $ECHO_C" >&6
16219 else
16220 if test -n "$NCURSES_CONFIG"; then
16221 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
16222 else
16223 ac_save_IFS=$IFS; IFS=$ac_path_separator
16224 ac_dummy="$PATH"
16225 for ac_dir in $ac_dummy; do
16226 IFS=$ac_save_IFS
16227 test -z "$ac_dir" && ac_dir=.
16228 $as_executable_p "$ac_dir/$ac_word" || continue
16229 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16230 echo "$as_me:16230: found $ac_dir/$ac_word" >&5
16231 break
16232 done
16233
16234 fi
16235 fi
16236 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
16237 if test -n "$NCURSES_CONFIG"; then
16238 echo "$as_me:16238: result: $NCURSES_CONFIG" >&5
16239 echo "${ECHO_T}$NCURSES_CONFIG" >&6
16240 else
16241 echo "$as_me:16241: result: no" >&5
16242 echo "${ECHO_T}no" >&6
16243 fi
16244
16245 test -n "$NCURSES_CONFIG" && break
16246 done
16247 fi
16248 if test -z "$NCURSES_CONFIG"; then
16249 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
16250 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
16251 do
16252 # Extract the first word of "$ac_prog", so it can be a program name with args.
16253 set dummy $ac_prog; ac_word=$2
16254 echo "$as_me:16254: checking for $ac_word" >&5
16255 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16256 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
16257 echo $ECHO_N "(cached) $ECHO_C" >&6
16258 else
16259 if test -n "$ac_ct_NCURSES_CONFIG"; then
16260 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
16261 else
16262 ac_save_IFS=$IFS; IFS=$ac_path_separator
16263 ac_dummy="$PATH"
16264 for ac_dir in $ac_dummy; do
16265 IFS=$ac_save_IFS
16266 test -z "$ac_dir" && ac_dir=.
16267 $as_executable_p "$ac_dir/$ac_word" || continue
16268 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
16269 echo "$as_me:16269: found $ac_dir/$ac_word" >&5
16270 break
16271 done
16272
16273 fi
16274 fi
16275 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
16276 if test -n "$ac_ct_NCURSES_CONFIG"; then
16277 echo "$as_me:16277: result: $ac_ct_NCURSES_CONFIG" >&5
16278 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
16279 else
16280 echo "$as_me:16280: result: no" >&5
16281 echo "${ECHO_T}no" >&6
16282 fi
16283
16284 test -n "$ac_ct_NCURSES_CONFIG" && break
16285 done
16286 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
16287
16288 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
16289 fi
16290
16291 if test "$NCURSES_CONFIG" != none ; then
16292
16293 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
16294 do
16295 case "x$cf_add_cflags" in
16296 (x-[DU]*)
16297
16298 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16299 while true
16300 do
16301 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'`
16302 test "$CFLAGS" != "$cf_old_cflag" || break
16303
16304 CFLAGS="$cf_old_cflag"
16305 done
16306
16307 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
16308 while true
16309 do
16310 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'`
16311 test "$CPPFLAGS" != "$cf_old_cflag" || break
16312
16313 CPPFLAGS="$cf_old_cflag"
16314 done
16315
16316 ;;
16317 esac
16318
16319 cf_fix_cppflags=no
16320 cf_new_cflags=
16321 cf_new_cppflags=
16322 cf_new_extra_cppflags=
16323
16324 for cf_add_cflags in $cf_add_cflags
16325 do
16326 case "$cf_fix_cppflags" in
16327 (no)
16328 case "$cf_add_cflags" in
16329 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16330 case "$cf_add_cflags" in
16331 (-D*)
16332 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16333
16334 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16335 && test -z "${cf_tst_cflags}" \
16336 && cf_fix_cppflags=yes
16337
16338 if test "$cf_fix_cppflags" = yes ; then
16339
16340 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16341 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16342
16343 continue
16344 elif test "${cf_tst_cflags}" = "\"'" ; then
16345
16346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16348
16349 continue
16350 fi
16351 ;;
16352 esac
16353 case "$CPPFLAGS" in
16354 (*$cf_add_cflags)
16355 ;;
16356 (*)
16357 case "$cf_add_cflags" in
16358 (-D*)
16359 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16360
16361 CPPFLAGS=`echo "$CPPFLAGS" | \
16362 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16363 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16364
16365 ;;
16366 esac
16367
16368 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16369 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16370
16371 ;;
16372 esac
16373 ;;
16374 (*)
16375
16376 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16377 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16378
16379 ;;
16380 esac
16381 ;;
16382 (yes)
16383
16384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16386
16387 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16388
16389 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16390 && test -z "${cf_tst_cflags}" \
16391 && cf_fix_cppflags=no
16392 ;;
16393 esac
16394 done
16395
16396 if test -n "$cf_new_cflags" ; then
16397
16398 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16399 CFLAGS="${CFLAGS}$cf_new_cflags"
16400
16401 fi
16402
16403 if test -n "$cf_new_cppflags" ; then
16404
16405 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16406 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16407
16408 fi
16409
16410 if test -n "$cf_new_extra_cppflags" ; then
16411
16412 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16413 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16414
16415 fi
16416
16417 done
16418
16419 cf_add_libs="$LIBS"
16420 # reverse order
16421 cf_add_0lib=
16422 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16423 # filter duplicates
16424 for cf_add_1lib in $cf_add_0lib; do
16425 for cf_add_2lib in $cf_add_libs; do
16426 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16427 cf_add_1lib=
16428 break
16429 fi
16430 done
16431 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16432 done
16433 LIBS="$cf_add_libs"
16434
16435 # even with config script, some packages use no-override for curses.h
16436
16437 echo "$as_me:16437: checking if we have identified curses headers" >&5
16438 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
16439 if test "${cf_cv_ncurses_header+set}" = set; then
16440 echo $ECHO_N "(cached) $ECHO_C" >&6
16441 else
16442
16443 cf_cv_ncurses_header=none
16444 for cf_header in \
16445 ncurses.h $cf_cv_screen/ncurses.h \
16446 curses.h $cf_cv_screen/curses.h
16447 do
16448 cat >"conftest.$ac_ext" <<_ACEOF
16449 #line 16449 "configure"
16450 #include "confdefs.h"
16451 #include <${cf_header}>
16452 int
16453 main (void)
16454 {
16455 initscr(); endwin()
16456 ;
16457 return 0;
16458 }
16459 _ACEOF
16460 rm -f "conftest.$ac_objext"
16461 if { (eval echo "$as_me:16461: \"$ac_compile\"") >&5
16462 (eval $ac_compile) 2>&5
16463 ac_status=$?
16464 echo "$as_me:16464: \$? = $ac_status" >&5
16465 (exit "$ac_status"); } &&
16466 { ac_try='test -s "conftest.$ac_objext"'
16467 { (eval echo "$as_me:16467: \"$ac_try\"") >&5
16468 (eval $ac_try) 2>&5
16469 ac_status=$?
16470 echo "$as_me:16470: \$? = $ac_status" >&5
16471 (exit "$ac_status"); }; }; then
16472 cf_cv_ncurses_header=$cf_header; break
16473 else
16474 echo "$as_me: failed program was:" >&5
16475 cat "conftest.$ac_ext" >&5
16476 fi
16477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16478 done
16479
16480 fi
16481 echo "$as_me:16481: result: $cf_cv_ncurses_header" >&5
16482 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
16483
16484 if test "$cf_cv_ncurses_header" = none ; then
16485 { { echo "$as_me:16485: error: No curses header-files found" >&5
16486 echo "$as_me: error: No curses header-files found" >&2;}
16487 { (exit 1); exit 1; }; }
16488 fi
16489
16490 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
16491
16492 for ac_header in $cf_cv_ncurses_header
16493 do
16494 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16495 echo "$as_me:16495: checking for $ac_header" >&5
16496 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16498 echo $ECHO_N "(cached) $ECHO_C" >&6
16499 else
16500 cat >"conftest.$ac_ext" <<_ACEOF
16501 #line 16501 "configure"
16502 #include "confdefs.h"
16503 #include <$ac_header>
16504 _ACEOF
16505 if { (eval echo "$as_me:16505: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16506 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16507 ac_status=$?
16508 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16509 rm -f conftest.er1
16510 cat conftest.err >&5
16511 echo "$as_me:16511: \$? = $ac_status" >&5
16512 (exit "$ac_status"); } >/dev/null; then
16513 if test -s conftest.err; then
16514 ac_cpp_err=$ac_c_preproc_warn_flag
16515 else
16516 ac_cpp_err=
16517 fi
16518 else
16519 ac_cpp_err=yes
16520 fi
16521 if test -z "$ac_cpp_err"; then
16522 eval "$as_ac_Header=yes"
16523 else
16524 echo "$as_me: failed program was:" >&5
16525 cat "conftest.$ac_ext" >&5
16526 eval "$as_ac_Header=no"
16527 fi
16528 rm -f conftest.err "conftest.$ac_ext"
16529 fi
16530 echo "$as_me:16530: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16531 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16532 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16533 cat >>confdefs.h <<EOF
16534 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16535 EOF
16536
16537 fi
16538 done
16539
16540 cat >>confdefs.h <<\EOF
16541 #define NCURSES 1
16542 EOF
16543
16544 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16545
16546 cat >>confdefs.h <<EOF
16547 #define $cf_nculib_ROOT 1
16548 EOF
16549
16550 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
16551
16552 else
16553
16554 cf_ncuhdr_root=$cf_cv_screen
16555
16556 test -n "$cf_cv_curses_dir" && \
16557 test "$cf_cv_curses_dir" != "no" && { \
16558
16559 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
16560 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
16561 do
16562 while test "$cf_add_incdir" != /usr/include
16563 do
16564 if test -d "$cf_add_incdir"
16565 then
16566 cf_have_incdir=no
16567 if test -n "$CFLAGS$CPPFLAGS" ; then
16568 # a loop is needed to ensure we can add subdirs of existing dirs
16569 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16570 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16571 cf_have_incdir=yes; break
16572 fi
16573 done
16574 fi
16575
16576 if test "$cf_have_incdir" = no ; then
16577 if test "$cf_add_incdir" = /usr/local/include ; then
16578 if test "$GCC" = yes
16579 then
16580 cf_save_CPPFLAGS=$CPPFLAGS
16581
16582 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16583 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16584
16585 cat >"conftest.$ac_ext" <<_ACEOF
16586 #line 16586 "configure"
16587 #include "confdefs.h"
16588 #include <stdio.h>
16589 int
16590 main (void)
16591 {
16592 printf("Hello")
16593 ;
16594 return 0;
16595 }
16596 _ACEOF
16597 rm -f "conftest.$ac_objext"
16598 if { (eval echo "$as_me:16598: \"$ac_compile\"") >&5
16599 (eval $ac_compile) 2>&5
16600 ac_status=$?
16601 echo "$as_me:16601: \$? = $ac_status" >&5
16602 (exit "$ac_status"); } &&
16603 { ac_try='test -s "conftest.$ac_objext"'
16604 { (eval echo "$as_me:16604: \"$ac_try\"") >&5
16605 (eval $ac_try) 2>&5
16606 ac_status=$?
16607 echo "$as_me:16607: \$? = $ac_status" >&5
16608 (exit "$ac_status"); }; }; then
16609 :
16610 else
16611 echo "$as_me: failed program was:" >&5
16612 cat "conftest.$ac_ext" >&5
16613 cf_have_incdir=yes
16614 fi
16615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16616 CPPFLAGS=$cf_save_CPPFLAGS
16617 fi
16618 fi
16619 fi
16620
16621 if test "$cf_have_incdir" = no ; then
16622 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
16623
16624 echo "${as_me:-configure}:16624: testing adding $cf_add_incdir to include-path ..." 1>&5
16625
16626 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16627
16628 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16629 test "$cf_top_incdir" = "$cf_add_incdir" && break
16630 cf_add_incdir="$cf_top_incdir"
16631 else
16632 break
16633 fi
16634 else
16635 break
16636 fi
16637 done
16638 done
16639 fi
16640
16641 }
16642
16643 echo "$as_me:16643: checking for $cf_ncuhdr_root header in include-path" >&5
16644 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
16645 if test "${cf_cv_ncurses_h+set}" = set; then
16646 echo $ECHO_N "(cached) $ECHO_C" >&6
16647 else
16648
16649 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
16650 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
16651 for cf_header in $cf_header_list
16652 do
16653
16654 cat >"conftest.$ac_ext" <<_ACEOF
16655 #line 16655 "configure"
16656 #include "confdefs.h"
16657
16658 #include <$cf_header>
16659 int
16660 main (void)
16661 {
16662
16663 #ifdef NCURSES_VERSION
16664
16665 printf("%s\\n", NCURSES_VERSION);
16666 #else
16667 #ifdef __NCURSES_H
16668 printf("old\\n");
16669 #else
16670 #error __NCURSES_H is not defined
16671 #endif
16672 #endif
16673
16674 ;
16675 return 0;
16676 }
16677 _ACEOF
16678 rm -f "conftest.$ac_objext"
16679 if { (eval echo "$as_me:16679: \"$ac_compile\"") >&5
16680 (eval $ac_compile) 2>&5
16681 ac_status=$?
16682 echo "$as_me:16682: \$? = $ac_status" >&5
16683 (exit "$ac_status"); } &&
16684 { ac_try='test -s "conftest.$ac_objext"'
16685 { (eval echo "$as_me:16685: \"$ac_try\"") >&5
16686 (eval $ac_try) 2>&5
16687 ac_status=$?
16688 echo "$as_me:16688: \$? = $ac_status" >&5
16689 (exit "$ac_status"); }; }; then
16690 cf_cv_ncurses_h=$cf_header
16691
16692 else
16693 echo "$as_me: failed program was:" >&5
16694 cat "conftest.$ac_ext" >&5
16695 cf_cv_ncurses_h=no
16696 fi
16697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16698
16699 test "$cf_cv_ncurses_h" != no && break
16700 done
16701
16702 fi
16703 echo "$as_me:16703: result: $cf_cv_ncurses_h" >&5
16704 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
16705
16706 if test "$cf_cv_ncurses_h" != no ; then
16707 cf_cv_ncurses_header=$cf_cv_ncurses_h
16708 else
16709
16710 echo "$as_me:16710: checking for $cf_ncuhdr_root include-path" >&5
16711 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
16712 if test "${cf_cv_ncurses_h2+set}" = set; then
16713 echo $ECHO_N "(cached) $ECHO_C" >&6
16714 else
16715
16716 test -n "$verbose" && echo
16717
16718 cf_search=
16719
16720 # collect the current set of include-directories from compiler flags
16721 cf_header_path_list=""
16722 if test -n "${CFLAGS}${CPPFLAGS}" ; then
16723 for cf_header_path in $CPPFLAGS $CFLAGS
16724 do
16725 case "$cf_header_path" in
16726 (-I*)
16727 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
16728
16729 test "x$cf_header_path" != "xNONE" && \
16730 test -d "$cf_header_path" && \
16731 {
16732 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
16733 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
16734 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
16735 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
16736 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
16737 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"
16738 }
16739
16740 cf_header_path_list="$cf_header_path_list $cf_search"
16741 ;;
16742 esac
16743 done
16744 fi
16745
16746 # add the variations for the package we are looking for
16747
16748 cf_search=
16749
16750 test "x$prefix" != "xNONE" && \
16751 test -d "$prefix" && \
16752 {
16753 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
16754 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
16755 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
16756 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
16757 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
16758 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
16759 }
16760
16761 for cf_subdir_prefix in \
16762 /usr \
16763 /usr/local \
16764 /usr/pkg \
16765 /opt \
16766 /opt/local \
16767 $HOME
16768 do
16769
16770 test "x$cf_subdir_prefix" != "x$prefix" && \
16771 test -d "$cf_subdir_prefix" && \
16772 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
16773 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
16774 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
16775 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
16776 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
16777 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
16778 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"
16779 }
16780
16781 done
16782
16783 test "$includedir" != NONE && \
16784 test "$includedir" != "/usr/include" && \
16785 test -d "$includedir" && {
16786 test -d "$includedir" && cf_search="$cf_search $includedir"
16787 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
16788 }
16789
16790 test "$oldincludedir" != NONE && \
16791 test "$oldincludedir" != "/usr/include" && \
16792 test -d "$oldincludedir" && {
16793 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
16794 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
16795 }
16796
16797 cf_search="$cf_search $cf_header_path_list"
16798
16799 test -n "$verbose" && echo "search path $cf_search"
16800 cf_save2_CPPFLAGS="$CPPFLAGS"
16801 for cf_incdir in $cf_search
16802 do
16803
16804 if test -n "$cf_incdir" ; then
16805 for cf_add_incdir in $cf_incdir
16806 do
16807 while test "$cf_add_incdir" != /usr/include
16808 do
16809 if test -d "$cf_add_incdir"
16810 then
16811 cf_have_incdir=no
16812 if test -n "$CFLAGS$CPPFLAGS" ; then
16813 # a loop is needed to ensure we can add subdirs of existing dirs
16814 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16815 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16816 cf_have_incdir=yes; break
16817 fi
16818 done
16819 fi
16820
16821 if test "$cf_have_incdir" = no ; then
16822 if test "$cf_add_incdir" = /usr/local/include ; then
16823 if test "$GCC" = yes
16824 then
16825 cf_save_CPPFLAGS=$CPPFLAGS
16826
16827 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16828 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16829
16830 cat >"conftest.$ac_ext" <<_ACEOF
16831 #line 16831 "configure"
16832 #include "confdefs.h"
16833 #include <stdio.h>
16834 int
16835 main (void)
16836 {
16837 printf("Hello")
16838 ;
16839 return 0;
16840 }
16841 _ACEOF
16842 rm -f "conftest.$ac_objext"
16843 if { (eval echo "$as_me:16843: \"$ac_compile\"") >&5
16844 (eval $ac_compile) 2>&5
16845 ac_status=$?
16846 echo "$as_me:16846: \$? = $ac_status" >&5
16847 (exit "$ac_status"); } &&
16848 { ac_try='test -s "conftest.$ac_objext"'
16849 { (eval echo "$as_me:16849: \"$ac_try\"") >&5
16850 (eval $ac_try) 2>&5
16851 ac_status=$?
16852 echo "$as_me:16852: \$? = $ac_status" >&5
16853 (exit "$ac_status"); }; }; then
16854 :
16855 else
16856 echo "$as_me: failed program was:" >&5
16857 cat "conftest.$ac_ext" >&5
16858 cf_have_incdir=yes
16859 fi
16860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16861 CPPFLAGS=$cf_save_CPPFLAGS
16862 fi
16863 fi
16864 fi
16865
16866 if test "$cf_have_incdir" = no ; then
16867 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
16868
16869 echo "${as_me:-configure}:16869: testing adding $cf_add_incdir to include-path ..." 1>&5
16870
16871 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16872
16873 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16874 test "$cf_top_incdir" = "$cf_add_incdir" && break
16875 cf_add_incdir="$cf_top_incdir"
16876 else
16877 break
16878 fi
16879 else
16880 break
16881 fi
16882 done
16883 done
16884 fi
16885
16886 for cf_header in \
16887 ncurses.h \
16888 curses.h
16889 do
16890
16891 cat >"conftest.$ac_ext" <<_ACEOF
16892 #line 16892 "configure"
16893 #include "confdefs.h"
16894
16895 #include <$cf_header>
16896 int
16897 main (void)
16898 {
16899
16900 #ifdef NCURSES_VERSION
16901
16902 printf("%s\\n", NCURSES_VERSION);
16903 #else
16904 #ifdef __NCURSES_H
16905 printf("old\\n");
16906 #else
16907 #error __NCURSES_H is not defined
16908 #endif
16909 #endif
16910
16911 ;
16912 return 0;
16913 }
16914 _ACEOF
16915 rm -f "conftest.$ac_objext"
16916 if { (eval echo "$as_me:16916: \"$ac_compile\"") >&5
16917 (eval $ac_compile) 2>&5
16918 ac_status=$?
16919 echo "$as_me:16919: \$? = $ac_status" >&5
16920 (exit "$ac_status"); } &&
16921 { ac_try='test -s "conftest.$ac_objext"'
16922 { (eval echo "$as_me:16922: \"$ac_try\"") >&5
16923 (eval $ac_try) 2>&5
16924 ac_status=$?
16925 echo "$as_me:16925: \$? = $ac_status" >&5
16926 (exit "$ac_status"); }; }; then
16927 cf_cv_ncurses_h2=$cf_header
16928
16929 else
16930 echo "$as_me: failed program was:" >&5
16931 cat "conftest.$ac_ext" >&5
16932 cf_cv_ncurses_h2=no
16933 fi
16934 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16935
16936 if test "$cf_cv_ncurses_h2" != no ; then
16937 cf_cv_ncurses_h2=$cf_incdir/$cf_header
16938 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
16939 break
16940 fi
16941 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
16942 done
16943 CPPFLAGS="$cf_save2_CPPFLAGS"
16944 test "$cf_cv_ncurses_h2" != no && break
16945 done
16946 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:16946: error: not found" >&5
16947 echo "$as_me: error: not found" >&2;}
16948 { (exit 1); exit 1; }; }
16949
16950 fi
16951 echo "$as_me:16951: result: $cf_cv_ncurses_h2" >&5
16952 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
16953
16954 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
16955 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
16956 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
16957 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
16958 fi
16959
16960 if test -n "$cf_1st_incdir" ; then
16961 for cf_add_incdir in $cf_1st_incdir
16962 do
16963 while test "$cf_add_incdir" != /usr/include
16964 do
16965 if test -d "$cf_add_incdir"
16966 then
16967 cf_have_incdir=no
16968 if test -n "$CFLAGS$CPPFLAGS" ; then
16969 # a loop is needed to ensure we can add subdirs of existing dirs
16970 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16971 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16972 cf_have_incdir=yes; break
16973 fi
16974 done
16975 fi
16976
16977 if test "$cf_have_incdir" = no ; then
16978 if test "$cf_add_incdir" = /usr/local/include ; then
16979 if test "$GCC" = yes
16980 then
16981 cf_save_CPPFLAGS=$CPPFLAGS
16982
16983 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16984 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16985
16986 cat >"conftest.$ac_ext" <<_ACEOF
16987 #line 16987 "configure"
16988 #include "confdefs.h"
16989 #include <stdio.h>
16990 int
16991 main (void)
16992 {
16993 printf("Hello")
16994 ;
16995 return 0;
16996 }
16997 _ACEOF
16998 rm -f "conftest.$ac_objext"
16999 if { (eval echo "$as_me:16999: \"$ac_compile\"") >&5
17000 (eval $ac_compile) 2>&5
17001 ac_status=$?
17002 echo "$as_me:17002: \$? = $ac_status" >&5
17003 (exit "$ac_status"); } &&
17004 { ac_try='test -s "conftest.$ac_objext"'
17005 { (eval echo "$as_me:17005: \"$ac_try\"") >&5
17006 (eval $ac_try) 2>&5
17007 ac_status=$?
17008 echo "$as_me:17008: \$? = $ac_status" >&5
17009 (exit "$ac_status"); }; }; then
17010 :
17011 else
17012 echo "$as_me: failed program was:" >&5
17013 cat "conftest.$ac_ext" >&5
17014 cf_have_incdir=yes
17015 fi
17016 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17017 CPPFLAGS=$cf_save_CPPFLAGS
17018 fi
17019 fi
17020 fi
17021
17022 if test "$cf_have_incdir" = no ; then
17023 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
17024
17025 echo "${as_me:-configure}:17025: testing adding $cf_add_incdir to include-path ..." 1>&5
17026
17027 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17028
17029 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
17030 test "$cf_top_incdir" = "$cf_add_incdir" && break
17031 cf_add_incdir="$cf_top_incdir"
17032 else
17033 break
17034 fi
17035 else
17036 break
17037 fi
17038 done
17039 done
17040 fi
17041
17042 fi
17043
17044 # Set definitions to allow ifdef'ing for ncurses.h
17045
17046 case "$cf_cv_ncurses_header" in
17047 (*ncurses.h)
17048
17049 cat >>confdefs.h <<\EOF
17050 #define HAVE_NCURSES_H 1
17051 EOF
17052
17053 ;;
17054 esac
17055
17056 case "$cf_cv_ncurses_header" in
17057 (ncurses/curses.h|ncurses/ncurses.h)
17058
17059 cat >>confdefs.h <<\EOF
17060 #define HAVE_NCURSES_NCURSES_H 1
17061 EOF
17062
17063 ;;
17064 (ncursesw/curses.h|ncursesw/ncurses.h)
17065
17066 cat >>confdefs.h <<\EOF
17067 #define HAVE_NCURSESW_NCURSES_H 1
17068 EOF
17069
17070 ;;
17071 esac
17072
17073 echo "$as_me:17073: checking for terminfo header" >&5
17074 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
17075 if test "${cf_cv_term_header+set}" = set; then
17076 echo $ECHO_N "(cached) $ECHO_C" >&6
17077 else
17078
17079 case "${cf_cv_ncurses_header}" in
17080 (*/ncurses.h|*/ncursesw.h)
17081 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
17082 ;;
17083 (*)
17084 cf_term_header=term.h
17085 ;;
17086 esac
17087
17088 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
17089 do
17090 cat >"conftest.$ac_ext" <<_ACEOF
17091 #line 17091 "configure"
17092 #include "confdefs.h"
17093 #include <stdio.h>
17094 #include <${cf_cv_ncurses_header:-curses.h}>
17095 #include <$cf_test>
17096
17097 int
17098 main (void)
17099 {
17100 int x = auto_left_margin; (void)x
17101 ;
17102 return 0;
17103 }
17104 _ACEOF
17105 rm -f "conftest.$ac_objext"
17106 if { (eval echo "$as_me:17106: \"$ac_compile\"") >&5
17107 (eval $ac_compile) 2>&5
17108 ac_status=$?
17109 echo "$as_me:17109: \$? = $ac_status" >&5
17110 (exit "$ac_status"); } &&
17111 { ac_try='test -s "conftest.$ac_objext"'
17112 { (eval echo "$as_me:17112: \"$ac_try\"") >&5
17113 (eval $ac_try) 2>&5
17114 ac_status=$?
17115 echo "$as_me:17115: \$? = $ac_status" >&5
17116 (exit "$ac_status"); }; }; then
17117
17118 cf_cv_term_header="$cf_test"
17119 else
17120 echo "$as_me: failed program was:" >&5
17121 cat "conftest.$ac_ext" >&5
17122
17123 cf_cv_term_header=unknown
17124
17125 fi
17126 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17127 test "$cf_cv_term_header" != unknown && break
17128 done
17129
17130 fi
17131 echo "$as_me:17131: result: $cf_cv_term_header" >&5
17132 echo "${ECHO_T}$cf_cv_term_header" >&6
17133
17134 # Set definitions to allow ifdef'ing to accommodate subdirectories
17135
17136 case "$cf_cv_term_header" in
17137 (*term.h)
17138
17139 cat >>confdefs.h <<\EOF
17140 #define HAVE_TERM_H 1
17141 EOF
17142
17143 ;;
17144 esac
17145
17146 case "$cf_cv_term_header" in
17147 (ncurses/term.h)
17148
17149 cat >>confdefs.h <<\EOF
17150 #define HAVE_NCURSES_TERM_H 1
17151 EOF
17152
17153 ;;
17154 (ncursesw/term.h)
17155
17156 cat >>confdefs.h <<\EOF
17157 #define HAVE_NCURSESW_TERM_H 1
17158 EOF
17159
17160 ;;
17161 esac
17162
17163 # some applications need this, but should check for NCURSES_VERSION
17164
17165 cat >>confdefs.h <<\EOF
17166 #define NCURSES 1
17167 EOF
17168
17169 echo "$as_me:17169: checking for ncurses version" >&5
17170 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
17171 if test "${cf_cv_ncurses_version+set}" = set; then
17172 echo $ECHO_N "(cached) $ECHO_C" >&6
17173 else
17174
17175 cf_cv_ncurses_version=no
17176 cf_tempfile=out$$
17177 rm -f "$cf_tempfile"
17178 if test "$cross_compiling" = yes; then
17179
17180 # This will not work if the preprocessor splits the line after the
17181 # Autoconf token. The 'unproto' program does that.
17182 cat > "conftest.$ac_ext" <<EOF
17183 #include <${cf_cv_ncurses_header:-curses.h}>
17184 #undef Autoconf
17185 #ifdef NCURSES_VERSION
17186 Autoconf NCURSES_VERSION
17187 #else
17188 #ifdef __NCURSES_H
17189 Autoconf "old"
17190 #endif
17191 ;
17192 #endif
17193 EOF
17194 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
17195 { (eval echo "$as_me:17195: \"$cf_try\"") >&5
17196 (eval $cf_try) 2>&5
17197 ac_status=$?
17198 echo "$as_me:17198: \$? = $ac_status" >&5
17199 (exit "$ac_status"); }
17200 if test -f conftest.out ; then
17201 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
17202 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
17203 rm -f conftest.out
17204 fi
17205
17206 else
17207 cat >"conftest.$ac_ext" <<_ACEOF
17208 #line 17208 "configure"
17209 #include "confdefs.h"
17210
17211 $ac_includes_default
17212
17213 #include <${cf_cv_ncurses_header:-curses.h}>
17214
17215 int main(void)
17216 {
17217 FILE *fp = fopen("$cf_tempfile", "w");
17218 #ifdef NCURSES_VERSION
17219 # ifdef NCURSES_VERSION_PATCH
17220 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
17221 # else
17222 fprintf(fp, "%s\\n", NCURSES_VERSION);
17223 # endif
17224 #else
17225 # ifdef __NCURSES_H
17226 fprintf(fp, "old\\n");
17227 # else
17228 #error expected ncurses header to define __NCURSES_H
17229 # endif
17230 #endif
17231 ${cf_cv_main_return:-return}(0);
17232 }
17233 _ACEOF
17234 rm -f "conftest$ac_exeext"
17235 if { (eval echo "$as_me:17235: \"$ac_link\"") >&5
17236 (eval $ac_link) 2>&5
17237 ac_status=$?
17238 echo "$as_me:17238: \$? = $ac_status" >&5
17239 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17240 { (eval echo "$as_me:17240: \"$ac_try\"") >&5
17241 (eval $ac_try) 2>&5
17242 ac_status=$?
17243 echo "$as_me:17243: \$? = $ac_status" >&5
17244 (exit "$ac_status"); }; }; then
17245
17246 cf_cv_ncurses_version=`cat $cf_tempfile`
17247 else
17248 echo "$as_me: program exited with status $ac_status" >&5
17249 echo "$as_me: failed program was:" >&5
17250 cat "conftest.$ac_ext" >&5
17251 fi
17252 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17253 fi
17254 rm -f "$cf_tempfile"
17255
17256 fi
17257 echo "$as_me:17257: result: $cf_cv_ncurses_version" >&5
17258 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
17259 test "$cf_cv_ncurses_version" = no ||
17260 cat >>confdefs.h <<\EOF
17261 #define NCURSES 1
17262 EOF
17263
17264 cf_nculib_root=$cf_cv_screen
17265 # This works, except for the special case where we find gpm, but
17266 # ncurses is in a nonstandard location via $LIBS, and we really want
17267 # to link gpm.
17268 cf_ncurses_LIBS=""
17269 cf_ncurses_SAVE="$LIBS"
17270 echo "$as_me:17270: checking for Gpm_Open in -lgpm" >&5
17271 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
17272 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
17273 echo $ECHO_N "(cached) $ECHO_C" >&6
17274 else
17275 ac_check_lib_save_LIBS=$LIBS
17276 LIBS="-lgpm $LIBS"
17277 cat >"conftest.$ac_ext" <<_ACEOF
17278 #line 17278 "configure"
17279 #include "confdefs.h"
17280
17281 /* Override any gcc2 internal prototype to avoid an error. */
17282 #ifdef __cplusplus
17283 extern "C"
17284 #endif
17285 /* We use char because int might match the return type of a gcc2
17286 builtin and then its argument prototype would still apply. */
17287 char Gpm_Open (void);
17288 int
17289 main (void)
17290 {
17291 Gpm_Open ();
17292 ;
17293 return 0;
17294 }
17295 _ACEOF
17296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17297 if { (eval echo "$as_me:17297: \"$ac_link\"") >&5
17298 (eval $ac_link) 2>&5
17299 ac_status=$?
17300 echo "$as_me:17300: \$? = $ac_status" >&5
17301 (exit "$ac_status"); } &&
17302 { ac_try='test -s "conftest$ac_exeext"'
17303 { (eval echo "$as_me:17303: \"$ac_try\"") >&5
17304 (eval $ac_try) 2>&5
17305 ac_status=$?
17306 echo "$as_me:17306: \$? = $ac_status" >&5
17307 (exit "$ac_status"); }; }; then
17308 ac_cv_lib_gpm_Gpm_Open=yes
17309 else
17310 echo "$as_me: failed program was:" >&5
17311 cat "conftest.$ac_ext" >&5
17312 ac_cv_lib_gpm_Gpm_Open=no
17313 fi
17314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17315 LIBS=$ac_check_lib_save_LIBS
17316 fi
17317 echo "$as_me:17317: result: $ac_cv_lib_gpm_Gpm_Open" >&5
17318 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
17319 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
17320 echo "$as_me:17320: checking for initscr in -lgpm" >&5
17321 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
17322 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
17323 echo $ECHO_N "(cached) $ECHO_C" >&6
17324 else
17325 ac_check_lib_save_LIBS=$LIBS
17326 LIBS="-lgpm $LIBS"
17327 cat >"conftest.$ac_ext" <<_ACEOF
17328 #line 17328 "configure"
17329 #include "confdefs.h"
17330
17331 /* Override any gcc2 internal prototype to avoid an error. */
17332 #ifdef __cplusplus
17333 extern "C"
17334 #endif
17335 /* We use char because int might match the return type of a gcc2
17336 builtin and then its argument prototype would still apply. */
17337 char initscr (void);
17338 int
17339 main (void)
17340 {
17341 initscr ();
17342 ;
17343 return 0;
17344 }
17345 _ACEOF
17346 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17347 if { (eval echo "$as_me:17347: \"$ac_link\"") >&5
17348 (eval $ac_link) 2>&5
17349 ac_status=$?
17350 echo "$as_me:17350: \$? = $ac_status" >&5
17351 (exit "$ac_status"); } &&
17352 { ac_try='test -s "conftest$ac_exeext"'
17353 { (eval echo "$as_me:17353: \"$ac_try\"") >&5
17354 (eval $ac_try) 2>&5
17355 ac_status=$?
17356 echo "$as_me:17356: \$? = $ac_status" >&5
17357 (exit "$ac_status"); }; }; then
17358 ac_cv_lib_gpm_initscr=yes
17359 else
17360 echo "$as_me: failed program was:" >&5
17361 cat "conftest.$ac_ext" >&5
17362 ac_cv_lib_gpm_initscr=no
17363 fi
17364 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17365 LIBS=$ac_check_lib_save_LIBS
17366 fi
17367 echo "$as_me:17367: result: $ac_cv_lib_gpm_initscr" >&5
17368 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
17369 if test "$ac_cv_lib_gpm_initscr" = yes; then
17370 LIBS="$cf_ncurses_SAVE"
17371 else
17372 cf_ncurses_LIBS="-lgpm"
17373 fi
17374
17375 fi
17376
17377 case "$host_os" in
17378 (freebsd*)
17379 # This is only necessary if you are linking against an obsolete
17380 # version of ncurses (but it should do no harm, since it is static).
17381 if test "$cf_nculib_root" = ncurses ; then
17382 echo "$as_me:17382: checking for tgoto in -lmytinfo" >&5
17383 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
17384 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
17385 echo $ECHO_N "(cached) $ECHO_C" >&6
17386 else
17387 ac_check_lib_save_LIBS=$LIBS
17388 LIBS="-lmytinfo $LIBS"
17389 cat >"conftest.$ac_ext" <<_ACEOF
17390 #line 17390 "configure"
17391 #include "confdefs.h"
17392
17393 /* Override any gcc2 internal prototype to avoid an error. */
17394 #ifdef __cplusplus
17395 extern "C"
17396 #endif
17397 /* We use char because int might match the return type of a gcc2
17398 builtin and then its argument prototype would still apply. */
17399 char tgoto (void);
17400 int
17401 main (void)
17402 {
17403 tgoto ();
17404 ;
17405 return 0;
17406 }
17407 _ACEOF
17408 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17409 if { (eval echo "$as_me:17409: \"$ac_link\"") >&5
17410 (eval $ac_link) 2>&5
17411 ac_status=$?
17412 echo "$as_me:17412: \$? = $ac_status" >&5
17413 (exit "$ac_status"); } &&
17414 { ac_try='test -s "conftest$ac_exeext"'
17415 { (eval echo "$as_me:17415: \"$ac_try\"") >&5
17416 (eval $ac_try) 2>&5
17417 ac_status=$?
17418 echo "$as_me:17418: \$? = $ac_status" >&5
17419 (exit "$ac_status"); }; }; then
17420 ac_cv_lib_mytinfo_tgoto=yes
17421 else
17422 echo "$as_me: failed program was:" >&5
17423 cat "conftest.$ac_ext" >&5
17424 ac_cv_lib_mytinfo_tgoto=no
17425 fi
17426 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17427 LIBS=$ac_check_lib_save_LIBS
17428 fi
17429 echo "$as_me:17429: result: $ac_cv_lib_mytinfo_tgoto" >&5
17430 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
17431 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
17432 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
17433 fi
17434
17435 fi
17436 ;;
17437 esac
17438
17439 cf_add_libs="$LIBS"
17440 # reverse order
17441 cf_add_0lib=
17442 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17443 # filter duplicates
17444 for cf_add_1lib in $cf_add_0lib; do
17445 for cf_add_2lib in $cf_add_libs; do
17446 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17447 cf_add_1lib=
17448 break
17449 fi
17450 done
17451 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17452 done
17453 LIBS="$cf_add_libs"
17454
17455 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
17456 then
17457
17458 cf_add_libs="$LIBS"
17459 # reverse order
17460 cf_add_0lib=
17461 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17462 # filter duplicates
17463 for cf_add_1lib in $cf_add_0lib; do
17464 for cf_add_2lib in $cf_add_libs; do
17465 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17466 cf_add_1lib=
17467 break
17468 fi
17469 done
17470 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17471 done
17472 LIBS="$cf_add_libs"
17473
17474 else
17475
17476 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
17477 cf_libdir=""
17478 echo "$as_me:17478: checking for initscr" >&5
17479 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
17480 if test "${ac_cv_func_initscr+set}" = set; then
17481 echo $ECHO_N "(cached) $ECHO_C" >&6
17482 else
17483 cat >"conftest.$ac_ext" <<_ACEOF
17484 #line 17484 "configure"
17485 #include "confdefs.h"
17486 #define initscr autoconf_temporary
17487 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17488 #undef initscr
17489
17490 #ifdef __cplusplus
17491 extern "C"
17492 #endif
17493
17494 /* We use char because int might match the return type of a gcc2
17495 builtin and then its argument prototype would still apply. */
17496 char initscr (void);
17497
17498 int
17499 main (void)
17500 {
17501
17502 /* The GNU C library defines stubs for functions which it implements
17503 to always fail with ENOSYS. Some functions are actually named
17504 something starting with __ and the normal name is an alias. */
17505 #if defined (__stub_initscr) || defined (__stub___initscr)
17506 #error found stub for initscr
17507 #endif
17508
17509 return initscr ();
17510 ;
17511 return 0;
17512 }
17513 _ACEOF
17514 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17515 if { (eval echo "$as_me:17515: \"$ac_link\"") >&5
17516 (eval $ac_link) 2>&5
17517 ac_status=$?
17518 echo "$as_me:17518: \$? = $ac_status" >&5
17519 (exit "$ac_status"); } &&
17520 { ac_try='test -s "conftest$ac_exeext"'
17521 { (eval echo "$as_me:17521: \"$ac_try\"") >&5
17522 (eval $ac_try) 2>&5
17523 ac_status=$?
17524 echo "$as_me:17524: \$? = $ac_status" >&5
17525 (exit "$ac_status"); }; }; then
17526 ac_cv_func_initscr=yes
17527 else
17528 echo "$as_me: failed program was:" >&5
17529 cat "conftest.$ac_ext" >&5
17530 ac_cv_func_initscr=no
17531 fi
17532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17533 fi
17534 echo "$as_me:17534: result: $ac_cv_func_initscr" >&5
17535 echo "${ECHO_T}$ac_cv_func_initscr" >&6
17536 if test "$ac_cv_func_initscr" = yes; then
17537 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17538 else
17539
17540 cf_save_LIBS="$LIBS"
17541 echo "$as_me:17541: checking for initscr in -l$cf_nculib_root" >&5
17542 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
17543 LIBS="-l$cf_nculib_root $LIBS"
17544 cat >"conftest.$ac_ext" <<_ACEOF
17545 #line 17545 "configure"
17546 #include "confdefs.h"
17547 #include <${cf_cv_ncurses_header:-curses.h}>
17548 int
17549 main (void)
17550 {
17551 initscr()
17552 ;
17553 return 0;
17554 }
17555 _ACEOF
17556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17557 if { (eval echo "$as_me:17557: \"$ac_link\"") >&5
17558 (eval $ac_link) 2>&5
17559 ac_status=$?
17560 echo "$as_me:17560: \$? = $ac_status" >&5
17561 (exit "$ac_status"); } &&
17562 { ac_try='test -s "conftest$ac_exeext"'
17563 { (eval echo "$as_me:17563: \"$ac_try\"") >&5
17564 (eval $ac_try) 2>&5
17565 ac_status=$?
17566 echo "$as_me:17566: \$? = $ac_status" >&5
17567 (exit "$ac_status"); }; }; then
17568 echo "$as_me:17568: result: yes" >&5
17569 echo "${ECHO_T}yes" >&6
17570 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17571
17572 else
17573 echo "$as_me: failed program was:" >&5
17574 cat "conftest.$ac_ext" >&5
17575 echo "$as_me:17575: result: no" >&5
17576 echo "${ECHO_T}no" >&6
17577
17578 cf_search=
17579 cf_library_path_list=""
17580 if test -n "${LDFLAGS}${LIBS}" ; then
17581 for cf_library_path in $LDFLAGS $LIBS
17582 do
17583 case "$cf_library_path" in
17584 (-L*)
17585 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
17586
17587 test "x$cf_library_path" != "xNONE" && \
17588 test -d "$cf_library_path" && \
17589 {
17590 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
17591 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
17592 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
17593 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
17594 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
17595 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"
17596 }
17597
17598 cf_library_path_list="$cf_library_path_list $cf_search"
17599 ;;
17600 esac
17601 done
17602 fi
17603
17604 cf_search=
17605
17606 test "x$prefix" != "xNONE" && \
17607 test -d "$prefix" && \
17608 {
17609 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
17610 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
17611 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
17612 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
17613 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
17614 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
17615 }
17616
17617 for cf_subdir_prefix in \
17618 /usr \
17619 /usr/local \
17620 /usr/pkg \
17621 /opt \
17622 /opt/local \
17623 $HOME
17624 do
17625
17626 test "x$cf_subdir_prefix" != "x$prefix" && \
17627 test -d "$cf_subdir_prefix" && \
17628 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
17629 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
17630 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
17631 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
17632 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
17633 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
17634 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"
17635 }
17636
17637 done
17638
17639 cf_search="$cf_library_path_list $cf_search"
17640
17641 for cf_libdir in $cf_search
17642 do
17643 echo "$as_me:17643: checking for -l$cf_nculib_root in $cf_libdir" >&5
17644 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
17645 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
17646 cat >"conftest.$ac_ext" <<_ACEOF
17647 #line 17647 "configure"
17648 #include "confdefs.h"
17649 #include <${cf_cv_ncurses_header:-curses.h}>
17650 int
17651 main (void)
17652 {
17653 initscr()
17654 ;
17655 return 0;
17656 }
17657 _ACEOF
17658 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17659 if { (eval echo "$as_me:17659: \"$ac_link\"") >&5
17660 (eval $ac_link) 2>&5
17661 ac_status=$?
17662 echo "$as_me:17662: \$? = $ac_status" >&5
17663 (exit "$ac_status"); } &&
17664 { ac_try='test -s "conftest$ac_exeext"'
17665 { (eval echo "$as_me:17665: \"$ac_try\"") >&5
17666 (eval $ac_try) 2>&5
17667 ac_status=$?
17668 echo "$as_me:17668: \$? = $ac_status" >&5
17669 (exit "$ac_status"); }; }; then
17670 echo "$as_me:17670: result: yes" >&5
17671 echo "${ECHO_T}yes" >&6
17672 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
17673 break
17674 else
17675 echo "$as_me: failed program was:" >&5
17676 cat "conftest.$ac_ext" >&5
17677 echo "$as_me:17677: result: no" >&5
17678 echo "${ECHO_T}no" >&6
17679 LIBS="$cf_save_LIBS"
17680 fi
17681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17682 done
17683
17684 fi
17685 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17686
17687 fi
17688
17689 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
17690
17691 if test "$cf_found_library" = no ; then
17692 { { echo "$as_me:17692: error: Cannot link $cf_nculib_root library" >&5
17693 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
17694 { (exit 1); exit 1; }; }
17695 fi
17696
17697 fi
17698
17699 if test -n "$cf_ncurses_LIBS" ; then
17700 echo "$as_me:17700: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
17701 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
17702 cf_ncurses_SAVE="$LIBS"
17703 for p in $cf_ncurses_LIBS ; do
17704 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
17705 if test "$q" != "$LIBS" ; then
17706 LIBS="$q"
17707 fi
17708 done
17709 cat >"conftest.$ac_ext" <<_ACEOF
17710 #line 17710 "configure"
17711 #include "confdefs.h"
17712 #include <${cf_cv_ncurses_header:-curses.h}>
17713 int
17714 main (void)
17715 {
17716 initscr(); mousemask(0,0); tigetstr((char *)0);
17717 ;
17718 return 0;
17719 }
17720 _ACEOF
17721 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17722 if { (eval echo "$as_me:17722: \"$ac_link\"") >&5
17723 (eval $ac_link) 2>&5
17724 ac_status=$?
17725 echo "$as_me:17725: \$? = $ac_status" >&5
17726 (exit "$ac_status"); } &&
17727 { ac_try='test -s "conftest$ac_exeext"'
17728 { (eval echo "$as_me:17728: \"$ac_try\"") >&5
17729 (eval $ac_try) 2>&5
17730 ac_status=$?
17731 echo "$as_me:17731: \$? = $ac_status" >&5
17732 (exit "$ac_status"); }; }; then
17733 echo "$as_me:17733: result: yes" >&5
17734 echo "${ECHO_T}yes" >&6
17735 else
17736 echo "$as_me: failed program was:" >&5
17737 cat "conftest.$ac_ext" >&5
17738 echo "$as_me:17738: result: no" >&5
17739 echo "${ECHO_T}no" >&6
17740 LIBS="$cf_ncurses_SAVE"
17741 fi
17742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17743 fi
17744
17745 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17746
17747 cat >>confdefs.h <<EOF
17748 #define $cf_nculib_ROOT 1
17749 EOF
17750
17751 fi
17752 else
17753 NCURSES_CONFIG=none
17754 fi
17755
17756 ;;
17757 (ncurses*)
17758
17759 cf_ncuconfig_root=$cf_cv_screen
17760 cf_have_ncuconfig=no
17761
17762 if test "x${PKG_CONFIG:=none}" != xnone; then
17763 echo "$as_me:17763: checking pkg-config for $cf_ncuconfig_root" >&5
17764 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
17765 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
17766 echo "$as_me:17766: result: yes" >&5
17767 echo "${ECHO_T}yes" >&6
17768
17769 echo "$as_me:17769: checking if the $cf_ncuconfig_root package files work" >&5
17770 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
17771 cf_have_ncuconfig=unknown
17772
17773 cf_save_CFLAGS="$CFLAGS"
17774 cf_save_CPPFLAGS="$CPPFLAGS"
17775 cf_save_LIBS="$LIBS"
17776
17777 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
17778 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
17779
17780 # while -W for passing linker flags is prevalent, it is not "standard".
17781 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
17782 # incompatible _and_ non-standard -W option which gives an error. Work
17783 # around that pitfall.
17784 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
17785 (x*c[89]9@@*-W*)
17786
17787 cf_fix_cppflags=no
17788 cf_new_cflags=
17789 cf_new_cppflags=
17790 cf_new_extra_cppflags=
17791
17792 for cf_add_cflags in $cf_pkg_cflags
17793 do
17794 case "$cf_fix_cppflags" in
17795 (no)
17796 case "$cf_add_cflags" in
17797 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17798 case "$cf_add_cflags" in
17799 (-D*)
17800 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17801
17802 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17803 && test -z "${cf_tst_cflags}" \
17804 && cf_fix_cppflags=yes
17805
17806 if test "$cf_fix_cppflags" = yes ; then
17807
17808 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17809 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17810
17811 continue
17812 elif test "${cf_tst_cflags}" = "\"'" ; then
17813
17814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17816
17817 continue
17818 fi
17819 ;;
17820 esac
17821 case "$CPPFLAGS" in
17822 (*$cf_add_cflags)
17823 ;;
17824 (*)
17825 case "$cf_add_cflags" in
17826 (-D*)
17827 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17828
17829 CPPFLAGS=`echo "$CPPFLAGS" | \
17830 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17831 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17832
17833 ;;
17834 esac
17835
17836 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17837 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17838
17839 ;;
17840 esac
17841 ;;
17842 (*)
17843
17844 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17845 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17846
17847 ;;
17848 esac
17849 ;;
17850 (yes)
17851
17852 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17853 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17854
17855 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17856
17857 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17858 && test -z "${cf_tst_cflags}" \
17859 && cf_fix_cppflags=no
17860 ;;
17861 esac
17862 done
17863
17864 if test -n "$cf_new_cflags" ; then
17865
17866 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17867 CFLAGS="${CFLAGS}$cf_new_cflags"
17868
17869 fi
17870
17871 if test -n "$cf_new_cppflags" ; then
17872
17873 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17874 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17875
17876 fi
17877
17878 if test -n "$cf_new_extra_cppflags" ; then
17879
17880 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17881 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17882
17883 fi
17884
17885 cf_add_libs="$LIBS"
17886 # reverse order
17887 cf_add_0lib=
17888 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17889 # filter duplicates
17890 for cf_add_1lib in $cf_add_0lib; do
17891 for cf_add_2lib in $cf_add_libs; do
17892 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17893 cf_add_1lib=
17894 break
17895 fi
17896 done
17897 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17898 done
17899 LIBS="$cf_add_libs"
17900
17901 cat >"conftest.$ac_ext" <<_ACEOF
17902 #line 17902 "configure"
17903 #include "confdefs.h"
17904 #include <${cf_cv_ncurses_header:-curses.h}>
17905 int
17906 main (void)
17907 {
17908 initscr(); mousemask(0,0); tigetstr((char *)0);
17909 ;
17910 return 0;
17911 }
17912 _ACEOF
17913 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17914 if { (eval echo "$as_me:17914: \"$ac_link\"") >&5
17915 (eval $ac_link) 2>&5
17916 ac_status=$?
17917 echo "$as_me:17917: \$? = $ac_status" >&5
17918 (exit "$ac_status"); } &&
17919 { ac_try='test -s "conftest$ac_exeext"'
17920 { (eval echo "$as_me:17920: \"$ac_try\"") >&5
17921 (eval $ac_try) 2>&5
17922 ac_status=$?
17923 echo "$as_me:17923: \$? = $ac_status" >&5
17924 (exit "$ac_status"); }; }; then
17925 if test "$cross_compiling" = yes; then
17926 cf_test_ncuconfig=maybe
17927 else
17928 cat >"conftest.$ac_ext" <<_ACEOF
17929 #line 17929 "configure"
17930 #include "confdefs.h"
17931 #include <${cf_cv_ncurses_header:-curses.h}>
17932 int main(void)
17933 { const char *xx = curses_version(); return (xx == 0); }
17934 _ACEOF
17935 rm -f "conftest$ac_exeext"
17936 if { (eval echo "$as_me:17936: \"$ac_link\"") >&5
17937 (eval $ac_link) 2>&5
17938 ac_status=$?
17939 echo "$as_me:17939: \$? = $ac_status" >&5
17940 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17941 { (eval echo "$as_me:17941: \"$ac_try\"") >&5
17942 (eval $ac_try) 2>&5
17943 ac_status=$?
17944 echo "$as_me:17944: \$? = $ac_status" >&5
17945 (exit "$ac_status"); }; }; then
17946 cf_test_ncuconfig=yes
17947 else
17948 echo "$as_me: program exited with status $ac_status" >&5
17949 echo "$as_me: failed program was:" >&5
17950 cat "conftest.$ac_ext" >&5
17951 cf_test_ncuconfig=no
17952 fi
17953 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17954 fi
17955 else
17956 echo "$as_me: failed program was:" >&5
17957 cat "conftest.$ac_ext" >&5
17958 cf_test_ncuconfig=no
17959 fi
17960 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17961
17962 CFLAGS="$cf_save_CFLAGS"
17963 CPPFLAGS="$cf_save_CPPFLAGS"
17964 LIBS="$cf_save_LIBS"
17965
17966 if test "x$cf_test_ncuconfig" != xyes; then
17967 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
17968 cf_pkg_cflags="$cf_temp"
17969 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
17970 cf_pkg_libs="$cf_temp"
17971 fi
17972 ;;
17973 esac
17974
17975 for cf_required in $cf_ncuconfig_root
17976 do
17977 # check for duplicates
17978 for cf_require_pkg in $REQUIRE_PKG
17979 do
17980 if test "$cf_required" = "$cf_require_pkg"
17981 then
17982 cf_required=
17983 break
17984 fi
17985 done
17986 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
17987 done
17988
17989 for cf_add_cflags in $cf_pkg_cflags
17990 do
17991 case "x$cf_add_cflags" in
17992 (x-[DU]*)
17993
17994 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17995 while true
17996 do
17997 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'`
17998 test "$CFLAGS" != "$cf_old_cflag" || break
17999
18000 CFLAGS="$cf_old_cflag"
18001 done
18002
18003 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18004 while true
18005 do
18006 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'`
18007 test "$CPPFLAGS" != "$cf_old_cflag" || break
18008
18009 CPPFLAGS="$cf_old_cflag"
18010 done
18011
18012 ;;
18013 esac
18014
18015 cf_fix_cppflags=no
18016 cf_new_cflags=
18017 cf_new_cppflags=
18018 cf_new_extra_cppflags=
18019
18020 for cf_add_cflags in $cf_add_cflags
18021 do
18022 case "$cf_fix_cppflags" in
18023 (no)
18024 case "$cf_add_cflags" in
18025 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18026 case "$cf_add_cflags" in
18027 (-D*)
18028 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18029
18030 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18031 && test -z "${cf_tst_cflags}" \
18032 && cf_fix_cppflags=yes
18033
18034 if test "$cf_fix_cppflags" = yes ; then
18035
18036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18038
18039 continue
18040 elif test "${cf_tst_cflags}" = "\"'" ; then
18041
18042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18044
18045 continue
18046 fi
18047 ;;
18048 esac
18049 case "$CPPFLAGS" in
18050 (*$cf_add_cflags)
18051 ;;
18052 (*)
18053 case "$cf_add_cflags" in
18054 (-D*)
18055 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18056
18057 CPPFLAGS=`echo "$CPPFLAGS" | \
18058 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18059 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18060
18061 ;;
18062 esac
18063
18064 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18065 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18066
18067 ;;
18068 esac
18069 ;;
18070 (*)
18071
18072 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18073 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18074
18075 ;;
18076 esac
18077 ;;
18078 (yes)
18079
18080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18082
18083 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18084
18085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18086 && test -z "${cf_tst_cflags}" \
18087 && cf_fix_cppflags=no
18088 ;;
18089 esac
18090 done
18091
18092 if test -n "$cf_new_cflags" ; then
18093
18094 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18095 CFLAGS="${CFLAGS}$cf_new_cflags"
18096
18097 fi
18098
18099 if test -n "$cf_new_cppflags" ; then
18100
18101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18102 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18103
18104 fi
18105
18106 if test -n "$cf_new_extra_cppflags" ; then
18107
18108 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18109 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18110
18111 fi
18112
18113 done
18114
18115 cf_add_libs="$LIBS"
18116 # reverse order
18117 cf_add_0lib=
18118 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18119 # filter duplicates
18120 for cf_add_1lib in $cf_add_0lib; do
18121 for cf_add_2lib in $cf_add_libs; do
18122 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18123 cf_add_1lib=
18124 break
18125 fi
18126 done
18127 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18128 done
18129 LIBS="$cf_add_libs"
18130
18131 cat >"conftest.$ac_ext" <<_ACEOF
18132 #line 18132 "configure"
18133 #include "confdefs.h"
18134 #include <${cf_cv_ncurses_header:-curses.h}>
18135 int
18136 main (void)
18137 {
18138 initscr(); mousemask(0,0); tigetstr((char *)0);
18139 ;
18140 return 0;
18141 }
18142 _ACEOF
18143 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18144 if { (eval echo "$as_me:18144: \"$ac_link\"") >&5
18145 (eval $ac_link) 2>&5
18146 ac_status=$?
18147 echo "$as_me:18147: \$? = $ac_status" >&5
18148 (exit "$ac_status"); } &&
18149 { ac_try='test -s "conftest$ac_exeext"'
18150 { (eval echo "$as_me:18150: \"$ac_try\"") >&5
18151 (eval $ac_try) 2>&5
18152 ac_status=$?
18153 echo "$as_me:18153: \$? = $ac_status" >&5
18154 (exit "$ac_status"); }; }; then
18155 if test "$cross_compiling" = yes; then
18156 cf_have_ncuconfig=maybe
18157 else
18158 cat >"conftest.$ac_ext" <<_ACEOF
18159 #line 18159 "configure"
18160 #include "confdefs.h"
18161 #include <${cf_cv_ncurses_header:-curses.h}>
18162 int main(void)
18163 { const char *xx = curses_version(); return (xx == 0); }
18164 _ACEOF
18165 rm -f "conftest$ac_exeext"
18166 if { (eval echo "$as_me:18166: \"$ac_link\"") >&5
18167 (eval $ac_link) 2>&5
18168 ac_status=$?
18169 echo "$as_me:18169: \$? = $ac_status" >&5
18170 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18171 { (eval echo "$as_me:18171: \"$ac_try\"") >&5
18172 (eval $ac_try) 2>&5
18173 ac_status=$?
18174 echo "$as_me:18174: \$? = $ac_status" >&5
18175 (exit "$ac_status"); }; }; then
18176 cf_have_ncuconfig=yes
18177 else
18178 echo "$as_me: program exited with status $ac_status" >&5
18179 echo "$as_me: failed program was:" >&5
18180 cat "conftest.$ac_ext" >&5
18181 cf_have_ncuconfig=no
18182 fi
18183 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18184 fi
18185 else
18186 echo "$as_me: failed program was:" >&5
18187 cat "conftest.$ac_ext" >&5
18188 cf_have_ncuconfig=no
18189 fi
18190 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18191 echo "$as_me:18191: result: $cf_have_ncuconfig" >&5
18192 echo "${ECHO_T}$cf_have_ncuconfig" >&6
18193 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
18194 if test "$cf_have_ncuconfig" != "yes"
18195 then
18196 CPPFLAGS="$cf_save_CPPFLAGS"
18197 LIBS="$cf_save_LIBS"
18198 NCURSES_CONFIG_PKG=none
18199 else
18200
18201 cat >>confdefs.h <<\EOF
18202 #define NCURSES 1
18203 EOF
18204
18205 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
18206
18207 echo "$as_me:18207: checking for terminfo header" >&5
18208 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
18209 if test "${cf_cv_term_header+set}" = set; then
18210 echo $ECHO_N "(cached) $ECHO_C" >&6
18211 else
18212
18213 case "${cf_cv_ncurses_header}" in
18214 (*/ncurses.h|*/ncursesw.h)
18215 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
18216 ;;
18217 (*)
18218 cf_term_header=term.h
18219 ;;
18220 esac
18221
18222 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
18223 do
18224 cat >"conftest.$ac_ext" <<_ACEOF
18225 #line 18225 "configure"
18226 #include "confdefs.h"
18227 #include <stdio.h>
18228 #include <${cf_cv_ncurses_header:-curses.h}>
18229 #include <$cf_test>
18230
18231 int
18232 main (void)
18233 {
18234 int x = auto_left_margin; (void)x
18235 ;
18236 return 0;
18237 }
18238 _ACEOF
18239 rm -f "conftest.$ac_objext"
18240 if { (eval echo "$as_me:18240: \"$ac_compile\"") >&5
18241 (eval $ac_compile) 2>&5
18242 ac_status=$?
18243 echo "$as_me:18243: \$? = $ac_status" >&5
18244 (exit "$ac_status"); } &&
18245 { ac_try='test -s "conftest.$ac_objext"'
18246 { (eval echo "$as_me:18246: \"$ac_try\"") >&5
18247 (eval $ac_try) 2>&5
18248 ac_status=$?
18249 echo "$as_me:18249: \$? = $ac_status" >&5
18250 (exit "$ac_status"); }; }; then
18251
18252 cf_cv_term_header="$cf_test"
18253 else
18254 echo "$as_me: failed program was:" >&5
18255 cat "conftest.$ac_ext" >&5
18256
18257 cf_cv_term_header=unknown
18258
18259 fi
18260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18261 test "$cf_cv_term_header" != unknown && break
18262 done
18263
18264 fi
18265 echo "$as_me:18265: result: $cf_cv_term_header" >&5
18266 echo "${ECHO_T}$cf_cv_term_header" >&6
18267
18268 # Set definitions to allow ifdef'ing to accommodate subdirectories
18269
18270 case "$cf_cv_term_header" in
18271 (*term.h)
18272
18273 cat >>confdefs.h <<\EOF
18274 #define HAVE_TERM_H 1
18275 EOF
18276
18277 ;;
18278 esac
18279
18280 case "$cf_cv_term_header" in
18281 (ncurses/term.h)
18282
18283 cat >>confdefs.h <<\EOF
18284 #define HAVE_NCURSES_TERM_H 1
18285 EOF
18286
18287 ;;
18288 (ncursesw/term.h)
18289
18290 cat >>confdefs.h <<\EOF
18291 #define HAVE_NCURSESW_TERM_H 1
18292 EOF
18293
18294 ;;
18295 esac
18296
18297 fi
18298
18299 else
18300 echo "$as_me:18300: result: no" >&5
18301 echo "${ECHO_T}no" >&6
18302 NCURSES_CONFIG_PKG=none
18303 fi
18304 else
18305 NCURSES_CONFIG_PKG=none
18306 fi
18307
18308 if test "x$cf_have_ncuconfig" = "xno"; then
18309 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
18310
18311 if test -n "$ac_tool_prefix"; then
18312 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
18313 do
18314 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18315 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18316 echo "$as_me:18316: checking for $ac_word" >&5
18317 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18318 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
18319 echo $ECHO_N "(cached) $ECHO_C" >&6
18320 else
18321 if test -n "$NCURSES_CONFIG"; then
18322 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
18323 else
18324 ac_save_IFS=$IFS; IFS=$ac_path_separator
18325 ac_dummy="$PATH"
18326 for ac_dir in $ac_dummy; do
18327 IFS=$ac_save_IFS
18328 test -z "$ac_dir" && ac_dir=.
18329 $as_executable_p "$ac_dir/$ac_word" || continue
18330 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
18331 echo "$as_me:18331: found $ac_dir/$ac_word" >&5
18332 break
18333 done
18334
18335 fi
18336 fi
18337 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
18338 if test -n "$NCURSES_CONFIG"; then
18339 echo "$as_me:18339: result: $NCURSES_CONFIG" >&5
18340 echo "${ECHO_T}$NCURSES_CONFIG" >&6
18341 else
18342 echo "$as_me:18342: result: no" >&5
18343 echo "${ECHO_T}no" >&6
18344 fi
18345
18346 test -n "$NCURSES_CONFIG" && break
18347 done
18348 fi
18349 if test -z "$NCURSES_CONFIG"; then
18350 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
18351 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
18352 do
18353 # Extract the first word of "$ac_prog", so it can be a program name with args.
18354 set dummy $ac_prog; ac_word=$2
18355 echo "$as_me:18355: checking for $ac_word" >&5
18356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18357 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
18358 echo $ECHO_N "(cached) $ECHO_C" >&6
18359 else
18360 if test -n "$ac_ct_NCURSES_CONFIG"; then
18361 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
18362 else
18363 ac_save_IFS=$IFS; IFS=$ac_path_separator
18364 ac_dummy="$PATH"
18365 for ac_dir in $ac_dummy; do
18366 IFS=$ac_save_IFS
18367 test -z "$ac_dir" && ac_dir=.
18368 $as_executable_p "$ac_dir/$ac_word" || continue
18369 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
18370 echo "$as_me:18370: found $ac_dir/$ac_word" >&5
18371 break
18372 done
18373
18374 fi
18375 fi
18376 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
18377 if test -n "$ac_ct_NCURSES_CONFIG"; then
18378 echo "$as_me:18378: result: $ac_ct_NCURSES_CONFIG" >&5
18379 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
18380 else
18381 echo "$as_me:18381: result: no" >&5
18382 echo "${ECHO_T}no" >&6
18383 fi
18384
18385 test -n "$ac_ct_NCURSES_CONFIG" && break
18386 done
18387 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
18388
18389 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
18390 fi
18391
18392 if test "$NCURSES_CONFIG" != none ; then
18393
18394 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
18395 do
18396 case "x$cf_add_cflags" in
18397 (x-[DU]*)
18398
18399 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18400 while true
18401 do
18402 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'`
18403 test "$CFLAGS" != "$cf_old_cflag" || break
18404
18405 CFLAGS="$cf_old_cflag"
18406 done
18407
18408 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18409 while true
18410 do
18411 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'`
18412 test "$CPPFLAGS" != "$cf_old_cflag" || break
18413
18414 CPPFLAGS="$cf_old_cflag"
18415 done
18416
18417 ;;
18418 esac
18419
18420 cf_fix_cppflags=no
18421 cf_new_cflags=
18422 cf_new_cppflags=
18423 cf_new_extra_cppflags=
18424
18425 for cf_add_cflags in $cf_add_cflags
18426 do
18427 case "$cf_fix_cppflags" in
18428 (no)
18429 case "$cf_add_cflags" in
18430 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18431 case "$cf_add_cflags" in
18432 (-D*)
18433 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18434
18435 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18436 && test -z "${cf_tst_cflags}" \
18437 && cf_fix_cppflags=yes
18438
18439 if test "$cf_fix_cppflags" = yes ; then
18440
18441 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18442 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18443
18444 continue
18445 elif test "${cf_tst_cflags}" = "\"'" ; then
18446
18447 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18448 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18449
18450 continue
18451 fi
18452 ;;
18453 esac
18454 case "$CPPFLAGS" in
18455 (*$cf_add_cflags)
18456 ;;
18457 (*)
18458 case "$cf_add_cflags" in
18459 (-D*)
18460 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18461
18462 CPPFLAGS=`echo "$CPPFLAGS" | \
18463 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18464 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18465
18466 ;;
18467 esac
18468
18469 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18470 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18471
18472 ;;
18473 esac
18474 ;;
18475 (*)
18476
18477 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18478 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18479
18480 ;;
18481 esac
18482 ;;
18483 (yes)
18484
18485 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18486 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18487
18488 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18489
18490 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18491 && test -z "${cf_tst_cflags}" \
18492 && cf_fix_cppflags=no
18493 ;;
18494 esac
18495 done
18496
18497 if test -n "$cf_new_cflags" ; then
18498
18499 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18500 CFLAGS="${CFLAGS}$cf_new_cflags"
18501
18502 fi
18503
18504 if test -n "$cf_new_cppflags" ; then
18505
18506 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18507 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18508
18509 fi
18510
18511 if test -n "$cf_new_extra_cppflags" ; then
18512
18513 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18514 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18515
18516 fi
18517
18518 done
18519
18520 cf_add_libs="$LIBS"
18521 # reverse order
18522 cf_add_0lib=
18523 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18524 # filter duplicates
18525 for cf_add_1lib in $cf_add_0lib; do
18526 for cf_add_2lib in $cf_add_libs; do
18527 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18528 cf_add_1lib=
18529 break
18530 fi
18531 done
18532 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18533 done
18534 LIBS="$cf_add_libs"
18535
18536 # even with config script, some packages use no-override for curses.h
18537
18538 echo "$as_me:18538: checking if we have identified curses headers" >&5
18539 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
18540 if test "${cf_cv_ncurses_header+set}" = set; then
18541 echo $ECHO_N "(cached) $ECHO_C" >&6
18542 else
18543
18544 cf_cv_ncurses_header=none
18545 for cf_header in \
18546 ncurses.h $cf_cv_screen/ncurses.h \
18547 curses.h $cf_cv_screen/curses.h
18548 do
18549 cat >"conftest.$ac_ext" <<_ACEOF
18550 #line 18550 "configure"
18551 #include "confdefs.h"
18552 #include <${cf_header}>
18553 int
18554 main (void)
18555 {
18556 initscr(); endwin()
18557 ;
18558 return 0;
18559 }
18560 _ACEOF
18561 rm -f "conftest.$ac_objext"
18562 if { (eval echo "$as_me:18562: \"$ac_compile\"") >&5
18563 (eval $ac_compile) 2>&5
18564 ac_status=$?
18565 echo "$as_me:18565: \$? = $ac_status" >&5
18566 (exit "$ac_status"); } &&
18567 { ac_try='test -s "conftest.$ac_objext"'
18568 { (eval echo "$as_me:18568: \"$ac_try\"") >&5
18569 (eval $ac_try) 2>&5
18570 ac_status=$?
18571 echo "$as_me:18571: \$? = $ac_status" >&5
18572 (exit "$ac_status"); }; }; then
18573 cf_cv_ncurses_header=$cf_header; break
18574 else
18575 echo "$as_me: failed program was:" >&5
18576 cat "conftest.$ac_ext" >&5
18577 fi
18578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18579 done
18580
18581 fi
18582 echo "$as_me:18582: result: $cf_cv_ncurses_header" >&5
18583 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
18584
18585 if test "$cf_cv_ncurses_header" = none ; then
18586 { { echo "$as_me:18586: error: No curses header-files found" >&5
18587 echo "$as_me: error: No curses header-files found" >&2;}
18588 { (exit 1); exit 1; }; }
18589 fi
18590
18591 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
18592
18593 for ac_header in $cf_cv_ncurses_header
18594 do
18595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18596 echo "$as_me:18596: checking for $ac_header" >&5
18597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18599 echo $ECHO_N "(cached) $ECHO_C" >&6
18600 else
18601 cat >"conftest.$ac_ext" <<_ACEOF
18602 #line 18602 "configure"
18603 #include "confdefs.h"
18604 #include <$ac_header>
18605 _ACEOF
18606 if { (eval echo "$as_me:18606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18608 ac_status=$?
18609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18610 rm -f conftest.er1
18611 cat conftest.err >&5
18612 echo "$as_me:18612: \$? = $ac_status" >&5
18613 (exit "$ac_status"); } >/dev/null; then
18614 if test -s conftest.err; then
18615 ac_cpp_err=$ac_c_preproc_warn_flag
18616 else
18617 ac_cpp_err=
18618 fi
18619 else
18620 ac_cpp_err=yes
18621 fi
18622 if test -z "$ac_cpp_err"; then
18623 eval "$as_ac_Header=yes"
18624 else
18625 echo "$as_me: failed program was:" >&5
18626 cat "conftest.$ac_ext" >&5
18627 eval "$as_ac_Header=no"
18628 fi
18629 rm -f conftest.err "conftest.$ac_ext"
18630 fi
18631 echo "$as_me:18631: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18632 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18633 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18634 cat >>confdefs.h <<EOF
18635 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18636 EOF
18637
18638 fi
18639 done
18640
18641 cat >>confdefs.h <<\EOF
18642 #define NCURSES 1
18643 EOF
18644
18645 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18646
18647 cat >>confdefs.h <<EOF
18648 #define $cf_nculib_ROOT 1
18649 EOF
18650
18651 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
18652
18653 else
18654
18655 cf_ncuhdr_root=$cf_cv_screen
18656
18657 test -n "$cf_cv_curses_dir" && \
18658 test "$cf_cv_curses_dir" != "no" && { \
18659
18660 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
18661 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
18662 do
18663 while test "$cf_add_incdir" != /usr/include
18664 do
18665 if test -d "$cf_add_incdir"
18666 then
18667 cf_have_incdir=no
18668 if test -n "$CFLAGS$CPPFLAGS" ; then
18669 # a loop is needed to ensure we can add subdirs of existing dirs
18670 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18671 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18672 cf_have_incdir=yes; break
18673 fi
18674 done
18675 fi
18676
18677 if test "$cf_have_incdir" = no ; then
18678 if test "$cf_add_incdir" = /usr/local/include ; then
18679 if test "$GCC" = yes
18680 then
18681 cf_save_CPPFLAGS=$CPPFLAGS
18682
18683 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18684 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18685
18686 cat >"conftest.$ac_ext" <<_ACEOF
18687 #line 18687 "configure"
18688 #include "confdefs.h"
18689 #include <stdio.h>
18690 int
18691 main (void)
18692 {
18693 printf("Hello")
18694 ;
18695 return 0;
18696 }
18697 _ACEOF
18698 rm -f "conftest.$ac_objext"
18699 if { (eval echo "$as_me:18699: \"$ac_compile\"") >&5
18700 (eval $ac_compile) 2>&5
18701 ac_status=$?
18702 echo "$as_me:18702: \$? = $ac_status" >&5
18703 (exit "$ac_status"); } &&
18704 { ac_try='test -s "conftest.$ac_objext"'
18705 { (eval echo "$as_me:18705: \"$ac_try\"") >&5
18706 (eval $ac_try) 2>&5
18707 ac_status=$?
18708 echo "$as_me:18708: \$? = $ac_status" >&5
18709 (exit "$ac_status"); }; }; then
18710 :
18711 else
18712 echo "$as_me: failed program was:" >&5
18713 cat "conftest.$ac_ext" >&5
18714 cf_have_incdir=yes
18715 fi
18716 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18717 CPPFLAGS=$cf_save_CPPFLAGS
18718 fi
18719 fi
18720 fi
18721
18722 if test "$cf_have_incdir" = no ; then
18723 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18724
18725 echo "${as_me:-configure}:18725: testing adding $cf_add_incdir to include-path ..." 1>&5
18726
18727 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18728
18729 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18730 test "$cf_top_incdir" = "$cf_add_incdir" && break
18731 cf_add_incdir="$cf_top_incdir"
18732 else
18733 break
18734 fi
18735 else
18736 break
18737 fi
18738 done
18739 done
18740 fi
18741
18742 }
18743
18744 echo "$as_me:18744: checking for $cf_ncuhdr_root header in include-path" >&5
18745 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
18746 if test "${cf_cv_ncurses_h+set}" = set; then
18747 echo $ECHO_N "(cached) $ECHO_C" >&6
18748 else
18749
18750 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
18751 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
18752 for cf_header in $cf_header_list
18753 do
18754
18755 cat >"conftest.$ac_ext" <<_ACEOF
18756 #line 18756 "configure"
18757 #include "confdefs.h"
18758
18759 #include <$cf_header>
18760 int
18761 main (void)
18762 {
18763
18764 #ifdef NCURSES_VERSION
18765
18766 printf("%s\\n", NCURSES_VERSION);
18767 #else
18768 #ifdef __NCURSES_H
18769 printf("old\\n");
18770 #else
18771 #error __NCURSES_H is not defined
18772 #endif
18773 #endif
18774
18775 ;
18776 return 0;
18777 }
18778 _ACEOF
18779 rm -f "conftest.$ac_objext"
18780 if { (eval echo "$as_me:18780: \"$ac_compile\"") >&5
18781 (eval $ac_compile) 2>&5
18782 ac_status=$?
18783 echo "$as_me:18783: \$? = $ac_status" >&5
18784 (exit "$ac_status"); } &&
18785 { ac_try='test -s "conftest.$ac_objext"'
18786 { (eval echo "$as_me:18786: \"$ac_try\"") >&5
18787 (eval $ac_try) 2>&5
18788 ac_status=$?
18789 echo "$as_me:18789: \$? = $ac_status" >&5
18790 (exit "$ac_status"); }; }; then
18791 cf_cv_ncurses_h=$cf_header
18792
18793 else
18794 echo "$as_me: failed program was:" >&5
18795 cat "conftest.$ac_ext" >&5
18796 cf_cv_ncurses_h=no
18797 fi
18798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18799
18800 test "$cf_cv_ncurses_h" != no && break
18801 done
18802
18803 fi
18804 echo "$as_me:18804: result: $cf_cv_ncurses_h" >&5
18805 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
18806
18807 if test "$cf_cv_ncurses_h" != no ; then
18808 cf_cv_ncurses_header=$cf_cv_ncurses_h
18809 else
18810
18811 echo "$as_me:18811: checking for $cf_ncuhdr_root include-path" >&5
18812 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
18813 if test "${cf_cv_ncurses_h2+set}" = set; then
18814 echo $ECHO_N "(cached) $ECHO_C" >&6
18815 else
18816
18817 test -n "$verbose" && echo
18818
18819 cf_search=
18820
18821 # collect the current set of include-directories from compiler flags
18822 cf_header_path_list=""
18823 if test -n "${CFLAGS}${CPPFLAGS}" ; then
18824 for cf_header_path in $CPPFLAGS $CFLAGS
18825 do
18826 case "$cf_header_path" in
18827 (-I*)
18828 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
18829
18830 test "x$cf_header_path" != "xNONE" && \
18831 test -d "$cf_header_path" && \
18832 {
18833 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
18834 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
18835 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
18836 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
18837 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
18838 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"
18839 }
18840
18841 cf_header_path_list="$cf_header_path_list $cf_search"
18842 ;;
18843 esac
18844 done
18845 fi
18846
18847 # add the variations for the package we are looking for
18848
18849 cf_search=
18850
18851 test "x$prefix" != "xNONE" && \
18852 test -d "$prefix" && \
18853 {
18854 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
18855 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
18856 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
18857 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
18858 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
18859 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
18860 }
18861
18862 for cf_subdir_prefix in \
18863 /usr \
18864 /usr/local \
18865 /usr/pkg \
18866 /opt \
18867 /opt/local \
18868 $HOME
18869 do
18870
18871 test "x$cf_subdir_prefix" != "x$prefix" && \
18872 test -d "$cf_subdir_prefix" && \
18873 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
18874 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
18875 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
18876 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
18877 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
18878 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
18879 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"
18880 }
18881
18882 done
18883
18884 test "$includedir" != NONE && \
18885 test "$includedir" != "/usr/include" && \
18886 test -d "$includedir" && {
18887 test -d "$includedir" && cf_search="$cf_search $includedir"
18888 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
18889 }
18890
18891 test "$oldincludedir" != NONE && \
18892 test "$oldincludedir" != "/usr/include" && \
18893 test -d "$oldincludedir" && {
18894 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
18895 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
18896 }
18897
18898 cf_search="$cf_search $cf_header_path_list"
18899
18900 test -n "$verbose" && echo "search path $cf_search"
18901 cf_save2_CPPFLAGS="$CPPFLAGS"
18902 for cf_incdir in $cf_search
18903 do
18904
18905 if test -n "$cf_incdir" ; then
18906 for cf_add_incdir in $cf_incdir
18907 do
18908 while test "$cf_add_incdir" != /usr/include
18909 do
18910 if test -d "$cf_add_incdir"
18911 then
18912 cf_have_incdir=no
18913 if test -n "$CFLAGS$CPPFLAGS" ; then
18914 # a loop is needed to ensure we can add subdirs of existing dirs
18915 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18916 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18917 cf_have_incdir=yes; break
18918 fi
18919 done
18920 fi
18921
18922 if test "$cf_have_incdir" = no ; then
18923 if test "$cf_add_incdir" = /usr/local/include ; then
18924 if test "$GCC" = yes
18925 then
18926 cf_save_CPPFLAGS=$CPPFLAGS
18927
18928 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18929 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18930
18931 cat >"conftest.$ac_ext" <<_ACEOF
18932 #line 18932 "configure"
18933 #include "confdefs.h"
18934 #include <stdio.h>
18935 int
18936 main (void)
18937 {
18938 printf("Hello")
18939 ;
18940 return 0;
18941 }
18942 _ACEOF
18943 rm -f "conftest.$ac_objext"
18944 if { (eval echo "$as_me:18944: \"$ac_compile\"") >&5
18945 (eval $ac_compile) 2>&5
18946 ac_status=$?
18947 echo "$as_me:18947: \$? = $ac_status" >&5
18948 (exit "$ac_status"); } &&
18949 { ac_try='test -s "conftest.$ac_objext"'
18950 { (eval echo "$as_me:18950: \"$ac_try\"") >&5
18951 (eval $ac_try) 2>&5
18952 ac_status=$?
18953 echo "$as_me:18953: \$? = $ac_status" >&5
18954 (exit "$ac_status"); }; }; then
18955 :
18956 else
18957 echo "$as_me: failed program was:" >&5
18958 cat "conftest.$ac_ext" >&5
18959 cf_have_incdir=yes
18960 fi
18961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18962 CPPFLAGS=$cf_save_CPPFLAGS
18963 fi
18964 fi
18965 fi
18966
18967 if test "$cf_have_incdir" = no ; then
18968 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18969
18970 echo "${as_me:-configure}:18970: testing adding $cf_add_incdir to include-path ..." 1>&5
18971
18972 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18973
18974 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18975 test "$cf_top_incdir" = "$cf_add_incdir" && break
18976 cf_add_incdir="$cf_top_incdir"
18977 else
18978 break
18979 fi
18980 else
18981 break
18982 fi
18983 done
18984 done
18985 fi
18986
18987 for cf_header in \
18988 ncurses.h \
18989 curses.h
18990 do
18991
18992 cat >"conftest.$ac_ext" <<_ACEOF
18993 #line 18993 "configure"
18994 #include "confdefs.h"
18995
18996 #include <$cf_header>
18997 int
18998 main (void)
18999 {
19000
19001 #ifdef NCURSES_VERSION
19002
19003 printf("%s\\n", NCURSES_VERSION);
19004 #else
19005 #ifdef __NCURSES_H
19006 printf("old\\n");
19007 #else
19008 #error __NCURSES_H is not defined
19009 #endif
19010 #endif
19011
19012 ;
19013 return 0;
19014 }
19015 _ACEOF
19016 rm -f "conftest.$ac_objext"
19017 if { (eval echo "$as_me:19017: \"$ac_compile\"") >&5
19018 (eval $ac_compile) 2>&5
19019 ac_status=$?
19020 echo "$as_me:19020: \$? = $ac_status" >&5
19021 (exit "$ac_status"); } &&
19022 { ac_try='test -s "conftest.$ac_objext"'
19023 { (eval echo "$as_me:19023: \"$ac_try\"") >&5
19024 (eval $ac_try) 2>&5
19025 ac_status=$?
19026 echo "$as_me:19026: \$? = $ac_status" >&5
19027 (exit "$ac_status"); }; }; then
19028 cf_cv_ncurses_h2=$cf_header
19029
19030 else
19031 echo "$as_me: failed program was:" >&5
19032 cat "conftest.$ac_ext" >&5
19033 cf_cv_ncurses_h2=no
19034 fi
19035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19036
19037 if test "$cf_cv_ncurses_h2" != no ; then
19038 cf_cv_ncurses_h2=$cf_incdir/$cf_header
19039 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
19040 break
19041 fi
19042 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
19043 done
19044 CPPFLAGS="$cf_save2_CPPFLAGS"
19045 test "$cf_cv_ncurses_h2" != no && break
19046 done
19047 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:19047: error: not found" >&5
19048 echo "$as_me: error: not found" >&2;}
19049 { (exit 1); exit 1; }; }
19050
19051 fi
19052 echo "$as_me:19052: result: $cf_cv_ncurses_h2" >&5
19053 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
19054
19055 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
19056 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
19057 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
19058 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
19059 fi
19060
19061 if test -n "$cf_1st_incdir" ; then
19062 for cf_add_incdir in $cf_1st_incdir
19063 do
19064 while test "$cf_add_incdir" != /usr/include
19065 do
19066 if test -d "$cf_add_incdir"
19067 then
19068 cf_have_incdir=no
19069 if test -n "$CFLAGS$CPPFLAGS" ; then
19070 # a loop is needed to ensure we can add subdirs of existing dirs
19071 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19072 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19073 cf_have_incdir=yes; break
19074 fi
19075 done
19076 fi
19077
19078 if test "$cf_have_incdir" = no ; then
19079 if test "$cf_add_incdir" = /usr/local/include ; then
19080 if test "$GCC" = yes
19081 then
19082 cf_save_CPPFLAGS=$CPPFLAGS
19083
19084 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19085 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
19086
19087 cat >"conftest.$ac_ext" <<_ACEOF
19088 #line 19088 "configure"
19089 #include "confdefs.h"
19090 #include <stdio.h>
19091 int
19092 main (void)
19093 {
19094 printf("Hello")
19095 ;
19096 return 0;
19097 }
19098 _ACEOF
19099 rm -f "conftest.$ac_objext"
19100 if { (eval echo "$as_me:19100: \"$ac_compile\"") >&5
19101 (eval $ac_compile) 2>&5
19102 ac_status=$?
19103 echo "$as_me:19103: \$? = $ac_status" >&5
19104 (exit "$ac_status"); } &&
19105 { ac_try='test -s "conftest.$ac_objext"'
19106 { (eval echo "$as_me:19106: \"$ac_try\"") >&5
19107 (eval $ac_try) 2>&5
19108 ac_status=$?
19109 echo "$as_me:19109: \$? = $ac_status" >&5
19110 (exit "$ac_status"); }; }; then
19111 :
19112 else
19113 echo "$as_me: failed program was:" >&5
19114 cat "conftest.$ac_ext" >&5
19115 cf_have_incdir=yes
19116 fi
19117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19118 CPPFLAGS=$cf_save_CPPFLAGS
19119 fi
19120 fi
19121 fi
19122
19123 if test "$cf_have_incdir" = no ; then
19124 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
19125
19126 echo "${as_me:-configure}:19126: testing adding $cf_add_incdir to include-path ..." 1>&5
19127
19128 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19129
19130 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
19131 test "$cf_top_incdir" = "$cf_add_incdir" && break
19132 cf_add_incdir="$cf_top_incdir"
19133 else
19134 break
19135 fi
19136 else
19137 break
19138 fi
19139 done
19140 done
19141 fi
19142
19143 fi
19144
19145 # Set definitions to allow ifdef'ing for ncurses.h
19146
19147 case "$cf_cv_ncurses_header" in
19148 (*ncurses.h)
19149
19150 cat >>confdefs.h <<\EOF
19151 #define HAVE_NCURSES_H 1
19152 EOF
19153
19154 ;;
19155 esac
19156
19157 case "$cf_cv_ncurses_header" in
19158 (ncurses/curses.h|ncurses/ncurses.h)
19159
19160 cat >>confdefs.h <<\EOF
19161 #define HAVE_NCURSES_NCURSES_H 1
19162 EOF
19163
19164 ;;
19165 (ncursesw/curses.h|ncursesw/ncurses.h)
19166
19167 cat >>confdefs.h <<\EOF
19168 #define HAVE_NCURSESW_NCURSES_H 1
19169 EOF
19170
19171 ;;
19172 esac
19173
19174 echo "$as_me:19174: checking for terminfo header" >&5
19175 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
19176 if test "${cf_cv_term_header+set}" = set; then
19177 echo $ECHO_N "(cached) $ECHO_C" >&6
19178 else
19179
19180 case "${cf_cv_ncurses_header}" in
19181 (*/ncurses.h|*/ncursesw.h)
19182 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
19183 ;;
19184 (*)
19185 cf_term_header=term.h
19186 ;;
19187 esac
19188
19189 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
19190 do
19191 cat >"conftest.$ac_ext" <<_ACEOF
19192 #line 19192 "configure"
19193 #include "confdefs.h"
19194 #include <stdio.h>
19195 #include <${cf_cv_ncurses_header:-curses.h}>
19196 #include <$cf_test>
19197
19198 int
19199 main (void)
19200 {
19201 int x = auto_left_margin; (void)x
19202 ;
19203 return 0;
19204 }
19205 _ACEOF
19206 rm -f "conftest.$ac_objext"
19207 if { (eval echo "$as_me:19207: \"$ac_compile\"") >&5
19208 (eval $ac_compile) 2>&5
19209 ac_status=$?
19210 echo "$as_me:19210: \$? = $ac_status" >&5
19211 (exit "$ac_status"); } &&
19212 { ac_try='test -s "conftest.$ac_objext"'
19213 { (eval echo "$as_me:19213: \"$ac_try\"") >&5
19214 (eval $ac_try) 2>&5
19215 ac_status=$?
19216 echo "$as_me:19216: \$? = $ac_status" >&5
19217 (exit "$ac_status"); }; }; then
19218
19219 cf_cv_term_header="$cf_test"
19220 else
19221 echo "$as_me: failed program was:" >&5
19222 cat "conftest.$ac_ext" >&5
19223
19224 cf_cv_term_header=unknown
19225
19226 fi
19227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19228 test "$cf_cv_term_header" != unknown && break
19229 done
19230
19231 fi
19232 echo "$as_me:19232: result: $cf_cv_term_header" >&5
19233 echo "${ECHO_T}$cf_cv_term_header" >&6
19234
19235 # Set definitions to allow ifdef'ing to accommodate subdirectories
19236
19237 case "$cf_cv_term_header" in
19238 (*term.h)
19239
19240 cat >>confdefs.h <<\EOF
19241 #define HAVE_TERM_H 1
19242 EOF
19243
19244 ;;
19245 esac
19246
19247 case "$cf_cv_term_header" in
19248 (ncurses/term.h)
19249
19250 cat >>confdefs.h <<\EOF
19251 #define HAVE_NCURSES_TERM_H 1
19252 EOF
19253
19254 ;;
19255 (ncursesw/term.h)
19256
19257 cat >>confdefs.h <<\EOF
19258 #define HAVE_NCURSESW_TERM_H 1
19259 EOF
19260
19261 ;;
19262 esac
19263
19264 # some applications need this, but should check for NCURSES_VERSION
19265
19266 cat >>confdefs.h <<\EOF
19267 #define NCURSES 1
19268 EOF
19269
19270 echo "$as_me:19270: checking for ncurses version" >&5
19271 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
19272 if test "${cf_cv_ncurses_version+set}" = set; then
19273 echo $ECHO_N "(cached) $ECHO_C" >&6
19274 else
19275
19276 cf_cv_ncurses_version=no
19277 cf_tempfile=out$$
19278 rm -f "$cf_tempfile"
19279 if test "$cross_compiling" = yes; then
19280
19281 # This will not work if the preprocessor splits the line after the
19282 # Autoconf token. The 'unproto' program does that.
19283 cat > "conftest.$ac_ext" <<EOF
19284 #include <${cf_cv_ncurses_header:-curses.h}>
19285 #undef Autoconf
19286 #ifdef NCURSES_VERSION
19287 Autoconf NCURSES_VERSION
19288 #else
19289 #ifdef __NCURSES_H
19290 Autoconf "old"
19291 #endif
19292 ;
19293 #endif
19294 EOF
19295 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
19296 { (eval echo "$as_me:19296: \"$cf_try\"") >&5
19297 (eval $cf_try) 2>&5
19298 ac_status=$?
19299 echo "$as_me:19299: \$? = $ac_status" >&5
19300 (exit "$ac_status"); }
19301 if test -f conftest.out ; then
19302 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
19303 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
19304 rm -f conftest.out
19305 fi
19306
19307 else
19308 cat >"conftest.$ac_ext" <<_ACEOF
19309 #line 19309 "configure"
19310 #include "confdefs.h"
19311
19312 $ac_includes_default
19313
19314 #include <${cf_cv_ncurses_header:-curses.h}>
19315
19316 int main(void)
19317 {
19318 FILE *fp = fopen("$cf_tempfile", "w");
19319 #ifdef NCURSES_VERSION
19320 # ifdef NCURSES_VERSION_PATCH
19321 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
19322 # else
19323 fprintf(fp, "%s\\n", NCURSES_VERSION);
19324 # endif
19325 #else
19326 # ifdef __NCURSES_H
19327 fprintf(fp, "old\\n");
19328 # else
19329 #error expected ncurses header to define __NCURSES_H
19330 # endif
19331 #endif
19332 ${cf_cv_main_return:-return}(0);
19333 }
19334 _ACEOF
19335 rm -f "conftest$ac_exeext"
19336 if { (eval echo "$as_me:19336: \"$ac_link\"") >&5
19337 (eval $ac_link) 2>&5
19338 ac_status=$?
19339 echo "$as_me:19339: \$? = $ac_status" >&5
19340 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19341 { (eval echo "$as_me:19341: \"$ac_try\"") >&5
19342 (eval $ac_try) 2>&5
19343 ac_status=$?
19344 echo "$as_me:19344: \$? = $ac_status" >&5
19345 (exit "$ac_status"); }; }; then
19346
19347 cf_cv_ncurses_version=`cat $cf_tempfile`
19348 else
19349 echo "$as_me: program exited with status $ac_status" >&5
19350 echo "$as_me: failed program was:" >&5
19351 cat "conftest.$ac_ext" >&5
19352 fi
19353 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19354 fi
19355 rm -f "$cf_tempfile"
19356
19357 fi
19358 echo "$as_me:19358: result: $cf_cv_ncurses_version" >&5
19359 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
19360 test "$cf_cv_ncurses_version" = no ||
19361 cat >>confdefs.h <<\EOF
19362 #define NCURSES 1
19363 EOF
19364
19365 cf_nculib_root=$cf_cv_screen
19366 # This works, except for the special case where we find gpm, but
19367 # ncurses is in a nonstandard location via $LIBS, and we really want
19368 # to link gpm.
19369 cf_ncurses_LIBS=""
19370 cf_ncurses_SAVE="$LIBS"
19371 echo "$as_me:19371: checking for Gpm_Open in -lgpm" >&5
19372 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
19373 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
19374 echo $ECHO_N "(cached) $ECHO_C" >&6
19375 else
19376 ac_check_lib_save_LIBS=$LIBS
19377 LIBS="-lgpm $LIBS"
19378 cat >"conftest.$ac_ext" <<_ACEOF
19379 #line 19379 "configure"
19380 #include "confdefs.h"
19381
19382 /* Override any gcc2 internal prototype to avoid an error. */
19383 #ifdef __cplusplus
19384 extern "C"
19385 #endif
19386 /* We use char because int might match the return type of a gcc2
19387 builtin and then its argument prototype would still apply. */
19388 char Gpm_Open (void);
19389 int
19390 main (void)
19391 {
19392 Gpm_Open ();
19393 ;
19394 return 0;
19395 }
19396 _ACEOF
19397 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19398 if { (eval echo "$as_me:19398: \"$ac_link\"") >&5
19399 (eval $ac_link) 2>&5
19400 ac_status=$?
19401 echo "$as_me:19401: \$? = $ac_status" >&5
19402 (exit "$ac_status"); } &&
19403 { ac_try='test -s "conftest$ac_exeext"'
19404 { (eval echo "$as_me:19404: \"$ac_try\"") >&5
19405 (eval $ac_try) 2>&5
19406 ac_status=$?
19407 echo "$as_me:19407: \$? = $ac_status" >&5
19408 (exit "$ac_status"); }; }; then
19409 ac_cv_lib_gpm_Gpm_Open=yes
19410 else
19411 echo "$as_me: failed program was:" >&5
19412 cat "conftest.$ac_ext" >&5
19413 ac_cv_lib_gpm_Gpm_Open=no
19414 fi
19415 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19416 LIBS=$ac_check_lib_save_LIBS
19417 fi
19418 echo "$as_me:19418: result: $ac_cv_lib_gpm_Gpm_Open" >&5
19419 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
19420 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
19421 echo "$as_me:19421: checking for initscr in -lgpm" >&5
19422 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
19423 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
19424 echo $ECHO_N "(cached) $ECHO_C" >&6
19425 else
19426 ac_check_lib_save_LIBS=$LIBS
19427 LIBS="-lgpm $LIBS"
19428 cat >"conftest.$ac_ext" <<_ACEOF
19429 #line 19429 "configure"
19430 #include "confdefs.h"
19431
19432 /* Override any gcc2 internal prototype to avoid an error. */
19433 #ifdef __cplusplus
19434 extern "C"
19435 #endif
19436 /* We use char because int might match the return type of a gcc2
19437 builtin and then its argument prototype would still apply. */
19438 char initscr (void);
19439 int
19440 main (void)
19441 {
19442 initscr ();
19443 ;
19444 return 0;
19445 }
19446 _ACEOF
19447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19448 if { (eval echo "$as_me:19448: \"$ac_link\"") >&5
19449 (eval $ac_link) 2>&5
19450 ac_status=$?
19451 echo "$as_me:19451: \$? = $ac_status" >&5
19452 (exit "$ac_status"); } &&
19453 { ac_try='test -s "conftest$ac_exeext"'
19454 { (eval echo "$as_me:19454: \"$ac_try\"") >&5
19455 (eval $ac_try) 2>&5
19456 ac_status=$?
19457 echo "$as_me:19457: \$? = $ac_status" >&5
19458 (exit "$ac_status"); }; }; then
19459 ac_cv_lib_gpm_initscr=yes
19460 else
19461 echo "$as_me: failed program was:" >&5
19462 cat "conftest.$ac_ext" >&5
19463 ac_cv_lib_gpm_initscr=no
19464 fi
19465 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19466 LIBS=$ac_check_lib_save_LIBS
19467 fi
19468 echo "$as_me:19468: result: $ac_cv_lib_gpm_initscr" >&5
19469 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
19470 if test "$ac_cv_lib_gpm_initscr" = yes; then
19471 LIBS="$cf_ncurses_SAVE"
19472 else
19473 cf_ncurses_LIBS="-lgpm"
19474 fi
19475
19476 fi
19477
19478 case "$host_os" in
19479 (freebsd*)
19480 # This is only necessary if you are linking against an obsolete
19481 # version of ncurses (but it should do no harm, since it is static).
19482 if test "$cf_nculib_root" = ncurses ; then
19483 echo "$as_me:19483: checking for tgoto in -lmytinfo" >&5
19484 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
19485 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
19486 echo $ECHO_N "(cached) $ECHO_C" >&6
19487 else
19488 ac_check_lib_save_LIBS=$LIBS
19489 LIBS="-lmytinfo $LIBS"
19490 cat >"conftest.$ac_ext" <<_ACEOF
19491 #line 19491 "configure"
19492 #include "confdefs.h"
19493
19494 /* Override any gcc2 internal prototype to avoid an error. */
19495 #ifdef __cplusplus
19496 extern "C"
19497 #endif
19498 /* We use char because int might match the return type of a gcc2
19499 builtin and then its argument prototype would still apply. */
19500 char tgoto (void);
19501 int
19502 main (void)
19503 {
19504 tgoto ();
19505 ;
19506 return 0;
19507 }
19508 _ACEOF
19509 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19510 if { (eval echo "$as_me:19510: \"$ac_link\"") >&5
19511 (eval $ac_link) 2>&5
19512 ac_status=$?
19513 echo "$as_me:19513: \$? = $ac_status" >&5
19514 (exit "$ac_status"); } &&
19515 { ac_try='test -s "conftest$ac_exeext"'
19516 { (eval echo "$as_me:19516: \"$ac_try\"") >&5
19517 (eval $ac_try) 2>&5
19518 ac_status=$?
19519 echo "$as_me:19519: \$? = $ac_status" >&5
19520 (exit "$ac_status"); }; }; then
19521 ac_cv_lib_mytinfo_tgoto=yes
19522 else
19523 echo "$as_me: failed program was:" >&5
19524 cat "conftest.$ac_ext" >&5
19525 ac_cv_lib_mytinfo_tgoto=no
19526 fi
19527 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19528 LIBS=$ac_check_lib_save_LIBS
19529 fi
19530 echo "$as_me:19530: result: $ac_cv_lib_mytinfo_tgoto" >&5
19531 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
19532 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
19533 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
19534 fi
19535
19536 fi
19537 ;;
19538 esac
19539
19540 cf_add_libs="$LIBS"
19541 # reverse order
19542 cf_add_0lib=
19543 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19544 # filter duplicates
19545 for cf_add_1lib in $cf_add_0lib; do
19546 for cf_add_2lib in $cf_add_libs; do
19547 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19548 cf_add_1lib=
19549 break
19550 fi
19551 done
19552 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19553 done
19554 LIBS="$cf_add_libs"
19555
19556 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
19557 then
19558
19559 cf_add_libs="$LIBS"
19560 # reverse order
19561 cf_add_0lib=
19562 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19563 # filter duplicates
19564 for cf_add_1lib in $cf_add_0lib; do
19565 for cf_add_2lib in $cf_add_libs; do
19566 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19567 cf_add_1lib=
19568 break
19569 fi
19570 done
19571 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19572 done
19573 LIBS="$cf_add_libs"
19574
19575 else
19576
19577 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
19578 cf_libdir=""
19579 echo "$as_me:19579: checking for initscr" >&5
19580 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
19581 if test "${ac_cv_func_initscr+set}" = set; then
19582 echo $ECHO_N "(cached) $ECHO_C" >&6
19583 else
19584 cat >"conftest.$ac_ext" <<_ACEOF
19585 #line 19585 "configure"
19586 #include "confdefs.h"
19587 #define initscr autoconf_temporary
19588 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19589 #undef initscr
19590
19591 #ifdef __cplusplus
19592 extern "C"
19593 #endif
19594
19595 /* We use char because int might match the return type of a gcc2
19596 builtin and then its argument prototype would still apply. */
19597 char initscr (void);
19598
19599 int
19600 main (void)
19601 {
19602
19603 /* The GNU C library defines stubs for functions which it implements
19604 to always fail with ENOSYS. Some functions are actually named
19605 something starting with __ and the normal name is an alias. */
19606 #if defined (__stub_initscr) || defined (__stub___initscr)
19607 #error found stub for initscr
19608 #endif
19609
19610 return initscr ();
19611 ;
19612 return 0;
19613 }
19614 _ACEOF
19615 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19616 if { (eval echo "$as_me:19616: \"$ac_link\"") >&5
19617 (eval $ac_link) 2>&5
19618 ac_status=$?
19619 echo "$as_me:19619: \$? = $ac_status" >&5
19620 (exit "$ac_status"); } &&
19621 { ac_try='test -s "conftest$ac_exeext"'
19622 { (eval echo "$as_me:19622: \"$ac_try\"") >&5
19623 (eval $ac_try) 2>&5
19624 ac_status=$?
19625 echo "$as_me:19625: \$? = $ac_status" >&5
19626 (exit "$ac_status"); }; }; then
19627 ac_cv_func_initscr=yes
19628 else
19629 echo "$as_me: failed program was:" >&5
19630 cat "conftest.$ac_ext" >&5
19631 ac_cv_func_initscr=no
19632 fi
19633 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19634 fi
19635 echo "$as_me:19635: result: $ac_cv_func_initscr" >&5
19636 echo "${ECHO_T}$ac_cv_func_initscr" >&6
19637 if test "$ac_cv_func_initscr" = yes; then
19638 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19639 else
19640
19641 cf_save_LIBS="$LIBS"
19642 echo "$as_me:19642: checking for initscr in -l$cf_nculib_root" >&5
19643 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
19644 LIBS="-l$cf_nculib_root $LIBS"
19645 cat >"conftest.$ac_ext" <<_ACEOF
19646 #line 19646 "configure"
19647 #include "confdefs.h"
19648 #include <${cf_cv_ncurses_header:-curses.h}>
19649 int
19650 main (void)
19651 {
19652 initscr()
19653 ;
19654 return 0;
19655 }
19656 _ACEOF
19657 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19658 if { (eval echo "$as_me:19658: \"$ac_link\"") >&5
19659 (eval $ac_link) 2>&5
19660 ac_status=$?
19661 echo "$as_me:19661: \$? = $ac_status" >&5
19662 (exit "$ac_status"); } &&
19663 { ac_try='test -s "conftest$ac_exeext"'
19664 { (eval echo "$as_me:19664: \"$ac_try\"") >&5
19665 (eval $ac_try) 2>&5
19666 ac_status=$?
19667 echo "$as_me:19667: \$? = $ac_status" >&5
19668 (exit "$ac_status"); }; }; then
19669 echo "$as_me:19669: result: yes" >&5
19670 echo "${ECHO_T}yes" >&6
19671 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19672
19673 else
19674 echo "$as_me: failed program was:" >&5
19675 cat "conftest.$ac_ext" >&5
19676 echo "$as_me:19676: result: no" >&5
19677 echo "${ECHO_T}no" >&6
19678
19679 cf_search=
19680 cf_library_path_list=""
19681 if test -n "${LDFLAGS}${LIBS}" ; then
19682 for cf_library_path in $LDFLAGS $LIBS
19683 do
19684 case "$cf_library_path" in
19685 (-L*)
19686 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
19687
19688 test "x$cf_library_path" != "xNONE" && \
19689 test -d "$cf_library_path" && \
19690 {
19691 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
19692 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
19693 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
19694 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
19695 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
19696 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"
19697 }
19698
19699 cf_library_path_list="$cf_library_path_list $cf_search"
19700 ;;
19701 esac
19702 done
19703 fi
19704
19705 cf_search=
19706
19707 test "x$prefix" != "xNONE" && \
19708 test -d "$prefix" && \
19709 {
19710 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
19711 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
19712 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
19713 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
19714 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
19715 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
19716 }
19717
19718 for cf_subdir_prefix in \
19719 /usr \
19720 /usr/local \
19721 /usr/pkg \
19722 /opt \
19723 /opt/local \
19724 $HOME
19725 do
19726
19727 test "x$cf_subdir_prefix" != "x$prefix" && \
19728 test -d "$cf_subdir_prefix" && \
19729 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
19730 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
19731 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
19732 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
19733 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
19734 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
19735 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"
19736 }
19737
19738 done
19739
19740 cf_search="$cf_library_path_list $cf_search"
19741
19742 for cf_libdir in $cf_search
19743 do
19744 echo "$as_me:19744: checking for -l$cf_nculib_root in $cf_libdir" >&5
19745 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
19746 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
19747 cat >"conftest.$ac_ext" <<_ACEOF
19748 #line 19748 "configure"
19749 #include "confdefs.h"
19750 #include <${cf_cv_ncurses_header:-curses.h}>
19751 int
19752 main (void)
19753 {
19754 initscr()
19755 ;
19756 return 0;
19757 }
19758 _ACEOF
19759 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19760 if { (eval echo "$as_me:19760: \"$ac_link\"") >&5
19761 (eval $ac_link) 2>&5
19762 ac_status=$?
19763 echo "$as_me:19763: \$? = $ac_status" >&5
19764 (exit "$ac_status"); } &&
19765 { ac_try='test -s "conftest$ac_exeext"'
19766 { (eval echo "$as_me:19766: \"$ac_try\"") >&5
19767 (eval $ac_try) 2>&5
19768 ac_status=$?
19769 echo "$as_me:19769: \$? = $ac_status" >&5
19770 (exit "$ac_status"); }; }; then
19771 echo "$as_me:19771: result: yes" >&5
19772 echo "${ECHO_T}yes" >&6
19773 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
19774 break
19775 else
19776 echo "$as_me: failed program was:" >&5
19777 cat "conftest.$ac_ext" >&5
19778 echo "$as_me:19778: result: no" >&5
19779 echo "${ECHO_T}no" >&6
19780 LIBS="$cf_save_LIBS"
19781 fi
19782 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19783 done
19784
19785 fi
19786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19787
19788 fi
19789
19790 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
19791
19792 if test "$cf_found_library" = no ; then
19793 { { echo "$as_me:19793: error: Cannot link $cf_nculib_root library" >&5
19794 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
19795 { (exit 1); exit 1; }; }
19796 fi
19797
19798 fi
19799
19800 if test -n "$cf_ncurses_LIBS" ; then
19801 echo "$as_me:19801: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
19802 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
19803 cf_ncurses_SAVE="$LIBS"
19804 for p in $cf_ncurses_LIBS ; do
19805 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
19806 if test "$q" != "$LIBS" ; then
19807 LIBS="$q"
19808 fi
19809 done
19810 cat >"conftest.$ac_ext" <<_ACEOF
19811 #line 19811 "configure"
19812 #include "confdefs.h"
19813 #include <${cf_cv_ncurses_header:-curses.h}>
19814 int
19815 main (void)
19816 {
19817 initscr(); mousemask(0,0); tigetstr((char *)0);
19818 ;
19819 return 0;
19820 }
19821 _ACEOF
19822 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19823 if { (eval echo "$as_me:19823: \"$ac_link\"") >&5
19824 (eval $ac_link) 2>&5
19825 ac_status=$?
19826 echo "$as_me:19826: \$? = $ac_status" >&5
19827 (exit "$ac_status"); } &&
19828 { ac_try='test -s "conftest$ac_exeext"'
19829 { (eval echo "$as_me:19829: \"$ac_try\"") >&5
19830 (eval $ac_try) 2>&5
19831 ac_status=$?
19832 echo "$as_me:19832: \$? = $ac_status" >&5
19833 (exit "$ac_status"); }; }; then
19834 echo "$as_me:19834: result: yes" >&5
19835 echo "${ECHO_T}yes" >&6
19836 else
19837 echo "$as_me: failed program was:" >&5
19838 cat "conftest.$ac_ext" >&5
19839 echo "$as_me:19839: result: no" >&5
19840 echo "${ECHO_T}no" >&6
19841 LIBS="$cf_ncurses_SAVE"
19842 fi
19843 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19844 fi
19845
19846 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19847
19848 cat >>confdefs.h <<EOF
19849 #define $cf_nculib_ROOT 1
19850 EOF
19851
19852 fi
19853 else
19854 NCURSES_CONFIG=none
19855 fi
19856
19857 ;;
19858 (pdcurses*)
19859
19860 cf_x_athena=${cf_x_athena:-Xaw}
19861
19862 echo "$as_me:19862: checking if you want to link with Xaw 3d library" >&5
19863 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
19864 withval=
19865
19866 # Check whether --with-Xaw3d or --without-Xaw3d was given.
19867 if test "${with_Xaw3d+set}" = set; then
19868 withval="$with_Xaw3d"
19869
19870 fi;
19871 if test "$withval" = yes ; then
19872 cf_x_athena=Xaw3d
19873 echo "$as_me:19873: result: yes" >&5
19874 echo "${ECHO_T}yes" >&6
19875 else
19876 echo "$as_me:19876: result: no" >&5
19877 echo "${ECHO_T}no" >&6
19878 fi
19879
19880 echo "$as_me:19880: checking if you want to link with Xaw 3d xft library" >&5
19881 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
19882 withval=
19883
19884 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
19885 if test "${with_Xaw3dxft+set}" = set; then
19886 withval="$with_Xaw3dxft"
19887
19888 fi;
19889 if test "$withval" = yes ; then
19890 cf_x_athena=Xaw3dxft
19891 echo "$as_me:19891: result: yes" >&5
19892 echo "${ECHO_T}yes" >&6
19893 else
19894 echo "$as_me:19894: result: no" >&5
19895 echo "${ECHO_T}no" >&6
19896 fi
19897
19898 echo "$as_me:19898: checking if you want to link with neXT Athena library" >&5
19899 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
19900 withval=
19901
19902 # Check whether --with-neXtaw or --without-neXtaw was given.
19903 if test "${with_neXtaw+set}" = set; then
19904 withval="$with_neXtaw"
19905
19906 fi;
19907 if test "$withval" = yes ; then
19908 cf_x_athena=neXtaw
19909 echo "$as_me:19909: result: yes" >&5
19910 echo "${ECHO_T}yes" >&6
19911 else
19912 echo "$as_me:19912: result: no" >&5
19913 echo "${ECHO_T}no" >&6
19914 fi
19915
19916 echo "$as_me:19916: checking if you want to link with Athena-Plus library" >&5
19917 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
19918 withval=
19919
19920 # Check whether --with-XawPlus or --without-XawPlus was given.
19921 if test "${with_XawPlus+set}" = set; then
19922 withval="$with_XawPlus"
19923
19924 fi;
19925 if test "$withval" = yes ; then
19926 cf_x_athena=XawPlus
19927 echo "$as_me:19927: result: yes" >&5
19928 echo "${ECHO_T}yes" >&6
19929 else
19930 echo "$as_me:19930: result: no" >&5
19931 echo "${ECHO_T}no" >&6
19932 fi
19933
19934 cf_x_athena_lib=""
19935
19936 if test "$PKG_CONFIG" != none ; then
19937 cf_athena_list=
19938 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
19939 for cf_athena_pkg in \
19940 $cf_athena_list \
19941 ${cf_x_athena} \
19942 ${cf_x_athena}-devel \
19943 lib${cf_x_athena} \
19944 lib${cf_x_athena}-devel
19945 do
19946
19947 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
19948 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
19949
19950 echo "${as_me:-configure}:19950: testing found package $cf_athena_pkg ..." 1>&5
19951
19952 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
19953 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
19954 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
19955
19956 echo "${as_me:-configure}:19956: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19957
19958 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
19959
19960 echo "${as_me:-configure}:19960: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
19961
19962 for cf_required in $cf_athena_pkg
19963 do
19964 # check for duplicates
19965 for cf_require_pkg in $REQUIRE_PKG
19966 do
19967 if test "$cf_required" = "$cf_require_pkg"
19968 then
19969 cf_required=
19970 break
19971 fi
19972 done
19973 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
19974 done
19975
19976 cf_fix_cppflags=no
19977 cf_new_cflags=
19978 cf_new_cppflags=
19979 cf_new_extra_cppflags=
19980
19981 for cf_add_cflags in $cf_pkgconfig_incs
19982 do
19983 case "$cf_fix_cppflags" in
19984 (no)
19985 case "$cf_add_cflags" in
19986 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19987 case "$cf_add_cflags" in
19988 (-D*)
19989 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19990
19991 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19992 && test -z "${cf_tst_cflags}" \
19993 && cf_fix_cppflags=yes
19994
19995 if test "$cf_fix_cppflags" = yes ; then
19996
19997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19999
20000 continue
20001 elif test "${cf_tst_cflags}" = "\"'" ; then
20002
20003 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20004 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20005
20006 continue
20007 fi
20008 ;;
20009 esac
20010 case "$CPPFLAGS" in
20011 (*$cf_add_cflags)
20012 ;;
20013 (*)
20014 case "$cf_add_cflags" in
20015 (-D*)
20016 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20017
20018 CPPFLAGS=`echo "$CPPFLAGS" | \
20019 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20020 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20021
20022 ;;
20023 esac
20024
20025 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20026 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20027
20028 ;;
20029 esac
20030 ;;
20031 (*)
20032
20033 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20034 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20035
20036 ;;
20037 esac
20038 ;;
20039 (yes)
20040
20041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20043
20044 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20045
20046 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20047 && test -z "${cf_tst_cflags}" \
20048 && cf_fix_cppflags=no
20049 ;;
20050 esac
20051 done
20052
20053 if test -n "$cf_new_cflags" ; then
20054
20055 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20056 CFLAGS="${CFLAGS}$cf_new_cflags"
20057
20058 fi
20059
20060 if test -n "$cf_new_cppflags" ; then
20061
20062 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20063 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20064
20065 fi
20066
20067 if test -n "$cf_new_extra_cppflags" ; then
20068
20069 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20070 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20071
20072 fi
20073
20074 cf_add_libs="$LIBS"
20075 # reverse order
20076 cf_add_0lib=
20077 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20078 # filter duplicates
20079 for cf_add_1lib in $cf_add_0lib; do
20080 for cf_add_2lib in $cf_add_libs; do
20081 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20082 cf_add_1lib=
20083 break
20084 fi
20085 done
20086 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20087 done
20088 LIBS="$cf_add_libs"
20089
20090 cf_x_athena_lib="$cf_pkgconfig_libs"
20091
20092 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20093
20094 cat >>confdefs.h <<EOF
20095 #define $cf_x_athena_LIBS 1
20096 EOF
20097
20098 echo "$as_me:20098: checking for usable $cf_x_athena/Xmu package" >&5
20099 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
20100 if test "${cf_cv_xaw_compat+set}" = set; then
20101 echo $ECHO_N "(cached) $ECHO_C" >&6
20102 else
20103
20104 cat >"conftest.$ac_ext" <<_ACEOF
20105 #line 20105 "configure"
20106 #include "confdefs.h"
20107
20108 $ac_includes_default
20109 #include <X11/Xmu/CharSet.h>
20110
20111 int
20112 main (void)
20113 {
20114
20115 int check = XmuCompareISOLatin1("big", "small");
20116 (void)check;
20117
20118 ;
20119 return 0;
20120 }
20121 _ACEOF
20122 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20123 if { (eval echo "$as_me:20123: \"$ac_link\"") >&5
20124 (eval $ac_link) 2>&5
20125 ac_status=$?
20126 echo "$as_me:20126: \$? = $ac_status" >&5
20127 (exit "$ac_status"); } &&
20128 { ac_try='test -s "conftest$ac_exeext"'
20129 { (eval echo "$as_me:20129: \"$ac_try\"") >&5
20130 (eval $ac_try) 2>&5
20131 ac_status=$?
20132 echo "$as_me:20132: \$? = $ac_status" >&5
20133 (exit "$ac_status"); }; }; then
20134 cf_cv_xaw_compat=yes
20135 else
20136 echo "$as_me: failed program was:" >&5
20137 cat "conftest.$ac_ext" >&5
20138 cf_cv_xaw_compat=no
20139 fi
20140 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20141 fi
20142 echo "$as_me:20142: result: $cf_cv_xaw_compat" >&5
20143 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
20144
20145 if test "$cf_cv_xaw_compat" = no
20146 then
20147 # workaround for broken ".pc" files...
20148 case "$cf_x_athena_lib" in
20149 (*-lXmu*)
20150 ;;
20151 (*)
20152 test -n "$verbose" && echo " work around broken package" 1>&6
20153
20154 echo "${as_me:-configure}:20154: testing work around broken package ..." 1>&5
20155
20156 cf_save_xmu="$LIBS"
20157 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
20158
20159 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
20160 test -n "$verbose" && echo " found package xmu" 1>&6
20161
20162 echo "${as_me:-configure}:20162: testing found package xmu ..." 1>&5
20163
20164 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
20165 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
20166 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
20167
20168 echo "${as_me:-configure}:20168: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20169
20170 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
20171
20172 echo "${as_me:-configure}:20172: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
20173
20174 for cf_required in xmu
20175 do
20176 # check for duplicates
20177 for cf_require_pkg in $REQUIRE_PKG
20178 do
20179 if test "$cf_required" = "$cf_require_pkg"
20180 then
20181 cf_required=
20182 break
20183 fi
20184 done
20185 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
20186 done
20187
20188 cf_fix_cppflags=no
20189 cf_new_cflags=
20190 cf_new_cppflags=
20191 cf_new_extra_cppflags=
20192
20193 for cf_add_cflags in $cf_pkgconfig_incs
20194 do
20195 case "$cf_fix_cppflags" in
20196 (no)
20197 case "$cf_add_cflags" in
20198 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20199 case "$cf_add_cflags" in
20200 (-D*)
20201 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20202
20203 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20204 && test -z "${cf_tst_cflags}" \
20205 && cf_fix_cppflags=yes
20206
20207 if test "$cf_fix_cppflags" = yes ; then
20208
20209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20211
20212 continue
20213 elif test "${cf_tst_cflags}" = "\"'" ; then
20214
20215 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20216 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20217
20218 continue
20219 fi
20220 ;;
20221 esac
20222 case "$CPPFLAGS" in
20223 (*$cf_add_cflags)
20224 ;;
20225 (*)
20226 case "$cf_add_cflags" in
20227 (-D*)
20228 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20229
20230 CPPFLAGS=`echo "$CPPFLAGS" | \
20231 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20232 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20233
20234 ;;
20235 esac
20236
20237 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20238 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20239
20240 ;;
20241 esac
20242 ;;
20243 (*)
20244
20245 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20246 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20247
20248 ;;
20249 esac
20250 ;;
20251 (yes)
20252
20253 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20254 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20255
20256 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20257
20258 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20259 && test -z "${cf_tst_cflags}" \
20260 && cf_fix_cppflags=no
20261 ;;
20262 esac
20263 done
20264
20265 if test -n "$cf_new_cflags" ; then
20266
20267 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20268 CFLAGS="${CFLAGS}$cf_new_cflags"
20269
20270 fi
20271
20272 if test -n "$cf_new_cppflags" ; then
20273
20274 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20275 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20276
20277 fi
20278
20279 if test -n "$cf_new_extra_cppflags" ; then
20280
20281 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20282 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20283
20284 fi
20285
20286 cf_add_libs="$LIBS"
20287 # reverse order
20288 cf_add_0lib=
20289 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20290 # filter duplicates
20291 for cf_add_1lib in $cf_add_0lib; do
20292 for cf_add_2lib in $cf_add_libs; do
20293 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20294 cf_add_1lib=
20295 break
20296 fi
20297 done
20298 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20299 done
20300 LIBS="$cf_add_libs"
20301
20302 LIBS="$cf_save_xmu"
20303
20304 cf_add_libs="$LIBS"
20305 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
20306
20307 echo "${as_me:-configure}:20307: testing ...before $cf_add_libs ..." 1>&5
20308
20309 for cf_add_1lib in $cf_pkgconfig_libs; do
20310 # filter duplicates
20311 cf_found_2lib=no
20312 for cf_add_2lib in $cf_add_libs; do
20313 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20314 cf_found_2lib=yes
20315 break
20316 fi
20317 done
20318 # if not a duplicate, find the dependent library
20319 if test "$cf_found_2lib" = no
20320 then
20321 cf_found_2lib=no
20322 cf_add_2libs=
20323 for cf_add_2lib in $cf_add_libs
20324 do
20325 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
20326 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
20327 if test "x$cf_add_2lib" = "x$cf_first_lib"
20328 then
20329 cf_found_2lib=yes
20330 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
20331 fi
20332 done
20333 if test "$cf_found_2lib" = yes
20334 then
20335 cf_add_libs="$cf_add_2libs"
20336 else
20337 test -n "$verbose" && echo " ...missed $cf_first_lib" 1>&6
20338
20339 echo "${as_me:-configure}:20339: testing ...missed $cf_first_lib ..." 1>&5
20340
20341 fi
20342 fi
20343 done
20344 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
20345
20346 echo "${as_me:-configure}:20346: testing ...after $cf_add_libs ..." 1>&5
20347
20348 LIBS="$cf_add_libs"
20349
20350 else
20351 cf_pkgconfig_incs=
20352 cf_pkgconfig_libs=
20353
20354 cf_add_libs="$LIBS"
20355 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
20356
20357 echo "${as_me:-configure}:20357: testing ...before $cf_add_libs ..." 1>&5
20358
20359 for cf_add_1lib in -lXmu; do
20360 # filter duplicates
20361 cf_found_2lib=no
20362 for cf_add_2lib in $cf_add_libs; do
20363 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20364 cf_found_2lib=yes
20365 break
20366 fi
20367 done
20368 # if not a duplicate, find the dependent library
20369 if test "$cf_found_2lib" = no
20370 then
20371 cf_found_2lib=no
20372 cf_add_2libs=
20373 for cf_add_2lib in $cf_add_libs
20374 do
20375 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
20376 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
20377 if test "x$cf_add_2lib" = "x$cf_first_lib"
20378 then
20379 cf_found_2lib=yes
20380 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
20381 fi
20382 done
20383 if test "$cf_found_2lib" = yes
20384 then
20385 cf_add_libs="$cf_add_2libs"
20386 else
20387 test -n "$verbose" && echo " ...missed $cf_first_lib" 1>&6
20388
20389 echo "${as_me:-configure}:20389: testing ...missed $cf_first_lib ..." 1>&5
20390
20391 fi
20392 fi
20393 done
20394 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
20395
20396 echo "${as_me:-configure}:20396: testing ...after $cf_add_libs ..." 1>&5
20397
20398 LIBS="$cf_add_libs"
20399
20400 fi
20401
20402 ;;
20403 esac
20404 fi
20405
20406 break
20407 else
20408 cf_pkgconfig_incs=
20409 cf_pkgconfig_libs=
20410 :
20411 fi
20412
20413 done
20414 fi
20415
20416 if test -z "$cf_x_athena_lib" ; then
20417
20418 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
20419 test -n "$verbose" && echo " found package Xext" 1>&6
20420
20421 echo "${as_me:-configure}:20421: testing found package Xext ..." 1>&5
20422
20423 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
20424 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
20425 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
20426
20427 echo "${as_me:-configure}:20427: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20428
20429 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
20430
20431 echo "${as_me:-configure}:20431: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
20432
20433 for cf_required in Xext
20434 do
20435 # check for duplicates
20436 for cf_require_pkg in $REQUIRE_PKG
20437 do
20438 if test "$cf_required" = "$cf_require_pkg"
20439 then
20440 cf_required=
20441 break
20442 fi
20443 done
20444 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
20445 done
20446
20447 cf_fix_cppflags=no
20448 cf_new_cflags=
20449 cf_new_cppflags=
20450 cf_new_extra_cppflags=
20451
20452 for cf_add_cflags in $cf_pkgconfig_incs
20453 do
20454 case "$cf_fix_cppflags" in
20455 (no)
20456 case "$cf_add_cflags" in
20457 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20458 case "$cf_add_cflags" in
20459 (-D*)
20460 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20461
20462 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20463 && test -z "${cf_tst_cflags}" \
20464 && cf_fix_cppflags=yes
20465
20466 if test "$cf_fix_cppflags" = yes ; then
20467
20468 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20469 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20470
20471 continue
20472 elif test "${cf_tst_cflags}" = "\"'" ; then
20473
20474 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20475 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20476
20477 continue
20478 fi
20479 ;;
20480 esac
20481 case "$CPPFLAGS" in
20482 (*$cf_add_cflags)
20483 ;;
20484 (*)
20485 case "$cf_add_cflags" in
20486 (-D*)
20487 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20488
20489 CPPFLAGS=`echo "$CPPFLAGS" | \
20490 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20491 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20492
20493 ;;
20494 esac
20495
20496 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20497 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20498
20499 ;;
20500 esac
20501 ;;
20502 (*)
20503
20504 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20505 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20506
20507 ;;
20508 esac
20509 ;;
20510 (yes)
20511
20512 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20513 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20514
20515 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20516
20517 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20518 && test -z "${cf_tst_cflags}" \
20519 && cf_fix_cppflags=no
20520 ;;
20521 esac
20522 done
20523
20524 if test -n "$cf_new_cflags" ; then
20525
20526 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20527 CFLAGS="${CFLAGS}$cf_new_cflags"
20528
20529 fi
20530
20531 if test -n "$cf_new_cppflags" ; then
20532
20533 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20534 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20535
20536 fi
20537
20538 if test -n "$cf_new_extra_cppflags" ; then
20539
20540 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20541 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20542
20543 fi
20544
20545 cf_add_libs="$LIBS"
20546 # reverse order
20547 cf_add_0lib=
20548 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20549 # filter duplicates
20550 for cf_add_1lib in $cf_add_0lib; do
20551 for cf_add_2lib in $cf_add_libs; do
20552 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20553 cf_add_1lib=
20554 break
20555 fi
20556 done
20557 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20558 done
20559 LIBS="$cf_add_libs"
20560
20561 :
20562 else
20563 cf_pkgconfig_incs=
20564 cf_pkgconfig_libs=
20565
20566 echo "$as_me:20566: checking for XextCreateExtension in -lXext" >&5
20567 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
20568 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
20569 echo $ECHO_N "(cached) $ECHO_C" >&6
20570 else
20571 ac_check_lib_save_LIBS=$LIBS
20572 LIBS="-lXext $LIBS"
20573 cat >"conftest.$ac_ext" <<_ACEOF
20574 #line 20574 "configure"
20575 #include "confdefs.h"
20576
20577 /* Override any gcc2 internal prototype to avoid an error. */
20578 #ifdef __cplusplus
20579 extern "C"
20580 #endif
20581 /* We use char because int might match the return type of a gcc2
20582 builtin and then its argument prototype would still apply. */
20583 char XextCreateExtension (void);
20584 int
20585 main (void)
20586 {
20587 XextCreateExtension ();
20588 ;
20589 return 0;
20590 }
20591 _ACEOF
20592 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20593 if { (eval echo "$as_me:20593: \"$ac_link\"") >&5
20594 (eval $ac_link) 2>&5
20595 ac_status=$?
20596 echo "$as_me:20596: \$? = $ac_status" >&5
20597 (exit "$ac_status"); } &&
20598 { ac_try='test -s "conftest$ac_exeext"'
20599 { (eval echo "$as_me:20599: \"$ac_try\"") >&5
20600 (eval $ac_try) 2>&5
20601 ac_status=$?
20602 echo "$as_me:20602: \$? = $ac_status" >&5
20603 (exit "$ac_status"); }; }; then
20604 ac_cv_lib_Xext_XextCreateExtension=yes
20605 else
20606 echo "$as_me: failed program was:" >&5
20607 cat "conftest.$ac_ext" >&5
20608 ac_cv_lib_Xext_XextCreateExtension=no
20609 fi
20610 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20611 LIBS=$ac_check_lib_save_LIBS
20612 fi
20613 echo "$as_me:20613: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
20614 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
20615 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
20616
20617 cf_add_libs="$LIBS"
20618 # reverse order
20619 cf_add_0lib=
20620 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20621 # filter duplicates
20622 for cf_add_1lib in $cf_add_0lib; do
20623 for cf_add_2lib in $cf_add_libs; do
20624 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20625 cf_add_1lib=
20626 break
20627 fi
20628 done
20629 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20630 done
20631 LIBS="$cf_add_libs"
20632
20633 fi
20634
20635 fi
20636
20637 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
20638 # in some cases has installed dummy files in the former, other cases replaced
20639 # it with a link to the new location). This complicates the configure script.
20640 # Check for that pitfall, and recover using pkg-config
20641 #
20642 # If none of these are set, the configuration is almost certainly broken.
20643 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
20644 then
20645
20646 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
20647 test -n "$verbose" && echo " found package x11" 1>&6
20648
20649 echo "${as_me:-configure}:20649: testing found package x11 ..." 1>&5
20650
20651 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
20652 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
20653 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
20654
20655 echo "${as_me:-configure}:20655: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20656
20657 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
20658
20659 echo "${as_me:-configure}:20659: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
20660
20661 for cf_required in x11
20662 do
20663 # check for duplicates
20664 for cf_require_pkg in $REQUIRE_PKG
20665 do
20666 if test "$cf_required" = "$cf_require_pkg"
20667 then
20668 cf_required=
20669 break
20670 fi
20671 done
20672 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
20673 done
20674
20675 cf_fix_cppflags=no
20676 cf_new_cflags=
20677 cf_new_cppflags=
20678 cf_new_extra_cppflags=
20679
20680 for cf_add_cflags in $cf_pkgconfig_incs
20681 do
20682 case "$cf_fix_cppflags" in
20683 (no)
20684 case "$cf_add_cflags" in
20685 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20686 case "$cf_add_cflags" in
20687 (-D*)
20688 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20689
20690 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20691 && test -z "${cf_tst_cflags}" \
20692 && cf_fix_cppflags=yes
20693
20694 if test "$cf_fix_cppflags" = yes ; then
20695
20696 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20697 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20698
20699 continue
20700 elif test "${cf_tst_cflags}" = "\"'" ; then
20701
20702 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20703 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20704
20705 continue
20706 fi
20707 ;;
20708 esac
20709 case "$CPPFLAGS" in
20710 (*$cf_add_cflags)
20711 ;;
20712 (*)
20713 case "$cf_add_cflags" in
20714 (-D*)
20715 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20716
20717 CPPFLAGS=`echo "$CPPFLAGS" | \
20718 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20719 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20720
20721 ;;
20722 esac
20723
20724 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20725 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20726
20727 ;;
20728 esac
20729 ;;
20730 (*)
20731
20732 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20733 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20734
20735 ;;
20736 esac
20737 ;;
20738 (yes)
20739
20740 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20741 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20742
20743 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20744
20745 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20746 && test -z "${cf_tst_cflags}" \
20747 && cf_fix_cppflags=no
20748 ;;
20749 esac
20750 done
20751
20752 if test -n "$cf_new_cflags" ; then
20753
20754 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20755 CFLAGS="${CFLAGS}$cf_new_cflags"
20756
20757 fi
20758
20759 if test -n "$cf_new_cppflags" ; then
20760
20761 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20762 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20763
20764 fi
20765
20766 if test -n "$cf_new_extra_cppflags" ; then
20767
20768 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20769 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20770
20771 fi
20772
20773 cf_add_libs="$LIBS"
20774 # reverse order
20775 cf_add_0lib=
20776 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20777 # filter duplicates
20778 for cf_add_1lib in $cf_add_0lib; do
20779 for cf_add_2lib in $cf_add_libs; do
20780 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20781 cf_add_1lib=
20782 break
20783 fi
20784 done
20785 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20786 done
20787 LIBS="$cf_add_libs"
20788
20789 :
20790 else
20791 cf_pkgconfig_incs=
20792 cf_pkgconfig_libs=
20793 { echo "$as_me:20793: WARNING: unable to find X11 library" >&5
20794 echo "$as_me: WARNING: unable to find X11 library" >&2;}
20795 fi
20796
20797 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
20798 test -n "$verbose" && echo " found package ice" 1>&6
20799
20800 echo "${as_me:-configure}:20800: testing found package ice ..." 1>&5
20801
20802 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
20803 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
20804 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
20805
20806 echo "${as_me:-configure}:20806: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20807
20808 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
20809
20810 echo "${as_me:-configure}:20810: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
20811
20812 for cf_required in ice
20813 do
20814 # check for duplicates
20815 for cf_require_pkg in $REQUIRE_PKG
20816 do
20817 if test "$cf_required" = "$cf_require_pkg"
20818 then
20819 cf_required=
20820 break
20821 fi
20822 done
20823 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
20824 done
20825
20826 cf_fix_cppflags=no
20827 cf_new_cflags=
20828 cf_new_cppflags=
20829 cf_new_extra_cppflags=
20830
20831 for cf_add_cflags in $cf_pkgconfig_incs
20832 do
20833 case "$cf_fix_cppflags" in
20834 (no)
20835 case "$cf_add_cflags" in
20836 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20837 case "$cf_add_cflags" in
20838 (-D*)
20839 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20840
20841 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20842 && test -z "${cf_tst_cflags}" \
20843 && cf_fix_cppflags=yes
20844
20845 if test "$cf_fix_cppflags" = yes ; then
20846
20847 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20848 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20849
20850 continue
20851 elif test "${cf_tst_cflags}" = "\"'" ; then
20852
20853 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20854 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20855
20856 continue
20857 fi
20858 ;;
20859 esac
20860 case "$CPPFLAGS" in
20861 (*$cf_add_cflags)
20862 ;;
20863 (*)
20864 case "$cf_add_cflags" in
20865 (-D*)
20866 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20867
20868 CPPFLAGS=`echo "$CPPFLAGS" | \
20869 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20870 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20871
20872 ;;
20873 esac
20874
20875 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20876 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20877
20878 ;;
20879 esac
20880 ;;
20881 (*)
20882
20883 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20884 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20885
20886 ;;
20887 esac
20888 ;;
20889 (yes)
20890
20891 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20892 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20893
20894 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20895
20896 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20897 && test -z "${cf_tst_cflags}" \
20898 && cf_fix_cppflags=no
20899 ;;
20900 esac
20901 done
20902
20903 if test -n "$cf_new_cflags" ; then
20904
20905 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20906 CFLAGS="${CFLAGS}$cf_new_cflags"
20907
20908 fi
20909
20910 if test -n "$cf_new_cppflags" ; then
20911
20912 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20913 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20914
20915 fi
20916
20917 if test -n "$cf_new_extra_cppflags" ; then
20918
20919 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20920 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20921
20922 fi
20923
20924 cf_add_libs="$LIBS"
20925 # reverse order
20926 cf_add_0lib=
20927 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20928 # filter duplicates
20929 for cf_add_1lib in $cf_add_0lib; do
20930 for cf_add_2lib in $cf_add_libs; do
20931 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20932 cf_add_1lib=
20933 break
20934 fi
20935 done
20936 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20937 done
20938 LIBS="$cf_add_libs"
20939
20940 :
20941 else
20942 cf_pkgconfig_incs=
20943 cf_pkgconfig_libs=
20944 { echo "$as_me:20944: WARNING: unable to find ICE library" >&5
20945 echo "$as_me: WARNING: unable to find ICE library" >&2;}
20946 fi
20947
20948 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
20949 test -n "$verbose" && echo " found package sm" 1>&6
20950
20951 echo "${as_me:-configure}:20951: testing found package sm ..." 1>&5
20952
20953 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
20954 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
20955 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
20956
20957 echo "${as_me:-configure}:20957: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20958
20959 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
20960
20961 echo "${as_me:-configure}:20961: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
20962
20963 for cf_required in sm
20964 do
20965 # check for duplicates
20966 for cf_require_pkg in $REQUIRE_PKG
20967 do
20968 if test "$cf_required" = "$cf_require_pkg"
20969 then
20970 cf_required=
20971 break
20972 fi
20973 done
20974 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
20975 done
20976
20977 cf_fix_cppflags=no
20978 cf_new_cflags=
20979 cf_new_cppflags=
20980 cf_new_extra_cppflags=
20981
20982 for cf_add_cflags in $cf_pkgconfig_incs
20983 do
20984 case "$cf_fix_cppflags" in
20985 (no)
20986 case "$cf_add_cflags" in
20987 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20988 case "$cf_add_cflags" in
20989 (-D*)
20990 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20991
20992 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20993 && test -z "${cf_tst_cflags}" \
20994 && cf_fix_cppflags=yes
20995
20996 if test "$cf_fix_cppflags" = yes ; then
20997
20998 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20999 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21000
21001 continue
21002 elif test "${cf_tst_cflags}" = "\"'" ; then
21003
21004 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21005 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21006
21007 continue
21008 fi
21009 ;;
21010 esac
21011 case "$CPPFLAGS" in
21012 (*$cf_add_cflags)
21013 ;;
21014 (*)
21015 case "$cf_add_cflags" in
21016 (-D*)
21017 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21018
21019 CPPFLAGS=`echo "$CPPFLAGS" | \
21020 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21021 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21022
21023 ;;
21024 esac
21025
21026 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21027 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21028
21029 ;;
21030 esac
21031 ;;
21032 (*)
21033
21034 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21035 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21036
21037 ;;
21038 esac
21039 ;;
21040 (yes)
21041
21042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21044
21045 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21046
21047 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21048 && test -z "${cf_tst_cflags}" \
21049 && cf_fix_cppflags=no
21050 ;;
21051 esac
21052 done
21053
21054 if test -n "$cf_new_cflags" ; then
21055
21056 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21057 CFLAGS="${CFLAGS}$cf_new_cflags"
21058
21059 fi
21060
21061 if test -n "$cf_new_cppflags" ; then
21062
21063 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21064 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21065
21066 fi
21067
21068 if test -n "$cf_new_extra_cppflags" ; then
21069
21070 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21071 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21072
21073 fi
21074
21075 cf_add_libs="$LIBS"
21076 # reverse order
21077 cf_add_0lib=
21078 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21079 # filter duplicates
21080 for cf_add_1lib in $cf_add_0lib; do
21081 for cf_add_2lib in $cf_add_libs; do
21082 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21083 cf_add_1lib=
21084 break
21085 fi
21086 done
21087 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21088 done
21089 LIBS="$cf_add_libs"
21090
21091 :
21092 else
21093 cf_pkgconfig_incs=
21094 cf_pkgconfig_libs=
21095 { echo "$as_me:21095: WARNING: unable to find SM library" >&5
21096 echo "$as_me: WARNING: unable to find SM library" >&2;}
21097 fi
21098
21099 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
21100 test -n "$verbose" && echo " found package xt" 1>&6
21101
21102 echo "${as_me:-configure}:21102: testing found package xt ..." 1>&5
21103
21104 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
21105 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
21106 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
21107
21108 echo "${as_me:-configure}:21108: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21109
21110 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
21111
21112 echo "${as_me:-configure}:21112: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
21113
21114 for cf_required in xt
21115 do
21116 # check for duplicates
21117 for cf_require_pkg in $REQUIRE_PKG
21118 do
21119 if test "$cf_required" = "$cf_require_pkg"
21120 then
21121 cf_required=
21122 break
21123 fi
21124 done
21125 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
21126 done
21127
21128 cf_fix_cppflags=no
21129 cf_new_cflags=
21130 cf_new_cppflags=
21131 cf_new_extra_cppflags=
21132
21133 for cf_add_cflags in $cf_pkgconfig_incs
21134 do
21135 case "$cf_fix_cppflags" in
21136 (no)
21137 case "$cf_add_cflags" in
21138 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21139 case "$cf_add_cflags" in
21140 (-D*)
21141 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21142
21143 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21144 && test -z "${cf_tst_cflags}" \
21145 && cf_fix_cppflags=yes
21146
21147 if test "$cf_fix_cppflags" = yes ; then
21148
21149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21151
21152 continue
21153 elif test "${cf_tst_cflags}" = "\"'" ; then
21154
21155 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21156 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21157
21158 continue
21159 fi
21160 ;;
21161 esac
21162 case "$CPPFLAGS" in
21163 (*$cf_add_cflags)
21164 ;;
21165 (*)
21166 case "$cf_add_cflags" in
21167 (-D*)
21168 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21169
21170 CPPFLAGS=`echo "$CPPFLAGS" | \
21171 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21172 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21173
21174 ;;
21175 esac
21176
21177 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21178 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21179
21180 ;;
21181 esac
21182 ;;
21183 (*)
21184
21185 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21186 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21187
21188 ;;
21189 esac
21190 ;;
21191 (yes)
21192
21193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21195
21196 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21197
21198 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21199 && test -z "${cf_tst_cflags}" \
21200 && cf_fix_cppflags=no
21201 ;;
21202 esac
21203 done
21204
21205 if test -n "$cf_new_cflags" ; then
21206
21207 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21208 CFLAGS="${CFLAGS}$cf_new_cflags"
21209
21210 fi
21211
21212 if test -n "$cf_new_cppflags" ; then
21213
21214 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21215 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21216
21217 fi
21218
21219 if test -n "$cf_new_extra_cppflags" ; then
21220
21221 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21222 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21223
21224 fi
21225
21226 cf_add_libs="$LIBS"
21227 # reverse order
21228 cf_add_0lib=
21229 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21230 # filter duplicates
21231 for cf_add_1lib in $cf_add_0lib; do
21232 for cf_add_2lib in $cf_add_libs; do
21233 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21234 cf_add_1lib=
21235 break
21236 fi
21237 done
21238 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21239 done
21240 LIBS="$cf_add_libs"
21241
21242 :
21243 else
21244 cf_pkgconfig_incs=
21245 cf_pkgconfig_libs=
21246 { echo "$as_me:21246: WARNING: unable to find Xt library" >&5
21247 echo "$as_me: WARNING: unable to find Xt library" >&2;}
21248 fi
21249
21250 else
21251 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
21252 fi
21253
21254 cf_have_X_LIBS=no
21255
21256 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
21257 test -n "$verbose" && echo " found package xt" 1>&6
21258
21259 echo "${as_me:-configure}:21259: testing found package xt ..." 1>&5
21260
21261 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
21262 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
21263 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
21264
21265 echo "${as_me:-configure}:21265: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21266
21267 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
21268
21269 echo "${as_me:-configure}:21269: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
21270
21271 for cf_required in xt
21272 do
21273 # check for duplicates
21274 for cf_require_pkg in $REQUIRE_PKG
21275 do
21276 if test "$cf_required" = "$cf_require_pkg"
21277 then
21278 cf_required=
21279 break
21280 fi
21281 done
21282 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
21283 done
21284
21285 cf_fix_cppflags=no
21286 cf_new_cflags=
21287 cf_new_cppflags=
21288 cf_new_extra_cppflags=
21289
21290 for cf_add_cflags in $cf_pkgconfig_incs
21291 do
21292 case "$cf_fix_cppflags" in
21293 (no)
21294 case "$cf_add_cflags" in
21295 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21296 case "$cf_add_cflags" in
21297 (-D*)
21298 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21299
21300 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21301 && test -z "${cf_tst_cflags}" \
21302 && cf_fix_cppflags=yes
21303
21304 if test "$cf_fix_cppflags" = yes ; then
21305
21306 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21307 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21308
21309 continue
21310 elif test "${cf_tst_cflags}" = "\"'" ; then
21311
21312 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21313 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21314
21315 continue
21316 fi
21317 ;;
21318 esac
21319 case "$CPPFLAGS" in
21320 (*$cf_add_cflags)
21321 ;;
21322 (*)
21323 case "$cf_add_cflags" in
21324 (-D*)
21325 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21326
21327 CPPFLAGS=`echo "$CPPFLAGS" | \
21328 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21329 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21330
21331 ;;
21332 esac
21333
21334 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21335 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21336
21337 ;;
21338 esac
21339 ;;
21340 (*)
21341
21342 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21343 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21344
21345 ;;
21346 esac
21347 ;;
21348 (yes)
21349
21350 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21351 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21352
21353 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21354
21355 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21356 && test -z "${cf_tst_cflags}" \
21357 && cf_fix_cppflags=no
21358 ;;
21359 esac
21360 done
21361
21362 if test -n "$cf_new_cflags" ; then
21363
21364 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21365 CFLAGS="${CFLAGS}$cf_new_cflags"
21366
21367 fi
21368
21369 if test -n "$cf_new_cppflags" ; then
21370
21371 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21372 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21373
21374 fi
21375
21376 if test -n "$cf_new_extra_cppflags" ; then
21377
21378 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21379 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21380
21381 fi
21382
21383 cf_add_libs="$LIBS"
21384 # reverse order
21385 cf_add_0lib=
21386 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21387 # filter duplicates
21388 for cf_add_1lib in $cf_add_0lib; do
21389 for cf_add_2lib in $cf_add_libs; do
21390 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21391 cf_add_1lib=
21392 break
21393 fi
21394 done
21395 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21396 done
21397 LIBS="$cf_add_libs"
21398
21399 case "x$LIBS" in
21400 (*-lX11*)
21401 ;;
21402 (*)
21403 # we have an "xt" package, but it may omit Xt's dependency on X11
21404 echo "$as_me:21404: checking for usable X dependency" >&5
21405 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
21406 if test "${cf_cv_xt_x11_compat+set}" = set; then
21407 echo $ECHO_N "(cached) $ECHO_C" >&6
21408 else
21409
21410 cat >"conftest.$ac_ext" <<_ACEOF
21411 #line 21411 "configure"
21412 #include "confdefs.h"
21413
21414 $ac_includes_default
21415 #include <X11/Xlib.h>
21416
21417 int
21418 main (void)
21419 {
21420
21421 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
21422 int rc2 = XClearWindow((Display*) 0, (Window) 0);
21423 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
21424 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
21425
21426 ;
21427 return 0;
21428 }
21429 _ACEOF
21430 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21431 if { (eval echo "$as_me:21431: \"$ac_link\"") >&5
21432 (eval $ac_link) 2>&5
21433 ac_status=$?
21434 echo "$as_me:21434: \$? = $ac_status" >&5
21435 (exit "$ac_status"); } &&
21436 { ac_try='test -s "conftest$ac_exeext"'
21437 { (eval echo "$as_me:21437: \"$ac_try\"") >&5
21438 (eval $ac_try) 2>&5
21439 ac_status=$?
21440 echo "$as_me:21440: \$? = $ac_status" >&5
21441 (exit "$ac_status"); }; }; then
21442 cf_cv_xt_x11_compat=yes
21443 else
21444 echo "$as_me: failed program was:" >&5
21445 cat "conftest.$ac_ext" >&5
21446 cf_cv_xt_x11_compat=no
21447 fi
21448 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21449 fi
21450 echo "$as_me:21450: result: $cf_cv_xt_x11_compat" >&5
21451 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
21452 if test "$cf_cv_xt_x11_compat" = no
21453 then
21454 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
21455
21456 echo "${as_me:-configure}:21456: testing work around broken X11 dependency ..." 1>&5
21457
21458 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
21459
21460 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
21461 test -n "$verbose" && echo " found package x11" 1>&6
21462
21463 echo "${as_me:-configure}:21463: testing found package x11 ..." 1>&5
21464
21465 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
21466 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
21467 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
21468
21469 echo "${as_me:-configure}:21469: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21470
21471 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
21472
21473 echo "${as_me:-configure}:21473: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
21474
21475 for cf_required in x11
21476 do
21477 # check for duplicates
21478 for cf_require_pkg in $REQUIRE_PKG
21479 do
21480 if test "$cf_required" = "$cf_require_pkg"
21481 then
21482 cf_required=
21483 break
21484 fi
21485 done
21486 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
21487 done
21488
21489 cf_fix_cppflags=no
21490 cf_new_cflags=
21491 cf_new_cppflags=
21492 cf_new_extra_cppflags=
21493
21494 for cf_add_cflags in $cf_pkgconfig_incs
21495 do
21496 case "$cf_fix_cppflags" in
21497 (no)
21498 case "$cf_add_cflags" in
21499 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21500 case "$cf_add_cflags" in
21501 (-D*)
21502 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21503
21504 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21505 && test -z "${cf_tst_cflags}" \
21506 && cf_fix_cppflags=yes
21507
21508 if test "$cf_fix_cppflags" = yes ; then
21509
21510 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21511 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21512
21513 continue
21514 elif test "${cf_tst_cflags}" = "\"'" ; then
21515
21516 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21517 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21518
21519 continue
21520 fi
21521 ;;
21522 esac
21523 case "$CPPFLAGS" in
21524 (*$cf_add_cflags)
21525 ;;
21526 (*)
21527 case "$cf_add_cflags" in
21528 (-D*)
21529 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21530
21531 CPPFLAGS=`echo "$CPPFLAGS" | \
21532 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21533 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21534
21535 ;;
21536 esac
21537
21538 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21539 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21540
21541 ;;
21542 esac
21543 ;;
21544 (*)
21545
21546 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21547 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21548
21549 ;;
21550 esac
21551 ;;
21552 (yes)
21553
21554 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21555 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21556
21557 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21558
21559 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21560 && test -z "${cf_tst_cflags}" \
21561 && cf_fix_cppflags=no
21562 ;;
21563 esac
21564 done
21565
21566 if test -n "$cf_new_cflags" ; then
21567
21568 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21569 CFLAGS="${CFLAGS}$cf_new_cflags"
21570
21571 fi
21572
21573 if test -n "$cf_new_cppflags" ; then
21574
21575 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21576 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21577
21578 fi
21579
21580 if test -n "$cf_new_extra_cppflags" ; then
21581
21582 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21583 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21584
21585 fi
21586
21587 cf_add_libs="$LIBS"
21588 # reverse order
21589 cf_add_0lib=
21590 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21591 # filter duplicates
21592 for cf_add_1lib in $cf_add_0lib; do
21593 for cf_add_2lib in $cf_add_libs; do
21594 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21595 cf_add_1lib=
21596 break
21597 fi
21598 done
21599 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21600 done
21601 LIBS="$cf_add_libs"
21602
21603 :
21604 else
21605 cf_pkgconfig_incs=
21606 cf_pkgconfig_libs=
21607
21608 cf_add_libs="$LIBS"
21609 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
21610
21611 echo "${as_me:-configure}:21611: testing ...before $cf_add_libs ..." 1>&5
21612
21613 for cf_add_1lib in -lX11; do
21614 # filter duplicates
21615 cf_found_2lib=no
21616 for cf_add_2lib in $cf_add_libs; do
21617 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21618 cf_found_2lib=yes
21619 break
21620 fi
21621 done
21622 # if not a duplicate, find the dependent library
21623 if test "$cf_found_2lib" = no
21624 then
21625 cf_found_2lib=no
21626 cf_add_2libs=
21627 for cf_add_2lib in $cf_add_libs
21628 do
21629 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
21630 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
21631 if test "x$cf_add_2lib" = "x-lXt"
21632 then
21633 cf_found_2lib=yes
21634 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
21635 fi
21636 done
21637 if test "$cf_found_2lib" = yes
21638 then
21639 cf_add_libs="$cf_add_2libs"
21640 else
21641 test -n "$verbose" && echo " ...missed -lXt" 1>&6
21642
21643 echo "${as_me:-configure}:21643: testing ...missed -lXt ..." 1>&5
21644
21645 fi
21646 fi
21647 done
21648 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
21649
21650 echo "${as_me:-configure}:21650: testing ...after $cf_add_libs ..." 1>&5
21651
21652 LIBS="$cf_add_libs"
21653
21654 fi
21655
21656 fi
21657 ;;
21658 esac
21659
21660 echo "$as_me:21660: checking for usable X Toolkit package" >&5
21661 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
21662 if test "${cf_cv_xt_ice_compat+set}" = set; then
21663 echo $ECHO_N "(cached) $ECHO_C" >&6
21664 else
21665
21666 cat >"conftest.$ac_ext" <<_ACEOF
21667 #line 21667 "configure"
21668 #include "confdefs.h"
21669
21670 $ac_includes_default
21671 #include <X11/Shell.h>
21672
21673 int
21674 main (void)
21675 {
21676 int num = IceConnectionNumber(0); (void) num
21677
21678 ;
21679 return 0;
21680 }
21681 _ACEOF
21682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21683 if { (eval echo "$as_me:21683: \"$ac_link\"") >&5
21684 (eval $ac_link) 2>&5
21685 ac_status=$?
21686 echo "$as_me:21686: \$? = $ac_status" >&5
21687 (exit "$ac_status"); } &&
21688 { ac_try='test -s "conftest$ac_exeext"'
21689 { (eval echo "$as_me:21689: \"$ac_try\"") >&5
21690 (eval $ac_try) 2>&5
21691 ac_status=$?
21692 echo "$as_me:21692: \$? = $ac_status" >&5
21693 (exit "$ac_status"); }; }; then
21694 cf_cv_xt_ice_compat=yes
21695 else
21696 echo "$as_me: failed program was:" >&5
21697 cat "conftest.$ac_ext" >&5
21698 cf_cv_xt_ice_compat=no
21699 fi
21700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21701 fi
21702 echo "$as_me:21702: result: $cf_cv_xt_ice_compat" >&5
21703 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
21704
21705 if test "$cf_cv_xt_ice_compat" = no
21706 then
21707 # workaround for broken ".pc" files used for X Toolkit.
21708 case "x$X_PRE_LIBS" in
21709 (*-lICE*)
21710 case "x$LIBS" in
21711 (*-lICE*)
21712 ;;
21713 (*)
21714 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
21715
21716 echo "${as_me:-configure}:21716: testing work around broken ICE dependency ..." 1>&5
21717
21718 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
21719 test -n "$verbose" && echo " found package ice" 1>&6
21720
21721 echo "${as_me:-configure}:21721: testing found package ice ..." 1>&5
21722
21723 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
21724 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
21725 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
21726
21727 echo "${as_me:-configure}:21727: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21728
21729 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
21730
21731 echo "${as_me:-configure}:21731: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
21732
21733 for cf_required in ice
21734 do
21735 # check for duplicates
21736 for cf_require_pkg in $REQUIRE_PKG
21737 do
21738 if test "$cf_required" = "$cf_require_pkg"
21739 then
21740 cf_required=
21741 break
21742 fi
21743 done
21744 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
21745 done
21746
21747 cf_fix_cppflags=no
21748 cf_new_cflags=
21749 cf_new_cppflags=
21750 cf_new_extra_cppflags=
21751
21752 for cf_add_cflags in $cf_pkgconfig_incs
21753 do
21754 case "$cf_fix_cppflags" in
21755 (no)
21756 case "$cf_add_cflags" in
21757 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21758 case "$cf_add_cflags" in
21759 (-D*)
21760 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21761
21762 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21763 && test -z "${cf_tst_cflags}" \
21764 && cf_fix_cppflags=yes
21765
21766 if test "$cf_fix_cppflags" = yes ; then
21767
21768 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21769 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21770
21771 continue
21772 elif test "${cf_tst_cflags}" = "\"'" ; then
21773
21774 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21775 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21776
21777 continue
21778 fi
21779 ;;
21780 esac
21781 case "$CPPFLAGS" in
21782 (*$cf_add_cflags)
21783 ;;
21784 (*)
21785 case "$cf_add_cflags" in
21786 (-D*)
21787 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21788
21789 CPPFLAGS=`echo "$CPPFLAGS" | \
21790 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21791 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21792
21793 ;;
21794 esac
21795
21796 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21797 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21798
21799 ;;
21800 esac
21801 ;;
21802 (*)
21803
21804 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21805 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21806
21807 ;;
21808 esac
21809 ;;
21810 (yes)
21811
21812 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21813 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21814
21815 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21816
21817 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21818 && test -z "${cf_tst_cflags}" \
21819 && cf_fix_cppflags=no
21820 ;;
21821 esac
21822 done
21823
21824 if test -n "$cf_new_cflags" ; then
21825
21826 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21827 CFLAGS="${CFLAGS}$cf_new_cflags"
21828
21829 fi
21830
21831 if test -n "$cf_new_cppflags" ; then
21832
21833 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21834 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21835
21836 fi
21837
21838 if test -n "$cf_new_extra_cppflags" ; then
21839
21840 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21841 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21842
21843 fi
21844
21845 cf_add_libs="$LIBS"
21846 # reverse order
21847 cf_add_0lib=
21848 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21849 # filter duplicates
21850 for cf_add_1lib in $cf_add_0lib; do
21851 for cf_add_2lib in $cf_add_libs; do
21852 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21853 cf_add_1lib=
21854 break
21855 fi
21856 done
21857 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21858 done
21859 LIBS="$cf_add_libs"
21860
21861 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
21862 test -n "$verbose" && echo " found package sm" 1>&6
21863
21864 echo "${as_me:-configure}:21864: testing found package sm ..." 1>&5
21865
21866 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
21867 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
21868 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
21869
21870 echo "${as_me:-configure}:21870: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21871
21872 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
21873
21874 echo "${as_me:-configure}:21874: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
21875
21876 for cf_required in sm
21877 do
21878 # check for duplicates
21879 for cf_require_pkg in $REQUIRE_PKG
21880 do
21881 if test "$cf_required" = "$cf_require_pkg"
21882 then
21883 cf_required=
21884 break
21885 fi
21886 done
21887 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
21888 done
21889
21890 cf_fix_cppflags=no
21891 cf_new_cflags=
21892 cf_new_cppflags=
21893 cf_new_extra_cppflags=
21894
21895 for cf_add_cflags in $cf_pkgconfig_incs
21896 do
21897 case "$cf_fix_cppflags" in
21898 (no)
21899 case "$cf_add_cflags" in
21900 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21901 case "$cf_add_cflags" in
21902 (-D*)
21903 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21904
21905 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21906 && test -z "${cf_tst_cflags}" \
21907 && cf_fix_cppflags=yes
21908
21909 if test "$cf_fix_cppflags" = yes ; then
21910
21911 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21912 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21913
21914 continue
21915 elif test "${cf_tst_cflags}" = "\"'" ; then
21916
21917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21919
21920 continue
21921 fi
21922 ;;
21923 esac
21924 case "$CPPFLAGS" in
21925 (*$cf_add_cflags)
21926 ;;
21927 (*)
21928 case "$cf_add_cflags" in
21929 (-D*)
21930 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21931
21932 CPPFLAGS=`echo "$CPPFLAGS" | \
21933 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21934 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21935
21936 ;;
21937 esac
21938
21939 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21940 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21941
21942 ;;
21943 esac
21944 ;;
21945 (*)
21946
21947 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21948 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21949
21950 ;;
21951 esac
21952 ;;
21953 (yes)
21954
21955 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21956 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21957
21958 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21959
21960 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21961 && test -z "${cf_tst_cflags}" \
21962 && cf_fix_cppflags=no
21963 ;;
21964 esac
21965 done
21966
21967 if test -n "$cf_new_cflags" ; then
21968
21969 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21970 CFLAGS="${CFLAGS}$cf_new_cflags"
21971
21972 fi
21973
21974 if test -n "$cf_new_cppflags" ; then
21975
21976 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21977 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21978
21979 fi
21980
21981 if test -n "$cf_new_extra_cppflags" ; then
21982
21983 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21984 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21985
21986 fi
21987
21988 cf_add_libs="$LIBS"
21989 # reverse order
21990 cf_add_0lib=
21991 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21992 # filter duplicates
21993 for cf_add_1lib in $cf_add_0lib; do
21994 for cf_add_2lib in $cf_add_libs; do
21995 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21996 cf_add_1lib=
21997 break
21998 fi
21999 done
22000 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22001 done
22002 LIBS="$cf_add_libs"
22003
22004 :
22005 else
22006 cf_pkgconfig_incs=
22007 cf_pkgconfig_libs=
22008 :
22009 fi
22010
22011 else
22012 cf_pkgconfig_incs=
22013 cf_pkgconfig_libs=
22014
22015 cf_add_libs="$LIBS"
22016 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
22017
22018 echo "${as_me:-configure}:22018: testing ...before $cf_add_libs ..." 1>&5
22019
22020 for cf_add_1lib in $X_PRE_LIBS; do
22021 # filter duplicates
22022 cf_found_2lib=no
22023 for cf_add_2lib in $cf_add_libs; do
22024 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22025 cf_found_2lib=yes
22026 break
22027 fi
22028 done
22029 # if not a duplicate, find the dependent library
22030 if test "$cf_found_2lib" = no
22031 then
22032 cf_found_2lib=no
22033 cf_add_2libs=
22034 for cf_add_2lib in $cf_add_libs
22035 do
22036 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
22037 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
22038 if test "x$cf_add_2lib" = "x-lXt"
22039 then
22040 cf_found_2lib=yes
22041 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
22042 fi
22043 done
22044 if test "$cf_found_2lib" = yes
22045 then
22046 cf_add_libs="$cf_add_2libs"
22047 else
22048 test -n "$verbose" && echo " ...missed -lXt" 1>&6
22049
22050 echo "${as_me:-configure}:22050: testing ...missed -lXt ..." 1>&5
22051
22052 fi
22053 fi
22054 done
22055 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
22056
22057 echo "${as_me:-configure}:22057: testing ...after $cf_add_libs ..." 1>&5
22058
22059 LIBS="$cf_add_libs"
22060
22061 fi
22062
22063 ;;
22064 esac
22065 ;;
22066 esac
22067 fi
22068
22069 cf_have_X_LIBS=yes
22070
22071 else
22072 cf_pkgconfig_incs=
22073 cf_pkgconfig_libs=
22074
22075 LDFLAGS="$X_LIBS $LDFLAGS"
22076
22077 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
22078
22079 echo "${as_me:-configure}:22079: testing checking additions to CFLAGS ..." 1>&5
22080
22081 cf_check_cflags="$CFLAGS"
22082 cf_check_cppflags="$CPPFLAGS"
22083
22084 cf_fix_cppflags=no
22085 cf_new_cflags=
22086 cf_new_cppflags=
22087 cf_new_extra_cppflags=
22088
22089 for cf_add_cflags in $X_CFLAGS
22090 do
22091 case "$cf_fix_cppflags" in
22092 (no)
22093 case "$cf_add_cflags" in
22094 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22095 case "$cf_add_cflags" in
22096 (-D*)
22097 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22098
22099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22100 && test -z "${cf_tst_cflags}" \
22101 && cf_fix_cppflags=yes
22102
22103 if test "$cf_fix_cppflags" = yes ; then
22104
22105 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22106 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22107
22108 continue
22109 elif test "${cf_tst_cflags}" = "\"'" ; then
22110
22111 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22112 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22113
22114 continue
22115 fi
22116 ;;
22117 esac
22118 case "$CPPFLAGS" in
22119 (*$cf_add_cflags)
22120 ;;
22121 (*)
22122 case "$cf_add_cflags" in
22123 (-D*)
22124 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22125
22126 CPPFLAGS=`echo "$CPPFLAGS" | \
22127 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22128 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22129
22130 ;;
22131 esac
22132
22133 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22134 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22135
22136 ;;
22137 esac
22138 ;;
22139 (*)
22140
22141 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22142 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22143
22144 ;;
22145 esac
22146 ;;
22147 (yes)
22148
22149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22151
22152 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22153
22154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22155 && test -z "${cf_tst_cflags}" \
22156 && cf_fix_cppflags=no
22157 ;;
22158 esac
22159 done
22160
22161 if test -n "$cf_new_cflags" ; then
22162 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
22163
22164 echo "${as_me:-configure}:22164: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
22165
22166 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22167 CFLAGS="${CFLAGS}$cf_new_cflags"
22168
22169 fi
22170
22171 if test -n "$cf_new_cppflags" ; then
22172 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
22173
22174 echo "${as_me:-configure}:22174: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
22175
22176 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22177 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22178
22179 fi
22180
22181 if test -n "$cf_new_extra_cppflags" ; then
22182 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
22183
22184 echo "${as_me:-configure}:22184: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
22185
22186 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22187 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22188
22189 fi
22190
22191 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
22192 cat >"conftest.$ac_ext" <<_ACEOF
22193 #line 22193 "configure"
22194 #include "confdefs.h"
22195 #include <stdio.h>
22196 int
22197 main (void)
22198 {
22199 printf("Hello world");
22200 ;
22201 return 0;
22202 }
22203 _ACEOF
22204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22205 if { (eval echo "$as_me:22205: \"$ac_link\"") >&5
22206 (eval $ac_link) 2>&5
22207 ac_status=$?
22208 echo "$as_me:22208: \$? = $ac_status" >&5
22209 (exit "$ac_status"); } &&
22210 { ac_try='test -s "conftest$ac_exeext"'
22211 { (eval echo "$as_me:22211: \"$ac_try\"") >&5
22212 (eval $ac_try) 2>&5
22213 ac_status=$?
22214 echo "$as_me:22214: \$? = $ac_status" >&5
22215 (exit "$ac_status"); }; }; then
22216 :
22217 else
22218 echo "$as_me: failed program was:" >&5
22219 cat "conftest.$ac_ext" >&5
22220 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
22221
22222 echo "${as_me:-configure}:22222: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
22223
22224 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
22225 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
22226
22227 echo "${as_me:-configure}:22227: testing but keeping change to \$CPPFLAGS ..." 1>&5
22228
22229 fi
22230 CFLAGS="$cf_check_cflags"
22231 fi
22232 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22233 fi
22234
22235 echo "$as_me:22235: checking for XOpenDisplay" >&5
22236 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
22237 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
22238 echo $ECHO_N "(cached) $ECHO_C" >&6
22239 else
22240 cat >"conftest.$ac_ext" <<_ACEOF
22241 #line 22241 "configure"
22242 #include "confdefs.h"
22243 #define XOpenDisplay autoconf_temporary
22244 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22245 #undef XOpenDisplay
22246
22247 #ifdef __cplusplus
22248 extern "C"
22249 #endif
22250
22251 /* We use char because int might match the return type of a gcc2
22252 builtin and then its argument prototype would still apply. */
22253 char XOpenDisplay (void);
22254
22255 int
22256 main (void)
22257 {
22258
22259 /* The GNU C library defines stubs for functions which it implements
22260 to always fail with ENOSYS. Some functions are actually named
22261 something starting with __ and the normal name is an alias. */
22262 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
22263 #error found stub for XOpenDisplay
22264 #endif
22265
22266 return XOpenDisplay ();
22267 ;
22268 return 0;
22269 }
22270 _ACEOF
22271 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22272 if { (eval echo "$as_me:22272: \"$ac_link\"") >&5
22273 (eval $ac_link) 2>&5
22274 ac_status=$?
22275 echo "$as_me:22275: \$? = $ac_status" >&5
22276 (exit "$ac_status"); } &&
22277 { ac_try='test -s "conftest$ac_exeext"'
22278 { (eval echo "$as_me:22278: \"$ac_try\"") >&5
22279 (eval $ac_try) 2>&5
22280 ac_status=$?
22281 echo "$as_me:22281: \$? = $ac_status" >&5
22282 (exit "$ac_status"); }; }; then
22283 ac_cv_func_XOpenDisplay=yes
22284 else
22285 echo "$as_me: failed program was:" >&5
22286 cat "conftest.$ac_ext" >&5
22287 ac_cv_func_XOpenDisplay=no
22288 fi
22289 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22290 fi
22291 echo "$as_me:22291: result: $ac_cv_func_XOpenDisplay" >&5
22292 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
22293 if test "$ac_cv_func_XOpenDisplay" = yes; then
22294 :
22295 else
22296
22297 echo "$as_me:22297: checking for XOpenDisplay in -lX11" >&5
22298 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
22299 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
22300 echo $ECHO_N "(cached) $ECHO_C" >&6
22301 else
22302 ac_check_lib_save_LIBS=$LIBS
22303 LIBS="-lX11 $LIBS"
22304 cat >"conftest.$ac_ext" <<_ACEOF
22305 #line 22305 "configure"
22306 #include "confdefs.h"
22307
22308 /* Override any gcc2 internal prototype to avoid an error. */
22309 #ifdef __cplusplus
22310 extern "C"
22311 #endif
22312 /* We use char because int might match the return type of a gcc2
22313 builtin and then its argument prototype would still apply. */
22314 char XOpenDisplay (void);
22315 int
22316 main (void)
22317 {
22318 XOpenDisplay ();
22319 ;
22320 return 0;
22321 }
22322 _ACEOF
22323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22324 if { (eval echo "$as_me:22324: \"$ac_link\"") >&5
22325 (eval $ac_link) 2>&5
22326 ac_status=$?
22327 echo "$as_me:22327: \$? = $ac_status" >&5
22328 (exit "$ac_status"); } &&
22329 { ac_try='test -s "conftest$ac_exeext"'
22330 { (eval echo "$as_me:22330: \"$ac_try\"") >&5
22331 (eval $ac_try) 2>&5
22332 ac_status=$?
22333 echo "$as_me:22333: \$? = $ac_status" >&5
22334 (exit "$ac_status"); }; }; then
22335 ac_cv_lib_X11_XOpenDisplay=yes
22336 else
22337 echo "$as_me: failed program was:" >&5
22338 cat "conftest.$ac_ext" >&5
22339 ac_cv_lib_X11_XOpenDisplay=no
22340 fi
22341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22342 LIBS=$ac_check_lib_save_LIBS
22343 fi
22344 echo "$as_me:22344: result: $ac_cv_lib_X11_XOpenDisplay" >&5
22345 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
22346 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
22347
22348 cf_add_libs="$LIBS"
22349 # reverse order
22350 cf_add_0lib=
22351 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22352 # filter duplicates
22353 for cf_add_1lib in $cf_add_0lib; do
22354 for cf_add_2lib in $cf_add_libs; do
22355 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22356 cf_add_1lib=
22357 break
22358 fi
22359 done
22360 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22361 done
22362 LIBS="$cf_add_libs"
22363
22364 fi
22365
22366 fi
22367
22368 echo "$as_me:22368: checking for XtAppInitialize" >&5
22369 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
22370 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
22371 echo $ECHO_N "(cached) $ECHO_C" >&6
22372 else
22373 cat >"conftest.$ac_ext" <<_ACEOF
22374 #line 22374 "configure"
22375 #include "confdefs.h"
22376 #define XtAppInitialize autoconf_temporary
22377 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22378 #undef XtAppInitialize
22379
22380 #ifdef __cplusplus
22381 extern "C"
22382 #endif
22383
22384 /* We use char because int might match the return type of a gcc2
22385 builtin and then its argument prototype would still apply. */
22386 char XtAppInitialize (void);
22387
22388 int
22389 main (void)
22390 {
22391
22392 /* The GNU C library defines stubs for functions which it implements
22393 to always fail with ENOSYS. Some functions are actually named
22394 something starting with __ and the normal name is an alias. */
22395 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
22396 #error found stub for XtAppInitialize
22397 #endif
22398
22399 return XtAppInitialize ();
22400 ;
22401 return 0;
22402 }
22403 _ACEOF
22404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22405 if { (eval echo "$as_me:22405: \"$ac_link\"") >&5
22406 (eval $ac_link) 2>&5
22407 ac_status=$?
22408 echo "$as_me:22408: \$? = $ac_status" >&5
22409 (exit "$ac_status"); } &&
22410 { ac_try='test -s "conftest$ac_exeext"'
22411 { (eval echo "$as_me:22411: \"$ac_try\"") >&5
22412 (eval $ac_try) 2>&5
22413 ac_status=$?
22414 echo "$as_me:22414: \$? = $ac_status" >&5
22415 (exit "$ac_status"); }; }; then
22416 ac_cv_func_XtAppInitialize=yes
22417 else
22418 echo "$as_me: failed program was:" >&5
22419 cat "conftest.$ac_ext" >&5
22420 ac_cv_func_XtAppInitialize=no
22421 fi
22422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22423 fi
22424 echo "$as_me:22424: result: $ac_cv_func_XtAppInitialize" >&5
22425 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
22426 if test "$ac_cv_func_XtAppInitialize" = yes; then
22427 :
22428 else
22429
22430 echo "$as_me:22430: checking for XtAppInitialize in -lXt" >&5
22431 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
22432 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
22433 echo $ECHO_N "(cached) $ECHO_C" >&6
22434 else
22435 ac_check_lib_save_LIBS=$LIBS
22436 LIBS="-lXt $LIBS"
22437 cat >"conftest.$ac_ext" <<_ACEOF
22438 #line 22438 "configure"
22439 #include "confdefs.h"
22440
22441 /* Override any gcc2 internal prototype to avoid an error. */
22442 #ifdef __cplusplus
22443 extern "C"
22444 #endif
22445 /* We use char because int might match the return type of a gcc2
22446 builtin and then its argument prototype would still apply. */
22447 char XtAppInitialize (void);
22448 int
22449 main (void)
22450 {
22451 XtAppInitialize ();
22452 ;
22453 return 0;
22454 }
22455 _ACEOF
22456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22457 if { (eval echo "$as_me:22457: \"$ac_link\"") >&5
22458 (eval $ac_link) 2>&5
22459 ac_status=$?
22460 echo "$as_me:22460: \$? = $ac_status" >&5
22461 (exit "$ac_status"); } &&
22462 { ac_try='test -s "conftest$ac_exeext"'
22463 { (eval echo "$as_me:22463: \"$ac_try\"") >&5
22464 (eval $ac_try) 2>&5
22465 ac_status=$?
22466 echo "$as_me:22466: \$? = $ac_status" >&5
22467 (exit "$ac_status"); }; }; then
22468 ac_cv_lib_Xt_XtAppInitialize=yes
22469 else
22470 echo "$as_me: failed program was:" >&5
22471 cat "conftest.$ac_ext" >&5
22472 ac_cv_lib_Xt_XtAppInitialize=no
22473 fi
22474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22475 LIBS=$ac_check_lib_save_LIBS
22476 fi
22477 echo "$as_me:22477: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
22478 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
22479 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
22480
22481 cat >>confdefs.h <<\EOF
22482 #define HAVE_LIBXT 1
22483 EOF
22484
22485 cf_have_X_LIBS=Xt
22486 LIBS="-lXt $LIBS"
22487 fi
22488
22489 fi
22490
22491 fi
22492
22493 if test "$cf_have_X_LIBS" = no ; then
22494 { echo "$as_me:22494: WARNING: Unable to successfully link X Toolkit library (-lXt) with
22495 test program. You will have to check and add the proper libraries by hand
22496 to makefile." >&5
22497 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
22498 test program. You will have to check and add the proper libraries by hand
22499 to makefile." >&2;}
22500 fi
22501
22502 cf_x_athena_root=$cf_x_athena
22503 cf_x_athena_inc=""
22504
22505 for cf_path in default \
22506 /usr/contrib/X11R6 \
22507 /usr/contrib/X11R5 \
22508 /usr/lib/X11R5 \
22509 /usr/local
22510 do
22511 if test -z "$cf_x_athena_inc" ; then
22512
22513 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
22514 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
22515 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
22516 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22517 for cf_X_CFLAGS in $X_CFLAGS
22518 do
22519 case "x$cf_X_CFLAGS" in
22520 x-[IUD]*)
22521 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22522 ;;
22523 *)
22524 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22525 ;;
22526 esac
22527 done
22528
22529 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
22530 if test "$cf_path" != default ; then
22531
22532 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22533 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
22534
22535 echo "$as_me:22535: checking for $cf_test in $cf_path" >&5
22536 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
22537 else
22538 echo "$as_me:22538: checking for $cf_test" >&5
22539 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
22540 fi
22541 cat >"conftest.$ac_ext" <<_ACEOF
22542 #line 22542 "configure"
22543 #include "confdefs.h"
22544
22545 #include <X11/Intrinsic.h>
22546 #include <$cf_test>
22547 int
22548 main (void)
22549 {
22550
22551 ;
22552 return 0;
22553 }
22554 _ACEOF
22555 rm -f "conftest.$ac_objext"
22556 if { (eval echo "$as_me:22556: \"$ac_compile\"") >&5
22557 (eval $ac_compile) 2>&5
22558 ac_status=$?
22559 echo "$as_me:22559: \$? = $ac_status" >&5
22560 (exit "$ac_status"); } &&
22561 { ac_try='test -s "conftest.$ac_objext"'
22562 { (eval echo "$as_me:22562: \"$ac_try\"") >&5
22563 (eval $ac_try) 2>&5
22564 ac_status=$?
22565 echo "$as_me:22565: \$? = $ac_status" >&5
22566 (exit "$ac_status"); }; }; then
22567 cf_result=yes
22568 else
22569 echo "$as_me: failed program was:" >&5
22570 cat "conftest.$ac_ext" >&5
22571 cf_result=no
22572 fi
22573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22574 echo "$as_me:22574: result: $cf_result" >&5
22575 echo "${ECHO_T}$cf_result" >&6
22576
22577 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
22578 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
22579 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
22580
22581 if test "$cf_result" = yes ; then
22582 test "$cf_path" = default && cf_x_athena_inc=default
22583 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
22584 break
22585 fi
22586 fi
22587 done
22588
22589 if test -z "$cf_x_athena_inc" ; then
22590 { echo "$as_me:22590: WARNING: Unable to find Athena header files" >&5
22591 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
22592 elif test "$cf_x_athena_inc" != default ; then
22593
22594 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22595 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
22596
22597 fi
22598
22599 cf_x_athena_root=$cf_x_athena
22600 cf_x_athena_lib=""
22601
22602 for cf_path in default \
22603 /usr/contrib/X11R6 \
22604 /usr/contrib/X11R5 \
22605 /usr/lib/X11R5 \
22606 /usr/local
22607 do
22608 for cf_lib in \
22609 ${cf_x_athena_root} \
22610 ${cf_x_athena_root}7 \
22611 ${cf_x_athena_root}6
22612 do
22613 for cf_libs in \
22614 "-l$cf_lib -lXmu" \
22615 "-l$cf_lib -lXpm -lXmu" \
22616 "-l${cf_lib}_s -lXmu_s"
22617 do
22618 test -n "$cf_x_athena_lib" && break
22619
22620 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
22621 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
22622 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
22623 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22624 for cf_X_CFLAGS in $X_CFLAGS
22625 do
22626 case "x$cf_X_CFLAGS" in
22627 x-[IUD]*)
22628 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22629 ;;
22630 *)
22631 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22632 ;;
22633 esac
22634 done
22635
22636 cf_test=XawSimpleMenuAddGlobalActions
22637 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
22638
22639 cf_add_libs="$LIBS"
22640 # reverse order
22641 cf_add_0lib=
22642 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22643 # filter duplicates
22644 for cf_add_1lib in $cf_add_0lib; do
22645 for cf_add_2lib in $cf_add_libs; do
22646 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22647 cf_add_1lib=
22648 break
22649 fi
22650 done
22651 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22652 done
22653 LIBS="$cf_add_libs"
22654
22655 echo "$as_me:22655: checking for $cf_test in $cf_libs" >&5
22656 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
22657 cat >"conftest.$ac_ext" <<_ACEOF
22658 #line 22658 "configure"
22659 #include "confdefs.h"
22660
22661 $ac_includes_default
22662 #include <X11/Intrinsic.h>
22663 #include <X11/$cf_x_athena_root/SimpleMenu.h>
22664
22665 int
22666 main (void)
22667 {
22668
22669 $cf_test((XtAppContext) 0)
22670 ;
22671 return 0;
22672 }
22673 _ACEOF
22674 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22675 if { (eval echo "$as_me:22675: \"$ac_link\"") >&5
22676 (eval $ac_link) 2>&5
22677 ac_status=$?
22678 echo "$as_me:22678: \$? = $ac_status" >&5
22679 (exit "$ac_status"); } &&
22680 { ac_try='test -s "conftest$ac_exeext"'
22681 { (eval echo "$as_me:22681: \"$ac_try\"") >&5
22682 (eval $ac_try) 2>&5
22683 ac_status=$?
22684 echo "$as_me:22684: \$? = $ac_status" >&5
22685 (exit "$ac_status"); }; }; then
22686 cf_result=yes
22687 else
22688 echo "$as_me: failed program was:" >&5
22689 cat "conftest.$ac_ext" >&5
22690 cf_result=no
22691 fi
22692 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22693 echo "$as_me:22693: result: $cf_result" >&5
22694 echo "${ECHO_T}$cf_result" >&6
22695
22696 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
22697 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
22698 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
22699
22700 if test "$cf_result" = yes ; then
22701 cf_x_athena_lib="$cf_libs"
22702 break
22703 fi
22704 done # cf_libs
22705 test -n "$cf_x_athena_lib" && break
22706 done # cf_lib
22707 done
22708
22709 if test -z "$cf_x_athena_lib" ; then
22710 { { echo "$as_me:22710: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
22711 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
22712 { (exit 1); exit 1; }; }
22713 fi
22714
22715 cf_add_libs="$LIBS"
22716 # reverse order
22717 cf_add_0lib=
22718 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22719 # filter duplicates
22720 for cf_add_1lib in $cf_add_0lib; do
22721 for cf_add_2lib in $cf_add_libs; do
22722 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22723 cf_add_1lib=
22724 break
22725 fi
22726 done
22727 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22728 done
22729 LIBS="$cf_add_libs"
22730
22731 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22732
22733 cat >>confdefs.h <<EOF
22734 #define $cf_x_athena_LIBS 1
22735 EOF
22736
22737 fi
22738
22739 if test -n "$ac_tool_prefix"; then
22740 for ac_prog in xcurses-config
22741 do
22742 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22743 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22744 echo "$as_me:22744: checking for $ac_word" >&5
22745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22746 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
22747 echo $ECHO_N "(cached) $ECHO_C" >&6
22748 else
22749 if test -n "$XCURSES_CONFIG"; then
22750 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
22751 else
22752 ac_save_IFS=$IFS; IFS=$ac_path_separator
22753 ac_dummy="$PATH"
22754 for ac_dir in $ac_dummy; do
22755 IFS=$ac_save_IFS
22756 test -z "$ac_dir" && ac_dir=.
22757 $as_executable_p "$ac_dir/$ac_word" || continue
22758 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
22759 echo "$as_me:22759: found $ac_dir/$ac_word" >&5
22760 break
22761 done
22762
22763 fi
22764 fi
22765 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
22766 if test -n "$XCURSES_CONFIG"; then
22767 echo "$as_me:22767: result: $XCURSES_CONFIG" >&5
22768 echo "${ECHO_T}$XCURSES_CONFIG" >&6
22769 else
22770 echo "$as_me:22770: result: no" >&5
22771 echo "${ECHO_T}no" >&6
22772 fi
22773
22774 test -n "$XCURSES_CONFIG" && break
22775 done
22776 fi
22777 if test -z "$XCURSES_CONFIG"; then
22778 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
22779 for ac_prog in xcurses-config
22780 do
22781 # Extract the first word of "$ac_prog", so it can be a program name with args.
22782 set dummy $ac_prog; ac_word=$2
22783 echo "$as_me:22783: checking for $ac_word" >&5
22784 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22785 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
22786 echo $ECHO_N "(cached) $ECHO_C" >&6
22787 else
22788 if test -n "$ac_ct_XCURSES_CONFIG"; then
22789 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
22790 else
22791 ac_save_IFS=$IFS; IFS=$ac_path_separator
22792 ac_dummy="$PATH"
22793 for ac_dir in $ac_dummy; do
22794 IFS=$ac_save_IFS
22795 test -z "$ac_dir" && ac_dir=.
22796 $as_executable_p "$ac_dir/$ac_word" || continue
22797 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
22798 echo "$as_me:22798: found $ac_dir/$ac_word" >&5
22799 break
22800 done
22801
22802 fi
22803 fi
22804 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
22805 if test -n "$ac_ct_XCURSES_CONFIG"; then
22806 echo "$as_me:22806: result: $ac_ct_XCURSES_CONFIG" >&5
22807 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
22808 else
22809 echo "$as_me:22809: result: no" >&5
22810 echo "${ECHO_T}no" >&6
22811 fi
22812
22813 test -n "$ac_ct_XCURSES_CONFIG" && break
22814 done
22815 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
22816
22817 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
22818 fi
22819
22820 if test "$XCURSES_CONFIG" != none ; then
22821
22822 cf_fix_cppflags=no
22823 cf_new_cflags=
22824 cf_new_cppflags=
22825 cf_new_extra_cppflags=
22826
22827 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
22828 do
22829 case "$cf_fix_cppflags" in
22830 (no)
22831 case "$cf_add_cflags" in
22832 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22833 case "$cf_add_cflags" in
22834 (-D*)
22835 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22836
22837 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22838 && test -z "${cf_tst_cflags}" \
22839 && cf_fix_cppflags=yes
22840
22841 if test "$cf_fix_cppflags" = yes ; then
22842
22843 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22844 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22845
22846 continue
22847 elif test "${cf_tst_cflags}" = "\"'" ; then
22848
22849 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22850 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22851
22852 continue
22853 fi
22854 ;;
22855 esac
22856 case "$CPPFLAGS" in
22857 (*$cf_add_cflags)
22858 ;;
22859 (*)
22860 case "$cf_add_cflags" in
22861 (-D*)
22862 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22863
22864 CPPFLAGS=`echo "$CPPFLAGS" | \
22865 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22866 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22867
22868 ;;
22869 esac
22870
22871 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22872 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22873
22874 ;;
22875 esac
22876 ;;
22877 (*)
22878
22879 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22880 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22881
22882 ;;
22883 esac
22884 ;;
22885 (yes)
22886
22887 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22888 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22889
22890 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22891
22892 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22893 && test -z "${cf_tst_cflags}" \
22894 && cf_fix_cppflags=no
22895 ;;
22896 esac
22897 done
22898
22899 if test -n "$cf_new_cflags" ; then
22900
22901 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22902 CFLAGS="${CFLAGS}$cf_new_cflags"
22903
22904 fi
22905
22906 if test -n "$cf_new_cppflags" ; then
22907
22908 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22909 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22910
22911 fi
22912
22913 if test -n "$cf_new_extra_cppflags" ; then
22914
22915 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22916 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22917
22918 fi
22919
22920 cf_add_libs="$LIBS"
22921 # reverse order
22922 cf_add_0lib=
22923 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22924 # filter duplicates
22925 for cf_add_1lib in $cf_add_0lib; do
22926 for cf_add_2lib in $cf_add_libs; do
22927 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22928 cf_add_1lib=
22929 break
22930 fi
22931 done
22932 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22933 done
22934 LIBS="$cf_add_libs"
22935
22936 cf_cv_lib_XCurses=yes
22937
22938 else
22939
22940 LDFLAGS="$LDFLAGS $X_LIBS"
22941
22942 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
22943
22944 echo "${as_me:-configure}:22944: testing checking additions to CFLAGS ..." 1>&5
22945
22946 cf_check_cflags="$CFLAGS"
22947 cf_check_cppflags="$CPPFLAGS"
22948
22949 cf_fix_cppflags=no
22950 cf_new_cflags=
22951 cf_new_cppflags=
22952 cf_new_extra_cppflags=
22953
22954 for cf_add_cflags in $X_CFLAGS
22955 do
22956 case "$cf_fix_cppflags" in
22957 (no)
22958 case "$cf_add_cflags" in
22959 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22960 case "$cf_add_cflags" in
22961 (-D*)
22962 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22963
22964 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22965 && test -z "${cf_tst_cflags}" \
22966 && cf_fix_cppflags=yes
22967
22968 if test "$cf_fix_cppflags" = yes ; then
22969
22970 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22971 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22972
22973 continue
22974 elif test "${cf_tst_cflags}" = "\"'" ; then
22975
22976 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22977 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22978
22979 continue
22980 fi
22981 ;;
22982 esac
22983 case "$CPPFLAGS" in
22984 (*$cf_add_cflags)
22985 ;;
22986 (*)
22987 case "$cf_add_cflags" in
22988 (-D*)
22989 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22990
22991 CPPFLAGS=`echo "$CPPFLAGS" | \
22992 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22993 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22994
22995 ;;
22996 esac
22997
22998 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22999 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23000
23001 ;;
23002 esac
23003 ;;
23004 (*)
23005
23006 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23007 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23008
23009 ;;
23010 esac
23011 ;;
23012 (yes)
23013
23014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23016
23017 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23018
23019 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23020 && test -z "${cf_tst_cflags}" \
23021 && cf_fix_cppflags=no
23022 ;;
23023 esac
23024 done
23025
23026 if test -n "$cf_new_cflags" ; then
23027 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
23028
23029 echo "${as_me:-configure}:23029: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
23030
23031 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23032 CFLAGS="${CFLAGS}$cf_new_cflags"
23033
23034 fi
23035
23036 if test -n "$cf_new_cppflags" ; then
23037 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
23038
23039 echo "${as_me:-configure}:23039: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
23040
23041 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23042 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23043
23044 fi
23045
23046 if test -n "$cf_new_extra_cppflags" ; then
23047 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
23048
23049 echo "${as_me:-configure}:23049: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
23050
23051 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23052 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23053
23054 fi
23055
23056 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
23057 cat >"conftest.$ac_ext" <<_ACEOF
23058 #line 23058 "configure"
23059 #include "confdefs.h"
23060 #include <stdio.h>
23061 int
23062 main (void)
23063 {
23064 printf("Hello world");
23065 ;
23066 return 0;
23067 }
23068 _ACEOF
23069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23070 if { (eval echo "$as_me:23070: \"$ac_link\"") >&5
23071 (eval $ac_link) 2>&5
23072 ac_status=$?
23073 echo "$as_me:23073: \$? = $ac_status" >&5
23074 (exit "$ac_status"); } &&
23075 { ac_try='test -s "conftest$ac_exeext"'
23076 { (eval echo "$as_me:23076: \"$ac_try\"") >&5
23077 (eval $ac_try) 2>&5
23078 ac_status=$?
23079 echo "$as_me:23079: \$? = $ac_status" >&5
23080 (exit "$ac_status"); }; }; then
23081 :
23082 else
23083 echo "$as_me: failed program was:" >&5
23084 cat "conftest.$ac_ext" >&5
23085 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
23086
23087 echo "${as_me:-configure}:23087: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
23088
23089 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
23090 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
23091
23092 echo "${as_me:-configure}:23092: testing but keeping change to \$CPPFLAGS ..." 1>&5
23093
23094 fi
23095 CFLAGS="$cf_check_cflags"
23096 fi
23097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23098 fi
23099
23100 echo "$as_me:23100: checking for XOpenDisplay in -lX11" >&5
23101 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
23102 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
23103 echo $ECHO_N "(cached) $ECHO_C" >&6
23104 else
23105 ac_check_lib_save_LIBS=$LIBS
23106 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
23107 cat >"conftest.$ac_ext" <<_ACEOF
23108 #line 23108 "configure"
23109 #include "confdefs.h"
23110
23111 /* Override any gcc2 internal prototype to avoid an error. */
23112 #ifdef __cplusplus
23113 extern "C"
23114 #endif
23115 /* We use char because int might match the return type of a gcc2
23116 builtin and then its argument prototype would still apply. */
23117 char XOpenDisplay (void);
23118 int
23119 main (void)
23120 {
23121 XOpenDisplay ();
23122 ;
23123 return 0;
23124 }
23125 _ACEOF
23126 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23127 if { (eval echo "$as_me:23127: \"$ac_link\"") >&5
23128 (eval $ac_link) 2>&5
23129 ac_status=$?
23130 echo "$as_me:23130: \$? = $ac_status" >&5
23131 (exit "$ac_status"); } &&
23132 { ac_try='test -s "conftest$ac_exeext"'
23133 { (eval echo "$as_me:23133: \"$ac_try\"") >&5
23134 (eval $ac_try) 2>&5
23135 ac_status=$?
23136 echo "$as_me:23136: \$? = $ac_status" >&5
23137 (exit "$ac_status"); }; }; then
23138 ac_cv_lib_X11_XOpenDisplay=yes
23139 else
23140 echo "$as_me: failed program was:" >&5
23141 cat "conftest.$ac_ext" >&5
23142 ac_cv_lib_X11_XOpenDisplay=no
23143 fi
23144 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23145 LIBS=$ac_check_lib_save_LIBS
23146 fi
23147 echo "$as_me:23147: result: $ac_cv_lib_X11_XOpenDisplay" >&5
23148 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
23149 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
23150
23151 cf_add_libs="$LIBS"
23152 # reverse order
23153 cf_add_0lib=
23154 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23155 # filter duplicates
23156 for cf_add_1lib in $cf_add_0lib; do
23157 for cf_add_2lib in $cf_add_libs; do
23158 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23159 cf_add_1lib=
23160 break
23161 fi
23162 done
23163 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23164 done
23165 LIBS="$cf_add_libs"
23166
23167 fi
23168
23169 echo "$as_me:23169: checking for XCurses library" >&5
23170 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
23171 if test "${cf_cv_lib_XCurses+set}" = set; then
23172 echo $ECHO_N "(cached) $ECHO_C" >&6
23173 else
23174
23175 cf_add_libs="$LIBS"
23176 # reverse order
23177 cf_add_0lib=
23178 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23179 # filter duplicates
23180 for cf_add_1lib in $cf_add_0lib; do
23181 for cf_add_2lib in $cf_add_libs; do
23182 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23183 cf_add_1lib=
23184 break
23185 fi
23186 done
23187 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23188 done
23189 LIBS="$cf_add_libs"
23190
23191 cat >"conftest.$ac_ext" <<_ACEOF
23192 #line 23192 "configure"
23193 #include "confdefs.h"
23194
23195 #include <xcurses.h>
23196 char *XCursesProgramName = "test";
23197
23198 int
23199 main (void)
23200 {
23201 XCursesExit();
23202 ;
23203 return 0;
23204 }
23205 _ACEOF
23206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23207 if { (eval echo "$as_me:23207: \"$ac_link\"") >&5
23208 (eval $ac_link) 2>&5
23209 ac_status=$?
23210 echo "$as_me:23210: \$? = $ac_status" >&5
23211 (exit "$ac_status"); } &&
23212 { ac_try='test -s "conftest$ac_exeext"'
23213 { (eval echo "$as_me:23213: \"$ac_try\"") >&5
23214 (eval $ac_try) 2>&5
23215 ac_status=$?
23216 echo "$as_me:23216: \$? = $ac_status" >&5
23217 (exit "$ac_status"); }; }; then
23218 cf_cv_lib_XCurses=yes
23219 else
23220 echo "$as_me: failed program was:" >&5
23221 cat "conftest.$ac_ext" >&5
23222 cf_cv_lib_XCurses=no
23223 fi
23224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23225
23226 fi
23227 echo "$as_me:23227: result: $cf_cv_lib_XCurses" >&5
23228 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
23229
23230 fi
23231
23232 if test "$cf_cv_lib_XCurses" = yes ; then
23233
23234 cat >>confdefs.h <<\EOF
23235 #define UNIX 1
23236 EOF
23237
23238 cat >>confdefs.h <<\EOF
23239 #define XCURSES 1
23240 EOF
23241
23242 echo "$as_me:23242: checking for xcurses.h" >&5
23243 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
23244 if test "${ac_cv_header_xcurses_h+set}" = set; then
23245 echo $ECHO_N "(cached) $ECHO_C" >&6
23246 else
23247 cat >"conftest.$ac_ext" <<_ACEOF
23248 #line 23248 "configure"
23249 #include "confdefs.h"
23250 #include <xcurses.h>
23251 _ACEOF
23252 if { (eval echo "$as_me:23252: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23253 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23254 ac_status=$?
23255 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23256 rm -f conftest.er1
23257 cat conftest.err >&5
23258 echo "$as_me:23258: \$? = $ac_status" >&5
23259 (exit "$ac_status"); } >/dev/null; then
23260 if test -s conftest.err; then
23261 ac_cpp_err=$ac_c_preproc_warn_flag
23262 else
23263 ac_cpp_err=
23264 fi
23265 else
23266 ac_cpp_err=yes
23267 fi
23268 if test -z "$ac_cpp_err"; then
23269 ac_cv_header_xcurses_h=yes
23270 else
23271 echo "$as_me: failed program was:" >&5
23272 cat "conftest.$ac_ext" >&5
23273 ac_cv_header_xcurses_h=no
23274 fi
23275 rm -f conftest.err "conftest.$ac_ext"
23276 fi
23277 echo "$as_me:23277: result: $ac_cv_header_xcurses_h" >&5
23278 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
23279 if test "$ac_cv_header_xcurses_h" = yes; then
23280
23281 cat >>confdefs.h <<\EOF
23282 #define HAVE_XCURSES 1
23283 EOF
23284
23285 fi
23286
23287 else
23288 { { echo "$as_me:23288: error: Cannot link with XCurses" >&5
23289 echo "$as_me: error: Cannot link with XCurses" >&2;}
23290 { (exit 1); exit 1; }; }
23291 fi
23292
23293 ;;
23294 (*)
23295 { { echo "$as_me:23295: error: unexpected screen-value: $cf_cv_screen" >&5
23296 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
23297 { (exit 1); exit 1; }; }
23298 ;;
23299 esac
23300
23301 echo "$as_me:23301: checking for _nc_init_pthreads" >&5
23302 echo $ECHO_N "checking for _nc_init_pthreads... $ECHO_C" >&6
23303 if test "${ac_cv_func__nc_init_pthreads+set}" = set; then
23304 echo $ECHO_N "(cached) $ECHO_C" >&6
23305 else
23306 cat >"conftest.$ac_ext" <<_ACEOF
23307 #line 23307 "configure"
23308 #include "confdefs.h"
23309 #define _nc_init_pthreads autoconf_temporary
23310 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23311 #undef _nc_init_pthreads
23312
23313 #ifdef __cplusplus
23314 extern "C"
23315 #endif
23316
23317 /* We use char because int might match the return type of a gcc2
23318 builtin and then its argument prototype would still apply. */
23319 char _nc_init_pthreads (void);
23320
23321 int
23322 main (void)
23323 {
23324
23325 /* The GNU C library defines stubs for functions which it implements
23326 to always fail with ENOSYS. Some functions are actually named
23327 something starting with __ and the normal name is an alias. */
23328 #if defined (__stub__nc_init_pthreads) || defined (__stub____nc_init_pthreads)
23329 #error found stub for _nc_init_pthreads
23330 #endif
23331
23332 return _nc_init_pthreads ();
23333 ;
23334 return 0;
23335 }
23336 _ACEOF
23337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23338 if { (eval echo "$as_me:23338: \"$ac_link\"") >&5
23339 (eval $ac_link) 2>&5
23340 ac_status=$?
23341 echo "$as_me:23341: \$? = $ac_status" >&5
23342 (exit "$ac_status"); } &&
23343 { ac_try='test -s "conftest$ac_exeext"'
23344 { (eval echo "$as_me:23344: \"$ac_try\"") >&5
23345 (eval $ac_try) 2>&5
23346 ac_status=$?
23347 echo "$as_me:23347: \$? = $ac_status" >&5
23348 (exit "$ac_status"); }; }; then
23349 ac_cv_func__nc_init_pthreads=yes
23350 else
23351 echo "$as_me: failed program was:" >&5
23352 cat "conftest.$ac_ext" >&5
23353 ac_cv_func__nc_init_pthreads=no
23354 fi
23355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23356 fi
23357 echo "$as_me:23357: result: $ac_cv_func__nc_init_pthreads" >&5
23358 echo "${ECHO_T}$ac_cv_func__nc_init_pthreads" >&6
23359 if test "$ac_cv_func__nc_init_pthreads" = yes; then
23360 cf_cv_ncurses_pthreads=yes
23361 else
23362 cf_cv_ncurses_pthreads=no
23363 fi
23364
23365 if test "$cf_cv_ncurses_pthreads" = yes
23366 then
23367
23368 cf_add_libs="$LIBS"
23369 # reverse order
23370 cf_add_0lib=
23371 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23372 # filter duplicates
23373 for cf_add_1lib in $cf_add_0lib; do
23374 for cf_add_2lib in $cf_add_libs; do
23375 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23376 cf_add_1lib=
23377 break
23378 fi
23379 done
23380 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23381 done
23382 LIBS="$cf_add_libs"
23383
23384 fi
23385
23386 echo "$as_me:23386: checking if curses supports wide characters" >&5
23387 echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
23388 if test "${cf_cv_widec_curses+set}" = set; then
23389 echo $ECHO_N "(cached) $ECHO_C" >&6
23390 else
23391
23392 cat >"conftest.$ac_ext" <<_ACEOF
23393 #line 23393 "configure"
23394 #include "confdefs.h"
23395
23396 #include <stdlib.h>
23397 #include <${cf_cv_ncurses_header:-curses.h}>
23398 int
23399 main (void)
23400 {
23401
23402 wchar_t temp[2];
23403 wchar_t wch = 'A';
23404 temp[0] = wch;
23405 waddnwstr(stdscr, temp, 1);
23406
23407 ;
23408 return 0;
23409 }
23410 _ACEOF
23411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23412 if { (eval echo "$as_me:23412: \"$ac_link\"") >&5
23413 (eval $ac_link) 2>&5
23414 ac_status=$?
23415 echo "$as_me:23415: \$? = $ac_status" >&5
23416 (exit "$ac_status"); } &&
23417 { ac_try='test -s "conftest$ac_exeext"'
23418 { (eval echo "$as_me:23418: \"$ac_try\"") >&5
23419 (eval $ac_try) 2>&5
23420 ac_status=$?
23421 echo "$as_me:23421: \$? = $ac_status" >&5
23422 (exit "$ac_status"); }; }; then
23423 cf_cv_widec_curses=yes
23424 else
23425 echo "$as_me: failed program was:" >&5
23426 cat "conftest.$ac_ext" >&5
23427 cf_cv_widec_curses=no
23428 fi
23429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23430
23431 fi
23432 echo "$as_me:23432: result: $cf_cv_widec_curses" >&5
23433 echo "${ECHO_T}$cf_cv_widec_curses" >&6
23434
23435 if test "$cf_cv_widec_curses" = yes ; then
23436
23437 cat >>confdefs.h <<\EOF
23438 #define WIDEC_CURSES 1
23439 EOF
23440
23441 # This is needed on Tru64 5.0 to declare mbstate_t
23442 echo "$as_me:23442: checking if we must include wchar.h to declare mbstate_t" >&5
23443 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
23444 if test "${cf_cv_widec_mbstate+set}" = set; then
23445 echo $ECHO_N "(cached) $ECHO_C" >&6
23446 else
23447
23448 cat >"conftest.$ac_ext" <<_ACEOF
23449 #line 23449 "configure"
23450 #include "confdefs.h"
23451
23452 #include <stdlib.h>
23453 #include <${cf_cv_ncurses_header:-curses.h}>
23454 int
23455 main (void)
23456 {
23457 mbstate_t state; (void)state
23458 ;
23459 return 0;
23460 }
23461 _ACEOF
23462 rm -f "conftest.$ac_objext"
23463 if { (eval echo "$as_me:23463: \"$ac_compile\"") >&5
23464 (eval $ac_compile) 2>&5
23465 ac_status=$?
23466 echo "$as_me:23466: \$? = $ac_status" >&5
23467 (exit "$ac_status"); } &&
23468 { ac_try='test -s "conftest.$ac_objext"'
23469 { (eval echo "$as_me:23469: \"$ac_try\"") >&5
23470 (eval $ac_try) 2>&5
23471 ac_status=$?
23472 echo "$as_me:23472: \$? = $ac_status" >&5
23473 (exit "$ac_status"); }; }; then
23474 cf_cv_widec_mbstate=no
23475 else
23476 echo "$as_me: failed program was:" >&5
23477 cat "conftest.$ac_ext" >&5
23478 cat >"conftest.$ac_ext" <<_ACEOF
23479 #line 23479 "configure"
23480 #include "confdefs.h"
23481
23482 #include <stdlib.h>
23483 #include <wchar.h>
23484 #include <${cf_cv_ncurses_header:-curses.h}>
23485 int
23486 main (void)
23487 {
23488 mbstate_t state; (void)state
23489 ;
23490 return 0;
23491 }
23492 _ACEOF
23493 rm -f "conftest.$ac_objext"
23494 if { (eval echo "$as_me:23494: \"$ac_compile\"") >&5
23495 (eval $ac_compile) 2>&5
23496 ac_status=$?
23497 echo "$as_me:23497: \$? = $ac_status" >&5
23498 (exit "$ac_status"); } &&
23499 { ac_try='test -s "conftest.$ac_objext"'
23500 { (eval echo "$as_me:23500: \"$ac_try\"") >&5
23501 (eval $ac_try) 2>&5
23502 ac_status=$?
23503 echo "$as_me:23503: \$? = $ac_status" >&5
23504 (exit "$ac_status"); }; }; then
23505 cf_cv_widec_mbstate=yes
23506 else
23507 echo "$as_me: failed program was:" >&5
23508 cat "conftest.$ac_ext" >&5
23509 cf_cv_widec_mbstate=unknown
23510 fi
23511 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23512 fi
23513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23514 fi
23515 echo "$as_me:23515: result: $cf_cv_widec_mbstate" >&5
23516 echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
23517
23518 if test "$cf_cv_widec_mbstate" = yes ; then
23519
23520 cat >>confdefs.h <<\EOF
23521 #define NEED_WCHAR_H 1
23522 EOF
23523
23524 fi
23525
23526 if test "$cf_cv_widec_mbstate" != unknown ; then
23527
23528 cat >>confdefs.h <<\EOF
23529 #define HAVE_MBSTATE_T 1
23530 EOF
23531
23532 fi
23533
23534 fi
23535
23536 cf_all_widgets=yes
23537
23538 echo "$as_me:23538: checking if you want extra dialogs" >&5
23539 echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
23540
23541 # Check whether --enable-extras or --disable-extras was given.
23542 if test "${enable_extras+set}" = set; then
23543 enableval="$enable_extras"
23544
23545 else
23546 enableval=yes
23547 fi;
23548 echo "$as_me:23548: result: $enableval" >&5
23549 echo "${ECHO_T}$enableval" >&6
23550 if test "$enableval" != no ; then
23551 cf_all_widgets=yes
23552 else
23553 cf_all_widgets=no
23554 fi
23555
23556 cf_use_dialogrc=yes
23557
23558 echo "$as_me:23558: checking if you want config-file support" >&5
23559 echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
23560
23561 # Check whether --enable-rc-file or --disable-rc-file was given.
23562 if test "${enable_rc_file+set}" = set; then
23563 enableval="$enable_rc_file"
23564
23565 else
23566 enableval=$cf_all_widgets
23567 fi;
23568 echo "$as_me:23568: result: $enableval" >&5
23569 echo "${ECHO_T}$enableval" >&6
23570 if test "$enableval" != no ; then
23571 EXTRAOBJS="$EXTRAOBJS rc\$o"
23572
23573 cat >>confdefs.h <<\EOF
23574 #define HAVE_RC_FILE 1
23575 EOF
23576
23577 else
23578 cf_use_dialogrc=no
23579 fi
23580
23581 cf_use_dialogrc2=yes
23582 if test "$cf_use_dialogrc" = yes; then
23583
23584 echo "$as_me:23584: checking if you want extra attributes in config-file" >&5
23585 echo $ECHO_N "checking if you want extra attributes in config-file... $ECHO_C" >&6
23586
23587 # Check whether --enable-rc-file2 or --disable-rc-file2 was given.
23588 if test "${enable_rc_file2+set}" = set; then
23589 enableval="$enable_rc_file2"
23590
23591 else
23592 enableval=$cf_all_widgets
23593 fi;
23594 echo "$as_me:23594: result: $enableval" >&5
23595 echo "${ECHO_T}$enableval" >&6
23596 if test "$enableval" != no ; then
23597
23598 cat >>confdefs.h <<\EOF
23599 #define HAVE_RC_FILE2 1
23600 EOF
23601
23602 else
23603 cf_use_dialogrc2=no
23604 fi
23605
23606 fi
23607
23608 echo "$as_me:23608: checking if you want Xdialog-style dialogs" >&5
23609 echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
23610
23611 # Check whether --enable-Xdialog or --disable-Xdialog was given.
23612 if test "${enable_Xdialog+set}" = set; then
23613 enableval="$enable_Xdialog"
23614
23615 else
23616 enableval=$cf_all_widgets
23617 fi;
23618 echo "$as_me:23618: result: $enableval" >&5
23619 echo "${ECHO_T}$enableval" >&6
23620 if test "$enableval" != no ; then
23621 EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
23622
23623 cat >>confdefs.h <<\EOF
23624 #define HAVE_XDIALOG 1
23625 EOF
23626
23627 else
23628 :
23629 fi
23630
23631 echo "$as_me:23631: checking if you want extra Xdialog-style dialogs (1.2)" >&5
23632 echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
23633
23634 # Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
23635 if test "${enable_Xdialog2+set}" = set; then
23636 enableval="$enable_Xdialog2"
23637
23638 else
23639 enableval=$cf_all_widgets
23640 fi;
23641 echo "$as_me:23641: result: $enableval" >&5
23642 echo "${ECHO_T}$enableval" >&6
23643 if test "$enableval" != no ; then
23644 EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
23645
23646 cat >>confdefs.h <<\EOF
23647 #define HAVE_XDIALOG2 1
23648 EOF
23649
23650 else
23651 :
23652 fi
23653
23654 echo "$as_me:23654: checking if you want compatibility with whiptail options" >&5
23655 echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
23656
23657 # Check whether --enable-whiptail or --disable-whiptail was given.
23658 if test "${enable_whiptail+set}" = set; then
23659 enableval="$enable_whiptail"
23660
23661 else
23662 enableval=$cf_all_widgets
23663 fi;
23664 echo "$as_me:23664: result: $enableval" >&5
23665 echo "${ECHO_T}$enableval" >&6
23666 if test "$enableval" != no ; then
23667
23668 cat >>confdefs.h <<\EOF
23669 #define HAVE_WHIPTAIL 1
23670 EOF
23671
23672 else
23673 :
23674 fi
23675
23676 echo "$as_me:23676: checking if you want the form dialog" >&5
23677 echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
23678
23679 # Check whether --enable-form or --disable-form was given.
23680 if test "${enable_form+set}" = set; then
23681 enableval="$enable_form"
23682
23683 else
23684 enableval=$cf_all_widgets
23685 fi;
23686 echo "$as_me:23686: result: $enableval" >&5
23687 echo "${ECHO_T}$enableval" >&6
23688 if test "$enableval" != no ; then
23689 EXTRAOBJS="$EXTRAOBJS formbox\$o"
23690
23691 cat >>confdefs.h <<\EOF
23692 #define HAVE_DLG_FORMBOX 1
23693 EOF
23694
23695 else
23696 :
23697 fi
23698
23699 echo "$as_me:23699: checking if you want the gauge dialog" >&5
23700 echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
23701
23702 # Check whether --enable-gauge or --disable-gauge was given.
23703 if test "${enable_gauge+set}" = set; then
23704 enableval="$enable_gauge"
23705
23706 else
23707 enableval=$cf_all_widgets
23708 fi;
23709 echo "$as_me:23709: result: $enableval" >&5
23710 echo "${ECHO_T}$enableval" >&6
23711 if test "$enableval" != no ; then
23712 EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
23713
23714 cat >>confdefs.h <<\EOF
23715 #define HAVE_DLG_GAUGE 1
23716 EOF
23717
23718 else
23719 :
23720 fi
23721
23722 echo "$as_me:23722: checking if you want the tailbox dialog" >&5
23723 echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
23724
23725 # Check whether --enable-tailbox or --disable-tailbox was given.
23726 if test "${enable_tailbox+set}" = set; then
23727 enableval="$enable_tailbox"
23728
23729 else
23730 enableval=$cf_all_widgets
23731 fi;
23732 echo "$as_me:23732: result: $enableval" >&5
23733 echo "${ECHO_T}$enableval" >&6
23734 if test "$enableval" != no ; then
23735 EXTRAOBJS="$EXTRAOBJS tailbox\$o"
23736
23737 cat >>confdefs.h <<\EOF
23738 #define HAVE_DLG_TAILBOX 1
23739 EOF
23740
23741 else
23742 :
23743 fi
23744
23745 echo "$as_me:23745: checking if you want the mixedform dialog" >&5
23746 echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
23747
23748 # Check whether --enable-mixedform or --disable-mixedform was given.
23749 if test "${enable_mixedform+set}" = set; then
23750 enableval="$enable_mixedform"
23751
23752 else
23753 enableval=${enable_form:=$cf_all_widgets}
23754 fi;
23755 echo "$as_me:23755: result: $enableval" >&5
23756 echo "${ECHO_T}$enableval" >&6
23757 if test "$enableval" != no ; then
23758 EXTRAOBJS="$EXTRAOBJS mixedform\$o"
23759
23760 cat >>confdefs.h <<\EOF
23761 #define HAVE_DLG_MIXEDFORM 1
23762 EOF
23763
23764 else
23765 :
23766 fi
23767
23768 echo "$as_me:23768: checking if you want the mixedgauge dialog" >&5
23769 echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
23770
23771 # Check whether --enable-mixedgauge or --disable-mixedgauge was given.
23772 if test "${enable_mixedgauge+set}" = set; then
23773 enableval="$enable_mixedgauge"
23774
23775 else
23776 enableval=$cf_all_widgets
23777 fi;
23778 echo "$as_me:23778: result: $enableval" >&5
23779 echo "${ECHO_T}$enableval" >&6
23780 if test "$enableval" != no ; then
23781 EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
23782
23783 cat >>confdefs.h <<\EOF
23784 #define HAVE_MIXEDGAUGE 1
23785 EOF
23786
23787 else
23788 :
23789 fi
23790
23791 echo "$as_me:23791: checking if you want the wide-curses features" >&5
23792 echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
23793
23794 # Check whether --enable-widec or --disable-widec was given.
23795 if test "${enable_widec+set}" = set; then
23796 enableval="$enable_widec"
23797
23798 else
23799 enableval=$cf_cv_widec_curses
23800 fi;
23801 echo "$as_me:23801: result: $enableval" >&5
23802 echo "${ECHO_T}$enableval" >&6
23803 if test "$enableval" != no ; then
23804
23805 cat >>confdefs.h <<\EOF
23806 #define USE_WIDE_CURSES 1
23807 EOF
23808
23809 else
23810 :
23811 fi
23812
23813 echo "$as_me:23813: checking for ANSI C header files" >&5
23814 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
23815 if test "${ac_cv_header_stdc+set}" = set; then
23816 echo $ECHO_N "(cached) $ECHO_C" >&6
23817 else
23818 cat >"conftest.$ac_ext" <<_ACEOF
23819 #line 23819 "configure"
23820 #include "confdefs.h"
23821 #include <stdlib.h>
23822 #include <stdarg.h>
23823 #include <string.h>
23824 #include <float.h>
23825
23826 _ACEOF
23827 if { (eval echo "$as_me:23827: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23828 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23829 ac_status=$?
23830 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23831 rm -f conftest.er1
23832 cat conftest.err >&5
23833 echo "$as_me:23833: \$? = $ac_status" >&5
23834 (exit "$ac_status"); } >/dev/null; then
23835 if test -s conftest.err; then
23836 ac_cpp_err=$ac_c_preproc_warn_flag
23837 else
23838 ac_cpp_err=
23839 fi
23840 else
23841 ac_cpp_err=yes
23842 fi
23843 if test -z "$ac_cpp_err"; then
23844 ac_cv_header_stdc=yes
23845 else
23846 echo "$as_me: failed program was:" >&5
23847 cat "conftest.$ac_ext" >&5
23848 ac_cv_header_stdc=no
23849 fi
23850 rm -f conftest.err "conftest.$ac_ext"
23851
23852 if test $ac_cv_header_stdc = yes; then
23853 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
23854 cat >"conftest.$ac_ext" <<_ACEOF
23855 #line 23855 "configure"
23856 #include "confdefs.h"
23857 #include <string.h>
23858
23859 _ACEOF
23860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23861 $EGREP "memchr" >/dev/null 2>&1; then
23862 :
23863 else
23864 ac_cv_header_stdc=no
23865 fi
23866 rm -rf conftest*
23867
23868 fi
23869
23870 if test $ac_cv_header_stdc = yes; then
23871 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
23872 cat >"conftest.$ac_ext" <<_ACEOF
23873 #line 23873 "configure"
23874 #include "confdefs.h"
23875 #include <stdlib.h>
23876
23877 _ACEOF
23878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23879 $EGREP "free" >/dev/null 2>&1; then
23880 :
23881 else
23882 ac_cv_header_stdc=no
23883 fi
23884 rm -rf conftest*
23885
23886 fi
23887
23888 if test $ac_cv_header_stdc = yes; then
23889 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
23890 if test "$cross_compiling" = yes; then
23891 :
23892 else
23893 cat >"conftest.$ac_ext" <<_ACEOF
23894 #line 23894 "configure"
23895 #include "confdefs.h"
23896 #include <ctype.h>
23897 #if ((' ' & 0x0FF) == 0x020)
23898 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
23899 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
23900 #else
23901 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
23902 || ('j' <= (c) && (c) <= 'r') \
23903 || ('s' <= (c) && (c) <= 'z'))
23904 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
23905 #endif
23906
23907 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
23908 int
23909 main (void)
23910 {
23911 int i;
23912 for (i = 0; i < 256; i++)
23913 if (XOR (islower (i), ISLOWER (i))
23914 || toupper (i) != TOUPPER (i))
23915 $ac_main_return(2);
23916 $ac_main_return (0);
23917 }
23918 _ACEOF
23919 rm -f "conftest$ac_exeext"
23920 if { (eval echo "$as_me:23920: \"$ac_link\"") >&5
23921 (eval $ac_link) 2>&5
23922 ac_status=$?
23923 echo "$as_me:23923: \$? = $ac_status" >&5
23924 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23925 { (eval echo "$as_me:23925: \"$ac_try\"") >&5
23926 (eval $ac_try) 2>&5
23927 ac_status=$?
23928 echo "$as_me:23928: \$? = $ac_status" >&5
23929 (exit "$ac_status"); }; }; then
23930 :
23931 else
23932 echo "$as_me: program exited with status $ac_status" >&5
23933 echo "$as_me: failed program was:" >&5
23934 cat "conftest.$ac_ext" >&5
23935 ac_cv_header_stdc=no
23936 fi
23937 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23938 fi
23939 fi
23940 fi
23941 echo "$as_me:23941: result: $ac_cv_header_stdc" >&5
23942 echo "${ECHO_T}$ac_cv_header_stdc" >&6
23943 if test $ac_cv_header_stdc = yes; then
23944
23945 cat >>confdefs.h <<\EOF
23946 #define STDC_HEADERS 1
23947 EOF
23948
23949 fi
23950
23951 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
23952
23953 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
23954 inttypes.h stdint.h unistd.h
23955 do
23956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23957 echo "$as_me:23957: checking for $ac_header" >&5
23958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23960 echo $ECHO_N "(cached) $ECHO_C" >&6
23961 else
23962 cat >"conftest.$ac_ext" <<_ACEOF
23963 #line 23963 "configure"
23964 #include "confdefs.h"
23965 $ac_includes_default
23966 #include <$ac_header>
23967 _ACEOF
23968 rm -f "conftest.$ac_objext"
23969 if { (eval echo "$as_me:23969: \"$ac_compile\"") >&5
23970 (eval $ac_compile) 2>&5
23971 ac_status=$?
23972 echo "$as_me:23972: \$? = $ac_status" >&5
23973 (exit "$ac_status"); } &&
23974 { ac_try='test -s "conftest.$ac_objext"'
23975 { (eval echo "$as_me:23975: \"$ac_try\"") >&5
23976 (eval $ac_try) 2>&5
23977 ac_status=$?
23978 echo "$as_me:23978: \$? = $ac_status" >&5
23979 (exit "$ac_status"); }; }; then
23980 eval "$as_ac_Header=yes"
23981 else
23982 echo "$as_me: failed program was:" >&5
23983 cat "conftest.$ac_ext" >&5
23984 eval "$as_ac_Header=no"
23985 fi
23986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23987 fi
23988 echo "$as_me:23988: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23989 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23990 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23991 cat >>confdefs.h <<EOF
23992 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23993 EOF
23994
23995 fi
23996 done
23997
23998 echo "$as_me:23998: checking whether exit is declared" >&5
23999 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
24000 if test "${ac_cv_have_decl_exit+set}" = set; then
24001 echo $ECHO_N "(cached) $ECHO_C" >&6
24002 else
24003 cat >"conftest.$ac_ext" <<_ACEOF
24004 #line 24004 "configure"
24005 #include "confdefs.h"
24006 $ac_includes_default
24007 int
24008 main (void)
24009 {
24010 #ifndef exit
24011 (void) exit;
24012 #endif
24013
24014 ;
24015 return 0;
24016 }
24017 _ACEOF
24018 rm -f "conftest.$ac_objext"
24019 if { (eval echo "$as_me:24019: \"$ac_compile\"") >&5
24020 (eval $ac_compile) 2>&5
24021 ac_status=$?
24022 echo "$as_me:24022: \$? = $ac_status" >&5
24023 (exit "$ac_status"); } &&
24024 { ac_try='test -s "conftest.$ac_objext"'
24025 { (eval echo "$as_me:24025: \"$ac_try\"") >&5
24026 (eval $ac_try) 2>&5
24027 ac_status=$?
24028 echo "$as_me:24028: \$? = $ac_status" >&5
24029 (exit "$ac_status"); }; }; then
24030 ac_cv_have_decl_exit=yes
24031 else
24032 echo "$as_me: failed program was:" >&5
24033 cat "conftest.$ac_ext" >&5
24034 ac_cv_have_decl_exit=no
24035 fi
24036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24037 fi
24038 echo "$as_me:24038: result: $ac_cv_have_decl_exit" >&5
24039 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
24040
24041 echo "$as_me:24041: checking whether time.h and sys/time.h may both be included" >&5
24042 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
24043 if test "${ac_cv_header_time+set}" = set; then
24044 echo $ECHO_N "(cached) $ECHO_C" >&6
24045 else
24046 cat >"conftest.$ac_ext" <<_ACEOF
24047 #line 24047 "configure"
24048 #include "confdefs.h"
24049 #include <sys/types.h>
24050 #include <sys/time.h>
24051 #include <time.h>
24052
24053 int
24054 main (void)
24055 {
24056 if ((struct tm *) 0)
24057 return 0;
24058 ;
24059 return 0;
24060 }
24061 _ACEOF
24062 rm -f "conftest.$ac_objext"
24063 if { (eval echo "$as_me:24063: \"$ac_compile\"") >&5
24064 (eval $ac_compile) 2>&5
24065 ac_status=$?
24066 echo "$as_me:24066: \$? = $ac_status" >&5
24067 (exit "$ac_status"); } &&
24068 { ac_try='test -s "conftest.$ac_objext"'
24069 { (eval echo "$as_me:24069: \"$ac_try\"") >&5
24070 (eval $ac_try) 2>&5
24071 ac_status=$?
24072 echo "$as_me:24072: \$? = $ac_status" >&5
24073 (exit "$ac_status"); }; }; then
24074 ac_cv_header_time=yes
24075 else
24076 echo "$as_me: failed program was:" >&5
24077 cat "conftest.$ac_ext" >&5
24078 ac_cv_header_time=no
24079 fi
24080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24081 fi
24082 echo "$as_me:24082: result: $ac_cv_header_time" >&5
24083 echo "${ECHO_T}$ac_cv_header_time" >&6
24084 if test $ac_cv_header_time = yes; then
24085
24086 cat >>confdefs.h <<\EOF
24087 #define TIME_WITH_SYS_TIME 1
24088 EOF
24089
24090 fi
24091
24092 ac_header_dirent=no
24093 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
24094 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
24095 echo "$as_me:24095: checking for $ac_hdr that defines DIR" >&5
24096 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
24097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24098 echo $ECHO_N "(cached) $ECHO_C" >&6
24099 else
24100 cat >"conftest.$ac_ext" <<_ACEOF
24101 #line 24101 "configure"
24102 #include "confdefs.h"
24103 #include <sys/types.h>
24104 #include <$ac_hdr>
24105
24106 int
24107 main (void)
24108 {
24109 if ((DIR *) 0)
24110 return 0;
24111 ;
24112 return 0;
24113 }
24114 _ACEOF
24115 rm -f "conftest.$ac_objext"
24116 if { (eval echo "$as_me:24116: \"$ac_compile\"") >&5
24117 (eval $ac_compile) 2>&5
24118 ac_status=$?
24119 echo "$as_me:24119: \$? = $ac_status" >&5
24120 (exit "$ac_status"); } &&
24121 { ac_try='test -s "conftest.$ac_objext"'
24122 { (eval echo "$as_me:24122: \"$ac_try\"") >&5
24123 (eval $ac_try) 2>&5
24124 ac_status=$?
24125 echo "$as_me:24125: \$? = $ac_status" >&5
24126 (exit "$ac_status"); }; }; then
24127 eval "$as_ac_Header=yes"
24128 else
24129 echo "$as_me: failed program was:" >&5
24130 cat "conftest.$ac_ext" >&5
24131 eval "$as_ac_Header=no"
24132 fi
24133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24134 fi
24135 echo "$as_me:24135: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24136 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24137 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24138 cat >>confdefs.h <<EOF
24139 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
24140 EOF
24141
24142 ac_header_dirent=$ac_hdr; break
24143 fi
24144
24145 done
24146 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
24147 if test $ac_header_dirent = dirent.h; then
24148 echo "$as_me:24148: checking for opendir in -ldir" >&5
24149 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
24150 if test "${ac_cv_lib_dir_opendir+set}" = set; then
24151 echo $ECHO_N "(cached) $ECHO_C" >&6
24152 else
24153 ac_check_lib_save_LIBS=$LIBS
24154 LIBS="-ldir $LIBS"
24155 cat >"conftest.$ac_ext" <<_ACEOF
24156 #line 24156 "configure"
24157 #include "confdefs.h"
24158
24159 /* Override any gcc2 internal prototype to avoid an error. */
24160 #ifdef __cplusplus
24161 extern "C"
24162 #endif
24163 /* We use char because int might match the return type of a gcc2
24164 builtin and then its argument prototype would still apply. */
24165 char opendir (void);
24166 int
24167 main (void)
24168 {
24169 opendir ();
24170 ;
24171 return 0;
24172 }
24173 _ACEOF
24174 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24175 if { (eval echo "$as_me:24175: \"$ac_link\"") >&5
24176 (eval $ac_link) 2>&5
24177 ac_status=$?
24178 echo "$as_me:24178: \$? = $ac_status" >&5
24179 (exit "$ac_status"); } &&
24180 { ac_try='test -s "conftest$ac_exeext"'
24181 { (eval echo "$as_me:24181: \"$ac_try\"") >&5
24182 (eval $ac_try) 2>&5
24183 ac_status=$?
24184 echo "$as_me:24184: \$? = $ac_status" >&5
24185 (exit "$ac_status"); }; }; then
24186 ac_cv_lib_dir_opendir=yes
24187 else
24188 echo "$as_me: failed program was:" >&5
24189 cat "conftest.$ac_ext" >&5
24190 ac_cv_lib_dir_opendir=no
24191 fi
24192 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24193 LIBS=$ac_check_lib_save_LIBS
24194 fi
24195 echo "$as_me:24195: result: $ac_cv_lib_dir_opendir" >&5
24196 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
24197 if test "$ac_cv_lib_dir_opendir" = yes; then
24198 LIBS="$LIBS -ldir"
24199 fi
24200
24201 else
24202 echo "$as_me:24202: checking for opendir in -lx" >&5
24203 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
24204 if test "${ac_cv_lib_x_opendir+set}" = set; then
24205 echo $ECHO_N "(cached) $ECHO_C" >&6
24206 else
24207 ac_check_lib_save_LIBS=$LIBS
24208 LIBS="-lx $LIBS"
24209 cat >"conftest.$ac_ext" <<_ACEOF
24210 #line 24210 "configure"
24211 #include "confdefs.h"
24212
24213 /* Override any gcc2 internal prototype to avoid an error. */
24214 #ifdef __cplusplus
24215 extern "C"
24216 #endif
24217 /* We use char because int might match the return type of a gcc2
24218 builtin and then its argument prototype would still apply. */
24219 char opendir (void);
24220 int
24221 main (void)
24222 {
24223 opendir ();
24224 ;
24225 return 0;
24226 }
24227 _ACEOF
24228 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24229 if { (eval echo "$as_me:24229: \"$ac_link\"") >&5
24230 (eval $ac_link) 2>&5
24231 ac_status=$?
24232 echo "$as_me:24232: \$? = $ac_status" >&5
24233 (exit "$ac_status"); } &&
24234 { ac_try='test -s "conftest$ac_exeext"'
24235 { (eval echo "$as_me:24235: \"$ac_try\"") >&5
24236 (eval $ac_try) 2>&5
24237 ac_status=$?
24238 echo "$as_me:24238: \$? = $ac_status" >&5
24239 (exit "$ac_status"); }; }; then
24240 ac_cv_lib_x_opendir=yes
24241 else
24242 echo "$as_me: failed program was:" >&5
24243 cat "conftest.$ac_ext" >&5
24244 ac_cv_lib_x_opendir=no
24245 fi
24246 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24247 LIBS=$ac_check_lib_save_LIBS
24248 fi
24249 echo "$as_me:24249: result: $ac_cv_lib_x_opendir" >&5
24250 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
24251 if test "$ac_cv_lib_x_opendir" = yes; then
24252 LIBS="$LIBS -lx"
24253 fi
24254
24255 fi
24256
24257 for ac_header in search.h sys/param.h
24258 do
24259 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24260 echo "$as_me:24260: checking for $ac_header" >&5
24261 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24262 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24263 echo $ECHO_N "(cached) $ECHO_C" >&6
24264 else
24265 cat >"conftest.$ac_ext" <<_ACEOF
24266 #line 24266 "configure"
24267 #include "confdefs.h"
24268 #include <$ac_header>
24269 _ACEOF
24270 if { (eval echo "$as_me:24270: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24271 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24272 ac_status=$?
24273 $EGREP -v '^ *\+' conftest.er1 >conftest.err
24274 rm -f conftest.er1
24275 cat conftest.err >&5
24276 echo "$as_me:24276: \$? = $ac_status" >&5
24277 (exit "$ac_status"); } >/dev/null; then
24278 if test -s conftest.err; then
24279 ac_cpp_err=$ac_c_preproc_warn_flag
24280 else
24281 ac_cpp_err=
24282 fi
24283 else
24284 ac_cpp_err=yes
24285 fi
24286 if test -z "$ac_cpp_err"; then
24287 eval "$as_ac_Header=yes"
24288 else
24289 echo "$as_me: failed program was:" >&5
24290 cat "conftest.$ac_ext" >&5
24291 eval "$as_ac_Header=no"
24292 fi
24293 rm -f conftest.err "conftest.$ac_ext"
24294 fi
24295 echo "$as_me:24295: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24296 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24297 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24298 cat >>confdefs.h <<EOF
24299 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24300 EOF
24301
24302 fi
24303 done
24304
24305 echo "$as_me:24305: checking for term.h" >&5
24306 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
24307 if test "${cf_cv_term_header+set}" = set; then
24308 echo $ECHO_N "(cached) $ECHO_C" >&6
24309 else
24310
24311 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
24312 # for <term.h> if we do not find the variant.
24313
24314 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
24315
24316 case "${cf_cv_ncurses_header:-curses.h}" in
24317 (*/*)
24318 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
24319 cf_header_list="$cf_header_item $cf_header_list"
24320 ;;
24321 esac
24322
24323 for cf_header in $cf_header_list
24324 do
24325 cat >"conftest.$ac_ext" <<_ACEOF
24326 #line 24326 "configure"
24327 #include "confdefs.h"
24328
24329 #include <${cf_cv_ncurses_header:-curses.h}>
24330 #include <${cf_header}>
24331 int
24332 main (void)
24333 {
24334 WINDOW *x; (void)x
24335 ;
24336 return 0;
24337 }
24338 _ACEOF
24339 rm -f "conftest.$ac_objext"
24340 if { (eval echo "$as_me:24340: \"$ac_compile\"") >&5
24341 (eval $ac_compile) 2>&5
24342 ac_status=$?
24343 echo "$as_me:24343: \$? = $ac_status" >&5
24344 (exit "$ac_status"); } &&
24345 { ac_try='test -s "conftest.$ac_objext"'
24346 { (eval echo "$as_me:24346: \"$ac_try\"") >&5
24347 (eval $ac_try) 2>&5
24348 ac_status=$?
24349 echo "$as_me:24349: \$? = $ac_status" >&5
24350 (exit "$ac_status"); }; }; then
24351 cf_cv_term_header=$cf_header
24352 break
24353 else
24354 echo "$as_me: failed program was:" >&5
24355 cat "conftest.$ac_ext" >&5
24356 cf_cv_term_header=no
24357 fi
24358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24359 done
24360
24361 case "$cf_cv_term_header" in
24362 (no)
24363 # If curses is ncurses, some packagers still mess it up by trying to make
24364 # us use GNU termcap. This handles the most common case.
24365 for cf_header in ncurses/term.h ncursesw/term.h
24366 do
24367 cat >"conftest.$ac_ext" <<_ACEOF
24368 #line 24368 "configure"
24369 #include "confdefs.h"
24370
24371 #include <${cf_cv_ncurses_header:-curses.h}>
24372 #ifdef NCURSES_VERSION
24373 #include <${cf_header}>
24374 #else
24375 #error expected NCURSES_VERSION to be defined
24376 #endif
24377 int
24378 main (void)
24379 {
24380 WINDOW *x; (void)x
24381 ;
24382 return 0;
24383 }
24384 _ACEOF
24385 rm -f "conftest.$ac_objext"
24386 if { (eval echo "$as_me:24386: \"$ac_compile\"") >&5
24387 (eval $ac_compile) 2>&5
24388 ac_status=$?
24389 echo "$as_me:24389: \$? = $ac_status" >&5
24390 (exit "$ac_status"); } &&
24391 { ac_try='test -s "conftest.$ac_objext"'
24392 { (eval echo "$as_me:24392: \"$ac_try\"") >&5
24393 (eval $ac_try) 2>&5
24394 ac_status=$?
24395 echo "$as_me:24395: \$? = $ac_status" >&5
24396 (exit "$ac_status"); }; }; then
24397 cf_cv_term_header=$cf_header
24398 break
24399 else
24400 echo "$as_me: failed program was:" >&5
24401 cat "conftest.$ac_ext" >&5
24402 cf_cv_term_header=no
24403 fi
24404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24405 done
24406 ;;
24407 esac
24408
24409 fi
24410 echo "$as_me:24410: result: $cf_cv_term_header" >&5
24411 echo "${ECHO_T}$cf_cv_term_header" >&6
24412
24413 case "$cf_cv_term_header" in
24414 (term.h)
24415
24416 cat >>confdefs.h <<\EOF
24417 #define HAVE_TERM_H 1
24418 EOF
24419
24420 ;;
24421 (ncurses/term.h)
24422
24423 cat >>confdefs.h <<\EOF
24424 #define HAVE_NCURSES_TERM_H 1
24425 EOF
24426
24427 ;;
24428 (ncursesw/term.h)
24429
24430 cat >>confdefs.h <<\EOF
24431 #define HAVE_NCURSESW_TERM_H 1
24432 EOF
24433
24434 ;;
24435 esac
24436
24437 echo "$as_me:24437: checking return type of signal handlers" >&5
24438 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
24439 if test "${ac_cv_type_signal+set}" = set; then
24440 echo $ECHO_N "(cached) $ECHO_C" >&6
24441 else
24442 cat >"conftest.$ac_ext" <<_ACEOF
24443 #line 24443 "configure"
24444 #include "confdefs.h"
24445 #include <sys/types.h>
24446 #include <signal.h>
24447 #ifdef signal
24448 # undef signal
24449 #endif
24450 extern void (*signal (int, void (*)(int)))(int);
24451
24452 int
24453 main (void)
24454 {
24455 int i = 0; (void) i
24456 ;
24457 return 0;
24458 }
24459 _ACEOF
24460 rm -f "conftest.$ac_objext"
24461 if { (eval echo "$as_me:24461: \"$ac_compile\"") >&5
24462 (eval $ac_compile) 2>&5
24463 ac_status=$?
24464 echo "$as_me:24464: \$? = $ac_status" >&5
24465 (exit "$ac_status"); } &&
24466 { ac_try='test -s "conftest.$ac_objext"'
24467 { (eval echo "$as_me:24467: \"$ac_try\"") >&5
24468 (eval $ac_try) 2>&5
24469 ac_status=$?
24470 echo "$as_me:24470: \$? = $ac_status" >&5
24471 (exit "$ac_status"); }; }; then
24472 ac_cv_type_signal=void
24473 else
24474 echo "$as_me: failed program was:" >&5
24475 cat "conftest.$ac_ext" >&5
24476 ac_cv_type_signal=int
24477 fi
24478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24479 fi
24480 echo "$as_me:24480: result: $ac_cv_type_signal" >&5
24481 echo "${ECHO_T}$ac_cv_type_signal" >&6
24482
24483 cat >>confdefs.h <<EOF
24484 #define RETSIGTYPE $ac_cv_type_signal
24485 EOF
24486
24487 for ac_func in \
24488 btowc \
24489 mblen \
24490 mbrlen \
24491 mbrtowc \
24492 mbtowc \
24493 strcasecmp \
24494 strftime \
24495 tsearch \
24496 waitpid \
24497 wcsrtombs \
24498 wcstombs \
24499 wctob \
24500 wctomb \
24501 mktime \
24502
24503 do
24504 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24505 echo "$as_me:24505: checking for $ac_func" >&5
24506 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24507 if eval "test \"\${$as_ac_var+set}\" = set"; then
24508 echo $ECHO_N "(cached) $ECHO_C" >&6
24509 else
24510 cat >"conftest.$ac_ext" <<_ACEOF
24511 #line 24511 "configure"
24512 #include "confdefs.h"
24513 #define $ac_func autoconf_temporary
24514 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
24515 #undef $ac_func
24516
24517 #ifdef __cplusplus
24518 extern "C"
24519 #endif
24520
24521 /* We use char because int might match the return type of a gcc2
24522 builtin and then its argument prototype would still apply. */
24523 char $ac_func (void);
24524
24525 int
24526 main (void)
24527 {
24528
24529 /* The GNU C library defines stubs for functions which it implements
24530 to always fail with ENOSYS. Some functions are actually named
24531 something starting with __ and the normal name is an alias. */
24532 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24533 #error found stub for $ac_func
24534 #endif
24535
24536 return $ac_func ();
24537 ;
24538 return 0;
24539 }
24540 _ACEOF
24541 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24542 if { (eval echo "$as_me:24542: \"$ac_link\"") >&5
24543 (eval $ac_link) 2>&5
24544 ac_status=$?
24545 echo "$as_me:24545: \$? = $ac_status" >&5
24546 (exit "$ac_status"); } &&
24547 { ac_try='test -s "conftest$ac_exeext"'
24548 { (eval echo "$as_me:24548: \"$ac_try\"") >&5
24549 (eval $ac_try) 2>&5
24550 ac_status=$?
24551 echo "$as_me:24551: \$? = $ac_status" >&5
24552 (exit "$ac_status"); }; }; then
24553 eval "$as_ac_var=yes"
24554 else
24555 echo "$as_me: failed program was:" >&5
24556 cat "conftest.$ac_ext" >&5
24557 eval "$as_ac_var=no"
24558 fi
24559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24560 fi
24561 echo "$as_me:24561: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24562 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24563 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24564 cat >>confdefs.h <<EOF
24565 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24566 EOF
24567
24568 fi
24569 done
24570
24571 echo "$as_me:24571: checking definition to turn on extended curses functions" >&5
24572 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
24573 if test "${cf_cv_need_xopen_extension+set}" = set; then
24574 echo $ECHO_N "(cached) $ECHO_C" >&6
24575 else
24576
24577 cf_cv_need_xopen_extension=unknown
24578 cat >"conftest.$ac_ext" <<_ACEOF
24579 #line 24579 "configure"
24580 #include "confdefs.h"
24581
24582 $ac_includes_default
24583 #include <${cf_cv_ncurses_header:-curses.h}>
24584 int
24585 main (void)
24586 {
24587
24588 #if defined(NCURSES_VERSION_PATCH)
24589 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
24590 #error disallow ncurses versions between 2020/04/03 and 2010/05/01
24591 #endif
24592 #endif
24593 #ifdef NCURSES_WIDECHAR
24594 #error prefer to fall-through on the second checks
24595 #endif
24596 static char dummy[10];
24597 cchar_t check;
24598 int check2 = curs_set((int)sizeof(check));
24599 long x = winnstr(stdscr, dummy, 5);
24600 int x1, y1;
24601 (void)check2;
24602 getbegyx(stdscr, y1, x1);
24603 (void)x;
24604 (void)y1;
24605 (void)x1;
24606
24607 ;
24608 return 0;
24609 }
24610 _ACEOF
24611 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24612 if { (eval echo "$as_me:24612: \"$ac_link\"") >&5
24613 (eval $ac_link) 2>&5
24614 ac_status=$?
24615 echo "$as_me:24615: \$? = $ac_status" >&5
24616 (exit "$ac_status"); } &&
24617 { ac_try='test -s "conftest$ac_exeext"'
24618 { (eval echo "$as_me:24618: \"$ac_try\"") >&5
24619 (eval $ac_try) 2>&5
24620 ac_status=$?
24621 echo "$as_me:24621: \$? = $ac_status" >&5
24622 (exit "$ac_status"); }; }; then
24623 cf_cv_need_xopen_extension=none
24624 else
24625 echo "$as_me: failed program was:" >&5
24626 cat "conftest.$ac_ext" >&5
24627
24628 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
24629 do
24630 cat >"conftest.$ac_ext" <<_ACEOF
24631 #line 24631 "configure"
24632 #include "confdefs.h"
24633
24634 #define $cf_try_xopen_extension 1
24635 $ac_includes_default
24636 #include <${cf_cv_ncurses_header:-curses.h}>
24637 int
24638 main (void)
24639 {
24640
24641 static char dummy[10];
24642 cchar_t check;
24643 int check2 = curs_set((int)sizeof(check));
24644 long x = winnstr(stdscr, dummy, 5);
24645 int x1, y1;
24646 getbegyx(stdscr, y1, x1);
24647 (void)check2;
24648 (void)x;
24649 (void)y1;
24650 (void)x1;
24651
24652 ;
24653 return 0;
24654 }
24655 _ACEOF
24656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24657 if { (eval echo "$as_me:24657: \"$ac_link\"") >&5
24658 (eval $ac_link) 2>&5
24659 ac_status=$?
24660 echo "$as_me:24660: \$? = $ac_status" >&5
24661 (exit "$ac_status"); } &&
24662 { ac_try='test -s "conftest$ac_exeext"'
24663 { (eval echo "$as_me:24663: \"$ac_try\"") >&5
24664 (eval $ac_try) 2>&5
24665 ac_status=$?
24666 echo "$as_me:24666: \$? = $ac_status" >&5
24667 (exit "$ac_status"); }; }; then
24668 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
24669 else
24670 echo "$as_me: failed program was:" >&5
24671 cat "conftest.$ac_ext" >&5
24672 fi
24673 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24674 done
24675
24676 fi
24677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24678
24679 fi
24680 echo "$as_me:24680: result: $cf_cv_need_xopen_extension" >&5
24681 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
24682
24683 case "$cf_cv_need_xopen_extension" in
24684 (*_*)
24685
24686 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24687 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
24688
24689 ;;
24690 esac
24691
24692 echo "$as_me:24692: checking for unctrl.h" >&5
24693 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
24694 if test "${cf_cv_unctrl_header+set}" = set; then
24695 echo $ECHO_N "(cached) $ECHO_C" >&6
24696 else
24697
24698 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
24699 # for <unctrl.h> if we do not find the variant.
24700
24701 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
24702
24703 case "${cf_cv_ncurses_header:-curses.h}" in
24704 (*/*)
24705 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
24706 cf_header_list="$cf_header_item $cf_header_list"
24707 ;;
24708 esac
24709
24710 for cf_header in $cf_header_list
24711 do
24712 cat >"conftest.$ac_ext" <<_ACEOF
24713 #line 24713 "configure"
24714 #include "confdefs.h"
24715
24716 #include <${cf_cv_ncurses_header:-curses.h}>
24717 #include <${cf_header}>
24718 int
24719 main (void)
24720 {
24721 WINDOW *x; (void)x
24722 ;
24723 return 0;
24724 }
24725 _ACEOF
24726 rm -f "conftest.$ac_objext"
24727 if { (eval echo "$as_me:24727: \"$ac_compile\"") >&5
24728 (eval $ac_compile) 2>&5
24729 ac_status=$?
24730 echo "$as_me:24730: \$? = $ac_status" >&5
24731 (exit "$ac_status"); } &&
24732 { ac_try='test -s "conftest.$ac_objext"'
24733 { (eval echo "$as_me:24733: \"$ac_try\"") >&5
24734 (eval $ac_try) 2>&5
24735 ac_status=$?
24736 echo "$as_me:24736: \$? = $ac_status" >&5
24737 (exit "$ac_status"); }; }; then
24738 cf_cv_unctrl_header=$cf_header
24739 break
24740 else
24741 echo "$as_me: failed program was:" >&5
24742 cat "conftest.$ac_ext" >&5
24743 cf_cv_unctrl_header=no
24744 fi
24745 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24746 done
24747
24748 fi
24749 echo "$as_me:24749: result: $cf_cv_unctrl_header" >&5
24750 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
24751
24752 case "$cf_cv_unctrl_header" in
24753 (no)
24754 { echo "$as_me:24754: WARNING: unctrl.h header not found" >&5
24755 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
24756 ;;
24757 esac
24758
24759 case "$cf_cv_unctrl_header" in
24760 (unctrl.h)
24761
24762 cat >>confdefs.h <<\EOF
24763 #define HAVE_UNCTRL_H 1
24764 EOF
24765
24766 ;;
24767 (ncurses/unctrl.h)
24768
24769 cat >>confdefs.h <<\EOF
24770 #define HAVE_NCURSES_UNCTRL_H 1
24771 EOF
24772
24773 ;;
24774 (ncursesw/unctrl.h)
24775
24776 cat >>confdefs.h <<\EOF
24777 #define HAVE_NCURSESW_UNCTRL_H 1
24778 EOF
24779
24780 ;;
24781 esac
24782
24783 for cf_func in \
24784 flushinp \
24785 getattrs \
24786 getbegx \
24787 getbegy \
24788 getbegyx \
24789 getcurx \
24790 getcury \
24791 getmaxx \
24792 getmaxy \
24793 getmaxyx \
24794 getparx \
24795 getpary \
24796 getparyx \
24797 use_default_colors \
24798 wchgat \
24799 wcursyncup \
24800 wget_wch \
24801 wsyncup \
24802
24803 do
24804
24805 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24806
24807 echo "$as_me:24807: checking for ${cf_func}" >&5
24808 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24809
24810 echo "${as_me:-configure}:24810: testing ${cf_func} ..." 1>&5
24811
24812 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24813 echo $ECHO_N "(cached) $ECHO_C" >&6
24814 else
24815
24816 eval cf_result='$ac_cv_func_'$cf_func
24817 if test ".$cf_result" != ".no"; then
24818 cat >"conftest.$ac_ext" <<_ACEOF
24819 #line 24819 "configure"
24820 #include "confdefs.h"
24821
24822 #ifdef HAVE_XCURSES
24823 #include <xcurses.h>
24824 char * XCursesProgramName = "test";
24825 #else
24826 #include <${cf_cv_ncurses_header:-curses.h}>
24827 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24828 #include <ncursesw/term.h>
24829 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24830 #include <ncurses/term.h>
24831 #elif defined(HAVE_TERM_H)
24832 #include <term.h>
24833 #endif
24834 #endif
24835
24836 int
24837 main (void)
24838 {
24839
24840 #ifndef ${cf_func}
24841 long foo = (long)(&${cf_func});
24842 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24843 if (foo + 1234L > 5678L)
24844 ${cf_cv_main_return:-return}(foo != 0);
24845 #endif
24846
24847 ;
24848 return 0;
24849 }
24850 _ACEOF
24851 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24852 if { (eval echo "$as_me:24852: \"$ac_link\"") >&5
24853 (eval $ac_link) 2>&5
24854 ac_status=$?
24855 echo "$as_me:24855: \$? = $ac_status" >&5
24856 (exit "$ac_status"); } &&
24857 { ac_try='test -s "conftest$ac_exeext"'
24858 { (eval echo "$as_me:24858: \"$ac_try\"") >&5
24859 (eval $ac_try) 2>&5
24860 ac_status=$?
24861 echo "$as_me:24861: \$? = $ac_status" >&5
24862 (exit "$ac_status"); }; }; then
24863 cf_result=yes
24864 else
24865 echo "$as_me: failed program was:" >&5
24866 cat "conftest.$ac_ext" >&5
24867 cf_result=no
24868 fi
24869 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24870 fi
24871 eval 'cf_cv_func_'$cf_func'="$cf_result"'
24872
24873 fi
24874
24875 # use the computed/retrieved cache-value:
24876 eval 'cf_result=$cf_cv_func_'$cf_func
24877 echo "$as_me:24877: result: $cf_result" >&5
24878 echo "${ECHO_T}$cf_result" >&6
24879 if test "$cf_result" != no; then
24880 cat >>confdefs.h <<EOF
24881 #define HAVE_${cf_tr_func} 1
24882 EOF
24883
24884 fi
24885 done
24886
24887 for cf_func in \
24888 exit_curses \
24889 _nc_free_and_exit \
24890
24891 do
24892
24893 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24894
24895 echo "$as_me:24895: checking for ${cf_func}" >&5
24896 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
24897
24898 echo "${as_me:-configure}:24898: testing ${cf_func} ..." 1>&5
24899
24900 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
24901 echo $ECHO_N "(cached) $ECHO_C" >&6
24902 else
24903
24904 eval cf_result='$ac_cv_func_'$cf_func
24905 if test ".$cf_result" != ".no"; then
24906 cat >"conftest.$ac_ext" <<_ACEOF
24907 #line 24907 "configure"
24908 #include "confdefs.h"
24909
24910 #ifdef HAVE_XCURSES
24911 #include <xcurses.h>
24912 char * XCursesProgramName = "test";
24913 #else
24914 #include <${cf_cv_ncurses_header:-curses.h}>
24915 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
24916 #include <ncursesw/term.h>
24917 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
24918 #include <ncurses/term.h>
24919 #elif defined(HAVE_TERM_H)
24920 #include <term.h>
24921 #endif
24922 #endif
24923
24924 int
24925 main (void)
24926 {
24927
24928 #ifndef ${cf_func}
24929 long foo = (long)(&${cf_func});
24930 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
24931 if (foo + 1234L > 5678L)
24932 ${cf_cv_main_return:-return}(foo != 0);
24933 #endif
24934
24935 ;
24936 return 0;
24937 }
24938 _ACEOF
24939 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24940 if { (eval echo "$as_me:24940: \"$ac_link\"") >&5
24941 (eval $ac_link) 2>&5
24942 ac_status=$?
24943 echo "$as_me:24943: \$? = $ac_status" >&5
24944 (exit "$ac_status"); } &&
24945 { ac_try='test -s "conftest$ac_exeext"'
24946 { (eval echo "$as_me:24946: \"$ac_try\"") >&5
24947 (eval $ac_try) 2>&5
24948 ac_status=$?
24949 echo "$as_me:24949: \$? = $ac_status" >&5
24950 (exit "$ac_status"); }; }; then
24951 cf_result=yes
24952 else
24953 echo "$as_me: failed program was:" >&5
24954 cat "conftest.$ac_ext" >&5
24955 cf_result=no
24956 fi
24957 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24958 fi
24959 eval 'cf_cv_func_'$cf_func'="$cf_result"'
24960
24961 fi
24962
24963 # use the computed/retrieved cache-value:
24964 eval 'cf_result=$cf_cv_func_'$cf_func
24965 echo "$as_me:24965: result: $cf_result" >&5
24966 echo "${ECHO_T}$cf_result" >&6
24967 if test "$cf_result" != no; then
24968 cat >>confdefs.h <<EOF
24969 #define HAVE_${cf_tr_func} 1
24970 EOF
24971
24972 fi
24973 done
24974
24975 echo "$as_me:24975: checking for start_color" >&5
24976 echo $ECHO_N "checking for start_color... $ECHO_C" >&6
24977 if test "${ac_cv_func_start_color+set}" = set; then
24978 echo $ECHO_N "(cached) $ECHO_C" >&6
24979 else
24980 cat >"conftest.$ac_ext" <<_ACEOF
24981 #line 24981 "configure"
24982 #include "confdefs.h"
24983 #define start_color autoconf_temporary
24984 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
24985 #undef start_color
24986
24987 #ifdef __cplusplus
24988 extern "C"
24989 #endif
24990
24991 /* We use char because int might match the return type of a gcc2
24992 builtin and then its argument prototype would still apply. */
24993 char start_color (void);
24994
24995 int
24996 main (void)
24997 {
24998
24999 /* The GNU C library defines stubs for functions which it implements
25000 to always fail with ENOSYS. Some functions are actually named
25001 something starting with __ and the normal name is an alias. */
25002 #if defined (__stub_start_color) || defined (__stub___start_color)
25003 #error found stub for start_color
25004 #endif
25005
25006 return start_color ();
25007 ;
25008 return 0;
25009 }
25010 _ACEOF
25011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25012 if { (eval echo "$as_me:25012: \"$ac_link\"") >&5
25013 (eval $ac_link) 2>&5
25014 ac_status=$?
25015 echo "$as_me:25015: \$? = $ac_status" >&5
25016 (exit "$ac_status"); } &&
25017 { ac_try='test -s "conftest$ac_exeext"'
25018 { (eval echo "$as_me:25018: \"$ac_try\"") >&5
25019 (eval $ac_try) 2>&5
25020 ac_status=$?
25021 echo "$as_me:25021: \$? = $ac_status" >&5
25022 (exit "$ac_status"); }; }; then
25023 ac_cv_func_start_color=yes
25024 else
25025 echo "$as_me: failed program was:" >&5
25026 cat "conftest.$ac_ext" >&5
25027 ac_cv_func_start_color=no
25028 fi
25029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25030 fi
25031 echo "$as_me:25031: result: $ac_cv_func_start_color" >&5
25032 echo "${ECHO_T}$ac_cv_func_start_color" >&6
25033 if test "$ac_cv_func_start_color" = yes; then
25034
25035 cat >>confdefs.h <<\EOF
25036 #define HAVE_COLOR 1
25037 EOF
25038
25039 fi
25040
25041 echo "$as_me:25041: checking for chtype typedef" >&5
25042 echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
25043 if test "${cf_cv_chtype_decl+set}" = set; then
25044 echo $ECHO_N "(cached) $ECHO_C" >&6
25045 else
25046
25047 cat >"conftest.$ac_ext" <<_ACEOF
25048 #line 25048 "configure"
25049 #include "confdefs.h"
25050 #include <${cf_cv_ncurses_header:-curses.h}>
25051 int
25052 main (void)
25053 {
25054 chtype foo; (void)foo
25055 ;
25056 return 0;
25057 }
25058 _ACEOF
25059 rm -f "conftest.$ac_objext"
25060 if { (eval echo "$as_me:25060: \"$ac_compile\"") >&5
25061 (eval $ac_compile) 2>&5
25062 ac_status=$?
25063 echo "$as_me:25063: \$? = $ac_status" >&5
25064 (exit "$ac_status"); } &&
25065 { ac_try='test -s "conftest.$ac_objext"'
25066 { (eval echo "$as_me:25066: \"$ac_try\"") >&5
25067 (eval $ac_try) 2>&5
25068 ac_status=$?
25069 echo "$as_me:25069: \$? = $ac_status" >&5
25070 (exit "$ac_status"); }; }; then
25071 cf_cv_chtype_decl=yes
25072 else
25073 echo "$as_me: failed program was:" >&5
25074 cat "conftest.$ac_ext" >&5
25075 cf_cv_chtype_decl=no
25076 fi
25077 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25078 fi
25079 echo "$as_me:25079: result: $cf_cv_chtype_decl" >&5
25080 echo "${ECHO_T}$cf_cv_chtype_decl" >&6
25081 if test "$cf_cv_chtype_decl" = yes ; then
25082
25083 cat >>confdefs.h <<\EOF
25084 #define HAVE_TYPE_CHTYPE 1
25085 EOF
25086
25087 echo "$as_me:25087: checking if chtype is scalar or struct" >&5
25088 echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
25089 if test "${cf_cv_chtype_type+set}" = set; then
25090 echo $ECHO_N "(cached) $ECHO_C" >&6
25091 else
25092
25093 cat >"conftest.$ac_ext" <<_ACEOF
25094 #line 25094 "configure"
25095 #include "confdefs.h"
25096 #include <${cf_cv_ncurses_header:-curses.h}>
25097 int
25098 main (void)
25099 {
25100 static chtype foo; long x = foo; (void)x
25101 ;
25102 return 0;
25103 }
25104 _ACEOF
25105 rm -f "conftest.$ac_objext"
25106 if { (eval echo "$as_me:25106: \"$ac_compile\"") >&5
25107 (eval $ac_compile) 2>&5
25108 ac_status=$?
25109 echo "$as_me:25109: \$? = $ac_status" >&5
25110 (exit "$ac_status"); } &&
25111 { ac_try='test -s "conftest.$ac_objext"'
25112 { (eval echo "$as_me:25112: \"$ac_try\"") >&5
25113 (eval $ac_try) 2>&5
25114 ac_status=$?
25115 echo "$as_me:25115: \$? = $ac_status" >&5
25116 (exit "$ac_status"); }; }; then
25117 cf_cv_chtype_type=scalar
25118 else
25119 echo "$as_me: failed program was:" >&5
25120 cat "conftest.$ac_ext" >&5
25121 cf_cv_chtype_type=struct
25122 fi
25123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25124 fi
25125 echo "$as_me:25125: result: $cf_cv_chtype_type" >&5
25126 echo "${ECHO_T}$cf_cv_chtype_type" >&6
25127 if test "$cf_cv_chtype_type" = scalar ; then
25128
25129 cat >>confdefs.h <<\EOF
25130 #define TYPE_CHTYPE_IS_SCALAR 1
25131 EOF
25132
25133 fi
25134 fi
25135
25136 echo "$as_me:25136: checking for wide alternate character set array" >&5
25137 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
25138 if test "${cf_cv_curses_wacs_map+set}" = set; then
25139 echo $ECHO_N "(cached) $ECHO_C" >&6
25140 else
25141
25142 cf_cv_curses_wacs_map=unknown
25143 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
25144 do
25145 cat >"conftest.$ac_ext" <<_ACEOF
25146 #line 25146 "configure"
25147 #include "confdefs.h"
25148
25149 #ifndef _XOPEN_SOURCE_EXTENDED
25150 #define _XOPEN_SOURCE_EXTENDED
25151 #endif
25152 #include <${cf_cv_ncurses_header:-curses.h}>
25153 int
25154 main (void)
25155 {
25156 void *foo = &(${name}['k']); (void)foo
25157 ;
25158 return 0;
25159 }
25160 _ACEOF
25161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25162 if { (eval echo "$as_me:25162: \"$ac_link\"") >&5
25163 (eval $ac_link) 2>&5
25164 ac_status=$?
25165 echo "$as_me:25165: \$? = $ac_status" >&5
25166 (exit "$ac_status"); } &&
25167 { ac_try='test -s "conftest$ac_exeext"'
25168 { (eval echo "$as_me:25168: \"$ac_try\"") >&5
25169 (eval $ac_try) 2>&5
25170 ac_status=$?
25171 echo "$as_me:25171: \$? = $ac_status" >&5
25172 (exit "$ac_status"); }; }; then
25173 cf_cv_curses_wacs_map=$name
25174 break
25175 else
25176 echo "$as_me: failed program was:" >&5
25177 cat "conftest.$ac_ext" >&5
25178 fi
25179 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25180 done
25181 fi
25182 echo "$as_me:25182: result: $cf_cv_curses_wacs_map" >&5
25183 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
25184
25185 test "$cf_cv_curses_wacs_map" != unknown &&
25186 cat >>confdefs.h <<EOF
25187 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
25188 EOF
25189
25190 echo "$as_me:25190: checking for wide alternate character constants" >&5
25191 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
25192 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
25193 echo $ECHO_N "(cached) $ECHO_C" >&6
25194 else
25195
25196 cf_cv_curses_wacs_symbols=no
25197 if test "$cf_cv_curses_wacs_map" != unknown
25198 then
25199 cat >"conftest.$ac_ext" <<_ACEOF
25200 #line 25200 "configure"
25201 #include "confdefs.h"
25202
25203 #ifndef _XOPEN_SOURCE_EXTENDED
25204 #define _XOPEN_SOURCE_EXTENDED
25205 #endif
25206 #include <${cf_cv_ncurses_header:-curses.h}>
25207 int
25208 main (void)
25209 {
25210 cchar_t *foo = WACS_PLUS;
25211 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
25212 ;
25213 return 0;
25214 }
25215 _ACEOF
25216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25217 if { (eval echo "$as_me:25217: \"$ac_link\"") >&5
25218 (eval $ac_link) 2>&5
25219 ac_status=$?
25220 echo "$as_me:25220: \$? = $ac_status" >&5
25221 (exit "$ac_status"); } &&
25222 { ac_try='test -s "conftest$ac_exeext"'
25223 { (eval echo "$as_me:25223: \"$ac_try\"") >&5
25224 (eval $ac_try) 2>&5
25225 ac_status=$?
25226 echo "$as_me:25226: \$? = $ac_status" >&5
25227 (exit "$ac_status"); }; }; then
25228 cf_cv_curses_wacs_symbols=yes
25229 else
25230 echo "$as_me: failed program was:" >&5
25231 cat "conftest.$ac_ext" >&5
25232 fi
25233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25234 else
25235 cat >"conftest.$ac_ext" <<_ACEOF
25236 #line 25236 "configure"
25237 #include "confdefs.h"
25238
25239 #ifndef _XOPEN_SOURCE_EXTENDED
25240 #define _XOPEN_SOURCE_EXTENDED
25241 #endif
25242 #include <${cf_cv_ncurses_header:-curses.h}>
25243 int
25244 main (void)
25245 {
25246 cchar_t *foo = WACS_PLUS; (void)foo
25247 ;
25248 return 0;
25249 }
25250 _ACEOF
25251 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25252 if { (eval echo "$as_me:25252: \"$ac_link\"") >&5
25253 (eval $ac_link) 2>&5
25254 ac_status=$?
25255 echo "$as_me:25255: \$? = $ac_status" >&5
25256 (exit "$ac_status"); } &&
25257 { ac_try='test -s "conftest$ac_exeext"'
25258 { (eval echo "$as_me:25258: \"$ac_try\"") >&5
25259 (eval $ac_try) 2>&5
25260 ac_status=$?
25261 echo "$as_me:25261: \$? = $ac_status" >&5
25262 (exit "$ac_status"); }; }; then
25263 cf_cv_curses_wacs_symbols=yes
25264 else
25265 echo "$as_me: failed program was:" >&5
25266 cat "conftest.$ac_ext" >&5
25267 fi
25268 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25269 fi
25270
25271 fi
25272 echo "$as_me:25272: result: $cf_cv_curses_wacs_symbols" >&5
25273 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
25274
25275 test "$cf_cv_curses_wacs_symbols" != no &&
25276 cat >>confdefs.h <<\EOF
25277 #define CURSES_WACS_SYMBOLS 1
25278 EOF
25279
25280 for cf_func in wgetparent
25281 do
25282
25283 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25284
25285 echo "$as_me:25285: checking for ${cf_func}" >&5
25286 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
25287
25288 echo "${as_me:-configure}:25288: testing ${cf_func} ..." 1>&5
25289
25290 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
25291 echo $ECHO_N "(cached) $ECHO_C" >&6
25292 else
25293
25294 eval cf_result='$ac_cv_func_'$cf_func
25295 if test ".$cf_result" != ".no"; then
25296 cat >"conftest.$ac_ext" <<_ACEOF
25297 #line 25297 "configure"
25298 #include "confdefs.h"
25299
25300 #ifdef HAVE_XCURSES
25301 #include <xcurses.h>
25302 char * XCursesProgramName = "test";
25303 #else
25304 #include <${cf_cv_ncurses_header:-curses.h}>
25305 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
25306 #include <ncursesw/term.h>
25307 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
25308 #include <ncurses/term.h>
25309 #elif defined(HAVE_TERM_H)
25310 #include <term.h>
25311 #endif
25312 #endif
25313
25314 int
25315 main (void)
25316 {
25317
25318 #ifndef ${cf_func}
25319 long foo = (long)(&${cf_func});
25320 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
25321 if (foo + 1234L > 5678L)
25322 ${cf_cv_main_return:-return}(foo != 0);
25323 #endif
25324
25325 ;
25326 return 0;
25327 }
25328 _ACEOF
25329 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25330 if { (eval echo "$as_me:25330: \"$ac_link\"") >&5
25331 (eval $ac_link) 2>&5
25332 ac_status=$?
25333 echo "$as_me:25333: \$? = $ac_status" >&5
25334 (exit "$ac_status"); } &&
25335 { ac_try='test -s "conftest$ac_exeext"'
25336 { (eval echo "$as_me:25336: \"$ac_try\"") >&5
25337 (eval $ac_try) 2>&5
25338 ac_status=$?
25339 echo "$as_me:25339: \$? = $ac_status" >&5
25340 (exit "$ac_status"); }; }; then
25341 cf_result=yes
25342 else
25343 echo "$as_me: failed program was:" >&5
25344 cat "conftest.$ac_ext" >&5
25345 cf_result=no
25346 fi
25347 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25348 fi
25349 eval 'cf_cv_func_'$cf_func'="$cf_result"'
25350
25351 fi
25352
25353 # use the computed/retrieved cache-value:
25354 eval 'cf_result=$cf_cv_func_'$cf_func
25355 echo "$as_me:25355: result: $cf_result" >&5
25356 echo "${ECHO_T}$cf_result" >&6
25357 if test "$cf_result" != no; then
25358 cat >>confdefs.h <<EOF
25359 #define HAVE_${cf_tr_func} 1
25360 EOF
25361
25362 fi
25363 done
25364
25365 if test "x$cf_cv_func_wgetparent" != xyes
25366 then
25367 echo "$as_me:25367: checking if WINDOW has _parent member" >&5
25368 echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
25369 cat >"conftest.$ac_ext" <<_ACEOF
25370 #line 25370 "configure"
25371 #include "confdefs.h"
25372 #include <${cf_cv_ncurses_header:-curses.h}>
25373 int
25374 main (void)
25375 {
25376 WINDOW *p = stdscr->_parent; (void)p
25377 ;
25378 return 0;
25379 }
25380 _ACEOF
25381 rm -f "conftest.$ac_objext"
25382 if { (eval echo "$as_me:25382: \"$ac_compile\"") >&5
25383 (eval $ac_compile) 2>&5
25384 ac_status=$?
25385 echo "$as_me:25385: \$? = $ac_status" >&5
25386 (exit "$ac_status"); } &&
25387 { ac_try='test -s "conftest.$ac_objext"'
25388 { (eval echo "$as_me:25388: \"$ac_try\"") >&5
25389 (eval $ac_try) 2>&5
25390 ac_status=$?
25391 echo "$as_me:25391: \$? = $ac_status" >&5
25392 (exit "$ac_status"); }; }; then
25393 cf_window__parent=yes
25394 else
25395 echo "$as_me: failed program was:" >&5
25396 cat "conftest.$ac_ext" >&5
25397 cf_window__parent=no
25398 fi
25399 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25400 echo "$as_me:25400: result: $cf_window__parent" >&5
25401 echo "${ECHO_T}$cf_window__parent" >&6
25402 if test "$cf_window__parent" = yes
25403 then
25404
25405 cat >>confdefs.h <<\EOF
25406 #define HAVE_WINDOW__PARENT 1
25407 EOF
25408
25409 fi
25410 fi
25411
25412 for ac_header in sys/wait.h
25413 do
25414 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25415 echo "$as_me:25415: checking for $ac_header" >&5
25416 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25417 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25418 echo $ECHO_N "(cached) $ECHO_C" >&6
25419 else
25420 cat >"conftest.$ac_ext" <<_ACEOF
25421 #line 25421 "configure"
25422 #include "confdefs.h"
25423 #include <$ac_header>
25424 _ACEOF
25425 if { (eval echo "$as_me:25425: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25426 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25427 ac_status=$?
25428 $EGREP -v '^ *\+' conftest.er1 >conftest.err
25429 rm -f conftest.er1
25430 cat conftest.err >&5
25431 echo "$as_me:25431: \$? = $ac_status" >&5
25432 (exit "$ac_status"); } >/dev/null; then
25433 if test -s conftest.err; then
25434 ac_cpp_err=$ac_c_preproc_warn_flag
25435 else
25436 ac_cpp_err=
25437 fi
25438 else
25439 ac_cpp_err=yes
25440 fi
25441 if test -z "$ac_cpp_err"; then
25442 eval "$as_ac_Header=yes"
25443 else
25444 echo "$as_me: failed program was:" >&5
25445 cat "conftest.$ac_ext" >&5
25446 eval "$as_ac_Header=no"
25447 fi
25448 rm -f conftest.err "conftest.$ac_ext"
25449 fi
25450 echo "$as_me:25450: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25451 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25452 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25453 cat >>confdefs.h <<EOF
25454 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25455 EOF
25456
25457 fi
25458 done
25459
25460 cf_wait_headers="#include <sys/types.h>
25461 "
25462 if test "$ac_cv_header_sys_wait_h" = yes; then
25463 cf_wait_headers="$cf_wait_headers
25464 #include <sys/wait.h>
25465 "
25466 else
25467
25468 for ac_header in wait.h
25469 do
25470 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25471 echo "$as_me:25471: checking for $ac_header" >&5
25472 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25473 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25474 echo $ECHO_N "(cached) $ECHO_C" >&6
25475 else
25476 cat >"conftest.$ac_ext" <<_ACEOF
25477 #line 25477 "configure"
25478 #include "confdefs.h"
25479 #include <$ac_header>
25480 _ACEOF
25481 if { (eval echo "$as_me:25481: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25482 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25483 ac_status=$?
25484 $EGREP -v '^ *\+' conftest.er1 >conftest.err
25485 rm -f conftest.er1
25486 cat conftest.err >&5
25487 echo "$as_me:25487: \$? = $ac_status" >&5
25488 (exit "$ac_status"); } >/dev/null; then
25489 if test -s conftest.err; then
25490 ac_cpp_err=$ac_c_preproc_warn_flag
25491 else
25492 ac_cpp_err=
25493 fi
25494 else
25495 ac_cpp_err=yes
25496 fi
25497 if test -z "$ac_cpp_err"; then
25498 eval "$as_ac_Header=yes"
25499 else
25500 echo "$as_me: failed program was:" >&5
25501 cat "conftest.$ac_ext" >&5
25502 eval "$as_ac_Header=no"
25503 fi
25504 rm -f conftest.err "conftest.$ac_ext"
25505 fi
25506 echo "$as_me:25506: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25507 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25508 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25509 cat >>confdefs.h <<EOF
25510 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25511 EOF
25512
25513 fi
25514 done
25515
25516 for ac_header in waitstatus.h
25517 do
25518 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25519 echo "$as_me:25519: checking for $ac_header" >&5
25520 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25521 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25522 echo $ECHO_N "(cached) $ECHO_C" >&6
25523 else
25524 cat >"conftest.$ac_ext" <<_ACEOF
25525 #line 25525 "configure"
25526 #include "confdefs.h"
25527 #include <$ac_header>
25528 _ACEOF
25529 if { (eval echo "$as_me:25529: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25530 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25531 ac_status=$?
25532 $EGREP -v '^ *\+' conftest.er1 >conftest.err
25533 rm -f conftest.er1
25534 cat conftest.err >&5
25535 echo "$as_me:25535: \$? = $ac_status" >&5
25536 (exit "$ac_status"); } >/dev/null; then
25537 if test -s conftest.err; then
25538 ac_cpp_err=$ac_c_preproc_warn_flag
25539 else
25540 ac_cpp_err=
25541 fi
25542 else
25543 ac_cpp_err=yes
25544 fi
25545 if test -z "$ac_cpp_err"; then
25546 eval "$as_ac_Header=yes"
25547 else
25548 echo "$as_me: failed program was:" >&5
25549 cat "conftest.$ac_ext" >&5
25550 eval "$as_ac_Header=no"
25551 fi
25552 rm -f conftest.err "conftest.$ac_ext"
25553 fi
25554 echo "$as_me:25554: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25555 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25556 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25557 cat >>confdefs.h <<EOF
25558 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25559 EOF
25560
25561 fi
25562 done
25563
25564 if test "$ac_cv_header_wait_h" = yes; then
25565 cf_wait_headers="$cf_wait_headers
25566 #include <wait.h>
25567 "
25568 fi
25569 if test "$ac_cv_header_waitstatus_h" = yes; then
25570 cf_wait_headers="$cf_wait_headers
25571 #include <waitstatus.h>
25572 "
25573 fi
25574 fi
25575
25576 echo "$as_me:25576: checking for union wait" >&5
25577 echo $ECHO_N "checking for union wait... $ECHO_C" >&6
25578 if test "${cf_cv_type_unionwait+set}" = set; then
25579 echo $ECHO_N "(cached) $ECHO_C" >&6
25580 else
25581
25582 cat >"conftest.$ac_ext" <<_ACEOF
25583 #line 25583 "configure"
25584 #include "confdefs.h"
25585 $cf_wait_headers
25586 int
25587 main (void)
25588 {
25589 static int x;
25590 int y = WEXITSTATUS(x);
25591 int z = WTERMSIG(x);
25592 wait(&x);
25593 (void)x;
25594 (void)y;
25595 (void)z;
25596
25597 ;
25598 return 0;
25599 }
25600 _ACEOF
25601 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25602 if { (eval echo "$as_me:25602: \"$ac_link\"") >&5
25603 (eval $ac_link) 2>&5
25604 ac_status=$?
25605 echo "$as_me:25605: \$? = $ac_status" >&5
25606 (exit "$ac_status"); } &&
25607 { ac_try='test -s "conftest$ac_exeext"'
25608 { (eval echo "$as_me:25608: \"$ac_try\"") >&5
25609 (eval $ac_try) 2>&5
25610 ac_status=$?
25611 echo "$as_me:25611: \$? = $ac_status" >&5
25612 (exit "$ac_status"); }; }; then
25613 cf_cv_type_unionwait=no
25614 echo compiles ok w/o union wait 1>&5
25615
25616 else
25617 echo "$as_me: failed program was:" >&5
25618 cat "conftest.$ac_ext" >&5
25619
25620 cat >"conftest.$ac_ext" <<_ACEOF
25621 #line 25621 "configure"
25622 #include "confdefs.h"
25623 $cf_wait_headers
25624 int
25625 main (void)
25626 {
25627 union wait x;
25628 #ifdef WEXITSTATUS
25629 int y = WEXITSTATUS(x);
25630 #endif
25631 #ifdef WTERMSIG
25632 int z = WTERMSIG(x);
25633 #endif
25634 wait(&x);
25635 (void)x;
25636 #ifdef WEXITSTATUS
25637 (void)y;
25638 #endif
25639 #ifdef WTERMSIG
25640 (void)z;
25641 #endif
25642
25643 ;
25644 return 0;
25645 }
25646 _ACEOF
25647 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25648 if { (eval echo "$as_me:25648: \"$ac_link\"") >&5
25649 (eval $ac_link) 2>&5
25650 ac_status=$?
25651 echo "$as_me:25651: \$? = $ac_status" >&5
25652 (exit "$ac_status"); } &&
25653 { ac_try='test -s "conftest$ac_exeext"'
25654 { (eval echo "$as_me:25654: \"$ac_try\"") >&5
25655 (eval $ac_try) 2>&5
25656 ac_status=$?
25657 echo "$as_me:25657: \$? = $ac_status" >&5
25658 (exit "$ac_status"); }; }; then
25659 cf_cv_type_unionwait=yes
25660 echo compiles ok with union wait and possibly macros too 1>&5
25661
25662 else
25663 echo "$as_me: failed program was:" >&5
25664 cat "conftest.$ac_ext" >&5
25665 cf_cv_type_unionwait=no
25666 fi
25667 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25668 fi
25669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25670 fi
25671
25672 echo "$as_me:25672: result: $cf_cv_type_unionwait" >&5
25673 echo "${ECHO_T}$cf_cv_type_unionwait" >&6
25674 test "$cf_cv_type_unionwait" = yes &&
25675 cat >>confdefs.h <<\EOF
25676 #define HAVE_TYPE_UNIONWAIT 1
25677 EOF
25678
25679 if test "$cf_cv_type_unionwait" = yes; then
25680
25681 echo "$as_me:25681: checking if union wait can be used as wait-arg" >&5
25682 echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
25683 if test "${cf_cv_arg_union_wait+set}" = set; then
25684 echo $ECHO_N "(cached) $ECHO_C" >&6
25685 else
25686
25687 cat >"conftest.$ac_ext" <<_ACEOF
25688 #line 25688 "configure"
25689 #include "confdefs.h"
25690 $cf_wait_headers
25691 int
25692 main (void)
25693 {
25694 union wait x; wait(&x)
25695 ;
25696 return 0;
25697 }
25698 _ACEOF
25699 rm -f "conftest.$ac_objext"
25700 if { (eval echo "$as_me:25700: \"$ac_compile\"") >&5
25701 (eval $ac_compile) 2>&5
25702 ac_status=$?
25703 echo "$as_me:25703: \$? = $ac_status" >&5
25704 (exit "$ac_status"); } &&
25705 { ac_try='test -s "conftest.$ac_objext"'
25706 { (eval echo "$as_me:25706: \"$ac_try\"") >&5
25707 (eval $ac_try) 2>&5
25708 ac_status=$?
25709 echo "$as_me:25709: \$? = $ac_status" >&5
25710 (exit "$ac_status"); }; }; then
25711 cf_cv_arg_union_wait=yes
25712 else
25713 echo "$as_me: failed program was:" >&5
25714 cat "conftest.$ac_ext" >&5
25715 cf_cv_arg_union_wait=no
25716 fi
25717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25718
25719 fi
25720
25721 echo "$as_me:25721: result: $cf_cv_arg_union_wait" >&5
25722 echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
25723 test "$cf_cv_arg_union_wait" = yes &&
25724 cat >>confdefs.h <<\EOF
25725 #define WAIT_USES_UNION 1
25726 EOF
25727
25728 echo "$as_me:25728: checking if union wait can be used as waitpid-arg" >&5
25729 echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
25730 if test "${cf_cv_arg_union_waitpid+set}" = set; then
25731 echo $ECHO_N "(cached) $ECHO_C" >&6
25732 else
25733
25734 cat >"conftest.$ac_ext" <<_ACEOF
25735 #line 25735 "configure"
25736 #include "confdefs.h"
25737 $cf_wait_headers
25738 int
25739 main (void)
25740 {
25741 union wait x; waitpid(0, &x, 0)
25742 ;
25743 return 0;
25744 }
25745 _ACEOF
25746 rm -f "conftest.$ac_objext"
25747 if { (eval echo "$as_me:25747: \"$ac_compile\"") >&5
25748 (eval $ac_compile) 2>&5
25749 ac_status=$?
25750 echo "$as_me:25750: \$? = $ac_status" >&5
25751 (exit "$ac_status"); } &&
25752 { ac_try='test -s "conftest.$ac_objext"'
25753 { (eval echo "$as_me:25753: \"$ac_try\"") >&5
25754 (eval $ac_try) 2>&5
25755 ac_status=$?
25756 echo "$as_me:25756: \$? = $ac_status" >&5
25757 (exit "$ac_status"); }; }; then
25758 cf_cv_arg_union_waitpid=yes
25759 else
25760 echo "$as_me: failed program was:" >&5
25761 cat "conftest.$ac_ext" >&5
25762 cf_cv_arg_union_waitpid=no
25763 fi
25764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25765
25766 fi
25767
25768 echo "$as_me:25768: result: $cf_cv_arg_union_waitpid" >&5
25769 echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
25770 test "$cf_cv_arg_union_waitpid" = yes &&
25771 cat >>confdefs.h <<\EOF
25772 #define WAITPID_USES_UNION 1
25773 EOF
25774
25775 fi
25776
25777 echo "$as_me:25777: checking if we must include wchar.h to declare mbstate_t" >&5
25778 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
25779 if test "${cf_cv_mbstate_t+set}" = set; then
25780 echo $ECHO_N "(cached) $ECHO_C" >&6
25781 else
25782
25783 cat >"conftest.$ac_ext" <<_ACEOF
25784 #line 25784 "configure"
25785 #include "confdefs.h"
25786
25787 #include <stdlib.h>
25788 #include <stdio.h>
25789 #ifdef HAVE_LIBUTF8_H
25790 #include <libutf8.h>
25791 #endif
25792 int
25793 main (void)
25794 {
25795 mbstate_t state; (void)state
25796 ;
25797 return 0;
25798 }
25799 _ACEOF
25800 rm -f "conftest.$ac_objext"
25801 if { (eval echo "$as_me:25801: \"$ac_compile\"") >&5
25802 (eval $ac_compile) 2>&5
25803 ac_status=$?
25804 echo "$as_me:25804: \$? = $ac_status" >&5
25805 (exit "$ac_status"); } &&
25806 { ac_try='test -s "conftest.$ac_objext"'
25807 { (eval echo "$as_me:25807: \"$ac_try\"") >&5
25808 (eval $ac_try) 2>&5
25809 ac_status=$?
25810 echo "$as_me:25810: \$? = $ac_status" >&5
25811 (exit "$ac_status"); }; }; then
25812 cf_cv_mbstate_t=no
25813 else
25814 echo "$as_me: failed program was:" >&5
25815 cat "conftest.$ac_ext" >&5
25816 cat >"conftest.$ac_ext" <<_ACEOF
25817 #line 25817 "configure"
25818 #include "confdefs.h"
25819
25820 #include <stdlib.h>
25821 #include <stdio.h>
25822 #include <wchar.h>
25823 #ifdef HAVE_LIBUTF8_H
25824 #include <libutf8.h>
25825 #endif
25826 int
25827 main (void)
25828 {
25829 mbstate_t value; (void)value
25830 ;
25831 return 0;
25832 }
25833 _ACEOF
25834 rm -f "conftest.$ac_objext"
25835 if { (eval echo "$as_me:25835: \"$ac_compile\"") >&5
25836 (eval $ac_compile) 2>&5
25837 ac_status=$?
25838 echo "$as_me:25838: \$? = $ac_status" >&5
25839 (exit "$ac_status"); } &&
25840 { ac_try='test -s "conftest.$ac_objext"'
25841 { (eval echo "$as_me:25841: \"$ac_try\"") >&5
25842 (eval $ac_try) 2>&5
25843 ac_status=$?
25844 echo "$as_me:25844: \$? = $ac_status" >&5
25845 (exit "$ac_status"); }; }; then
25846 cf_cv_mbstate_t=yes
25847 else
25848 echo "$as_me: failed program was:" >&5
25849 cat "conftest.$ac_ext" >&5
25850 cf_cv_mbstate_t=unknown
25851 fi
25852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25853 fi
25854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25855 fi
25856 echo "$as_me:25856: result: $cf_cv_mbstate_t" >&5
25857 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
25858
25859 if test "$cf_cv_mbstate_t" = yes ; then
25860
25861 cat >>confdefs.h <<\EOF
25862 #define NEED_WCHAR_H 1
25863 EOF
25864
25865 fi
25866
25867 if test "$cf_cv_mbstate_t" != unknown ; then
25868
25869 cat >>confdefs.h <<\EOF
25870 #define HAVE_MBSTATE_T 1
25871 EOF
25872
25873 fi
25874
25875 for ac_header in sgtty.h \
25876 termio.h \
25877 termios.h \
25878 unistd.h \
25879 sys/ioctl.h \
25880 sys/termio.h \
25881
25882 do
25883 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25884 echo "$as_me:25884: checking for $ac_header" >&5
25885 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25886 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25887 echo $ECHO_N "(cached) $ECHO_C" >&6
25888 else
25889 cat >"conftest.$ac_ext" <<_ACEOF
25890 #line 25890 "configure"
25891 #include "confdefs.h"
25892 #include <$ac_header>
25893 _ACEOF
25894 if { (eval echo "$as_me:25894: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25895 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25896 ac_status=$?
25897 $EGREP -v '^ *\+' conftest.er1 >conftest.err
25898 rm -f conftest.er1
25899 cat conftest.err >&5
25900 echo "$as_me:25900: \$? = $ac_status" >&5
25901 (exit "$ac_status"); } >/dev/null; then
25902 if test -s conftest.err; then
25903 ac_cpp_err=$ac_c_preproc_warn_flag
25904 else
25905 ac_cpp_err=
25906 fi
25907 else
25908 ac_cpp_err=yes
25909 fi
25910 if test -z "$ac_cpp_err"; then
25911 eval "$as_ac_Header=yes"
25912 else
25913 echo "$as_me: failed program was:" >&5
25914 cat "conftest.$ac_ext" >&5
25915 eval "$as_ac_Header=no"
25916 fi
25917 rm -f conftest.err "conftest.$ac_ext"
25918 fi
25919 echo "$as_me:25919: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25920 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25921 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25922 cat >>confdefs.h <<EOF
25923 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25924 EOF
25925
25926 fi
25927 done
25928
25929 if test "$ac_cv_header_termios_h" = yes ; then
25930 case "$CFLAGS $CPPFLAGS" in
25931 (*-D_POSIX_SOURCE*)
25932 termios_bad=dunno ;;
25933 (*) termios_bad=maybe ;;
25934 esac
25935 if test "$termios_bad" = maybe ; then
25936 echo "$as_me:25936: checking whether termios.h needs _POSIX_SOURCE" >&5
25937 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
25938 cat >"conftest.$ac_ext" <<_ACEOF
25939 #line 25939 "configure"
25940 #include "confdefs.h"
25941 #include <termios.h>
25942 int
25943 main (void)
25944 {
25945 struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
25946 ;
25947 return 0;
25948 }
25949 _ACEOF
25950 rm -f "conftest.$ac_objext"
25951 if { (eval echo "$as_me:25951: \"$ac_compile\"") >&5
25952 (eval $ac_compile) 2>&5
25953 ac_status=$?
25954 echo "$as_me:25954: \$? = $ac_status" >&5
25955 (exit "$ac_status"); } &&
25956 { ac_try='test -s "conftest.$ac_objext"'
25957 { (eval echo "$as_me:25957: \"$ac_try\"") >&5
25958 (eval $ac_try) 2>&5
25959 ac_status=$?
25960 echo "$as_me:25960: \$? = $ac_status" >&5
25961 (exit "$ac_status"); }; }; then
25962 termios_bad=no
25963 else
25964 echo "$as_me: failed program was:" >&5
25965 cat "conftest.$ac_ext" >&5
25966
25967 cat >"conftest.$ac_ext" <<_ACEOF
25968 #line 25968 "configure"
25969 #include "confdefs.h"
25970
25971 #define _POSIX_SOURCE
25972 #include <termios.h>
25973 int
25974 main (void)
25975 {
25976 struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
25977 ;
25978 return 0;
25979 }
25980 _ACEOF
25981 rm -f "conftest.$ac_objext"
25982 if { (eval echo "$as_me:25982: \"$ac_compile\"") >&5
25983 (eval $ac_compile) 2>&5
25984 ac_status=$?
25985 echo "$as_me:25985: \$? = $ac_status" >&5
25986 (exit "$ac_status"); } &&
25987 { ac_try='test -s "conftest.$ac_objext"'
25988 { (eval echo "$as_me:25988: \"$ac_try\"") >&5
25989 (eval $ac_try) 2>&5
25990 ac_status=$?
25991 echo "$as_me:25991: \$? = $ac_status" >&5
25992 (exit "$ac_status"); }; }; then
25993 termios_bad=unknown
25994 else
25995 echo "$as_me: failed program was:" >&5
25996 cat "conftest.$ac_ext" >&5
25997 termios_bad=yes
25998 cat >>confdefs.h <<\EOF
25999 #define _POSIX_SOURCE 1
26000 EOF
26001
26002 fi
26003 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26004
26005 fi
26006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26007 echo "$as_me:26007: result: $termios_bad" >&5
26008 echo "${ECHO_T}$termios_bad" >&6
26009 fi
26010 fi
26011
26012 echo "$as_me:26012: checking declaration of size-change" >&5
26013 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
26014 if test "${cf_cv_sizechange+set}" = set; then
26015 echo $ECHO_N "(cached) $ECHO_C" >&6
26016 else
26017
26018 cf_cv_sizechange=unknown
26019 cf_save_CPPFLAGS="$CPPFLAGS"
26020
26021 for cf_opts in "" "NEED_PTEM_H"
26022 do
26023
26024 CPPFLAGS="$cf_save_CPPFLAGS"
26025 if test -n "$cf_opts"
26026 then
26027
26028 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26029 CPPFLAGS="${CPPFLAGS}-D$cf_opts"
26030
26031 fi
26032 cat >"conftest.$ac_ext" <<_ACEOF
26033 #line 26033 "configure"
26034 #include "confdefs.h"
26035 #include <sys/types.h>
26036 #ifdef HAVE_TERMIOS_H
26037 #include <termios.h>
26038 #else
26039 #ifdef HAVE_TERMIO_H
26040 #include <termio.h>
26041 #endif
26042 #endif
26043
26044 #ifdef NEED_PTEM_H
26045 /* This is a workaround for SCO: they neglected to define struct winsize in
26046 * termios.h -- it is only in termio.h and ptem.h
26047 */
26048 #include <sys/stream.h>
26049 #include <sys/ptem.h>
26050 #endif
26051
26052 #ifdef HAVE_SYS_IOCTL_H
26053 #include <sys/ioctl.h>
26054 #endif
26055
26056 int
26057 main (void)
26058 {
26059
26060 #ifdef TIOCGSIZE
26061 struct ttysize win; /* SunOS 3.0... */
26062 int y = win.ts_lines = 2;
26063 int x = win.ts_cols = 1;
26064 (void)y;
26065 (void)x;
26066 #else
26067 #ifdef TIOCGWINSZ
26068 struct winsize win; /* everything else */
26069 int y = win.ws_row = 2;
26070 int x = win.ws_col = 1;
26071 (void)y;
26072 (void)x;
26073 #else
26074 no TIOCGSIZE or TIOCGWINSZ
26075 #endif /* TIOCGWINSZ */
26076 #endif /* TIOCGSIZE */
26077
26078 ;
26079 return 0;
26080 }
26081 _ACEOF
26082 rm -f "conftest.$ac_objext"
26083 if { (eval echo "$as_me:26083: \"$ac_compile\"") >&5
26084 (eval $ac_compile) 2>&5
26085 ac_status=$?
26086 echo "$as_me:26086: \$? = $ac_status" >&5
26087 (exit "$ac_status"); } &&
26088 { ac_try='test -s "conftest.$ac_objext"'
26089 { (eval echo "$as_me:26089: \"$ac_try\"") >&5
26090 (eval $ac_try) 2>&5
26091 ac_status=$?
26092 echo "$as_me:26092: \$? = $ac_status" >&5
26093 (exit "$ac_status"); }; }; then
26094 cf_cv_sizechange=yes
26095 else
26096 echo "$as_me: failed program was:" >&5
26097 cat "conftest.$ac_ext" >&5
26098 cf_cv_sizechange=no
26099 fi
26100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26101
26102 CPPFLAGS="$cf_save_CPPFLAGS"
26103 if test "$cf_cv_sizechange" = yes ; then
26104 echo "size-change succeeded ($cf_opts)" >&5
26105 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
26106 break
26107 fi
26108 done
26109
26110 fi
26111 echo "$as_me:26111: result: $cf_cv_sizechange" >&5
26112 echo "${ECHO_T}$cf_cv_sizechange" >&6
26113 if test "$cf_cv_sizechange" != no ; then
26114
26115 cat >>confdefs.h <<\EOF
26116 #define HAVE_SIZECHANGE 1
26117 EOF
26118
26119 case "$cf_cv_sizechange" in
26120 (NEED*)
26121 cat >>confdefs.h <<EOF
26122 #define $cf_cv_sizechange 1
26123 EOF
26124
26125 ;;
26126 esac
26127 fi
26128
26129 PACKAGE_PREFIX=DLG
26130 PACKAGE_CONFIG=dlg_config.h
26131
26132 EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
26133
26134 cat >"conftest.$ac_ext" <<_ACEOF
26135 #line 26135 "configure"
26136 #include "confdefs.h"
26137 #include <locale.h>
26138 int
26139 main (void)
26140 {
26141 setlocale(LC_ALL, "")
26142 ;
26143 return 0;
26144 }
26145 _ACEOF
26146 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26147 if { (eval echo "$as_me:26147: \"$ac_link\"") >&5
26148 (eval $ac_link) 2>&5
26149 ac_status=$?
26150 echo "$as_me:26150: \$? = $ac_status" >&5
26151 (exit "$ac_status"); } &&
26152 { ac_try='test -s "conftest$ac_exeext"'
26153 { (eval echo "$as_me:26153: \"$ac_try\"") >&5
26154 (eval $ac_try) 2>&5
26155 ac_status=$?
26156 echo "$as_me:26156: \$? = $ac_status" >&5
26157 (exit "$ac_status"); }; }; then
26158
26159 cat >>confdefs.h <<\EOF
26160 #define HAVE_SETLOCALE 1
26161 EOF
26162
26163 else
26164 echo "$as_me: failed program was:" >&5
26165 cat "conftest.$ac_ext" >&5
26166 fi
26167 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26168
26169 echo "$as_me:26169: checking if runtime has nl_langinfo support for first weekday" >&5
26170 echo $ECHO_N "checking if runtime has nl_langinfo support for first weekday... $ECHO_C" >&6
26171 if test "${cf_cv_langinfo_1stday+set}" = set; then
26172 echo $ECHO_N "(cached) $ECHO_C" >&6
26173 else
26174
26175 cat >"conftest.$ac_ext" <<_ACEOF
26176 #line 26176 "configure"
26177 #include "confdefs.h"
26178
26179 #include <langinfo.h>
26180 #include <locale.h>
26181
26182 int
26183 main (void)
26184 {
26185
26186 int first_weekday = nl_langinfo (_NL_TIME_FIRST_WEEKDAY)[0];
26187 char *week_1stday_l = nl_langinfo (_NL_TIME_WEEK_1STDAY);
26188 (void) first_weekday;
26189 (void) week_1stday_l;
26190
26191 ;
26192 return 0;
26193 }
26194 _ACEOF
26195 rm -f "conftest.$ac_objext"
26196 if { (eval echo "$as_me:26196: \"$ac_compile\"") >&5
26197 (eval $ac_compile) 2>&5
26198 ac_status=$?
26199 echo "$as_me:26199: \$? = $ac_status" >&5
26200 (exit "$ac_status"); } &&
26201 { ac_try='test -s "conftest.$ac_objext"'
26202 { (eval echo "$as_me:26202: \"$ac_try\"") >&5
26203 (eval $ac_try) 2>&5
26204 ac_status=$?
26205 echo "$as_me:26205: \$? = $ac_status" >&5
26206 (exit "$ac_status"); }; }; then
26207 cf_cv_langinfo_1stday=yes
26208
26209 else
26210 echo "$as_me: failed program was:" >&5
26211 cat "conftest.$ac_ext" >&5
26212 cf_cv_langinfo_1stday=no
26213
26214 fi
26215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26216
26217 fi
26218 echo "$as_me:26218: result: $cf_cv_langinfo_1stday" >&5
26219 echo "${ECHO_T}$cf_cv_langinfo_1stday" >&6
26220 test "x$cf_cv_langinfo_1stday" = xyes &&
26221 cat >>confdefs.h <<\EOF
26222 #define HAVE_NL_LANGINFO_1STDAY 1
26223 EOF
26224
26225 if test "$GCC" = yes || test "$GXX" = yes
26226 then
26227
26228 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26229 CFLAGS="${CFLAGS}$EXTRA_CFLAGS"
26230
26231 EXTRA_CFLAGS=
26232 fi
26233
26234 echo "$as_me:26234: checking if rpath-hack should be disabled" >&5
26235 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
26236
26237 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
26238 if test "${enable_rpath_hack+set}" = set; then
26239 enableval="$enable_rpath_hack"
26240 test "$enableval" != no && enableval=yes
26241 if test "$enableval" != "yes" ; then
26242 enable_rpath_hack=no
26243 else
26244 enable_rpath_hack=yes
26245 fi
26246 else
26247 enableval=yes
26248 enable_rpath_hack=yes
26249
26250 fi;
26251 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
26252 echo "$as_me:26252: result: $cf_disable_rpath_hack" >&5
26253 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
26254
26255 if test "$enable_rpath_hack" = yes ; then
26256
26257 echo "$as_me:26257: checking for updated LDFLAGS" >&5
26258 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
26259 if test -n "$LD_RPATH_OPT" ; then
26260 echo "$as_me:26260: result: maybe" >&5
26261 echo "${ECHO_T}maybe" >&6
26262
26263 for ac_prog in ldd
26264 do
26265 # Extract the first word of "$ac_prog", so it can be a program name with args.
26266 set dummy $ac_prog; ac_word=$2
26267 echo "$as_me:26267: checking for $ac_word" >&5
26268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26269 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
26270 echo $ECHO_N "(cached) $ECHO_C" >&6
26271 else
26272 if test -n "$cf_ldd_prog"; then
26273 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
26274 else
26275 ac_save_IFS=$IFS; IFS=$ac_path_separator
26276 ac_dummy="$PATH"
26277 for ac_dir in $ac_dummy; do
26278 IFS=$ac_save_IFS
26279 test -z "$ac_dir" && ac_dir=.
26280 $as_executable_p "$ac_dir/$ac_word" || continue
26281 ac_cv_prog_cf_ldd_prog="$ac_prog"
26282 echo "$as_me:26282: found $ac_dir/$ac_word" >&5
26283 break
26284 done
26285
26286 fi
26287 fi
26288 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
26289 if test -n "$cf_ldd_prog"; then
26290 echo "$as_me:26290: result: $cf_ldd_prog" >&5
26291 echo "${ECHO_T}$cf_ldd_prog" >&6
26292 else
26293 echo "$as_me:26293: result: no" >&5
26294 echo "${ECHO_T}no" >&6
26295 fi
26296
26297 test -n "$cf_ldd_prog" && break
26298 done
26299 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
26300
26301 cf_rpath_list="/usr/lib /lib"
26302 if test "$cf_ldd_prog" != no
26303 then
26304 cf_rpath_oops=
26305
26306 cat >"conftest.$ac_ext" <<_ACEOF
26307 #line 26307 "configure"
26308 #include "confdefs.h"
26309 #include <stdio.h>
26310 int
26311 main (void)
26312 {
26313 printf("Hello");
26314 ;
26315 return 0;
26316 }
26317 _ACEOF
26318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26319 if { (eval echo "$as_me:26319: \"$ac_link\"") >&5
26320 (eval $ac_link) 2>&5
26321 ac_status=$?
26322 echo "$as_me:26322: \$? = $ac_status" >&5
26323 (exit "$ac_status"); } &&
26324 { ac_try='test -s "conftest$ac_exeext"'
26325 { (eval echo "$as_me:26325: \"$ac_try\"") >&5
26326 (eval $ac_try) 2>&5
26327 ac_status=$?
26328 echo "$as_me:26328: \$? = $ac_status" >&5
26329 (exit "$ac_status"); }; }; then
26330 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
26331 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
26332 else
26333 echo "$as_me: failed program was:" >&5
26334 cat "conftest.$ac_ext" >&5
26335 fi
26336 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26337
26338 # If we passed the link-test, but get a "not found" on a given library,
26339 # this could be due to inept reconfiguration of gcc to make it only
26340 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
26341 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
26342 # /usr/local libraries.
26343 if test -n "$cf_rpath_oops"
26344 then
26345 for cf_rpath_src in $cf_rpath_oops
26346 do
26347 for cf_rpath_dir in \
26348 /usr/local \
26349 /usr/pkg \
26350 /opt/sfw
26351 do
26352 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
26353 then
26354 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
26355
26356 echo "${as_me:-configure}:26356: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
26357
26358 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
26359 break
26360 fi
26361 done
26362 done
26363 fi
26364 fi
26365
26366 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
26367
26368 echo "${as_me:-configure}:26368: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
26369
26370 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
26371
26372 echo "${as_me:-configure}:26372: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
26373
26374 cf_rpath_dst=
26375 for cf_rpath_src in $LDFLAGS
26376 do
26377 case "$cf_rpath_src" in
26378 (-L*)
26379
26380 # check if this refers to a directory which we will ignore
26381 cf_rpath_skip=no
26382 if test -n "$cf_rpath_list"
26383 then
26384 for cf_rpath_item in $cf_rpath_list
26385 do
26386 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
26387 then
26388 cf_rpath_skip=yes
26389 break
26390 fi
26391 done
26392 fi
26393
26394 if test "$cf_rpath_skip" = no
26395 then
26396 # transform the option
26397 if test "$LD_RPATH_OPT" = "-R " ; then
26398 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
26399 else
26400 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
26401 fi
26402
26403 # if we have not already added this, add it now
26404 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
26405 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
26406 then
26407 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
26408
26409 echo "${as_me:-configure}:26409: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
26410
26411 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
26412 fi
26413 fi
26414 ;;
26415 esac
26416 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
26417 done
26418 LDFLAGS=$cf_rpath_dst
26419
26420 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
26421
26422 echo "${as_me:-configure}:26422: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
26423
26424 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
26425
26426 echo "${as_me:-configure}:26426: testing ...checking LIBS $LIBS ..." 1>&5
26427
26428 cf_rpath_dst=
26429 for cf_rpath_src in $LIBS
26430 do
26431 case "$cf_rpath_src" in
26432 (-L*)
26433
26434 # check if this refers to a directory which we will ignore
26435 cf_rpath_skip=no
26436 if test -n "$cf_rpath_list"
26437 then
26438 for cf_rpath_item in $cf_rpath_list
26439 do
26440 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
26441 then
26442 cf_rpath_skip=yes
26443 break
26444 fi
26445 done
26446 fi
26447
26448 if test "$cf_rpath_skip" = no
26449 then
26450 # transform the option
26451 if test "$LD_RPATH_OPT" = "-R " ; then
26452 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
26453 else
26454 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
26455 fi
26456
26457 # if we have not already added this, add it now
26458 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
26459 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
26460 then
26461 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
26462
26463 echo "${as_me:-configure}:26463: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
26464
26465 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
26466 fi
26467 fi
26468 ;;
26469 esac
26470 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
26471 done
26472 LIBS=$cf_rpath_dst
26473
26474 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
26475
26476 echo "${as_me:-configure}:26476: testing ...checked LIBS $LIBS ..." 1>&5
26477
26478 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
26479
26480 echo "${as_me:-configure}:26480: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
26481
26482 else
26483 echo "$as_me:26483: result: no" >&5
26484 echo "${ECHO_T}no" >&6
26485 fi
26486
26487 fi
26488
26489 cf_libname=\${LIB_BASENAME}
26490 cf_liblink=$cf_libname
26491 cf_libroot=$cf_libname
26492
26493 if test "x$cf_cv_do_symlinks" = xyes
26494 then
26495 case "x$cf_cv_shlib_version" in
26496 (xrel)
26497 cf_liblink="\${LIB_ABI_NAME}"
26498 cf_libname="\${LIB_REL_NAME}"
26499 ;;
26500 (xabi)
26501 cf_liblink="\${LIB_REL_NAME}"
26502 cf_libname="\${LIB_ABI_NAME}"
26503 ;;
26504 esac
26505 fi
26506 LIB_TARGET=$cf_libname
26507
26508 SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS
26509 LIB_BASENAME = \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}
26510 LIB_REL_NAME = \${LIB_BASENAME}.\${REL_VERSION}
26511 LIB_ABI_NAME = \${LIB_BASENAME}.\${ABI_VERSION}
26512 LIB_TARGET = $LIB_TARGET
26513 RM_SHARED_OPTS = $RM_SHARED_OPTS
26514 # end CF__DEFINE_SHLIB_VARS"
26515
26516 echo "$as_me:26516: checking for linker search path" >&5
26517 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26518 if test "${cf_cv_ld_searchpath+set}" = set; then
26519 echo $ECHO_N "(cached) $ECHO_C" >&6
26520 else
26521
26522 if test "$cross_compiling" != yes ; then
26523
26524 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26525 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26526
26527 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26528 # update the cache, which makes it run faster.
26529 test -z "$cf_pathlist" && \
26530 cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[ ]/d' -e 's/:$//' | sort -u`
26531
26532 test -z "$cf_pathlist" &&
26533 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[ ]/d' -e 's/:$//p' | sort -u`
26534
26535 # This works with OpenBSD 6.5, which lists only filenames
26536 test -z "$cf_pathlist" &&
26537 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26538
26539 if test -z "$cf_pathlist"
26540 then
26541 # dyld default path with MacOS
26542 if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26543 then
26544 # do this to bypass check
26545 cf_cv_ld_searchpath='$HOME/lib'
26546 cf_pathlist="/usr/local/lib /lib /usr/lib"
26547 fi
26548 fi
26549
26550 if test -z "$cf_pathlist"
26551 then
26552 # Solaris is "SunOS"
26553 if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
26554 then
26555 case x`(isainfo -b)` in
26556 (x64)
26557 cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
26558 ;;
26559 (x32)
26560 test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
26561 cf_pathlist="$cf_pathlist /lib /usr/lib"
26562 ;;
26563 (*)
26564 { echo "$as_me:26564: WARNING: problem with Solaris architecture" >&5
26565 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
26566 ;;
26567 esac
26568 fi
26569 fi
26570
26571 if test -z "$cf_pathlist"
26572 then
26573 # HP-UX
26574 if test x"`uname -s`" = xHP-UX
26575 then
26576 case x`getconf LONG_BIT` in
26577 (x64)
26578 cf_pathlist="/usr/lib/hpux64"
26579 ;;
26580 (x*)
26581 cf_pathlist="/usr/lib/hpux32"
26582 ;;
26583 esac
26584 fi
26585 fi
26586
26587 fi
26588
26589 # If nothing else, assume it is conventional
26590 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26591
26592 # Finally, check that this is only directories
26593 for cf_path in $0 $cf_pathlist
26594 do
26595 if test -d "$cf_path"; then
26596 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26597 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26598 fi
26599 done
26600
26601 # Ensure that it is nonempty
26602 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26603
26604 fi
26605 echo "$as_me:26605: result: $cf_cv_ld_searchpath" >&5
26606 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26607
26608 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26609
26610 ac_config_files="$ac_config_files dialog-config gen-pkgconfig makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
26611
26612 ac_config_commands="$ac_config_commands default"
26613
26614 DEFS=-DHAVE_CONFIG_H
26615
26616 cat >confcache <<\_ACEOF
26617 # This file is a shell script that caches the results of configure
26618 # tests run on this system so they can be shared between configure
26619 # scripts and configure runs, see configure's option --config-cache.
26620 # It is not useful on other systems. If it contains results you don't
26621 # want to keep, you may remove or edit it.
26622 #
26623 # config.status only pays attention to the cache file if you give it
26624 # the --recheck option to rerun configure.
26625 #
26626 # `ac_cv_env_foo' variables (set or unset) will be overridden when
26627 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26628 # following values.
26629
26630 _ACEOF
26631
26632 # The following way of writing the cache mishandles newlines in values,
26633 # but we know of no workaround that is simple, portable, and efficient.
26634 # So, don't put newlines in cache variables' values.
26635 # Ultrix sh set writes to stderr and can't be redirected directly,
26636 # and sets the high bit in the cache file unless we assign to the vars.
26637 {
26638 (set) 2>&1 |
26639 case `(ac_space=' '; set | grep ac_space) 2>&1` in
26640 *ac_space=\ *)
26641 # `set' does not quote correctly, so add quotes (double-quote
26642 # substitution turns \\\\ into \\, and sed turns \\ into \).
26643 sed -n \
26644 "s/'/'\\\\''/g;
26645 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26646 ;;
26647 *)
26648 # `set' quotes correctly as required by POSIX, so do not add quotes.
26649 sed -n \
26650 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26651 ;;
26652 esac;
26653 } |
26654 sed '
26655 t clear
26656 : clear
26657 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26658 t end
26659 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26660 : end' >>confcache
26661 if cmp -s $cache_file confcache; then :; else
26662 if test -w $cache_file; then
26663 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26664 cat confcache >$cache_file
26665 else
26666 echo "not updating unwritable cache $cache_file"
26667 fi
26668 fi
26669 rm -f confcache
26670
26671 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26672 # Let make expand exec_prefix.
26673 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26674
26675 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26676 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26677 # trailing colons and then remove the whole line if VPATH becomes empty
26678 # (actually we leave an empty line to preserve line numbers).
26679 if test "x$srcdir" = x.; then
26680 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26681 s/:*\$(srcdir):*/:/;
26682 s/:*\${srcdir}:*/:/;
26683 s/:*@srcdir@:*/:/;
26684 s/^\([^=]*=[ ]*\):*/\1/;
26685 s/:*$//;
26686 s/^[^=]*=[ ]*$//;
26687 }'
26688 fi
26689
26690 DEFS=-DHAVE_CONFIG_H
26691
26692 : "${CONFIG_STATUS=./config.status}"
26693 ac_clean_files_save=$ac_clean_files
26694 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26695 { echo "$as_me:26695: creating $CONFIG_STATUS" >&5
26696 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26697 cat >"$CONFIG_STATUS" <<_ACEOF
26698 #! $SHELL
26699 # Generated automatically by configure.
26700 # Run this file to recreate the current configuration.
26701 # Compiler output produced by configure, useful for debugging
26702 # configure, is in config.log if it exists.
26703
26704 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
26705
26706 debug=false
26707 SHELL=\${CONFIG_SHELL-$SHELL}
26708 ac_cs_invocation="\$0 \$@"
26709
26710 CLICOLOR_FORCE= GREP_OPTIONS=
26711 unset CLICOLOR_FORCE GREP_OPTIONS
26712 _ACEOF
26713
26714 cat >>"$CONFIG_STATUS" <<\_ACEOF
26715 # Be Bourne compatible
26716 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26717 emulate sh
26718 NULLCMD=:
26719 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26720 set -o posix
26721 fi
26722
26723 # Name of the executable.
26724 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26725
26726 if expr a : '\(a\)' >/dev/null 2>&1; then
26727 as_expr="expr"
26728 else
26729 as_expr="false"
26730 fi
26731
26732 rm -f conf$$ conf$$.exe conf$$.file
26733 echo >conf$$.file
26734 if ln -s conf$$.file conf$$ 2>/dev/null; then
26735 # We could just check for DJGPP; but this test a) works b) is more generic
26736 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26737 if test -f conf$$.exe; then
26738 # Don't use ln at all; we don't have any links
26739 as_ln_s='cp -p'
26740 else
26741 as_ln_s='ln -s'
26742 fi
26743 elif ln conf$$.file conf$$ 2>/dev/null; then
26744 as_ln_s='ln'
26745 else
26746 as_ln_s='cp -p'
26747 fi
26748 rm -f conf$$ conf$$.exe conf$$.file
26749
26750 as_executable_p="test -f"
26751
26752 # Support unset when possible.
26753 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26754 as_unset="unset"
26755 else
26756 as_unset="false"
26757 fi
26758
26759 # NLS nuisances.
26760 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26761 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26762 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26763 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26764 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26765 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26766 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26767 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26768
26769 # IFS
26770 # We need space, tab and new line, in precisely that order.
26771 as_nl='
26772 '
26773 IFS=" $as_nl"
26774
26775 # CDPATH.
26776 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26777
26778 exec 6>&1
26779
26780 _ACEOF
26781
26782 # Files that config.status was made for.
26783 if test -n "$ac_config_files"; then
26784 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
26785 fi
26786
26787 if test -n "$ac_config_headers"; then
26788 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
26789 fi
26790
26791 if test -n "$ac_config_links"; then
26792 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
26793 fi
26794
26795 if test -n "$ac_config_commands"; then
26796 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
26797 fi
26798
26799 cat >>"$CONFIG_STATUS" <<\EOF
26800
26801 ac_cs_usage="\
26802 \`$as_me' instantiates files from templates according to the
26803 current configuration.
26804
26805 Usage: $0 [OPTIONS] [FILE]...
26806
26807 -h, --help print this help, then exit
26808 -V, --version print version number, then exit
26809 -d, --debug don't remove temporary files
26810 --recheck update $as_me by reconfiguring in the same conditions
26811 --file=FILE[:TEMPLATE]
26812 instantiate the configuration file FILE
26813 --header=FILE[:TEMPLATE]
26814 instantiate the configuration header FILE
26815
26816 Configuration files:
26817 $config_files
26818
26819 Configuration headers:
26820 $config_headers
26821
26822 Configuration commands:
26823 $config_commands
26824
26825 Report bugs to <[email protected]>."
26826 EOF
26827
26828 cat >>"$CONFIG_STATUS" <<EOF
26829 ac_cs_version="\\
26830 config.status
26831 configured by $0, generated by GNU Autoconf 2.52.20250126,
26832 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26833
26834 Copyright 2003-2022,2023 Thomas E. Dickey
26835 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26836 Free Software Foundation, Inc.
26837 This config.status script is free software; the Free Software Foundation
26838 gives unlimited permission to copy, distribute and modify it."
26839 srcdir="$srcdir"
26840 INSTALL="$INSTALL"
26841 EOF
26842
26843 cat >>"$CONFIG_STATUS" <<\EOF
26844 # If no file are specified by the user, then we need to provide default
26845 # value. By we need to know if files were specified by the user.
26846 ac_need_defaults=:
26847 while test $# != 0
26848 do
26849 case $1 in
26850 --*=*)
26851 ac_option=`expr "x$1" : 'x\([^=]*\)='`
26852 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26853 shift
26854 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26855 shift
26856 ;;
26857 -*);;
26858 *) # This is not an option, so the user has probably given explicit
26859 # arguments.
26860 ac_need_defaults=false;;
26861 esac
26862
26863 case $1 in
26864 # Handling of the options.
26865 EOF
26866 cat >>"$CONFIG_STATUS" <<EOF
26867 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26868 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26869 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26870 EOF
26871 cat >>"$CONFIG_STATUS" <<\EOF
26872 --version | --vers* | -V )
26873 echo "$ac_cs_version"; exit 0 ;;
26874 --he | --h)
26875 # Conflict between --help and --header
26876 { { echo "$as_me:26876: error: ambiguous option: $1
26877 Try \`$0 --help' for more information." >&5
26878 echo "$as_me: error: ambiguous option: $1
26879 Try \`$0 --help' for more information." >&2;}
26880 { (exit 1); exit 1; }; };;
26881 --help | --hel | -h )
26882 echo "$ac_cs_usage"; exit 0 ;;
26883 --debug | --d* | -d )
26884 debug=: ;;
26885 --file | --fil | --fi | --f )
26886 shift
26887 CONFIG_FILES="$CONFIG_FILES $1"
26888 ac_need_defaults=false;;
26889 --header | --heade | --head | --hea )
26890 shift
26891 CONFIG_HEADERS="$CONFIG_HEADERS $1"
26892 ac_need_defaults=false;;
26893
26894 # This is an error.
26895 -*) { { echo "$as_me:26895: error: unrecognized option: $1
26896 Try \`$0 --help' for more information." >&5
26897 echo "$as_me: error: unrecognized option: $1
26898 Try \`$0 --help' for more information." >&2;}
26899 { (exit 1); exit 1; }; } ;;
26900
26901 *) ac_config_targets="$ac_config_targets $1" ;;
26902
26903 esac
26904 shift
26905 done
26906
26907 exec 5>>config.log
26908 cat >&5 << _ACEOF
26909
26910 ## ----------------------- ##
26911 ## Running config.status. ##
26912 ## ----------------------- ##
26913
26914 This file was extended by $as_me 2.52.20250126, executed with
26915 CONFIG_FILES = $CONFIG_FILES
26916 CONFIG_HEADERS = $CONFIG_HEADERS
26917 CONFIG_LINKS = $CONFIG_LINKS
26918 CONFIG_COMMANDS = $CONFIG_COMMANDS
26919 > "$ac_cs_invocation"
26920 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26921
26922 _ACEOF
26923 EOF
26924
26925 cat >>"$CONFIG_STATUS" <<EOF
26926 #
26927 # INIT-COMMANDS section.
26928 #
26929
26930 ABI_VERSION="$ABI_VERSION"
26931 REL_VERSION="$REL_VERSION"
26932 LIB_MODEL="$LIB_MODEL"
26933 LIB_PREFIX="$LIB_PREFIX"
26934 LIB_ROOTNAME="$LIB_ROOTNAME"
26935 DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
26936 RM_SHARED_OPTS="$RM_SHARED_OPTS"
26937 cf_cv_do_symlinks="$cf_cv_do_symlinks"
26938 cf_cv_shlib_version="$cf_cv_shlib_version"
26939
26940 EOF
26941
26942 cat >>"$CONFIG_STATUS" <<\EOF
26943 for ac_config_target in $ac_config_targets
26944 do
26945 case "$ac_config_target" in
26946 # Handling of arguments.
26947 "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
26948 "gen-pkgconfig" ) CONFIG_FILES="$CONFIG_FILES gen-pkgconfig" ;;
26949 "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
26950 "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
26951 "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
26952 "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
26953 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26954 "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
26955 *) { { echo "$as_me:26955: error: invalid argument: $ac_config_target" >&5
26956 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
26957 { (exit 1); exit 1; }; };;
26958 esac
26959 done
26960
26961 # If the user did not use the arguments to specify the items to instantiate,
26962 # then the envvar interface is used. Set only those that are not.
26963 # We use the long form for the default assignment because of an extremely
26964 # bizarre bug on SunOS 4.1.3.
26965 if "$ac_need_defaults"; then
26966 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26967 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26968 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26969 fi
26970
26971 # Create a temporary directory, and hook for its removal unless debugging.
26972 $debug ||
26973 {
26974 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26975 trap '{ (exit 1); exit 1; }' 1 2 13 15
26976 }
26977
26978 # Create a (secure) tmp directory for tmp files.
26979 : "${TMPDIR=/tmp}"
26980 {
26981 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26982 test -n "$tmp" && test -d "$tmp"
26983 } ||
26984 {
26985 tmp=$TMPDIR/cs$$-$RANDOM
26986 (umask 077 && mkdir "$tmp")
26987 } ||
26988 {
26989 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26990 { (exit 1); exit 1; }
26991 }
26992
26993 EOF
26994
26995 cat >>"$CONFIG_STATUS" <<EOF
26996
26997 #
26998 # CONFIG_FILES section.
26999 #
27000
27001 # No need to generate the scripts if there are no CONFIG_FILES.
27002 # This happens for instance when ./config.status config.h
27003 if test -n "\$CONFIG_FILES"; then
27004 # Protect against being on the right side of a sed subst in config.status.
27005 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27006 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
27007 s,@SHELL@,$SHELL,;t t
27008 s,@exec_prefix@,$exec_prefix,;t t
27009 s,@prefix@,$prefix,;t t
27010 s,@program_transform_name@,$program_transform_name,;t t
27011 s,@bindir@,$bindir,;t t
27012 s,@sbindir@,$sbindir,;t t
27013 s,@libexecdir@,$libexecdir,;t t
27014 s,@datarootdir@,$datarootdir,;t t
27015 s,@datadir@,$datadir,;t t
27016 s,@sysconfdir@,$sysconfdir,;t t
27017 s,@sharedstatedir@,$sharedstatedir,;t t
27018 s,@localstatedir@,$localstatedir,;t t
27019 s,@runstatedir@,$runstatedir,;t t
27020 s,@libdir@,$libdir,;t t
27021 s,@includedir@,$includedir,;t t
27022 s,@oldincludedir@,$oldincludedir,;t t
27023 s,@infodir@,$infodir,;t t
27024 s,@mandir@,$mandir,;t t
27025 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27026 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27027 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27028 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27029 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27030 s,@build_alias@,$build_alias,;t t
27031 s,@host_alias@,$host_alias,;t t
27032 s,@target_alias@,$target_alias,;t t
27033 s,@ECHO_C@,$ECHO_C,;t t
27034 s,@ECHO_N@,$ECHO_N,;t t
27035 s,@ECHO_T@,$ECHO_T,;t t
27036 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27037 s,@DEFS@,$DEFS,;t t
27038 s,@LIBS@,$LIBS,;t t
27039 s,@build@,$build,;t t
27040 s,@build_cpu@,$build_cpu,;t t
27041 s,@build_vendor@,$build_vendor,;t t
27042 s,@build_os@,$build_os,;t t
27043 s,@host@,$host,;t t
27044 s,@host_cpu@,$host_cpu,;t t
27045 s,@host_vendor@,$host_vendor,;t t
27046 s,@host_os@,$host_os,;t t
27047 s,@target@,$target,;t t
27048 s,@target_cpu@,$target_cpu,;t t
27049 s,@target_vendor@,$target_vendor,;t t
27050 s,@target_os@,$target_os,;t t
27051 s,@DESTDIR@,$DESTDIR,;t t
27052 s,@CC@,$CC,;t t
27053 s,@CFLAGS@,$CFLAGS,;t t
27054 s,@LDFLAGS@,$LDFLAGS,;t t
27055 s,@CPPFLAGS@,$CPPFLAGS,;t t
27056 s,@ac_ct_CC@,$ac_ct_CC,;t t
27057 s,@EXEEXT@,$EXEEXT,;t t
27058 s,@OBJEXT@,$OBJEXT,;t t
27059 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27060 s,@CPP@,$CPP,;t t
27061 s,@GREP@,$GREP,;t t
27062 s,@EGREP@,$EGREP,;t t
27063 s,@SET_MAKE@,$SET_MAKE,;t t
27064 s,@RANLIB@,$RANLIB,;t t
27065 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27066 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27067 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27068 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27069 s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
27070 s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
27071 s,@LN_S@,$LN_S,;t t
27072 s,@LINT@,$LINT,;t t
27073 s,@LINT_OPTS@,$LINT_OPTS,;t t
27074 s,@LINT_LIBS@,$LINT_LIBS,;t t
27075 s,@GROFF_PATH@,$GROFF_PATH,;t t
27076 s,@NROFF_PATH@,$NROFF_PATH,;t t
27077 s,@TBL_PATH@,$TBL_PATH,;t t
27078 s,@GROFF_NOTE@,$GROFF_NOTE,;t t
27079 s,@NROFF_NOTE@,$NROFF_NOTE,;t t
27080 s,@AR@,$AR,;t t
27081 s,@ac_ct_AR@,$ac_ct_AR,;t t
27082 s,@ARFLAGS@,$ARFLAGS,;t t
27083 s,@FGREP@,$FGREP,;t t
27084 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27085 s,@CTAGS@,$CTAGS,;t t
27086 s,@ETAGS@,$ETAGS,;t t
27087 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27088 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27089 s,@ECHO_LT@,$ECHO_LT,;t t
27090 s,@ECHO_LD@,$ECHO_LD,;t t
27091 s,@RULE_CC@,$RULE_CC,;t t
27092 s,@SHOW_CC@,$SHOW_CC,;t t
27093 s,@ECHO_CC@,$ECHO_CC,;t t
27094 s,@PROG_EXT@,$PROG_EXT,;t t
27095 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27096 s,@X_CFLAGS@,$X_CFLAGS,;t t
27097 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
27098 s,@X_LIBS@,$X_LIBS,;t t
27099 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
27100 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27101 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
27102 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
27103 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27104 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27105 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27106 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27107 s,@VERSION@,$VERSION,;t t
27108 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27109 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27110 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27111 s,@PROGRAM@,$PROGRAM,;t t
27112 s,@PACKAGE@,$PACKAGE,;t t
27113 s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
27114 s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
27115 s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
27116 s,@SUB_INC@,$SUB_INC,;t t
27117 s,@cf_man2html@,$cf_man2html,;t t
27118 s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
27119 s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
27120 s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
27121 s,@CONFIG_H@,$CONFIG_H,;t t
27122 s,@LIBICONV@,$LIBICONV,;t t
27123 s,@USE_NLS@,$USE_NLS,;t t
27124 s,@MSGFMT@,$MSGFMT,;t t
27125 s,@GMSGFMT@,$GMSGFMT,;t t
27126 s,@XGETTEXT@,$XGETTEXT,;t t
27127 s,@CATALOGS@,$CATALOGS,;t t
27128 s,@CATOBJEXT@,$CATOBJEXT,;t t
27129 s,@GMOFILES@,$GMOFILES,;t t
27130 s,@POFILES@,$POFILES,;t t
27131 s,@DATADIRNAME@,$DATADIRNAME,;t t
27132 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
27133 s,@GENCAT@,$GENCAT,;t t
27134 s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
27135 s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
27136 s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
27137 s,@LINK_PREFIX@,$LINK_PREFIX,;t t
27138 s,@READELF@,$READELF,;t t
27139 s,@ac_pt_READELF@,$ac_pt_READELF,;t t
27140 s,@ABI_VERSION@,$ABI_VERSION,;t t
27141 s,@REL_VERSION@,$REL_VERSION,;t t
27142 s,@shlibdir@,$shlibdir,;t t
27143 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27144 s,@LIBTOOL@,$LIBTOOL,;t t
27145 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27146 s,@LT_UNDEF@,$LT_UNDEF,;t t
27147 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27148 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27149 s,@LIB_CREATE@,$LIB_CREATE,;t t
27150 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27151 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27152 s,@LIB_PREP@,$LIB_PREP,;t t
27153 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27154 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27155 s,@LIB_LINK@,$LIB_LINK,;t t
27156 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27157 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27158 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27159 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27160 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27161 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27162 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27163 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27164 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27165 s,@LINK_PROGS@,$LINK_PROGS,;t t
27166 s,@LINK_TESTS@,$LINK_TESTS,;t t
27167 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27168 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27169 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27170 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27171 s,@RPATH_LIST@,$RPATH_LIST,;t t
27172 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27173 s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
27174 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27175 s,@LIB_MODEL@,$LIB_MODEL,;t t
27176 s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
27177 s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
27178 s,@MAKE_SHARED@,$MAKE_SHARED,;t t
27179 s,@MAKE_STATIC@,$MAKE_STATIC,;t t
27180 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27181 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27182 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27183 s,@REQUIRE_PKG@,$REQUIRE_PKG,;t t
27184 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
27185 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
27186 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
27187 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
27188 s,@cf_cv_screen@,$cf_cv_screen,;t t
27189 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
27190 s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
27191 s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
27192 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27193 s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
27194 s,@LIB_TARGET@,$LIB_TARGET,;t t
27195 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27196 CEOF
27197
27198 EOF
27199
27200 cat >>"$CONFIG_STATUS" <<\EOF
27201 # Split the substitutions into bite-sized pieces for seds with
27202 # small command number limits, like on Digital OSF/1 and HP-UX.
27203 ac_max_sed_lines=48
27204 ac_sed_frag=1 # Number of current file.
27205 ac_beg=1 # First line for current file.
27206 ac_end=$ac_max_sed_lines # Line after last line for current file.
27207 ac_more_lines=:
27208 ac_sed_cmds=
27209 while "$ac_more_lines"; do
27210 if test "$ac_beg" -gt 1; then
27211 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
27212 else
27213 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
27214 fi
27215 if test ! -s "$tmp"/subs.frag; then
27216 ac_more_lines=false
27217 else
27218 # The purpose of the label and of the branching condition is to
27219 # speed up the sed processing (if there are no `@' at all, there
27220 # is no need to browse any of the substitutions).
27221 # These are the two extra sed commands mentioned above.
27222 (echo ':t
27223 /@[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
27224 # It is possible to make a multiline substitution using escaped newlines.
27225 # Ensure that we do not split the substitution between script fragments.
27226 ac_BEG=$ac_end
27227 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
27228 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
27229 if test -s "$tmp"/subs.next; then
27230 grep '^s,@[^@,][^@,]*@,.*$' "$tmp"/subs.next | grep -v '^s,@.*;t t$' >"$tmp"/subs.edit
27231 if test ! -s "$tmp"/subs.edit; then
27232 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
27233 if test ! -s "$tmp"/subs.edit; then
27234 if test "$ac_beg" -gt 1; then
27235 ac_end=`expr "$ac_end" - 1`
27236 continue
27237 fi
27238 fi
27239 fi
27240 fi
27241
27242 if test -z "$ac_sed_cmds"; then
27243 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
27244 else
27245 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
27246 fi
27247 ac_sed_frag=`expr "$ac_sed_frag" + 1`
27248 ac_beg=$ac_end
27249 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
27250 fi
27251 done
27252 if test -z "$ac_sed_cmds"; then
27253 ac_sed_cmds="cat"
27254 fi
27255 fi # test -n "$CONFIG_FILES"
27256
27257 EOF
27258 cat >>"$CONFIG_STATUS" <<\EOF
27259 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27260 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27261 case "$ac_file" in
27262 - | *:- | *:-:* ) # input from stdin
27263 cat >"$tmp"/stdin
27264 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27265 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27266 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27267 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27268 * ) ac_file_in=$ac_file.in ;;
27269 esac
27270
27271 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27272 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27273 X"$ac_file" : 'X\(//\)[^/]' \| \
27274 X"$ac_file" : 'X\(//\)$' \| \
27275 X"$ac_file" : 'X\(/\)' \| \
27276 . : '\(.\)' 2>/dev/null ||
27277 echo X"$ac_file" |
27278 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27279 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27280 /^X\(\/\/\)$/{ s//\1/; q; }
27281 /^X\(\/\).*/{ s//\1/; q; }
27282 s/.*/./; q'`
27283 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27284 { case "$ac_dir" in
27285 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27286 *) as_incr_dir=.;;
27287 esac
27288 as_dummy="$ac_dir"
27289 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27290 case $as_mkdir_dir in
27291 # Skip DOS drivespec
27292 ?:) as_incr_dir=$as_mkdir_dir ;;
27293 *)
27294 as_incr_dir=$as_incr_dir/$as_mkdir_dir
27295 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27296 ;;
27297 esac
27298 done; }
27299
27300 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
27301 # A "../" for each directory in $ac_dir_suffix.
27302 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27303 else
27304 ac_dir_suffix= ac_dots=
27305 fi
27306
27307 case "$srcdir" in
27308 .) ac_srcdir=.
27309 if test -z "$ac_dots"; then
27310 ac_top_srcdir=.
27311 else
27312 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
27313 fi ;;
27314 [\\/]* | ?:[\\/]* )
27315 ac_srcdir="$srcdir$ac_dir_suffix";
27316 ac_top_srcdir="$srcdir" ;;
27317 *) # Relative path.
27318 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
27319 ac_top_srcdir="$ac_dots$srcdir" ;;
27320 esac
27321
27322 case $INSTALL in
27323 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27324 *) ac_INSTALL=$ac_dots$INSTALL ;;
27325 esac
27326
27327 if test x"$ac_file" != x-; then
27328 { echo "$as_me:27328: creating $ac_file" >&5
27329 echo "$as_me: creating $ac_file" >&6;}
27330 rm -f "$ac_file"
27331 fi
27332 # Let's still pretend it is `configure' which instantiates (i.e., don't
27333 # use $as_me), people would be surprised to read:
27334 # /* config.h. Generated automatically by config.status. */
27335 configure_input="Generated automatically from `echo $ac_file_in |
27336 sed 's,.*/,,'` by configure."
27337
27338 # First look for the input files in the build tree, otherwise in the
27339 # src tree.
27340 ac_file_inputs=`IFS=:
27341 for f in $ac_file_in; do
27342 case $f in
27343 -) echo "$tmp"/stdin ;;
27344 [\\/$]*)
27345 # Absolute (can't be DOS-style, as IFS=:)
27346 test -f "$f" || { { echo "$as_me:27346: error: cannot find input file: $f" >&5
27347 echo "$as_me: error: cannot find input file: $f" >&2;}
27348 { (exit 1); exit 1; }; }
27349 echo "$f";;
27350 *) # Relative
27351 if test -f "$f"; then
27352 # Build tree
27353 echo "$f"
27354 elif test -f "$srcdir/$f"; then
27355 # Source tree
27356 echo "$srcdir/$f"
27357 else
27358 # /dev/null tree
27359 { { echo "$as_me:27359: error: cannot find input file: $f" >&5
27360 echo "$as_me: error: cannot find input file: $f" >&2;}
27361 { (exit 1); exit 1; }; }
27362 fi;;
27363 esac
27364 done` || { (exit 1); exit 1; }
27365 EOF
27366 cat >>"$CONFIG_STATUS" <<\EOF
27367 ac_warn_datarootdir=no
27368 if test x"$ac_file" != x-; then
27369 for ac_item in $ac_file_inputs
27370 do
27371 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
27372 if test -n "$ac_seen"; then
27373 ac_used=`grep '@datarootdir@' "$ac_item"`
27374 if test -z "$ac_used"; then
27375 { echo "$as_me:27375: WARNING: datarootdir was used implicitly but not set:
27376 $ac_seen" >&5
27377 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27378 $ac_seen" >&2;}
27379 ac_warn_datarootdir=yes
27380 fi
27381 fi
27382 ac_seen=`grep '${datarootdir}' "$ac_item"`
27383 if test -n "$ac_seen"; then
27384 { echo "$as_me:27384: WARNING: datarootdir was used explicitly but not set:
27385 $ac_seen" >&5
27386 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27387 $ac_seen" >&2;}
27388 ac_warn_datarootdir=yes
27389 fi
27390 done
27391 fi
27392
27393 if test "x$ac_warn_datarootdir" = xyes; then
27394 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27395 fi
27396
27397 EOF
27398 cat >>"$CONFIG_STATUS" <<EOF
27399 sed "$ac_vpsub
27400 $extrasub
27401 EOF
27402 cat >>"$CONFIG_STATUS" <<\EOF
27403 :t
27404 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27405 s,@configure_input@,$configure_input,;t t
27406 s,@srcdir@,$ac_srcdir,;t t
27407 s,@top_srcdir@,$ac_top_srcdir,;t t
27408 s,@INSTALL@,$ac_INSTALL,;t t
27409 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
27410 rm -f "$tmp"/stdin
27411 EOF
27412 test -n "${FGREP}" || FGREP="grep -F"
27413 test -n "${EGREP}" || EGREP="grep -E"
27414 cat >>"$CONFIG_STATUS" <<EOF
27415 test -n "\${FGREP}" || FGREP="$FGREP"
27416 test -n "\${EGREP}" || EGREP="$EGREP"
27417 EOF
27418 cat >>"$CONFIG_STATUS" <<\EOF
27419 if test x"$ac_file" != x-; then
27420 cp "$tmp/out" "$ac_file"
27421
27422 for ac_name in prefix exec_prefix datarootdir
27423 do
27424 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
27425 if test -n "$ac_seen"; then
27426 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
27427 if test -z "$ac_init"; then
27428 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
27429 { echo "$as_me:27429: WARNING: Variable $ac_name is used but was not set:
27430 $ac_seen" >&5
27431 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27432 $ac_seen" >&2;}
27433 fi
27434 fi
27435 done
27436 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
27437 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
27438 if test -s "$tmp"/out; then
27439 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
27440 { echo "$as_me:27440: WARNING: Some variables may not be substituted:
27441 $ac_seen" >&5
27442 echo "$as_me: WARNING: Some variables may not be substituted:
27443 $ac_seen" >&2;}
27444 fi
27445 else
27446 cat "$tmp"/out
27447 fi
27448 rm -f "$tmp"/out
27449
27450 done
27451 EOF
27452 cat >>"$CONFIG_STATUS" <<\EOF
27453
27454 #
27455 # CONFIG_HEADER section.
27456 #
27457
27458 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27459 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27460 #
27461 # ac_d sets the value in "#define NAME VALUE" lines.
27462 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
27463 ac_dB='[ ].*$,\1#\2'
27464 ac_dC=' '
27465 ac_dD=',;t'
27466 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27467 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
27468 ac_iB='\([ ]\),\1#\2define\3'
27469 ac_iC=' '
27470 ac_iD='\4,;t'
27471 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27472 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
27473 ac_uB='$,\1#\2define\3'
27474 ac_uC=' '
27475 ac_uD=',;t'
27476
27477 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27478 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27479 case "$ac_file" in
27480 - | *:- | *:-:* ) # input from stdin
27481 cat >"$tmp"/stdin
27482 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27483 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27484 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27485 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27486 * ) ac_file_in=$ac_file.in ;;
27487 esac
27488
27489 test x"$ac_file" != x- && { echo "$as_me:27489: creating $ac_file" >&5
27490 echo "$as_me: creating $ac_file" >&6;}
27491
27492 # First look for the input files in the build tree, otherwise in the
27493 # src tree.
27494 ac_file_inputs=`IFS=:
27495 for f in $ac_file_in; do
27496 case $f in
27497 -) echo "$tmp"/stdin ;;
27498 [\\/$]*)
27499 # Absolute (can't be DOS-style, as IFS=:)
27500 test -f "$f" || { { echo "$as_me:27500: error: cannot find input file: $f" >&5
27501 echo "$as_me: error: cannot find input file: $f" >&2;}
27502 { (exit 1); exit 1; }; }
27503 echo $f;;
27504 *) # Relative
27505 if test -f "$f"; then
27506 # Build tree
27507 echo $f
27508 elif test -f "$srcdir/$f"; then
27509 # Source tree
27510 echo "$srcdir/$f"
27511 else
27512 # /dev/null tree
27513 { { echo "$as_me:27513: error: cannot find input file: $f" >&5
27514 echo "$as_me: error: cannot find input file: $f" >&2;}
27515 { (exit 1); exit 1; }; }
27516 fi;;
27517 esac
27518 done` || { (exit 1); exit 1; }
27519 # Remove the trailing spaces.
27520 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
27521
27522 EOF
27523
27524 # Transform confdefs.h into a list of #define's. We won't use it as a sed
27525 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
27526 # be either 'cat' or 'sort'.
27527 sort -u confdefs.h | uniq >conftest.vals
27528
27529 # Break up conftest.vals because some shells have a limit on
27530 # the size of here documents, and old seds have small limits too.
27531
27532 rm -f conftest.tail
27533 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
27534 while grep . conftest.vals >/dev/null
27535 do
27536 # Write chunks of a limited-size here document to conftest.frag.
27537 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
27538 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
27539 echo 'CEOF' >> "$CONFIG_STATUS"
27540 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
27541 rm -f conftest.vals
27542 mv conftest.tail conftest.vals
27543 done
27544 rm -f conftest.vals
27545
27546 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27547 # marker @DEFS@.
27548 echo ' cat >> conftest.edit <<CEOF
27549 /@DEFS@/r conftest.frag
27550 /@DEFS@/d
27551 CEOF
27552 sed -f conftest.edit "$tmp"/in > "$tmp"/out
27553 rm -f "$tmp"/in
27554 mv "$tmp"/out "$tmp"/in
27555 rm -f conftest.edit conftest.frag
27556 ' >> "$CONFIG_STATUS"
27557
27558 cat >>"$CONFIG_STATUS" <<\EOF
27559 # Let's still pretend it is `configure' which instantiates (i.e., don't
27560 # use $as_me), people would be surprised to read:
27561 # /* config.h. Generated automatically by config.status. */
27562 if test x"$ac_file" = x-; then
27563 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
27564 else
27565 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
27566 fi
27567 cat "$tmp"/in >>"$tmp"/config.h
27568 rm -f "$tmp"/in
27569 if test x"$ac_file" != x-; then
27570 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
27571 { echo "$as_me:27571: $ac_file is unchanged" >&5
27572 echo "$as_me: $ac_file is unchanged" >&6;}
27573 else
27574 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27575 X"$ac_file" : 'X\(//\)[^/]' \| \
27576 X"$ac_file" : 'X\(//\)$' \| \
27577 X"$ac_file" : 'X\(/\)' \| \
27578 . : '\(.\)' 2>/dev/null ||
27579 echo X"$ac_file" |
27580 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27581 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27582 /^X\(\/\/\)$/{ s//\1/; q; }
27583 /^X\(\/\).*/{ s//\1/; q; }
27584 s/.*/./; q'`
27585 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27586 { case "$ac_dir" in
27587 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27588 *) as_incr_dir=.;;
27589 esac
27590 as_dummy="$ac_dir"
27591 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27592 case $as_mkdir_dir in
27593 # Skip DOS drivespec
27594 ?:) as_incr_dir=$as_mkdir_dir ;;
27595 *)
27596 as_incr_dir=$as_incr_dir/$as_mkdir_dir
27597 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27598 ;;
27599 esac
27600 done; }
27601
27602 fi
27603 rm -f "$ac_file"
27604 mv "$tmp/config.h" "$ac_file"
27605 fi
27606 else
27607 cat "$tmp"/config.h
27608 rm -f "$tmp"/config.h
27609 fi
27610 done
27611 EOF
27612 cat >>"$CONFIG_STATUS" <<\EOF
27613 #
27614 # CONFIG_COMMANDS section.
27615 #
27616 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27617 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27618 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27619
27620 case "$ac_dest" in
27621 default-1 ) for ac_file in $CONFIG_FILES; do
27622
27623 # Support "outfile[:infile[:infile...]]"
27624 case "$ac_file" in
27625 (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
27626 esac
27627
27628 # PO directories have a Makefile.in generated from Makefile.inn.
27629 case "$ac_file" in
27630 (*/[Mm]akefile.in)
27631 # Adjust a relative srcdir.
27632 ac_dir="`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`"
27633 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
27634 ac_dots="`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`"
27635 ac_base="`basename $ac_file .in`"
27636 # In autoconf-2.13 it is called $ac_given_srcdir.
27637 # In autoconf-2.50 it is called $srcdir.
27638 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
27639
27640 case "$ac_given_srcdir" in
27641 (.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
27642 (/*) top_srcdir="$ac_given_srcdir" ;;
27643 (*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
27644 esac
27645
27646 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
27647 rm -f "$ac_dir/POTFILES"
27648 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
27649 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
27650 test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
27651 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
27652 fi
27653 ;;
27654 esac
27655 done ;;
27656 default )
27657
27658 cf_libname=\${LIB_BASENAME}
27659 cf_liblink=$cf_libname
27660 cf_libroot=$cf_libname
27661
27662 if test "x$cf_cv_do_symlinks" = xyes
27663 then
27664 case "x$cf_cv_shlib_version" in
27665 (xrel)
27666 cf_liblink="\${LIB_ABI_NAME}"
27667 cf_libname="\${LIB_REL_NAME}"
27668 ;;
27669 (xabi)
27670 cf_liblink="\${LIB_REL_NAME}"
27671 cf_libname="\${LIB_ABI_NAME}"
27672 ;;
27673 esac
27674 fi
27675 LIB_TARGET=$cf_libname
27676
27677 case x$LIB_MODEL in
27678 (xlibtool|xshared)
27679 cf_libdeps="\${LIBS} \${LDFLAGS}"
27680 ;;
27681 (x*)
27682 cf_libdeps=
27683 ;;
27684 esac
27685
27686 cat >>makefile <<CF_EOF
27687
27688 # generated by CF__ADD_SHLIB_RULES
27689 # libmodel: $LIB_MODEL
27690 # symlinks: $cf_cv_do_symlinks
27691 # shlibver: $cf_cv_shlib_version
27692
27693 CF_EOF
27694
27695 cat >>makefile <<CF_EOF
27696 $cf_libname :: \\
27697 CF_EOF
27698
27699 cat >>makefile <<CF_EOF
27700 \${LIB_OBJECT}
27701 @echo linking \$@
27702 \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
27703 CF_EOF
27704
27705 if test "x$cf_cv_do_symlinks" = xyes
27706 then
27707 cat >>makefile <<CF_EOF
27708 \$(LN_S) $cf_libname $cf_liblink
27709 \$(LN_S) $cf_liblink $cf_libroot
27710 CF_EOF
27711 fi
27712
27713 cat >>makefile <<CF_EOF
27714
27715 install \\
27716 install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
27717
27718 \$(DESTDIR)\$(libdir)/$cf_libname :: \\
27719 \$(DESTDIR)\$(libdir) \\
27720 \${LIB_OBJECT}
27721 @echo linking \$@
27722 \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
27723 CF_EOF
27724
27725 if test "x$cf_cv_do_symlinks" = xyes
27726 then
27727 cat >>makefile <<CF_EOF
27728 cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
27729 CF_EOF
27730 fi
27731
27732 if test x$LIB_MODEL = xshared
27733 then
27734 cat >>makefile <<CF_EOF
27735 - \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
27736 CF_EOF
27737 fi
27738
27739 cat >>makefile <<CF_EOF
27740
27741 uninstall \\
27742 uninstall.libs ::
27743 @echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
27744 CF_EOF
27745
27746 if test "x$cf_cv_do_symlinks" = xyes
27747 then
27748 cat >>makefile <<CF_EOF
27749 -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
27750 -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
27751 CF_EOF
27752 fi
27753
27754 cat >>makefile <<CF_EOF
27755 -rm -f \$(DESTDIR)\$(libdir)/$cf_libname
27756
27757 clean \\
27758 clean.libs ::
27759 CF_EOF
27760
27761 if test "x$cf_cv_do_symlinks" = xyes
27762 then
27763 cat >>makefile <<CF_EOF
27764 -rm -f $cf_libroot
27765 -rm -f $cf_liblink
27766 CF_EOF
27767 fi
27768
27769 cat >>makefile <<CF_EOF
27770 -rm -f $cf_libname
27771
27772 mostlyclean::
27773 -rm -f \${LIB_OBJECT}
27774 # end generated by CF__ADD_SHLIB_RULES
27775 CF_EOF
27776
27777 ;;
27778 esac
27779 done
27780 EOF
27781
27782 cat >>"$CONFIG_STATUS" <<\EOF
27783
27784 { (exit 0); exit 0; }
27785 EOF
27786 chmod +x "$CONFIG_STATUS"
27787 ac_clean_files=$ac_clean_files_save
27788
27789 # configure is writing to config.log, and then calls config.status.
27790 # config.status does its own redirection, appending to config.log.
27791 # Unfortunately, on DOS this fails, as config.log is still kept open
27792 # by configure, so config.status won't be able to write to it; its
27793 # output is simply discarded. So we exec the FD to /dev/null,
27794 # effectively closing config.log, so it can be properly (re)opened and
27795 # appended to by config.status. When coming back to configure, we
27796 # need to make the FD available again.
27797 if test "$no_create" != yes; then
27798 ac_cs_success=:
27799 exec 5>/dev/null
27800 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
27801 exec 5>>config.log
27802 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27803 # would make configure fail if this is the last instruction.
27804 "$ac_cs_success" || { (exit 1); exit 1; }
27805 fi
27806