Debian Codegraph @

configure

raw ◀ ▶
1 Debian patch touch this file
1 #! /bin/sh
2 # From configure.in Revision: 1.420 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20260412 for lynx 2.9.3.
5 #
6 # Report bugs to <[email protected]>.
7 #
8 # Copyright 2003-2025,2026 Thomas E. Dickey
9 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
10 # Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13
14 # Avoid depending upon Character Ranges.
15 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18 as_cr_digits='0123456789'
19 as_cr_alnum=$as_cr_Letters$as_cr_digits
20
21 # Sed expression to map a string onto a valid variable name.
22 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
23
24 # Sed expression to map a string onto a valid CPP name.
25 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
26
27 # Be Bourne compatible
28 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 emulate sh
30 NULLCMD=:
31 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 set -o posix
33 fi
34
35 # Name of the executable.
36 as_me=`echo "$0" |sed 's,.*[\\/],,'`
37
38 if expr a : '\(a\)' >/dev/null 2>&1; then
39 as_expr="expr"
40 else
41 as_expr="false"
42 fi
43
44 rm -f conf$$ conf$$.exe conf$$.file
45 echo >conf$$.file
46 if ln -s conf$$.file conf$$ 2>/dev/null; then
47 # We could just check for DJGPP; but this test a) works b) is more generic
48 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
49 if test -f conf$$.exe; then
50 # Don't use ln at all; we don't have any links
51 as_ln_s='cp -p'
52 else
53 as_ln_s='ln -s'
54 fi
55 elif ln conf$$.file conf$$ 2>/dev/null; then
56 as_ln_s='ln'
57 else
58 as_ln_s='cp -p'
59 fi
60 rm -f conf$$ conf$$.exe conf$$.file
61
62 as_executable_p="test -f"
63
64 # Support unset when possible.
65 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
66 as_unset="unset"
67 else
68 as_unset="false"
69 fi
70
71 # NLS nuisances.
72 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
73 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
74 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
75 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
76 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
77 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
78 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
79 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80
81 # IFS
82 # We need space, tab and new line, in precisely that order.
83 as_nl='
84 '
85 IFS=" $as_nl"
86
87 # CDPATH.
88 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89
90 # Name of the host.
91 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
92 # so uname gets run too.
93 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
94
95 exec 6>&1
96
97 #
98 # Initializations.
99 #
100 ac_default_prefix=/usr/local
101 cross_compiling=no
102 subdirs=
103 MFLAGS=
104 MAKEFLAGS=
105 SHELL=${CONFIG_SHELL-/bin/sh}
106
107 # Maximum number of lines to put in a shell here document.
108 # This variable seems obsolete. It should probably be removed, and
109 # only ac_max_sed_lines should be used.
110 : "${ac_max_here_lines=38}"
111
112 ac_unique_file="userdefs.h"
113 ac_default_prefix=/usr/local
114 # Factoring default headers for most tests.
115 ac_includes_default="\
116 #include <stdio.h>
117 #if HAVE_SYS_TYPES_H
118 # include <sys/types.h>
119 #endif
120 #if HAVE_SYS_STAT_H
121 # include <sys/stat.h>
122 #endif
123 #if STDC_HEADERS
124 # include <stdlib.h>
125 # include <stddef.h>
126 #else
127 # if HAVE_STDLIB_H
128 # include <stdlib.h>
129 # endif
130 #endif
131 #if HAVE_STRING_H
132 # if !STDC_HEADERS && HAVE_MEMORY_H
133 # include <memory.h>
134 # endif
135 # include <string.h>
136 #endif
137 #if HAVE_STRINGS_H
138 # include <strings.h>
139 #endif
140 #if HAVE_INTTYPES_H
141 # include <inttypes.h>
142 #else
143 # if HAVE_STDINT_H
144 # include <stdint.h>
145 # endif
146 #endif
147 #if HAVE_UNISTD_H
148 # include <unistd.h>
149 #endif"
150
151 # Initialize some variables set by options.
152 ac_init_help=
153 ac_init_version=false
154 # The variables have the same names as the options, with
155 # dashes changed to underlines.
156 cache_file=/dev/null
157 exec_prefix=NONE
158 no_create=
159 no_recursion=
160 prefix=NONE
161 program_prefix=NONE
162 program_suffix=NONE
163 program_transform_name=s,x,x,
164 silent=
165 site=
166 srcdir=
167 verbose=
168 x_includes=NONE
169 x_libraries=NONE
170
171 # Installation directory options.
172 # These are left unexpanded so users can "make install exec_prefix=/foo"
173 # and all the variables that are supposed to be based on exec_prefix
174 # by default will actually change.
175 # Use braces instead of parens because sh, perl, etc. also accept them.
176 bindir='${exec_prefix}/bin'
177 sbindir='${exec_prefix}/sbin'
178 libexecdir='${exec_prefix}/libexec'
179 datarootdir='${prefix}/share'
180 datadir='${datarootdir}'
181 sysconfdir='${prefix}/etc'
182 sharedstatedir='${prefix}/com'
183 localstatedir='${prefix}/var'
184 runstatedir='${localstatedir}/run'
185 libdir='${exec_prefix}/lib'
186 includedir='${prefix}/include'
187 oldincludedir='/usr/include'
188 infodir='${datarootdir}/info'
189 mandir='${datarootdir}/man'
190
191 # Identity of this package.
192 PACKAGE_NAME='lynx'
193 PACKAGE_TARNAME='lynx'
194 PACKAGE_VERSION='2.9.3'
195 PACKAGE_STRING='lynx 2.9.3'
196 PACKAGE_BUGREPORT='[email protected]'
197
198 ac_prev=
199 for ac_option
200 do
201 # If the previous option needs an argument, assign it.
202 if test -n "$ac_prev"; then
203 eval "$ac_prev=\$ac_option"
204 ac_prev=
205 continue
206 fi
207
208 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
209
210 # Accept the important Cygnus configure options, so we can diagnose typos.
211
212 case "$ac_option" in
213
214 -bindir | --bindir | --bindi | --bind | --bin | --bi)
215 ac_prev=bindir ;;
216 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
217 bindir=$ac_optarg ;;
218
219 -build | --build | --buil | --bui | --bu)
220 ac_prev=build_alias ;;
221 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
222 build_alias=$ac_optarg ;;
223
224 -cache-file | --cache-file | --cache-fil | --cache-fi \
225 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
226 ac_prev=cache_file ;;
227 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
228 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
229 cache_file=$ac_optarg ;;
230
231 --config-cache | -C)
232 cache_file=config.cache ;;
233
234 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
235 ac_prev=datadir ;;
236 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
237 | --da=*)
238 datadir=$ac_optarg ;;
239
240 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
241 | --dataroo | --dataro | --datar)
242 ac_prev=datarootdir ;;
243 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
244 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
245 datarootdir=$ac_optarg ;;
246
247 -disable-* | --disable-*)
248 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
249 # Reject names that are not valid shell variable names.
250 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
251 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
252 { (exit 1); exit 1; }; }
253 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
254 eval "enable_$ac_feature=no" ;;
255
256 -enable-* | --enable-*)
257 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
258 # Reject names that are not valid shell variable names.
259 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
260 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
261 { (exit 1); exit 1; }; }
262 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
263 case "$ac_option" in
264 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
265 *) ac_optarg=yes ;;
266 esac
267 eval "enable_$ac_feature='$ac_optarg'" ;;
268
269 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
270 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
271 | --exec | --exe | --ex)
272 ac_prev=exec_prefix ;;
273 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
274 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
275 | --exec=* | --exe=* | --ex=*)
276 exec_prefix=$ac_optarg ;;
277
278 -gas | --gas | --ga | --g)
279 # Obsolete; use --with-gas.
280 with_gas=yes ;;
281
282 -help | --help | --hel | --he | -h)
283 ac_init_help=long ;;
284 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
285 ac_init_help=recursive ;;
286 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
287 ac_init_help=short ;;
288
289 -host | --host | --hos | --ho)
290 ac_prev=host_alias ;;
291 -host=* | --host=* | --hos=* | --ho=*)
292 host_alias=$ac_optarg ;;
293
294 -includedir | --includedir | --includedi | --included | --include \
295 | --includ | --inclu | --incl | --inc)
296 ac_prev=includedir ;;
297 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
298 | --includ=* | --inclu=* | --incl=* | --inc=*)
299 includedir=$ac_optarg ;;
300
301 -infodir | --infodir | --infodi | --infod | --info | --inf)
302 ac_prev=infodir ;;
303 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
304 infodir=$ac_optarg ;;
305
306 -libdir | --libdir | --libdi | --libd)
307 ac_prev=libdir ;;
308 -libdir=* | --libdir=* | --libdi=* | --libd=*)
309 libdir=$ac_optarg ;;
310
311 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
312 | --libexe | --libex | --libe)
313 ac_prev=libexecdir ;;
314 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
315 | --libexe=* | --libex=* | --libe=*)
316 libexecdir=$ac_optarg ;;
317
318 -localstatedir | --localstatedir | --localstatedi | --localstated \
319 | --localstate | --localstat | --localsta | --localst \
320 | --locals | --local | --loca | --loc | --lo)
321 ac_prev=localstatedir ;;
322 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
323 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
324 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
325 localstatedir=$ac_optarg ;;
326
327 -runstatedir | --runstatedir | --runstatedi | --runstated \
328 | --runstate | --runstat | --runsta | --runst \
329 | --runs | --run | --ru)
330 ac_prev=runstatedir ;;
331 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
332 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
333 | --runs=* | --run=* | --ru=*)
334 runstatedir=$ac_optarg ;;
335
336 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
337 ac_prev=mandir ;;
338 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 mandir=$ac_optarg ;;
340
341 -nfp | --nfp | --nf)
342 # Obsolete; use --without-fp.
343 with_fp=no ;;
344
345 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 | --no-cr | --no-c)
347 no_create=yes ;;
348
349 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
350 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
351 no_recursion=yes ;;
352
353 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
354 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
355 | --oldin | --oldi | --old | --ol | --o)
356 ac_prev=oldincludedir ;;
357 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
358 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
359 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
360 oldincludedir=$ac_optarg ;;
361
362 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
363 ac_prev=prefix ;;
364 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
365 prefix=$ac_optarg ;;
366
367 -program-prefix | --program-prefix | --program-prefi | --program-pref \
368 | --program-pre | --program-pr | --program-p)
369 ac_prev=program_prefix ;;
370 -program-prefix=* | --program-prefix=* | --program-prefi=* \
371 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
372 program_prefix=$ac_optarg ;;
373
374 -program-suffix | --program-suffix | --program-suffi | --program-suff \
375 | --program-suf | --program-su | --program-s)
376 ac_prev=program_suffix ;;
377 -program-suffix=* | --program-suffix=* | --program-suffi=* \
378 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
379 program_suffix=$ac_optarg ;;
380
381 -program-transform-name | --program-transform-name \
382 | --program-transform-nam | --program-transform-na \
383 | --program-transform-n | --program-transform- \
384 | --program-transform | --program-transfor \
385 | --program-transfo | --program-transf \
386 | --program-trans | --program-tran \
387 | --progr-tra | --program-tr | --program-t)
388 ac_prev=program_transform_name ;;
389 -program-transform-name=* | --program-transform-name=* \
390 | --program-transform-nam=* | --program-transform-na=* \
391 | --program-transform-n=* | --program-transform-=* \
392 | --program-transform=* | --program-transfor=* \
393 | --program-transfo=* | --program-transf=* \
394 | --program-trans=* | --program-tran=* \
395 | --progr-tra=* | --program-tr=* | --program-t=*)
396 program_transform_name=$ac_optarg ;;
397
398 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
399 | -silent | --silent | --silen | --sile | --sil)
400 silent=yes ;;
401
402 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
403 ac_prev=sbindir ;;
404 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
405 | --sbi=* | --sb=*)
406 sbindir=$ac_optarg ;;
407
408 -sharedstatedir | --sharedstatedir | --sharedstatedi \
409 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
410 | --sharedst | --shareds | --shared | --share | --shar \
411 | --sha | --sh)
412 ac_prev=sharedstatedir ;;
413 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
414 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
415 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
416 | --sha=* | --sh=*)
417 sharedstatedir=$ac_optarg ;;
418
419 -site | --site | --sit)
420 ac_prev=site ;;
421 -site=* | --site=* | --sit=*)
422 site=$ac_optarg ;;
423
424 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
425 ac_prev=srcdir ;;
426 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
427 srcdir=$ac_optarg ;;
428
429 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
430 | --syscon | --sysco | --sysc | --sys | --sy)
431 ac_prev=sysconfdir ;;
432 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
433 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
434 sysconfdir=$ac_optarg ;;
435
436 -target | --target | --targe | --targ | --tar | --ta | --t)
437 ac_prev=target_alias ;;
438 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
439 target_alias=$ac_optarg ;;
440
441 -v | -verbose | --verbose | --verbos | --verbo | --verb)
442 verbose=yes ;;
443
444 -version | --version | --versio | --versi | --vers | -V)
445 ac_init_version=: ;;
446
447 -with-* | --with-*)
448 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
449 # Reject names that are not valid shell variable names.
450 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
451 { echo "$as_me: error: invalid package name: $ac_package" >&2
452 { (exit 1); exit 1; }; }
453 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
454 case "$ac_option" in
455 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
456 *) ac_optarg=yes ;;
457 esac
458 eval "with_$ac_package='$ac_optarg'" ;;
459
460 -without-* | --without-*)
461 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
462 # Reject names that are not valid shell variable names.
463 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
464 { echo "$as_me: error: invalid package name: $ac_package" >&2
465 { (exit 1); exit 1; }; }
466 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
467 eval "with_$ac_package=no" ;;
468
469 --x)
470 # Obsolete; use --with-x.
471 with_x=yes ;;
472
473 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
474 | --x-incl | --x-inc | --x-in | --x-i)
475 ac_prev=x_includes ;;
476 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
477 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
478 x_includes=$ac_optarg ;;
479
480 -x-libraries | --x-libraries | --x-librarie | --x-librari \
481 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
482 ac_prev=x_libraries ;;
483 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
484 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
485 x_libraries=$ac_optarg ;;
486
487 -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
488 echo "$as_me: WARNING: unsupported option: $ac_option" >&2
489 ;;
490
491 -*) { echo "$as_me: error: unrecognized option: $ac_option
492 Try \`$0 --help' for more information." >&2
493 { (exit 1); exit 1; }; }
494 ;;
495
496 *=*)
497 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
498 # Reject names that are not valid shell variable names.
499 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
500 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
501 { (exit 1); exit 1; }; }
502 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
503 eval "$ac_envvar='$ac_optarg'"
504 export "$ac_envvar" ;;
505
506 *)
507 # FIXME: should be removed in autoconf 3.0.
508 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
509 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
510 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
511 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
512 ;;
513
514 esac
515 done
516
517 if test -n "$ac_prev"; then
518 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
519 { echo "$as_me: error: missing argument to $ac_option" >&2
520 { (exit 1); exit 1; }; }
521 fi
522
523 # Be sure to have absolute paths.
524 for ac_var in exec_prefix prefix
525 do
526 eval ac_val=$`echo "$ac_var"`
527 case "$ac_val" in
528 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
529 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
530 { (exit 1); exit 1; }; };;
531 esac
532 done
533
534 # Be sure to have absolute paths.
535 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
536 localstatedir libdir includedir oldincludedir infodir mandir
537 do
538 eval ac_val=$`echo "$ac_var"`
539 case "$ac_val" in
540 [\\/$]* | ?:[\\/]* ) ;;
541 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
542 { (exit 1); exit 1; }; };;
543 esac
544 done
545
546 # There might be people who depend on the old broken behavior: `$host'
547 # used to hold the argument of --host etc.
548 build=$build_alias
549 host=$host_alias
550 target=$target_alias
551
552 # FIXME: should be removed in autoconf 3.0.
553 if test "x$host_alias" != x; then
554 if test "x$build_alias" = x; then
555 cross_compiling=maybe
556 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
557 If a cross compiler is detected then cross compile mode will be used." >&2
558 elif test "x$build_alias" != "x$host_alias"; then
559 cross_compiling=yes
560 fi
561 fi
562
563 ac_tool_prefix=
564 test -n "$host_alias" && ac_tool_prefix=$host_alias-
565
566 test "$silent" = yes && exec 6>/dev/null
567
568 # Find the source files, if location was not specified.
569 if test -z "$srcdir"; then
570 ac_srcdir_defaulted=yes
571 # Try the directory containing this script, then its parent.
572 ac_prog=$0
573 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
574 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
575 srcdir=$ac_confdir
576 if test ! -r "$srcdir/$ac_unique_file"; then
577 srcdir=..
578 fi
579 else
580 ac_srcdir_defaulted=no
581 fi
582 if test ! -r "$srcdir/$ac_unique_file"; then
583 if test "$ac_srcdir_defaulted" = yes; then
584 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
585 { (exit 1); exit 1; }; }
586 else
587 { echo "$as_me: error: cannot find sources in $srcdir" >&2
588 { (exit 1); exit 1; }; }
589 fi
590 fi
591 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
592 ac_env_build_alias_set=${build_alias+set}
593 ac_env_build_alias_value=$build_alias
594 ac_cv_env_build_alias_set=${build_alias+set}
595 ac_cv_env_build_alias_value=$build_alias
596 ac_env_host_alias_set=${host_alias+set}
597 ac_env_host_alias_value=$host_alias
598 ac_cv_env_host_alias_set=${host_alias+set}
599 ac_cv_env_host_alias_value=$host_alias
600 ac_env_target_alias_set=${target_alias+set}
601 ac_env_target_alias_value=$target_alias
602 ac_cv_env_target_alias_set=${target_alias+set}
603 ac_cv_env_target_alias_value=$target_alias
604 ac_env_CC_set=${CC+set}
605 ac_env_CC_value=$CC
606 ac_cv_env_CC_set=${CC+set}
607 ac_cv_env_CC_value=$CC
608 ac_env_CFLAGS_set=${CFLAGS+set}
609 ac_env_CFLAGS_value=$CFLAGS
610 ac_cv_env_CFLAGS_set=${CFLAGS+set}
611 ac_cv_env_CFLAGS_value=$CFLAGS
612 ac_env_LDFLAGS_set=${LDFLAGS+set}
613 ac_env_LDFLAGS_value=$LDFLAGS
614 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
615 ac_cv_env_LDFLAGS_value=$LDFLAGS
616 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
617 ac_env_CPPFLAGS_value=$CPPFLAGS
618 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
619 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
620 ac_env_CPP_set=${CPP+set}
621 ac_env_CPP_value=$CPP
622 ac_cv_env_CPP_set=${CPP+set}
623 ac_cv_env_CPP_value=$CPP
624
625 #
626 # Report the --help message.
627 #
628 if test "$ac_init_help" = "long"; then
629 # Omit some internal or obsolete options to make the list less imposing.
630 # This message is too long to be a string in the A/UX 3.1 sh.
631 cat <<EOF
632 \`configure' configures lynx 2.9.3 to adapt to many kinds of systems.
633
634 Usage: $0 [OPTION]... [VAR=VALUE]...
635
636 To assign environment variables (e.g., CC, CFLAGS...), specify them as
637 VAR=VALUE. See below for descriptions of some of the useful variables.
638
639 Defaults for the options are specified in brackets.
640
641 Configuration:
642 -h, --help display this help and exit
643 --help=short display options specific to this package
644 --help=recursive display the short help of all the included packages
645 -V, --version display version information and exit
646 -q, --quiet, --silent do not print \`checking...' messages
647 --cache-file=FILE cache test results in FILE [disabled]
648 -C, --config-cache alias for \`--cache-file=config.cache'
649 -n, --no-create do not create output files
650 --srcdir=DIR find the sources in DIR [configure dir or \`..']
651
652 EOF
653
654 cat <<EOF
655 Installation directories:
656 --prefix=PREFIX install architecture-independent files in PREFIX
657 [$ac_default_prefix]
658 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
659 [PREFIX]
660
661 By default, \`make install' will install all the files in
662 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
663 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
664 for instance \`--prefix=\$HOME'.
665
666 For better control, use the options below.
667
668 Fine tuning of the installation directories:
669 --bindir=DIR user executables [EPREFIX/bin]
670 --sbindir=DIR system admin executables [EPREFIX/sbin]
671 --libexecdir=DIR program executables [EPREFIX/libexec]
672 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
673 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
674 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
675 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
676 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
677 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
678 --libdir=DIR object code libraries [EPREFIX/lib]
679 --includedir=DIR C header files [PREFIX/include]
680 --oldincludedir=DIR C header files for non-gcc [/usr/include]
681 --infodir=DIR info documentation [DATAROOTDIR/info]
682 --mandir=DIR man documentation [DATAROOTDIR/man]
683 EOF
684
685 cat <<\EOF
686
687 Program names:
688 --program-prefix=PREFIX prepend PREFIX to installed program names
689 --program-suffix=SUFFIX append SUFFIX to installed program names
690 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
691
692 X features:
693 --x-includes=DIR X include files are in DIR
694 --x-libraries=DIR X library files are in DIR
695
696 System types:
697 --build=BUILD configure for building on BUILD [guessed]
698 --host=HOST build programs to run on HOST [BUILD]
699 --target=TARGET configure for building compilers for TARGET [HOST]
700 EOF
701 fi
702
703 if test -n "$ac_init_help"; then
704 case "$ac_init_help" in
705 short | recursive ) echo "Configuration of lynx 2.9.3:";;
706 esac
707 cat <<\EOF
708
709 Optional Packages:
710 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
711 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
712
713 Optional Features:
714 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
715 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
716
717 --with-system-type=XXX test: override derived host system-type
718 --with-destdir=XXX set DESTDIR destination for install (default: $DESTDIR)
719 --with-build-cc=XXX the build C compiler ($BUILD_CC)
720 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
721 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
725 Development Options:
726 --disable-echo do not display "compiling" commands
727 --enable-find-leaks logic for testing memory leaks
728 --enable-debug compile w/ debugging (if \$CFLAGS is set, add -g there, too)
729 --disable-trace disable logic for trace code
730 --enable-vertrace verbose trace code
731 --with-x use the X Window System
732 --enable-warnings test: turn on gcc compiler warnings
733 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
734 --with-dbmalloc test: use Conor Cahill's dbmalloc library
735 --with-dmalloc test: use Gray Watson's dmalloc library
736 --disable-largefile omit support for large files
737 --disable-link-prefix do not trim unneeded libraries from link command
738 Basic Configuration Options:
739 --with-libiconv-prefix=DIR
740 search for libiconv in DIR/include and DIR/lib
741 --enable-nls use Native Language Support
742 --with-libintl-prefix=DIR
743 search for libintl in DIR/include and DIR/lib
744 --with-textdomain=PKG NLS text-domain (default is package name)
745 --disable-included-msgs do not use included messages for i18n support
746 --with-nls-datadir=DIR NLS data, parent of locale (default: PREFIX/DATADIR)
747 --disable-full-paths control whether full utility pathnames are used
748 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
749 --with-ssl{=path} link with ssl library if available
750 --with-gnutls{=path} link with gnutls support
751 --with-socks{=path} link with socks library if available
752 --with-socks5{=path} link with socks5 library if available
753 --enable-ipv6 use ipv6 (with ipv4) support
754 --with-screen=XXX select screen type (XXX is curses (default),
755 ncurses, ncursesw, pdcurses or slang)
756 --with-curses-dir=DIR directory in which (n)curses is installed
757 --enable-widec enable wide-curses features
758 --disable-color-style use color style (ncurses/curses)
759 --with-lss-file{=path} specify the default style-sheet file
760 (default: SYSCONFDIR/lynx.lss)
761 --with-cfg-file{=path} specify the default configuration file
762 (default: SYSCONFDIR/lynx.cfg)
763 --with-cfg-path{=path} specify the default configuration directories
764 (default: SYSCONFDIR)
765 --with-mime-libdir=DIR MIME data, mime.types and mailcap (default: /etc)
766 --disable-locale-charset use locale-charset selection logic
767 --enable-wcwidth-support use wcwidth/UTF-8 logic
768 --with-charsets=list limit charsets to given list of MIME names
769 --enable-arc4random enable arc4random if available
770 Experimental Options:
771 --disable-bibp-urls disable support for bibp: URLs
772 --disable-config-info disable browsable configuration-info
773 --disable-forms-options disable forms-based options
774 --disable-menu-options disable old-style option menu
775 --disable-sessions use sessions code
776 --disable-session-cache use session-caching code
777 --disable-addrlist-page disable address-list page
778 --disable-cjk do not use CJK logic
779 --enable-chinese-utf8 use Chinese UTF-8 logic
780 --disable-japanese-utf8 do not use Japanese UTF-8 logic
781 --enable-default-colors enable use of default-colors (ncurses/slang)
782 --enable-kbd-layout use experimental keyboard-layout support
783 --enable-nested-tables use experimental nested-table support
784 Miscellaneous Options:
785 --disable-alt-bindings disable alternative line-edit bindings
786 --disable-ascii-ctypes disable use of ascii case-conversion
787 --disable-extended-dtd disable extended HTML DTD logic
788 --disable-file-upload disable file-upload support
789 --disable-idna disable IDNA support
790 --disable-justify-elts disable element-justification logic
791 --disable-partial disable partial-display logic
792 --disable-persistent-cookies disable persistent-cookie support
793 --disable-prettysrc disable colorization of HTML source
794 --disable-progressbar disable progress-bar
795 --disable-read-eta disable read-progress message shows ETA
796 --disable-source-cache do not cache HTML source for parse mode changes
797 --disable-scrollbar disable scrollbar with mouse
798 --enable-charset-choice use charset-selection logic
799 --enable-externs use external commands
800 --enable-font-switch use Linux setfont for character-translation
801 --enable-cgi-links support cgi links w/o a http daemon
802 --enable-change-exec allow users to change exec options
803 --enable-exec-links allow lynx to execute programs accessed via a link
804 --enable-exec-scripts allow lynx to execute programs inferred from a link
805 --enable-internal-links handle following links to same doc differently
806 --enable-nsl-fork fork NSL requests, allowing them to be aborted
807 --enable-syslog log URL requests via syslog
808 --enable-underlines underline links rather than using boldface
809 Documentation:
810 --enable-htmlized-cfg build htmlized lynx.cfg
811 --enable-local-docs link local doc-directory to help-page
812 --enable-gzip-help install gzip'ed help files
813 --with-man2html[=XXX] use XXX rather than groff
814 Compression Libraries/Utilities:
815 --with-bzlib use libbz2 for decompression of some bzip2 files
816 --with-zlib use zlib for decompression of some gzip files
817 --with-brotli use brotli decompression
818 --with-zstd use zstd decompression
819 Other Network Services:
820 --disable-finger disable FINGER logic
821 --disable-gopher disable GOPHER logic
822 --disable-news disable NEWS logic
823 --disable-ftp disable FTP logic
824 --enable-wais enable WAIS logic
825 Directory Editor Options:
826 --disable-dired disable optional directory-editor, DirEd
827 --disable-dired-dearchive disable dearchiving commands
828 --disable-dired-override disable DirEd override keymap
829 --disable-dired-permit disable chmod/attrib commands
830 --disable-dired-xpermit disable chmod/attrib commands
831 --disable-dired-tar disable "tar" command
832 --disable-dired-uudecode disable "uudecode" command
833 --disable-dired-zip disable "zip", "unzip" commands
834 --disable-dired-gzip disable "gzip", "gunzip" commands
835 --disable-long-list disable long "ls -l" directory listings
836 --disable-parent-dir-refs
837 disable "Up-to" links in directory listings
838 Special Libraries for PDCurses X11:
839 --with-Xaw3d link with Xaw 3d library
840 --with-Xaw3dxft link with Xaw 3d xft library
841 --with-neXtaw link with neXT Athena library
842 --with-XawPlus link with Athena-Plus library
843 --disable-rpath-hack don't add rpath options for additional libraries
844
845 Some influential environment variables:
846 CC C compiler command
847 CFLAGS C compiler flags
848 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
849 nonstandard directory <lib dir>
850 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
851 headers in a nonstandard directory <include dir>
852 CPP C preprocessor
853
854 Use these variables to override the choices made by `configure' or to help
855 it to find libraries and programs with nonstandard names/locations.
856
857 Report bugs to <[email protected]>.
858 EOF
859 fi
860
861 if test "$ac_init_help" = "recursive"; then
862 # If there are subdirs, report their specific --help.
863 ac_popdir=`pwd`
864 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
865 cd "$ac_subdir"
866 # A "../" for each directory in /$ac_subdir.
867 ac_dots=`echo "$ac_subdir" |
868 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
869
870 case "$srcdir" in
871 .) # No --srcdir option. We are building in place.
872 ac_sub_srcdir="$srcdir" ;;
873 [\\/]* | ?:[\\/]* ) # Absolute path.
874 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
875 *) # Relative path.
876 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
877 esac
878
879 # Check for guested configure; otherwise get Cygnus style configure.
880 if test -f "$ac_sub_srcdir/configure.gnu"; then
881 echo
882 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
883 elif test -f "$ac_sub_srcdir/configure"; then
884 echo
885 $SHELL "$ac_sub_srcdir/configure" --help=recursive
886 elif test -f "$ac_sub_srcdir/configure.ac" ||
887 test -f "$ac_sub_srcdir/configure.in"; then
888 echo
889 "$ac_configure" --help
890 else
891 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
892 fi
893 cd "$ac_popdir"
894 done
895 fi
896
897 test -n "$ac_init_help" && exit 0
898 if "$ac_init_version"; then
899 cat <<\EOF
900 lynx configure 2.9.3
901 generated by GNU Autoconf 2.52.20260412
902
903 Copyright 2003-2025,2026 Thomas E. Dickey
904 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
905 Free Software Foundation, Inc.
906 This configure script is free software; the Free Software Foundation
907 gives unlimited permission to copy, distribute and modify it.
908 EOF
909 exit 0
910 fi
911 exec 5>config.log
912 cat >&5 <<EOF
913 This file contains any messages produced by compilers while
914 running configure, to aid debugging if configure makes a mistake.
915
916 It was created by lynx $as_me 2.9.3, which was
917 generated by GNU Autoconf 2.52.20260412. Invocation command line was
918
919 $ $0 $@
920
921 EOF
922 {
923 cat <<_ASUNAME
924 ## ---------- ##
925 ## Platform. ##
926 ## ---------- ##
927
928 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
929 uname -m = `(uname -m) 2>/dev/null || echo unknown`
930 uname -r = `(uname -r) 2>/dev/null || echo unknown`
931 uname -s = `(uname -s) 2>/dev/null || echo unknown`
932 uname -v = `(uname -v) 2>/dev/null || echo unknown`
933
934 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
935 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
936
937 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
938 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
939 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
940 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
941 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
942 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
943 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
944
945 PATH = $PATH
946
947 _ASUNAME
948 } >&5
949
950 cat >&5 <<EOF
951 ## ------------ ##
952 ## Core tests. ##
953 ## ------------ ##
954
955 EOF
956
957 # Keep a trace of the command line.
958 # Strip out --no-create and --no-recursion so they do not pile up.
959 # Also quote any args containing shell meta-characters.
960 ac_configure_args=
961 ac_sep=
962 for ac_arg
963 do
964 case "$ac_arg" in
965 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
966 | --no-cr | --no-c) ;;
967 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
968 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
969 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
970 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
971 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
972 ac_sep=" " ;;
973 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
974 ac_sep=" " ;;
975 esac
976 # Get rid of the leading space.
977 done
978
979 # When interrupted or exit'd, cleanup temporary files, and complete
980 # config.log. We remove comments because anyway the quotes in there
981 # would cause problems or look ugly.
982 trap 'exit_status=$?
983 # Save into config.log some information that might help in debugging.
984 echo >&5
985 echo "## ----------------- ##" >&5
986 echo "## Cache variables. ##" >&5
987 echo "## ----------------- ##" >&5
988 echo >&5
989 # The following way of writing the cache mishandles newlines in values,
990 {
991 (set) 2>&1 |
992 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
993 *ac_space=\ *)
994 sed -n \
995 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
996 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
997 ;;
998 *)
999 sed -n \
1000 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1001 ;;
1002 esac;
1003 } >&5
1004 sed "/^$/d" confdefs.h >conftest.log
1005 if test -s conftest.log; then
1006 echo >&5
1007 echo "## ------------ ##" >&5
1008 echo "## confdefs.h. ##" >&5
1009 echo "## ------------ ##" >&5
1010 echo >&5
1011 cat conftest.log >&5
1012 fi
1013 (echo; echo) >&5
1014 test "$ac_signal" != 0 &&
1015 echo "$as_me: caught signal $ac_signal" >&5
1016 echo "$as_me: exit $exit_status" >&5
1017 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1018 exit $exit_status
1019 ' 0
1020 for ac_signal in 1 2 13 15; do
1021 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1022 done
1023 ac_signal=0
1024
1025 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1026 rm -rf conftest* confdefs.h
1027 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1028 echo >confdefs.h
1029
1030 # Let the site file select an alternate cache file if it wants to.
1031 # Prefer explicitly selected file to automatically selected ones.
1032 if test -z "$CONFIG_SITE"; then
1033 if test "x$prefix" != xNONE; then
1034 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1035 else
1036 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1037 fi
1038 fi
1039 for ac_site_file in $CONFIG_SITE; do
1040 if test -r "$ac_site_file"; then
1041 { echo "$as_me:1041: loading site script $ac_site_file" >&5
1042 echo "$as_me: loading site script $ac_site_file" >&6;}
1043 cat "$ac_site_file" >&5
1044 . "$ac_site_file"
1045 fi
1046 done
1047
1048 if test -r "$cache_file"; then
1049 # Some versions of bash will fail to source /dev/null (special
1050 # files actually), so we avoid doing that.
1051 if test -f "$cache_file"; then
1052 { echo "$as_me:1052: loading cache $cache_file" >&5
1053 echo "$as_me: loading cache $cache_file" >&6;}
1054 case $cache_file in
1055 [\\/]* | ?:[\\/]* ) . $cache_file;;
1056 *) . ./$cache_file;;
1057 esac
1058 fi
1059 else
1060 { echo "$as_me:1060: creating cache $cache_file" >&5
1061 echo "$as_me: creating cache $cache_file" >&6;}
1062 >$cache_file
1063 fi
1064
1065 # Check that the precious variables saved in the cache have kept the same
1066 # value.
1067 ac_cache_corrupted=false
1068 for ac_var in `(set) 2>&1 |
1069 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1070 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1071 eval ac_new_set=\$ac_env_${ac_var}_set
1072 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1073 eval ac_new_val="\$ac_env_${ac_var}_value"
1074 case "$ac_old_set,$ac_new_set" in
1075 set,)
1076 { echo "$as_me:1076: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1077 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1078 ac_cache_corrupted=: ;;
1079 ,set)
1080 { echo "$as_me:1080: error: \`$ac_var' was not set in the previous run" >&5
1081 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1082 ac_cache_corrupted=: ;;
1083 ,);;
1084 *)
1085 if test "x$ac_old_val" != "x$ac_new_val"; then
1086 { echo "$as_me:1086: error: \`$ac_var' has changed since the previous run:" >&5
1087 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1088 { echo "$as_me:1088: former value: $ac_old_val" >&5
1089 echo "$as_me: former value: $ac_old_val" >&2;}
1090 { echo "$as_me:1090: current value: $ac_new_val" >&5
1091 echo "$as_me: current value: $ac_new_val" >&2;}
1092 ac_cache_corrupted=:
1093 fi;;
1094 esac
1095 # Pass precious variables to config.status. It doesn't matter if
1096 # we pass some twice (in addition to the command line arguments).
1097 if test "$ac_new_set" = set; then
1098 case "$ac_new_val" in
1099 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1100 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1101 ac_configure_args="$ac_configure_args '$ac_arg'"
1102 ;;
1103 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1104 ;;
1105 esac
1106 fi
1107 done
1108 if "$ac_cache_corrupted"; then
1109 { echo "$as_me:1109: error: changes in the environment can compromise the build" >&5
1110 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1111 { { echo "$as_me:1111: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1112 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1113 { (exit 1); exit 1; }; }
1114 fi
1115
1116 ac_ext=c
1117 ac_cpp='$CPP $CPPFLAGS'
1118 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1119 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1120 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1121 ac_main_return="return"
1122
1123 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1124 *c*,-n*) ECHO_N=
1125 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1126 ECHO_T=' '
1127 ;;
1128 *c*,* ) ECHO_N=-n
1129 ECHO_C=
1130 ECHO_T=
1131 ;;
1132 *) ECHO_N=
1133 ECHO_C='\c'
1134 ECHO_T=
1135 ;;
1136 esac
1137 echo "#! $SHELL" >conftest.sh
1138 echo "exit 0" >>conftest.sh
1139 chmod +x conftest.sh
1140 if { (echo "$as_me:1140: PATH=\".;.\"; conftest.sh") >&5
1141 (PATH=".;."; conftest.sh) 2>&5
1142 ac_status=$?
1143 echo "$as_me:1143: \$? = $ac_status" >&5
1144 (exit "$ac_status"); }; then
1145 ac_path_separator=';'
1146 else
1147 ac_path_separator=:
1148 fi
1149 PATH_SEPARATOR="$ac_path_separator"
1150 rm -f conftest.sh
1151
1152 echo "Configuring $PACKAGE_NAME version $PACKAGE_VERSION"
1153
1154 # Save the original $CFLAGS so we can distinguish whether the user set those
1155 # in the environment, or whether autoconf added -O and -g options:
1156 ORIGINAL_CFLAGS="$CFLAGS"
1157
1158 # For autoconf 2.13, make sure we have no cache file at the beginning of this
1159 # script. That fixes problems with tests whose cached values change from one
1160 # run to the next, as well as with tests that are order-dependent.
1161 rm -f config.cache
1162
1163 # autoconf 2.5x defaults to no cache file; we need the cache file's information
1164 # for building the config page. But start with it empty to avoid confusion by
1165 # people who don't do a "make distclean" after applying patches.
1166 cache_file=config.cache
1167 rm -f config.cache; touch config.cache
1168
1169 CONFIG_H=lynx_cfg.h
1170 ac_config_headers="$ac_config_headers $CONFIG_H:config.hin"
1171
1172 ac_aux_dir=
1173 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1174 if test -f "$ac_dir/install-sh"; then
1175 ac_aux_dir=$ac_dir
1176 ac_install_sh="$ac_aux_dir/install-sh -c"
1177 break
1178 elif test -f "$ac_dir/install.sh"; then
1179 ac_aux_dir=$ac_dir
1180 ac_install_sh="$ac_aux_dir/install.sh -c"
1181 break
1182 elif test -f "$ac_dir/shtool"; then
1183 ac_aux_dir=$ac_dir
1184 ac_install_sh="$ac_aux_dir/shtool install -c"
1185 break
1186 fi
1187 done
1188 if test -z "$ac_aux_dir"; then
1189 { { echo "$as_me:1189: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1190 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1191 { (exit 1); exit 1; }; }
1192 fi
1193 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1194 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1195 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1196
1197 # Make sure we can run config.sub.
1198 $ac_config_sub sun4 >/dev/null 2>&1 ||
1199 { { echo "$as_me:1199: error: cannot run $ac_config_sub" >&5
1200 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1201 { (exit 1); exit 1; }; }
1202
1203 echo "$as_me:1203: checking build system type" >&5
1204 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1205 if test "${ac_cv_build+set}" = set; then
1206 echo $ECHO_N "(cached) $ECHO_C" >&6
1207 else
1208 ac_cv_build_alias=$build_alias
1209 test -z "$ac_cv_build_alias" &&
1210 ac_cv_build_alias=`$ac_config_guess`
1211 test -z "$ac_cv_build_alias" &&
1212 { { echo "$as_me:1212: error: cannot guess build type; you must specify one" >&5
1213 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1214 { (exit 1); exit 1; }; }
1215 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1216 { { echo "$as_me:1216: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1217 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1218 { (exit 1); exit 1; }; }
1219
1220 fi
1221 echo "$as_me:1221: result: $ac_cv_build" >&5
1222 echo "${ECHO_T}$ac_cv_build" >&6
1223 build=$ac_cv_build
1224 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1225 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1226 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1227
1228 echo "$as_me:1228: checking host system type" >&5
1229 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1230 if test "${ac_cv_host+set}" = set; then
1231 echo $ECHO_N "(cached) $ECHO_C" >&6
1232 else
1233 ac_cv_host_alias=$host_alias
1234 test -z "$ac_cv_host_alias" &&
1235 ac_cv_host_alias=$ac_cv_build_alias
1236 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1237 { { echo "$as_me:1237: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1238 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1239 { (exit 1); exit 1; }; }
1240
1241 fi
1242 echo "$as_me:1242: result: $ac_cv_host" >&5
1243 echo "${ECHO_T}$ac_cv_host" >&6
1244 host=$ac_cv_host
1245 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1246 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1247 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1248
1249 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1250 echo "$as_me:1250: checking target system type" >&5
1251 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1252 if test "${ac_cv_target+set}" = set; then
1253 echo $ECHO_N "(cached) $ECHO_C" >&6
1254 else
1255 ac_cv_target_alias=$target_alias
1256 test "x$ac_cv_target_alias" = "x" &&
1257 ac_cv_target_alias=$ac_cv_host_alias
1258 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1259 { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1261 { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_target" >&5
1265 echo "${ECHO_T}$ac_cv_target" >&6
1266 target=$ac_cv_target
1267 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 # The aliases save the names the user supplied, while $host etc.
1272 # will get canonicalized.
1273 test -n "$target_alias" &&
1274 test "$program_prefix$program_suffix$program_transform_name" = \
1275 NONENONEs,x,x, &&
1276 program_prefix=${target_alias}-
1277 system_name="$host_os"
1278 else
1279 system_name="`(uname -s -r) 2>/dev/null`"
1280 if test -z "$system_name" ; then
1281 system_name="`(hostname) 2>/dev/null`"
1282 fi
1283 fi
1284 test -n "$system_name" &&
1285 cat >>confdefs.h <<EOF
1286 #define SYSTEM_NAME "$system_name"
1287 EOF
1288
1289 if test "${cf_cv_system_name+set}" = set; then
1290 echo $ECHO_N "(cached) $ECHO_C" >&6
1291 else
1292 cf_cv_system_name="$system_name"
1293 fi
1294
1295 test -z "$system_name" && system_name="$cf_cv_system_name"
1296 test -n "$cf_cv_system_name" && echo "$as_me:1296: result: Configuring for $cf_cv_system_name" >&5
1297 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1298
1299 if test ".$system_name" != ".$cf_cv_system_name" ; then
1300 echo "$as_me:1300: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1301 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1302 { { echo "$as_me:1302: error: \"Please remove config.cache and try again.\"" >&5
1303 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1304 { (exit 1); exit 1; }; }
1305 fi
1306
1307 # Check whether --with-system-type or --without-system-type was given.
1308 if test "${with_system_type+set}" = set; then
1309 withval="$with_system_type"
1310 { echo "$as_me:1310: WARNING: overriding system type $host_os to $withval" >&5
1311 echo "$as_me: WARNING: overriding system type $host_os to $withval" >&2;}
1312 host_os=$withval
1313 fi;
1314
1315 test "$program_prefix" != NONE &&
1316 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1317 # Use a double $ so make ignores it.
1318 test "$program_suffix" != NONE &&
1319 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1320 # Double any \ or $. echo might interpret backslashes.
1321 # By default was `s,x,x', remove it if useless.
1322 cat <<\_ACEOF >conftest.sed
1323 s/[\\$]/&&/g;s/;s,x,x,$//
1324 _ACEOF
1325 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1326 rm conftest.sed
1327
1328 PACKAGE=$PACKAGE_NAME
1329 VERSION=$PACKAGE_VERSION
1330
1331 NO_DOTS_VERSION=`echo "$PACKAGE_VERSION" | sed -e 's,\.,-,g'`
1332
1333 echo "$as_me:1333: checking for DESTDIR" >&5
1334 echo $ECHO_N "checking for DESTDIR... $ECHO_C" >&6
1335
1336 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1337
1338 system_name="$host_os"
1339 else
1340 system_name="`(uname -s -r) 2>/dev/null`"
1341 if test -z "$system_name" ; then
1342 system_name="`(hostname) 2>/dev/null`"
1343 fi
1344 fi
1345 test -n "$system_name" &&
1346 cat >>confdefs.h <<EOF
1347 #define SYSTEM_NAME "$system_name"
1348 EOF
1349
1350 if test "${cf_cv_system_name+set}" = set; then
1351 echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353 cf_cv_system_name="$system_name"
1354 fi
1355
1356 test -z "$system_name" && system_name="$cf_cv_system_name"
1357 test -n "$cf_cv_system_name" && echo "$as_me:1357: result: Configuring for $cf_cv_system_name" >&5
1358 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1359
1360 if test ".$system_name" != ".$cf_cv_system_name" ; then
1361 echo "$as_me:1361: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1362 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1363 { { echo "$as_me:1363: error: \"Please remove config.cache and try again.\"" >&5
1364 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1365 { (exit 1); exit 1; }; }
1366 fi
1367
1368 # Check whether --with-system-type or --without-system-type was given.
1369 if test "${with_system_type+set}" = set; then
1370 withval="$with_system_type"
1371 { echo "$as_me:1371: WARNING: overriding system type to $withval" >&5
1372 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1373 cf_cv_system_name=$withval
1374 host_os=$withval
1375
1376 fi;
1377
1378 case "$cf_cv_system_name" in
1379 (cygwin*|msys*|mingw32*|mingw64|os2*)
1380 GLOB_FULLPATH_POSIX='/*'
1381 GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
1382 ;;
1383 (*)
1384 GLOB_FULLPATH_POSIX='/*'
1385 GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
1386 ;;
1387 esac
1388
1389 # Check whether --with-destdir or --without-destdir was given.
1390 if test "${with_destdir+set}" = set; then
1391 withval="$with_destdir"
1392
1393 else
1394 withval="${DESTDIR:-$DESTDIR}"
1395 fi; if test -n "$DESTDIR" ; then
1396
1397 if test "x$prefix" != xNONE; then
1398 cf_path_syntax="$prefix"
1399 else
1400 cf_path_syntax="$ac_default_prefix"
1401 fi
1402
1403 case "x$withval" in
1404 (x\$\(*\)*|x\'*\'*)
1405 ;;
1406 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
1407 ;;
1408 (x\$\{*prefix\}*|x\$\{*dir\}*)
1409 eval withval="$withval"
1410 case "x$withval" in
1411 (xNONE/*)
1412 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
1413 ;;
1414 esac
1415 ;;
1416 (xno|xNONE/*)
1417 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
1418 ;;
1419 (*)
1420 { { echo "$as_me:1420: error: expected a pathname, not \"$withval\"" >&5
1421 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
1422 { (exit 1); exit 1; }; }
1423 ;;
1424 esac
1425
1426 fi
1427 eval DESTDIR="$withval"
1428
1429 echo "$as_me:1429: result: $DESTDIR" >&5
1430 echo "${ECHO_T}$DESTDIR" >&6
1431
1432 case "$host_os" in
1433 (openedition)
1434 : ${CFLAGS="-D_ALL_SOURCE -Wl,EDIT=NO"}
1435 : ${CC=c89}
1436 ;;
1437 esac
1438
1439 ac_ext=c
1440 ac_cpp='$CPP $CPPFLAGS'
1441 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1442 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1444 ac_main_return="return"
1445 if test -n "$ac_tool_prefix"; then
1446 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1447 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1448 echo "$as_me:1448: checking for $ac_word" >&5
1449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1450 if test "${ac_cv_prog_CC+set}" = set; then
1451 echo $ECHO_N "(cached) $ECHO_C" >&6
1452 else
1453 if test -n "$CC"; then
1454 ac_cv_prog_CC="$CC" # Let the user override the test.
1455 else
1456 ac_save_IFS=$IFS; IFS=$ac_path_separator
1457 ac_dummy="$PATH"
1458 for ac_dir in $ac_dummy; do
1459 IFS=$ac_save_IFS
1460 test -z "$ac_dir" && ac_dir=.
1461 $as_executable_p "$ac_dir/$ac_word" || continue
1462 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1463 echo "$as_me:1463: found $ac_dir/$ac_word" >&5
1464 break
1465 done
1466
1467 fi
1468 fi
1469 CC=$ac_cv_prog_CC
1470 if test -n "$CC"; then
1471 echo "$as_me:1471: result: $CC" >&5
1472 echo "${ECHO_T}$CC" >&6
1473 else
1474 echo "$as_me:1474: result: no" >&5
1475 echo "${ECHO_T}no" >&6
1476 fi
1477
1478 fi
1479 if test -z "$ac_cv_prog_CC"; then
1480 ac_ct_CC=$CC
1481 # Extract the first word of "gcc", so it can be a program name with args.
1482 set dummy gcc; ac_word=$2
1483 echo "$as_me:1483: checking for $ac_word" >&5
1484 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1485 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1486 echo $ECHO_N "(cached) $ECHO_C" >&6
1487 else
1488 if test -n "$ac_ct_CC"; then
1489 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1490 else
1491 ac_save_IFS=$IFS; IFS=$ac_path_separator
1492 ac_dummy="$PATH"
1493 for ac_dir in $ac_dummy; do
1494 IFS=$ac_save_IFS
1495 test -z "$ac_dir" && ac_dir=.
1496 $as_executable_p "$ac_dir/$ac_word" || continue
1497 ac_cv_prog_ac_ct_CC="gcc"
1498 echo "$as_me:1498: found $ac_dir/$ac_word" >&5
1499 break
1500 done
1501
1502 fi
1503 fi
1504 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1505 if test -n "$ac_ct_CC"; then
1506 echo "$as_me:1506: result: $ac_ct_CC" >&5
1507 echo "${ECHO_T}$ac_ct_CC" >&6
1508 else
1509 echo "$as_me:1509: result: no" >&5
1510 echo "${ECHO_T}no" >&6
1511 fi
1512
1513 CC=$ac_ct_CC
1514 else
1515 CC="$ac_cv_prog_CC"
1516 fi
1517
1518 if test -z "$CC"; then
1519 if test -n "$ac_tool_prefix"; then
1520 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1521 set dummy ${ac_tool_prefix}cc; ac_word=$2
1522 echo "$as_me:1522: checking for $ac_word" >&5
1523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1524 if test "${ac_cv_prog_CC+set}" = set; then
1525 echo $ECHO_N "(cached) $ECHO_C" >&6
1526 else
1527 if test -n "$CC"; then
1528 ac_cv_prog_CC="$CC" # Let the user override the test.
1529 else
1530 ac_save_IFS=$IFS; IFS=$ac_path_separator
1531 ac_dummy="$PATH"
1532 for ac_dir in $ac_dummy; do
1533 IFS=$ac_save_IFS
1534 test -z "$ac_dir" && ac_dir=.
1535 $as_executable_p "$ac_dir/$ac_word" || continue
1536 ac_cv_prog_CC="${ac_tool_prefix}cc"
1537 echo "$as_me:1537: found $ac_dir/$ac_word" >&5
1538 break
1539 done
1540
1541 fi
1542 fi
1543 CC=$ac_cv_prog_CC
1544 if test -n "$CC"; then
1545 echo "$as_me:1545: result: $CC" >&5
1546 echo "${ECHO_T}$CC" >&6
1547 else
1548 echo "$as_me:1548: result: no" >&5
1549 echo "${ECHO_T}no" >&6
1550 fi
1551
1552 fi
1553 if test -z "$ac_cv_prog_CC"; then
1554 ac_ct_CC=$CC
1555 # Extract the first word of "cc", so it can be a program name with args.
1556 set dummy cc; ac_word=$2
1557 echo "$as_me:1557: checking for $ac_word" >&5
1558 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1559 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1560 echo $ECHO_N "(cached) $ECHO_C" >&6
1561 else
1562 if test -n "$ac_ct_CC"; then
1563 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1564 else
1565 ac_save_IFS=$IFS; IFS=$ac_path_separator
1566 ac_dummy="$PATH"
1567 for ac_dir in $ac_dummy; do
1568 IFS=$ac_save_IFS
1569 test -z "$ac_dir" && ac_dir=.
1570 $as_executable_p "$ac_dir/$ac_word" || continue
1571 ac_cv_prog_ac_ct_CC="cc"
1572 echo "$as_me:1572: found $ac_dir/$ac_word" >&5
1573 break
1574 done
1575
1576 fi
1577 fi
1578 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1579 if test -n "$ac_ct_CC"; then
1580 echo "$as_me:1580: result: $ac_ct_CC" >&5
1581 echo "${ECHO_T}$ac_ct_CC" >&6
1582 else
1583 echo "$as_me:1583: result: no" >&5
1584 echo "${ECHO_T}no" >&6
1585 fi
1586
1587 CC=$ac_ct_CC
1588 else
1589 CC="$ac_cv_prog_CC"
1590 fi
1591
1592 fi
1593 if test -z "$CC"; then
1594 # Extract the first word of "cc", so it can be a program name with args.
1595 set dummy cc; ac_word=$2
1596 echo "$as_me:1596: checking for $ac_word" >&5
1597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1598 if test "${ac_cv_prog_CC+set}" = set; then
1599 echo $ECHO_N "(cached) $ECHO_C" >&6
1600 else
1601 if test -n "$CC"; then
1602 ac_cv_prog_CC="$CC" # Let the user override the test.
1603 else
1604 ac_prog_rejected=no
1605 ac_save_IFS=$IFS; IFS=$ac_path_separator
1606 ac_dummy="$PATH"
1607 for ac_dir in $ac_dummy; do
1608 IFS=$ac_save_IFS
1609 test -z "$ac_dir" && ac_dir=.
1610 $as_executable_p "$ac_dir/$ac_word" || continue
1611 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1612 ac_prog_rejected=yes
1613 continue
1614 fi
1615 ac_cv_prog_CC="cc"
1616 echo "$as_me:1616: found $ac_dir/$ac_word" >&5
1617 break
1618 done
1619
1620 if test "$ac_prog_rejected" = yes; then
1621 # We found a bogon in the path, so make sure we never use it.
1622 set dummy $ac_cv_prog_CC
1623 shift
1624 if test $# != 0; then
1625 # We chose a different compiler from the bogus one.
1626 # However, it has the same basename, so the bogon will be chosen
1627 # first if we set CC to just the basename; use the full file name.
1628 shift
1629 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1630 shift
1631 ac_cv_prog_CC="$@"
1632 fi
1633 fi
1634 fi
1635 fi
1636 CC=$ac_cv_prog_CC
1637 if test -n "$CC"; then
1638 echo "$as_me:1638: result: $CC" >&5
1639 echo "${ECHO_T}$CC" >&6
1640 else
1641 echo "$as_me:1641: result: no" >&5
1642 echo "${ECHO_T}no" >&6
1643 fi
1644
1645 fi
1646 if test -z "$CC"; then
1647 if test -n "$ac_tool_prefix"; then
1648 for ac_prog in cl
1649 do
1650 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1651 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1652 echo "$as_me:1652: checking for $ac_word" >&5
1653 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1654 if test "${ac_cv_prog_CC+set}" = set; then
1655 echo $ECHO_N "(cached) $ECHO_C" >&6
1656 else
1657 if test -n "$CC"; then
1658 ac_cv_prog_CC="$CC" # Let the user override the test.
1659 else
1660 ac_save_IFS=$IFS; IFS=$ac_path_separator
1661 ac_dummy="$PATH"
1662 for ac_dir in $ac_dummy; do
1663 IFS=$ac_save_IFS
1664 test -z "$ac_dir" && ac_dir=.
1665 $as_executable_p "$ac_dir/$ac_word" || continue
1666 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1667 echo "$as_me:1667: found $ac_dir/$ac_word" >&5
1668 break
1669 done
1670
1671 fi
1672 fi
1673 CC=$ac_cv_prog_CC
1674 if test -n "$CC"; then
1675 echo "$as_me:1675: result: $CC" >&5
1676 echo "${ECHO_T}$CC" >&6
1677 else
1678 echo "$as_me:1678: result: no" >&5
1679 echo "${ECHO_T}no" >&6
1680 fi
1681
1682 test -n "$CC" && break
1683 done
1684 fi
1685 if test -z "$CC"; then
1686 ac_ct_CC=$CC
1687 for ac_prog in cl
1688 do
1689 # Extract the first word of "$ac_prog", so it can be a program name with args.
1690 set dummy $ac_prog; ac_word=$2
1691 echo "$as_me:1691: checking for $ac_word" >&5
1692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1693 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1694 echo $ECHO_N "(cached) $ECHO_C" >&6
1695 else
1696 if test -n "$ac_ct_CC"; then
1697 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1698 else
1699 ac_save_IFS=$IFS; IFS=$ac_path_separator
1700 ac_dummy="$PATH"
1701 for ac_dir in $ac_dummy; do
1702 IFS=$ac_save_IFS
1703 test -z "$ac_dir" && ac_dir=.
1704 $as_executable_p "$ac_dir/$ac_word" || continue
1705 ac_cv_prog_ac_ct_CC="$ac_prog"
1706 echo "$as_me:1706: found $ac_dir/$ac_word" >&5
1707 break
1708 done
1709
1710 fi
1711 fi
1712 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1713 if test -n "$ac_ct_CC"; then
1714 echo "$as_me:1714: result: $ac_ct_CC" >&5
1715 echo "${ECHO_T}$ac_ct_CC" >&6
1716 else
1717 echo "$as_me:1717: result: no" >&5
1718 echo "${ECHO_T}no" >&6
1719 fi
1720
1721 test -n "$ac_ct_CC" && break
1722 done
1723
1724 CC=$ac_ct_CC
1725 fi
1726
1727 fi
1728
1729 test -z "$CC" && { { echo "$as_me:1729: error: no acceptable cc found in \$PATH" >&5
1730 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1731 { (exit 1); exit 1; }; }
1732
1733 # Provide some information about the compiler.
1734 echo "$as_me:1734:" \
1735 "checking for C compiler version" >&5
1736 ac_compiler=`set X $ac_compile; echo "$2"`
1737 { (eval echo "$as_me:1737: \"$ac_compiler --version </dev/null >&5\"") >&5
1738 (eval $ac_compiler --version </dev/null >&5) 2>&5
1739 ac_status=$?
1740 echo "$as_me:1740: \$? = $ac_status" >&5
1741 (exit "$ac_status"); }
1742 { (eval echo "$as_me:1742: \"$ac_compiler -v </dev/null >&5\"") >&5
1743 (eval $ac_compiler -v </dev/null >&5) 2>&5
1744 ac_status=$?
1745 echo "$as_me:1745: \$? = $ac_status" >&5
1746 (exit "$ac_status"); }
1747 { (eval echo "$as_me:1747: \"$ac_compiler -V </dev/null >&5\"") >&5
1748 (eval $ac_compiler -V </dev/null >&5) 2>&5
1749 ac_status=$?
1750 echo "$as_me:1750: \$? = $ac_status" >&5
1751 (exit "$ac_status"); }
1752
1753 cat >"conftest.$ac_ext" <<_ACEOF
1754 #line 1754 "configure"
1755 #include "confdefs.h"
1756
1757 int
1758 main (void)
1759 {
1760
1761 ;
1762 return 0;
1763 }
1764 _ACEOF
1765 ac_clean_files_save=$ac_clean_files
1766 ac_clean_files="$ac_clean_files a.out a.exe"
1767 # Try to create an executable without -o first, disregard a.out.
1768 # It will help us diagnose broken compilers, and finding out an intuition
1769 # of exeext.
1770 echo "$as_me:1770: checking for C compiler default output" >&5
1771 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1772 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1773 if { (eval echo "$as_me:1773: \"$ac_link_default\"") >&5
1774 (eval $ac_link_default) 2>&5
1775 ac_status=$?
1776 echo "$as_me:1776: \$? = $ac_status" >&5
1777 (exit "$ac_status"); }; then
1778 # Find the output, starting from the most likely. This scheme is
1779 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1780 # resort.
1781 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1782 ls a.out conftest 2>/dev/null;
1783 ls a.* conftest.* 2>/dev/null`; do
1784 case $ac_file in
1785 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1786 a.out ) # We found the default executable, but exeext='' is most
1787 # certainly right.
1788 break;;
1789 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1790 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1791 export ac_cv_exeext
1792 break;;
1793 * ) break;;
1794 esac
1795 done
1796 else
1797 echo "$as_me: failed program was:" >&5
1798 cat "conftest.$ac_ext" >&5
1799 { { echo "$as_me:1799: error: C compiler cannot create executables" >&5
1800 echo "$as_me: error: C compiler cannot create executables" >&2;}
1801 { (exit 77); exit 77; }; }
1802 fi
1803
1804 ac_exeext=$ac_cv_exeext
1805 echo "$as_me:1805: result: $ac_file" >&5
1806 echo "${ECHO_T}$ac_file" >&6
1807
1808 # Check the compiler produces executables we can run. If not, either
1809 # the compiler is broken, or we cross compile.
1810 echo "$as_me:1810: checking whether the C compiler works" >&5
1811 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1812 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1813 # If not cross compiling, check that we can run a simple program.
1814 if test "$cross_compiling" != yes; then
1815 if { ac_try='./$ac_file'
1816 { (eval echo "$as_me:1816: \"$ac_try\"") >&5
1817 (eval $ac_try) 2>&5
1818 ac_status=$?
1819 echo "$as_me:1819: \$? = $ac_status" >&5
1820 (exit "$ac_status"); }; }; then
1821 cross_compiling=no
1822 else
1823 if test "$cross_compiling" = maybe; then
1824 cross_compiling=yes
1825 else
1826 { { echo "$as_me:1826: error: cannot run C compiled programs.
1827 If you meant to cross compile, use \`--host'." >&5
1828 echo "$as_me: error: cannot run C compiled programs.
1829 If you meant to cross compile, use \`--host'." >&2;}
1830 { (exit 1); exit 1; }; }
1831 fi
1832 fi
1833 fi
1834 echo "$as_me:1834: result: yes" >&5
1835 echo "${ECHO_T}yes" >&6
1836
1837 rm -f a.out a.exe "conftest$ac_cv_exeext"
1838 ac_clean_files=$ac_clean_files_save
1839 # Check the compiler produces executables we can run. If not, either
1840 # the compiler is broken, or we cross compile.
1841 echo "$as_me:1841: checking whether we are cross compiling" >&5
1842 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1843 echo "$as_me:1843: result: $cross_compiling" >&5
1844 echo "${ECHO_T}$cross_compiling" >&6
1845
1846 echo "$as_me:1846: checking for executable suffix" >&5
1847 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1848 if { (eval echo "$as_me:1848: \"$ac_link\"") >&5
1849 (eval $ac_link) 2>&5
1850 ac_status=$?
1851 echo "$as_me:1851: \$? = $ac_status" >&5
1852 (exit "$ac_status"); }; then
1853 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1854 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1855 # work properly (i.e., refer to `conftest.exe'), while it won't with
1856 # `rm'.
1857 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1858 case $ac_file in
1859 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1860 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1861 export ac_cv_exeext
1862 break;;
1863 * ) break;;
1864 esac
1865 done
1866 else
1867 { { echo "$as_me:1867: error: cannot compute EXEEXT: cannot compile and link" >&5
1868 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1869 { (exit 1); exit 1; }; }
1870 fi
1871
1872 rm -f "conftest$ac_cv_exeext"
1873 echo "$as_me:1873: result: $ac_cv_exeext" >&5
1874 echo "${ECHO_T}$ac_cv_exeext" >&6
1875
1876 rm -f "conftest.$ac_ext"
1877 EXEEXT=$ac_cv_exeext
1878 ac_exeext=$EXEEXT
1879 echo "$as_me:1879: checking for object suffix" >&5
1880 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1881 if test "${ac_cv_objext+set}" = set; then
1882 echo $ECHO_N "(cached) $ECHO_C" >&6
1883 else
1884 cat >"conftest.$ac_ext" <<_ACEOF
1885 #line 1885 "configure"
1886 #include "confdefs.h"
1887
1888 int
1889 main (void)
1890 {
1891
1892 ;
1893 return 0;
1894 }
1895 _ACEOF
1896 rm -f conftest.o conftest.obj
1897 if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898 (eval $ac_compile) 2>&5
1899 ac_status=$?
1900 echo "$as_me:1900: \$? = $ac_status" >&5
1901 (exit "$ac_status"); }; then
1902 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1903 case $ac_file in
1904 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1905 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1906 break;;
1907 esac
1908 done
1909 else
1910 echo "$as_me: failed program was:" >&5
1911 cat "conftest.$ac_ext" >&5
1912 { { echo "$as_me:1912: error: cannot compute OBJEXT: cannot compile" >&5
1913 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1914 { (exit 1); exit 1; }; }
1915 fi
1916
1917 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1918 fi
1919 echo "$as_me:1919: result: $ac_cv_objext" >&5
1920 echo "${ECHO_T}$ac_cv_objext" >&6
1921 OBJEXT=$ac_cv_objext
1922 ac_objext=$OBJEXT
1923 echo "$as_me:1923: checking whether we are using the GNU C compiler" >&5
1924 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1925 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1926 echo $ECHO_N "(cached) $ECHO_C" >&6
1927 else
1928 cat >"conftest.$ac_ext" <<_ACEOF
1929 #line 1929 "configure"
1930 #include "confdefs.h"
1931
1932 int
1933 main (void)
1934 {
1935 #ifndef __GNUC__
1936 choke me
1937 #endif
1938
1939 ;
1940 return 0;
1941 }
1942 _ACEOF
1943 rm -f "conftest.$ac_objext"
1944 if { (eval echo "$as_me:1944: \"$ac_compile\"") >&5
1945 (eval $ac_compile) 2>&5
1946 ac_status=$?
1947 echo "$as_me:1947: \$? = $ac_status" >&5
1948 (exit "$ac_status"); } &&
1949 { ac_try='test -s "conftest.$ac_objext"'
1950 { (eval echo "$as_me:1950: \"$ac_try\"") >&5
1951 (eval $ac_try) 2>&5
1952 ac_status=$?
1953 echo "$as_me:1953: \$? = $ac_status" >&5
1954 (exit "$ac_status"); }; }; then
1955 ac_compiler_gnu=yes
1956 else
1957 echo "$as_me: failed program was:" >&5
1958 cat "conftest.$ac_ext" >&5
1959 ac_compiler_gnu=no
1960 fi
1961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1962 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1963
1964 fi
1965 echo "$as_me:1965: result: $ac_cv_c_compiler_gnu" >&5
1966 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1967 GCC=`test $ac_compiler_gnu = yes && echo yes`
1968 ac_test_CFLAGS=${CFLAGS+set}
1969 ac_save_CFLAGS=$CFLAGS
1970 CFLAGS="-g"
1971 echo "$as_me:1971: checking whether $CC accepts -g" >&5
1972 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1973 if test "${ac_cv_prog_cc_g+set}" = set; then
1974 echo $ECHO_N "(cached) $ECHO_C" >&6
1975 else
1976 cat >"conftest.$ac_ext" <<_ACEOF
1977 #line 1977 "configure"
1978 #include "confdefs.h"
1979
1980 int
1981 main (void)
1982 {
1983
1984 ;
1985 return 0;
1986 }
1987 _ACEOF
1988 rm -f "conftest.$ac_objext"
1989 if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
1990 (eval $ac_compile) 2>&5
1991 ac_status=$?
1992 echo "$as_me:1992: \$? = $ac_status" >&5
1993 (exit "$ac_status"); } &&
1994 { ac_try='test -s "conftest.$ac_objext"'
1995 { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996 (eval $ac_try) 2>&5
1997 ac_status=$?
1998 echo "$as_me:1998: \$? = $ac_status" >&5
1999 (exit "$ac_status"); }; }; then
2000 ac_cv_prog_cc_g=yes
2001 else
2002 echo "$as_me: failed program was:" >&5
2003 cat "conftest.$ac_ext" >&5
2004 ac_cv_prog_cc_g=no
2005 fi
2006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2007 fi
2008 echo "$as_me:2008: result: $ac_cv_prog_cc_g" >&5
2009 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2010 if test "$ac_test_CFLAGS" = set; then
2011 CFLAGS=$ac_save_CFLAGS
2012 elif test $ac_cv_prog_cc_g = yes; then
2013 if test "$GCC" = yes; then
2014 CFLAGS="-g -O2"
2015 else
2016 CFLAGS="-g"
2017 fi
2018 else
2019 if test "$GCC" = yes; then
2020 CFLAGS="-O2"
2021 else
2022 CFLAGS=
2023 fi
2024 fi
2025 # Some people use a C++ compiler to compile C. Since we use `exit',
2026 # in C++ we need to declare it. In case someone uses the same compiler
2027 # for both compiling C and C++ we need to have the C++ compiler decide
2028 # the declaration of exit, since it's the most demanding environment.
2029 cat >"conftest.$ac_ext" <<_ACEOF
2030 #ifndef __cplusplus
2031 choke me
2032 #endif
2033 _ACEOF
2034 rm -f "conftest.$ac_objext"
2035 if { (eval echo "$as_me:2035: \"$ac_compile\"") >&5
2036 (eval $ac_compile) 2>&5
2037 ac_status=$?
2038 echo "$as_me:2038: \$? = $ac_status" >&5
2039 (exit "$ac_status"); } &&
2040 { ac_try='test -s "conftest.$ac_objext"'
2041 { (eval echo "$as_me:2041: \"$ac_try\"") >&5
2042 (eval $ac_try) 2>&5
2043 ac_status=$?
2044 echo "$as_me:2044: \$? = $ac_status" >&5
2045 (exit "$ac_status"); }; }; then
2046 for ac_declaration in \
2047 ''\
2048 '#include <stdlib.h>' \
2049 'extern "C" void std::exit (int) throw (); using std::exit;' \
2050 'extern "C" void std::exit (int); using std::exit;' \
2051 'extern "C" void exit (int) throw ();' \
2052 'extern "C" void exit (int);' \
2053 'void exit (int);'
2054 do
2055 cat >"conftest.$ac_ext" <<_ACEOF
2056 #line 2056 "configure"
2057 #include "confdefs.h"
2058 #include <stdlib.h>
2059 $ac_declaration
2060 int
2061 main (void)
2062 {
2063 exit (42);
2064 ;
2065 return 0;
2066 }
2067 _ACEOF
2068 rm -f "conftest.$ac_objext"
2069 if { (eval echo "$as_me:2069: \"$ac_compile\"") >&5
2070 (eval $ac_compile) 2>&5
2071 ac_status=$?
2072 echo "$as_me:2072: \$? = $ac_status" >&5
2073 (exit "$ac_status"); } &&
2074 { ac_try='test -s "conftest.$ac_objext"'
2075 { (eval echo "$as_me:2075: \"$ac_try\"") >&5
2076 (eval $ac_try) 2>&5
2077 ac_status=$?
2078 echo "$as_me:2078: \$? = $ac_status" >&5
2079 (exit "$ac_status"); }; }; then
2080 :
2081 else
2082 echo "$as_me: failed program was:" >&5
2083 cat "conftest.$ac_ext" >&5
2084 continue
2085 fi
2086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2087 cat >"conftest.$ac_ext" <<_ACEOF
2088 #line 2088 "configure"
2089 #include "confdefs.h"
2090 $ac_declaration
2091 int
2092 main (void)
2093 {
2094 exit (42);
2095 ;
2096 return 0;
2097 }
2098 _ACEOF
2099 rm -f "conftest.$ac_objext"
2100 if { (eval echo "$as_me:2100: \"$ac_compile\"") >&5
2101 (eval $ac_compile) 2>&5
2102 ac_status=$?
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); } &&
2105 { ac_try='test -s "conftest.$ac_objext"'
2106 { (eval echo "$as_me:2106: \"$ac_try\"") >&5
2107 (eval $ac_try) 2>&5
2108 ac_status=$?
2109 echo "$as_me:2109: \$? = $ac_status" >&5
2110 (exit "$ac_status"); }; }; then
2111 break
2112 else
2113 echo "$as_me: failed program was:" >&5
2114 cat "conftest.$ac_ext" >&5
2115 fi
2116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2117 done
2118 rm -rf conftest*
2119 if test -n "$ac_declaration"; then
2120 echo '#ifdef __cplusplus' >>confdefs.h
2121 echo "$ac_declaration" >>confdefs.h
2122 echo '#endif' >>confdefs.h
2123 fi
2124
2125 else
2126 echo "$as_me: failed program was:" >&5
2127 cat "conftest.$ac_ext" >&5
2128 fi
2129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2130 ac_ext=c
2131 ac_cpp='$CPP $CPPFLAGS'
2132 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2133 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2135 ac_main_return="return"
2136
2137 GCC_VERSION=none
2138 if test "$GCC" = yes ; then
2139 echo "$as_me:2139: checking version of $CC" >&5
2140 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2141 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2142 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2143 echo "$as_me:2143: result: $GCC_VERSION" >&5
2144 echo "${ECHO_T}$GCC_VERSION" >&6
2145 fi
2146
2147 INTEL_COMPILER=no
2148
2149 if test "$GCC" = yes ; then
2150 case "$host_os" in
2151 (linux*|gnu*)
2152 echo "$as_me:2152: checking if this is really Intel C compiler" >&5
2153 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2154 cf_save_CFLAGS="$CFLAGS"
2155 CFLAGS="$CFLAGS -no-gcc"
2156 cat >"conftest.$ac_ext" <<_ACEOF
2157 #line 2157 "configure"
2158 #include "confdefs.h"
2159
2160 int
2161 main (void)
2162 {
2163
2164 #ifdef __INTEL_COMPILER
2165 #else
2166 #error __INTEL_COMPILER is not defined
2167 #endif
2168
2169 ;
2170 return 0;
2171 }
2172 _ACEOF
2173 rm -f "conftest.$ac_objext"
2174 if { (eval echo "$as_me:2174: \"$ac_compile\"") >&5
2175 (eval $ac_compile) 2>&5
2176 ac_status=$?
2177 echo "$as_me:2177: \$? = $ac_status" >&5
2178 (exit "$ac_status"); } &&
2179 { ac_try='test -s "conftest.$ac_objext"'
2180 { (eval echo "$as_me:2180: \"$ac_try\"") >&5
2181 (eval $ac_try) 2>&5
2182 ac_status=$?
2183 echo "$as_me:2183: \$? = $ac_status" >&5
2184 (exit "$ac_status"); }; }; then
2185 INTEL_COMPILER=yes
2186 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2187
2188 else
2189 echo "$as_me: failed program was:" >&5
2190 cat "conftest.$ac_ext" >&5
2191 fi
2192 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2193 CFLAGS="$cf_save_CFLAGS"
2194 echo "$as_me:2194: result: $INTEL_COMPILER" >&5
2195 echo "${ECHO_T}$INTEL_COMPILER" >&6
2196 ;;
2197 esac
2198 fi
2199
2200 CLANG_COMPILER=no
2201
2202 if test "$GCC" = yes ; then
2203 echo "$as_me:2203: checking if this is really Clang C compiler" >&5
2204 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2205 cf_save_CFLAGS="$CFLAGS"
2206 cat >"conftest.$ac_ext" <<_ACEOF
2207 #line 2207 "configure"
2208 #include "confdefs.h"
2209
2210 int
2211 main (void)
2212 {
2213
2214 #ifdef __clang__
2215 #else
2216 #error __clang__ is not defined
2217 #endif
2218
2219 ;
2220 return 0;
2221 }
2222 _ACEOF
2223 rm -f "conftest.$ac_objext"
2224 if { (eval echo "$as_me:2224: \"$ac_compile\"") >&5
2225 (eval $ac_compile) 2>&5
2226 ac_status=$?
2227 echo "$as_me:2227: \$? = $ac_status" >&5
2228 (exit "$ac_status"); } &&
2229 { ac_try='test -s "conftest.$ac_objext"'
2230 { (eval echo "$as_me:2230: \"$ac_try\"") >&5
2231 (eval $ac_try) 2>&5
2232 ac_status=$?
2233 echo "$as_me:2233: \$? = $ac_status" >&5
2234 (exit "$ac_status"); }; }; then
2235 CLANG_COMPILER=yes
2236
2237 else
2238 echo "$as_me: failed program was:" >&5
2239 cat "conftest.$ac_ext" >&5
2240 fi
2241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2242 CFLAGS="$cf_save_CFLAGS"
2243 echo "$as_me:2243: result: $CLANG_COMPILER" >&5
2244 echo "${ECHO_T}$CLANG_COMPILER" >&6
2245 fi
2246
2247 CLANG_VERSION=none
2248
2249 if test "x$CLANG_COMPILER" = "xyes" ; then
2250 case "$CC" in
2251 (c[1-9][0-9]|*/c[1-9][0-9])
2252 { echo "$as_me:2252: WARNING: replacing broken compiler alias $CC" >&5
2253 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2254 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2255 CC=clang
2256 ;;
2257 esac
2258
2259 echo "$as_me:2259: checking version of $CC" >&5
2260 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2261 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.].*//'`"
2262 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2263 echo "$as_me:2263: result: $CLANG_VERSION" >&5
2264 echo "${ECHO_T}$CLANG_VERSION" >&6
2265
2266 for cf_clang_opt in \
2267 -Qunused-arguments \
2268 -Wno-error=implicit-function-declaration
2269 do
2270 echo "$as_me:2270: checking if option $cf_clang_opt works" >&5
2271 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2272 cf_save_CFLAGS="$CFLAGS"
2273 CFLAGS="$CFLAGS $cf_clang_opt"
2274 cat >"conftest.$ac_ext" <<_ACEOF
2275 #line 2275 "configure"
2276 #include "confdefs.h"
2277
2278 #include <stdio.h>
2279 int
2280 main (void)
2281 {
2282
2283 printf("hello!\\n");
2284 ;
2285 return 0;
2286 }
2287 _ACEOF
2288 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2289 if { (eval echo "$as_me:2289: \"$ac_link\"") >&5
2290 (eval $ac_link) 2>&5
2291 ac_status=$?
2292 echo "$as_me:2292: \$? = $ac_status" >&5
2293 (exit "$ac_status"); } &&
2294 { ac_try='test -s "conftest$ac_exeext"'
2295 { (eval echo "$as_me:2295: \"$ac_try\"") >&5
2296 (eval $ac_try) 2>&5
2297 ac_status=$?
2298 echo "$as_me:2298: \$? = $ac_status" >&5
2299 (exit "$ac_status"); }; }; then
2300
2301 cf_clang_optok=yes
2302 else
2303 echo "$as_me: failed program was:" >&5
2304 cat "conftest.$ac_ext" >&5
2305
2306 cf_clang_optok=no
2307 fi
2308 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2309 echo "$as_me:2309: result: $cf_clang_optok" >&5
2310 echo "${ECHO_T}$cf_clang_optok" >&6
2311 CFLAGS="$cf_save_CFLAGS"
2312 if test "$cf_clang_optok" = yes; then
2313 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2314
2315 echo "${as_me:-configure}:2315: testing adding option $cf_clang_opt ..." 1>&5
2316
2317 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2318 CFLAGS="${CFLAGS}$cf_clang_opt"
2319
2320 fi
2321 done
2322 fi
2323
2324 echo "$as_me:2324: checking for $CC option to accept ANSI C" >&5
2325 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2326 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2327 echo $ECHO_N "(cached) $ECHO_C" >&6
2328 else
2329 ac_cv_prog_cc_stdc=no
2330 ac_save_CC=$CC
2331 cat >"conftest.$ac_ext" <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2334 #include <stdarg.h>
2335 #include <stdio.h>
2336 #include <sys/types.h>
2337 #include <sys/stat.h>
2338 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2339 struct buf { int x; };
2340 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2341 static char *e (char **p, int i)
2342 {
2343 return p[i];
2344 }
2345 static char *f (char * (*g) (char **, int), char **p, ...)
2346 {
2347 char *s;
2348 va_list v;
2349 va_start (v,p);
2350 s = g (p, va_arg (v,int));
2351 va_end (v);
2352 return s;
2353 }
2354 int test (int i, double x);
2355 struct s1 {int (*f) (int a);};
2356 struct s2 {int (*f) (double a);};
2357 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2358 int argc;
2359 int
2360 main (void)
2361 {
2362 char *argv[3];
2363 static char first_arg[] = "first";
2364 static char other_arg[] = "other";
2365 argv[0] = first_arg;
2366 argv[1] = other_arg;
2367 argv[2] = NULL;
2368 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2369 ;
2370 return 0;
2371 }
2372 _ACEOF
2373 # Don't try gcc -ansi; that turns off useful extensions and
2374 # breaks some systems' header files.
2375 # AIX -qlanglvl=ansi
2376 # Ultrix and OSF/1 -std1
2377 # HP-UX 10.20 and later -Ae
2378 # HP-UX older versions -Aa -D_HPUX_SOURCE
2379 # SVR4 -Xc -D__EXTENSIONS__
2380 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2381 do
2382 CC="$ac_save_CC $ac_arg"
2383 rm -f "conftest.$ac_objext"
2384 if { (eval echo "$as_me:2384: \"$ac_compile\"") >&5
2385 (eval $ac_compile) 2>&5
2386 ac_status=$?
2387 echo "$as_me:2387: \$? = $ac_status" >&5
2388 (exit "$ac_status"); } &&
2389 { ac_try='test -s "conftest.$ac_objext"'
2390 { (eval echo "$as_me:2390: \"$ac_try\"") >&5
2391 (eval $ac_try) 2>&5
2392 ac_status=$?
2393 echo "$as_me:2393: \$? = $ac_status" >&5
2394 (exit "$ac_status"); }; }; then
2395 ac_cv_prog_cc_stdc=$ac_arg
2396 break
2397 else
2398 echo "$as_me: failed program was:" >&5
2399 cat "conftest.$ac_ext" >&5
2400 fi
2401 rm -f "conftest.$ac_objext"
2402 done
2403 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2404 CC=$ac_save_CC
2405
2406 fi
2407
2408 case "x$ac_cv_prog_cc_stdc" in
2409 x|xno)
2410 echo "$as_me:2410: result: none needed" >&5
2411 echo "${ECHO_T}none needed" >&6 ;;
2412 *)
2413 echo "$as_me:2413: result: $ac_cv_prog_cc_stdc" >&5
2414 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2415 CC="$CC $ac_cv_prog_cc_stdc" ;;
2416 esac
2417
2418 # This should have been defined by AC_PROG_CC
2419 : "${CC:=cc}"
2420
2421 echo "$as_me:2421: checking \$CFLAGS variable" >&5
2422 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2423 case "x$CFLAGS" in
2424 (*-[IUD]*)
2425 echo "$as_me:2425: result: broken" >&5
2426 echo "${ECHO_T}broken" >&6
2427 { echo "$as_me:2427: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2428 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2429 cf_flags="$CFLAGS"
2430 CFLAGS=
2431 for cf_arg in $cf_flags
2432 do
2433
2434 cf_fix_cppflags=no
2435 cf_new_cflags=
2436 cf_new_cppflags=
2437 cf_new_extra_cppflags=
2438
2439 for cf_add_cflags in $cf_arg
2440 do
2441 case "$cf_fix_cppflags" in
2442 (no)
2443 case "$cf_add_cflags" in
2444 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2445 case "$cf_add_cflags" in
2446 (-D*)
2447 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2448
2449 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2450 && test -z "${cf_tst_cflags}" \
2451 && cf_fix_cppflags=yes
2452
2453 if test "$cf_fix_cppflags" = yes ; then
2454
2455 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2456 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2457
2458 continue
2459 elif test "${cf_tst_cflags}" = "\"'" ; then
2460
2461 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2462 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2463
2464 continue
2465 fi
2466 ;;
2467 esac
2468 case "$CPPFLAGS" in
2469 (*$cf_add_cflags)
2470 ;;
2471 (*)
2472 case "$cf_add_cflags" in
2473 (-D*)
2474 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2475
2476 CPPFLAGS=`echo "$CPPFLAGS" | \
2477 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2478 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2479
2480 ;;
2481 esac
2482
2483 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2484 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2485
2486 ;;
2487 esac
2488 ;;
2489 (*)
2490
2491 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2492 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2493
2494 ;;
2495 esac
2496 ;;
2497 (yes)
2498
2499 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2500 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2501
2502 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2503
2504 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2505 && test -z "${cf_tst_cflags}" \
2506 && cf_fix_cppflags=no
2507 ;;
2508 esac
2509 done
2510
2511 if test -n "$cf_new_cflags" ; then
2512
2513 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2514 CFLAGS="${CFLAGS}$cf_new_cflags"
2515
2516 fi
2517
2518 if test -n "$cf_new_cppflags" ; then
2519
2520 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2521 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2522
2523 fi
2524
2525 if test -n "$cf_new_extra_cppflags" ; then
2526
2527 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2528 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2529
2530 fi
2531
2532 done
2533 ;;
2534 (*)
2535 echo "$as_me:2535: result: ok" >&5
2536 echo "${ECHO_T}ok" >&6
2537 ;;
2538 esac
2539
2540 echo "$as_me:2540: checking \$CC variable" >&5
2541 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2542 case "$CC" in
2543 (*[\ \ ]-*)
2544 echo "$as_me:2544: result: broken" >&5
2545 echo "${ECHO_T}broken" >&6
2546 { echo "$as_me:2546: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2547 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2548 # humor him...
2549 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2550 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2551 CC="$cf_prog"
2552 for cf_arg in $cf_flags
2553 do
2554 case "x$cf_arg" in
2555 (x-[IUDfgOW]*)
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case "$cf_fix_cppflags" in
2565 (no)
2566 case "$cf_add_cflags" in
2567 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2568 case "$cf_add_cflags" in
2569 (-D*)
2570 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2573 && test -z "${cf_tst_cflags}" \
2574 && cf_fix_cppflags=yes
2575
2576 if test "$cf_fix_cppflags" = yes ; then
2577
2578 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2579 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2580
2581 continue
2582 elif test "${cf_tst_cflags}" = "\"'" ; then
2583
2584 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2585 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2586
2587 continue
2588 fi
2589 ;;
2590 esac
2591 case "$CPPFLAGS" in
2592 (*$cf_add_cflags)
2593 ;;
2594 (*)
2595 case "$cf_add_cflags" in
2596 (-D*)
2597 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2598
2599 CPPFLAGS=`echo "$CPPFLAGS" | \
2600 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2601 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2602
2603 ;;
2604 esac
2605
2606 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2607 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2608
2609 ;;
2610 esac
2611 ;;
2612 (*)
2613
2614 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2615 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2616
2617 ;;
2618 esac
2619 ;;
2620 (yes)
2621
2622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2624
2625 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2626
2627 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2628 && test -z "${cf_tst_cflags}" \
2629 && cf_fix_cppflags=no
2630 ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2637 CFLAGS="${CFLAGS}$cf_new_cflags"
2638
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2644 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2645
2646 fi
2647
2648 if test -n "$cf_new_extra_cppflags" ; then
2649
2650 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2651 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2652
2653 fi
2654
2655 ;;
2656 (*)
2657 CC="$CC $cf_arg"
2658 ;;
2659 esac
2660 done
2661 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2662
2663 echo "${as_me:-configure}:2663: testing resulting CC: '$CC' ..." 1>&5
2664
2665 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2666
2667 echo "${as_me:-configure}:2667: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2668
2669 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2670
2671 echo "${as_me:-configure}:2671: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2672
2673 ;;
2674 (*)
2675 echo "$as_me:2675: result: ok" >&5
2676 echo "${ECHO_T}ok" >&6
2677 ;;
2678 esac
2679
2680 echo "$as_me:2680: checking for inline" >&5
2681 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2682 if test "${ac_cv_c_inline+set}" = set; then
2683 echo $ECHO_N "(cached) $ECHO_C" >&6
2684 else
2685 ac_cv_c_inline=no
2686 for ac_kw in inline __inline__ __inline; do
2687 cat >"conftest.$ac_ext" <<_ACEOF
2688 #line 2688 "configure"
2689 #include "confdefs.h"
2690 #ifndef __cplusplus
2691 static $ac_kw int static_foo (void) {return 0; }
2692 $ac_kw int foo (void) {return 0; }
2693 #endif
2694
2695 _ACEOF
2696 rm -f "conftest.$ac_objext"
2697 if { (eval echo "$as_me:2697: \"$ac_compile\"") >&5
2698 (eval $ac_compile) 2>&5
2699 ac_status=$?
2700 echo "$as_me:2700: \$? = $ac_status" >&5
2701 (exit "$ac_status"); } &&
2702 { ac_try='test -s "conftest.$ac_objext"'
2703 { (eval echo "$as_me:2703: \"$ac_try\"") >&5
2704 (eval $ac_try) 2>&5
2705 ac_status=$?
2706 echo "$as_me:2706: \$? = $ac_status" >&5
2707 (exit "$ac_status"); }; }; then
2708 ac_cv_c_inline=$ac_kw; break
2709 else
2710 echo "$as_me: failed program was:" >&5
2711 cat "conftest.$ac_ext" >&5
2712 fi
2713 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2714 done
2715
2716 fi
2717 echo "$as_me:2717: result: $ac_cv_c_inline" >&5
2718 echo "${ECHO_T}$ac_cv_c_inline" >&6
2719 case $ac_cv_c_inline in
2720 inline | yes) ;;
2721 no)
2722 cat >>confdefs.h <<\EOF
2723 #define inline
2724 EOF
2725 ;;
2726 *) cat >>confdefs.h <<EOF
2727 #define inline $ac_cv_c_inline
2728 EOF
2729 ;;
2730 esac
2731
2732 for ac_prog in ggrep grep
2733 do
2734 # Extract the first word of "$ac_prog", so it can be a program name with args.
2735 set dummy $ac_prog; ac_word=$2
2736 echo "$as_me:2736: checking for $ac_word" >&5
2737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2738 if test "${ac_cv_prog_GREP+set}" = set; then
2739 echo $ECHO_N "(cached) $ECHO_C" >&6
2740 else
2741 if test -n "$GREP"; then
2742 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2743 else
2744 ac_save_IFS=$IFS; IFS=$ac_path_separator
2745 ac_dummy="$PATH"
2746 for ac_dir in $ac_dummy; do
2747 IFS=$ac_save_IFS
2748 test -z "$ac_dir" && ac_dir=.
2749 $as_executable_p "$ac_dir/$ac_word" || continue
2750 ac_cv_prog_GREP="$ac_prog"
2751 echo "$as_me:2751: found $ac_dir/$ac_word" >&5
2752 break
2753 done
2754
2755 fi
2756 fi
2757 GREP=$ac_cv_prog_GREP
2758 if test -n "$GREP"; then
2759 echo "$as_me:2759: result: $GREP" >&5
2760 echo "${ECHO_T}$GREP" >&6
2761 else
2762 echo "$as_me:2762: result: no" >&5
2763 echo "${ECHO_T}no" >&6
2764 fi
2765
2766 test -n "$GREP" && break
2767 done
2768 test -n "$GREP" || GREP=": "
2769
2770 echo "$as_me:2770: checking for egrep" >&5
2771 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2772 if test "${ac_cv_path_EGREP+set}" = set; then
2773 echo $ECHO_N "(cached) $ECHO_C" >&6
2774 else
2775 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2776 then ac_cv_path_EGREP="$GREP -E"
2777 else
2778 for ac_prog in gegrep egrep
2779 do
2780 # Extract the first word of "$ac_prog", so it can be a program name with args.
2781 set dummy $ac_prog; ac_word=$2
2782 echo "$as_me:2782: checking for $ac_word" >&5
2783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2784 if test "${ac_cv_path_EGREP+set}" = set; then
2785 echo $ECHO_N "(cached) $ECHO_C" >&6
2786 else
2787 case $EGREP in
2788 [\\/]* | ?:[\\/]*)
2789 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2790 ;;
2791 *)
2792 ac_save_IFS=$IFS; IFS=$ac_path_separator
2793 ac_dummy="$PATH"
2794 for ac_dir in $ac_dummy; do
2795 IFS=$ac_save_IFS
2796 test -z "$ac_dir" && ac_dir=.
2797 if $as_executable_p "$ac_dir/$ac_word"; then
2798 ac_cv_path_EGREP="$ac_dir/$ac_word"
2799 echo "$as_me:2799: found $ac_dir/$ac_word" >&5
2800 break
2801 fi
2802 done
2803
2804 ;;
2805 esac
2806 fi
2807 EGREP=$ac_cv_path_EGREP
2808
2809 if test -n "$EGREP"; then
2810 echo "$as_me:2810: result: $EGREP" >&5
2811 echo "${ECHO_T}$EGREP" >&6
2812 else
2813 echo "$as_me:2813: result: no" >&5
2814 echo "${ECHO_T}no" >&6
2815 fi
2816
2817 test -n "$EGREP" && break
2818 done
2819 test -n "$EGREP" || EGREP=": "
2820
2821 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2821: error: cannot find workable egrep" >&5
2822 echo "$as_me: error: cannot find workable egrep" >&2;}
2823 { (exit 1); exit 1; }; }
2824 fi
2825 fi
2826 echo "$as_me:2826: result: $ac_cv_path_EGREP" >&5
2827 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2828 EGREP="$ac_cv_path_EGREP"
2829
2830 ac_ext=c
2831 ac_cpp='$CPP $CPPFLAGS'
2832 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2833 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2834 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2835 ac_main_return="return"
2836 echo "$as_me:2836: checking how to run the C preprocessor" >&5
2837 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2838 # On Suns, sometimes $CPP names a directory.
2839 if test -n "$CPP" && test -d "$CPP"; then
2840 CPP=
2841 fi
2842 if test -z "$CPP"; then
2843 if test "${ac_cv_prog_CPP+set}" = set; then
2844 echo $ECHO_N "(cached) $ECHO_C" >&6
2845 else
2846 # Double quotes because CPP needs to be expanded
2847 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2848 do
2849 ac_preproc_ok=false
2850 for ac_c_preproc_warn_flag in '' yes
2851 do
2852 # Use a header file that comes with gcc, so configuring glibc
2853 # with a fresh cross-compiler works.
2854 # On the NeXT, cc -E runs the code through the compiler's parser,
2855 # not just through cpp. "Syntax error" is here to catch this case.
2856 cat >"conftest.$ac_ext" <<_ACEOF
2857 #line 2857 "configure"
2858 #include "confdefs.h"
2859 #include <assert.h>
2860 Syntax error
2861 _ACEOF
2862 if { (eval echo "$as_me:2862: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2863 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2864 ac_status=$?
2865 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2866 rm -f conftest.er1
2867 cat conftest.err >&5
2868 echo "$as_me:2868: \$? = $ac_status" >&5
2869 (exit "$ac_status"); } >/dev/null; then
2870 if test -s conftest.err; then
2871 ac_cpp_err=$ac_c_preproc_warn_flag
2872 else
2873 ac_cpp_err=
2874 fi
2875 else
2876 ac_cpp_err=yes
2877 fi
2878 if test -z "$ac_cpp_err"; then
2879 :
2880 else
2881 echo "$as_me: failed program was:" >&5
2882 cat "conftest.$ac_ext" >&5
2883 # Broken: fails on valid input.
2884 continue
2885 fi
2886 rm -f conftest.err "conftest.$ac_ext"
2887
2888 # OK, works on sane cases. Now check whether non-existent headers
2889 # can be detected and how.
2890 cat >"conftest.$ac_ext" <<_ACEOF
2891 #line 2891 "configure"
2892 #include "confdefs.h"
2893 #include <ac_nonexistent.h>
2894 _ACEOF
2895 if { (eval echo "$as_me:2895: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2896 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2897 ac_status=$?
2898 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2899 rm -f conftest.er1
2900 cat conftest.err >&5
2901 echo "$as_me:2901: \$? = $ac_status" >&5
2902 (exit "$ac_status"); } >/dev/null; then
2903 if test -s conftest.err; then
2904 ac_cpp_err=$ac_c_preproc_warn_flag
2905 else
2906 ac_cpp_err=
2907 fi
2908 else
2909 ac_cpp_err=yes
2910 fi
2911 if test -z "$ac_cpp_err"; then
2912 # Broken: success on invalid input.
2913 continue
2914 else
2915 echo "$as_me: failed program was:" >&5
2916 cat "conftest.$ac_ext" >&5
2917 # Passes both tests.
2918 ac_preproc_ok=:
2919 break
2920 fi
2921 rm -f conftest.err "conftest.$ac_ext"
2922
2923 done
2924 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2925 rm -f conftest.err "conftest.$ac_ext"
2926 if $ac_preproc_ok; then
2927 break
2928 fi
2929
2930 done
2931 ac_cv_prog_CPP=$CPP
2932
2933 fi
2934 CPP=$ac_cv_prog_CPP
2935 else
2936 ac_cv_prog_CPP=$CPP
2937 fi
2938 echo "$as_me:2938: result: $CPP" >&5
2939 echo "${ECHO_T}$CPP" >&6
2940 ac_preproc_ok=false
2941 for ac_c_preproc_warn_flag in '' yes
2942 do
2943 # Use a header file that comes with gcc, so configuring glibc
2944 # with a fresh cross-compiler works.
2945 # On the NeXT, cc -E runs the code through the compiler's parser,
2946 # not just through cpp. "Syntax error" is here to catch this case.
2947 cat >"conftest.$ac_ext" <<_ACEOF
2948 #line 2948 "configure"
2949 #include "confdefs.h"
2950 #include <assert.h>
2951 Syntax error
2952 _ACEOF
2953 if { (eval echo "$as_me:2953: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2954 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2955 ac_status=$?
2956 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2957 rm -f conftest.er1
2958 cat conftest.err >&5
2959 echo "$as_me:2959: \$? = $ac_status" >&5
2960 (exit "$ac_status"); } >/dev/null; then
2961 if test -s conftest.err; then
2962 ac_cpp_err=$ac_c_preproc_warn_flag
2963 else
2964 ac_cpp_err=
2965 fi
2966 else
2967 ac_cpp_err=yes
2968 fi
2969 if test -z "$ac_cpp_err"; then
2970 :
2971 else
2972 echo "$as_me: failed program was:" >&5
2973 cat "conftest.$ac_ext" >&5
2974 # Broken: fails on valid input.
2975 continue
2976 fi
2977 rm -f conftest.err "conftest.$ac_ext"
2978
2979 # OK, works on sane cases. Now check whether non-existent headers
2980 # can be detected and how.
2981 cat >"conftest.$ac_ext" <<_ACEOF
2982 #line 2982 "configure"
2983 #include "confdefs.h"
2984 #include <ac_nonexistent.h>
2985 _ACEOF
2986 if { (eval echo "$as_me:2986: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2987 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2988 ac_status=$?
2989 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2990 rm -f conftest.er1
2991 cat conftest.err >&5
2992 echo "$as_me:2992: \$? = $ac_status" >&5
2993 (exit "$ac_status"); } >/dev/null; then
2994 if test -s conftest.err; then
2995 ac_cpp_err=$ac_c_preproc_warn_flag
2996 else
2997 ac_cpp_err=
2998 fi
2999 else
3000 ac_cpp_err=yes
3001 fi
3002 if test -z "$ac_cpp_err"; then
3003 # Broken: success on invalid input.
3004 continue
3005 else
3006 echo "$as_me: failed program was:" >&5
3007 cat "conftest.$ac_ext" >&5
3008 # Passes both tests.
3009 ac_preproc_ok=:
3010 break
3011 fi
3012 rm -f conftest.err "conftest.$ac_ext"
3013
3014 done
3015 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3016 rm -f conftest.err "conftest.$ac_ext"
3017 if $ac_preproc_ok; then
3018 :
3019 else
3020 { { echo "$as_me:3020: error: C preprocessor \"$CPP\" fails sanity check" >&5
3021 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3022 { (exit 1); exit 1; }; }
3023 fi
3024
3025 ac_ext=c
3026 ac_cpp='$CPP $CPPFLAGS'
3027 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3028 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3030 ac_main_return="return"
3031
3032 echo "$as_me:3032: checking if preprocessor -C option works" >&5
3033 echo $ECHO_N "checking if preprocessor -C option works... $ECHO_C" >&6
3034 if test "${cf_cv_prog_cpp_comments+set}" = set; then
3035 echo $ECHO_N "(cached) $ECHO_C" >&6
3036 else
3037
3038 cf_cv_prog_cpp_comments=no
3039 cat >conftest.c <<CF_EOF
3040 int main(void)
3041 {
3042 /* COMMENT */
3043 return 0;
3044 }
3045 CF_EOF
3046 if ( $CPP -C conftest.c >conftest.i 2>/dev/null )
3047 then
3048 if ( grep COMMENT conftest.i >/dev/null 2>/dev/null )
3049 then
3050 cf_cv_prog_cpp_comments=yes
3051 fi
3052 fi
3053 rm -f conftest.[ci]
3054
3055 fi
3056
3057 echo "$as_me:3057: result: $cf_cv_prog_cpp_comments" >&5
3058 echo "${ECHO_T}$cf_cv_prog_cpp_comments" >&6
3059 if test x$cf_cv_prog_cpp_comments = xyes
3060 then
3061 CPP="$CPP -C"
3062 fi
3063
3064 echo "$as_me:3064: checking whether ln -s works" >&5
3065 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3066 LN_S=$as_ln_s
3067 if test "$LN_S" = "ln -s"; then
3068 echo "$as_me:3068: result: yes" >&5
3069 echo "${ECHO_T}yes" >&6
3070 else
3071 echo "$as_me:3071: result: no, using $LN_S" >&5
3072 echo "${ECHO_T}no, using $LN_S" >&6
3073 fi
3074
3075 case "$host_os" in
3076 (mingw*)
3077 LN_S="cp -p"
3078 echo "$as_me:3078: result: Override: No symbolic links in mingw." >&5
3079 echo "${ECHO_T}Override: No symbolic links in mingw." >&6
3080 ;;
3081 (*)
3082 ;;
3083 esac
3084 echo "$as_me:3084: checking whether ${MAKE-make} sets \${MAKE}" >&5
3085 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3086 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3087 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3088 echo $ECHO_N "(cached) $ECHO_C" >&6
3089 else
3090 cat >conftest.make <<\EOF
3091 all:
3092 @echo 'ac_maketemp="${MAKE}"'
3093 EOF
3094 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3095 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3096 if test -n "$ac_maketemp"; then
3097 eval ac_cv_prog_make_${ac_make}_set=yes
3098 else
3099 eval ac_cv_prog_make_${ac_make}_set=no
3100 fi
3101 rm -f conftest.make
3102 fi
3103 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3104 echo "$as_me:3104: result: yes" >&5
3105 echo "${ECHO_T}yes" >&6
3106 SET_MAKE=
3107 else
3108 echo "$as_me:3108: result: no" >&5
3109 echo "${ECHO_T}no" >&6
3110 SET_MAKE="MAKE=${MAKE-make}"
3111 fi
3112
3113 # Find a good install program. We prefer a C program (faster),
3114 # so one script is as good as another. But avoid the broken or
3115 # incompatible versions:
3116 # SysV /etc/install, /usr/sbin/install
3117 # SunOS /usr/etc/install
3118 # IRIX /sbin/install
3119 # AIX /bin/install
3120 # AmigaOS /C/install, which installs bootblocks on floppy discs
3121 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3122 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3123 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3124 # ./install, which can be erroneously created by make from ./install.sh.
3125 echo "$as_me:3125: checking for a BSD compatible install" >&5
3126 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3127 if test -z "$INSTALL"; then
3128 if test "${ac_cv_path_install+set}" = set; then
3129 echo $ECHO_N "(cached) $ECHO_C" >&6
3130 else
3131 ac_save_IFS=$IFS; IFS=$ac_path_separator
3132 for ac_dir in $PATH; do
3133 IFS=$ac_save_IFS
3134 # Account for people who put trailing slashes in PATH elements.
3135 case $ac_dir/ in
3136 / | ./ | .// | /cC/* \
3137 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3138 | /usr/ucb/* ) ;;
3139 *)
3140 # OSF1 and SCO ODT 3.0 have their own names for install.
3141 # Don't use installbsd from OSF since it installs stuff as root
3142 # by default.
3143 for ac_prog in ginstall scoinst install; do
3144 if $as_executable_p "$ac_dir/$ac_prog"; then
3145 if test $ac_prog = install &&
3146 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3147 # AIX install. It has an incompatible calling convention.
3148 :
3149 elif test $ac_prog = install &&
3150 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3151 # program-specific install script used by HP pwplus--don't use.
3152 :
3153 else
3154 ac_cv_path_install="$ac_dir/$ac_prog -c"
3155 break 2
3156 fi
3157 fi
3158 done
3159 ;;
3160 esac
3161 done
3162
3163 fi
3164 if test "${ac_cv_path_install+set}" = set; then
3165 INSTALL=$ac_cv_path_install
3166 else
3167 # As a last resort, use the slow shell script. We don't cache a
3168 # path for INSTALL within a source directory, because that will
3169 # break other packages using the cache if that directory is
3170 # removed, or if the path is relative.
3171 INSTALL=$ac_install_sh
3172 fi
3173 fi
3174 echo "$as_me:3174: result: $INSTALL" >&5
3175 echo "${ECHO_T}$INSTALL" >&6
3176
3177 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3178 # It thinks the first close brace ends the variable substitution.
3179 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3180
3181 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3182
3183 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3184
3185 for ac_prog in byacc 'bison -y'
3186 do
3187 # Extract the first word of "$ac_prog", so it can be a program name with args.
3188 set dummy $ac_prog; ac_word=$2
3189 echo "$as_me:3189: checking for $ac_word" >&5
3190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3191 if test "${ac_cv_prog_YACC+set}" = set; then
3192 echo $ECHO_N "(cached) $ECHO_C" >&6
3193 else
3194 if test -n "$YACC"; then
3195 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3196 else
3197 ac_save_IFS=$IFS; IFS=$ac_path_separator
3198 ac_dummy="$PATH"
3199 for ac_dir in $ac_dummy; do
3200 IFS=$ac_save_IFS
3201 test -z "$ac_dir" && ac_dir=.
3202 $as_executable_p "$ac_dir/$ac_word" || continue
3203 ac_cv_prog_YACC="$ac_prog"
3204 echo "$as_me:3204: found $ac_dir/$ac_word" >&5
3205 break
3206 done
3207
3208 fi
3209 fi
3210 YACC=$ac_cv_prog_YACC
3211 if test -n "$YACC"; then
3212 echo "$as_me:3212: result: $YACC" >&5
3213 echo "${ECHO_T}$YACC" >&6
3214 else
3215 echo "$as_me:3215: result: no" >&5
3216 echo "${ECHO_T}no" >&6
3217 fi
3218
3219 test -n "$YACC" && break
3220 done
3221 test -n "$YACC" || YACC="yacc"
3222
3223 echo "$as_me:3223: checking for egrep" >&5
3224 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3225 if test "${ac_cv_path_EGREP+set}" = set; then
3226 echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3229 then ac_cv_path_EGREP="$GREP -E"
3230 else
3231 for ac_prog in gegrep egrep
3232 do
3233 # Extract the first word of "$ac_prog", so it can be a program name with args.
3234 set dummy $ac_prog; ac_word=$2
3235 echo "$as_me:3235: checking for $ac_word" >&5
3236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3237 if test "${ac_cv_path_EGREP+set}" = set; then
3238 echo $ECHO_N "(cached) $ECHO_C" >&6
3239 else
3240 case $EGREP in
3241 [\\/]* | ?:[\\/]*)
3242 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
3243 ;;
3244 *)
3245 ac_save_IFS=$IFS; IFS=$ac_path_separator
3246 ac_dummy="$PATH"
3247 for ac_dir in $ac_dummy; do
3248 IFS=$ac_save_IFS
3249 test -z "$ac_dir" && ac_dir=.
3250 if $as_executable_p "$ac_dir/$ac_word"; then
3251 ac_cv_path_EGREP="$ac_dir/$ac_word"
3252 echo "$as_me:3252: found $ac_dir/$ac_word" >&5
3253 break
3254 fi
3255 done
3256
3257 ;;
3258 esac
3259 fi
3260 EGREP=$ac_cv_path_EGREP
3261
3262 if test -n "$EGREP"; then
3263 echo "$as_me:3263: result: $EGREP" >&5
3264 echo "${ECHO_T}$EGREP" >&6
3265 else
3266 echo "$as_me:3266: result: no" >&5
3267 echo "${ECHO_T}no" >&6
3268 fi
3269
3270 test -n "$EGREP" && break
3271 done
3272 test -n "$EGREP" || EGREP=": "
3273
3274 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:3274: error: cannot find workable egrep" >&5
3275 echo "$as_me: error: cannot find workable egrep" >&2;}
3276 { (exit 1); exit 1; }; }
3277 fi
3278 fi
3279 echo "$as_me:3279: result: $ac_cv_path_EGREP" >&5
3280 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
3281 EGREP="$ac_cv_path_EGREP"
3282
3283 for ac_prog in lint cppcheck splint
3284 do
3285 # Extract the first word of "$ac_prog", so it can be a program name with args.
3286 set dummy $ac_prog; ac_word=$2
3287 echo "$as_me:3287: checking for $ac_word" >&5
3288 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3289 if test "${ac_cv_prog_LINT+set}" = set; then
3290 echo $ECHO_N "(cached) $ECHO_C" >&6
3291 else
3292 if test -n "$LINT"; then
3293 ac_cv_prog_LINT="$LINT" # Let the user override the test.
3294 else
3295 ac_save_IFS=$IFS; IFS=$ac_path_separator
3296 ac_dummy="$PATH"
3297 for ac_dir in $ac_dummy; do
3298 IFS=$ac_save_IFS
3299 test -z "$ac_dir" && ac_dir=.
3300 $as_executable_p "$ac_dir/$ac_word" || continue
3301 ac_cv_prog_LINT="$ac_prog"
3302 echo "$as_me:3302: found $ac_dir/$ac_word" >&5
3303 break
3304 done
3305
3306 fi
3307 fi
3308 LINT=$ac_cv_prog_LINT
3309 if test -n "$LINT"; then
3310 echo "$as_me:3310: result: $LINT" >&5
3311 echo "${ECHO_T}$LINT" >&6
3312 else
3313 echo "$as_me:3313: result: no" >&5
3314 echo "${ECHO_T}no" >&6
3315 fi
3316
3317 test -n "$LINT" && break
3318 done
3319
3320 case "x$LINT" in
3321 (xlint|x*/lint) # NetBSD 10
3322 test -z "$LINT_OPTS" && LINT_OPTS="-chapbrxzgFS -v -Ac11"
3323 ;;
3324 (xcppcheck|x*/cppcheck)
3325 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all -D__CPPCHECK__"
3326 ;;
3327 esac
3328
3329 echo "$as_me:3329: checking for \".PHONY\" make-support" >&5
3330 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3331 if test "${cf_cv_make_PHONY+set}" = set; then
3332 echo $ECHO_N "(cached) $ECHO_C" >&6
3333 else
3334
3335 rm -rf conftest*
3336 (
3337 mkdir conftest || exit 1
3338 cd conftest
3339 cat >makefile <<'CF_EOF'
3340 .PHONY: always
3341 DATA=0
3342 always: always.out
3343 @echo "** making $@ $(DATA)"
3344 once: once.out
3345 @echo "** making $@ $(DATA)"
3346 always.out:
3347 @echo "** making $@ $(DATA)"
3348 echo $(DATA) > $@
3349 once.out:
3350 @echo "** making $@ $(DATA)"
3351 echo $(DATA) > $@
3352 CF_EOF
3353 for cf_data in 1 2 3
3354 do
3355 ${MAKE:-make} always DATA=$cf_data
3356 ${MAKE:-make} once DATA=$cf_data
3357 ${MAKE:-make} -t always once
3358 if test -f always ; then
3359 echo "no (case 1)" > ../conftest.tmp
3360 elif test ! -f always.out ; then
3361 echo "no (case 2)" > ../conftest.tmp
3362 elif test ! -f once.out ; then
3363 echo "no (case 3)" > ../conftest.tmp
3364 elif ! cmp -s always.out once.out ; then
3365 echo "no (case 4)" > ../conftest.tmp
3366 diff always.out once.out
3367 else
3368 cf_check="`cat always.out`"
3369 if test "x$cf_check" != "x$cf_data" ; then
3370 echo "no (case 5)" > ../conftest.tmp
3371 else
3372 echo yes > ../conftest.tmp
3373 rm -f ./*.out
3374 continue
3375 fi
3376 fi
3377 break
3378 done
3379 ) >&5 2>&1
3380 cf_cv_make_PHONY="`cat conftest.tmp`"
3381 rm -rf conftest*
3382
3383 fi
3384 echo "$as_me:3384: result: $cf_cv_make_PHONY" >&5
3385 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3386 MAKE_NO_PHONY="#"
3387 MAKE_PHONY="#"
3388 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3389 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3390
3391 echo "$as_me:3391: checking if filesystem supports mixed-case filenames" >&5
3392 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3393 if test "${cf_cv_mixedcase+set}" = set; then
3394 echo $ECHO_N "(cached) $ECHO_C" >&6
3395 else
3396
3397 if test "$cross_compiling" = yes ; then
3398 case "$target_alias" in
3399 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3400 cf_cv_mixedcase=no
3401 ;;
3402 (*)
3403 cf_cv_mixedcase=yes
3404 ;;
3405 esac
3406 else
3407 rm -f conftest CONFTEST
3408 echo test >conftest
3409 if test -f CONFTEST ; then
3410 cf_cv_mixedcase=no
3411 else
3412 cf_cv_mixedcase=yes
3413 fi
3414 rm -f conftest CONFTEST
3415 fi
3416
3417 fi
3418 echo "$as_me:3418: result: $cf_cv_mixedcase" >&5
3419 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3420 test "$cf_cv_mixedcase" = yes &&
3421 cat >>confdefs.h <<\EOF
3422 #define MIXEDCASE_FILENAMES 1
3423 EOF
3424
3425 for ac_prog in exctags ctags
3426 do
3427 # Extract the first word of "$ac_prog", so it can be a program name with args.
3428 set dummy $ac_prog; ac_word=$2
3429 echo "$as_me:3429: checking for $ac_word" >&5
3430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3431 if test "${ac_cv_prog_CTAGS+set}" = set; then
3432 echo $ECHO_N "(cached) $ECHO_C" >&6
3433 else
3434 if test -n "$CTAGS"; then
3435 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3436 else
3437 ac_save_IFS=$IFS; IFS=$ac_path_separator
3438 ac_dummy="$PATH"
3439 for ac_dir in $ac_dummy; do
3440 IFS=$ac_save_IFS
3441 test -z "$ac_dir" && ac_dir=.
3442 $as_executable_p "$ac_dir/$ac_word" || continue
3443 ac_cv_prog_CTAGS="$ac_prog"
3444 echo "$as_me:3444: found $ac_dir/$ac_word" >&5
3445 break
3446 done
3447
3448 fi
3449 fi
3450 CTAGS=$ac_cv_prog_CTAGS
3451 if test -n "$CTAGS"; then
3452 echo "$as_me:3452: result: $CTAGS" >&5
3453 echo "${ECHO_T}$CTAGS" >&6
3454 else
3455 echo "$as_me:3455: result: no" >&5
3456 echo "${ECHO_T}no" >&6
3457 fi
3458
3459 test -n "$CTAGS" && break
3460 done
3461
3462 for ac_prog in exetags etags
3463 do
3464 # Extract the first word of "$ac_prog", so it can be a program name with args.
3465 set dummy $ac_prog; ac_word=$2
3466 echo "$as_me:3466: checking for $ac_word" >&5
3467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3468 if test "${ac_cv_prog_ETAGS+set}" = set; then
3469 echo $ECHO_N "(cached) $ECHO_C" >&6
3470 else
3471 if test -n "$ETAGS"; then
3472 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3473 else
3474 ac_save_IFS=$IFS; IFS=$ac_path_separator
3475 ac_dummy="$PATH"
3476 for ac_dir in $ac_dummy; do
3477 IFS=$ac_save_IFS
3478 test -z "$ac_dir" && ac_dir=.
3479 $as_executable_p "$ac_dir/$ac_word" || continue
3480 ac_cv_prog_ETAGS="$ac_prog"
3481 echo "$as_me:3481: found $ac_dir/$ac_word" >&5
3482 break
3483 done
3484
3485 fi
3486 fi
3487 ETAGS=$ac_cv_prog_ETAGS
3488 if test -n "$ETAGS"; then
3489 echo "$as_me:3489: result: $ETAGS" >&5
3490 echo "${ECHO_T}$ETAGS" >&6
3491 else
3492 echo "$as_me:3492: result: no" >&5
3493 echo "${ECHO_T}no" >&6
3494 fi
3495
3496 test -n "$ETAGS" && break
3497 done
3498
3499 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3500 set dummy ${CTAGS:-ctags}; ac_word=$2
3501 echo "$as_me:3501: checking for $ac_word" >&5
3502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3503 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3504 echo $ECHO_N "(cached) $ECHO_C" >&6
3505 else
3506 if test -n "$MAKE_LOWER_TAGS"; then
3507 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3508 else
3509 ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 ac_dummy="$PATH"
3511 for ac_dir in $ac_dummy; do
3512 IFS=$ac_save_IFS
3513 test -z "$ac_dir" && ac_dir=.
3514 $as_executable_p "$ac_dir/$ac_word" || continue
3515 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3516 echo "$as_me:3516: found $ac_dir/$ac_word" >&5
3517 break
3518 done
3519
3520 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3521 fi
3522 fi
3523 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3524 if test -n "$MAKE_LOWER_TAGS"; then
3525 echo "$as_me:3525: result: $MAKE_LOWER_TAGS" >&5
3526 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3527 else
3528 echo "$as_me:3528: result: no" >&5
3529 echo "${ECHO_T}no" >&6
3530 fi
3531
3532 if test "$cf_cv_mixedcase" = yes ; then
3533 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3534 set dummy ${ETAGS:-etags}; ac_word=$2
3535 echo "$as_me:3535: checking for $ac_word" >&5
3536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3539 else
3540 if test -n "$MAKE_UPPER_TAGS"; then
3541 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3542 else
3543 ac_save_IFS=$IFS; IFS=$ac_path_separator
3544 ac_dummy="$PATH"
3545 for ac_dir in $ac_dummy; do
3546 IFS=$ac_save_IFS
3547 test -z "$ac_dir" && ac_dir=.
3548 $as_executable_p "$ac_dir/$ac_word" || continue
3549 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3550 echo "$as_me:3550: found $ac_dir/$ac_word" >&5
3551 break
3552 done
3553
3554 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3555 fi
3556 fi
3557 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3558 if test -n "$MAKE_UPPER_TAGS"; then
3559 echo "$as_me:3559: result: $MAKE_UPPER_TAGS" >&5
3560 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3561 else
3562 echo "$as_me:3562: result: no" >&5
3563 echo "${ECHO_T}no" >&6
3564 fi
3565
3566 else
3567 MAKE_UPPER_TAGS=no
3568 fi
3569
3570 if test "$MAKE_UPPER_TAGS" = yes ; then
3571 MAKE_UPPER_TAGS=
3572 else
3573 MAKE_UPPER_TAGS="#"
3574 fi
3575
3576 if test "$MAKE_LOWER_TAGS" = yes ; then
3577 MAKE_LOWER_TAGS=
3578 else
3579 MAKE_LOWER_TAGS="#"
3580 fi
3581
3582 if test -n "$ac_tool_prefix"; then
3583 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3584 set dummy ${ac_tool_prefix}windres; ac_word=$2
3585 echo "$as_me:3585: checking for $ac_word" >&5
3586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3587 if test "${ac_cv_path_WINDRES+set}" = set; then
3588 echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590 case $WINDRES in
3591 [\\/]* | ?:[\\/]*)
3592 ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
3593 ;;
3594 *)
3595 ac_save_IFS=$IFS; IFS=$ac_path_separator
3596 ac_dummy="$PATH"
3597 for ac_dir in $ac_dummy; do
3598 IFS=$ac_save_IFS
3599 test -z "$ac_dir" && ac_dir=.
3600 if $as_executable_p "$ac_dir/$ac_word"; then
3601 ac_cv_path_WINDRES="$ac_dir/$ac_word"
3602 echo "$as_me:3602: found $ac_dir/$ac_word" >&5
3603 break
3604 fi
3605 done
3606
3607 ;;
3608 esac
3609 fi
3610 WINDRES=$ac_cv_path_WINDRES
3611
3612 if test -n "$WINDRES"; then
3613 echo "$as_me:3613: result: $WINDRES" >&5
3614 echo "${ECHO_T}$WINDRES" >&6
3615 else
3616 echo "$as_me:3616: result: no" >&5
3617 echo "${ECHO_T}no" >&6
3618 fi
3619
3620 fi
3621 if test -z "$ac_cv_path_WINDRES"; then
3622 ac_pt_WINDRES=$WINDRES
3623 # Extract the first word of "windres", so it can be a program name with args.
3624 set dummy windres; ac_word=$2
3625 echo "$as_me:3625: checking for $ac_word" >&5
3626 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3627 if test "${ac_cv_path_ac_pt_WINDRES+set}" = set; then
3628 echo $ECHO_N "(cached) $ECHO_C" >&6
3629 else
3630 case $ac_pt_WINDRES in
3631 [\\/]* | ?:[\\/]*)
3632 ac_cv_path_ac_pt_WINDRES="$ac_pt_WINDRES" # Let the user override the test with a path.
3633 ;;
3634 *)
3635 ac_save_IFS=$IFS; IFS=$ac_path_separator
3636 ac_dummy="$PATH"
3637 for ac_dir in $ac_dummy; do
3638 IFS=$ac_save_IFS
3639 test -z "$ac_dir" && ac_dir=.
3640 if $as_executable_p "$ac_dir/$ac_word"; then
3641 ac_cv_path_ac_pt_WINDRES="$ac_dir/$ac_word"
3642 echo "$as_me:3642: found $ac_dir/$ac_word" >&5
3643 break
3644 fi
3645 done
3646
3647 test -z "$ac_cv_path_ac_pt_WINDRES" && ac_cv_path_ac_pt_WINDRES="none"
3648 ;;
3649 esac
3650 fi
3651 ac_pt_WINDRES=$ac_cv_path_ac_pt_WINDRES
3652
3653 if test -n "$ac_pt_WINDRES"; then
3654 echo "$as_me:3654: result: $ac_pt_WINDRES" >&5
3655 echo "${ECHO_T}$ac_pt_WINDRES" >&6
3656 else
3657 echo "$as_me:3657: result: no" >&5
3658 echo "${ECHO_T}no" >&6
3659 fi
3660
3661 WINDRES=$ac_pt_WINDRES
3662 else
3663 WINDRES="$ac_cv_path_WINDRES"
3664 fi
3665
3666 if test "$cross_compiling" = yes ; then
3667
3668 # defaults that we might want to override
3669 : ${BUILD_CFLAGS:=''}
3670 : ${BUILD_CPPFLAGS:='#'}
3671 : ${BUILD_LDFLAGS:=''}
3672 : ${BUILD_LIBS:=''}
3673 : ${BUILD_EXEEXT:='$x'}
3674 : ${BUILD_OBJEXT:='o'}
3675
3676 # Check whether --with-build-cc or --without-build-cc was given.
3677 if test "${with_build_cc+set}" = set; then
3678 withval="$with_build_cc"
3679 BUILD_CC="$withval"
3680 else
3681 for ac_prog in gcc clang c99 c89 cc cl
3682 do
3683 # Extract the first word of "$ac_prog", so it can be a program name with args.
3684 set dummy $ac_prog; ac_word=$2
3685 echo "$as_me:3685: checking for $ac_word" >&5
3686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3687 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3688 echo $ECHO_N "(cached) $ECHO_C" >&6
3689 else
3690 if test -n "$BUILD_CC"; then
3691 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3692 else
3693 ac_save_IFS=$IFS; IFS=$ac_path_separator
3694 ac_dummy="$PATH"
3695 for ac_dir in $ac_dummy; do
3696 IFS=$ac_save_IFS
3697 test -z "$ac_dir" && ac_dir=.
3698 $as_executable_p "$ac_dir/$ac_word" || continue
3699 ac_cv_prog_BUILD_CC="$ac_prog"
3700 echo "$as_me:3700: found $ac_dir/$ac_word" >&5
3701 break
3702 done
3703
3704 fi
3705 fi
3706 BUILD_CC=$ac_cv_prog_BUILD_CC
3707 if test -n "$BUILD_CC"; then
3708 echo "$as_me:3708: result: $BUILD_CC" >&5
3709 echo "${ECHO_T}$BUILD_CC" >&6
3710 else
3711 echo "$as_me:3711: result: no" >&5
3712 echo "${ECHO_T}no" >&6
3713 fi
3714
3715 test -n "$BUILD_CC" && break
3716 done
3717 test -n "$BUILD_CC" || BUILD_CC="none"
3718
3719 fi;
3720 echo "$as_me:3720: checking for native build C compiler" >&5
3721 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3722 echo "$as_me:3722: result: $BUILD_CC" >&5
3723 echo "${ECHO_T}$BUILD_CC" >&6
3724
3725 echo "$as_me:3725: checking for native build C preprocessor" >&5
3726 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3727
3728 # Check whether --with-build-cpp or --without-build-cpp was given.
3729 if test "${with_build_cpp+set}" = set; then
3730 withval="$with_build_cpp"
3731 BUILD_CPP="$withval"
3732 else
3733 BUILD_CPP='${BUILD_CC} -E'
3734 fi;
3735 echo "$as_me:3735: result: $BUILD_CPP" >&5
3736 echo "${ECHO_T}$BUILD_CPP" >&6
3737
3738 echo "$as_me:3738: checking for native build C flags" >&5
3739 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3740
3741 # Check whether --with-build-cflags or --without-build-cflags was given.
3742 if test "${with_build_cflags+set}" = set; then
3743 withval="$with_build_cflags"
3744 BUILD_CFLAGS="$withval"
3745 fi;
3746 echo "$as_me:3746: result: $BUILD_CFLAGS" >&5
3747 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3748
3749 echo "$as_me:3749: checking for native build C preprocessor-flags" >&5
3750 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3751
3752 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3753 if test "${with_build_cppflags+set}" = set; then
3754 withval="$with_build_cppflags"
3755 BUILD_CPPFLAGS="$withval"
3756 fi;
3757 echo "$as_me:3757: result: $BUILD_CPPFLAGS" >&5
3758 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3759
3760 echo "$as_me:3760: checking for native build linker-flags" >&5
3761 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3762
3763 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3764 if test "${with_build_ldflags+set}" = set; then
3765 withval="$with_build_ldflags"
3766 BUILD_LDFLAGS="$withval"
3767 fi;
3768 echo "$as_me:3768: result: $BUILD_LDFLAGS" >&5
3769 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3770
3771 echo "$as_me:3771: checking for native build linker-libraries" >&5
3772 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3773
3774 # Check whether --with-build-libs or --without-build-libs was given.
3775 if test "${with_build_libs+set}" = set; then
3776 withval="$with_build_libs"
3777 BUILD_LIBS="$withval"
3778 fi;
3779 echo "$as_me:3779: result: $BUILD_LIBS" >&5
3780 echo "${ECHO_T}$BUILD_LIBS" >&6
3781
3782 # this assumes we're on Unix.
3783 BUILD_EXEEXT=
3784 BUILD_OBJEXT=o
3785
3786 : ${BUILD_CC:='${CC}'}
3787
3788 echo "$as_me:3788: checking if the build-compiler \"$BUILD_CC\" works" >&5
3789 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
3790
3791 cf_save_crossed=$cross_compiling
3792 cf_save_ac_link=$ac_link
3793 cross_compiling=no
3794 cf_build_cppflags=$BUILD_CPPFLAGS
3795 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
3796 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
3797
3798 if test "$cross_compiling" = yes; then
3799 cf_ok_build_cc=unknown
3800 else
3801 cat >"conftest.$ac_ext" <<_ACEOF
3802 #line 3802 "configure"
3803 #include "confdefs.h"
3804 #include <stdio.h>
3805 int main(int argc, char *argv[])
3806 {
3807 ${cf_cv_main_return:-return}(argc < 0 || argv == (void*)0 || argv[0] == (void*)0);
3808 }
3809
3810 _ACEOF
3811 rm -f "conftest$ac_exeext"
3812 if { (eval echo "$as_me:3812: \"$ac_link\"") >&5
3813 (eval $ac_link) 2>&5
3814 ac_status=$?
3815 echo "$as_me:3815: \$? = $ac_status" >&5
3816 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
3817 { (eval echo "$as_me:3817: \"$ac_try\"") >&5
3818 (eval $ac_try) 2>&5
3819 ac_status=$?
3820 echo "$as_me:3820: \$? = $ac_status" >&5
3821 (exit "$ac_status"); }; }; then
3822 cf_ok_build_cc=yes
3823 else
3824 echo "$as_me: program exited with status $ac_status" >&5
3825 echo "$as_me: failed program was:" >&5
3826 cat "conftest.$ac_ext" >&5
3827 cf_ok_build_cc=no
3828 fi
3829 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
3830 fi
3831
3832 cross_compiling=$cf_save_crossed
3833 ac_link=$cf_save_ac_link
3834
3835 echo "$as_me:3835: result: $cf_ok_build_cc" >&5
3836 echo "${ECHO_T}$cf_ok_build_cc" >&6
3837
3838 if test "$cf_ok_build_cc" != yes
3839 then
3840 { { echo "$as_me:3840: error: Cross-build requires two compilers.
3841 Use --with-build-cc to specify the native compiler." >&5
3842 echo "$as_me: error: Cross-build requires two compilers.
3843 Use --with-build-cc to specify the native compiler." >&2;}
3844 { (exit 1); exit 1; }; }
3845 fi
3846
3847 else
3848 : ${BUILD_CC:='${CC}'}
3849 : ${BUILD_CPP:='${CPP}'}
3850 : ${BUILD_CFLAGS:='${CFLAGS}'}
3851 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3852 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3853 : ${BUILD_LIBS:='${LIBS}'}
3854 : ${BUILD_EXEEXT:='$x'}
3855 : ${BUILD_OBJEXT:='o'}
3856 fi
3857
3858 if test -n "$ac_tool_prefix"; then
3859 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3860 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3861 echo "$as_me:3861: checking for $ac_word" >&5
3862 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3863 if test "${ac_cv_prog_RANLIB+set}" = set; then
3864 echo $ECHO_N "(cached) $ECHO_C" >&6
3865 else
3866 if test -n "$RANLIB"; then
3867 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3868 else
3869 ac_save_IFS=$IFS; IFS=$ac_path_separator
3870 ac_dummy="$PATH"
3871 for ac_dir in $ac_dummy; do
3872 IFS=$ac_save_IFS
3873 test -z "$ac_dir" && ac_dir=.
3874 $as_executable_p "$ac_dir/$ac_word" || continue
3875 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3876 echo "$as_me:3876: found $ac_dir/$ac_word" >&5
3877 break
3878 done
3879
3880 fi
3881 fi
3882 RANLIB=$ac_cv_prog_RANLIB
3883 if test -n "$RANLIB"; then
3884 echo "$as_me:3884: result: $RANLIB" >&5
3885 echo "${ECHO_T}$RANLIB" >&6
3886 else
3887 echo "$as_me:3887: result: no" >&5
3888 echo "${ECHO_T}no" >&6
3889 fi
3890
3891 fi
3892 if test -z "$ac_cv_prog_RANLIB"; then
3893 ac_ct_RANLIB=$RANLIB
3894 # Extract the first word of "ranlib", so it can be a program name with args.
3895 set dummy ranlib; ac_word=$2
3896 echo "$as_me:3896: checking for $ac_word" >&5
3897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3898 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3899 echo $ECHO_N "(cached) $ECHO_C" >&6
3900 else
3901 if test -n "$ac_ct_RANLIB"; then
3902 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3903 else
3904 ac_save_IFS=$IFS; IFS=$ac_path_separator
3905 ac_dummy="$PATH"
3906 for ac_dir in $ac_dummy; do
3907 IFS=$ac_save_IFS
3908 test -z "$ac_dir" && ac_dir=.
3909 $as_executable_p "$ac_dir/$ac_word" || continue
3910 ac_cv_prog_ac_ct_RANLIB="ranlib"
3911 echo "$as_me:3911: found $ac_dir/$ac_word" >&5
3912 break
3913 done
3914
3915 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3916 fi
3917 fi
3918 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3919 if test -n "$ac_ct_RANLIB"; then
3920 echo "$as_me:3920: result: $ac_ct_RANLIB" >&5
3921 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3922 else
3923 echo "$as_me:3923: result: no" >&5
3924 echo "${ECHO_T}no" >&6
3925 fi
3926
3927 RANLIB=$ac_ct_RANLIB
3928 else
3929 RANLIB="$ac_cv_prog_RANLIB"
3930 fi
3931
3932 if test -n "$ac_tool_prefix"; then
3933 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3934 set dummy ${ac_tool_prefix}ar; ac_word=$2
3935 echo "$as_me:3935: checking for $ac_word" >&5
3936 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3937 if test "${ac_cv_prog_AR+set}" = set; then
3938 echo $ECHO_N "(cached) $ECHO_C" >&6
3939 else
3940 if test -n "$AR"; then
3941 ac_cv_prog_AR="$AR" # Let the user override the test.
3942 else
3943 ac_save_IFS=$IFS; IFS=$ac_path_separator
3944 ac_dummy="$PATH"
3945 for ac_dir in $ac_dummy; do
3946 IFS=$ac_save_IFS
3947 test -z "$ac_dir" && ac_dir=.
3948 $as_executable_p "$ac_dir/$ac_word" || continue
3949 ac_cv_prog_AR="${ac_tool_prefix}ar"
3950 echo "$as_me:3950: found $ac_dir/$ac_word" >&5
3951 break
3952 done
3953
3954 fi
3955 fi
3956 AR=$ac_cv_prog_AR
3957 if test -n "$AR"; then
3958 echo "$as_me:3958: result: $AR" >&5
3959 echo "${ECHO_T}$AR" >&6
3960 else
3961 echo "$as_me:3961: result: no" >&5
3962 echo "${ECHO_T}no" >&6
3963 fi
3964
3965 fi
3966 if test -z "$ac_cv_prog_AR"; then
3967 ac_ct_AR=$AR
3968 # Extract the first word of "ar", so it can be a program name with args.
3969 set dummy ar; ac_word=$2
3970 echo "$as_me:3970: checking for $ac_word" >&5
3971 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3972 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3973 echo $ECHO_N "(cached) $ECHO_C" >&6
3974 else
3975 if test -n "$ac_ct_AR"; then
3976 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3977 else
3978 ac_save_IFS=$IFS; IFS=$ac_path_separator
3979 ac_dummy="$PATH"
3980 for ac_dir in $ac_dummy; do
3981 IFS=$ac_save_IFS
3982 test -z "$ac_dir" && ac_dir=.
3983 $as_executable_p "$ac_dir/$ac_word" || continue
3984 ac_cv_prog_ac_ct_AR="ar"
3985 echo "$as_me:3985: found $ac_dir/$ac_word" >&5
3986 break
3987 done
3988
3989 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3990 fi
3991 fi
3992 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3993 if test -n "$ac_ct_AR"; then
3994 echo "$as_me:3994: result: $ac_ct_AR" >&5
3995 echo "${ECHO_T}$ac_ct_AR" >&6
3996 else
3997 echo "$as_me:3997: result: no" >&5
3998 echo "${ECHO_T}no" >&6
3999 fi
4000
4001 AR=$ac_ct_AR
4002 else
4003 AR="$ac_cv_prog_AR"
4004 fi
4005
4006 echo "$as_me:4006: checking for options to update archives" >&5
4007 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4008 if test "${cf_cv_ar_flags+set}" = set; then
4009 echo $ECHO_N "(cached) $ECHO_C" >&6
4010 else
4011
4012 case "$cf_cv_system_name" in
4013 (*-msvc*)
4014 cf_cv_ar_flags=''
4015 cat >mk_static_lib.sh <<-EOF
4016 #!$SHELL
4017 MSVC_BIN="$AR"
4018 out="\$1"
4019 shift
4020 exec \$MSVC_BIN -out:"\$out" \$@
4021 EOF
4022 chmod +x mk_static_lib.sh
4023 AR=`pwd`/mk_static_lib.sh
4024 ;;
4025 (*)
4026 cf_cv_ar_flags=unknown
4027 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4028 do
4029
4030 # check if $ARFLAGS already contains this choice
4031 if test "x$ARFLAGS" != "x" ; then
4032 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4033 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4034 cf_cv_ar_flags=
4035 break
4036 fi
4037 fi
4038
4039 rm -f "conftest.$ac_cv_objext"
4040 rm -f conftest.a
4041
4042 cat >"conftest.$ac_ext" <<EOF
4043 #line 4043 "configure"
4044 int testdata[3] = { 123, 456, 789 };
4045 EOF
4046 if { (eval echo "$as_me:4046: \"$ac_compile\"") >&5
4047 (eval $ac_compile) 2>&5
4048 ac_status=$?
4049 echo "$as_me:4049: \$? = $ac_status" >&5
4050 (exit "$ac_status"); } ; then
4051 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4052 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4053 if test -f conftest.a ; then
4054 cf_cv_ar_flags="$cf_ar_flags"
4055 break
4056 fi
4057 else
4058 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4059
4060 echo "${as_me:-configure}:4060: testing cannot compile test-program ..." 1>&5
4061
4062 break
4063 fi
4064 done
4065 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4066 ;;
4067 esac
4068
4069 fi
4070 echo "$as_me:4070: result: $cf_cv_ar_flags" >&5
4071 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4072
4073 if test -n "$ARFLAGS" ; then
4074 if test -n "$cf_cv_ar_flags" ; then
4075 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4076 fi
4077 else
4078 ARFLAGS=$cf_cv_ar_flags
4079 fi
4080
4081 echo "$as_me:4081: checking if you want to see long compiling messages" >&5
4082 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4083
4084 # Check whether --enable-echo or --disable-echo was given.
4085 if test "${enable_echo+set}" = set; then
4086 enableval="$enable_echo"
4087 test "$enableval" != no && enableval=yes
4088 if test "$enableval" != "yes" ; then
4089
4090 ECHO_LT='--silent'
4091 ECHO_LD='@echo linking $@;'
4092 RULE_CC='@echo compiling $<'
4093 SHOW_CC='@echo compiling $@'
4094 ECHO_CC='@'
4095
4096 else
4097
4098 ECHO_LT=''
4099 ECHO_LD=''
4100 RULE_CC=''
•4101 SHOW_CC=''
4102 ECHO_CC=''
4103
4104 fi
4105 else
4106 enableval=yes
4107
4108 ECHO_LT=''
4109 ECHO_LD=''
4110 RULE_CC=''
4111 SHOW_CC=''
4112 ECHO_CC=''
4113
4114 fi;
4115 echo "$as_me:4115: result: $enableval" >&5
4116 echo "${ECHO_T}$enableval" >&6
4117
4118 # special case for WWW/*
4119 if test -n "$ECHO_CC" ; then
4120 DONT_ECHO_CC="$SHOW_CC ;"
4121 else
4122 DONT_ECHO_CC=''
4123 fi
4124
4125 echo "$as_me:4125: checking if you want to check memory-leaks" >&5
4126 echo $ECHO_N "checking if you want to check memory-leaks... $ECHO_C" >&6
4127
4128 # Check whether --enable-find-leaks or --disable-find-leaks was given.
4129 if test "${enable_find_leaks+set}" = set; then
4130 enableval="$enable_find_leaks"
4131 test "$enableval" != yes && enableval=no
4132 if test "$enableval" != "no" ; then
4133 with_leak_checks=yes
4134 else
4135 with_leak_checks=no
4136 fi
4137 else
4138 enableval=no
4139 with_leak_checks=no
4140
4141 fi;
4142 echo "$as_me:4142: result: $with_leak_checks" >&5
4143 echo "${ECHO_T}$with_leak_checks" >&6
4144 test "$with_leak_checks" = "yes" &&
4145 cat >>confdefs.h <<\EOF
4146 #define LY_FIND_LEAKS 1
4147 EOF
4148
4149 # The comment about adding -g to $CFLAGS is unclear. Autoconf tries to add
4150 # a -g flag; we remove it if the user's $CFLAGS was not set and debugging is
4151 # disabled.
4152 echo "$as_me:4152: checking if you want to enable debug-code" >&5
4153 echo $ECHO_N "checking if you want to enable debug-code... $ECHO_C" >&6
4154
4155 # Check whether --enable-debug or --disable-debug was given.
4156 if test "${enable_debug+set}" = set; then
4157 enableval="$enable_debug"
4158 test "$enableval" != yes && enableval=no
4159 if test "$enableval" != "no" ; then
4160 with_debug=yes
4161 else
4162 with_debug=no
4163 fi
4164 else
4165 enableval=no
4166 with_debug=no
4167
4168 fi;
4169 echo "$as_me:4169: result: $with_debug" >&5
4170 echo "${ECHO_T}$with_debug" >&6
4171 if test "$with_debug" = "yes" ; then
4172 case "$host_os" in
4173 (ultrix*|osf*)
4174 test -z "$ORIGINAL_CFLAGS" &&
4175 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-O1-9\? %%' -e 's%-O1-9\?$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
4176
4177 if test -z "$GCC" ; then
4178 CFLAGS="$CFLAGS -g3"
4179 fi
4180 ;;
4181 esac
4182 else
4183 case "$host_os" in
4184 (osf*)
4185 test -z "$GCC" && CFLAGS="$CFLAGS -std1"
4186 test -z "$ORIGINAL_CFLAGS" && CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
4187 ;;
4188 (*)
4189 :
4190 ;;
4191 esac
4192 fi
4193
4194 echo "$as_me:4194: checking if you want to enable lynx trace code *recommended* " >&5
4195 echo $ECHO_N "checking if you want to enable lynx trace code *recommended* ... $ECHO_C" >&6
4196
4197 # Check whether --enable-trace or --disable-trace was given.
4198 if test "${enable_trace+set}" = set; then
4199 enableval="$enable_trace"
4200 test "$enableval" != no && enableval=yes
4201 if test "$enableval" != "yes" ; then
4202 with_trace=$enableval
4203 else
4204 with_trace=yes
4205 fi
4206 else
4207 enableval=yes
4208 with_trace=yes
4209
4210 fi;
4211 echo "$as_me:4211: result: $with_trace" >&5
4212 echo "${ECHO_T}$with_trace" >&6
4213 test "$with_trace" = no &&
4214 cat >>confdefs.h <<\EOF
4215 #define NO_LYNX_TRACE 1
4216 EOF
4217
4218 echo "$as_me:4218: checking if you want verbose trace code" >&5
4219 echo $ECHO_N "checking if you want verbose trace code... $ECHO_C" >&6
4220
4221 # Check whether --enable-vertrace or --disable-vertrace was given.
4222 if test "${enable_vertrace+set}" = set; then
4223 enableval="$enable_vertrace"
4224 test "$enableval" != yes && enableval=no
4225 if test "$enableval" != "no" ; then
4226 with_vertrace=yes
4227 else
4228 with_vertrace=no
4229 fi
4230 else
4231 enableval=no
4232 with_vertrace=no
4233
4234 fi;
4235 echo "$as_me:4235: result: $with_vertrace" >&5
4236 echo "${ECHO_T}$with_vertrace" >&6
4237 test "$with_vertrace" = yes &&
4238 cat >>confdefs.h <<\EOF
4239 #define LY_TRACELINE __LINE__
4240 EOF
4241
4242 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
4243 then
4244 echo "$as_me:4244: checking for X" >&5
4245 echo $ECHO_N "checking for X... $ECHO_C" >&6
4246
4247 # Check whether --with-x or --without-x was given.
4248 if test "${with_x+set}" = set; then
4249 withval="$with_x"
4250
4251 fi;
4252 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4253 if test "x$with_x" = xno; then
4254 # The user explicitly disabled X.
4255 have_x=disabled
4256 else
4257 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4258 # Both variables are already set.
4259 have_x=yes
4260 else
4261 if test "${ac_cv_have_x+set}" = set; then
4262 echo $ECHO_N "(cached) $ECHO_C" >&6
4263 else
4264 # One or both of the vars are not set, and there is no cached value.
4265 ac_x_includes=no ac_x_libraries=no
4266 rm -fr conftest.dir
4267 if mkdir conftest.dir; then
4268 cd conftest.dir
4269 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4270 cat >Imakefile <<'EOF'
4271 acfindx:
4272 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4273 EOF
4274 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4275 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4276 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
4277 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4278 for ac_extension in a so sl dylib dll; do
4279 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
4280 test -f "$ac_im_libdir/libX11.$ac_extension"; then
4281 ac_im_usrlibdir=$ac_im_libdir; break
4282 fi
4283 done
4284 # Screen out bogus values from the imake configuration. They are
4285 # bogus both because they are the default anyway, and because
4286 # using them would break gcc on systems where it needs fixed includes.
4287 case $ac_im_incroot in
4288 /usr/include) ;;
4289 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4290 esac
4291 case $ac_im_usrlibdir in
4292 /usr/lib | /lib) ;;
4293 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4294 esac
4295 fi
4296 cd ..
4297 rm -fr conftest.dir
4298 fi
4299
4300 # Standard set of common directories for X headers.
4301 # Check X11 before X11Rn because it is often a symlink to the current release.
4302 ac_x_header_dirs='
4303 /usr/X11/include
4304 /usr/X11R7/include
4305 /usr/X11R6/include
4306 /usr/X11R5/include
4307 /usr/X11R4/include
4308
4309 /opt/local/include
4310 /opt/X11/include
4311
4312 /usr/include/X11
4313 /usr/include/X11R7
4314 /usr/include/X11R6
4315 /usr/include/X11R5
4316 /usr/include/X11R4
4317
4318 /usr/local/X11/include
4319 /usr/local/X11R7/include
4320 /usr/local/X11R6/include
4321 /usr/local/X11R5/include
4322 /usr/local/X11R4/include
4323
4324 /usr/local/include/X11
4325 /usr/local/include/X11R7
4326 /usr/local/include/X11R6
4327 /usr/local/include/X11R5
4328 /usr/local/include/X11R4
4329
4330 /usr/X386/include
4331 /usr/x386/include
4332 /usr/XFree86/include/X11
4333
4334 /usr/include
4335 /usr/local/include
4336 /usr/unsupported/include
4337 /usr/athena/include
4338 /usr/local/x11r5/include
4339 /usr/lpp/Xamples/include
4340
4341 /usr/openwin/include
4342 /usr/openwin/share/include'
4343
4344 if test "$ac_x_includes" = no; then
4345 # Guess where to find include files, by looking for Intrinsic.h.
4346 # First, try using that file with no special directory specified.
4347 cat >"conftest.$ac_ext" <<_ACEOF
4348 #line 4348 "configure"
4349 #include "confdefs.h"
4350 #include <X11/Intrinsic.h>
4351 _ACEOF
4352 if { (eval echo "$as_me:4352: \"$ac_cpp "conftest.$ac_ext"\"") >&5
4353 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
4354 ac_status=$?
4355 $EGREP -v '^ *\+' conftest.er1 >conftest.err
4356 rm -f conftest.er1
4357 cat conftest.err >&5
4358 echo "$as_me:4358: \$? = $ac_status" >&5
4359 (exit "$ac_status"); } >/dev/null; then
4360 if test -s conftest.err; then
4361 ac_cpp_err=$ac_c_preproc_warn_flag
4362 else
4363 ac_cpp_err=
4364 fi
4365 else
4366 ac_cpp_err=yes
4367 fi
4368 if test -z "$ac_cpp_err"; then
4369 # We can compile using X headers with no special include directory.
4370 ac_x_includes=
4371 else
4372 echo "$as_me: failed program was:" >&5
4373 cat "conftest.$ac_ext" >&5
4374 for ac_dir in $ac_x_header_dirs; do
4375 if test -r "$ac_dir/X11/Intrinsic.h"; then
4376 ac_x_includes=$ac_dir
4377 break
4378 fi
4379 done
4380 fi
4381 rm -f conftest.err "conftest.$ac_ext"
4382 fi # $ac_x_includes = no
4383
4384 if test "$ac_x_libraries" = no; then
4385 # Check for the libraries.
4386 # See if we find them without any special options.
4387 # Don't add to $LIBS permanently.
4388 ac_save_LIBS=$LIBS
4389 LIBS="-lXt $LIBS"
4390 cat >"conftest.$ac_ext" <<_ACEOF
4391 #line 4391 "configure"
4392 #include "confdefs.h"
4393 #include <X11/Intrinsic.h>
4394 int
4395 main (void)
4396 {
4397 XtMalloc (0)
4398 ;
4399 return 0;
4400 }
4401 _ACEOF
4402 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4403 if { (eval echo "$as_me:4403: \"$ac_link\"") >&5
4404 (eval $ac_link) 2>&5
4405 ac_status=$?
4406 echo "$as_me:4406: \$? = $ac_status" >&5
4407 (exit "$ac_status"); } &&
4408 { ac_try='test -s "conftest$ac_exeext"'
4409 { (eval echo "$as_me:4409: \"$ac_try\"") >&5
4410 (eval $ac_try) 2>&5
4411 ac_status=$?
4412 echo "$as_me:4412: \$? = $ac_status" >&5
4413 (exit "$ac_status"); }; }; then
4414 LIBS=$ac_save_LIBS
4415 # We can link X programs with no special library path.
4416 ac_x_libraries=
4417 else
4418 echo "$as_me: failed program was:" >&5
4419 cat "conftest.$ac_ext" >&5
4420 LIBS=$ac_save_LIBS
4421 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4422 do
4423 # Don't even attempt the hair of trying to link an X program!
4424 for ac_extension in a so sl dylib dll; do
4425 if test -r "$ac_dir/libXt.$ac_extension"; then
4426 ac_x_libraries=$ac_dir
4427 break 2
4428 fi
4429 done
4430 done
4431 fi
4432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4433 fi # $ac_x_libraries = no
4434
4435 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4436 # Didn't find X anywhere. Cache the known absence of X.
4437 ac_cv_have_x="have_x=no"
4438 else
4439 # Record where we found X for the cache.
4440 ac_cv_have_x="have_x=yes \
4441 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4442 fi
4443 fi
4444
4445 fi
4446 eval "$ac_cv_have_x"
4447 fi # $with_x != no
4448
4449 if test "$have_x" != yes; then
4450 echo "$as_me:4450: result: $have_x" >&5
4451 echo "${ECHO_T}$have_x" >&6
4452 no_x=yes
4453 else
4454 # If each of the values was on the command line, it overrides each guess.
4455 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4456 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4457 # Update the cache value to reflect the command line values.
4458 ac_cv_have_x="have_x=yes \
4459 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4460 echo "$as_me:4460: result: libraries $x_libraries, headers $x_includes" >&5
4461 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4462 fi
4463
4464 if test "$no_x" = yes; then
4465 # Not all programs may use this symbol, but it does not hurt to define it.
4466
4467 cat >>confdefs.h <<\EOF
4468 #define X_DISPLAY_MISSING 1
4469 EOF
4470
4471 X_CFLAGS=
4472 X_PRE_LIBS=
4473 X_LIBS=
4474 X_EXTRA_LIBS=
4475 else
4476 if test -n "$x_includes"; then
4477 X_CFLAGS="$X_CFLAGS -I$x_includes"
4478 fi
4479
4480 # It would also be nice to do this for all -L options, not just this one.
4481 if test -n "$x_libraries"; then
4482 X_LIBS="$X_LIBS -L$x_libraries"
4483 # For Solaris; some versions of Sun CC require a space after -R and
4484 # others require no space. Words are not sufficient . . . .
4485 case `(uname -sr) 2>/dev/null` in
4486 "SunOS 5"*)
4487 echo "$as_me:4487: checking whether -R must be followed by a space" >&5
4488 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4489 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4490 cat >"conftest.$ac_ext" <<_ACEOF
4491 #line 4491 "configure"
4492 #include "confdefs.h"
4493
4494 int
4495 main (void)
4496 {
4497
4498 ;
4499 return 0;
4500 }
4501 _ACEOF
4502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4503 if { (eval echo "$as_me:4503: \"$ac_link\"") >&5
4504 (eval $ac_link) 2>&5
4505 ac_status=$?
4506 echo "$as_me:4506: \$? = $ac_status" >&5
4507 (exit "$ac_status"); } &&
4508 { ac_try='test -s "conftest$ac_exeext"'
4509 { (eval echo "$as_me:4509: \"$ac_try\"") >&5
4510 (eval $ac_try) 2>&5
4511 ac_status=$?
4512 echo "$as_me:4512: \$? = $ac_status" >&5
4513 (exit "$ac_status"); }; }; then
4514 ac_R_nospace=yes
4515 else
4516 echo "$as_me: failed program was:" >&5
4517 cat "conftest.$ac_ext" >&5
4518 ac_R_nospace=no
4519 fi
4520 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4521 if test $ac_R_nospace = yes; then
4522 echo "$as_me:4522: result: no" >&5
4523 echo "${ECHO_T}no" >&6
4524 X_LIBS="$X_LIBS -R$x_libraries"
4525 else
4526 LIBS="$ac_xsave_LIBS -R $x_libraries"
4527 cat >"conftest.$ac_ext" <<_ACEOF
4528 #line 4528 "configure"
4529 #include "confdefs.h"
4530
4531 int
4532 main (void)
4533 {
4534
4535 ;
4536 return 0;
4537 }
4538 _ACEOF
4539 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4540 if { (eval echo "$as_me:4540: \"$ac_link\"") >&5
4541 (eval $ac_link) 2>&5
4542 ac_status=$?
4543 echo "$as_me:4543: \$? = $ac_status" >&5
4544 (exit "$ac_status"); } &&
4545 { ac_try='test -s "conftest$ac_exeext"'
4546 { (eval echo "$as_me:4546: \"$ac_try\"") >&5
4547 (eval $ac_try) 2>&5
4548 ac_status=$?
4549 echo "$as_me:4549: \$? = $ac_status" >&5
4550 (exit "$ac_status"); }; }; then
4551 ac_R_space=yes
4552 else
4553 echo "$as_me: failed program was:" >&5
4554 cat "conftest.$ac_ext" >&5
4555 ac_R_space=no
4556 fi
4557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4558 if test $ac_R_space = yes; then
4559 echo "$as_me:4559: result: yes" >&5
4560 echo "${ECHO_T}yes" >&6
4561 X_LIBS="$X_LIBS -R $x_libraries"
4562 else
4563 echo "$as_me:4563: result: neither works" >&5
4564 echo "${ECHO_T}neither works" >&6
4565 fi
4566 fi
4567 LIBS=$ac_xsave_LIBS
4568 esac
4569 fi
4570
4571 # Check for system-dependent libraries X programs must link with.
4572 # Do this before checking for the system-independent R6 libraries
4573 # (-lICE), since we may need -lsocket or whatever for X linking.
4574
4575 if test "$ISC" = yes; then
4576 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4577 else
4578 # Martyn Johnson says this is needed for Ultrix, if the X
4579 # libraries were built with DECnet support. And Karl Berry says
4580 # the Alpha needs dnet_stub (dnet does not exist).
4581 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
4582 cat >"conftest.$ac_ext" <<_ACEOF
4583 #line 4583 "configure"
4584 #include "confdefs.h"
4585
4586 /* Override any gcc2 internal prototype to avoid an error. */
4587 #ifdef __cplusplus
4588 extern "C"
4589 #endif
4590 /* We use char because int might match the return type of a gcc2
4591 builtin and then its argument prototype would still apply. */
4592 char XOpenDisplay (void);
4593 int
4594 main (void)
4595 {
4596 XOpenDisplay ();
4597 ;
4598 return 0;
4599 }
4600 _ACEOF
4601 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4602 if { (eval echo "$as_me:4602: \"$ac_link\"") >&5
4603 (eval $ac_link) 2>&5
4604 ac_status=$?
4605 echo "$as_me:4605: \$? = $ac_status" >&5
4606 (exit "$ac_status"); } &&
4607 { ac_try='test -s "conftest$ac_exeext"'
4608 { (eval echo "$as_me:4608: \"$ac_try\"") >&5
4609 (eval $ac_try) 2>&5
4610 ac_status=$?
4611 echo "$as_me:4611: \$? = $ac_status" >&5
4612 (exit "$ac_status"); }; }; then
4613 :
4614 else
4615 echo "$as_me: failed program was:" >&5
4616 cat "conftest.$ac_ext" >&5
4617 echo "$as_me:4617: checking for dnet_ntoa in -ldnet" >&5
4618 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
4619 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
4620 echo $ECHO_N "(cached) $ECHO_C" >&6
4621 else
4622 ac_check_lib_save_LIBS=$LIBS
4623 LIBS="-ldnet $LIBS"
4624 cat >"conftest.$ac_ext" <<_ACEOF
4625 #line 4625 "configure"
4626 #include "confdefs.h"
4627
4628 /* Override any gcc2 internal prototype to avoid an error. */
4629 #ifdef __cplusplus
4630 extern "C"
4631 #endif
4632 /* We use char because int might match the return type of a gcc2
4633 builtin and then its argument prototype would still apply. */
4634 char dnet_ntoa (void);
4635 int
4636 main (void)
4637 {
4638 dnet_ntoa ();
4639 ;
4640 return 0;
4641 }
4642 _ACEOF
4643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4644 if { (eval echo "$as_me:4644: \"$ac_link\"") >&5
4645 (eval $ac_link) 2>&5
4646 ac_status=$?
4647 echo "$as_me:4647: \$? = $ac_status" >&5
4648 (exit "$ac_status"); } &&
4649 { ac_try='test -s "conftest$ac_exeext"'
4650 { (eval echo "$as_me:4650: \"$ac_try\"") >&5
4651 (eval $ac_try) 2>&5
4652 ac_status=$?
4653 echo "$as_me:4653: \$? = $ac_status" >&5
4654 (exit "$ac_status"); }; }; then
4655 ac_cv_lib_dnet_dnet_ntoa=yes
4656 else
4657 echo "$as_me: failed program was:" >&5
4658 cat "conftest.$ac_ext" >&5
4659 ac_cv_lib_dnet_dnet_ntoa=no
4660 fi
4661 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4662 LIBS=$ac_check_lib_save_LIBS
4663 fi
4664 echo "$as_me:4664: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
4665 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
4666 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
4667 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4668 fi
4669
4670 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4671 echo "$as_me:4671: checking for dnet_ntoa in -ldnet_stub" >&5
4672 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
4673 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
4674 echo $ECHO_N "(cached) $ECHO_C" >&6
4675 else
4676 ac_check_lib_save_LIBS=$LIBS
4677 LIBS="-ldnet_stub $LIBS"
4678 cat >"conftest.$ac_ext" <<_ACEOF
4679 #line 4679 "configure"
4680 #include "confdefs.h"
4681
4682 /* Override any gcc2 internal prototype to avoid an error. */
4683 #ifdef __cplusplus
4684 extern "C"
4685 #endif
4686 /* We use char because int might match the return type of a gcc2
4687 builtin and then its argument prototype would still apply. */
4688 char dnet_ntoa (void);
4689 int
4690 main (void)
4691 {
4692 dnet_ntoa ();
4693 ;
4694 return 0;
4695 }
4696 _ACEOF
4697 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4698 if { (eval echo "$as_me:4698: \"$ac_link\"") >&5
4699 (eval $ac_link) 2>&5
4700 ac_status=$?
4701 echo "$as_me:4701: \$? = $ac_status" >&5
4702 (exit "$ac_status"); } &&
4703 { ac_try='test -s "conftest$ac_exeext"'
4704 { (eval echo "$as_me:4704: \"$ac_try\"") >&5
4705 (eval $ac_try) 2>&5
4706 ac_status=$?
4707 echo "$as_me:4707: \$? = $ac_status" >&5
4708 (exit "$ac_status"); }; }; then
4709 ac_cv_lib_dnet_stub_dnet_ntoa=yes
4710 else
4711 echo "$as_me: failed program was:" >&5
4712 cat "conftest.$ac_ext" >&5
4713 ac_cv_lib_dnet_stub_dnet_ntoa=no
4714 fi
4715 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4716 LIBS=$ac_check_lib_save_LIBS
4717 fi
4718 echo "$as_me:4718: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
4719 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
4720 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
4721 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4722 fi
4723
4724 fi
4725 fi
4726 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4727 LIBS="$ac_xsave_LIBS"
4728
4729 # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
4730 # to get the SysV transport functions.
4731 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
4732 # needs -lnsl.
4733 # The nsl library prevents programs from opening the X display
4734 # on Irix 5.2, according to T.E. Dickey.
4735 # The functions gethostbyname, getservbyname, and inet_addr are
4736 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
4737 echo "$as_me:4737: checking for gethostbyname" >&5
4738 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
4739 if test "${ac_cv_func_gethostbyname+set}" = set; then
4740 echo $ECHO_N "(cached) $ECHO_C" >&6
4741 else
4742 cat >"conftest.$ac_ext" <<_ACEOF
4743 #line 4743 "configure"
4744 #include "confdefs.h"
4745 #define gethostbyname autoconf_temporary
4746 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
4747 #undef gethostbyname
4748
4749 #ifdef __cplusplus
4750 extern "C"
4751 #endif
4752
4753 /* We use char because int might match the return type of a gcc2
4754 builtin and then its argument prototype would still apply. */
4755 char gethostbyname (void);
4756
4757 int
4758 main (void)
4759 {
4760
4761 /* The GNU C library defines stubs for functions which it implements
4762 to always fail with ENOSYS. Some functions are actually named
4763 something starting with __ and the normal name is an alias. */
4764 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4765 #error found stub for gethostbyname
4766 #endif
4767
4768 return gethostbyname ();
4769 ;
4770 return 0;
4771 }
4772 _ACEOF
4773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4774 if { (eval echo "$as_me:4774: \"$ac_link\"") >&5
4775 (eval $ac_link) 2>&5
4776 ac_status=$?
4777 echo "$as_me:4777: \$? = $ac_status" >&5
4778 (exit "$ac_status"); } &&
4779 { ac_try='test -s "conftest$ac_exeext"'
4780 { (eval echo "$as_me:4780: \"$ac_try\"") >&5
4781 (eval $ac_try) 2>&5
4782 ac_status=$?
4783 echo "$as_me:4783: \$? = $ac_status" >&5
4784 (exit "$ac_status"); }; }; then
4785 ac_cv_func_gethostbyname=yes
4786 else
4787 echo "$as_me: failed program was:" >&5
4788 cat "conftest.$ac_ext" >&5
4789 ac_cv_func_gethostbyname=no
4790 fi
4791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4792 fi
4793 echo "$as_me:4793: result: $ac_cv_func_gethostbyname" >&5
4794 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
4795
4796 if test $ac_cv_func_gethostbyname = no; then
4797 echo "$as_me:4797: checking for gethostbyname in -lnsl" >&5
4798 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
4799 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
4800 echo $ECHO_N "(cached) $ECHO_C" >&6
4801 else
4802 ac_check_lib_save_LIBS=$LIBS
4803 LIBS="-lnsl $LIBS"
4804 cat >"conftest.$ac_ext" <<_ACEOF
4805 #line 4805 "configure"
4806 #include "confdefs.h"
4807
4808 /* Override any gcc2 internal prototype to avoid an error. */
4809 #ifdef __cplusplus
4810 extern "C"
4811 #endif
4812 /* We use char because int might match the return type of a gcc2
4813 builtin and then its argument prototype would still apply. */
4814 char gethostbyname (void);
4815 int
4816 main (void)
4817 {
4818 gethostbyname ();
4819 ;
4820 return 0;
4821 }
4822 _ACEOF
4823 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4824 if { (eval echo "$as_me:4824: \"$ac_link\"") >&5
4825 (eval $ac_link) 2>&5
4826 ac_status=$?
4827 echo "$as_me:4827: \$? = $ac_status" >&5
4828 (exit "$ac_status"); } &&
4829 { ac_try='test -s "conftest$ac_exeext"'
4830 { (eval echo "$as_me:4830: \"$ac_try\"") >&5
4831 (eval $ac_try) 2>&5
4832 ac_status=$?
4833 echo "$as_me:4833: \$? = $ac_status" >&5
4834 (exit "$ac_status"); }; }; then
4835 ac_cv_lib_nsl_gethostbyname=yes
4836 else
4837 echo "$as_me: failed program was:" >&5
4838 cat "conftest.$ac_ext" >&5
4839 ac_cv_lib_nsl_gethostbyname=no
4840 fi
4841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4842 LIBS=$ac_check_lib_save_LIBS
4843 fi
4844 echo "$as_me:4844: result: $ac_cv_lib_nsl_gethostbyname" >&5
4845 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
4846 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
4847 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4848 fi
4849
4850 if test $ac_cv_lib_nsl_gethostbyname = no; then
4851 echo "$as_me:4851: checking for gethostbyname in -lbsd" >&5
4852 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
4853 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
4854 echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856 ac_check_lib_save_LIBS=$LIBS
4857 LIBS="-lbsd $LIBS"
4858 cat >"conftest.$ac_ext" <<_ACEOF
4859 #line 4859 "configure"
4860 #include "confdefs.h"
4861
4862 /* Override any gcc2 internal prototype to avoid an error. */
4863 #ifdef __cplusplus
4864 extern "C"
4865 #endif
4866 /* We use char because int might match the return type of a gcc2
4867 builtin and then its argument prototype would still apply. */
4868 char gethostbyname (void);
4869 int
4870 main (void)
4871 {
4872 gethostbyname ();
4873 ;
4874 return 0;
4875 }
4876 _ACEOF
4877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4878 if { (eval echo "$as_me:4878: \"$ac_link\"") >&5
4879 (eval $ac_link) 2>&5
4880 ac_status=$?
4881 echo "$as_me:4881: \$? = $ac_status" >&5
4882 (exit "$ac_status"); } &&
4883 { ac_try='test -s "conftest$ac_exeext"'
4884 { (eval echo "$as_me:4884: \"$ac_try\"") >&5
4885 (eval $ac_try) 2>&5
4886 ac_status=$?
4887 echo "$as_me:4887: \$? = $ac_status" >&5
4888 (exit "$ac_status"); }; }; then
4889 ac_cv_lib_bsd_gethostbyname=yes
4890 else
4891 echo "$as_me: failed program was:" >&5
4892 cat "conftest.$ac_ext" >&5
4893 ac_cv_lib_bsd_gethostbyname=no
4894 fi
4895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4896 LIBS=$ac_check_lib_save_LIBS
4897 fi
4898 echo "$as_me:4898: result: $ac_cv_lib_bsd_gethostbyname" >&5
4899 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
4900 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
4901 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
4902 fi
4903
4904 fi
4905 fi
4906
4907 # [email protected] says without -lsocket,
4908 # socket/setsockopt and other routines are undefined under SCO ODT
4909 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
4910 # on later versions), says Simon Leinen: it contains gethostby*
4911 # variants that don't use the nameserver (or something). -lsocket
4912 # must be given before -lnsl if both are needed. We assume that
4913 # if connect needs -lnsl, so does gethostbyname.
4914 echo "$as_me:4914: checking for connect" >&5
4915 echo $ECHO_N "checking for connect... $ECHO_C" >&6
4916 if test "${ac_cv_func_connect+set}" = set; then
4917 echo $ECHO_N "(cached) $ECHO_C" >&6
4918 else
4919 cat >"conftest.$ac_ext" <<_ACEOF
4920 #line 4920 "configure"
4921 #include "confdefs.h"
4922 #define connect autoconf_temporary
4923 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
4924 #undef connect
4925
4926 #ifdef __cplusplus
4927 extern "C"
4928 #endif
4929
4930 /* We use char because int might match the return type of a gcc2
4931 builtin and then its argument prototype would still apply. */
4932 char connect (void);
4933
4934 int
4935 main (void)
4936 {
4937
4938 /* The GNU C library defines stubs for functions which it implements
4939 to always fail with ENOSYS. Some functions are actually named
4940 something starting with __ and the normal name is an alias. */
4941 #if defined (__stub_connect) || defined (__stub___connect)
4942 #error found stub for connect
4943 #endif
4944
4945 return connect ();
4946 ;
4947 return 0;
4948 }
4949 _ACEOF
4950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4951 if { (eval echo "$as_me:4951: \"$ac_link\"") >&5
4952 (eval $ac_link) 2>&5
4953 ac_status=$?
4954 echo "$as_me:4954: \$? = $ac_status" >&5
4955 (exit "$ac_status"); } &&
4956 { ac_try='test -s "conftest$ac_exeext"'
4957 { (eval echo "$as_me:4957: \"$ac_try\"") >&5
4958 (eval $ac_try) 2>&5
4959 ac_status=$?
4960 echo "$as_me:4960: \$? = $ac_status" >&5
4961 (exit "$ac_status"); }; }; then
4962 ac_cv_func_connect=yes
4963 else
4964 echo "$as_me: failed program was:" >&5
4965 cat "conftest.$ac_ext" >&5
4966 ac_cv_func_connect=no
4967 fi
4968 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4969 fi
4970 echo "$as_me:4970: result: $ac_cv_func_connect" >&5
4971 echo "${ECHO_T}$ac_cv_func_connect" >&6
4972
4973 if test $ac_cv_func_connect = no; then
4974 echo "$as_me:4974: checking for connect in -lsocket" >&5
4975 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
4976 if test "${ac_cv_lib_socket_connect+set}" = set; then
4977 echo $ECHO_N "(cached) $ECHO_C" >&6
4978 else
4979 ac_check_lib_save_LIBS=$LIBS
4980 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4981 cat >"conftest.$ac_ext" <<_ACEOF
4982 #line 4982 "configure"
4983 #include "confdefs.h"
4984
4985 /* Override any gcc2 internal prototype to avoid an error. */
4986 #ifdef __cplusplus
4987 extern "C"
4988 #endif
4989 /* We use char because int might match the return type of a gcc2
4990 builtin and then its argument prototype would still apply. */
4991 char connect (void);
4992 int
4993 main (void)
4994 {
4995 connect ();
4996 ;
4997 return 0;
4998 }
4999 _ACEOF
5000 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5001 if { (eval echo "$as_me:5001: \"$ac_link\"") >&5
5002 (eval $ac_link) 2>&5
5003 ac_status=$?
5004 echo "$as_me:5004: \$? = $ac_status" >&5
5005 (exit "$ac_status"); } &&
5006 { ac_try='test -s "conftest$ac_exeext"'
5007 { (eval echo "$as_me:5007: \"$ac_try\"") >&5
5008 (eval $ac_try) 2>&5
5009 ac_status=$?
5010 echo "$as_me:5010: \$? = $ac_status" >&5
5011 (exit "$ac_status"); }; }; then
5012 ac_cv_lib_socket_connect=yes
5013 else
5014 echo "$as_me: failed program was:" >&5
5015 cat "conftest.$ac_ext" >&5
5016 ac_cv_lib_socket_connect=no
5017 fi
5018 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5019 LIBS=$ac_check_lib_save_LIBS
5020 fi
5021 echo "$as_me:5021: result: $ac_cv_lib_socket_connect" >&5
5022 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5023 if test "$ac_cv_lib_socket_connect" = yes; then
5024 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5025 fi
5026
5027 fi
5028
5029 # Guillermo Gomez says -lposix is necessary on A/UX.
5030 echo "$as_me:5030: checking for remove" >&5
5031 echo $ECHO_N "checking for remove... $ECHO_C" >&6
5032 if test "${ac_cv_func_remove+set}" = set; then
5033 echo $ECHO_N "(cached) $ECHO_C" >&6
5034 else
5035 cat >"conftest.$ac_ext" <<_ACEOF
5036 #line 5036 "configure"
5037 #include "confdefs.h"
5038 #define remove autoconf_temporary
5039 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5040 #undef remove
5041
5042 #ifdef __cplusplus
5043 extern "C"
5044 #endif
5045
5046 /* We use char because int might match the return type of a gcc2
5047 builtin and then its argument prototype would still apply. */
5048 char remove (void);
5049
5050 int
5051 main (void)
5052 {
5053
5054 /* The GNU C library defines stubs for functions which it implements
5055 to always fail with ENOSYS. Some functions are actually named
5056 something starting with __ and the normal name is an alias. */
5057 #if defined (__stub_remove) || defined (__stub___remove)
5058 #error found stub for remove
5059 #endif
5060
5061 return remove ();
5062 ;
5063 return 0;
5064 }
5065 _ACEOF
5066 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5067 if { (eval echo "$as_me:5067: \"$ac_link\"") >&5
5068 (eval $ac_link) 2>&5
5069 ac_status=$?
5070 echo "$as_me:5070: \$? = $ac_status" >&5
5071 (exit "$ac_status"); } &&
5072 { ac_try='test -s "conftest$ac_exeext"'
5073 { (eval echo "$as_me:5073: \"$ac_try\"") >&5
5074 (eval $ac_try) 2>&5
5075 ac_status=$?
5076 echo "$as_me:5076: \$? = $ac_status" >&5
5077 (exit "$ac_status"); }; }; then
5078 ac_cv_func_remove=yes
5079 else
5080 echo "$as_me: failed program was:" >&5
5081 cat "conftest.$ac_ext" >&5
5082 ac_cv_func_remove=no
5083 fi
5084 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5085 fi
5086 echo "$as_me:5086: result: $ac_cv_func_remove" >&5
5087 echo "${ECHO_T}$ac_cv_func_remove" >&6
5088
5089 if test $ac_cv_func_remove = no; then
5090 echo "$as_me:5090: checking for remove in -lposix" >&5
5091 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5092 if test "${ac_cv_lib_posix_remove+set}" = set; then
5093 echo $ECHO_N "(cached) $ECHO_C" >&6
5094 else
5095 ac_check_lib_save_LIBS=$LIBS
5096 LIBS="-lposix $LIBS"
5097 cat >"conftest.$ac_ext" <<_ACEOF
5098 #line 5098 "configure"
5099 #include "confdefs.h"
5100
5101 /* Override any gcc2 internal prototype to avoid an error. */
5102 #ifdef __cplusplus
5103 extern "C"
5104 #endif
5105 /* We use char because int might match the return type of a gcc2
5106 builtin and then its argument prototype would still apply. */
5107 char remove (void);
5108 int
5109 main (void)
5110 {
5111 remove ();
5112 ;
5113 return 0;
5114 }
5115 _ACEOF
5116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5117 if { (eval echo "$as_me:5117: \"$ac_link\"") >&5
5118 (eval $ac_link) 2>&5
5119 ac_status=$?
5120 echo "$as_me:5120: \$? = $ac_status" >&5
5121 (exit "$ac_status"); } &&
5122 { ac_try='test -s "conftest$ac_exeext"'
5123 { (eval echo "$as_me:5123: \"$ac_try\"") >&5
5124 (eval $ac_try) 2>&5
5125 ac_status=$?
5126 echo "$as_me:5126: \$? = $ac_status" >&5
5127 (exit "$ac_status"); }; }; then
5128 ac_cv_lib_posix_remove=yes
5129 else
5130 echo "$as_me: failed program was:" >&5
5131 cat "conftest.$ac_ext" >&5
5132 ac_cv_lib_posix_remove=no
5133 fi
5134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5135 LIBS=$ac_check_lib_save_LIBS
5136 fi
5137 echo "$as_me:5137: result: $ac_cv_lib_posix_remove" >&5
5138 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5139 if test "$ac_cv_lib_posix_remove" = yes; then
5140 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5141 fi
5142
5143 fi
5144
5145 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5146 echo "$as_me:5146: checking for shmat" >&5
5147 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5148 if test "${ac_cv_func_shmat+set}" = set; then
5149 echo $ECHO_N "(cached) $ECHO_C" >&6
5150 else
5151 cat >"conftest.$ac_ext" <<_ACEOF
5152 #line 5152 "configure"
5153 #include "confdefs.h"
5154 #define shmat autoconf_temporary
5155 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5156 #undef shmat
5157
5158 #ifdef __cplusplus
5159 extern "C"
5160 #endif
5161
5162 /* We use char because int might match the return type of a gcc2
5163 builtin and then its argument prototype would still apply. */
5164 char shmat (void);
5165
5166 int
5167 main (void)
5168 {
5169
5170 /* The GNU C library defines stubs for functions which it implements
5171 to always fail with ENOSYS. Some functions are actually named
5172 something starting with __ and the normal name is an alias. */
5173 #if defined (__stub_shmat) || defined (__stub___shmat)
5174 #error found stub for shmat
5175 #endif
5176
5177 return shmat ();
5178 ;
5179 return 0;
5180 }
5181 _ACEOF
5182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5183 if { (eval echo "$as_me:5183: \"$ac_link\"") >&5
5184 (eval $ac_link) 2>&5
5185 ac_status=$?
5186 echo "$as_me:5186: \$? = $ac_status" >&5
5187 (exit "$ac_status"); } &&
5188 { ac_try='test -s "conftest$ac_exeext"'
5189 { (eval echo "$as_me:5189: \"$ac_try\"") >&5
5190 (eval $ac_try) 2>&5
5191 ac_status=$?
5192 echo "$as_me:5192: \$? = $ac_status" >&5
5193 (exit "$ac_status"); }; }; then
5194 ac_cv_func_shmat=yes
5195 else
5196 echo "$as_me: failed program was:" >&5
5197 cat "conftest.$ac_ext" >&5
5198 ac_cv_func_shmat=no
5199 fi
5200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5201 fi
5202 echo "$as_me:5202: result: $ac_cv_func_shmat" >&5
5203 echo "${ECHO_T}$ac_cv_func_shmat" >&6
5204
5205 if test $ac_cv_func_shmat = no; then
5206 echo "$as_me:5206: checking for shmat in -lipc" >&5
5207 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5208 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5209 echo $ECHO_N "(cached) $ECHO_C" >&6
5210 else
5211 ac_check_lib_save_LIBS=$LIBS
5212 LIBS="-lipc $LIBS"
5213 cat >"conftest.$ac_ext" <<_ACEOF
5214 #line 5214 "configure"
5215 #include "confdefs.h"
5216
5217 /* Override any gcc2 internal prototype to avoid an error. */
5218 #ifdef __cplusplus
5219 extern "C"
5220 #endif
5221 /* We use char because int might match the return type of a gcc2
5222 builtin and then its argument prototype would still apply. */
5223 char shmat (void);
5224 int
5225 main (void)
5226 {
5227 shmat ();
5228 ;
5229 return 0;
5230 }
5231 _ACEOF
5232 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5233 if { (eval echo "$as_me:5233: \"$ac_link\"") >&5
5234 (eval $ac_link) 2>&5
5235 ac_status=$?
5236 echo "$as_me:5236: \$? = $ac_status" >&5
5237 (exit "$ac_status"); } &&
5238 { ac_try='test -s "conftest$ac_exeext"'
5239 { (eval echo "$as_me:5239: \"$ac_try\"") >&5
5240 (eval $ac_try) 2>&5
5241 ac_status=$?
5242 echo "$as_me:5242: \$? = $ac_status" >&5
5243 (exit "$ac_status"); }; }; then
5244 ac_cv_lib_ipc_shmat=yes
5245 else
5246 echo "$as_me: failed program was:" >&5
5247 cat "conftest.$ac_ext" >&5
5248 ac_cv_lib_ipc_shmat=no
5249 fi
5250 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5251 LIBS=$ac_check_lib_save_LIBS
5252 fi
5253 echo "$as_me:5253: result: $ac_cv_lib_ipc_shmat" >&5
5254 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5255 if test "$ac_cv_lib_ipc_shmat" = yes; then
5256 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5257 fi
5258
5259 fi
5260 fi
5261
5262 # Check for libraries that X11R6 Xt/Xaw programs need.
5263 ac_save_LDFLAGS=$LDFLAGS
5264 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5265 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5266 # check for ICE first), but we must link in the order -lSM -lICE or
5267 # we get undefined symbols. So assume we have SM if we have ICE.
5268 # These have to be linked with before -lX11, unlike the other
5269 # libraries we check for below, so use a different variable.
5270 # John Interrante, Karl Berry
5271 echo "$as_me:5271: checking for IceConnectionNumber in -lICE" >&5
5272 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5273 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5274 echo $ECHO_N "(cached) $ECHO_C" >&6
5275 else
5276 ac_check_lib_save_LIBS=$LIBS
5277 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5278 cat >"conftest.$ac_ext" <<_ACEOF
5279 #line 5279 "configure"
5280 #include "confdefs.h"
5281
5282 /* Override any gcc2 internal prototype to avoid an error. */
5283 #ifdef __cplusplus
5284 extern "C"
5285 #endif
5286 /* We use char because int might match the return type of a gcc2
5287 builtin and then its argument prototype would still apply. */
5288 char IceConnectionNumber (void);
5289 int
5290 main (void)
5291 {
5292 IceConnectionNumber ();
5293 ;
5294 return 0;
5295 }
5296 _ACEOF
5297 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5298 if { (eval echo "$as_me:5298: \"$ac_link\"") >&5
5299 (eval $ac_link) 2>&5
5300 ac_status=$?
5301 echo "$as_me:5301: \$? = $ac_status" >&5
5302 (exit "$ac_status"); } &&
5303 { ac_try='test -s "conftest$ac_exeext"'
5304 { (eval echo "$as_me:5304: \"$ac_try\"") >&5
5305 (eval $ac_try) 2>&5
5306 ac_status=$?
5307 echo "$as_me:5307: \$? = $ac_status" >&5
5308 (exit "$ac_status"); }; }; then
5309 ac_cv_lib_ICE_IceConnectionNumber=yes
5310 else
5311 echo "$as_me: failed program was:" >&5
5312 cat "conftest.$ac_ext" >&5
5313 ac_cv_lib_ICE_IceConnectionNumber=no
5314 fi
5315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5316 LIBS=$ac_check_lib_save_LIBS
5317 fi
5318 echo "$as_me:5318: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5319 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5320 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
5321 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5322 fi
5323
5324 LDFLAGS=$ac_save_LDFLAGS
5325
5326 fi
5327
5328 fi
5329
5330 echo "$as_me:5330: checking for fgrep" >&5
5331 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
5332 if test "${ac_cv_path_FGREP+set}" = set; then
5333 echo $ECHO_N "(cached) $ECHO_C" >&6
5334 else
5335 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5336 then ac_cv_path_FGREP="$GREP -F"
5337 else
5338 for ac_prog in gfgrep fgrep
5339 do
5340 # Extract the first word of "$ac_prog", so it can be a program name with args.
5341 set dummy $ac_prog; ac_word=$2
5342 echo "$as_me:5342: checking for $ac_word" >&5
5343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5344 if test "${ac_cv_path_FGREP+set}" = set; then
5345 echo $ECHO_N "(cached) $ECHO_C" >&6
5346 else
5347 case $FGREP in
5348 [\\/]* | ?:[\\/]*)
5349 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
5350 ;;
5351 *)
5352 ac_save_IFS=$IFS; IFS=$ac_path_separator
5353 ac_dummy="$PATH"
5354 for ac_dir in $ac_dummy; do
5355 IFS=$ac_save_IFS
5356 test -z "$ac_dir" && ac_dir=.
5357 if $as_executable_p "$ac_dir/$ac_word"; then
5358 ac_cv_path_FGREP="$ac_dir/$ac_word"
5359 echo "$as_me:5359: found $ac_dir/$ac_word" >&5
5360 break
5361 fi
5362 done
5363
5364 ;;
5365 esac
5366 fi
5367 FGREP=$ac_cv_path_FGREP
5368
5369 if test -n "$FGREP"; then
5370 echo "$as_me:5370: result: $FGREP" >&5
5371 echo "${ECHO_T}$FGREP" >&6
5372 else
5373 echo "$as_me:5373: result: no" >&5
5374 echo "${ECHO_T}no" >&6
5375 fi
5376
5377 test -n "$FGREP" && break
5378 done
5379 test -n "$FGREP" || FGREP=": "
5380
5381 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:5381: error: cannot find workable fgrep" >&5
5382 echo "$as_me: error: cannot find workable fgrep" >&2;}
5383 { (exit 1); exit 1; }; }
5384 fi
5385 fi
5386 echo "$as_me:5386: result: $ac_cv_path_FGREP" >&5
5387 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
5388 FGREP="$ac_cv_path_FGREP"
5389
5390 echo "$as_me:5390: checking if you want to use C11 _Noreturn feature" >&5
5391 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
5392
5393 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
5394 if test "${enable_stdnoreturn+set}" = set; then
5395 enableval="$enable_stdnoreturn"
5396 test "$enableval" != yes && enableval=no
5397 if test "$enableval" != "no" ; then
5398 enable_stdnoreturn=yes
5399 else
5400 enable_stdnoreturn=no
5401 fi
5402 else
5403 enableval=no
5404 enable_stdnoreturn=no
5405
5406 fi;
5407 echo "$as_me:5407: result: $enable_stdnoreturn" >&5
5408 echo "${ECHO_T}$enable_stdnoreturn" >&6
5409
5410 if test $enable_stdnoreturn = yes; then
5411 echo "$as_me:5411: checking for C11 _Noreturn feature" >&5
5412 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
5413 if test "${cf_cv_c11_noreturn+set}" = set; then
5414 echo $ECHO_N "(cached) $ECHO_C" >&6
5415 else
5416 cat >"conftest.$ac_ext" <<_ACEOF
5417 #line 5417 "configure"
5418 #include "confdefs.h"
5419
5420 $ac_includes_default
5421 #include <stdnoreturn.h>
5422 static _Noreturn void giveup(void) { exit(0); }
5423
5424 int
5425 main (void)
5426 {
5427 if (feof(stdin)) giveup()
5428 ;
5429 return 0;
5430 }
5431 _ACEOF
5432 rm -f "conftest.$ac_objext"
5433 if { (eval echo "$as_me:5433: \"$ac_compile\"") >&5
5434 (eval $ac_compile) 2>&5
5435 ac_status=$?
5436 echo "$as_me:5436: \$? = $ac_status" >&5
5437 (exit "$ac_status"); } &&
5438 { ac_try='test -s "conftest.$ac_objext"'
5439 { (eval echo "$as_me:5439: \"$ac_try\"") >&5
5440 (eval $ac_try) 2>&5
5441 ac_status=$?
5442 echo "$as_me:5442: \$? = $ac_status" >&5
5443 (exit "$ac_status"); }; }; then
5444 cf_cv_c11_noreturn=yes
5445 else
5446 echo "$as_me: failed program was:" >&5
5447 cat "conftest.$ac_ext" >&5
5448 cf_cv_c11_noreturn=no
5449 fi
5450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5451
5452 fi
5453 echo "$as_me:5453: result: $cf_cv_c11_noreturn" >&5
5454 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
5455 else
5456 cf_cv_c11_noreturn=no,
5457 fi
5458
5459 if test "$cf_cv_c11_noreturn" = yes; then
5460
5461 cat >>confdefs.h <<\EOF
5462 #define HAVE_STDNORETURN_H 1
5463 EOF
5464
5465 cat >>confdefs.h <<EOF
5466 #define STDC_NORETURN _Noreturn
5467 EOF
5468
5469 HAVE_STDNORETURN_H=1
5470 else
5471 HAVE_STDNORETURN_H=0
5472 fi
5473
5474 if test "$GCC" = yes || test "$GXX" = yes
5475 then
5476
5477 if test "$GCC" = yes || test "$GXX" = yes
5478 then
5479 case $CFLAGS in
5480 (*-Werror=*)
5481 cf_temp_flags=
5482 for cf_temp_scan in $CFLAGS
5483 do
5484 case "x$cf_temp_scan" in
5485 (x-Werror=format*)
5486
5487 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5488 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5489
5490 ;;
5491 (x-Werror=*)
5492
5493 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5494 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5495
5496 ;;
5497 (*)
5498
5499 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5500 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5501
5502 ;;
5503 esac
5504 done
5505 if test "x$CFLAGS" != "x$cf_temp_flags"
5506 then
5507 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
5508
5509 echo "${as_me:-configure}:5509: testing repairing CFLAGS: $CFLAGS ..." 1>&5
5510
5511 CFLAGS="$cf_temp_flags"
5512 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
5513
5514 echo "${as_me:-configure}:5514: testing ... fixed $CFLAGS ..." 1>&5
5515
5516 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
5517
5518 echo "${as_me:-configure}:5518: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5519
5520 fi
5521 ;;
5522 esac
5523 fi
5524
5525 if test "$GCC" = yes || test "$GXX" = yes
5526 then
5527 case $CPPFLAGS in
5528 (*-Werror=*)
5529 cf_temp_flags=
5530 for cf_temp_scan in $CPPFLAGS
5531 do
5532 case "x$cf_temp_scan" in
5533 (x-Werror=format*)
5534
5535 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5536 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5537
5538 ;;
5539 (x-Werror=*)
5540
5541 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5542 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5543
5544 ;;
5545 (*)
5546
5547 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5548 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5549
5550 ;;
5551 esac
5552 done
5553 if test "x$CPPFLAGS" != "x$cf_temp_flags"
5554 then
5555 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
5556
5557 echo "${as_me:-configure}:5557: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
5558
5559 CPPFLAGS="$cf_temp_flags"
5560 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
5561
5562 echo "${as_me:-configure}:5562: testing ... fixed $CPPFLAGS ..." 1>&5
5563
5564 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
5565
5566 echo "${as_me:-configure}:5566: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5567
5568 fi
5569 ;;
5570 esac
5571 fi
5572
5573 if test "$GCC" = yes || test "$GXX" = yes
5574 then
5575 case $LDFLAGS in
5576 (*-Werror=*)
5577 cf_temp_flags=
5578 for cf_temp_scan in $LDFLAGS
5579 do
5580 case "x$cf_temp_scan" in
5581 (x-Werror=format*)
5582
5583 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5584 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5585
5586 ;;
5587 (x-Werror=*)
5588
5589 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5590 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5591
5592 ;;
5593 (*)
5594
5595 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5596 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5597
5598 ;;
5599 esac
5600 done
5601 if test "x$LDFLAGS" != "x$cf_temp_flags"
5602 then
5603 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
5604
5605 echo "${as_me:-configure}:5605: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
5606
5607 LDFLAGS="$cf_temp_flags"
5608 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
5609
5610 echo "${as_me:-configure}:5610: testing ... fixed $LDFLAGS ..." 1>&5
5611
5612 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
5613
5614 echo "${as_me:-configure}:5614: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5615
5616 fi
5617 ;;
5618 esac
5619 fi
5620
5621 echo "$as_me:5621: checking if you want to turn on gcc warnings" >&5
5622 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
5623
5624 # Check whether --enable-warnings or --disable-warnings was given.
5625 if test "${enable_warnings+set}" = set; then
5626 enableval="$enable_warnings"
5627 test "$enableval" != yes && enableval=no
5628 if test "$enableval" != "no" ; then
5629 enable_warnings=yes
5630 else
5631 enable_warnings=no
5632 fi
5633 else
5634 enableval=no
5635 enable_warnings=no
5636
5637 fi;
5638 echo "$as_me:5638: result: $enable_warnings" >&5
5639 echo "${ECHO_T}$enable_warnings" >&6
5640 if test "$enable_warnings" = "yes"
5641 then
5642
5643 if test "$GCC" = yes || test "$GXX" = yes
5644 then
5645 cat > conftest.i <<EOF
5646 #ifndef GCC_PRINTF
5647 #define GCC_PRINTF 0
5648 #endif
5649 #ifndef GCC_SCANF
5650 #define GCC_SCANF 0
5651 #endif
5652 #ifndef GCC_NORETURN
5653 #define GCC_NORETURN /* nothing */
5654 #endif
5655 #ifndef GCC_UNUSED
5656 #define GCC_UNUSED /* nothing */
5657 #endif
5658 EOF
5659 if test "$GCC" = yes
5660 then
5661 echo "$as_me:5661: checking for $CC __attribute__ directives" >&5
5662 echo $ECHO_N "checking for $CC __attribute__ directives... $ECHO_C" >&6
5663 test -n "$verbose" && echo "$as_me:5663: result: " >&5
5664 echo "${ECHO_T}" >&6
5665 cat > "conftest.$ac_ext" <<EOF
5666 #line 5666 "${as_me:-configure}"
5667 #include <stdio.h>
5668 #include "confdefs.h"
5669 #include "conftest.h"
5670 #include "conftest.i"
5671 #if GCC_PRINTF
5672 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
5673 #else
5674 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
5675 #endif
5676 #if GCC_SCANF
5677 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
5678 #else
5679 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
5680 #endif
5681 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
5682 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
5683 extern GCC_NORETURN void foo(void);
5684 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
5685 EOF
5686 cf_printf_attribute=no
5687 cf_scanf_attribute=no
5688 for cf_attribute in scanf printf unused noreturn
5689 do
5690
5691 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5692
5693 cf_directive="__attribute__(($cf_attribute))"
5694 echo "checking for $CC $cf_directive" 1>&5
5695
5696 case "$cf_attribute" in
5697 (printf)
5698 cf_printf_attribute=yes
5699 cat >conftest.h <<EOF
5700 #define GCC_$cf_ATTRIBUTE 1
5701 EOF
5702 ;;
5703 (scanf)
5704 cf_scanf_attribute=yes
5705 cat >conftest.h <<EOF
5706 #define GCC_$cf_ATTRIBUTE 1
5707 EOF
5708 ;;
5709 (*)
5710 cat >conftest.h <<EOF
5711 #define GCC_$cf_ATTRIBUTE $cf_directive
5712 EOF
5713 ;;
5714 esac
5715
5716 if { (eval echo "$as_me:5716: \"$ac_compile\"") >&5
5717 (eval $ac_compile) 2>&5
5718 ac_status=$?
5719 echo "$as_me:5719: \$? = $ac_status" >&5
5720 (exit "$ac_status"); }; then
5721 test -n "$verbose" && echo "$as_me:5721: result: ... $cf_attribute" >&5
5722 echo "${ECHO_T}... $cf_attribute" >&6
5723 cat conftest.h >>confdefs.h
5724 case "$cf_attribute" in
5725 (noreturn)
5726
5727 cat >>confdefs.h <<EOF
5728 #define GCC_NORETURN $cf_directive
5729 EOF
5730
5731 ;;
5732 (printf)
5733 cf_value='/* nothing */'
5734 if test "$cf_printf_attribute" != no ; then
5735 cf_value='__attribute__((format(printf,fmt,var)))'
5736
5737 cat >>confdefs.h <<\EOF
5738 #define GCC_PRINTF 1
5739 EOF
5740
5741 fi
5742
5743 cat >>confdefs.h <<EOF
5744 #define GCC_PRINTFLIKE(fmt,var) $cf_value
5745 EOF
5746
5747 ;;
5748 (scanf)
5749 cf_value='/* nothing */'
5750 if test "$cf_scanf_attribute" != no ; then
5751 cf_value='__attribute__((format(scanf,fmt,var)))'
5752
5753 cat >>confdefs.h <<\EOF
5754 #define GCC_SCANF 1
5755 EOF
5756
5757 fi
5758
5759 cat >>confdefs.h <<EOF
5760 #define GCC_SCANFLIKE(fmt,var) $cf_value
5761 EOF
5762
5763 ;;
5764 (unused)
5765
5766 cat >>confdefs.h <<EOF
5767 #define GCC_UNUSED $cf_directive
5768 EOF
5769
5770 ;;
5771 esac
5772 fi
5773 done
5774 else
5775 ${FGREP-fgrep} define conftest.i >>confdefs.h
5776 fi
5777 rm -rf ./conftest*
5778 fi
5779
5780 if test "x$have_x" = xyes; then
5781
5782 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
5783 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
5784 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
5785 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
5786 for cf_X_CFLAGS in $X_CFLAGS
5787 do
5788 case "x$cf_X_CFLAGS" in
5789 x-[IUD]*)
5790 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
5791 ;;
5792 *)
5793 CFLAGS="$CFLAGS $cf_X_CFLAGS"
5794 ;;
5795 esac
5796 done
5797
5798 cat >"conftest.$ac_ext" <<_ACEOF
5799 #line 5799 "configure"
5800 #include "confdefs.h"
5801
5802 $ac_includes_default
5803 #include <X11/Intrinsic.h>
5804
5805 int
5806 main (void)
5807 {
5808 String foo = malloc(1); free((void*)foo)
5809 ;
5810 return 0;
5811 }
5812 _ACEOF
5813 rm -f "conftest.$ac_objext"
5814 if { (eval echo "$as_me:5814: \"$ac_compile\"") >&5
5815 (eval $ac_compile) 2>&5
5816 ac_status=$?
5817 echo "$as_me:5817: \$? = $ac_status" >&5
5818 (exit "$ac_status"); } &&
5819 { ac_try='test -s "conftest.$ac_objext"'
5820 { (eval echo "$as_me:5820: \"$ac_try\"") >&5
5821 (eval $ac_try) 2>&5
5822 ac_status=$?
5823 echo "$as_me:5823: \$? = $ac_status" >&5
5824 (exit "$ac_status"); }; }; then
5825
5826 echo "$as_me:5826: checking for X11/Xt const-feature" >&5
5827 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
5828 if test "${cf_cv_const_x_string+set}" = set; then
5829 echo $ECHO_N "(cached) $ECHO_C" >&6
5830 else
5831
5832 cat >"conftest.$ac_ext" <<_ACEOF
5833 #line 5833 "configure"
5834 #include "confdefs.h"
5835
5836 #undef _CONST_X_STRING
5837 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
5838 #undef XTSTRINGDEFINES /* X11R5 and later */
5839 $ac_includes_default
5840 #include <X11/Intrinsic.h>
5841
5842 int
5843 main (void)
5844 {
5845 String foo = malloc(1); *foo = 0
5846 ;
5847 return 0;
5848 }
5849 _ACEOF
5850 rm -f "conftest.$ac_objext"
5851 if { (eval echo "$as_me:5851: \"$ac_compile\"") >&5
5852 (eval $ac_compile) 2>&5
5853 ac_status=$?
5854 echo "$as_me:5854: \$? = $ac_status" >&5
5855 (exit "$ac_status"); } &&
5856 { ac_try='test -s "conftest.$ac_objext"'
5857 { (eval echo "$as_me:5857: \"$ac_try\"") >&5
5858 (eval $ac_try) 2>&5
5859 ac_status=$?
5860 echo "$as_me:5860: \$? = $ac_status" >&5
5861 (exit "$ac_status"); }; }; then
5862
5863 cf_cv_const_x_string=no
5864
5865 else
5866 echo "$as_me: failed program was:" >&5
5867 cat "conftest.$ac_ext" >&5
5868
5869 cf_cv_const_x_string=yes
5870
5871 fi
5872 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5873
5874 fi
5875 echo "$as_me:5875: result: $cf_cv_const_x_string" >&5
5876 echo "${ECHO_T}$cf_cv_const_x_string" >&6
5877
5878 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
5879 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
5880 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
5881
5882 case "$cf_cv_const_x_string" in
5883 (no)
5884
5885 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5886 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
5887
5888 ;;
5889 (*)
5890
5891 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5892 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
5893
5894 ;;
5895 esac
5896
5897 else
5898 echo "$as_me: failed program was:" >&5
5899 cat "conftest.$ac_ext" >&5
5900 fi
5901 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5902 fi
5903 cat > "conftest.$ac_ext" <<EOF
5904 #line 5904 "${as_me:-configure}"
5905 int main(int argc, char *argv[]) { return (argv[argc-1] == (char*)0) ; }
5906 EOF
5907 if test "$INTEL_COMPILER" = yes
5908 then
5909 # The "-wdXXX" options suppress warnings:
5910 # remark #1419: external declaration in primary source file
5911 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
5912 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
5913 # remark #193: zero used for undefined preprocessing identifier
5914 # remark #593: variable "curs_sb_left_arrow" was set but never used
5915 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
5916 # remark #869: parameter "tw" was never referenced
5917 # remark #981: operands are evaluated in unspecified order
5918 # warning #279: controlling expression is constant
5919
5920 echo "$as_me:5920: checking for $CC warning options" >&5
5921 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
5922 test -n "$verbose" && echo "$as_me:5922: result: " >&5
5923 echo "${ECHO_T}" >&6
5924 cf_save_CFLAGS="$CFLAGS"
5925 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
5926 for cf_opt in \
5927 wd1419 \
5928 wd1683 \
5929 wd1684 \
5930 wd193 \
5931 wd593 \
5932 wd279 \
5933 wd810 \
5934 wd869 \
5935 wd981
5936 do
5937 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5938 if { (eval echo "$as_me:5938: \"$ac_compile\"") >&5
5939 (eval $ac_compile) 2>&5
5940 ac_status=$?
5941 echo "$as_me:5941: \$? = $ac_status" >&5
5942 (exit "$ac_status"); }; then
5943 test -n "$verbose" && echo "$as_me:5943: result: ... -$cf_opt" >&5
5944 echo "${ECHO_T}... -$cf_opt" >&6
5945 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5946 fi
5947 done
5948 CFLAGS="$cf_save_CFLAGS"
5949 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
5950 then
5951 echo "$as_me:5951: checking for $CC warning options" >&5
5952 echo $ECHO_N "checking for $CC warning options... $ECHO_C" >&6
5953 test -n "$verbose" && echo "$as_me:5953: result: " >&5
5954 echo "${ECHO_T}" >&6
5955 cf_save_CFLAGS="$CFLAGS"
5956 cf_warn_CONST=""
5957 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
5958 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
5959 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
5960 for cf_opt in W Wall \
5961 Wbad-function-cast \
5962 Wcast-align \
5963 Wcast-qual \
5964 Wdeclaration-after-statement \
5965 Wextra \
5966 Winline \
5967 Wmissing-declarations \
5968 Wmissing-prototypes \
5969 Wnested-externs \
5970 Wpointer-arith \
5971 Wshadow \
5972 Wstrict-prototypes \
5973 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST
5974 do
5975 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5976 if { (eval echo "$as_me:5976: \"$ac_compile\"") >&5
5977 (eval $ac_compile) 2>&5
5978 ac_status=$?
5979 echo "$as_me:5979: \$? = $ac_status" >&5
5980 (exit "$ac_status"); }; then
5981 test -n "$verbose" && echo "$as_me:5981: result: ... -$cf_opt" >&5
5982 echo "${ECHO_T}... -$cf_opt" >&6
5983 case "$cf_opt" in
5984 (Winline)
5985 case "$GCC_VERSION" in
5986 ([34].*)
5987 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
5988
5989 echo "${as_me:-configure}:5989: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5990
5991 continue;;
5992 esac
5993 ;;
5994 (Wpointer-arith)
5995 case "$GCC_VERSION" in
5996 ([12].*)
5997 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
5998
5999 echo "${as_me:-configure}:5999: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
6000
6001 continue;;
6002 esac
6003 ;;
6004 esac
6005 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
6006 fi
6007 done
6008 CFLAGS="$cf_save_CFLAGS"
6009 fi
6010 rm -rf ./conftest*
6011
6012 fi
6013
6014 fi
6015
6016 echo "$as_me:6016: checking if you want to use dbmalloc for testing" >&5
6017 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
6018
6019 # Check whether --with-dbmalloc or --without-dbmalloc was given.
6020 if test "${with_dbmalloc+set}" = set; then
6021 withval="$with_dbmalloc"
6022 case "x$withval" in
6023 (x|xno) ;;
6024 (*)
6025 : "${with_cflags:=-g}"
6026 : "${enable_leaks:=no}"
6027 with_dbmalloc=yes
6028
6029 cat >>confdefs.h <<EOF
6030 #define USE_DBMALLOC 1
6031 EOF
6032
6033 ;;
6034 esac
6035 else
6036 with_dbmalloc=
6037 fi;
6038 echo "$as_me:6038: result: ${with_dbmalloc:-no}" >&5
6039 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
6040
6041 case ".$with_cflags" in
6042 (.*-g*)
6043 case .$CFLAGS in
6044 (.*-g*)
6045 ;;
6046 (*)
6047
6048 cf_fix_cppflags=no
6049 cf_new_cflags=
6050 cf_new_cppflags=
6051 cf_new_extra_cppflags=
6052
6053 for cf_add_cflags in -g
6054 do
6055 case "$cf_fix_cppflags" in
6056 (no)
6057 case "$cf_add_cflags" in
6058 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6059 case "$cf_add_cflags" in
6060 (-D*)
6061 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6062
6063 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6064 && test -z "${cf_tst_cflags}" \
6065 && cf_fix_cppflags=yes
6066
6067 if test "$cf_fix_cppflags" = yes ; then
6068
6069 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6070 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6071
6072 continue
6073 elif test "${cf_tst_cflags}" = "\"'" ; then
6074
6075 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6076 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6077
6078 continue
6079 fi
6080 ;;
6081 esac
6082 case "$CPPFLAGS" in
6083 (*$cf_add_cflags)
6084 ;;
6085 (*)
6086 case "$cf_add_cflags" in
6087 (-D*)
6088 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6089
6090 CPPFLAGS=`echo "$CPPFLAGS" | \
6091 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6092 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6093
6094 ;;
6095 esac
6096
6097 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6098 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6099
6100 ;;
6101 esac
6102 ;;
6103 (*)
6104
6105 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6106 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6107
6108 ;;
6109 esac
6110 ;;
6111 (yes)
6112
6113 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6114 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6115
6116 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
6117
6118 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6119 && test -z "${cf_tst_cflags}" \
6120 && cf_fix_cppflags=no
6121 ;;
6122 esac
6123 done
6124
6125 if test -n "$cf_new_cflags" ; then
6126
6127 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6128 CFLAGS="${CFLAGS}$cf_new_cflags"
6129
6130 fi
6131
6132 if test -n "$cf_new_cppflags" ; then
6133
6134 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6135 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6136
6137 fi
6138
6139 if test -n "$cf_new_extra_cppflags" ; then
6140
6141 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6142 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6143
6144 fi
6145
6146 ;;
6147 esac
6148 ;;
6149 esac
6150
6151 if test "$with_dbmalloc" = yes ; then
6152 echo "$as_me:6152: checking for dbmalloc.h" >&5
6153 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
6154 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
6155 echo $ECHO_N "(cached) $ECHO_C" >&6
6156 else
6157 cat >"conftest.$ac_ext" <<_ACEOF
6158 #line 6158 "configure"
6159 #include "confdefs.h"
6160 #include <dbmalloc.h>
6161 _ACEOF
6162 if { (eval echo "$as_me:6162: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6163 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6164 ac_status=$?
6165 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6166 rm -f conftest.er1
6167 cat conftest.err >&5
6168 echo "$as_me:6168: \$? = $ac_status" >&5
6169 (exit "$ac_status"); } >/dev/null; then
6170 if test -s conftest.err; then
6171 ac_cpp_err=$ac_c_preproc_warn_flag
6172 else
6173 ac_cpp_err=
6174 fi
6175 else
6176 ac_cpp_err=yes
6177 fi
6178 if test -z "$ac_cpp_err"; then
6179 ac_cv_header_dbmalloc_h=yes
6180 else
6181 echo "$as_me: failed program was:" >&5
6182 cat "conftest.$ac_ext" >&5
6183 ac_cv_header_dbmalloc_h=no
6184 fi
6185 rm -f conftest.err "conftest.$ac_ext"
6186 fi
6187 echo "$as_me:6187: result: $ac_cv_header_dbmalloc_h" >&5
6188 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
6189 if test "$ac_cv_header_dbmalloc_h" = yes; then
6190
6191 echo "$as_me:6191: checking for debug_malloc in -ldbmalloc" >&5
6192 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
6193 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
6194 echo $ECHO_N "(cached) $ECHO_C" >&6
6195 else
6196 ac_check_lib_save_LIBS=$LIBS
6197 LIBS="-ldbmalloc $LIBS"
6198 cat >"conftest.$ac_ext" <<_ACEOF
6199 #line 6199 "configure"
6200 #include "confdefs.h"
6201
6202 /* Override any gcc2 internal prototype to avoid an error. */
6203 #ifdef __cplusplus
6204 extern "C"
6205 #endif
6206 /* We use char because int might match the return type of a gcc2
6207 builtin and then its argument prototype would still apply. */
6208 char debug_malloc (void);
6209 int
6210 main (void)
6211 {
6212 debug_malloc ();
6213 ;
6214 return 0;
6215 }
6216 _ACEOF
6217 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6218 if { (eval echo "$as_me:6218: \"$ac_link\"") >&5
6219 (eval $ac_link) 2>&5
6220 ac_status=$?
6221 echo "$as_me:6221: \$? = $ac_status" >&5
6222 (exit "$ac_status"); } &&
6223 { ac_try='test -s "conftest$ac_exeext"'
6224 { (eval echo "$as_me:6224: \"$ac_try\"") >&5
6225 (eval $ac_try) 2>&5
6226 ac_status=$?
6227 echo "$as_me:6227: \$? = $ac_status" >&5
6228 (exit "$ac_status"); }; }; then
6229 ac_cv_lib_dbmalloc_debug_malloc=yes
6230 else
6231 echo "$as_me: failed program was:" >&5
6232 cat "conftest.$ac_ext" >&5
6233 ac_cv_lib_dbmalloc_debug_malloc=no
6234 fi
6235 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6236 LIBS=$ac_check_lib_save_LIBS
6237 fi
6238 echo "$as_me:6238: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
6239 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
6240 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
6241 cat >>confdefs.h <<EOF
6242 #define HAVE_LIBDBMALLOC 1
6243 EOF
6244
6245 LIBS="-ldbmalloc $LIBS"
6246
6247 fi
6248
6249 fi
6250
6251 fi
6252
6253 echo "$as_me:6253: checking if you want to use dmalloc for testing" >&5
6254 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
6255
6256 # Check whether --with-dmalloc or --without-dmalloc was given.
6257 if test "${with_dmalloc+set}" = set; then
6258 withval="$with_dmalloc"
6259 case "x$withval" in
6260 (x|xno) ;;
6261 (*)
6262 : "${with_cflags:=-g}"
6263 : "${enable_leaks:=no}"
6264 with_dmalloc=yes
6265
6266 cat >>confdefs.h <<EOF
6267 #define USE_DMALLOC 1
6268 EOF
6269
6270 ;;
6271 esac
6272 else
6273 with_dmalloc=
6274 fi;
6275 echo "$as_me:6275: result: ${with_dmalloc:-no}" >&5
6276 echo "${ECHO_T}${with_dmalloc:-no}" >&6
6277
6278 case ".$with_cflags" in
6279 (.*-g*)
6280 case .$CFLAGS in
6281 (.*-g*)
6282 ;;
6283 (*)
6284
6285 cf_fix_cppflags=no
6286 cf_new_cflags=
6287 cf_new_cppflags=
6288 cf_new_extra_cppflags=
6289
6290 for cf_add_cflags in -g
6291 do
6292 case "$cf_fix_cppflags" in
6293 (no)
6294 case "$cf_add_cflags" in
6295 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6296 case "$cf_add_cflags" in
6297 (-D*)
6298 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6299
6300 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6301 && test -z "${cf_tst_cflags}" \
6302 && cf_fix_cppflags=yes
6303
6304 if test "$cf_fix_cppflags" = yes ; then
6305
6306 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6307 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6308
6309 continue
6310 elif test "${cf_tst_cflags}" = "\"'" ; then
6311
6312 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6313 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6314
6315 continue
6316 fi
6317 ;;
6318 esac
6319 case "$CPPFLAGS" in
6320 (*$cf_add_cflags)
6321 ;;
6322 (*)
6323 case "$cf_add_cflags" in
6324 (-D*)
6325 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6326
6327 CPPFLAGS=`echo "$CPPFLAGS" | \
6328 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6329 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6330
6331 ;;
6332 esac
6333
6334 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6335 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6336
6337 ;;
6338 esac
6339 ;;
6340 (*)
6341
6342 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6343 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6344
6345 ;;
6346 esac
6347 ;;
6348 (yes)
6349
6350 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6351 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6352
6353 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
6354
6355 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6356 && test -z "${cf_tst_cflags}" \
6357 && cf_fix_cppflags=no
6358 ;;
6359 esac
6360 done
6361
6362 if test -n "$cf_new_cflags" ; then
6363
6364 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6365 CFLAGS="${CFLAGS}$cf_new_cflags"
6366
6367 fi
6368
6369 if test -n "$cf_new_cppflags" ; then
6370
6371 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6372 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6373
6374 fi
6375
6376 if test -n "$cf_new_extra_cppflags" ; then
6377
6378 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6379 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6380
6381 fi
6382
6383 ;;
6384 esac
6385 ;;
6386 esac
6387
6388 if test "$with_dmalloc" = yes ; then
6389 echo "$as_me:6389: checking for dmalloc.h" >&5
6390 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
6391 if test "${ac_cv_header_dmalloc_h+set}" = set; then
6392 echo $ECHO_N "(cached) $ECHO_C" >&6
6393 else
6394 cat >"conftest.$ac_ext" <<_ACEOF
6395 #line 6395 "configure"
6396 #include "confdefs.h"
6397 #include <dmalloc.h>
6398 _ACEOF
6399 if { (eval echo "$as_me:6399: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6400 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6401 ac_status=$?
6402 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6403 rm -f conftest.er1
6404 cat conftest.err >&5
6405 echo "$as_me:6405: \$? = $ac_status" >&5
6406 (exit "$ac_status"); } >/dev/null; then
6407 if test -s conftest.err; then
6408 ac_cpp_err=$ac_c_preproc_warn_flag
6409 else
6410 ac_cpp_err=
6411 fi
6412 else
6413 ac_cpp_err=yes
6414 fi
6415 if test -z "$ac_cpp_err"; then
6416 ac_cv_header_dmalloc_h=yes
6417 else
6418 echo "$as_me: failed program was:" >&5
6419 cat "conftest.$ac_ext" >&5
6420 ac_cv_header_dmalloc_h=no
6421 fi
6422 rm -f conftest.err "conftest.$ac_ext"
6423 fi
6424 echo "$as_me:6424: result: $ac_cv_header_dmalloc_h" >&5
6425 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
6426 if test "$ac_cv_header_dmalloc_h" = yes; then
6427
6428 echo "$as_me:6428: checking for dmalloc_debug in -ldmalloc" >&5
6429 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
6430 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
6431 echo $ECHO_N "(cached) $ECHO_C" >&6
6432 else
6433 ac_check_lib_save_LIBS=$LIBS
6434 LIBS="-ldmalloc $LIBS"
6435 cat >"conftest.$ac_ext" <<_ACEOF
6436 #line 6436 "configure"
6437 #include "confdefs.h"
6438
6439 /* Override any gcc2 internal prototype to avoid an error. */
6440 #ifdef __cplusplus
6441 extern "C"
6442 #endif
6443 /* We use char because int might match the return type of a gcc2
6444 builtin and then its argument prototype would still apply. */
6445 char dmalloc_debug (void);
6446 int
6447 main (void)
6448 {
6449 dmalloc_debug ();
6450 ;
6451 return 0;
6452 }
6453 _ACEOF
6454 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6455 if { (eval echo "$as_me:6455: \"$ac_link\"") >&5
6456 (eval $ac_link) 2>&5
6457 ac_status=$?
6458 echo "$as_me:6458: \$? = $ac_status" >&5
6459 (exit "$ac_status"); } &&
6460 { ac_try='test -s "conftest$ac_exeext"'
6461 { (eval echo "$as_me:6461: \"$ac_try\"") >&5
6462 (eval $ac_try) 2>&5
6463 ac_status=$?
6464 echo "$as_me:6464: \$? = $ac_status" >&5
6465 (exit "$ac_status"); }; }; then
6466 ac_cv_lib_dmalloc_dmalloc_debug=yes
6467 else
6468 echo "$as_me: failed program was:" >&5
6469 cat "conftest.$ac_ext" >&5
6470 ac_cv_lib_dmalloc_dmalloc_debug=no
6471 fi
6472 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6473 LIBS=$ac_check_lib_save_LIBS
6474 fi
6475 echo "$as_me:6475: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
6476 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
6477 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
6478 cat >>confdefs.h <<EOF
6479 #define HAVE_LIBDMALLOC 1
6480 EOF
6481
6482 LIBS="-ldmalloc $LIBS"
6483
6484 fi
6485
6486 fi
6487
6488 fi
6489
6490 cat >>confdefs.h <<\EOF
6491 #define UNIX 1
6492 EOF
6493
6494 TRY_CFLAGS=
6495 case "$host_os" in
6496 (aix4*)
6497 TRY_CFLAGS="$TRY_CFLAGS -DAIX4 -D_BSD=44 -D_AIX"
6498 LIBS="$LIBS -lbsd"
6499 ;;
6500 (aix*)
6501 TRY_CFLAGS="$TRY_CFLAGS -D_ACS_COMPAT_CODE"
6502 LIBS="$LIBS -lbsd"
6503 ;;
6504 (apollo*)
6505 TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4"
6506 ;;
6507 (bsdi*)
6508 TRY_CFLAGS="$TRY_CFLAGS -DBSDI"
6509 ;;
6510 (clix*)
6511 # Tested on CLIX 3.1 (T.Dickey). The original makefile entry
6512 # contributed by Alex Matulich ([email protected]) also
6513 # references -lmalloc and -lbsd.
6514
6515 echo "$as_me:6515: checking for strcmp in -lc_s" >&5
6516 echo $ECHO_N "checking for strcmp in -lc_s... $ECHO_C" >&6
6517 if test "${ac_cv_lib_c_s_strcmp+set}" = set; then
6518 echo $ECHO_N "(cached) $ECHO_C" >&6
6519 else
6520 ac_check_lib_save_LIBS=$LIBS
6521 LIBS="-lc_s $LIBS"
6522 cat >"conftest.$ac_ext" <<_ACEOF
6523 #line 6523 "configure"
6524 #include "confdefs.h"
6525
6526 /* Override any gcc2 internal prototype to avoid an error. */
6527 #ifdef __cplusplus
6528 extern "C"
6529 #endif
6530 /* We use char because int might match the return type of a gcc2
6531 builtin and then its argument prototype would still apply. */
6532 char strcmp (void);
6533 int
6534 main (void)
6535 {
6536 strcmp ();
6537 ;
6538 return 0;
6539 }
6540 _ACEOF
6541 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6542 if { (eval echo "$as_me:6542: \"$ac_link\"") >&5
6543 (eval $ac_link) 2>&5
6544 ac_status=$?
6545 echo "$as_me:6545: \$? = $ac_status" >&5
6546 (exit "$ac_status"); } &&
6547 { ac_try='test -s "conftest$ac_exeext"'
6548 { (eval echo "$as_me:6548: \"$ac_try\"") >&5
6549 (eval $ac_try) 2>&5
6550 ac_status=$?
6551 echo "$as_me:6551: \$? = $ac_status" >&5
6552 (exit "$ac_status"); }; }; then
6553 ac_cv_lib_c_s_strcmp=yes
6554 else
6555 echo "$as_me: failed program was:" >&5
6556 cat "conftest.$ac_ext" >&5
6557 ac_cv_lib_c_s_strcmp=no
6558 fi
6559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6560 LIBS=$ac_check_lib_save_LIBS
6561 fi
6562 echo "$as_me:6562: result: $ac_cv_lib_c_s_strcmp" >&5
6563 echo "${ECHO_T}$ac_cv_lib_c_s_strcmp" >&6
6564 if test "$ac_cv_lib_c_s_strcmp" = yes; then
6565 cat >>confdefs.h <<EOF
6566 #define HAVE_LIBC_S 1
6567 EOF
6568
6569 LIBS="-lc_s $LIBS"
6570
6571 fi
6572
6573 ;;
6574 (convex*)
6575 TRY_CFLAGS="$TRY_CFLAGS -D__STDC__ -Dunix"
6576 ;;
6577 (cygwin*)
6578 TRY_CFLAGS="$TRY_CFLAGS -DWIN_EX -D_WINDOWS_NSL"
6579 LIBS="$LIBS -luser32"
6580 ;;
6581 (hpux*)
6582 TRY_CFLAGS="$TRY_CFLAGS -D_XOPEN_SOURCE_EXTENDED"
6583 test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000 -DSYS_HPUX"
6584 ;;
6585 (isc*)
6586 # -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
6587 TRY_CFLAGS="$TRY_CFLAGS -DISC -DPOSIX_JC"
6588 LIBS="$LIBS -linet -lnsl_s -lcposix"
6589 ;;
6590 (irix6.*)
6591 TRY_CFLAGS="$TRY_CFLAGS -DSYS_IRIX64"
6592 ;;
6593 (irix*)
6594 # The original makefile used the $CFLAGS option -cckr for some form
6595 # of K&R compatibility. However, this causes compilation warnings for
6596 # varargs on IRIX 5.2, and does not appear to be needed.
6597 ;;
6598 (linux*)
6599 TRY_CFLAGS="$TRY_CFLAGS -DLINUX"
6600 ;;
6601 (mingw*)
6602 # put these directly in CPPFLAGS since they will not work in lynx_cfg.h
6603
6604 cf_fix_cppflags=no
6605 cf_new_cflags=
6606 cf_new_cppflags=
6607 cf_new_extra_cppflags=
6608
6609 for cf_add_cflags in \
6610 -DDOSPATH \
6611 -DNOSIGHUP \
6612 -DNOUSERS \
6613 -DWIN32_LEAN_AND_MEAN \
6614 -DWIN_EX \
6615 -D_CONSOLE \
6616 -D_GNU_SOURCE \
6617 -D_MBCS \
6618 -D_WINDOWS \
6619 -D_WIN_CC \
6620 -D__WIN32__ \
6621
6622 do
6623 case "$cf_fix_cppflags" in
6624 (no)
6625 case "$cf_add_cflags" in
6626 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6627 case "$cf_add_cflags" in
6628 (-D*)
6629 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6630
6631 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6632 && test -z "${cf_tst_cflags}" \
6633 && cf_fix_cppflags=yes
6634
6635 if test "$cf_fix_cppflags" = yes ; then
6636
6637 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6638 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6639
6640 continue
6641 elif test "${cf_tst_cflags}" = "\"'" ; then
6642
6643 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6644 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6645
6646 continue
6647 fi
6648 ;;
6649 esac
6650 case "$CPPFLAGS" in
6651 (*$cf_add_cflags)
6652 ;;
6653 (*)
6654 case "$cf_add_cflags" in
6655 (-D*)
6656 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6657
6658 CPPFLAGS=`echo "$CPPFLAGS" | \
6659 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6660 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6661
6662 ;;
6663 esac
6664
6665 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6666 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6667
6668 ;;
6669 esac
6670 ;;
6671 (*)
6672
6673 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6674 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6675
6676 ;;
6677 esac
6678 ;;
6679 (yes)
6680
6681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6683
6684 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
6685
6686 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6687 && test -z "${cf_tst_cflags}" \
6688 && cf_fix_cppflags=no
6689 ;;
6690 esac
6691 done
6692
6693 if test -n "$cf_new_cflags" ; then
6694
6695 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6696 CFLAGS="${CFLAGS}$cf_new_cflags"
6697
6698 fi
6699
6700 if test -n "$cf_new_cppflags" ; then
6701
6702 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6703 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6704
6705 fi
6706
6707 if test -n "$cf_new_extra_cppflags" ; then
6708
6709 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6710 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6711
6712 fi
6713
6714 EXTRA_OBJS="$EXTRA_OBJS Xsystem\$o"
6715
6716 echo "$as_me:6716: checking for __chk_fail in -lssp" >&5
6717 echo $ECHO_N "checking for __chk_fail in -lssp... $ECHO_C" >&6
6718 if test "${ac_cv_lib_ssp___chk_fail+set}" = set; then
6719 echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721 ac_check_lib_save_LIBS=$LIBS
6722 LIBS="-lssp $LIBS"
6723 cat >"conftest.$ac_ext" <<_ACEOF
6724 #line 6724 "configure"
6725 #include "confdefs.h"
6726
6727 /* Override any gcc2 internal prototype to avoid an error. */
6728 #ifdef __cplusplus
6729 extern "C"
6730 #endif
6731 /* We use char because int might match the return type of a gcc2
6732 builtin and then its argument prototype would still apply. */
6733 char __chk_fail (void);
6734 int
6735 main (void)
6736 {
6737 __chk_fail ();
6738 ;
6739 return 0;
6740 }
6741 _ACEOF
6742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6743 if { (eval echo "$as_me:6743: \"$ac_link\"") >&5
6744 (eval $ac_link) 2>&5
6745 ac_status=$?
6746 echo "$as_me:6746: \$? = $ac_status" >&5
6747 (exit "$ac_status"); } &&
6748 { ac_try='test -s "conftest$ac_exeext"'
6749 { (eval echo "$as_me:6749: \"$ac_try\"") >&5
6750 (eval $ac_try) 2>&5
6751 ac_status=$?
6752 echo "$as_me:6752: \$? = $ac_status" >&5
6753 (exit "$ac_status"); }; }; then
6754 ac_cv_lib_ssp___chk_fail=yes
6755 else
6756 echo "$as_me: failed program was:" >&5
6757 cat "conftest.$ac_ext" >&5
6758 ac_cv_lib_ssp___chk_fail=no
6759 fi
6760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6761 LIBS=$ac_check_lib_save_LIBS
6762 fi
6763 echo "$as_me:6763: result: $ac_cv_lib_ssp___chk_fail" >&5
6764 echo "${ECHO_T}$ac_cv_lib_ssp___chk_fail" >&6
6765 if test "$ac_cv_lib_ssp___chk_fail" = yes; then
6766 cat >>confdefs.h <<EOF
6767 #define HAVE_LIBSSP 1
6768 EOF
6769
6770 LIBS="-lssp $LIBS"
6771
6772 fi
6773
6774 ;;
6775 (msdosdjgpp*)
6776 LIBS="$LIBS -lwatt"
6777 TRY_CFLAGS="$TRY_CFLAGS -DDOSPATH -DNOUSERS"
6778 ;;
6779 (next*)
6780 TRY_CFLAGS="$TRY_CFLAGS -DNEXT"
6781 ;;
6782 (osf4*)
6783 # The -Olimit flag (see below) is no longer available with
6784 # Digital C 5.2, which is bundled with Digital UNIX 4.0.
6785 TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
6786 ;;
6787 (osf*)
6788 # Increase the maximum size of functions that will be optimized.
6789 test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000"
6790 TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
6791 ;;
6792 (sco3.2v5*)
6793 test "$ac_cv_c_compiler_gnu" != yes && TRY_CFLAGS="$TRY_CFLAGS -belf"
6794 ;;
6795 (sco*)
6796 LIBS="$LIBS -lmalloc"
6797 # It's a little late to do much, but try to warn user if he's using
6798 # SCO's cc (which is reported to have broken const/volatile).
6799 case "$CC" in
6800 (cc|*/cc)
6801 { echo "$as_me:6801: WARNING: You should consider using gcc or rcc if available" >&5
6802 echo "$as_me: WARNING: You should consider using gcc or rcc if available" >&2;}
6803 unset ac_cv_prog_CC
6804 for ac_prog in gcc rcc
6805 do
6806 # Extract the first word of "$ac_prog", so it can be a program name with args.
6807 set dummy $ac_prog; ac_word=$2
6808 echo "$as_me:6808: checking for $ac_word" >&5
6809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6810 if test "${ac_cv_prog_CC+set}" = set; then
6811 echo $ECHO_N "(cached) $ECHO_C" >&6
6812 else
6813 if test -n "$CC"; then
6814 ac_cv_prog_CC="$CC" # Let the user override the test.
6815 else
6816 ac_save_IFS=$IFS; IFS=$ac_path_separator
6817 ac_dummy="$PATH"
6818 for ac_dir in $ac_dummy; do
6819 IFS=$ac_save_IFS
6820 test -z "$ac_dir" && ac_dir=.
6821 $as_executable_p "$ac_dir/$ac_word" || continue
6822 ac_cv_prog_CC="$ac_prog"
6823 echo "$as_me:6823: found $ac_dir/$ac_word" >&5
6824 break
6825 done
6826
6827 fi
6828 fi
6829 CC=$ac_cv_prog_CC
6830 if test -n "$CC"; then
6831 echo "$as_me:6831: result: $CC" >&5
6832 echo "${ECHO_T}$CC" >&6
6833 else
6834 echo "$as_me:6834: result: no" >&5
6835 echo "${ECHO_T}no" >&6
6836 fi
6837
6838 test -n "$CC" && break
6839 done
6840 test -n "$CC" || CC="$CC"
6841
6842 ;;
6843 esac
6844 ;;
6845 (sequent-ptx)
6846 TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL"
6847 ;;
6848 (sequent-ptx2)
6849 TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT"
6850 ;;
6851 (sony-newsos*)
6852 TRY_CFLAGS="$TRY_CFLAGS -I/usr/sony/include"
6853
6854 for ac_header in jcurses.h
6855 do
6856 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6857 echo "$as_me:6857: checking for $ac_header" >&5
6858 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6859 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6860 echo $ECHO_N "(cached) $ECHO_C" >&6
6861 else
6862 cat >"conftest.$ac_ext" <<_ACEOF
6863 #line 6863 "configure"
6864 #include "confdefs.h"
6865 #include <$ac_header>
6866 _ACEOF
6867 if { (eval echo "$as_me:6867: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6868 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6869 ac_status=$?
6870 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6871 rm -f conftest.er1
6872 cat conftest.err >&5
6873 echo "$as_me:6873: \$? = $ac_status" >&5
6874 (exit "$ac_status"); } >/dev/null; then
6875 if test -s conftest.err; then
6876 ac_cpp_err=$ac_c_preproc_warn_flag
6877 else
6878 ac_cpp_err=
6879 fi
6880 else
6881 ac_cpp_err=yes
6882 fi
6883 if test -z "$ac_cpp_err"; then
6884 eval "$as_ac_Header=yes"
6885 else
6886 echo "$as_me: failed program was:" >&5
6887 cat "conftest.$ac_ext" >&5
6888 eval "$as_ac_Header=no"
6889 fi
6890 rm -f conftest.err "conftest.$ac_ext"
6891 fi
6892 echo "$as_me:6892: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6893 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6894 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6895 cat >>confdefs.h <<EOF
6896 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6897 EOF
6898
6899 fi
6900 done
6901
6902 ;;
6903 (svr4)
6904 TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DSVR4"
6905 ;;
6906 (sunos3*)
6907 TRY_CFLAGS="$TRY_CFLAGS -DSUN"
6908 ;;
6909 (sunos4*)
6910 TRY_CFLAGS="$TRY_CFLAGS -DSUN -DSUN4"
6911 ;;
6912 (ultrix*)
6913 # Increase the maximum size of functions that will be optimized.
6914 test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7"
6915 TRY_CFLAGS="$TRY_CFLAGS -DULTRIX"
6916
6917 for ac_header in cursesX.h
6918 do
6919 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6920 echo "$as_me:6920: checking for $ac_header" >&5
6921 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6922 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6923 echo $ECHO_N "(cached) $ECHO_C" >&6
6924 else
6925 cat >"conftest.$ac_ext" <<_ACEOF
6926 #line 6926 "configure"
6927 #include "confdefs.h"
6928 #include <$ac_header>
6929 _ACEOF
6930 if { (eval echo "$as_me:6930: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6931 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6932 ac_status=$?
6933 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6934 rm -f conftest.er1
6935 cat conftest.err >&5
6936 echo "$as_me:6936: \$? = $ac_status" >&5
6937 (exit "$ac_status"); } >/dev/null; then
6938 if test -s conftest.err; then
6939 ac_cpp_err=$ac_c_preproc_warn_flag
6940 else
6941 ac_cpp_err=
6942 fi
6943 else
6944 ac_cpp_err=yes
6945 fi
6946 if test -z "$ac_cpp_err"; then
6947 eval "$as_ac_Header=yes"
6948 else
6949 echo "$as_me: failed program was:" >&5
6950 cat "conftest.$ac_ext" >&5
6951 eval "$as_ac_Header=no"
6952 fi
6953 rm -f conftest.err "conftest.$ac_ext"
6954 fi
6955 echo "$as_me:6955: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6956 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6957 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6958 cat >>confdefs.h <<EOF
6959 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6960 EOF
6961
6962 cat >>confdefs.h <<\EOF
6963 #define HAVE_CURSESX_H 1
6964 EOF
6965
6966 cf_cv_ncurses_header=cursesX.h
6967 fi
6968 done
6969
6970 ;;
6971 esac
6972
6973 case "$host_os" in
6974 (mingw*)
6975 EXTRA_OBJS="$EXTRA_OBJS LYIcon\$o"
6976 ;;
6977 esac
6978
6979 echo "$as_me:6979: checking if the POSIX test-macros are already defined" >&5
6980 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
6981 if test "${cf_cv_posix_visible+set}" = set; then
6982 echo $ECHO_N "(cached) $ECHO_C" >&6
6983 else
6984
6985 cat >"conftest.$ac_ext" <<_ACEOF
6986 #line 6986 "configure"
6987 #include "confdefs.h"
6988 #include <stdio.h>
6989 int
6990 main (void)
6991 {
6992
6993 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
6994 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
6995 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
6996 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
6997 #error conflicting symbols found
6998 #endif
6999
7000 ;
7001 return 0;
7002 }
7003 _ACEOF
7004 rm -f "conftest.$ac_objext"
7005 if { (eval echo "$as_me:7005: \"$ac_compile\"") >&5
7006 (eval $ac_compile) 2>&5
7007 ac_status=$?
7008 echo "$as_me:7008: \$? = $ac_status" >&5
7009 (exit "$ac_status"); } &&
7010 { ac_try='test -s "conftest.$ac_objext"'
7011 { (eval echo "$as_me:7011: \"$ac_try\"") >&5
7012 (eval $ac_try) 2>&5
7013 ac_status=$?
7014 echo "$as_me:7014: \$? = $ac_status" >&5
7015 (exit "$ac_status"); }; }; then
7016 cf_cv_posix_visible=no
7017 else
7018 echo "$as_me: failed program was:" >&5
7019 cat "conftest.$ac_ext" >&5
7020 cf_cv_posix_visible=yes
7021 fi
7022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7023
7024 fi
7025 echo "$as_me:7025: result: $cf_cv_posix_visible" >&5
7026 echo "${ECHO_T}$cf_cv_posix_visible" >&6
7027
7028 if test "$cf_cv_posix_visible" = no; then
7029
7030 cf_XOPEN_SOURCE=500
7031 cf_POSIX_C_SOURCE=199506L
7032 cf_xopen_source=
7033
7034 case "$host_os" in
7035 (aix[4-7]*)
7036 cf_xopen_source="-D_ALL_SOURCE"
7037 ;;
7038 (darwin[0-8].*)
7039 cf_xopen_source="-D_APPLE_C_SOURCE"
7040 ;;
7041 (darwin*)
7042 cf_xopen_source="-D_DARWIN_C_SOURCE"
7043 cf_XOPEN_SOURCE=
7044 ;;
7045 (freebsd*|dragonfly*|midnightbsd*)
7046 # 5.x headers associate
7047 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7048 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7049 cf_POSIX_C_SOURCE=200112L
7050 cf_XOPEN_SOURCE=600
7051 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7052 ;;
7053 (hpux11*)
7054 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7055 ;;
7056 (hpux*)
7057 cf_xopen_source="-D_HPUX_SOURCE"
7058 ;;
7059 (irix[56].*)
7060 cf_xopen_source="-D_SGI_SOURCE"
7061 cf_XOPEN_SOURCE=
7062 ;;
7063 (linux*gnu*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
7064
7065 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
7066
7067 echo "$as_me:7067: checking if this is the GNU C library" >&5
7068 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
7069 if test "${cf_cv_gnu_library+set}" = set; then
7070 echo $ECHO_N "(cached) $ECHO_C" >&6
7071 else
7072
7073 cat >"conftest.$ac_ext" <<_ACEOF
7074 #line 7074 "configure"
7075 #include "confdefs.h"
7076 #include <sys/types.h>
7077 int
7078 main (void)
7079 {
7080
7081 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
7082 return 0;
7083 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
7084 return 0;
7085 #else
7086 # error not GNU C library
7087 #endif
7088 ;
7089 return 0;
7090 }
7091 _ACEOF
7092 rm -f "conftest.$ac_objext"
7093 if { (eval echo "$as_me:7093: \"$ac_compile\"") >&5
7094 (eval $ac_compile) 2>&5
7095 ac_status=$?
7096 echo "$as_me:7096: \$? = $ac_status" >&5
7097 (exit "$ac_status"); } &&
7098 { ac_try='test -s "conftest.$ac_objext"'
7099 { (eval echo "$as_me:7099: \"$ac_try\"") >&5
7100 (eval $ac_try) 2>&5
7101 ac_status=$?
7102 echo "$as_me:7102: \$? = $ac_status" >&5
7103 (exit "$ac_status"); }; }; then
7104 cf_cv_gnu_library=yes
7105 else
7106 echo "$as_me: failed program was:" >&5
7107 cat "conftest.$ac_ext" >&5
7108 cf_cv_gnu_library=no
7109 fi
7110 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7111
7112 fi
7113 echo "$as_me:7113: result: $cf_cv_gnu_library" >&5
7114 echo "${ECHO_T}$cf_cv_gnu_library" >&6
7115
7116 if test x$cf_cv_gnu_library = xyes; then
7117
7118 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
7119 # was changed to help a little. newlib incorporated the change about 4
7120 # years later.
7121 echo "$as_me:7121: checking if _DEFAULT_SOURCE can be used as a basis" >&5
7122 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
7123 if test "${cf_cv_gnu_library_219+set}" = set; then
7124 echo $ECHO_N "(cached) $ECHO_C" >&6
7125 else
7126
7127 cf_save="$CPPFLAGS"
7128
7129 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7130 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
7131
7132 cat >"conftest.$ac_ext" <<_ACEOF
7133 #line 7133 "configure"
7134 #include "confdefs.h"
7135 #include <sys/types.h>
7136 int
7137 main (void)
7138 {
7139
7140 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
7141 return 0;
7142 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
7143 return 0;
7144 #else
7145 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
7146 #endif
7147 ;
7148 return 0;
7149 }
7150 _ACEOF
7151 rm -f "conftest.$ac_objext"
7152 if { (eval echo "$as_me:7152: \"$ac_compile\"") >&5
7153 (eval $ac_compile) 2>&5
7154 ac_status=$?
7155 echo "$as_me:7155: \$? = $ac_status" >&5
7156 (exit "$ac_status"); } &&
7157 { ac_try='test -s "conftest.$ac_objext"'
7158 { (eval echo "$as_me:7158: \"$ac_try\"") >&5
7159 (eval $ac_try) 2>&5
7160 ac_status=$?
7161 echo "$as_me:7161: \$? = $ac_status" >&5
7162 (exit "$ac_status"); }; }; then
7163 cf_cv_gnu_library_219=yes
7164 else
7165 echo "$as_me: failed program was:" >&5
7166 cat "conftest.$ac_ext" >&5
7167 cf_cv_gnu_library_219=no
7168 fi
7169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7170 CPPFLAGS="$cf_save"
7171
7172 fi
7173 echo "$as_me:7173: result: $cf_cv_gnu_library_219" >&5
7174 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
7175
7176 if test "x$cf_cv_gnu_library_219" = xyes; then
7177 cf_save="$CPPFLAGS"
7178 echo "$as_me:7178: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
7179 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
7180 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
7181 echo $ECHO_N "(cached) $ECHO_C" >&6
7182 else
7183
7184 cf_fix_cppflags=no
7185 cf_new_cflags=
7186 cf_new_cppflags=
7187 cf_new_extra_cppflags=
7188
7189 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
7190 do
7191 case "$cf_fix_cppflags" in
7192 (no)
7193 case "$cf_add_cflags" in
7194 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7195 case "$cf_add_cflags" in
7196 (-D*)
7197 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7198
7199 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7200 && test -z "${cf_tst_cflags}" \
7201 && cf_fix_cppflags=yes
7202
7203 if test "$cf_fix_cppflags" = yes ; then
7204
7205 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7206 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7207
7208 continue
7209 elif test "${cf_tst_cflags}" = "\"'" ; then
7210
7211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7213
7214 continue
7215 fi
7216 ;;
7217 esac
7218 case "$CPPFLAGS" in
7219 (*$cf_add_cflags)
7220 ;;
7221 (*)
7222 case "$cf_add_cflags" in
7223 (-D*)
7224 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7225
7226 CPPFLAGS=`echo "$CPPFLAGS" | \
7227 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7228 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7229
7230 ;;
7231 esac
7232
7233 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7234 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7235
7236 ;;
7237 esac
7238 ;;
7239 (*)
7240
7241 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7242 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7243
7244 ;;
7245 esac
7246 ;;
7247 (yes)
7248
7249 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7250 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7251
7252 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7253
7254 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7255 && test -z "${cf_tst_cflags}" \
7256 && cf_fix_cppflags=no
7257 ;;
7258 esac
7259 done
7260
7261 if test -n "$cf_new_cflags" ; then
7262
7263 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7264 CFLAGS="${CFLAGS}$cf_new_cflags"
7265
7266 fi
7267
7268 if test -n "$cf_new_cppflags" ; then
7269
7270 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7271 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7272
7273 fi
7274
7275 if test -n "$cf_new_extra_cppflags" ; then
7276
7277 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7278 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7279
7280 fi
7281
7282 cat >"conftest.$ac_ext" <<_ACEOF
7283 #line 7283 "configure"
7284 #include "confdefs.h"
7285
7286 #include <limits.h>
7287 #include <sys/types.h>
7288
7289 int
7290 main (void)
7291 {
7292
7293 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
7294 return 0;
7295 #else
7296 # error GNU C library is too old
7297 #endif
7298 ;
7299 return 0;
7300 }
7301 _ACEOF
7302 rm -f "conftest.$ac_objext"
7303 if { (eval echo "$as_me:7303: \"$ac_compile\"") >&5
7304 (eval $ac_compile) 2>&5
7305 ac_status=$?
7306 echo "$as_me:7306: \$? = $ac_status" >&5
7307 (exit "$ac_status"); } &&
7308 { ac_try='test -s "conftest.$ac_objext"'
7309 { (eval echo "$as_me:7309: \"$ac_try\"") >&5
7310 (eval $ac_try) 2>&5
7311 ac_status=$?
7312 echo "$as_me:7312: \$? = $ac_status" >&5
7313 (exit "$ac_status"); }; }; then
7314 cf_cv_gnu_dftsrc_219=yes
7315 else
7316 echo "$as_me: failed program was:" >&5
7317 cat "conftest.$ac_ext" >&5
7318 cf_cv_gnu_dftsrc_219=no
7319 fi
7320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7321
7322 fi
7323 echo "$as_me:7323: result: $cf_cv_gnu_dftsrc_219" >&5
7324 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
7325 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
7326 else
7327 cf_cv_gnu_dftsrc_219=maybe
7328 fi
7329
7330 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
7331
7332 echo "$as_me:7332: checking if we must define _GNU_SOURCE" >&5
7333 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7334 if test "${cf_cv_gnu_source+set}" = set; then
7335 echo $ECHO_N "(cached) $ECHO_C" >&6
7336 else
7337
7338 cat >"conftest.$ac_ext" <<_ACEOF
7339 #line 7339 "configure"
7340 #include "confdefs.h"
7341 #include <sys/types.h>
7342 int
7343 main (void)
7344 {
7345
7346 #ifndef _XOPEN_SOURCE
7347 #error expected _XOPEN_SOURCE to be defined
7348 #endif
7349 ;
7350 return 0;
7351 }
7352 _ACEOF
7353 rm -f "conftest.$ac_objext"
7354 if { (eval echo "$as_me:7354: \"$ac_compile\"") >&5
7355 (eval $ac_compile) 2>&5
7356 ac_status=$?
7357 echo "$as_me:7357: \$? = $ac_status" >&5
7358 (exit "$ac_status"); } &&
7359 { ac_try='test -s "conftest.$ac_objext"'
7360 { (eval echo "$as_me:7360: \"$ac_try\"") >&5
7361 (eval $ac_try) 2>&5
7362 ac_status=$?
7363 echo "$as_me:7363: \$? = $ac_status" >&5
7364 (exit "$ac_status"); }; }; then
7365 cf_cv_gnu_source=no
7366 else
7367 echo "$as_me: failed program was:" >&5
7368 cat "conftest.$ac_ext" >&5
7369 cf_save="$CPPFLAGS"
7370
7371 cf_fix_cppflags=no
7372 cf_new_cflags=
7373 cf_new_cppflags=
7374 cf_new_extra_cppflags=
7375
7376 for cf_add_cflags in -D_GNU_SOURCE
7377 do
7378 case "$cf_fix_cppflags" in
7379 (no)
7380 case "$cf_add_cflags" in
7381 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7382 case "$cf_add_cflags" in
7383 (-D*)
7384 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7385
7386 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7387 && test -z "${cf_tst_cflags}" \
7388 && cf_fix_cppflags=yes
7389
7390 if test "$cf_fix_cppflags" = yes ; then
7391
7392 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7393 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7394
7395 continue
7396 elif test "${cf_tst_cflags}" = "\"'" ; then
7397
7398 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7399 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7400
7401 continue
7402 fi
7403 ;;
7404 esac
7405 case "$CPPFLAGS" in
7406 (*$cf_add_cflags)
7407 ;;
7408 (*)
7409 case "$cf_add_cflags" in
7410 (-D*)
7411 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7412
7413 CPPFLAGS=`echo "$CPPFLAGS" | \
7414 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7415 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7416
7417 ;;
7418 esac
7419
7420 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7421 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7422
7423 ;;
7424 esac
7425 ;;
7426 (*)
7427
7428 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7429 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7430
7431 ;;
7432 esac
7433 ;;
7434 (yes)
7435
7436 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7437 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7438
7439 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7440
7441 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7442 && test -z "${cf_tst_cflags}" \
7443 && cf_fix_cppflags=no
7444 ;;
7445 esac
7446 done
7447
7448 if test -n "$cf_new_cflags" ; then
7449
7450 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7451 CFLAGS="${CFLAGS}$cf_new_cflags"
7452
7453 fi
7454
7455 if test -n "$cf_new_cppflags" ; then
7456
7457 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7458 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7459
7460 fi
7461
7462 if test -n "$cf_new_extra_cppflags" ; then
7463
7464 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7465 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7466
7467 fi
7468
7469 cat >"conftest.$ac_ext" <<_ACEOF
7470 #line 7470 "configure"
7471 #include "confdefs.h"
7472 #include <sys/types.h>
7473 int
7474 main (void)
7475 {
7476
7477 #ifdef _XOPEN_SOURCE
7478 #error expected _XOPEN_SOURCE to be undefined
7479 #endif
7480 ;
7481 return 0;
7482 }
7483 _ACEOF
7484 rm -f "conftest.$ac_objext"
7485 if { (eval echo "$as_me:7485: \"$ac_compile\"") >&5
7486 (eval $ac_compile) 2>&5
7487 ac_status=$?
7488 echo "$as_me:7488: \$? = $ac_status" >&5
7489 (exit "$ac_status"); } &&
7490 { ac_try='test -s "conftest.$ac_objext"'
7491 { (eval echo "$as_me:7491: \"$ac_try\"") >&5
7492 (eval $ac_try) 2>&5
7493 ac_status=$?
7494 echo "$as_me:7494: \$? = $ac_status" >&5
7495 (exit "$ac_status"); }; }; then
7496 cf_cv_gnu_source=no
7497 else
7498 echo "$as_me: failed program was:" >&5
7499 cat "conftest.$ac_ext" >&5
7500 cf_cv_gnu_source=yes
7501 fi
7502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7503 CPPFLAGS="$cf_save"
7504
7505 fi
7506 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7507
7508 fi
7509 echo "$as_me:7509: result: $cf_cv_gnu_source" >&5
7510 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7511
7512 if test "$cf_cv_gnu_source" = yes
7513 then
7514 echo "$as_me:7514: checking if we should also define _DEFAULT_SOURCE" >&5
7515 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
7516 if test "${cf_cv_default_source+set}" = set; then
7517 echo $ECHO_N "(cached) $ECHO_C" >&6
7518 else
7519
7520 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7521 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
7522
7523 cat >"conftest.$ac_ext" <<_ACEOF
7524 #line 7524 "configure"
7525 #include "confdefs.h"
7526 #include <sys/types.h>
7527 int
7528 main (void)
7529 {
7530
7531 #ifdef _DEFAULT_SOURCE
7532 #error expected _DEFAULT_SOURCE to be undefined
7533 #endif
7534 ;
7535 return 0;
7536 }
7537 _ACEOF
7538 rm -f "conftest.$ac_objext"
7539 if { (eval echo "$as_me:7539: \"$ac_compile\"") >&5
7540 (eval $ac_compile) 2>&5
7541 ac_status=$?
7542 echo "$as_me:7542: \$? = $ac_status" >&5
7543 (exit "$ac_status"); } &&
7544 { ac_try='test -s "conftest.$ac_objext"'
7545 { (eval echo "$as_me:7545: \"$ac_try\"") >&5
7546 (eval $ac_try) 2>&5
7547 ac_status=$?
7548 echo "$as_me:7548: \$? = $ac_status" >&5
7549 (exit "$ac_status"); }; }; then
7550 cf_cv_default_source=no
7551 else
7552 echo "$as_me: failed program was:" >&5
7553 cat "conftest.$ac_ext" >&5
7554 cf_cv_default_source=yes
7555 fi
7556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7557
7558 fi
7559 echo "$as_me:7559: result: $cf_cv_default_source" >&5
7560 echo "${ECHO_T}$cf_cv_default_source" >&6
7561 if test "$cf_cv_default_source" = yes
7562 then
7563
7564 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7565 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
7566
7567 fi
7568 fi
7569 fi
7570
7571 fi
7572
7573 ;;
7574 linux*musl)
7575 cf_xopen_source="-D_BSD_SOURCE"
7576 ;;
7577 (minix*)
7578 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7579 ;;
7580 (mirbsd*)
7581 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7582 cf_XOPEN_SOURCE=
7583
7584 if test "$cf_cv_posix_visible" = no; then
7585
7586 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7587
7588 cf_save_CFLAGS="$CFLAGS"
7589 cf_save_CPPFLAGS="$CPPFLAGS"
7590
7591 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7592 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7593 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
7594
7595 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7596 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7597 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
7598
7599 echo "$as_me:7599: checking if we should define _POSIX_C_SOURCE" >&5
7600 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7601 if test "${cf_cv_posix_c_source+set}" = set; then
7602 echo $ECHO_N "(cached) $ECHO_C" >&6
7603 else
7604
7605 echo "${as_me:-configure}:7605: testing if the symbol is already defined go no further ..." 1>&5
7606
7607 cat >"conftest.$ac_ext" <<_ACEOF
7608 #line 7608 "configure"
7609 #include "confdefs.h"
7610 #include <sys/types.h>
7611 int
7612 main (void)
7613 {
7614
7615 #ifndef _POSIX_C_SOURCE
7616 #error _POSIX_C_SOURCE is not defined
7617 #endif
7618 ;
7619 return 0;
7620 }
7621 _ACEOF
7622 rm -f "conftest.$ac_objext"
7623 if { (eval echo "$as_me:7623: \"$ac_compile\"") >&5
7624 (eval $ac_compile) 2>&5
7625 ac_status=$?
7626 echo "$as_me:7626: \$? = $ac_status" >&5
7627 (exit "$ac_status"); } &&
7628 { ac_try='test -s "conftest.$ac_objext"'
7629 { (eval echo "$as_me:7629: \"$ac_try\"") >&5
7630 (eval $ac_try) 2>&5
7631 ac_status=$?
7632 echo "$as_me:7632: \$? = $ac_status" >&5
7633 (exit "$ac_status"); }; }; then
7634 cf_cv_posix_c_source=no
7635 else
7636 echo "$as_me: failed program was:" >&5
7637 cat "conftest.$ac_ext" >&5
7638 cf_want_posix_source=no
7639 case .$cf_POSIX_C_SOURCE in
7640 (.[12]??*)
7641 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7642 ;;
7643 (.2)
7644 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7645 cf_want_posix_source=yes
7646 ;;
7647 (.*)
7648 cf_want_posix_source=yes
7649 ;;
7650 esac
7651 if test "$cf_want_posix_source" = yes ; then
7652 cat >"conftest.$ac_ext" <<_ACEOF
7653 #line 7653 "configure"
7654 #include "confdefs.h"
7655 #include <sys/types.h>
7656 int
7657 main (void)
7658 {
7659
7660 #ifdef _POSIX_SOURCE
7661 #error _POSIX_SOURCE is defined
7662 #endif
7663 ;
7664 return 0;
7665 }
7666 _ACEOF
7667 rm -f "conftest.$ac_objext"
7668 if { (eval echo "$as_me:7668: \"$ac_compile\"") >&5
7669 (eval $ac_compile) 2>&5
7670 ac_status=$?
7671 echo "$as_me:7671: \$? = $ac_status" >&5
7672 (exit "$ac_status"); } &&
7673 { ac_try='test -s "conftest.$ac_objext"'
7674 { (eval echo "$as_me:7674: \"$ac_try\"") >&5
7675 (eval $ac_try) 2>&5
7676 ac_status=$?
7677 echo "$as_me:7677: \$? = $ac_status" >&5
7678 (exit "$ac_status"); }; }; then
7679 :
7680 else
7681 echo "$as_me: failed program was:" >&5
7682 cat "conftest.$ac_ext" >&5
7683 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7684 fi
7685 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7686 fi
7687
7688 echo "${as_me:-configure}:7688: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7689
7690 CFLAGS="$cf_trim_CFLAGS"
7691 CPPFLAGS="$cf_trim_CPPFLAGS"
7692
7693 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7694 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
7695
7696 echo "${as_me:-configure}:7696: testing if the second compile does not leave our definition intact error ..." 1>&5
7697
7698 cat >"conftest.$ac_ext" <<_ACEOF
7699 #line 7699 "configure"
7700 #include "confdefs.h"
7701 #include <sys/types.h>
7702 int
7703 main (void)
7704 {
7705
7706 #ifndef _POSIX_C_SOURCE
7707 #error _POSIX_C_SOURCE is not defined
7708 #endif
7709 ;
7710 return 0;
7711 }
7712 _ACEOF
7713 rm -f "conftest.$ac_objext"
7714 if { (eval echo "$as_me:7714: \"$ac_compile\"") >&5
7715 (eval $ac_compile) 2>&5
7716 ac_status=$?
7717 echo "$as_me:7717: \$? = $ac_status" >&5
7718 (exit "$ac_status"); } &&
7719 { ac_try='test -s "conftest.$ac_objext"'
7720 { (eval echo "$as_me:7720: \"$ac_try\"") >&5
7721 (eval $ac_try) 2>&5
7722 ac_status=$?
7723 echo "$as_me:7723: \$? = $ac_status" >&5
7724 (exit "$ac_status"); }; }; then
7725 :
7726 else
7727 echo "$as_me: failed program was:" >&5
7728 cat "conftest.$ac_ext" >&5
7729 cf_cv_posix_c_source=no
7730 fi
7731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7732 CFLAGS="$cf_save_CFLAGS"
7733 CPPFLAGS="$cf_save_CPPFLAGS"
7734
7735 fi
7736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7737
7738 fi
7739 echo "$as_me:7739: result: $cf_cv_posix_c_source" >&5
7740 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7741
7742 if test "$cf_cv_posix_c_source" != no ; then
7743 CFLAGS="$cf_trim_CFLAGS"
7744 CPPFLAGS="$cf_trim_CPPFLAGS"
7745
7746 cf_fix_cppflags=no
7747 cf_new_cflags=
7748 cf_new_cppflags=
7749 cf_new_extra_cppflags=
7750
7751 for cf_add_cflags in $cf_cv_posix_c_source
7752 do
7753 case "$cf_fix_cppflags" in
7754 (no)
7755 case "$cf_add_cflags" in
7756 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7757 case "$cf_add_cflags" in
7758 (-D*)
7759 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7760
7761 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7762 && test -z "${cf_tst_cflags}" \
7763 && cf_fix_cppflags=yes
7764
7765 if test "$cf_fix_cppflags" = yes ; then
7766
7767 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7768 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7769
7770 continue
7771 elif test "${cf_tst_cflags}" = "\"'" ; then
7772
7773 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7774 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7775
7776 continue
7777 fi
7778 ;;
7779 esac
7780 case "$CPPFLAGS" in
7781 (*$cf_add_cflags)
7782 ;;
7783 (*)
7784 case "$cf_add_cflags" in
7785 (-D*)
7786 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7787
7788 CPPFLAGS=`echo "$CPPFLAGS" | \
7789 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7790 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7791
7792 ;;
7793 esac
7794
7795 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7796 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7797
7798 ;;
7799 esac
7800 ;;
7801 (*)
7802
7803 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7804 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7805
7806 ;;
7807 esac
7808 ;;
7809 (yes)
7810
7811 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7812 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7813
7814 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7815
7816 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7817 && test -z "${cf_tst_cflags}" \
7818 && cf_fix_cppflags=no
7819 ;;
7820 esac
7821 done
7822
7823 if test -n "$cf_new_cflags" ; then
7824
7825 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7826 CFLAGS="${CFLAGS}$cf_new_cflags"
7827
7828 fi
7829
7830 if test -n "$cf_new_cppflags" ; then
7831
7832 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7833 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7834
7835 fi
7836
7837 if test -n "$cf_new_extra_cppflags" ; then
7838
7839 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7840 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7841
7842 fi
7843
7844 fi
7845
7846 fi # cf_cv_posix_visible
7847
7848 ;;
7849 (netbsd*)
7850 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7851 ;;
7852 (openbsd[6-9]*)
7853 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
7854 # see https://www.mail-archive.com/[email protected]/msg13200.html
7855 # Abusing the conformance level is a workaround.
7856 { echo "$as_me:7856: WARNING: this system does not provide usable locale support" >&5
7857 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
7858 cf_xopen_source="-D_BSD_SOURCE"
7859 cf_XOPEN_SOURCE=700
7860 ;;
7861 (openbsd[4-5]*)
7862 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7863 cf_xopen_source="-D_BSD_SOURCE"
7864 cf_XOPEN_SOURCE=600
7865 ;;
7866 (openbsd*)
7867 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7868 ;;
7869 (osf[45]*)
7870 cf_xopen_source="-D_OSF_SOURCE"
7871 ;;
7872 (nto-qnx*)
7873 cf_xopen_source="-D_QNX_SOURCE"
7874 ;;
7875 (sco*)
7876 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7877 ;;
7878 (solaris2.*)
7879 cf_xopen_source="-D__EXTENSIONS__"
7880 cf_cv_xopen_source=broken
7881 ;;
7882 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
7883 cf_XOPEN_SOURCE=
7884 cf_POSIX_C_SOURCE=
7885 ;;
7886 (*)
7887
7888 echo "$as_me:7888: checking if we should define _XOPEN_SOURCE" >&5
7889 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7890 if test "${cf_cv_xopen_source+set}" = set; then
7891 echo $ECHO_N "(cached) $ECHO_C" >&6
7892 else
7893
7894 cat >"conftest.$ac_ext" <<_ACEOF
7895 #line 7895 "configure"
7896 #include "confdefs.h"
7897
7898 $ac_includes_default
7899
7900 int
7901 main (void)
7902 {
7903
7904 #ifndef _XOPEN_SOURCE
7905 #error _XOPEN_SOURCE is not defined
7906 #endif
7907
7908 ;
7909 return 0;
7910 }
7911 _ACEOF
7912 rm -f "conftest.$ac_objext"
7913 if { (eval echo "$as_me:7913: \"$ac_compile\"") >&5
7914 (eval $ac_compile) 2>&5
7915 ac_status=$?
7916 echo "$as_me:7916: \$? = $ac_status" >&5
7917 (exit "$ac_status"); } &&
7918 { ac_try='test -s "conftest.$ac_objext"'
7919 { (eval echo "$as_me:7919: \"$ac_try\"") >&5
7920 (eval $ac_try) 2>&5
7921 ac_status=$?
7922 echo "$as_me:7922: \$? = $ac_status" >&5
7923 (exit "$ac_status"); }; }; then
7924 cf_cv_xopen_source=no
7925 else
7926 echo "$as_me: failed program was:" >&5
7927 cat "conftest.$ac_ext" >&5
7928 cf_save="$CPPFLAGS"
7929
7930 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7931 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7932
7933 cat >"conftest.$ac_ext" <<_ACEOF
7934 #line 7934 "configure"
7935 #include "confdefs.h"
7936
7937 $ac_includes_default
7938
7939 int
7940 main (void)
7941 {
7942
7943 #ifndef _XOPEN_SOURCE
7944 #error _XOPEN_SOURCE is not defined
7945 #endif
7946
7947 ;
7948 return 0;
7949 }
7950 _ACEOF
7951 rm -f "conftest.$ac_objext"
7952 if { (eval echo "$as_me:7952: \"$ac_compile\"") >&5
7953 (eval $ac_compile) 2>&5
7954 ac_status=$?
7955 echo "$as_me:7955: \$? = $ac_status" >&5
7956 (exit "$ac_status"); } &&
7957 { ac_try='test -s "conftest.$ac_objext"'
7958 { (eval echo "$as_me:7958: \"$ac_try\"") >&5
7959 (eval $ac_try) 2>&5
7960 ac_status=$?
7961 echo "$as_me:7961: \$? = $ac_status" >&5
7962 (exit "$ac_status"); }; }; then
7963 cf_cv_xopen_source=no
7964 else
7965 echo "$as_me: failed program was:" >&5
7966 cat "conftest.$ac_ext" >&5
7967 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7968 fi
7969 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7970 CPPFLAGS="$cf_save"
7971
7972 fi
7973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7974
7975 fi
7976 echo "$as_me:7976: result: $cf_cv_xopen_source" >&5
7977 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7978
7979 if test "$cf_cv_xopen_source" != no ; then
7980
7981 CFLAGS=`echo "$CFLAGS" | \
7982 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7983 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
7984
7985 CPPFLAGS=`echo "$CPPFLAGS" | \
7986 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
7987 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
7988
7989 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7990
7991 for cf_add_cflags in $cf_temp_xopen_source
7992 do
7993 case "x$cf_add_cflags" in
7994 (x-[DU]*)
7995
7996 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7997 while true
7998 do
7999 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'`
8000 test "$CFLAGS" != "$cf_old_cflag" || break
8001
8002 CFLAGS="$cf_old_cflag"
8003 done
8004
8005 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8006 while true
8007 do
8008 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'`
8009 test "$CPPFLAGS" != "$cf_old_cflag" || break
8010
8011 CPPFLAGS="$cf_old_cflag"
8012 done
8013
8014 ;;
8015 esac
8016
8017 cf_fix_cppflags=no
8018 cf_new_cflags=
8019 cf_new_cppflags=
8020 cf_new_extra_cppflags=
8021
8022 for cf_add_cflags in $cf_add_cflags
8023 do
8024 case "$cf_fix_cppflags" in
8025 (no)
8026 case "$cf_add_cflags" in
8027 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8028 case "$cf_add_cflags" in
8029 (-D*)
8030 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8031
8032 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8033 && test -z "${cf_tst_cflags}" \
8034 && cf_fix_cppflags=yes
8035
8036 if test "$cf_fix_cppflags" = yes ; then
8037
8038 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8039 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8040
8041 continue
8042 elif test "${cf_tst_cflags}" = "\"'" ; then
8043
8044 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8045 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8046
8047 continue
8048 fi
8049 ;;
8050 esac
8051 case "$CPPFLAGS" in
8052 (*$cf_add_cflags)
8053 ;;
8054 (*)
8055 case "$cf_add_cflags" in
8056 (-D*)
8057 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8058
8059 CPPFLAGS=`echo "$CPPFLAGS" | \
8060 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8061 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8062
8063 ;;
8064 esac
8065
8066 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8067 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8068
8069 ;;
8070 esac
8071 ;;
8072 (*)
8073
8074 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8075 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8076
8077 ;;
8078 esac
8079 ;;
8080 (yes)
8081
8082 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8083 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8084
8085 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8086
8087 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8088 && test -z "${cf_tst_cflags}" \
8089 && cf_fix_cppflags=no
8090 ;;
8091 esac
8092 done
8093
8094 if test -n "$cf_new_cflags" ; then
8095
8096 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8097 CFLAGS="${CFLAGS}$cf_new_cflags"
8098
8099 fi
8100
8101 if test -n "$cf_new_cppflags" ; then
8102
8103 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8104 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8105
8106 fi
8107
8108 if test -n "$cf_new_extra_cppflags" ; then
8109
8110 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8111 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8112
8113 fi
8114
8115 done
8116
8117 fi
8118
8119 cf_save_xopen_cppflags="$CPPFLAGS"
8120
8121 if test "$cf_cv_posix_visible" = no; then
8122
8123 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8124
8125 cf_save_CFLAGS="$CFLAGS"
8126 cf_save_CPPFLAGS="$CPPFLAGS"
8127
8128 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8129 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8130 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
8131
8132 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8133 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8134 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
8135
8136 echo "$as_me:8136: checking if we should define _POSIX_C_SOURCE" >&5
8137 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8138 if test "${cf_cv_posix_c_source+set}" = set; then
8139 echo $ECHO_N "(cached) $ECHO_C" >&6
8140 else
8141
8142 echo "${as_me:-configure}:8142: testing if the symbol is already defined go no further ..." 1>&5
8143
8144 cat >"conftest.$ac_ext" <<_ACEOF
8145 #line 8145 "configure"
8146 #include "confdefs.h"
8147 #include <sys/types.h>
8148 int
8149 main (void)
8150 {
8151
8152 #ifndef _POSIX_C_SOURCE
8153 #error _POSIX_C_SOURCE is not defined
8154 #endif
8155 ;
8156 return 0;
8157 }
8158 _ACEOF
8159 rm -f "conftest.$ac_objext"
8160 if { (eval echo "$as_me:8160: \"$ac_compile\"") >&5
8161 (eval $ac_compile) 2>&5
8162 ac_status=$?
8163 echo "$as_me:8163: \$? = $ac_status" >&5
8164 (exit "$ac_status"); } &&
8165 { ac_try='test -s "conftest.$ac_objext"'
8166 { (eval echo "$as_me:8166: \"$ac_try\"") >&5
8167 (eval $ac_try) 2>&5
8168 ac_status=$?
8169 echo "$as_me:8169: \$? = $ac_status" >&5
8170 (exit "$ac_status"); }; }; then
8171 cf_cv_posix_c_source=no
8172 else
8173 echo "$as_me: failed program was:" >&5
8174 cat "conftest.$ac_ext" >&5
8175 cf_want_posix_source=no
8176 case .$cf_POSIX_C_SOURCE in
8177 (.[12]??*)
8178 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8179 ;;
8180 (.2)
8181 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8182 cf_want_posix_source=yes
8183 ;;
8184 (.*)
8185 cf_want_posix_source=yes
8186 ;;
8187 esac
8188 if test "$cf_want_posix_source" = yes ; then
8189 cat >"conftest.$ac_ext" <<_ACEOF
8190 #line 8190 "configure"
8191 #include "confdefs.h"
8192 #include <sys/types.h>
8193 int
8194 main (void)
8195 {
8196
8197 #ifdef _POSIX_SOURCE
8198 #error _POSIX_SOURCE is defined
8199 #endif
8200 ;
8201 return 0;
8202 }
8203 _ACEOF
8204 rm -f "conftest.$ac_objext"
8205 if { (eval echo "$as_me:8205: \"$ac_compile\"") >&5
8206 (eval $ac_compile) 2>&5
8207 ac_status=$?
8208 echo "$as_me:8208: \$? = $ac_status" >&5
8209 (exit "$ac_status"); } &&
8210 { ac_try='test -s "conftest.$ac_objext"'
8211 { (eval echo "$as_me:8211: \"$ac_try\"") >&5
8212 (eval $ac_try) 2>&5
8213 ac_status=$?
8214 echo "$as_me:8214: \$? = $ac_status" >&5
8215 (exit "$ac_status"); }; }; then
8216 :
8217 else
8218 echo "$as_me: failed program was:" >&5
8219 cat "conftest.$ac_ext" >&5
8220 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8221 fi
8222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8223 fi
8224
8225 echo "${as_me:-configure}:8225: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8226
8227 CFLAGS="$cf_trim_CFLAGS"
8228 CPPFLAGS="$cf_trim_CPPFLAGS"
8229
8230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8231 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
8232
8233 echo "${as_me:-configure}:8233: testing if the second compile does not leave our definition intact error ..." 1>&5
8234
8235 cat >"conftest.$ac_ext" <<_ACEOF
8236 #line 8236 "configure"
8237 #include "confdefs.h"
8238 #include <sys/types.h>
8239 int
8240 main (void)
8241 {
8242
8243 #ifndef _POSIX_C_SOURCE
8244 #error _POSIX_C_SOURCE is not defined
8245 #endif
8246 ;
8247 return 0;
8248 }
8249 _ACEOF
8250 rm -f "conftest.$ac_objext"
8251 if { (eval echo "$as_me:8251: \"$ac_compile\"") >&5
8252 (eval $ac_compile) 2>&5
8253 ac_status=$?
8254 echo "$as_me:8254: \$? = $ac_status" >&5
8255 (exit "$ac_status"); } &&
8256 { ac_try='test -s "conftest.$ac_objext"'
8257 { (eval echo "$as_me:8257: \"$ac_try\"") >&5
8258 (eval $ac_try) 2>&5
8259 ac_status=$?
8260 echo "$as_me:8260: \$? = $ac_status" >&5
8261 (exit "$ac_status"); }; }; then
8262 :
8263 else
8264 echo "$as_me: failed program was:" >&5
8265 cat "conftest.$ac_ext" >&5
8266 cf_cv_posix_c_source=no
8267 fi
8268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8269 CFLAGS="$cf_save_CFLAGS"
8270 CPPFLAGS="$cf_save_CPPFLAGS"
8271
8272 fi
8273 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8274
8275 fi
8276 echo "$as_me:8276: result: $cf_cv_posix_c_source" >&5
8277 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8278
8279 if test "$cf_cv_posix_c_source" != no ; then
8280 CFLAGS="$cf_trim_CFLAGS"
8281 CPPFLAGS="$cf_trim_CPPFLAGS"
8282
8283 cf_fix_cppflags=no
8284 cf_new_cflags=
8285 cf_new_cppflags=
8286 cf_new_extra_cppflags=
8287
8288 for cf_add_cflags in $cf_cv_posix_c_source
8289 do
8290 case "$cf_fix_cppflags" in
8291 (no)
8292 case "$cf_add_cflags" in
8293 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8294 case "$cf_add_cflags" in
8295 (-D*)
8296 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8297
8298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8299 && test -z "${cf_tst_cflags}" \
8300 && cf_fix_cppflags=yes
8301
8302 if test "$cf_fix_cppflags" = yes ; then
8303
8304 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8305 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8306
8307 continue
8308 elif test "${cf_tst_cflags}" = "\"'" ; then
8309
8310 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8311 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8312
8313 continue
8314 fi
8315 ;;
8316 esac
8317 case "$CPPFLAGS" in
8318 (*$cf_add_cflags)
8319 ;;
8320 (*)
8321 case "$cf_add_cflags" in
8322 (-D*)
8323 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8324
8325 CPPFLAGS=`echo "$CPPFLAGS" | \
8326 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8327 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8328
8329 ;;
8330 esac
8331
8332 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8333 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8334
8335 ;;
8336 esac
8337 ;;
8338 (*)
8339
8340 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8341 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8342
8343 ;;
8344 esac
8345 ;;
8346 (yes)
8347
8348 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8349 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8350
8351 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8352
8353 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8354 && test -z "${cf_tst_cflags}" \
8355 && cf_fix_cppflags=no
8356 ;;
8357 esac
8358 done
8359
8360 if test -n "$cf_new_cflags" ; then
8361
8362 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8363 CFLAGS="${CFLAGS}$cf_new_cflags"
8364
8365 fi
8366
8367 if test -n "$cf_new_cppflags" ; then
8368
8369 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8370 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8371
8372 fi
8373
8374 if test -n "$cf_new_extra_cppflags" ; then
8375
8376 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8377 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8378
8379 fi
8380
8381 fi
8382
8383 fi # cf_cv_posix_visible
8384
8385 # Some of these niche implementations use copy/paste, double-check...
8386 if test "$cf_cv_xopen_source" = no ; then
8387 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
8388
8389 echo "${as_me:-configure}:8389: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
8390
8391 cat >"conftest.$ac_ext" <<_ACEOF
8392 #line 8392 "configure"
8393 #include "confdefs.h"
8394
8395 $ac_includes_default
8396
8397 int
8398 main (void)
8399 {
8400
8401 #ifndef _XOPEN_SOURCE
8402 #error _XOPEN_SOURCE is not defined
8403 #endif
8404
8405 ;
8406 return 0;
8407 }
8408 _ACEOF
8409 rm -f "conftest.$ac_objext"
8410 if { (eval echo "$as_me:8410: \"$ac_compile\"") >&5
8411 (eval $ac_compile) 2>&5
8412 ac_status=$?
8413 echo "$as_me:8413: \$? = $ac_status" >&5
8414 (exit "$ac_status"); } &&
8415 { ac_try='test -s "conftest.$ac_objext"'
8416 { (eval echo "$as_me:8416: \"$ac_try\"") >&5
8417 (eval $ac_try) 2>&5
8418 ac_status=$?
8419 echo "$as_me:8419: \$? = $ac_status" >&5
8420 (exit "$ac_status"); }; }; then
8421 :
8422 else
8423 echo "$as_me: failed program was:" >&5
8424 cat "conftest.$ac_ext" >&5
8425
8426 { echo "$as_me:8426: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
8427 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
8428 CPPFLAGS="$cf_save_xopen_cppflags"
8429 fi
8430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8431 fi
8432 ;;
8433 esac
8434
8435 if test -n "$cf_xopen_source" ; then
8436
8437 for cf_add_cflags in $cf_xopen_source
8438 do
8439 case "x$cf_add_cflags" in
8440 (x-[DU]*)
8441
8442 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8443 while true
8444 do
8445 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'`
8446 test "$CFLAGS" != "$cf_old_cflag" || break
8447 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
8448
8449 echo "${as_me:-configure}:8449: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
8450
8451 CFLAGS="$cf_old_cflag"
8452 done
8453
8454 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8455 while true
8456 do
8457 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'`
8458 test "$CPPFLAGS" != "$cf_old_cflag" || break
8459 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
8460
8461 echo "${as_me:-configure}:8461: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
8462
8463 CPPFLAGS="$cf_old_cflag"
8464 done
8465
8466 ;;
8467 esac
8468
8469 cf_fix_cppflags=no
8470 cf_new_cflags=
8471 cf_new_cppflags=
8472 cf_new_extra_cppflags=
8473
8474 for cf_add_cflags in $cf_add_cflags
8475 do
8476 case "$cf_fix_cppflags" in
8477 (no)
8478 case "$cf_add_cflags" in
8479 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8480 case "$cf_add_cflags" in
8481 (-D*)
8482 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8483
8484 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8485 && test -z "${cf_tst_cflags}" \
8486 && cf_fix_cppflags=yes
8487
8488 if test "$cf_fix_cppflags" = yes ; then
8489
8490 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8491 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8492
8493 continue
8494 elif test "${cf_tst_cflags}" = "\"'" ; then
8495
8496 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8497 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8498
8499 continue
8500 fi
8501 ;;
8502 esac
8503 case "$CPPFLAGS" in
8504 (*$cf_add_cflags)
8505 ;;
8506 (*)
8507 case "$cf_add_cflags" in
8508 (-D*)
8509 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8510
8511 CPPFLAGS=`echo "$CPPFLAGS" | \
8512 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8513 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8514
8515 ;;
8516 esac
8517
8518 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8519 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8520
8521 ;;
8522 esac
8523 ;;
8524 (*)
8525
8526 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8527 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8528
8529 ;;
8530 esac
8531 ;;
8532 (yes)
8533
8534 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8535 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8536
8537 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8538
8539 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8540 && test -z "${cf_tst_cflags}" \
8541 && cf_fix_cppflags=no
8542 ;;
8543 esac
8544 done
8545
8546 if test -n "$cf_new_cflags" ; then
8547 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
8548
8549 echo "${as_me:-configure}:8549: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8550
8551 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8552 CFLAGS="${CFLAGS}$cf_new_cflags"
8553
8554 fi
8555
8556 if test -n "$cf_new_cppflags" ; then
8557 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8558
8559 echo "${as_me:-configure}:8559: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8560
8561 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8562 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8563
8564 fi
8565
8566 if test -n "$cf_new_extra_cppflags" ; then
8567 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8568
8569 echo "${as_me:-configure}:8569: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8570
8571 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8572 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8573
8574 fi
8575
8576 done
8577
8578 fi
8579
8580 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8581 echo "$as_me:8581: checking if _XOPEN_SOURCE really is set" >&5
8582 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8583 cat >"conftest.$ac_ext" <<_ACEOF
8584 #line 8584 "configure"
8585 #include "confdefs.h"
8586 #include <stdlib.h>
8587 int
8588 main (void)
8589 {
8590
8591 #ifndef _XOPEN_SOURCE
8592 #error _XOPEN_SOURCE is not defined
8593 #endif
8594 ;
8595 return 0;
8596 }
8597 _ACEOF
8598 rm -f "conftest.$ac_objext"
8599 if { (eval echo "$as_me:8599: \"$ac_compile\"") >&5
8600 (eval $ac_compile) 2>&5
8601 ac_status=$?
8602 echo "$as_me:8602: \$? = $ac_status" >&5
8603 (exit "$ac_status"); } &&
8604 { ac_try='test -s "conftest.$ac_objext"'
8605 { (eval echo "$as_me:8605: \"$ac_try\"") >&5
8606 (eval $ac_try) 2>&5
8607 ac_status=$?
8608 echo "$as_me:8608: \$? = $ac_status" >&5
8609 (exit "$ac_status"); }; }; then
8610 cf_XOPEN_SOURCE_set=yes
8611 else
8612 echo "$as_me: failed program was:" >&5
8613 cat "conftest.$ac_ext" >&5
8614 cf_XOPEN_SOURCE_set=no
8615 fi
8616 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8617 echo "$as_me:8617: result: $cf_XOPEN_SOURCE_set" >&5
8618 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8619 if test "$cf_XOPEN_SOURCE_set" = yes
8620 then
8621 cat >"conftest.$ac_ext" <<_ACEOF
8622 #line 8622 "configure"
8623 #include "confdefs.h"
8624 #include <stdlib.h>
8625 int
8626 main (void)
8627 {
8628
8629 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8630 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8631 #endif
8632 ;
8633 return 0;
8634 }
8635 _ACEOF
8636 rm -f "conftest.$ac_objext"
8637 if { (eval echo "$as_me:8637: \"$ac_compile\"") >&5
8638 (eval $ac_compile) 2>&5
8639 ac_status=$?
8640 echo "$as_me:8640: \$? = $ac_status" >&5
8641 (exit "$ac_status"); } &&
8642 { ac_try='test -s "conftest.$ac_objext"'
8643 { (eval echo "$as_me:8643: \"$ac_try\"") >&5
8644 (eval $ac_try) 2>&5
8645 ac_status=$?
8646 echo "$as_me:8646: \$? = $ac_status" >&5
8647 (exit "$ac_status"); }; }; then
8648 cf_XOPEN_SOURCE_set_ok=yes
8649 else
8650 echo "$as_me: failed program was:" >&5
8651 cat "conftest.$ac_ext" >&5
8652 cf_XOPEN_SOURCE_set_ok=no
8653 fi
8654 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8655 if test "$cf_XOPEN_SOURCE_set_ok" = no
8656 then
8657 { echo "$as_me:8657: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8658 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8659 fi
8660 else
8661
8662 echo "$as_me:8662: checking if we should define _XOPEN_SOURCE" >&5
8663 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8664 if test "${cf_cv_xopen_source+set}" = set; then
8665 echo $ECHO_N "(cached) $ECHO_C" >&6
8666 else
8667
8668 cat >"conftest.$ac_ext" <<_ACEOF
8669 #line 8669 "configure"
8670 #include "confdefs.h"
8671
8672 $ac_includes_default
8673
8674 int
8675 main (void)
8676 {
8677
8678 #ifndef _XOPEN_SOURCE
8679 #error _XOPEN_SOURCE is not defined
8680 #endif
8681
8682 ;
8683 return 0;
8684 }
8685 _ACEOF
8686 rm -f "conftest.$ac_objext"
8687 if { (eval echo "$as_me:8687: \"$ac_compile\"") >&5
8688 (eval $ac_compile) 2>&5
8689 ac_status=$?
8690 echo "$as_me:8690: \$? = $ac_status" >&5
8691 (exit "$ac_status"); } &&
8692 { ac_try='test -s "conftest.$ac_objext"'
8693 { (eval echo "$as_me:8693: \"$ac_try\"") >&5
8694 (eval $ac_try) 2>&5
8695 ac_status=$?
8696 echo "$as_me:8696: \$? = $ac_status" >&5
8697 (exit "$ac_status"); }; }; then
8698 cf_cv_xopen_source=no
8699 else
8700 echo "$as_me: failed program was:" >&5
8701 cat "conftest.$ac_ext" >&5
8702 cf_save="$CPPFLAGS"
8703
8704 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8705 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8706
8707 cat >"conftest.$ac_ext" <<_ACEOF
8708 #line 8708 "configure"
8709 #include "confdefs.h"
8710
8711 $ac_includes_default
8712
8713 int
8714 main (void)
8715 {
8716
8717 #ifndef _XOPEN_SOURCE
8718 #error _XOPEN_SOURCE is not defined
8719 #endif
8720
8721 ;
8722 return 0;
8723 }
8724 _ACEOF
8725 rm -f "conftest.$ac_objext"
8726 if { (eval echo "$as_me:8726: \"$ac_compile\"") >&5
8727 (eval $ac_compile) 2>&5
8728 ac_status=$?
8729 echo "$as_me:8729: \$? = $ac_status" >&5
8730 (exit "$ac_status"); } &&
8731 { ac_try='test -s "conftest.$ac_objext"'
8732 { (eval echo "$as_me:8732: \"$ac_try\"") >&5
8733 (eval $ac_try) 2>&5
8734 ac_status=$?
8735 echo "$as_me:8735: \$? = $ac_status" >&5
8736 (exit "$ac_status"); }; }; then
8737 cf_cv_xopen_source=no
8738 else
8739 echo "$as_me: failed program was:" >&5
8740 cat "conftest.$ac_ext" >&5
8741 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8742 fi
8743 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8744 CPPFLAGS="$cf_save"
8745
8746 fi
8747 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8748
8749 fi
8750 echo "$as_me:8750: result: $cf_cv_xopen_source" >&5
8751 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8752
8753 if test "$cf_cv_xopen_source" != no ; then
8754
8755 CFLAGS=`echo "$CFLAGS" | \
8756 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8757 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8758
8759 CPPFLAGS=`echo "$CPPFLAGS" | \
8760 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
8761 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
8762
8763 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8764
8765 for cf_add_cflags in $cf_temp_xopen_source
8766 do
8767 case "x$cf_add_cflags" in
8768 (x-[DU]*)
8769
8770 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8771 while true
8772 do
8773 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'`
8774 test "$CFLAGS" != "$cf_old_cflag" || break
8775
8776 CFLAGS="$cf_old_cflag"
8777 done
8778
8779 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8780 while true
8781 do
8782 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'`
8783 test "$CPPFLAGS" != "$cf_old_cflag" || break
8784
8785 CPPFLAGS="$cf_old_cflag"
8786 done
8787
8788 ;;
8789 esac
8790
8791 cf_fix_cppflags=no
8792 cf_new_cflags=
8793 cf_new_cppflags=
8794 cf_new_extra_cppflags=
8795
8796 for cf_add_cflags in $cf_add_cflags
8797 do
8798 case "$cf_fix_cppflags" in
8799 (no)
8800 case "$cf_add_cflags" in
8801 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8802 case "$cf_add_cflags" in
8803 (-D*)
8804 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8805
8806 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8807 && test -z "${cf_tst_cflags}" \
8808 && cf_fix_cppflags=yes
8809
8810 if test "$cf_fix_cppflags" = yes ; then
8811
8812 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8813 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8814
8815 continue
8816 elif test "${cf_tst_cflags}" = "\"'" ; then
8817
8818 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8819 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8820
8821 continue
8822 fi
8823 ;;
8824 esac
8825 case "$CPPFLAGS" in
8826 (*$cf_add_cflags)
8827 ;;
8828 (*)
8829 case "$cf_add_cflags" in
8830 (-D*)
8831 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8832
8833 CPPFLAGS=`echo "$CPPFLAGS" | \
8834 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8835 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8836
8837 ;;
8838 esac
8839
8840 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8841 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8842
8843 ;;
8844 esac
8845 ;;
8846 (*)
8847
8848 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8849 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8850
8851 ;;
8852 esac
8853 ;;
8854 (yes)
8855
8856 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8857 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8858
8859 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8860
8861 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8862 && test -z "${cf_tst_cflags}" \
8863 && cf_fix_cppflags=no
8864 ;;
8865 esac
8866 done
8867
8868 if test -n "$cf_new_cflags" ; then
8869
8870 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8871 CFLAGS="${CFLAGS}$cf_new_cflags"
8872
8873 fi
8874
8875 if test -n "$cf_new_cppflags" ; then
8876
8877 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8878 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8879
8880 fi
8881
8882 if test -n "$cf_new_extra_cppflags" ; then
8883
8884 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8885 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8886
8887 fi
8888
8889 done
8890
8891 fi
8892
8893 fi
8894 fi
8895 fi # cf_cv_posix_visible
8896
8897 # Check whether --enable-largefile or --disable-largefile was given.
8898 if test "${enable_largefile+set}" = set; then
8899 enableval="$enable_largefile"
8900
8901 fi;
8902 if test "$enable_largefile" != no; then
8903
8904 echo "$as_me:8904: checking for special C compiler options needed for large files" >&5
8905 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8906 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8907 echo $ECHO_N "(cached) $ECHO_C" >&6
8908 else
8909 ac_cv_sys_largefile_CC=no
8910 if test "$GCC" != yes; then
8911 ac_save_CC=$CC
8912 while :; do
8913 # IRIX 6.2 and later do not support large files by default,
8914 # so use the C compiler's -n32 option if that helps.
8915 cat >"conftest.$ac_ext" <<_ACEOF
8916 #line 8916 "configure"
8917 #include "confdefs.h"
8918 #include <sys/types.h>
8919 /* Check that off_t can represent 2**63 - 1 correctly.
8920 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8921 since some C++ compilers masquerading as C compilers
8922 incorrectly reject 9223372036854775807. */
8923 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8924 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8925 && LARGE_OFF_T % 2147483647 == 1)
8926 ? 1 : -1];
8927 int
8928 main (void)
8929 {
8930
8931 ;
8932 return 0;
8933 }
8934 _ACEOF
8935 rm -f "conftest.$ac_objext"
8936 if { (eval echo "$as_me:8936: \"$ac_compile\"") >&5
8937 (eval $ac_compile) 2>&5
8938 ac_status=$?
8939 echo "$as_me:8939: \$? = $ac_status" >&5
8940 (exit "$ac_status"); } &&
8941 { ac_try='test -s "conftest.$ac_objext"'
8942 { (eval echo "$as_me:8942: \"$ac_try\"") >&5
8943 (eval $ac_try) 2>&5
8944 ac_status=$?
8945 echo "$as_me:8945: \$? = $ac_status" >&5
8946 (exit "$ac_status"); }; }; then
8947 break
8948 else
8949 echo "$as_me: failed program was:" >&5
8950 cat "conftest.$ac_ext" >&5
8951 fi
8952 rm -f "conftest.$ac_objext"
8953 CC="$CC -n32"
8954 rm -f "conftest.$ac_objext"
8955 if { (eval echo "$as_me:8955: \"$ac_compile\"") >&5
8956 (eval $ac_compile) 2>&5
8957 ac_status=$?
8958 echo "$as_me:8958: \$? = $ac_status" >&5
8959 (exit "$ac_status"); } &&
8960 { ac_try='test -s "conftest.$ac_objext"'
8961 { (eval echo "$as_me:8961: \"$ac_try\"") >&5
8962 (eval $ac_try) 2>&5
8963 ac_status=$?
8964 echo "$as_me:8964: \$? = $ac_status" >&5
8965 (exit "$ac_status"); }; }; then
8966 ac_cv_sys_largefile_CC=' -n32'; break
8967 else
8968 echo "$as_me: failed program was:" >&5
8969 cat "conftest.$ac_ext" >&5
8970 fi
8971 rm -f "conftest.$ac_objext"
8972 break
8973 done
8974 CC=$ac_save_CC
8975 rm -f "conftest.$ac_ext"
8976 fi
8977 fi
8978 echo "$as_me:8978: result: $ac_cv_sys_largefile_CC" >&5
8979 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8980 if test "$ac_cv_sys_largefile_CC" != no; then
8981 CC=$CC$ac_cv_sys_largefile_CC
8982 fi
8983
8984 echo "$as_me:8984: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8985 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8986 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8987 echo $ECHO_N "(cached) $ECHO_C" >&6
8988 else
8989 while :; do
8990 ac_cv_sys_file_offset_bits=no
8991 cat >"conftest.$ac_ext" <<_ACEOF
8992 #line 8992 "configure"
8993 #include "confdefs.h"
8994 #include <sys/types.h>
8995 /* Check that off_t can represent 2**63 - 1 correctly.
8996 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8997 since some C++ compilers masquerading as C compilers
8998 incorrectly reject 9223372036854775807. */
8999 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9000 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9001 && LARGE_OFF_T % 2147483647 == 1)
9002 ? 1 : -1];
9003 int
9004 main (void)
9005 {
9006
9007 ;
9008 return 0;
9009 }
9010 _ACEOF
9011 rm -f "conftest.$ac_objext"
9012 if { (eval echo "$as_me:9012: \"$ac_compile\"") >&5
9013 (eval $ac_compile) 2>&5
9014 ac_status=$?
9015 echo "$as_me:9015: \$? = $ac_status" >&5
9016 (exit "$ac_status"); } &&
9017 { ac_try='test -s "conftest.$ac_objext"'
9018 { (eval echo "$as_me:9018: \"$ac_try\"") >&5
9019 (eval $ac_try) 2>&5
9020 ac_status=$?
9021 echo "$as_me:9021: \$? = $ac_status" >&5
9022 (exit "$ac_status"); }; }; then
9023 break
9024 else
9025 echo "$as_me: failed program was:" >&5
9026 cat "conftest.$ac_ext" >&5
9027 fi
9028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9029 cat >"conftest.$ac_ext" <<_ACEOF
9030 #line 9030 "configure"
9031 #include "confdefs.h"
9032 #define _FILE_OFFSET_BITS 64
9033 #include <sys/types.h>
9034 /* Check that off_t can represent 2**63 - 1 correctly.
9035 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9036 since some C++ compilers masquerading as C compilers
9037 incorrectly reject 9223372036854775807. */
9038 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9039 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9040 && LARGE_OFF_T % 2147483647 == 1)
9041 ? 1 : -1];
9042 int
9043 main (void)
9044 {
9045
9046 ;
9047 return 0;
9048 }
9049 _ACEOF
9050 rm -f "conftest.$ac_objext"
9051 if { (eval echo "$as_me:9051: \"$ac_compile\"") >&5
9052 (eval $ac_compile) 2>&5
9053 ac_status=$?
9054 echo "$as_me:9054: \$? = $ac_status" >&5
9055 (exit "$ac_status"); } &&
9056 { ac_try='test -s "conftest.$ac_objext"'
9057 { (eval echo "$as_me:9057: \"$ac_try\"") >&5
9058 (eval $ac_try) 2>&5
9059 ac_status=$?
9060 echo "$as_me:9060: \$? = $ac_status" >&5
9061 (exit "$ac_status"); }; }; then
9062 ac_cv_sys_file_offset_bits=64; break
9063 else
9064 echo "$as_me: failed program was:" >&5
9065 cat "conftest.$ac_ext" >&5
9066 fi
9067 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9068 break
9069 done
9070 fi
9071 echo "$as_me:9071: result: $ac_cv_sys_file_offset_bits" >&5
9072 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9073 if test "$ac_cv_sys_file_offset_bits" != no; then
9074
9075 cat >>confdefs.h <<EOF
9076 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9077 EOF
9078
9079 fi
9080 rm -rf conftest*
9081 echo "$as_me:9081: checking for _LARGE_FILES value needed for large files" >&5
9082 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9083 if test "${ac_cv_sys_large_files+set}" = set; then
9084 echo $ECHO_N "(cached) $ECHO_C" >&6
9085 else
9086 while :; do
9087 ac_cv_sys_large_files=no
9088 cat >"conftest.$ac_ext" <<_ACEOF
9089 #line 9089 "configure"
9090 #include "confdefs.h"
9091 #include <sys/types.h>
9092 /* Check that off_t can represent 2**63 - 1 correctly.
9093 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9094 since some C++ compilers masquerading as C compilers
9095 incorrectly reject 9223372036854775807. */
9096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9097 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9098 && LARGE_OFF_T % 2147483647 == 1)
9099 ? 1 : -1];
9100 int
9101 main (void)
9102 {
9103
9104 ;
9105 return 0;
9106 }
9107 _ACEOF
9108 rm -f "conftest.$ac_objext"
9109 if { (eval echo "$as_me:9109: \"$ac_compile\"") >&5
9110 (eval $ac_compile) 2>&5
9111 ac_status=$?
9112 echo "$as_me:9112: \$? = $ac_status" >&5
9113 (exit "$ac_status"); } &&
9114 { ac_try='test -s "conftest.$ac_objext"'
9115 { (eval echo "$as_me:9115: \"$ac_try\"") >&5
9116 (eval $ac_try) 2>&5
9117 ac_status=$?
9118 echo "$as_me:9118: \$? = $ac_status" >&5
9119 (exit "$ac_status"); }; }; then
9120 break
9121 else
9122 echo "$as_me: failed program was:" >&5
9123 cat "conftest.$ac_ext" >&5
9124 fi
9125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9126 cat >"conftest.$ac_ext" <<_ACEOF
9127 #line 9127 "configure"
9128 #include "confdefs.h"
9129 #define _LARGE_FILES 1
9130 #include <sys/types.h>
9131 /* Check that off_t can represent 2**63 - 1 correctly.
9132 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9133 since some C++ compilers masquerading as C compilers
9134 incorrectly reject 9223372036854775807. */
9135 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9136 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9137 && LARGE_OFF_T % 2147483647 == 1)
9138 ? 1 : -1];
9139 int
9140 main (void)
9141 {
9142
9143 ;
9144 return 0;
9145 }
9146 _ACEOF
9147 rm -f "conftest.$ac_objext"
9148 if { (eval echo "$as_me:9148: \"$ac_compile\"") >&5
9149 (eval $ac_compile) 2>&5
9150 ac_status=$?
9151 echo "$as_me:9151: \$? = $ac_status" >&5
9152 (exit "$ac_status"); } &&
9153 { ac_try='test -s "conftest.$ac_objext"'
9154 { (eval echo "$as_me:9154: \"$ac_try\"") >&5
9155 (eval $ac_try) 2>&5
9156 ac_status=$?
9157 echo "$as_me:9157: \$? = $ac_status" >&5
9158 (exit "$ac_status"); }; }; then
9159 ac_cv_sys_large_files=1; break
9160 else
9161 echo "$as_me: failed program was:" >&5
9162 cat "conftest.$ac_ext" >&5
9163 fi
9164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9165 break
9166 done
9167 fi
9168 echo "$as_me:9168: result: $ac_cv_sys_large_files" >&5
9169 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9170 if test "$ac_cv_sys_large_files" != no; then
9171
9172 cat >>confdefs.h <<EOF
9173 #define _LARGE_FILES $ac_cv_sys_large_files
9174 EOF
9175
9176 fi
9177 rm -rf conftest*
9178 fi
9179
9180 if test "$enable_largefile" != no ; then
9181 echo "$as_me:9181: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9182 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9183 if test "${ac_cv_sys_largefile_source+set}" = set; then
9184 echo $ECHO_N "(cached) $ECHO_C" >&6
9185 else
9186 while :; do
9187 ac_cv_sys_largefile_source=no
9188 cat >"conftest.$ac_ext" <<_ACEOF
9189 #line 9189 "configure"
9190 #include "confdefs.h"
9191 #include <stdio.h>
9192 #include <sys/types.h>
9193 int
9194 main (void)
9195 {
9196
9197 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
9198 return my_fseeko(stdin, 0, 0);
9199 ;
9200 return 0;
9201 }
9202 _ACEOF
9203 rm -f "conftest.$ac_objext"
9204 if { (eval echo "$as_me:9204: \"$ac_compile\"") >&5
9205 (eval $ac_compile) 2>&5
9206 ac_status=$?
9207 echo "$as_me:9207: \$? = $ac_status" >&5
9208 (exit "$ac_status"); } &&
9209 { ac_try='test -s "conftest.$ac_objext"'
9210 { (eval echo "$as_me:9210: \"$ac_try\"") >&5
9211 (eval $ac_try) 2>&5
9212 ac_status=$?
9213 echo "$as_me:9213: \$? = $ac_status" >&5
9214 (exit "$ac_status"); }; }; then
9215 break
9216 else
9217 echo "$as_me: failed program was:" >&5
9218 cat "conftest.$ac_ext" >&5
9219 fi
9220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9221 cat >"conftest.$ac_ext" <<_ACEOF
9222 #line 9222 "configure"
9223 #include "confdefs.h"
9224 #define _LARGEFILE_SOURCE 1
9225 #include <stdio.h>
9226 #include <sys/types.h>
9227 int
9228 main (void)
9229 {
9230
9231 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
9232 return my_fseeko(stdin, 0, 0);
9233 ;
9234 return 0;
9235 }
9236 _ACEOF
9237 rm -f "conftest.$ac_objext"
9238 if { (eval echo "$as_me:9238: \"$ac_compile\"") >&5
9239 (eval $ac_compile) 2>&5
9240 ac_status=$?
9241 echo "$as_me:9241: \$? = $ac_status" >&5
9242 (exit "$ac_status"); } &&
9243 { ac_try='test -s "conftest.$ac_objext"'
9244 { (eval echo "$as_me:9244: \"$ac_try\"") >&5
9245 (eval $ac_try) 2>&5
9246 ac_status=$?
9247 echo "$as_me:9247: \$? = $ac_status" >&5
9248 (exit "$ac_status"); }; }; then
9249 ac_cv_sys_largefile_source=1; break
9250 else
9251 echo "$as_me: failed program was:" >&5
9252 cat "conftest.$ac_ext" >&5
9253 fi
9254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9255 break
9256 done
9257 fi
9258 echo "$as_me:9258: result: $ac_cv_sys_largefile_source" >&5
9259 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9260 if test "$ac_cv_sys_largefile_source" != no; then
9261
9262 cat >>confdefs.h <<EOF
9263 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9264 EOF
9265
9266 fi
9267 rm -rf conftest*
9268
9269 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9270 # in glibc 2.1.3, but that breaks too many other things.
9271 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9272 echo "$as_me:9272: checking for fseeko" >&5
9273 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9274 if test "${ac_cv_func_fseeko+set}" = set; then
9275 echo $ECHO_N "(cached) $ECHO_C" >&6
9276 else
9277 cat >"conftest.$ac_ext" <<_ACEOF
9278 #line 9278 "configure"
9279 #include "confdefs.h"
9280 #include <stdio.h>
9281 #include <sys/types.h>
9282 int
9283 main (void)
9284 {
9285 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
9286 return my_fseeko && my_fseeko (stdin, 0, 0);
9287 ;
9288 return 0;
9289 }
9290 _ACEOF
9291 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9292 if { (eval echo "$as_me:9292: \"$ac_link\"") >&5
9293 (eval $ac_link) 2>&5
9294 ac_status=$?
9295 echo "$as_me:9295: \$? = $ac_status" >&5
9296 (exit "$ac_status"); } &&
9297 { ac_try='test -s "conftest$ac_exeext"'
9298 { (eval echo "$as_me:9298: \"$ac_try\"") >&5
9299 (eval $ac_try) 2>&5
9300 ac_status=$?
9301 echo "$as_me:9301: \$? = $ac_status" >&5
9302 (exit "$ac_status"); }; }; then
9303 ac_cv_func_fseeko=yes
9304 else
9305 echo "$as_me: failed program was:" >&5
9306 cat "conftest.$ac_ext" >&5
9307 ac_cv_func_fseeko=no
9308 fi
9309 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9310 fi
9311 echo "$as_me:9311: result: $ac_cv_func_fseeko" >&5
9312 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9313 if test $ac_cv_func_fseeko = yes; then
9314
9315 cat >>confdefs.h <<\EOF
9316 #define HAVE_FSEEKO 1
9317 EOF
9318
9319 fi
9320
9321 # Normally we would collect these definitions in the config.h,
9322 # but (like _XOPEN_SOURCE), some environments rely on having these
9323 # defined before any of the system headers are included. Another
9324 # case comes up with C++, e.g., on AIX the compiler compiles the
9325 # header files by themselves before looking at the body files it is
9326 # told to compile. For ncurses, those header files do not include
9327 # the config.h
9328 if test "$ac_cv_sys_large_files" != no
9329 then
9330
9331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9332 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
9333
9334 fi
9335 if test "$ac_cv_sys_largefile_source" != no
9336 then
9337
9338 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9339 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
9340
9341 fi
9342 if test "$ac_cv_sys_file_offset_bits" != no
9343 then
9344
9345 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9346 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
9347
9348 fi
9349
9350 echo "$as_me:9350: checking whether to use struct dirent64" >&5
9351 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9352 if test "${cf_cv_struct_dirent64+set}" = set; then
9353 echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355
9356 cat >"conftest.$ac_ext" <<_ACEOF
9357 #line 9357 "configure"
9358 #include "confdefs.h"
9359
9360 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
9361 #include <sys/types.h>
9362 #include <dirent.h>
9363
9364 #ifndef __REDIRECT
9365 /* if transitional largefile support is setup, this is true */
9366 extern struct dirent64 * readdir(DIR *);
9367 #endif
9368
9369 int
9370 main (void)
9371 {
9372
9373 DIR *dp = opendir(".");
9374 struct dirent64 *x = readdir(dp);
9375 struct dirent *y = readdir(dp);
9376 int z = x - y;
9377 (void)z;
9378
9379 ;
9380 return 0;
9381 }
9382 _ACEOF
9383 rm -f "conftest.$ac_objext"
9384 if { (eval echo "$as_me:9384: \"$ac_compile\"") >&5
9385 (eval $ac_compile) 2>&5
9386 ac_status=$?
9387 echo "$as_me:9387: \$? = $ac_status" >&5
9388 (exit "$ac_status"); } &&
9389 { ac_try='test -s "conftest.$ac_objext"'
9390 { (eval echo "$as_me:9390: \"$ac_try\"") >&5
9391 (eval $ac_try) 2>&5
9392 ac_status=$?
9393 echo "$as_me:9393: \$? = $ac_status" >&5
9394 (exit "$ac_status"); }; }; then
9395 cf_cv_struct_dirent64=yes
9396 else
9397 echo "$as_me: failed program was:" >&5
9398 cat "conftest.$ac_ext" >&5
9399 cf_cv_struct_dirent64=no
9400 fi
9401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9402
9403 fi
9404 echo "$as_me:9404: result: $cf_cv_struct_dirent64" >&5
9405 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9406 test "$cf_cv_struct_dirent64" = yes &&
9407 cat >>confdefs.h <<\EOF
9408 #define HAVE_STRUCT_DIRENT64 1
9409 EOF
9410
9411 fi
9412
9413 echo "$as_me:9413: checking if you want to trim unneeded libraries" >&5
9414 echo $ECHO_N "checking if you want to trim unneeded libraries... $ECHO_C" >&6
9415
9416 # Check whether --enable-link-prefix or --disable-link-prefix was given.
9417 if test "${enable_link_prefix+set}" = set; then
9418 enableval="$enable_link_prefix"
9419 test "$enableval" != no && enableval=yes
9420 if test "$enableval" != "yes" ; then
9421 enable_link_prefix=no
9422 else
9423 enable_link_prefix=yes
9424 fi
9425 else
9426 enableval=yes
9427 enable_link_prefix=yes
9428
9429 fi;
9430 echo "$as_me:9430: result: $enable_link_prefix" >&5
9431 echo "${ECHO_T}$enable_link_prefix" >&6
9432 if test $enable_link_prefix = yes
9433 then
9434 LINK_PREFIX='$(SHELL) $(top_srcdir)/plink.sh'
9435 else
9436 LINK_PREFIX=
9437 fi
9438
9439 echo "$as_me:9439: checking for ANSI C header files" >&5
9440 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9441 if test "${ac_cv_header_stdc+set}" = set; then
9442 echo $ECHO_N "(cached) $ECHO_C" >&6
9443 else
9444 cat >"conftest.$ac_ext" <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447 #include <stdlib.h>
9448 #include <stdarg.h>
9449 #include <string.h>
9450 #include <float.h>
9451
9452 _ACEOF
9453 if { (eval echo "$as_me:9453: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9454 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9455 ac_status=$?
9456 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9457 rm -f conftest.er1
9458 cat conftest.err >&5
9459 echo "$as_me:9459: \$? = $ac_status" >&5
9460 (exit "$ac_status"); } >/dev/null; then
9461 if test -s conftest.err; then
9462 ac_cpp_err=$ac_c_preproc_warn_flag
9463 else
9464 ac_cpp_err=
9465 fi
9466 else
9467 ac_cpp_err=yes
9468 fi
9469 if test -z "$ac_cpp_err"; then
9470 ac_cv_header_stdc=yes
9471 else
9472 echo "$as_me: failed program was:" >&5
9473 cat "conftest.$ac_ext" >&5
9474 ac_cv_header_stdc=no
9475 fi
9476 rm -f conftest.err "conftest.$ac_ext"
9477
9478 if test $ac_cv_header_stdc = yes; then
9479 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9480 cat >"conftest.$ac_ext" <<_ACEOF
9481 #line 9481 "configure"
9482 #include "confdefs.h"
9483 #include <string.h>
9484
9485 _ACEOF
9486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9487 $EGREP "memchr" >/dev/null 2>&1; then
9488 :
9489 else
9490 ac_cv_header_stdc=no
9491 fi
9492 rm -rf conftest*
9493
9494 fi
9495
9496 if test $ac_cv_header_stdc = yes; then
9497 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9498 cat >"conftest.$ac_ext" <<_ACEOF
9499 #line 9499 "configure"
9500 #include "confdefs.h"
9501 #include <stdlib.h>
9502
9503 _ACEOF
9504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9505 $EGREP "free" >/dev/null 2>&1; then
9506 :
9507 else
9508 ac_cv_header_stdc=no
9509 fi
9510 rm -rf conftest*
9511
9512 fi
9513
9514 if test $ac_cv_header_stdc = yes; then
9515 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9516 if test "$cross_compiling" = yes; then
9517 :
9518 else
9519 cat >"conftest.$ac_ext" <<_ACEOF
9520 #line 9520 "configure"
9521 #include "confdefs.h"
9522 #include <ctype.h>
9523 #if ((' ' & 0x0FF) == 0x020)
9524 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9525 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9526 #else
9527 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9528 || ('j' <= (c) && (c) <= 'r') \
9529 || ('s' <= (c) && (c) <= 'z'))
9530 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9531 #endif
9532
9533 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9534 int
9535 main (void)
9536 {
9537 int i;
9538 for (i = 0; i < 256; i++)
9539 if (XOR (islower (i), ISLOWER (i))
9540 || toupper (i) != TOUPPER (i))
9541 $ac_main_return(2);
9542 $ac_main_return (0);
9543 }
9544 _ACEOF
9545 rm -f "conftest$ac_exeext"
9546 if { (eval echo "$as_me:9546: \"$ac_link\"") >&5
9547 (eval $ac_link) 2>&5
9548 ac_status=$?
9549 echo "$as_me:9549: \$? = $ac_status" >&5
9550 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9551 { (eval echo "$as_me:9551: \"$ac_try\"") >&5
9552 (eval $ac_try) 2>&5
9553 ac_status=$?
9554 echo "$as_me:9554: \$? = $ac_status" >&5
9555 (exit "$ac_status"); }; }; then
9556 :
9557 else
9558 echo "$as_me: program exited with status $ac_status" >&5
9559 echo "$as_me: failed program was:" >&5
9560 cat "conftest.$ac_ext" >&5
9561 ac_cv_header_stdc=no
9562 fi
9563 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9564 fi
9565 fi
9566 fi
9567 echo "$as_me:9567: result: $ac_cv_header_stdc" >&5
9568 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9569 if test $ac_cv_header_stdc = yes; then
9570
9571 cat >>confdefs.h <<\EOF
9572 #define STDC_HEADERS 1
9573 EOF
9574
9575 fi
9576
9577 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9578
9579 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9580 inttypes.h stdint.h unistd.h
9581 do
9582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9583 echo "$as_me:9583: checking for $ac_header" >&5
9584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9585 if eval "test \"\${$as_ac_Header+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 $ac_includes_default
9592 #include <$ac_header>
9593 _ACEOF
9594 rm -f "conftest.$ac_objext"
9595 if { (eval echo "$as_me:9595: \"$ac_compile\"") >&5
9596 (eval $ac_compile) 2>&5
9597 ac_status=$?
9598 echo "$as_me:9598: \$? = $ac_status" >&5
9599 (exit "$ac_status"); } &&
9600 { ac_try='test -s "conftest.$ac_objext"'
9601 { (eval echo "$as_me:9601: \"$ac_try\"") >&5
9602 (eval $ac_try) 2>&5
9603 ac_status=$?
9604 echo "$as_me:9604: \$? = $ac_status" >&5
9605 (exit "$ac_status"); }; }; then
9606 eval "$as_ac_Header=yes"
9607 else
9608 echo "$as_me: failed program was:" >&5
9609 cat "conftest.$ac_ext" >&5
9610 eval "$as_ac_Header=no"
9611 fi
9612 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9613 fi
9614 echo "$as_me:9614: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9615 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9616 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9617 cat >>confdefs.h <<EOF
9618 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9619 EOF
9620
9621 fi
9622 done
9623
9624 echo "$as_me:9624: checking whether exit is declared" >&5
9625 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
9626 if test "${ac_cv_have_decl_exit+set}" = set; then
9627 echo $ECHO_N "(cached) $ECHO_C" >&6
9628 else
9629 cat >"conftest.$ac_ext" <<_ACEOF
9630 #line 9630 "configure"
9631 #include "confdefs.h"
9632 $ac_includes_default
9633 int
9634 main (void)
9635 {
9636 #ifndef exit
9637 (void) exit;
9638 #endif
9639
9640 ;
9641 return 0;
9642 }
9643 _ACEOF
9644 rm -f "conftest.$ac_objext"
9645 if { (eval echo "$as_me:9645: \"$ac_compile\"") >&5
9646 (eval $ac_compile) 2>&5
9647 ac_status=$?
9648 echo "$as_me:9648: \$? = $ac_status" >&5
9649 (exit "$ac_status"); } &&
9650 { ac_try='test -s "conftest.$ac_objext"'
9651 { (eval echo "$as_me:9651: \"$ac_try\"") >&5
9652 (eval $ac_try) 2>&5
9653 ac_status=$?
9654 echo "$as_me:9654: \$? = $ac_status" >&5
9655 (exit "$ac_status"); }; }; then
9656 ac_cv_have_decl_exit=yes
9657 else
9658 echo "$as_me: failed program was:" >&5
9659 cat "conftest.$ac_ext" >&5
9660 ac_cv_have_decl_exit=no
9661 fi
9662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9663 fi
9664 echo "$as_me:9664: result: $ac_cv_have_decl_exit" >&5
9665 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
9666
9667 if test -z "$ALL_LINGUAS" ; then
9668 ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
9669
9670 echo "$as_me:9670: checking for PATH separator" >&5
9671 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
9672 case "$cf_cv_system_name" in
9673 (os2*) PATH_SEPARATOR=';' ;;
9674 (*) ${PATH_SEPARATOR:=':'} ;;
9675 esac
9676
9677 echo "$as_me:9677: result: $PATH_SEPARATOR" >&5
9678 echo "${ECHO_T}$PATH_SEPARATOR" >&6
9679
9680 # Extract the first word of "msginit", so it can be a program name with args.
9681
9682 set dummy msginit; ac_word=$2
9683 echo "$as_me:9683: checking for $ac_word" >&5
9684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9685 if test "${ac_cv_path_MSGINIT+set}" = set; then
9686 echo $ECHO_N "(cached) $ECHO_C" >&6
9687 else
9688 case "$MSGINIT" in
9689 ([\\/]*|?:[\\/]*)
9690 ac_cv_path_MSGINIT="$MSGINIT" # Let the user override the test with a path.
9691 ;;
9692 (*)
9693 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9694 for ac_dir in $PATH; do
9695 test -z "$ac_dir" && ac_dir=.
9696 if test -f "$ac_dir/$ac_word$ac_exeext" ; then
9697 if "$ac_dir/$ac_word" --no-translator --version /dev/null >/dev/null 2>&1; then
9698 ac_cv_path_MSGINIT="$ac_dir/$ac_word$ac_exeext"
9699 break
9700 fi
9701 fi
9702 done
9703 IFS="$ac_save_ifs"
9704 test -z "$ac_cv_path_MSGINIT" && ac_cv_path_MSGINIT=":"
9705 ;;
9706 esac
9707 fi
9708 MSGINIT="$ac_cv_path_MSGINIT"
9709 if test "$MSGINIT" != ":"; then
9710 echo "$as_me:9710: result: $MSGINIT" >&5
9711 echo "${ECHO_T}$MSGINIT" >&6
9712 else
9713 echo "$as_me:9713: result: no" >&5
9714 echo "${ECHO_T}no" >&6
9715 fi
9716
9717 if test "$MSGINIT" != ":" ; then
9718 test -n "$verbose" && echo " adding en.po" 1>&6
9719
9720 echo "${as_me:-configure}:9720: testing adding en.po ..." 1>&5
9721
9722 ALL_LINGUAS="$ALL_LINGUAS en"
9723 fi
9724 fi
9725
9726 cf_makefile=makefile
9727
9728 test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
9729
9730 # Allow override of "config.h" definition:
9731 : ${CONFIG_H:=config.h}
9732
9733 if test -z "$PACKAGE" ; then
9734 { { echo "$as_me:9734: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
9735 echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
9736 { (exit 1); exit 1; }; }
9737 fi
9738
9739 if test -z "$VERSION" ; then
9740 if test -f "$srcdir/VERSION" ; then
9741 VERSION=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
9742 else
9743 VERSION=unknown
9744 fi
9745 fi
9746
9747 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
9748 if test "${with_libiconv_prefix+set}" = set; then
9749 withval="$with_libiconv_prefix"
9750
9751 case "x$withval" in
9752 (xno|xyes|x)
9753 ;;
9754 (*)
9755
9756 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
9757 if test -d "$cf_searchpath/include" ; then
9758
9759 if test -n "$cf_searchpath/include" ; then
9760 for cf_add_incdir in $cf_searchpath/include
9761 do
9762 while test "$cf_add_incdir" != /usr/include
9763 do
9764 if test -d "$cf_add_incdir"
9765 then
9766 cf_have_incdir=no
9767 if test -n "$CFLAGS$CPPFLAGS" ; then
9768 # a loop is needed to ensure we can add subdirs of existing dirs
9769 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9770 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9771 cf_have_incdir=yes; break
9772 fi
9773 done
9774 fi
9775
9776 if test "$cf_have_incdir" = no ; then
9777 if test "$cf_add_incdir" = /usr/local/include ; then
9778 if test "$GCC" = yes
9779 then
9780 cf_save_CPPFLAGS=$CPPFLAGS
9781
9782 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9783 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9784
9785 cat >"conftest.$ac_ext" <<_ACEOF
9786 #line 9786 "configure"
9787 #include "confdefs.h"
9788 #include <stdio.h>
9789 int
9790 main (void)
9791 {
9792 printf("Hello")
9793 ;
9794 return 0;
9795 }
9796 _ACEOF
9797 rm -f "conftest.$ac_objext"
9798 if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799 (eval $ac_compile) 2>&5
9800 ac_status=$?
9801 echo "$as_me:9801: \$? = $ac_status" >&5
9802 (exit "$ac_status"); } &&
9803 { ac_try='test -s "conftest.$ac_objext"'
9804 { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805 (eval $ac_try) 2>&5
9806 ac_status=$?
9807 echo "$as_me:9807: \$? = $ac_status" >&5
9808 (exit "$ac_status"); }; }; then
9809 :
9810 else
9811 echo "$as_me: failed program was:" >&5
9812 cat "conftest.$ac_ext" >&5
9813 cf_have_incdir=yes
9814 fi
9815 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9816 CPPFLAGS=$cf_save_CPPFLAGS
9817 fi
9818 fi
9819 fi
9820
9821 if test "$cf_have_incdir" = no ; then
9822 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9823
9824 echo "${as_me:-configure}:9824: testing adding $cf_add_incdir to include-path ..." 1>&5
9825
9826 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9827
9828 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9829 test "$cf_top_incdir" = "$cf_add_incdir" && break
9830 cf_add_incdir="$cf_top_incdir"
9831 else
9832 break
9833 fi
9834 else
9835 break
9836 fi
9837 done
9838 done
9839 fi
9840
9841 elif test -d "$cf_searchpath/../include" ; then
9842
9843 if test -n "$cf_searchpath/../include" ; then
9844 for cf_add_incdir in $cf_searchpath/../include
9845 do
9846 while test "$cf_add_incdir" != /usr/include
9847 do
9848 if test -d "$cf_add_incdir"
9849 then
9850 cf_have_incdir=no
9851 if test -n "$CFLAGS$CPPFLAGS" ; then
9852 # a loop is needed to ensure we can add subdirs of existing dirs
9853 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9854 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9855 cf_have_incdir=yes; break
9856 fi
9857 done
9858 fi
9859
9860 if test "$cf_have_incdir" = no ; then
9861 if test "$cf_add_incdir" = /usr/local/include ; then
9862 if test "$GCC" = yes
9863 then
9864 cf_save_CPPFLAGS=$CPPFLAGS
9865
9866 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9867 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9868
9869 cat >"conftest.$ac_ext" <<_ACEOF
9870 #line 9870 "configure"
9871 #include "confdefs.h"
9872 #include <stdio.h>
9873 int
9874 main (void)
9875 {
9876 printf("Hello")
9877 ;
9878 return 0;
9879 }
9880 _ACEOF
9881 rm -f "conftest.$ac_objext"
9882 if { (eval echo "$as_me:9882: \"$ac_compile\"") >&5
9883 (eval $ac_compile) 2>&5
9884 ac_status=$?
9885 echo "$as_me:9885: \$? = $ac_status" >&5
9886 (exit "$ac_status"); } &&
9887 { ac_try='test -s "conftest.$ac_objext"'
9888 { (eval echo "$as_me:9888: \"$ac_try\"") >&5
9889 (eval $ac_try) 2>&5
9890 ac_status=$?
9891 echo "$as_me:9891: \$? = $ac_status" >&5
9892 (exit "$ac_status"); }; }; then
9893 :
9894 else
9895 echo "$as_me: failed program was:" >&5
9896 cat "conftest.$ac_ext" >&5
9897 cf_have_incdir=yes
9898 fi
9899 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9900 CPPFLAGS=$cf_save_CPPFLAGS
9901 fi
9902 fi
9903 fi
9904
9905 if test "$cf_have_incdir" = no ; then
9906 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9907
9908 echo "${as_me:-configure}:9908: testing adding $cf_add_incdir to include-path ..." 1>&5
9909
9910 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9911
9912 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9913 test "$cf_top_incdir" = "$cf_add_incdir" && break
9914 cf_add_incdir="$cf_top_incdir"
9915 else
9916 break
9917 fi
9918 else
9919 break
9920 fi
9921 done
9922 done
9923 fi
9924
9925 else
9926 { { echo "$as_me:9926: error: cannot find libiconv under $withval" >&5
9927 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9928 { (exit 1); exit 1; }; }
9929 fi
9930 if test -d "$cf_searchpath/lib" ; then
9931
9932 if test -n "$cf_searchpath/lib" ; then
9933 for cf_add_libdir in $cf_searchpath/lib
9934 do
9935 if test "$cf_add_libdir" = /usr/lib ; then
9936 :
9937 elif test -d "$cf_add_libdir"
9938 then
9939 cf_have_libdir=no
9940 if test -n "$LDFLAGS$LIBS" ; then
9941 # a loop is needed to ensure we can add subdirs of existing dirs
9942 for cf_test_libdir in $LDFLAGS $LIBS ; do
9943 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9944 cf_have_libdir=yes; break
9945 fi
9946 done
9947 fi
9948 if test "$cf_have_libdir" = no ; then
9949 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9950
9951 echo "${as_me:-configure}:9951: testing adding $cf_add_libdir to library-path ..." 1>&5
9952
9953 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9954 fi
9955 fi
9956 done
9957 fi
9958
9959 elif test -d "$cf_searchpath" ; then
9960
9961 if test -n "$cf_searchpath" ; then
9962 for cf_add_libdir in $cf_searchpath
9963 do
9964 if test "$cf_add_libdir" = /usr/lib ; then
9965 :
9966 elif test -d "$cf_add_libdir"
9967 then
9968 cf_have_libdir=no
9969 if test -n "$LDFLAGS$LIBS" ; then
9970 # a loop is needed to ensure we can add subdirs of existing dirs
9971 for cf_test_libdir in $LDFLAGS $LIBS ; do
9972 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9973 cf_have_libdir=yes; break
9974 fi
9975 done
9976 fi
9977 if test "$cf_have_libdir" = no ; then
9978 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9979
9980 echo "${as_me:-configure}:9980: testing adding $cf_add_libdir to library-path ..." 1>&5
9981
9982 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9983 fi
9984 fi
9985 done
9986 fi
9987
9988 else
9989 { { echo "$as_me:9989: error: cannot find libiconv under $withval" >&5
9990 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9991 { (exit 1); exit 1; }; }
9992 fi
9993 done
9994
9995 test -n "$verbose" && echo " setting path value for libiconv to $withval" 1>&6
9996
9997 echo "${as_me:-configure}:9997: testing setting path value for libiconv to $withval ..." 1>&5
9998
9999 ;;
10000 esac
10001
10002 fi;
10003
10004 echo "$as_me:10004: checking for iconv" >&5
10005 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
10006 if test "${am_cv_func_iconv+set}" = set; then
10007 echo $ECHO_N "(cached) $ECHO_C" >&6
10008 else
10009
10010 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10011 # will be set on completion of the AC_LINK_IFELSE below.
10012 cf_cv_header_path_iconv=
10013 cf_cv_library_path_iconv=
10014
10015 echo "${as_me:-configure}:10015: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
10016
10017 cf_save_LIBS="$LIBS"
10018
10019 cat >"conftest.$ac_ext" <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10022
10023 #include <stdlib.h>
10024 #include <iconv.h>
10025
10026 int
10027 main (void)
10028 {
10029
10030 iconv_t cd = iconv_open("","");
10031 iconv(cd,NULL,NULL,NULL,NULL);
10032 iconv_close(cd);
10033
10034 ;
10035 return 0;
10036 }
10037 _ACEOF
10038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10039 if { (eval echo "$as_me:10039: \"$ac_link\"") >&5
10040 (eval $ac_link) 2>&5
10041 ac_status=$?
10042 echo "$as_me:10042: \$? = $ac_status" >&5
10043 (exit "$ac_status"); } &&
10044 { ac_try='test -s "conftest$ac_exeext"'
10045 { (eval echo "$as_me:10045: \"$ac_try\"") >&5
10046 (eval $ac_try) 2>&5
10047 ac_status=$?
10048 echo "$as_me:10048: \$? = $ac_status" >&5
10049 (exit "$ac_status"); }; }; then
10050
10051 cf_cv_find_linkage_iconv=yes
10052 cf_cv_header_path_iconv=/usr/include
10053 cf_cv_library_path_iconv=/usr/lib
10054
10055 else
10056 echo "$as_me: failed program was:" >&5
10057 cat "conftest.$ac_ext" >&5
10058
10059 LIBS="-liconv $cf_save_LIBS"
10060
10061 cat >"conftest.$ac_ext" <<_ACEOF
10062 #line 10062 "configure"
10063 #include "confdefs.h"
10064
10065 #include <stdlib.h>
10066 #include <iconv.h>
10067
10068 int
10069 main (void)
10070 {
10071
10072 iconv_t cd = iconv_open("","");
10073 iconv(cd,NULL,NULL,NULL,NULL);
10074 iconv_close(cd);
10075
10076 ;
10077 return 0;
10078 }
10079 _ACEOF
10080 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10081 if { (eval echo "$as_me:10081: \"$ac_link\"") >&5
10082 (eval $ac_link) 2>&5
10083 ac_status=$?
10084 echo "$as_me:10084: \$? = $ac_status" >&5
10085 (exit "$ac_status"); } &&
10086 { ac_try='test -s "conftest$ac_exeext"'
10087 { (eval echo "$as_me:10087: \"$ac_try\"") >&5
10088 (eval $ac_try) 2>&5
10089 ac_status=$?
10090 echo "$as_me:10090: \$? = $ac_status" >&5
10091 (exit "$ac_status"); }; }; then
10092
10093 cf_cv_find_linkage_iconv=yes
10094 cf_cv_header_path_iconv=/usr/include
10095 cf_cv_library_path_iconv=/usr/lib
10096 cf_cv_library_file_iconv="-liconv"
10097
10098 else
10099 echo "$as_me: failed program was:" >&5
10100 cat "conftest.$ac_ext" >&5
10101
10102 cf_cv_find_linkage_iconv=no
10103 LIBS="$cf_save_LIBS"
10104
10105 test -n "$verbose" && echo " find linkage for iconv library" 1>&6
10106
10107 echo "${as_me:-configure}:10107: testing find linkage for iconv library ..." 1>&5
10108
10109 echo "${as_me:-configure}:10109: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
10110
10111 cf_save_CPPFLAGS="$CPPFLAGS"
10112 cf_test_CPPFLAGS="$CPPFLAGS"
10113
10114 cf_search=
10115
10116 # collect the current set of include-directories from compiler flags
10117 cf_header_path_list=""
10118 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10119 for cf_header_path in $CPPFLAGS $CFLAGS
10120 do
10121 case "$cf_header_path" in
10122 (-I*)
10123 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10124
10125 test "x$cf_header_path" != "xNONE" && \
10126 test -d "$cf_header_path" && \
10127 {
10128 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10129 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10130 test -d "$cf_header_path/include/iconv" && cf_search="$cf_search $cf_header_path/include/iconv"
10131 test -d "$cf_header_path/include/iconv/include" && cf_search="$cf_search $cf_header_path/include/iconv/include"
10132 test -d "$cf_header_path/iconv/include" && cf_search="$cf_search $cf_header_path/iconv/include"
10133 test -d "$cf_header_path/iconv/include/iconv" && cf_search="$cf_search $cf_header_path/iconv/include/iconv"
10134 }
10135
10136 cf_header_path_list="$cf_header_path_list $cf_search"
10137 ;;
10138 esac
10139 done
10140 fi
10141
10142 # add the variations for the package we are looking for
10143
10144 cf_search=
10145
10146 test "x$prefix" != "xNONE" && \
10147 test -d "$prefix" && \
10148 {
10149 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10150 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10151 test -d "$prefix/include/iconv" && cf_search="$cf_search $prefix/include/iconv"
10152 test -d "$prefix/include/iconv/include" && cf_search="$cf_search $prefix/include/iconv/include"
10153 test -d "$prefix/iconv/include" && cf_search="$cf_search $prefix/iconv/include"
10154 test -d "$prefix/iconv/include/iconv" && cf_search="$cf_search $prefix/iconv/include/iconv"
10155 }
10156
10157 for cf_subdir_prefix in \
10158 /usr \
10159 /usr/local \
10160 /usr/pkg \
10161 /opt \
10162 /opt/local \
10163 $HOME
10164 do
10165
10166 test "x$cf_subdir_prefix" != "x$prefix" && \
10167 test -d "$cf_subdir_prefix" && \
10168 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10169 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10170 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10171 test -d "$cf_subdir_prefix/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/include/iconv"
10172 test -d "$cf_subdir_prefix/include/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
10173 test -d "$cf_subdir_prefix/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/iconv/include"
10174 test -d "$cf_subdir_prefix/iconv/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
10175 }
10176
10177 done
10178
10179 test "$includedir" != NONE && \
10180 test "$includedir" != "/usr/include" && \
10181 test -d "$includedir" && {
10182 test -d "$includedir" && cf_search="$cf_search $includedir"
10183 test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
10184 }
10185
10186 test "$oldincludedir" != NONE && \
10187 test "$oldincludedir" != "/usr/include" && \
10188 test -d "$oldincludedir" && {
10189 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10190 test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
10191 }
10192
10193 cf_search="$cf_search $cf_header_path_list"
10194
10195 for cf_cv_header_path_iconv in $cf_search
10196 do
10197 if test -d "$cf_cv_header_path_iconv" ; then
10198 test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
10199
10200 echo "${as_me:-configure}:10200: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
10201
10202 CPPFLAGS="$cf_save_CPPFLAGS"
10203
10204 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10205 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
10206
10207 cat >"conftest.$ac_ext" <<_ACEOF
10208 #line 10208 "configure"
10209 #include "confdefs.h"
10210
10211 #include <stdlib.h>
10212 #include <iconv.h>
10213
10214 int
10215 main (void)
10216 {
10217
10218 iconv_t cd = iconv_open("","");
10219 iconv(cd,NULL,NULL,NULL,NULL);
10220 iconv_close(cd);
10221
10222 ;
10223 return 0;
10224 }
10225 _ACEOF
10226 rm -f "conftest.$ac_objext"
10227 if { (eval echo "$as_me:10227: \"$ac_compile\"") >&5
10228 (eval $ac_compile) 2>&5
10229 ac_status=$?
10230 echo "$as_me:10230: \$? = $ac_status" >&5
10231 (exit "$ac_status"); } &&
10232 { ac_try='test -s "conftest.$ac_objext"'
10233 { (eval echo "$as_me:10233: \"$ac_try\"") >&5
10234 (eval $ac_try) 2>&5
10235 ac_status=$?
10236 echo "$as_me:10236: \$? = $ac_status" >&5
10237 (exit "$ac_status"); }; }; then
10238
10239 test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
10240
10241 echo "${as_me:-configure}:10241: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
10242
10243 cf_cv_find_linkage_iconv=maybe
10244 cf_test_CPPFLAGS="$CPPFLAGS"
10245 break
10246 else
10247 echo "$as_me: failed program was:" >&5
10248 cat "conftest.$ac_ext" >&5
10249
10250 CPPFLAGS="$cf_save_CPPFLAGS"
10251
10252 fi
10253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10254 fi
10255 done
10256
10257 if test "$cf_cv_find_linkage_iconv" = maybe ; then
10258
10259 echo "${as_me:-configure}:10259: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
10260
10261 cf_save_LIBS="$LIBS"
10262 cf_save_LDFLAGS="$LDFLAGS"
10263
10264 if test "$cf_cv_find_linkage_iconv" != yes ; then
10265
10266 cf_search=
10267 cf_library_path_list=""
10268 if test -n "${LDFLAGS}${LIBS}" ; then
10269 for cf_library_path in $LDFLAGS $LIBS
10270 do
10271 case "$cf_library_path" in
10272 (-L*)
10273 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10274
10275 test "x$cf_library_path" != "xNONE" && \
10276 test -d "$cf_library_path" && \
10277 {
10278 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10279 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10280 test -d "$cf_library_path/lib/iconv" && cf_search="$cf_search $cf_library_path/lib/iconv"
10281 test -d "$cf_library_path/lib/iconv/lib" && cf_search="$cf_search $cf_library_path/lib/iconv/lib"
10282 test -d "$cf_library_path/iconv/lib" && cf_search="$cf_search $cf_library_path/iconv/lib"
10283 test -d "$cf_library_path/iconv/lib/iconv" && cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
10284 }
10285
10286 cf_library_path_list="$cf_library_path_list $cf_search"
10287 ;;
10288 esac
10289 done
10290 fi
10291
10292 cf_search=
10293
10294 test "x$prefix" != "xNONE" && \
10295 test -d "$prefix" && \
10296 {
10297 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10298 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10299 test -d "$prefix/lib/iconv" && cf_search="$cf_search $prefix/lib/iconv"
10300 test -d "$prefix/lib/iconv/lib" && cf_search="$cf_search $prefix/lib/iconv/lib"
10301 test -d "$prefix/iconv/lib" && cf_search="$cf_search $prefix/iconv/lib"
10302 test -d "$prefix/iconv/lib/iconv" && cf_search="$cf_search $prefix/iconv/lib/iconv"
10303 }
10304
10305 for cf_subdir_prefix in \
10306 /usr \
10307 /usr/local \
10308 /usr/pkg \
10309 /opt \
10310 /opt/local \
10311 $HOME
10312 do
10313
10314 test "x$cf_subdir_prefix" != "x$prefix" && \
10315 test -d "$cf_subdir_prefix" && \
10316 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10317 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10318 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10319 test -d "$cf_subdir_prefix/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
10320 test -d "$cf_subdir_prefix/lib/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
10321 test -d "$cf_subdir_prefix/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
10322 test -d "$cf_subdir_prefix/iconv/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
10323 }
10324
10325 done
10326
10327 cf_search="$cf_library_path_list $cf_search"
10328
10329 for cf_cv_library_path_iconv in $cf_search
10330 do
10331 if test -d "$cf_cv_library_path_iconv" ; then
10332 test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
10333
10334 echo "${as_me:-configure}:10334: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
10335
10336 CPPFLAGS="$cf_test_CPPFLAGS"
10337 LIBS="-liconv $cf_save_LIBS"
10338 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
10339 cat >"conftest.$ac_ext" <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342
10343 #include <stdlib.h>
10344 #include <iconv.h>
10345
10346 int
10347 main (void)
10348 {
10349
10350 iconv_t cd = iconv_open("","");
10351 iconv(cd,NULL,NULL,NULL,NULL);
10352 iconv_close(cd);
10353
10354 ;
10355 return 0;
10356 }
10357 _ACEOF
10358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10359 if { (eval echo "$as_me:10359: \"$ac_link\"") >&5
10360 (eval $ac_link) 2>&5
10361 ac_status=$?
10362 echo "$as_me:10362: \$? = $ac_status" >&5
10363 (exit "$ac_status"); } &&
10364 { ac_try='test -s "conftest$ac_exeext"'
10365 { (eval echo "$as_me:10365: \"$ac_try\"") >&5
10366 (eval $ac_try) 2>&5
10367 ac_status=$?
10368 echo "$as_me:10368: \$? = $ac_status" >&5
10369 (exit "$ac_status"); }; }; then
10370
10371 test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
10372
10373 echo "${as_me:-configure}:10373: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
10374
10375 cf_cv_find_linkage_iconv=yes
10376 cf_cv_library_file_iconv="-liconv"
10377 break
10378 else
10379 echo "$as_me: failed program was:" >&5
10380 cat "conftest.$ac_ext" >&5
10381
10382 CPPFLAGS="$cf_save_CPPFLAGS"
10383 LIBS="$cf_save_LIBS"
10384 LDFLAGS="$cf_save_LDFLAGS"
10385
10386 fi
10387 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10388 fi
10389 done
10390 CPPFLAGS="$cf_save_CPPFLAGS"
10391 LDFLAGS="$cf_save_LDFLAGS"
10392 fi
10393
10394 else
10395 cf_cv_find_linkage_iconv=no
10396 fi
10397
10398 fi
10399 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10400
10401 fi
10402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10403
10404 LIBS="$cf_save_LIBS"
10405
10406 if test "$cf_cv_find_linkage_iconv" = yes ; then
10407 am_cv_func_iconv=yes
10408 else
10409 am_cv_func_iconv="no, consider installing GNU libiconv"
10410 fi
10411
10412 fi
10413 echo "$as_me:10413: result: $am_cv_func_iconv" >&5
10414 echo "${ECHO_T}$am_cv_func_iconv" >&6
10415
10416 if test "$am_cv_func_iconv" = yes; then
10417
10418 cat >>confdefs.h <<\EOF
10419 #define HAVE_ICONV 1
10420 EOF
10421
10422 echo "$as_me:10422: checking if the declaration of iconv() needs const." >&5
10423 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
10424 if test "${am_cv_proto_iconv_const+set}" = set; then
10425 echo $ECHO_N "(cached) $ECHO_C" >&6
10426 else
10427
10428 cat >"conftest.$ac_ext" <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431
10432 #include <stdlib.h>
10433 #include <iconv.h>
10434
10435 extern
10436 #ifdef __cplusplus
10437 "C"
10438 #endif
10439 #if defined(__STDC__) || defined(__cplusplus)
10440 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10441 #else
10442 size_t iconv();
10443 #endif
10444
10445 int
10446 main (void)
10447 {
10448
10449 ;
10450 return 0;
10451 }
10452 _ACEOF
10453 rm -f "conftest.$ac_objext"
10454 if { (eval echo "$as_me:10454: \"$ac_compile\"") >&5
10455 (eval $ac_compile) 2>&5
10456 ac_status=$?
10457 echo "$as_me:10457: \$? = $ac_status" >&5
10458 (exit "$ac_status"); } &&
10459 { ac_try='test -s "conftest.$ac_objext"'
10460 { (eval echo "$as_me:10460: \"$ac_try\"") >&5
10461 (eval $ac_try) 2>&5
10462 ac_status=$?
10463 echo "$as_me:10463: \$? = $ac_status" >&5
10464 (exit "$ac_status"); }; }; then
10465 am_cv_proto_iconv_const=no
10466 else
10467 echo "$as_me: failed program was:" >&5
10468 cat "conftest.$ac_ext" >&5
10469 am_cv_proto_iconv_const=yes
10470 fi
10471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10472 fi
10473 echo "$as_me:10473: result: $am_cv_proto_iconv_const" >&5
10474 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
10475
10476 if test "$am_cv_proto_iconv_const" = yes ; then
10477 am_cv_proto_iconv_arg1="const"
10478 else
10479 am_cv_proto_iconv_arg1="/* nothing */"
10480 fi
10481
10482 cat >>confdefs.h <<EOF
10483 #define ICONV_CONST $am_cv_proto_iconv_arg1
10484 EOF
10485
10486 fi
10487
10488 LIBICONV=
10489 if test "$cf_cv_find_linkage_iconv" = yes; then
10490
10491 if test -n "$cf_cv_header_path_iconv" ; then
10492 for cf_add_incdir in $cf_cv_header_path_iconv
10493 do
10494 while test "$cf_add_incdir" != /usr/include
10495 do
10496 if test -d "$cf_add_incdir"
10497 then
10498 cf_have_incdir=no
10499 if test -n "$CFLAGS$CPPFLAGS" ; then
10500 # a loop is needed to ensure we can add subdirs of existing dirs
10501 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10502 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10503 cf_have_incdir=yes; break
10504 fi
10505 done
10506 fi
10507
10508 if test "$cf_have_incdir" = no ; then
10509 if test "$cf_add_incdir" = /usr/local/include ; then
10510 if test "$GCC" = yes
10511 then
10512 cf_save_CPPFLAGS=$CPPFLAGS
10513
10514 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10515 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10516
10517 cat >"conftest.$ac_ext" <<_ACEOF
10518 #line 10518 "configure"
10519 #include "confdefs.h"
10520 #include <stdio.h>
10521 int
10522 main (void)
10523 {
10524 printf("Hello")
10525 ;
10526 return 0;
10527 }
10528 _ACEOF
10529 rm -f "conftest.$ac_objext"
10530 if { (eval echo "$as_me:10530: \"$ac_compile\"") >&5
10531 (eval $ac_compile) 2>&5
10532 ac_status=$?
10533 echo "$as_me:10533: \$? = $ac_status" >&5
10534 (exit "$ac_status"); } &&
10535 { ac_try='test -s "conftest.$ac_objext"'
10536 { (eval echo "$as_me:10536: \"$ac_try\"") >&5
10537 (eval $ac_try) 2>&5
10538 ac_status=$?
10539 echo "$as_me:10539: \$? = $ac_status" >&5
10540 (exit "$ac_status"); }; }; then
10541 :
10542 else
10543 echo "$as_me: failed program was:" >&5
10544 cat "conftest.$ac_ext" >&5
10545 cf_have_incdir=yes
10546 fi
10547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10548 CPPFLAGS=$cf_save_CPPFLAGS
10549 fi
10550 fi
10551 fi
10552
10553 if test "$cf_have_incdir" = no ; then
10554 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10555
10556 echo "${as_me:-configure}:10556: testing adding $cf_add_incdir to include-path ..." 1>&5
10557
10558 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10559
10560 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10561 test "$cf_top_incdir" = "$cf_add_incdir" && break
10562 cf_add_incdir="$cf_top_incdir"
10563 else
10564 break
10565 fi
10566 else
10567 break
10568 fi
10569 done
10570 done
10571 fi
10572
10573 if test -n "$cf_cv_library_file_iconv" ; then
10574 LIBICONV="-liconv"
10575
10576 if test -n "$cf_cv_library_path_iconv" ; then
10577 for cf_add_libdir in $cf_cv_library_path_iconv
10578 do
10579 if test "$cf_add_libdir" = /usr/lib ; then
10580 :
10581 elif test -d "$cf_add_libdir"
10582 then
10583 cf_have_libdir=no
10584 if test -n "$LDFLAGS$LIBS" ; then
10585 # a loop is needed to ensure we can add subdirs of existing dirs
10586 for cf_test_libdir in $LDFLAGS $LIBS ; do
10587 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10588 cf_have_libdir=yes; break
10589 fi
10590 done
10591 fi
10592 if test "$cf_have_libdir" = no ; then
10593 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
10594
10595 echo "${as_me:-configure}:10595: testing adding $cf_add_libdir to library-path ..." 1>&5
10596
10597 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10598 fi
10599 fi
10600 done
10601 fi
10602
10603 fi
10604 fi
10605
10606 echo "$as_me:10606: checking for nl_langinfo and CODESET" >&5
10607 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10608 if test "${am_cv_langinfo_codeset+set}" = set; then
10609 echo $ECHO_N "(cached) $ECHO_C" >&6
10610 else
10611 cat >"conftest.$ac_ext" <<_ACEOF
10612 #line 10612 "configure"
10613 #include "confdefs.h"
10614
10615 $ac_includes_default
10616 #include <langinfo.h>
10617 int
10618 main (void)
10619 {
10620 char* cs = nl_langinfo(CODESET); (void)cs
10621 ;
10622 return 0;
10623 }
10624 _ACEOF
10625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10626 if { (eval echo "$as_me:10626: \"$ac_link\"") >&5
10627 (eval $ac_link) 2>&5
10628 ac_status=$?
10629 echo "$as_me:10629: \$? = $ac_status" >&5
10630 (exit "$ac_status"); } &&
10631 { ac_try='test -s "conftest$ac_exeext"'
10632 { (eval echo "$as_me:10632: \"$ac_try\"") >&5
10633 (eval $ac_try) 2>&5
10634 ac_status=$?
10635 echo "$as_me:10635: \$? = $ac_status" >&5
10636 (exit "$ac_status"); }; }; then
10637 am_cv_langinfo_codeset=yes
10638 else
10639 echo "$as_me: failed program was:" >&5
10640 cat "conftest.$ac_ext" >&5
10641 am_cv_langinfo_codeset=no
10642 fi
10643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10644
10645 fi
10646 echo "$as_me:10646: result: $am_cv_langinfo_codeset" >&5
10647 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10648 if test "$am_cv_langinfo_codeset" = yes; then
10649
10650 cat >>confdefs.h <<\EOF
10651 #define HAVE_LANGINFO_CODESET 1
10652 EOF
10653
10654 fi
10655
10656 if test "$ac_cv_header_locale_h" = yes; then
10657 echo "$as_me:10657: checking for LC_MESSAGES" >&5
10658 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
10659 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
10660 echo $ECHO_N "(cached) $ECHO_C" >&6
10661 else
10662 cat >"conftest.$ac_ext" <<_ACEOF
10663 #line 10663 "configure"
10664 #include "confdefs.h"
10665 #include <locale.h>
10666 int
10667 main (void)
10668 {
10669 return LC_MESSAGES
10670 ;
10671 return 0;
10672 }
10673 _ACEOF
10674 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10675 if { (eval echo "$as_me:10675: \"$ac_link\"") >&5
10676 (eval $ac_link) 2>&5
10677 ac_status=$?
10678 echo "$as_me:10678: \$? = $ac_status" >&5
10679 (exit "$ac_status"); } &&
10680 { ac_try='test -s "conftest$ac_exeext"'
10681 { (eval echo "$as_me:10681: \"$ac_try\"") >&5
10682 (eval $ac_try) 2>&5
10683 ac_status=$?
10684 echo "$as_me:10684: \$? = $ac_status" >&5
10685 (exit "$ac_status"); }; }; then
10686 am_cv_val_LC_MESSAGES=yes
10687 else
10688 echo "$as_me: failed program was:" >&5
10689 cat "conftest.$ac_ext" >&5
10690 am_cv_val_LC_MESSAGES=no
10691 fi
10692 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10693 fi
10694 echo "$as_me:10694: result: $am_cv_val_LC_MESSAGES" >&5
10695 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
10696 if test "$am_cv_val_LC_MESSAGES" = yes; then
10697
10698 cat >>confdefs.h <<\EOF
10699 #define HAVE_LC_MESSAGES 1
10700 EOF
10701
10702 fi
10703 fi
10704 echo "$as_me:10704: checking whether NLS is requested" >&5
10705 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
10706
10707 # Check whether --enable-nls or --disable-nls was given.
10708 if test "${enable_nls+set}" = set; then
10709 enableval="$enable_nls"
10710 USE_NLS=$enableval
10711 else
10712 USE_NLS=no
10713 fi;
10714 echo "$as_me:10714: result: $USE_NLS" >&5
10715 echo "${ECHO_T}$USE_NLS" >&6
10716
10717 if test "$USE_NLS" = "yes"; then
10718
10719 # Extract the first word of "msgfmt", so it can be a program name with args.
10720
10721 set dummy msgfmt; ac_word=$2
10722 echo "$as_me:10722: checking for $ac_word" >&5
10723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10724 if test "${ac_cv_path_MSGFMT+set}" = set; then
10725 echo $ECHO_N "(cached) $ECHO_C" >&6
10726 else
10727 case "$MSGFMT" in
10728 ([\\/]*|?:[\\/]*)
10729 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10730 ;;
10731 (*)
10732 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10733 for ac_dir in $PATH; do
10734 test -z "$ac_dir" && ac_dir=.
10735 if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10736 if "$ac_dir/$ac_word" --statistics /dev/null >/dev/null 2>&1; then
10737 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
10738 break
10739 fi
10740 fi
10741 done
10742 IFS="$ac_save_ifs"
10743 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
10744 ;;
10745 esac
10746 fi
10747 MSGFMT="$ac_cv_path_MSGFMT"
10748 if test "$MSGFMT" != ":"; then
10749 echo "$as_me:10749: result: $MSGFMT" >&5
10750 echo "${ECHO_T}$MSGFMT" >&6
10751 else
10752 echo "$as_me:10752: result: no" >&5
10753 echo "${ECHO_T}no" >&6
10754 fi
10755
10756 # Extract the first word of "gmsgfmt", so it can be a program name with args.
10757 set dummy gmsgfmt; ac_word=$2
10758 echo "$as_me:10758: checking for $ac_word" >&5
10759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10760 if test "${ac_cv_path_GMSGFMT+set}" = set; then
10761 echo $ECHO_N "(cached) $ECHO_C" >&6
10762 else
10763 case $GMSGFMT in
10764 [\\/]* | ?:[\\/]*)
10765 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10766 ;;
10767 *)
10768 ac_save_IFS=$IFS; IFS=$ac_path_separator
10769 ac_dummy="$PATH"
10770 for ac_dir in $ac_dummy; do
10771 IFS=$ac_save_IFS
10772 test -z "$ac_dir" && ac_dir=.
10773 if $as_executable_p "$ac_dir/$ac_word"; then
10774 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
10775 echo "$as_me:10775: found $ac_dir/$ac_word" >&5
10776 break
10777 fi
10778 done
10779
10780 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10781 ;;
10782 esac
10783 fi
10784 GMSGFMT=$ac_cv_path_GMSGFMT
10785
10786 if test -n "$GMSGFMT"; then
10787 echo "$as_me:10787: result: $GMSGFMT" >&5
10788 echo "${ECHO_T}$GMSGFMT" >&6
10789 else
10790 echo "$as_me:10790: result: no" >&5
10791 echo "${ECHO_T}no" >&6
10792 fi
10793
10794 # Extract the first word of "xgettext", so it can be a program name with args.
10795
10796 set dummy xgettext; ac_word=$2
10797 echo "$as_me:10797: checking for $ac_word" >&5
10798 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10799 if test "${ac_cv_path_XGETTEXT+set}" = set; then
10800 echo $ECHO_N "(cached) $ECHO_C" >&6
10801 else
10802 case "$XGETTEXT" in
10803 ([\\/]*|?:[\\/]*)
10804 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10805 ;;
10806 (*)
10807 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10808 for ac_dir in $PATH; do
10809 test -z "$ac_dir" && ac_dir=.
10810 if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10811 if "$ac_dir/$ac_word" --omit-header /dev/null >/dev/null 2>&1; then
10812 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
10813 break
10814 fi
10815 fi
10816 done
10817 IFS="$ac_save_ifs"
10818 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10819 ;;
10820 esac
10821 fi
10822 XGETTEXT="$ac_cv_path_XGETTEXT"
10823 if test "$XGETTEXT" != ":"; then
10824 echo "$as_me:10824: result: $XGETTEXT" >&5
10825 echo "${ECHO_T}$XGETTEXT" >&6
10826 else
10827 echo "$as_me:10827: result: no" >&5
10828 echo "${ECHO_T}no" >&6
10829 fi
10830
10831 CATOBJEXT=NONE
10832
10833 cf_save_msgfmt_path="$MSGFMT"
10834 cf_save_xgettext_path="$XGETTEXT"
10835
10836 cf_add_libs="$LIBS"
10837 # reverse order
10838 cf_add_0lib=
10839 for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10840 # filter duplicates
10841 for cf_add_1lib in $cf_add_0lib; do
10842 for cf_add_2lib in $cf_add_libs; do
10843 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10844 cf_add_1lib=
10845 break
10846 fi
10847 done
10848 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10849 done
10850 LIBS="$cf_add_libs"
10851
10852 cf_save_LIBS_1="$LIBS"
10853 cf_save_OPTS_1="$CPPFLAGS"
10854
10855 # Check whether --with-libintl-prefix or --without-libintl-prefix was given.
10856 if test "${with_libintl_prefix+set}" = set; then
10857 withval="$with_libintl_prefix"
10858
10859 case "x$withval" in
10860 (xno|xyes|x)
10861 ;;
10862 (*)
10863
10864 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
10865 if test -d "$cf_searchpath/include" ; then
10866
10867 if test -n "$cf_searchpath/include" ; then
10868 for cf_add_incdir in $cf_searchpath/include
10869 do
10870 while test "$cf_add_incdir" != /usr/include
10871 do
10872 if test -d "$cf_add_incdir"
10873 then
10874 cf_have_incdir=no
10875 if test -n "$CFLAGS$CPPFLAGS" ; then
10876 # a loop is needed to ensure we can add subdirs of existing dirs
10877 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10878 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10879 cf_have_incdir=yes; break
10880 fi
10881 done
10882 fi
10883
10884 if test "$cf_have_incdir" = no ; then
10885 if test "$cf_add_incdir" = /usr/local/include ; then
10886 if test "$GCC" = yes
10887 then
10888 cf_save_CPPFLAGS=$CPPFLAGS
10889
10890 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10891 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10892
10893 cat >"conftest.$ac_ext" <<_ACEOF
10894 #line 10894 "configure"
10895 #include "confdefs.h"
10896 #include <stdio.h>
10897 int
10898 main (void)
10899 {
10900 printf("Hello")
10901 ;
10902 return 0;
10903 }
10904 _ACEOF
10905 rm -f "conftest.$ac_objext"
10906 if { (eval echo "$as_me:10906: \"$ac_compile\"") >&5
10907 (eval $ac_compile) 2>&5
10908 ac_status=$?
10909 echo "$as_me:10909: \$? = $ac_status" >&5
10910 (exit "$ac_status"); } &&
10911 { ac_try='test -s "conftest.$ac_objext"'
10912 { (eval echo "$as_me:10912: \"$ac_try\"") >&5
10913 (eval $ac_try) 2>&5
10914 ac_status=$?
10915 echo "$as_me:10915: \$? = $ac_status" >&5
10916 (exit "$ac_status"); }; }; then
10917 :
10918 else
10919 echo "$as_me: failed program was:" >&5
10920 cat "conftest.$ac_ext" >&5
10921 cf_have_incdir=yes
10922 fi
10923 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10924 CPPFLAGS=$cf_save_CPPFLAGS
10925 fi
10926 fi
10927 fi
10928
10929 if test "$cf_have_incdir" = no ; then
10930 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10931
10932 echo "${as_me:-configure}:10932: testing adding $cf_add_incdir to include-path ..." 1>&5
10933
10934 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10935
10936 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10937 test "$cf_top_incdir" = "$cf_add_incdir" && break
10938 cf_add_incdir="$cf_top_incdir"
10939 else
10940 break
10941 fi
10942 else
10943 break
10944 fi
10945 done
10946 done
10947 fi
10948
10949 elif test -d "$cf_searchpath/../include" ; then
10950
10951 if test -n "$cf_searchpath/../include" ; then
10952 for cf_add_incdir in $cf_searchpath/../include
10953 do
10954 while test "$cf_add_incdir" != /usr/include
10955 do
10956 if test -d "$cf_add_incdir"
10957 then
10958 cf_have_incdir=no
10959 if test -n "$CFLAGS$CPPFLAGS" ; then
10960 # a loop is needed to ensure we can add subdirs of existing dirs
10961 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10962 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10963 cf_have_incdir=yes; break
10964 fi
10965 done
10966 fi
10967
10968 if test "$cf_have_incdir" = no ; then
10969 if test "$cf_add_incdir" = /usr/local/include ; then
10970 if test "$GCC" = yes
10971 then
10972 cf_save_CPPFLAGS=$CPPFLAGS
10973
10974 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10975 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10976
10977 cat >"conftest.$ac_ext" <<_ACEOF
10978 #line 10978 "configure"
10979 #include "confdefs.h"
10980 #include <stdio.h>
10981 int
10982 main (void)
10983 {
10984 printf("Hello")
10985 ;
10986 return 0;
10987 }
10988 _ACEOF
10989 rm -f "conftest.$ac_objext"
10990 if { (eval echo "$as_me:10990: \"$ac_compile\"") >&5
10991 (eval $ac_compile) 2>&5
10992 ac_status=$?
10993 echo "$as_me:10993: \$? = $ac_status" >&5
10994 (exit "$ac_status"); } &&
10995 { ac_try='test -s "conftest.$ac_objext"'
10996 { (eval echo "$as_me:10996: \"$ac_try\"") >&5
10997 (eval $ac_try) 2>&5
10998 ac_status=$?
10999 echo "$as_me:10999: \$? = $ac_status" >&5
11000 (exit "$ac_status"); }; }; then
11001 :
11002 else
11003 echo "$as_me: failed program was:" >&5
11004 cat "conftest.$ac_ext" >&5
11005 cf_have_incdir=yes
11006 fi
11007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11008 CPPFLAGS=$cf_save_CPPFLAGS
11009 fi
11010 fi
11011 fi
11012
11013 if test "$cf_have_incdir" = no ; then
11014 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11015
11016 echo "${as_me:-configure}:11016: testing adding $cf_add_incdir to include-path ..." 1>&5
11017
11018 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11019
11020 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11021 test "$cf_top_incdir" = "$cf_add_incdir" && break
11022 cf_add_incdir="$cf_top_incdir"
11023 else
11024 break
11025 fi
11026 else
11027 break
11028 fi
11029 done
11030 done
11031 fi
11032
11033 else
11034 { { echo "$as_me:11034: error: cannot find libintl under $withval" >&5
11035 echo "$as_me: error: cannot find libintl under $withval" >&2;}
11036 { (exit 1); exit 1; }; }
11037 fi
11038 if test -d "$cf_searchpath/lib" ; then
11039
11040 if test -n "$cf_searchpath/lib" ; then
11041 for cf_add_libdir in $cf_searchpath/lib
11042 do
11043 if test "$cf_add_libdir" = /usr/lib ; then
11044 :
11045 elif test -d "$cf_add_libdir"
11046 then
11047 cf_have_libdir=no
11048 if test -n "$LDFLAGS$LIBS" ; then
11049 # a loop is needed to ensure we can add subdirs of existing dirs
11050 for cf_test_libdir in $LDFLAGS $LIBS ; do
11051 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11052 cf_have_libdir=yes; break
11053 fi
11054 done
11055 fi
11056 if test "$cf_have_libdir" = no ; then
11057 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
11058
11059 echo "${as_me:-configure}:11059: testing adding $cf_add_libdir to library-path ..." 1>&5
11060
11061 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11062 fi
11063 fi
11064 done
11065 fi
11066
11067 elif test -d "$cf_searchpath" ; then
11068
11069 if test -n "$cf_searchpath" ; then
11070 for cf_add_libdir in $cf_searchpath
11071 do
11072 if test "$cf_add_libdir" = /usr/lib ; then
11073 :
11074 elif test -d "$cf_add_libdir"
11075 then
11076 cf_have_libdir=no
11077 if test -n "$LDFLAGS$LIBS" ; then
11078 # a loop is needed to ensure we can add subdirs of existing dirs
11079 for cf_test_libdir in $LDFLAGS $LIBS ; do
11080 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11081 cf_have_libdir=yes; break
11082 fi
11083 done
11084 fi
11085 if test "$cf_have_libdir" = no ; then
11086 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
11087
11088 echo "${as_me:-configure}:11088: testing adding $cf_add_libdir to library-path ..." 1>&5
11089
11090 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11091 fi
11092 fi
11093 done
11094 fi
11095
11096 else
11097 { { echo "$as_me:11097: error: cannot find libintl under $withval" >&5
11098 echo "$as_me: error: cannot find libintl under $withval" >&2;}
11099 { (exit 1); exit 1; }; }
11100 fi
11101 done
11102
11103 test -n "$verbose" && echo " setting path value for libintl to $withval" 1>&6
11104
11105 echo "${as_me:-configure}:11105: testing setting path value for libintl to $withval ..." 1>&5
11106
11107 ;;
11108 esac
11109
11110 fi;
11111
11112 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11113 # will be set on completion of the AC_LINK_IFELSE below.
11114 cf_cv_header_path_intl=
11115 cf_cv_library_path_intl=
11116
11117 echo "${as_me:-configure}:11117: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
11118
11119 cf_save_LIBS="$LIBS"
11120
11121 cat >"conftest.$ac_ext" <<_ACEOF
11122 #line 11122 "configure"
11123 #include "confdefs.h"
11124
11125 #include <libintl.h>
11126 extern int _nl_msg_cat_cntr;
11127
11128 int
11129 main (void)
11130 {
11131
11132 bindtextdomain ("", "");
11133 return (gettext ("") != (char*)0)
11134
11135 #ifdef USE_MSGFMT_HACK
11136 + _nl_msg_cat_cntr
11137 #endif
11138
11139 ;
11140 return 0;
11141 }
11142 _ACEOF
11143 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11144 if { (eval echo "$as_me:11144: \"$ac_link\"") >&5
11145 (eval $ac_link) 2>&5
11146 ac_status=$?
11147 echo "$as_me:11147: \$? = $ac_status" >&5
11148 (exit "$ac_status"); } &&
11149 { ac_try='test -s "conftest$ac_exeext"'
11150 { (eval echo "$as_me:11150: \"$ac_try\"") >&5
11151 (eval $ac_try) 2>&5
11152 ac_status=$?
11153 echo "$as_me:11153: \$? = $ac_status" >&5
11154 (exit "$ac_status"); }; }; then
11155
11156 cf_cv_find_linkage_intl=yes
11157 cf_cv_header_path_intl=/usr/include
11158 cf_cv_library_path_intl=/usr/lib
11159
11160 else
11161 echo "$as_me: failed program was:" >&5
11162 cat "conftest.$ac_ext" >&5
11163
11164 LIBS="-lintl $cf_save_LIBS"
11165
11166 cat >"conftest.$ac_ext" <<_ACEOF
11167 #line 11167 "configure"
11168 #include "confdefs.h"
11169
11170 #include <libintl.h>
11171 extern int _nl_msg_cat_cntr;
11172
11173 int
11174 main (void)
11175 {
11176
11177 bindtextdomain ("", "");
11178 return (gettext ("") != (char*)0)
11179
11180 #ifdef USE_MSGFMT_HACK
11181 + _nl_msg_cat_cntr
11182 #endif
11183
11184 ;
11185 return 0;
11186 }
11187 _ACEOF
11188 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11189 if { (eval echo "$as_me:11189: \"$ac_link\"") >&5
11190 (eval $ac_link) 2>&5
11191 ac_status=$?
11192 echo "$as_me:11192: \$? = $ac_status" >&5
11193 (exit "$ac_status"); } &&
11194 { ac_try='test -s "conftest$ac_exeext"'
11195 { (eval echo "$as_me:11195: \"$ac_try\"") >&5
11196 (eval $ac_try) 2>&5
11197 ac_status=$?
11198 echo "$as_me:11198: \$? = $ac_status" >&5
11199 (exit "$ac_status"); }; }; then
11200
11201 cf_cv_find_linkage_intl=yes
11202 cf_cv_header_path_intl=/usr/include
11203 cf_cv_library_path_intl=/usr/lib
11204 cf_cv_library_file_intl="-lintl"
11205
11206 else
11207 echo "$as_me: failed program was:" >&5
11208 cat "conftest.$ac_ext" >&5
11209
11210 cf_cv_find_linkage_intl=no
11211 LIBS="$cf_save_LIBS"
11212
11213 test -n "$verbose" && echo " find linkage for intl library" 1>&6
11214
11215 echo "${as_me:-configure}:11215: testing find linkage for intl library ..." 1>&5
11216
11217 echo "${as_me:-configure}:11217: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
11218
11219 cf_save_CPPFLAGS="$CPPFLAGS"
11220 cf_test_CPPFLAGS="$CPPFLAGS"
11221
11222 cf_search=
11223
11224 # collect the current set of include-directories from compiler flags
11225 cf_header_path_list=""
11226 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11227 for cf_header_path in $CPPFLAGS $CFLAGS
11228 do
11229 case "$cf_header_path" in
11230 (-I*)
11231 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11232
11233 test "x$cf_header_path" != "xNONE" && \
11234 test -d "$cf_header_path" && \
11235 {
11236 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11237 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11238 test -d "$cf_header_path/include/intl" && cf_search="$cf_search $cf_header_path/include/intl"
11239 test -d "$cf_header_path/include/intl/include" && cf_search="$cf_search $cf_header_path/include/intl/include"
11240 test -d "$cf_header_path/intl/include" && cf_search="$cf_search $cf_header_path/intl/include"
11241 test -d "$cf_header_path/intl/include/intl" && cf_search="$cf_search $cf_header_path/intl/include/intl"
11242 }
11243
11244 cf_header_path_list="$cf_header_path_list $cf_search"
11245 ;;
11246 esac
11247 done
11248 fi
11249
11250 # add the variations for the package we are looking for
11251
11252 cf_search=
11253
11254 test "x$prefix" != "xNONE" && \
11255 test -d "$prefix" && \
11256 {
11257 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11258 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11259 test -d "$prefix/include/intl" && cf_search="$cf_search $prefix/include/intl"
11260 test -d "$prefix/include/intl/include" && cf_search="$cf_search $prefix/include/intl/include"
11261 test -d "$prefix/intl/include" && cf_search="$cf_search $prefix/intl/include"
11262 test -d "$prefix/intl/include/intl" && cf_search="$cf_search $prefix/intl/include/intl"
11263 }
11264
11265 for cf_subdir_prefix in \
11266 /usr \
11267 /usr/local \
11268 /usr/pkg \
11269 /opt \
11270 /opt/local \
11271 $HOME
11272 do
11273
11274 test "x$cf_subdir_prefix" != "x$prefix" && \
11275 test -d "$cf_subdir_prefix" && \
11276 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11277 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11278 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11279 test -d "$cf_subdir_prefix/include/intl" && cf_search="$cf_search $cf_subdir_prefix/include/intl"
11280 test -d "$cf_subdir_prefix/include/intl/include" && cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
11281 test -d "$cf_subdir_prefix/intl/include" && cf_search="$cf_search $cf_subdir_prefix/intl/include"
11282 test -d "$cf_subdir_prefix/intl/include/intl" && cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
11283 }
11284
11285 done
11286
11287 test "$includedir" != NONE && \
11288 test "$includedir" != "/usr/include" && \
11289 test -d "$includedir" && {
11290 test -d "$includedir" && cf_search="$cf_search $includedir"
11291 test -d "$includedir/intl" && cf_search="$cf_search $includedir/intl"
11292 }
11293
11294 test "$oldincludedir" != NONE && \
11295 test "$oldincludedir" != "/usr/include" && \
11296 test -d "$oldincludedir" && {
11297 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11298 test -d "$oldincludedir/intl" && cf_search="$cf_search $oldincludedir/intl"
11299 }
11300
11301 cf_search="$cf_search $cf_header_path_list"
11302
11303 for cf_cv_header_path_intl in $cf_search
11304 do
11305 if test -d "$cf_cv_header_path_intl" ; then
11306 test -n "$verbose" && echo " ... testing $cf_cv_header_path_intl" 1>&6
11307
11308 echo "${as_me:-configure}:11308: testing ... testing $cf_cv_header_path_intl ..." 1>&5
11309
11310 CPPFLAGS="$cf_save_CPPFLAGS"
11311
11312 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11313 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
11314
11315 cat >"conftest.$ac_ext" <<_ACEOF
11316 #line 11316 "configure"
11317 #include "confdefs.h"
11318
11319 #include <libintl.h>
11320 extern int _nl_msg_cat_cntr;
11321
11322 int
11323 main (void)
11324 {
11325
11326 bindtextdomain ("", "");
11327 return (gettext ("") != (char*)0)
11328
11329 #ifdef USE_MSGFMT_HACK
11330 + _nl_msg_cat_cntr
11331 #endif
11332
11333 ;
11334 return 0;
11335 }
11336 _ACEOF
11337 rm -f "conftest.$ac_objext"
11338 if { (eval echo "$as_me:11338: \"$ac_compile\"") >&5
11339 (eval $ac_compile) 2>&5
11340 ac_status=$?
11341 echo "$as_me:11341: \$? = $ac_status" >&5
11342 (exit "$ac_status"); } &&
11343 { ac_try='test -s "conftest.$ac_objext"'
11344 { (eval echo "$as_me:11344: \"$ac_try\"") >&5
11345 (eval $ac_try) 2>&5
11346 ac_status=$?
11347 echo "$as_me:11347: \$? = $ac_status" >&5
11348 (exit "$ac_status"); }; }; then
11349
11350 test -n "$verbose" && echo " ... found intl headers in $cf_cv_header_path_intl" 1>&6
11351
11352 echo "${as_me:-configure}:11352: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
11353
11354 cf_cv_find_linkage_intl=maybe
11355 cf_test_CPPFLAGS="$CPPFLAGS"
11356 break
11357 else
11358 echo "$as_me: failed program was:" >&5
11359 cat "conftest.$ac_ext" >&5
11360
11361 CPPFLAGS="$cf_save_CPPFLAGS"
11362
11363 fi
11364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11365 fi
11366 done
11367
11368 if test "$cf_cv_find_linkage_intl" = maybe ; then
11369
11370 echo "${as_me:-configure}:11370: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
11371
11372 cf_save_LIBS="$LIBS"
11373 cf_save_LDFLAGS="$LDFLAGS"
11374
11375 if test "$cf_cv_find_linkage_intl" != yes ; then
11376
11377 cf_search=
11378 cf_library_path_list=""
11379 if test -n "${LDFLAGS}${LIBS}" ; then
11380 for cf_library_path in $LDFLAGS $LIBS
11381 do
11382 case "$cf_library_path" in
11383 (-L*)
11384 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11385
11386 test "x$cf_library_path" != "xNONE" && \
11387 test -d "$cf_library_path" && \
11388 {
11389 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11390 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11391 test -d "$cf_library_path/lib/intl" && cf_search="$cf_search $cf_library_path/lib/intl"
11392 test -d "$cf_library_path/lib/intl/lib" && cf_search="$cf_search $cf_library_path/lib/intl/lib"
11393 test -d "$cf_library_path/intl/lib" && cf_search="$cf_search $cf_library_path/intl/lib"
11394 test -d "$cf_library_path/intl/lib/intl" && cf_search="$cf_search $cf_library_path/intl/lib/intl"
11395 }
11396
11397 cf_library_path_list="$cf_library_path_list $cf_search"
11398 ;;
11399 esac
11400 done
11401 fi
11402
11403 cf_search=
11404
11405 test "x$prefix" != "xNONE" && \
11406 test -d "$prefix" && \
11407 {
11408 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11409 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11410 test -d "$prefix/lib/intl" && cf_search="$cf_search $prefix/lib/intl"
11411 test -d "$prefix/lib/intl/lib" && cf_search="$cf_search $prefix/lib/intl/lib"
11412 test -d "$prefix/intl/lib" && cf_search="$cf_search $prefix/intl/lib"
11413 test -d "$prefix/intl/lib/intl" && cf_search="$cf_search $prefix/intl/lib/intl"
11414 }
11415
11416 for cf_subdir_prefix in \
11417 /usr \
11418 /usr/local \
11419 /usr/pkg \
11420 /opt \
11421 /opt/local \
11422 $HOME
11423 do
11424
11425 test "x$cf_subdir_prefix" != "x$prefix" && \
11426 test -d "$cf_subdir_prefix" && \
11427 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11428 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11429 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11430 test -d "$cf_subdir_prefix/lib/intl" && cf_search="$cf_search $cf_subdir_prefix/lib/intl"
11431 test -d "$cf_subdir_prefix/lib/intl/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
11432 test -d "$cf_subdir_prefix/intl/lib" && cf_search="$cf_search $cf_subdir_prefix/intl/lib"
11433 test -d "$cf_subdir_prefix/intl/lib/intl" && cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
11434 }
11435
11436 done
11437
11438 cf_search="$cf_library_path_list $cf_search"
11439
11440 for cf_cv_library_path_intl in $cf_search
11441 do
11442 if test -d "$cf_cv_library_path_intl" ; then
11443 test -n "$verbose" && echo " ... testing $cf_cv_library_path_intl" 1>&6
11444
11445 echo "${as_me:-configure}:11445: testing ... testing $cf_cv_library_path_intl ..." 1>&5
11446
11447 CPPFLAGS="$cf_test_CPPFLAGS"
11448 LIBS="-lintl $cf_save_LIBS"
11449 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
11450 cat >"conftest.$ac_ext" <<_ACEOF
11451 #line 11451 "configure"
11452 #include "confdefs.h"
11453
11454 #include <libintl.h>
11455 extern int _nl_msg_cat_cntr;
11456
11457 int
11458 main (void)
11459 {
11460
11461 bindtextdomain ("", "");
11462 return (gettext ("") != (char*)0)
11463
11464 #ifdef USE_MSGFMT_HACK
11465 + _nl_msg_cat_cntr
11466 #endif
11467
11468 ;
11469 return 0;
11470 }
11471 _ACEOF
11472 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11473 if { (eval echo "$as_me:11473: \"$ac_link\"") >&5
11474 (eval $ac_link) 2>&5
11475 ac_status=$?
11476 echo "$as_me:11476: \$? = $ac_status" >&5
11477 (exit "$ac_status"); } &&
11478 { ac_try='test -s "conftest$ac_exeext"'
11479 { (eval echo "$as_me:11479: \"$ac_try\"") >&5
11480 (eval $ac_try) 2>&5
11481 ac_status=$?
11482 echo "$as_me:11482: \$? = $ac_status" >&5
11483 (exit "$ac_status"); }; }; then
11484
11485 test -n "$verbose" && echo " ... found intl library in $cf_cv_library_path_intl" 1>&6
11486
11487 echo "${as_me:-configure}:11487: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
11488
11489 cf_cv_find_linkage_intl=yes
11490 cf_cv_library_file_intl="-lintl"
11491 break
11492 else
11493 echo "$as_me: failed program was:" >&5
11494 cat "conftest.$ac_ext" >&5
11495
11496 CPPFLAGS="$cf_save_CPPFLAGS"
11497 LIBS="$cf_save_LIBS"
11498 LDFLAGS="$cf_save_LDFLAGS"
11499
11500 fi
11501 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11502 fi
11503 done
11504 CPPFLAGS="$cf_save_CPPFLAGS"
11505 LDFLAGS="$cf_save_LDFLAGS"
11506 fi
11507
11508 else
11509 cf_cv_find_linkage_intl=no
11510 fi
11511
11512 fi
11513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11514
11515 fi
11516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11517
11518 LIBS="$cf_save_LIBS"
11519
11520 if test "$cf_cv_find_linkage_intl" = yes ; then
11521 cf_cv_func_gettext=yes
11522 else
11523 cf_cv_func_gettext=no
11524 fi
11525
11526 echo "$as_me:11526: checking for libintl.h and gettext()" >&5
11527 echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
11528 echo "$as_me:11528: result: $cf_cv_func_gettext" >&5
11529 echo "${ECHO_T}$cf_cv_func_gettext" >&6
11530
11531 if test "$cf_cv_func_gettext" = yes ; then
11532
11533 cat >>confdefs.h <<\EOF
11534 #define HAVE_LIBINTL_H 1
11535 EOF
11536
11537 cat >>confdefs.h <<\EOF
11538 #define HAVE_GETTEXT 1
11539 EOF
11540
11541 if test -n "$cf_cv_header_path_intl" ; then
11542 for cf_add_incdir in $cf_cv_header_path_intl
11543 do
11544 while test "$cf_add_incdir" != /usr/include
11545 do
11546 if test -d "$cf_add_incdir"
11547 then
11548 cf_have_incdir=no
11549 if test -n "$CFLAGS$CPPFLAGS" ; then
11550 # a loop is needed to ensure we can add subdirs of existing dirs
11551 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11552 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11553 cf_have_incdir=yes; break
11554 fi
11555 done
11556 fi
11557
11558 if test "$cf_have_incdir" = no ; then
11559 if test "$cf_add_incdir" = /usr/local/include ; then
11560 if test "$GCC" = yes
11561 then
11562 cf_save_CPPFLAGS=$CPPFLAGS
11563
11564 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11565 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11566
11567 cat >"conftest.$ac_ext" <<_ACEOF
11568 #line 11568 "configure"
11569 #include "confdefs.h"
11570 #include <stdio.h>
11571 int
11572 main (void)
11573 {
11574 printf("Hello")
11575 ;
11576 return 0;
11577 }
11578 _ACEOF
11579 rm -f "conftest.$ac_objext"
11580 if { (eval echo "$as_me:11580: \"$ac_compile\"") >&5
11581 (eval $ac_compile) 2>&5
11582 ac_status=$?
11583 echo "$as_me:11583: \$? = $ac_status" >&5
11584 (exit "$ac_status"); } &&
11585 { ac_try='test -s "conftest.$ac_objext"'
11586 { (eval echo "$as_me:11586: \"$ac_try\"") >&5
11587 (eval $ac_try) 2>&5
11588 ac_status=$?
11589 echo "$as_me:11589: \$? = $ac_status" >&5
11590 (exit "$ac_status"); }; }; then
11591 :
11592 else
11593 echo "$as_me: failed program was:" >&5
11594 cat "conftest.$ac_ext" >&5
11595 cf_have_incdir=yes
11596 fi
11597 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11598 CPPFLAGS=$cf_save_CPPFLAGS
11599 fi
11600 fi
11601 fi
11602
11603 if test "$cf_have_incdir" = no ; then
11604 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11605
11606 echo "${as_me:-configure}:11606: testing adding $cf_add_incdir to include-path ..." 1>&5
11607
11608 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11609
11610 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11611 test "$cf_top_incdir" = "$cf_add_incdir" && break
11612 cf_add_incdir="$cf_top_incdir"
11613 else
11614 break
11615 fi
11616 else
11617 break
11618 fi
11619 done
11620 done
11621 fi
11622
11623 if test -n "$cf_cv_library_file_intl" ; then
11624 INTLLIBS="$cf_cv_library_file_intl"
11625
11626 if test -n "$cf_cv_library_path_intl" ; then
11627 for cf_add_libdir in $cf_cv_library_path_intl
11628 do
11629 if test "$cf_add_libdir" = /usr/lib ; then
11630 :
11631 elif test -d "$cf_add_libdir"
11632 then
11633 cf_have_libdir=no
11634 if test -n "$LDFLAGS$LIBS" ; then
11635 # a loop is needed to ensure we can add subdirs of existing dirs
11636 for cf_test_libdir in $LDFLAGS $LIBS ; do
11637 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11638 cf_have_libdir=yes; break
11639 fi
11640 done
11641 fi
11642 if test "$cf_have_libdir" = no ; then
11643 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
11644
11645 echo "${as_me:-configure}:11645: testing adding $cf_add_libdir to library-path ..." 1>&5
11646
11647 INTLLIBS="-L$cf_add_libdir $INTLLIBS"
11648 fi
11649 fi
11650 done
11651 fi
11652
11653 fi
11654
11655 echo "$as_me:11655: checking if this is GNU gettext" >&5
11656 echo $ECHO_N "checking if this is GNU gettext... $ECHO_C" >&6
11657 cat >"conftest.$ac_ext" <<_ACEOF
11658 #line 11658 "configure"
11659 #include "confdefs.h"
11660 #define USE_MSGFMT_HACK
11661
11662 #include <libintl.h>
11663 extern int _nl_msg_cat_cntr;
11664
11665 int
11666 main (void)
11667 {
11668
11669 bindtextdomain ("", "");
11670 return (gettext ("") != (char*)0)
11671
11672 #ifdef USE_MSGFMT_HACK
11673 + _nl_msg_cat_cntr
11674 #endif
11675
11676 ;
11677 return 0;
11678 }
11679 _ACEOF
11680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11681 if { (eval echo "$as_me:11681: \"$ac_link\"") >&5
11682 (eval $ac_link) 2>&5
11683 ac_status=$?
11684 echo "$as_me:11684: \$? = $ac_status" >&5
11685 (exit "$ac_status"); } &&
11686 { ac_try='test -s "conftest$ac_exeext"'
11687 { (eval echo "$as_me:11687: \"$ac_try\"") >&5
11688 (eval $ac_try) 2>&5
11689 ac_status=$?
11690 echo "$as_me:11690: \$? = $ac_status" >&5
11691 (exit "$ac_status"); }; }; then
11692 cf_cv_gnu_gettext=yes
11693 else
11694 echo "$as_me: failed program was:" >&5
11695 cat "conftest.$ac_ext" >&5
11696 cf_cv_gnu_gettext=no
11697 fi
11698 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11699 echo "$as_me:11699: result: $cf_cv_gnu_gettext" >&5
11700 echo "${ECHO_T}$cf_cv_gnu_gettext" >&6
11701 test "$" = yes &&
11702 cat >>confdefs.h <<\EOF
11703 #define HAVE__NL_MSG_CAT_CNTR 1
11704 EOF
11705
11706 LIBS="$LIBS $INTLLIBS"
11707
11708 for ac_func in dcgettext
11709 do
11710 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11711 echo "$as_me:11711: checking for $ac_func" >&5
11712 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11713 if eval "test \"\${$as_ac_var+set}\" = set"; then
11714 echo $ECHO_N "(cached) $ECHO_C" >&6
11715 else
11716 cat >"conftest.$ac_ext" <<_ACEOF
11717 #line 11717 "configure"
11718 #include "confdefs.h"
11719 #define $ac_func autoconf_temporary
11720 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11721 #undef $ac_func
11722
11723 #ifdef __cplusplus
11724 extern "C"
11725 #endif
11726
11727 /* We use char because int might match the return type of a gcc2
11728 builtin and then its argument prototype would still apply. */
11729 char $ac_func (void);
11730
11731 int
11732 main (void)
11733 {
11734
11735 /* The GNU C library defines stubs for functions which it implements
11736 to always fail with ENOSYS. Some functions are actually named
11737 something starting with __ and the normal name is an alias. */
11738 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11739 #error found stub for $ac_func
11740 #endif
11741
11742 return $ac_func ();
11743 ;
11744 return 0;
11745 }
11746 _ACEOF
11747 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11748 if { (eval echo "$as_me:11748: \"$ac_link\"") >&5
11749 (eval $ac_link) 2>&5
11750 ac_status=$?
11751 echo "$as_me:11751: \$? = $ac_status" >&5
11752 (exit "$ac_status"); } &&
11753 { ac_try='test -s "conftest$ac_exeext"'
11754 { (eval echo "$as_me:11754: \"$ac_try\"") >&5
11755 (eval $ac_try) 2>&5
11756 ac_status=$?
11757 echo "$as_me:11757: \$? = $ac_status" >&5
11758 (exit "$ac_status"); }; }; then
11759 eval "$as_ac_var=yes"
11760 else
11761 echo "$as_me: failed program was:" >&5
11762 cat "conftest.$ac_ext" >&5
11763 eval "$as_ac_var=no"
11764 fi
11765 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11766 fi
11767 echo "$as_me:11767: result: `eval echo '${'"$as_ac_var"'}'`" >&5
11768 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
11769 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
11770 cat >>confdefs.h <<EOF
11771 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11772 EOF
11773
11774 fi
11775 done
11776
11777 CATOBJEXT=.gmo
11778
11779 cat >>confdefs.h <<\EOF
11780 #define ENABLE_NLS 1
11781 EOF
11782
11783 elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
11784 { echo "$as_me:11784: WARNING: disabling NLS feature" >&5
11785 echo "$as_me: WARNING: disabling NLS feature" >&2;}
11786 ALL_LINGUAS=
11787 CATOBJEXT=.ignored
11788 MSGFMT=":"
11789 GMSGFMT=":"
11790 XGETTEXT=":"
11791 USE_NLS=no
11792 LIBS="$cf_save_LIBS_1"
11793 CPPFLAGS="$cf_save_OPTS_1"
11794 fi
11795
11796 if test "$GMSGFMT" != ":"; then
11797 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
11798 : ;
11799 else
11800 { echo "$as_me:11800: WARNING: found msgfmt program is not GNU msgfmt" >&5
11801 echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
11802 fi
11803 fi
11804
11805 if test "$XGETTEXT" != ":"; then
11806 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
11807 : ;
11808 else
11809 { echo "$as_me:11809: WARNING: found xgettext program is not GNU xgettext" >&5
11810 echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
11811 fi
11812 fi
11813 fi
11814
11815 if test "$XGETTEXT" != ":"; then
11816 ac_config_commands="$ac_config_commands config-NLS"
11817
11818 for lang in $ALL_LINGUAS; do
11819 GMOFILES="$GMOFILES $lang.gmo"
11820 POFILES="$POFILES $lang.po"
11821 done
11822 fi
11823
11824 nls_cv_header_intl=
11825 nls_cv_header_libgt=
11826
11827 DATADIRNAME=share
11828
11829 INSTOBJEXT=.mo
11830
11831 GENCAT=gencat
11832
11833 if test "$USE_NLS" = "yes"; then
11834 if test "x$ALL_LINGUAS" = "x"; then
11835 LINGUAS=
11836 else
11837 echo "$as_me:11837: checking for catalogs to be installed" >&5
11838 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
11839 NEW_LINGUAS=
11840 for presentlang in $ALL_LINGUAS; do
11841 useit=no
11842 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
11843 # Use the presentlang catalog if desiredlang is
11844 # a. equal to presentlang, or
11845 # b. a variant of presentlang (because in this case,
11846 # presentlang can be used as a fallback for messages
11847 # which are not translated in the desiredlang catalog).
11848 case "$desiredlang" in
11849 ("$presentlang"*) useit=yes;;
11850 esac
11851 done
11852 if test "$useit" = yes; then
11853 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
11854 fi
11855 done
11856 LINGUAS=$NEW_LINGUAS
11857 echo "$as_me:11857: result: $LINGUAS" >&5
11858 echo "${ECHO_T}$LINGUAS" >&6
11859 fi
11860
11861 if test -n "$LINGUAS"; then
11862 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
11863 fi
11864 else
11865 CATALOGS=
11866 fi
11867
11868 if test "$USE_NLS" = yes ; then
11869
11870 # Check whether --with-textdomain or --without-textdomain was given.
11871 if test "${with_textdomain+set}" = set; then
11872 withval="$with_textdomain"
11873 NLS_TEXTDOMAIN=$withval
11874 else
11875 NLS_TEXTDOMAIN=$PACKAGE
11876 fi;
11877
11878 cat >>confdefs.h <<EOF
11879 #define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
11880 EOF
11881
11882 fi
11883
11884 MSG_DIR_MAKE=
11885 SUB_MAKEFILE=
11886
11887 cf_makefile=makefile
11888
11889 use_our_messages=no
11890 if test "$USE_NLS" = yes ; then
11891 if test -d "$srcdir/po" ; then
11892 echo "$as_me:11892: checking if we should use included message-library" >&5
11893 echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
11894
11895 # Check whether --enable-included-msgs or --disable-included-msgs was given.
11896 if test "${enable_included_msgs+set}" = set; then
11897 enableval="$enable_included_msgs"
11898 use_our_messages=$enableval
11899 else
11900 use_our_messages=yes
11901 fi;
11902 fi
11903 echo "$as_me:11903: result: $use_our_messages" >&5
11904 echo "${ECHO_T}$use_our_messages" >&6
11905 fi
11906
11907 MSG_DIR_MAKE="#"
11908 if test "$use_our_messages" = yes
11909 then
11910 SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
11911 MSG_DIR_MAKE=
11912 fi
11913
11914 if test "$USE_NLS" = yes ; then
11915
11916 for ac_header in libintl.h
11917 do
11918 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11919 echo "$as_me:11919: checking for $ac_header" >&5
11920 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11921 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11922 echo $ECHO_N "(cached) $ECHO_C" >&6
11923 else
11924 cat >"conftest.$ac_ext" <<_ACEOF
11925 #line 11925 "configure"
11926 #include "confdefs.h"
11927 #include <$ac_header>
11928 _ACEOF
11929 if { (eval echo "$as_me:11929: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11930 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11931 ac_status=$?
11932 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11933 rm -f conftest.er1
11934 cat conftest.err >&5
11935 echo "$as_me:11935: \$? = $ac_status" >&5
11936 (exit "$ac_status"); } >/dev/null; then
11937 if test -s conftest.err; then
11938 ac_cpp_err=$ac_c_preproc_warn_flag
11939 else
11940 ac_cpp_err=
11941 fi
11942 else
11943 ac_cpp_err=yes
11944 fi
11945 if test -z "$ac_cpp_err"; then
11946 eval "$as_ac_Header=yes"
11947 else
11948 echo "$as_me: failed program was:" >&5
11949 cat "conftest.$ac_ext" >&5
11950 eval "$as_ac_Header=no"
11951 fi
11952 rm -f conftest.err "conftest.$ac_ext"
11953 fi
11954 echo "$as_me:11954: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11955 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11956 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11957 cat >>confdefs.h <<EOF
11958 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11959 EOF
11960
11961 fi
11962 done
11963
11964 fi
11965
11966 # Check whether --with-nls-datadir or --without-nls-datadir was given.
11967 if test "${with_nls_datadir+set}" = set; then
11968 withval="$with_nls_datadir"
11969
11970 else
11971 withval="${NLS_DATADIR:-$prefix/$DATADIRNAME}"
11972 fi; if test -n "$prefix/$DATADIRNAME" ; then
11973
11974 if test "x$prefix" != xNONE; then
11975 cf_path_syntax="$prefix"
11976 else
11977 cf_path_syntax="$ac_default_prefix"
11978 fi
11979
11980 case "x$withval" in
11981 (x\$\(*\)*|x\'*\'*)
11982 ;;
11983 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
11984 ;;
11985 (x\$\{*prefix\}*|x\$\{*dir\}*)
11986 eval withval="$withval"
11987 case "x$withval" in
11988 (xNONE/*)
11989 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
11990 ;;
11991 esac
11992 ;;
11993 (xno|xNONE/*)
11994 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
11995 ;;
11996 (*)
11997 { { echo "$as_me:11997: error: expected a pathname, not \"$withval\"" >&5
11998 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11999 { (exit 1); exit 1; }; }
12000 ;;
12001 esac
12002
12003 fi
12004 eval NLS_DATADIR="$withval"
12005
12006 echo "$as_me:12006: checking if you want full utility pathnames" >&5
12007 echo $ECHO_N "checking if you want full utility pathnames... $ECHO_C" >&6
12008
12009 # Check whether --enable-full-paths or --disable-full-paths was given.
12010 if test "${enable_full_paths+set}" = set; then
12011 enableval="$enable_full_paths"
12012 test "$enableval" != no && enableval=yes
12013 if test "$enableval" != "yes" ; then
12014 with_full_paths=no
12015 else
12016 with_full_paths=yes
12017 fi
12018 else
12019 enableval=yes
12020 with_full_paths=yes
12021
12022 fi;
12023 echo "$as_me:12023: result: $with_full_paths" >&5
12024 echo "${ECHO_T}$with_full_paths" >&6
12025 test "$with_full_paths" = no &&
12026 cat >>confdefs.h <<\EOF
12027 #define USE_EXECVP 1
12028 EOF
12029
12030 echo "$as_me:12030: checking for system mailer" >&5
12031 echo $ECHO_N "checking for system mailer... $ECHO_C" >&6
12032 if test "${cf_cv_SYSTEM_MAIL+set}" = set; then
12033 echo $ECHO_N "(cached) $ECHO_C" >&6
12034 else
12035
12036 cf_cv_SYSTEM_MAIL=unknown
12037 for cv_path in /usr/mmdf/bin/submit \
12038 /usr/sbin/sendmail \
12039 /usr/lib/sendmail \
12040
12041 do
12042 if test -f "$cv_path" ; then
12043 cf_cv_SYSTEM_MAIL="$cv_path"
12044 break
12045 fi
12046 done
12047
12048 fi
12049
12050 echo "$as_me:12050: result: $cf_cv_SYSTEM_MAIL" >&5
12051 echo "${ECHO_T}$cf_cv_SYSTEM_MAIL" >&6
12052
12053 cat >>confdefs.h <<EOF
12054 #define SYSTEM_MAIL "$cf_cv_SYSTEM_MAIL"
12055 EOF
12056
12057 echo "$as_me:12057: checking system mail flags" >&5
12058 echo $ECHO_N "checking system mail flags... $ECHO_C" >&6
12059 if test "${cf_cv_system_mail_flags+set}" = set; then
12060 echo $ECHO_N "(cached) $ECHO_C" >&6
12061 else
12062
12063 case "$cf_cv_SYSTEM_MAIL" in
12064 (*/mmdf/*)
12065 cf_cv_system_mail_flags="-mlruxto,cc\\\\*"
12066 ;;
12067 (*)
12068 cf_cv_system_mail_flags="-t -oi"
12069 esac
12070
12071 fi
12072
12073 echo "$as_me:12073: result: $cf_cv_system_mail_flags" >&5
12074 echo "${ECHO_T}$cf_cv_system_mail_flags" >&6
12075
12076 cat >>confdefs.h <<EOF
12077 #define SYSTEM_MAIL_FLAGS "$cf_cv_system_mail_flags"
12078 EOF
12079
12080 if test -n "$SYSTEM_MAIL" ; then
12081 if test "$with_full_paths" = no ; then
12082 SYSTEM_MAIL=`basename "$SYSTEM_MAIL"`
12083 fi
12084 fi
12085
12086 echo "$as_me:12086: checking if SIGWINCH is defined" >&5
12087 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12088 if test "${cf_cv_define_sigwinch+set}" = set; then
12089 echo $ECHO_N "(cached) $ECHO_C" >&6
12090 else
12091
12092 cat >"conftest.$ac_ext" <<_ACEOF
12093 #line 12093 "configure"
12094 #include "confdefs.h"
12095
12096 #include <sys/types.h>
12097 #include <sys/signal.h>
12098
12099 int
12100 main (void)
12101 {
12102 int x = SIGWINCH; (void)x
12103 ;
12104 return 0;
12105 }
12106 _ACEOF
12107 rm -f "conftest.$ac_objext"
12108 if { (eval echo "$as_me:12108: \"$ac_compile\"") >&5
12109 (eval $ac_compile) 2>&5
12110 ac_status=$?
12111 echo "$as_me:12111: \$? = $ac_status" >&5
12112 (exit "$ac_status"); } &&
12113 { ac_try='test -s "conftest.$ac_objext"'
12114 { (eval echo "$as_me:12114: \"$ac_try\"") >&5
12115 (eval $ac_try) 2>&5
12116 ac_status=$?
12117 echo "$as_me:12117: \$? = $ac_status" >&5
12118 (exit "$ac_status"); }; }; then
12119 cf_cv_define_sigwinch=yes
12120 else
12121 echo "$as_me: failed program was:" >&5
12122 cat "conftest.$ac_ext" >&5
12123 cat >"conftest.$ac_ext" <<_ACEOF
12124 #line 12124 "configure"
12125 #include "confdefs.h"
12126
12127 #undef _XOPEN_SOURCE
12128 #undef _POSIX_SOURCE
12129 #undef _POSIX_C_SOURCE
12130 #include <sys/types.h>
12131 #include <sys/signal.h>
12132
12133 int
12134 main (void)
12135 {
12136 int x = SIGWINCH; (void)x
12137 ;
12138 return 0;
12139 }
12140 _ACEOF
12141 rm -f "conftest.$ac_objext"
12142 if { (eval echo "$as_me:12142: \"$ac_compile\"") >&5
12143 (eval $ac_compile) 2>&5
12144 ac_status=$?
12145 echo "$as_me:12145: \$? = $ac_status" >&5
12146 (exit "$ac_status"); } &&
12147 { ac_try='test -s "conftest.$ac_objext"'
12148 { (eval echo "$as_me:12148: \"$ac_try\"") >&5
12149 (eval $ac_try) 2>&5
12150 ac_status=$?
12151 echo "$as_me:12151: \$? = $ac_status" >&5
12152 (exit "$ac_status"); }; }; then
12153 cf_cv_define_sigwinch=maybe
12154 else
12155 echo "$as_me: failed program was:" >&5
12156 cat "conftest.$ac_ext" >&5
12157 cf_cv_define_sigwinch=no
12158 fi
12159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12160
12161 fi
12162 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12163
12164 fi
12165 echo "$as_me:12165: result: $cf_cv_define_sigwinch" >&5
12166 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12167
12168 if test "$cf_cv_define_sigwinch" = maybe ; then
12169 echo "$as_me:12169: checking for actual SIGWINCH definition" >&5
12170 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12171 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12172 echo $ECHO_N "(cached) $ECHO_C" >&6
12173 else
12174
12175 cf_cv_fixup_sigwinch=unknown
12176 cf_sigwinch=32
12177 while test "$cf_sigwinch" != 1
12178 do
12179 cat >"conftest.$ac_ext" <<_ACEOF
12180 #line 12180 "configure"
12181 #include "confdefs.h"
12182
12183 #undef _XOPEN_SOURCE
12184 #undef _POSIX_SOURCE
12185 #undef _POSIX_C_SOURCE
12186 #include <sys/types.h>
12187 #include <sys/signal.h>
12188
12189 int
12190 main (void)
12191 {
12192
12193 #if SIGWINCH != $cf_sigwinch
12194 #error SIGWINCH is not $cf_sigwinch
12195 #endif
12196 int x = SIGWINCH; (void)x
12197 ;
12198 return 0;
12199 }
12200 _ACEOF
12201 rm -f "conftest.$ac_objext"
12202 if { (eval echo "$as_me:12202: \"$ac_compile\"") >&5
12203 (eval $ac_compile) 2>&5
12204 ac_status=$?
12205 echo "$as_me:12205: \$? = $ac_status" >&5
12206 (exit "$ac_status"); } &&
12207 { ac_try='test -s "conftest.$ac_objext"'
12208 { (eval echo "$as_me:12208: \"$ac_try\"") >&5
12209 (eval $ac_try) 2>&5
12210 ac_status=$?
12211 echo "$as_me:12211: \$? = $ac_status" >&5
12212 (exit "$ac_status"); }; }; then
12213 cf_cv_fixup_sigwinch=$cf_sigwinch
12214 break
12215 else
12216 echo "$as_me: failed program was:" >&5
12217 cat "conftest.$ac_ext" >&5
12218 fi
12219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12220
12221 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12222 done
12223
12224 fi
12225 echo "$as_me:12225: result: $cf_cv_fixup_sigwinch" >&5
12226 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12227
12228 if test "$cf_cv_fixup_sigwinch" != unknown ; then
12229 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12230 fi
12231 fi
12232
12233 echo "$as_me:12233: checking if you want to use pkg-config" >&5
12234 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
12235
12236 # Check whether --with-pkg-config or --without-pkg-config was given.
12237 if test "${with_pkg_config+set}" = set; then
12238 withval="$with_pkg_config"
12239 cf_pkg_config=$withval
12240 else
12241 cf_pkg_config=yes
12242 fi;
12243 echo "$as_me:12243: result: $cf_pkg_config" >&5
12244 echo "${ECHO_T}$cf_pkg_config" >&6
12245
12246 case "$cf_pkg_config" in
12247 (no)
12248 PKG_CONFIG=none
12249 ;;
12250 (yes)
12251
12252 if test -n "$ac_tool_prefix"; then
12253 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
12254 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
12255 echo "$as_me:12255: checking for $ac_word" >&5
12256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12257 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12258 echo $ECHO_N "(cached) $ECHO_C" >&6
12259 else
12260 case $PKG_CONFIG in
12261 [\\/]* | ?:[\\/]*)
12262 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12263 ;;
12264 *)
12265 ac_save_IFS=$IFS; IFS=$ac_path_separator
12266 ac_dummy="$PATH"
12267 for ac_dir in $ac_dummy; do
12268 IFS=$ac_save_IFS
12269 test -z "$ac_dir" && ac_dir=.
12270 if $as_executable_p "$ac_dir/$ac_word"; then
12271 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
12272 echo "$as_me:12272: found $ac_dir/$ac_word" >&5
12273 break
12274 fi
12275 done
12276
12277 ;;
12278 esac
12279 fi
12280 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12281
12282 if test -n "$PKG_CONFIG"; then
12283 echo "$as_me:12283: result: $PKG_CONFIG" >&5
12284 echo "${ECHO_T}$PKG_CONFIG" >&6
12285 else
12286 echo "$as_me:12286: result: no" >&5
12287 echo "${ECHO_T}no" >&6
12288 fi
12289
12290 fi
12291 if test -z "$ac_cv_path_PKG_CONFIG"; then
12292 ac_pt_PKG_CONFIG=$PKG_CONFIG
12293 # Extract the first word of "pkg-config", so it can be a program name with args.
12294 set dummy pkg-config; ac_word=$2
12295 echo "$as_me:12295: checking for $ac_word" >&5
12296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12297 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
12298 echo $ECHO_N "(cached) $ECHO_C" >&6
12299 else
12300 case $ac_pt_PKG_CONFIG in
12301 [\\/]* | ?:[\\/]*)
12302 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12303 ;;
12304 *)
12305 ac_save_IFS=$IFS; IFS=$ac_path_separator
12306 ac_dummy="$PATH"
12307 for ac_dir in $ac_dummy; do
12308 IFS=$ac_save_IFS
12309 test -z "$ac_dir" && ac_dir=.
12310 if $as_executable_p "$ac_dir/$ac_word"; then
12311 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
12312 echo "$as_me:12312: found $ac_dir/$ac_word" >&5
12313 break
12314 fi
12315 done
12316
12317 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
12318 ;;
12319 esac
12320 fi
12321 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12322
12323 if test -n "$ac_pt_PKG_CONFIG"; then
12324 echo "$as_me:12324: result: $ac_pt_PKG_CONFIG" >&5
12325 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
12326 else
12327 echo "$as_me:12327: result: no" >&5
12328 echo "${ECHO_T}no" >&6
12329 fi
12330
12331 PKG_CONFIG=$ac_pt_PKG_CONFIG
12332 else
12333 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12334 fi
12335
12336 ;;
12337 (*)
12338 PKG_CONFIG=$withval
12339 ;;
12340 esac
12341
12342 test -z "$PKG_CONFIG" && PKG_CONFIG=none
12343 if test "$PKG_CONFIG" != none ; then
12344
12345 if test "x$prefix" != xNONE; then
12346 cf_path_syntax="$prefix"
12347 else
12348 cf_path_syntax="$ac_default_prefix"
12349 fi
12350
12351 case "x$PKG_CONFIG" in
12352 (x\$\(*\)*|x\'*\'*)
12353 ;;
12354 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
12355 ;;
12356 (x\$\{*prefix\}*|x\$\{*dir\}*)
12357 eval PKG_CONFIG="$PKG_CONFIG"
12358 case "x$PKG_CONFIG" in
12359 (xNONE/*)
12360 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
12361 ;;
12362 esac
12363 ;;
12364 (xno|xNONE/*)
12365 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
12366 ;;
12367 (*)
12368 { { echo "$as_me:12368: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
12369 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
12370 { (exit 1); exit 1; }; }
12371 ;;
12372 esac
12373
12374 elif test "x$cf_pkg_config" != xno ; then
12375 { echo "$as_me:12375: WARNING: pkg-config is not installed" >&5
12376 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
12377 fi
12378
12379 if test -n "$TRY_CFLAGS" ; then
12380
12381 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12382
12383 echo "${as_me:-configure}:12383: testing checking additions to CFLAGS ..." 1>&5
12384
12385 cf_check_cflags="$CFLAGS"
12386 cf_check_cppflags="$CPPFLAGS"
12387
12388 cf_fix_cppflags=no
12389 cf_new_cflags=
12390 cf_new_cppflags=
12391 cf_new_extra_cppflags=
12392
12393 for cf_add_cflags in $TRY_CFLAGS
12394 do
12395 case "$cf_fix_cppflags" in
12396 (no)
12397 case "$cf_add_cflags" in
12398 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12399 case "$cf_add_cflags" in
12400 (-D*)
12401 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12402
12403 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12404 && test -z "${cf_tst_cflags}" \
12405 && cf_fix_cppflags=yes
12406
12407 if test "$cf_fix_cppflags" = yes ; then
12408
12409 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12410 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12411
12412 continue
12413 elif test "${cf_tst_cflags}" = "\"'" ; then
12414
12415 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12416 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12417
12418 continue
12419 fi
12420 ;;
12421 esac
12422 case "$CPPFLAGS" in
12423 (*$cf_add_cflags)
12424 ;;
12425 (*)
12426 case "$cf_add_cflags" in
12427 (-D*)
12428 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12429
12430 CPPFLAGS=`echo "$CPPFLAGS" | \
12431 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12432 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12433
12434 ;;
12435 esac
12436
12437 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12438 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12439
12440 ;;
12441 esac
12442 ;;
12443 (*)
12444
12445 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12446 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12447
12448 ;;
12449 esac
12450 ;;
12451 (yes)
12452
12453 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12454 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12455
12456 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12457
12458 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12459 && test -z "${cf_tst_cflags}" \
12460 && cf_fix_cppflags=no
12461 ;;
12462 esac
12463 done
12464
12465 if test -n "$cf_new_cflags" ; then
12466 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12467
12468 echo "${as_me:-configure}:12468: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12469
12470 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12471 CFLAGS="${CFLAGS}$cf_new_cflags"
12472
12473 fi
12474
12475 if test -n "$cf_new_cppflags" ; then
12476 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12477
12478 echo "${as_me:-configure}:12478: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12479
12480 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12481 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12482
12483 fi
12484
12485 if test -n "$cf_new_extra_cppflags" ; then
12486 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12487
12488 echo "${as_me:-configure}:12488: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12489
12490 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12491 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12492
12493 fi
12494
12495 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12496 cat >"conftest.$ac_ext" <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12499 #include <stdio.h>
12500 int
12501 main (void)
12502 {
12503 printf("Hello world");
12504 ;
12505 return 0;
12506 }
12507 _ACEOF
12508 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12509 if { (eval echo "$as_me:12509: \"$ac_link\"") >&5
12510 (eval $ac_link) 2>&5
12511 ac_status=$?
12512 echo "$as_me:12512: \$? = $ac_status" >&5
12513 (exit "$ac_status"); } &&
12514 { ac_try='test -s "conftest$ac_exeext"'
12515 { (eval echo "$as_me:12515: \"$ac_try\"") >&5
12516 (eval $ac_try) 2>&5
12517 ac_status=$?
12518 echo "$as_me:12518: \$? = $ac_status" >&5
12519 (exit "$ac_status"); }; }; then
12520 :
12521 else
12522 echo "$as_me: failed program was:" >&5
12523 cat "conftest.$ac_ext" >&5
12524 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12525
12526 echo "${as_me:-configure}:12526: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12527
12528 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12529 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12530
12531 echo "${as_me:-configure}:12531: testing but keeping change to \$CPPFLAGS ..." 1>&5
12532
12533 fi
12534 CFLAGS="$cf_check_cflags"
12535 fi
12536 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12537 fi
12538
12539 fi
12540
12541 ### Look for network libraries first, since some functions (such as gethostname)
12542 ### are used in a lot of places.
12543 echo "$as_me:12543: checking if you want ssl library" >&5
12544 echo $ECHO_N "checking if you want ssl library... $ECHO_C" >&6
12545 if test "${cf_cv_use_libssl+set}" = set; then
12546 echo $ECHO_N "(cached) $ECHO_C" >&6
12547 else
12548
12549 # Check whether --with-ssl or --without-ssl was given.
12550 if test "${with_ssl+set}" = set; then
12551 withval="$with_ssl"
12552 cf_cv_use_libssl=$withval
12553 else
12554 cf_cv_use_libssl=no
12555 fi;
12556
12557 fi
12558 echo "$as_me:12558: result: $cf_cv_use_libssl" >&5
12559 echo "${ECHO_T}$cf_cv_use_libssl" >&6
12560
12561 echo "$as_me:12561: checking if you want gnutls support" >&5
12562 echo $ECHO_N "checking if you want gnutls support... $ECHO_C" >&6
12563 if test "${cf_cv_use_libgnutls+set}" = set; then
12564 echo $ECHO_N "(cached) $ECHO_C" >&6
12565 else
12566
12567 # Check whether --with-gnutls or --without-gnutls was given.
12568 if test "${with_gnutls+set}" = set; then
12569 withval="$with_gnutls"
12570 cf_cv_use_libgnutls=$withval
12571 else
12572 cf_cv_use_libgnutls=no
12573 fi;
12574
12575 fi
12576 echo "$as_me:12576: result: $cf_cv_use_libgnutls" >&5
12577 echo "${ECHO_T}$cf_cv_use_libgnutls" >&6
12578
12579 echo "$as_me:12579: checking if you want socks library" >&5
12580 echo $ECHO_N "checking if you want socks library... $ECHO_C" >&6
12581 if test "${cf_cv_use_libsocks+set}" = set; then
12582 echo $ECHO_N "(cached) $ECHO_C" >&6
12583 else
12584
12585 # Check whether --with-socks or --without-socks was given.
12586 if test "${with_socks+set}" = set; then
12587 withval="$with_socks"
12588 cf_cv_use_libsocks=$withval
12589 else
12590 cf_cv_use_libsocks=no
12591 fi;
12592
12593 fi
12594 echo "$as_me:12594: result: $cf_cv_use_libsocks" >&5
12595 echo "${ECHO_T}$cf_cv_use_libsocks" >&6
12596
12597 echo "$as_me:12597: checking if you want socks5 library" >&5
12598 echo $ECHO_N "checking if you want socks5 library... $ECHO_C" >&6
12599 if test "${cf_cv_use_libsocks5+set}" = set; then
12600 echo $ECHO_N "(cached) $ECHO_C" >&6
12601 else
12602
12603 # Check whether --with-socks5 or --without-socks5 was given.
12604 if test "${with_socks5+set}" = set; then
12605 withval="$with_socks5"
12606 cf_cv_use_libsocks5=$withval
12607 else
12608 cf_cv_use_libsocks5=no
12609 fi;
12610
12611 fi
12612 echo "$as_me:12612: result: $cf_cv_use_libsocks5" >&5
12613 echo "${ECHO_T}$cf_cv_use_libsocks5" >&6
12614
12615 if test "x$cf_cv_use_libsocks" != xno ; then
12616
12617 case "x$cf_cv_use_libsocks" in
12618 (xno|xyes|x)
12619 ;;
12620 (*)
12621
12622 for cf_searchpath in `echo "$cf_cv_use_libsocks" | tr $PATH_SEPARATOR ' '`; do
12623 if test -d "$cf_searchpath/include" ; then
12624
12625 if test -n "$cf_searchpath/include" ; then
12626 for cf_add_incdir in $cf_searchpath/include
12627 do
12628 while test "$cf_add_incdir" != /usr/include
12629 do
12630 if test -d "$cf_add_incdir"
12631 then
12632 cf_have_incdir=no
12633 if test -n "$CFLAGS$CPPFLAGS" ; then
12634 # a loop is needed to ensure we can add subdirs of existing dirs
12635 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12636 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12637 cf_have_incdir=yes; break
12638 fi
12639 done
12640 fi
12641
12642 if test "$cf_have_incdir" = no ; then
12643 if test "$cf_add_incdir" = /usr/local/include ; then
12644 if test "$GCC" = yes
12645 then
12646 cf_save_CPPFLAGS=$CPPFLAGS
12647
12648 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12649 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12650
12651 cat >"conftest.$ac_ext" <<_ACEOF
12652 #line 12652 "configure"
12653 #include "confdefs.h"
12654 #include <stdio.h>
12655 int
12656 main (void)
12657 {
12658 printf("Hello")
12659 ;
12660 return 0;
12661 }
12662 _ACEOF
12663 rm -f "conftest.$ac_objext"
12664 if { (eval echo "$as_me:12664: \"$ac_compile\"") >&5
12665 (eval $ac_compile) 2>&5
12666 ac_status=$?
12667 echo "$as_me:12667: \$? = $ac_status" >&5
12668 (exit "$ac_status"); } &&
12669 { ac_try='test -s "conftest.$ac_objext"'
12670 { (eval echo "$as_me:12670: \"$ac_try\"") >&5
12671 (eval $ac_try) 2>&5
12672 ac_status=$?
12673 echo "$as_me:12673: \$? = $ac_status" >&5
12674 (exit "$ac_status"); }; }; then
12675 :
12676 else
12677 echo "$as_me: failed program was:" >&5
12678 cat "conftest.$ac_ext" >&5
12679 cf_have_incdir=yes
12680 fi
12681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12682 CPPFLAGS=$cf_save_CPPFLAGS
12683 fi
12684 fi
12685 fi
12686
12687 if test "$cf_have_incdir" = no ; then
12688 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
12689
12690 echo "${as_me:-configure}:12690: testing adding $cf_add_incdir to include-path ..." 1>&5
12691
12692 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12693
12694 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12695 test "$cf_top_incdir" = "$cf_add_incdir" && break
12696 cf_add_incdir="$cf_top_incdir"
12697 else
12698 break
12699 fi
12700 else
12701 break
12702 fi
12703 done
12704 done
12705 fi
12706
12707 elif test -d "$cf_searchpath/../include" ; then
12708
12709 if test -n "$cf_searchpath/../include" ; then
12710 for cf_add_incdir in $cf_searchpath/../include
12711 do
12712 while test "$cf_add_incdir" != /usr/include
12713 do
12714 if test -d "$cf_add_incdir"
12715 then
12716 cf_have_incdir=no
12717 if test -n "$CFLAGS$CPPFLAGS" ; then
12718 # a loop is needed to ensure we can add subdirs of existing dirs
12719 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12720 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12721 cf_have_incdir=yes; break
12722 fi
12723 done
12724 fi
12725
12726 if test "$cf_have_incdir" = no ; then
12727 if test "$cf_add_incdir" = /usr/local/include ; then
12728 if test "$GCC" = yes
12729 then
12730 cf_save_CPPFLAGS=$CPPFLAGS
12731
12732 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12733 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12734
12735 cat >"conftest.$ac_ext" <<_ACEOF
12736 #line 12736 "configure"
12737 #include "confdefs.h"
12738 #include <stdio.h>
12739 int
12740 main (void)
12741 {
12742 printf("Hello")
12743 ;
12744 return 0;
12745 }
12746 _ACEOF
12747 rm -f "conftest.$ac_objext"
12748 if { (eval echo "$as_me:12748: \"$ac_compile\"") >&5
12749 (eval $ac_compile) 2>&5
12750 ac_status=$?
12751 echo "$as_me:12751: \$? = $ac_status" >&5
12752 (exit "$ac_status"); } &&
12753 { ac_try='test -s "conftest.$ac_objext"'
12754 { (eval echo "$as_me:12754: \"$ac_try\"") >&5
12755 (eval $ac_try) 2>&5
12756 ac_status=$?
12757 echo "$as_me:12757: \$? = $ac_status" >&5
12758 (exit "$ac_status"); }; }; then
12759 :
12760 else
12761 echo "$as_me: failed program was:" >&5
12762 cat "conftest.$ac_ext" >&5
12763 cf_have_incdir=yes
12764 fi
12765 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12766 CPPFLAGS=$cf_save_CPPFLAGS
12767 fi
12768 fi
12769 fi
12770
12771 if test "$cf_have_incdir" = no ; then
12772 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
12773
12774 echo "${as_me:-configure}:12774: testing adding $cf_add_incdir to include-path ..." 1>&5
12775
12776 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12777
12778 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12779 test "$cf_top_incdir" = "$cf_add_incdir" && break
12780 cf_add_incdir="$cf_top_incdir"
12781 else
12782 break
12783 fi
12784 else
12785 break
12786 fi
12787 done
12788 done
12789 fi
12790
12791 else
12792 { { echo "$as_me:12792: error: cannot find socks library under $cf_cv_use_libsocks" >&5
12793 echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
12794 { (exit 1); exit 1; }; }
12795 fi
12796 if test -d "$cf_searchpath/lib" ; then
12797
12798 if test -n "$cf_searchpath/lib" ; then
12799 for cf_add_libdir in $cf_searchpath/lib
12800 do
12801 if test "$cf_add_libdir" = /usr/lib ; then
12802 :
12803 elif test -d "$cf_add_libdir"
12804 then
12805 cf_have_libdir=no
12806 if test -n "$LDFLAGS$LIBS" ; then
12807 # a loop is needed to ensure we can add subdirs of existing dirs
12808 for cf_test_libdir in $LDFLAGS $LIBS ; do
12809 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12810 cf_have_libdir=yes; break
12811 fi
12812 done
12813 fi
12814 if test "$cf_have_libdir" = no ; then
12815 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
12816
12817 echo "${as_me:-configure}:12817: testing adding $cf_add_libdir to library-path ..." 1>&5
12818
12819 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12820 fi
12821 fi
12822 done
12823 fi
12824
12825 elif test -d "$cf_searchpath" ; then
12826
12827 if test -n "$cf_searchpath" ; then
12828 for cf_add_libdir in $cf_searchpath
12829 do
12830 if test "$cf_add_libdir" = /usr/lib ; then
12831 :
12832 elif test -d "$cf_add_libdir"
12833 then
12834 cf_have_libdir=no
12835 if test -n "$LDFLAGS$LIBS" ; then
12836 # a loop is needed to ensure we can add subdirs of existing dirs
12837 for cf_test_libdir in $LDFLAGS $LIBS ; do
12838 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12839 cf_have_libdir=yes; break
12840 fi
12841 done
12842 fi
12843 if test "$cf_have_libdir" = no ; then
12844 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
12845
12846 echo "${as_me:-configure}:12846: testing adding $cf_add_libdir to library-path ..." 1>&5
12847
12848 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12849 fi
12850 fi
12851 done
12852 fi
12853
12854 else
12855 { { echo "$as_me:12855: error: cannot find socks library under $cf_cv_use_libsocks" >&5
12856 echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
12857 { (exit 1); exit 1; }; }
12858 fi
12859 done
12860
12861 test -n "$verbose" && echo " setting path value for socks library to $cf_cv_use_libsocks" 1>&6
12862
12863 echo "${as_me:-configure}:12863: testing setting path value for socks library to $cf_cv_use_libsocks ..." 1>&5
12864
12865 ;;
12866 esac
12867
12868 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12869 # will be set on completion of the AC_LINK_IFELSE below.
12870 cf_cv_header_path_socks=
12871 cf_cv_library_path_socks=
12872
12873 echo "${as_me:-configure}:12873: testing Starting FIND_LINKAGE(socks,) ..." 1>&5
12874
12875 cf_save_LIBS="$LIBS"
12876
12877 cat >"conftest.$ac_ext" <<_ACEOF
12878 #line 12878 "configure"
12879 #include "confdefs.h"
12880
12881 #include <stdio.h>
12882
12883 int
12884 main (void)
12885 {
12886
12887 Raccept((char *)0)
12888
12889 ;
12890 return 0;
12891 }
12892 _ACEOF
12893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12894 if { (eval echo "$as_me:12894: \"$ac_link\"") >&5
12895 (eval $ac_link) 2>&5
12896 ac_status=$?
12897 echo "$as_me:12897: \$? = $ac_status" >&5
12898 (exit "$ac_status"); } &&
12899 { ac_try='test -s "conftest$ac_exeext"'
12900 { (eval echo "$as_me:12900: \"$ac_try\"") >&5
12901 (eval $ac_try) 2>&5
12902 ac_status=$?
12903 echo "$as_me:12903: \$? = $ac_status" >&5
12904 (exit "$ac_status"); }; }; then
12905
12906 cf_cv_find_linkage_socks=yes
12907 cf_cv_header_path_socks=/usr/include
12908 cf_cv_library_path_socks=/usr/lib
12909
12910 else
12911 echo "$as_me: failed program was:" >&5
12912 cat "conftest.$ac_ext" >&5
12913
12914 LIBS="-lsocks $cf_save_LIBS"
12915
12916 cat >"conftest.$ac_ext" <<_ACEOF
12917 #line 12917 "configure"
12918 #include "confdefs.h"
12919
12920 #include <stdio.h>
12921
12922 int
12923 main (void)
12924 {
12925
12926 Raccept((char *)0)
12927
12928 ;
12929 return 0;
12930 }
12931 _ACEOF
12932 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12933 if { (eval echo "$as_me:12933: \"$ac_link\"") >&5
12934 (eval $ac_link) 2>&5
12935 ac_status=$?
12936 echo "$as_me:12936: \$? = $ac_status" >&5
12937 (exit "$ac_status"); } &&
12938 { ac_try='test -s "conftest$ac_exeext"'
12939 { (eval echo "$as_me:12939: \"$ac_try\"") >&5
12940 (eval $ac_try) 2>&5
12941 ac_status=$?
12942 echo "$as_me:12942: \$? = $ac_status" >&5
12943 (exit "$ac_status"); }; }; then
12944
12945 cf_cv_find_linkage_socks=yes
12946 cf_cv_header_path_socks=/usr/include
12947 cf_cv_library_path_socks=/usr/lib
12948 cf_cv_library_file_socks="-lsocks"
12949
12950 else
12951 echo "$as_me: failed program was:" >&5
12952 cat "conftest.$ac_ext" >&5
12953
12954 cf_cv_find_linkage_socks=no
12955 LIBS="$cf_save_LIBS"
12956
12957 test -n "$verbose" && echo " find linkage for socks library" 1>&6
12958
12959 echo "${as_me:-configure}:12959: testing find linkage for socks library ..." 1>&5
12960
12961 echo "${as_me:-configure}:12961: testing Searching for headers in FIND_LINKAGE(socks,) ..." 1>&5
12962
12963 cf_save_CPPFLAGS="$CPPFLAGS"
12964 cf_test_CPPFLAGS="$CPPFLAGS"
12965
12966 cf_search=
12967
12968 # collect the current set of include-directories from compiler flags
12969 cf_header_path_list=""
12970 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12971 for cf_header_path in $CPPFLAGS $CFLAGS
12972 do
12973 case "$cf_header_path" in
12974 (-I*)
12975 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12976
12977 test "x$cf_header_path" != "xNONE" && \
12978 test -d "$cf_header_path" && \
12979 {
12980 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
12981 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
12982 test -d "$cf_header_path/include/socks" && cf_search="$cf_search $cf_header_path/include/socks"
12983 test -d "$cf_header_path/include/socks/include" && cf_search="$cf_search $cf_header_path/include/socks/include"
12984 test -d "$cf_header_path/socks/include" && cf_search="$cf_search $cf_header_path/socks/include"
12985 test -d "$cf_header_path/socks/include/socks" && cf_search="$cf_search $cf_header_path/socks/include/socks"
12986 }
12987
12988 cf_header_path_list="$cf_header_path_list $cf_search"
12989 ;;
12990 esac
12991 done
12992 fi
12993
12994 # add the variations for the package we are looking for
12995
12996 cf_search=
12997
12998 test "x$prefix" != "xNONE" && \
12999 test -d "$prefix" && \
13000 {
13001 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
13002 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
13003 test -d "$prefix/include/socks" && cf_search="$cf_search $prefix/include/socks"
13004 test -d "$prefix/include/socks/include" && cf_search="$cf_search $prefix/include/socks/include"
13005 test -d "$prefix/socks/include" && cf_search="$cf_search $prefix/socks/include"
13006 test -d "$prefix/socks/include/socks" && cf_search="$cf_search $prefix/socks/include/socks"
13007 }
13008
13009 for cf_subdir_prefix in \
13010 /usr \
13011 /usr/local \
13012 /usr/pkg \
13013 /opt \
13014 /opt/local \
13015 $HOME
13016 do
13017
13018 test "x$cf_subdir_prefix" != "x$prefix" && \
13019 test -d "$cf_subdir_prefix" && \
13020 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13021 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
13022 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
13023 test -d "$cf_subdir_prefix/include/socks" && cf_search="$cf_search $cf_subdir_prefix/include/socks"
13024 test -d "$cf_subdir_prefix/include/socks/include" && cf_search="$cf_search $cf_subdir_prefix/include/socks/include"
13025 test -d "$cf_subdir_prefix/socks/include" && cf_search="$cf_search $cf_subdir_prefix/socks/include"
13026 test -d "$cf_subdir_prefix/socks/include/socks" && cf_search="$cf_search $cf_subdir_prefix/socks/include/socks"
13027 }
13028
13029 done
13030
13031 test "$includedir" != NONE && \
13032 test "$includedir" != "/usr/include" && \
13033 test -d "$includedir" && {
13034 test -d "$includedir" && cf_search="$cf_search $includedir"
13035 test -d "$includedir/socks" && cf_search="$cf_search $includedir/socks"
13036 }
13037
13038 test "$oldincludedir" != NONE && \
13039 test "$oldincludedir" != "/usr/include" && \
13040 test -d "$oldincludedir" && {
13041 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
13042 test -d "$oldincludedir/socks" && cf_search="$cf_search $oldincludedir/socks"
13043 }
13044
13045 cf_search="$cf_search $cf_header_path_list"
13046
13047 for cf_cv_header_path_socks in $cf_search
13048 do
13049 if test -d "$cf_cv_header_path_socks" ; then
13050 test -n "$verbose" && echo " ... testing $cf_cv_header_path_socks" 1>&6
13051
13052 echo "${as_me:-configure}:13052: testing ... testing $cf_cv_header_path_socks ..." 1>&5
13053
13054 CPPFLAGS="$cf_save_CPPFLAGS"
13055
13056 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13057 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_socks"
13058
13059 cat >"conftest.$ac_ext" <<_ACEOF
13060 #line 13060 "configure"
13061 #include "confdefs.h"
13062
13063 #include <stdio.h>
13064
13065 int
13066 main (void)
13067 {
13068
13069 Raccept((char *)0)
13070
13071 ;
13072 return 0;
13073 }
13074 _ACEOF
13075 rm -f "conftest.$ac_objext"
13076 if { (eval echo "$as_me:13076: \"$ac_compile\"") >&5
13077 (eval $ac_compile) 2>&5
13078 ac_status=$?
13079 echo "$as_me:13079: \$? = $ac_status" >&5
13080 (exit "$ac_status"); } &&
13081 { ac_try='test -s "conftest.$ac_objext"'
13082 { (eval echo "$as_me:13082: \"$ac_try\"") >&5
13083 (eval $ac_try) 2>&5
13084 ac_status=$?
13085 echo "$as_me:13085: \$? = $ac_status" >&5
13086 (exit "$ac_status"); }; }; then
13087
13088 test -n "$verbose" && echo " ... found socks headers in $cf_cv_header_path_socks" 1>&6
13089
13090 echo "${as_me:-configure}:13090: testing ... found socks headers in $cf_cv_header_path_socks ..." 1>&5
13091
13092 cf_cv_find_linkage_socks=maybe
13093 cf_test_CPPFLAGS="$CPPFLAGS"
13094 break
13095 else
13096 echo "$as_me: failed program was:" >&5
13097 cat "conftest.$ac_ext" >&5
13098
13099 CPPFLAGS="$cf_save_CPPFLAGS"
13100
13101 fi
13102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13103 fi
13104 done
13105
13106 if test "$cf_cv_find_linkage_socks" = maybe ; then
13107
13108 echo "${as_me:-configure}:13108: testing Searching for socks library in FIND_LINKAGE(socks,) ..." 1>&5
13109
13110 cf_save_LIBS="$LIBS"
13111 cf_save_LDFLAGS="$LDFLAGS"
13112
13113 if test "$cf_cv_find_linkage_socks" != yes ; then
13114
13115 cf_search=
13116 cf_library_path_list=""
13117 if test -n "${LDFLAGS}${LIBS}" ; then
13118 for cf_library_path in $LDFLAGS $LIBS
13119 do
13120 case "$cf_library_path" in
13121 (-L*)
13122 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13123
13124 test "x$cf_library_path" != "xNONE" && \
13125 test -d "$cf_library_path" && \
13126 {
13127 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
13128 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
13129 test -d "$cf_library_path/lib/socks" && cf_search="$cf_search $cf_library_path/lib/socks"
13130 test -d "$cf_library_path/lib/socks/lib" && cf_search="$cf_search $cf_library_path/lib/socks/lib"
13131 test -d "$cf_library_path/socks/lib" && cf_search="$cf_search $cf_library_path/socks/lib"
13132 test -d "$cf_library_path/socks/lib/socks" && cf_search="$cf_search $cf_library_path/socks/lib/socks"
13133 }
13134
13135 cf_library_path_list="$cf_library_path_list $cf_search"
13136 ;;
13137 esac
13138 done
13139 fi
13140
13141 cf_search=
13142
13143 test "x$prefix" != "xNONE" && \
13144 test -d "$prefix" && \
13145 {
13146 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
13147 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
13148 test -d "$prefix/lib/socks" && cf_search="$cf_search $prefix/lib/socks"
13149 test -d "$prefix/lib/socks/lib" && cf_search="$cf_search $prefix/lib/socks/lib"
13150 test -d "$prefix/socks/lib" && cf_search="$cf_search $prefix/socks/lib"
13151 test -d "$prefix/socks/lib/socks" && cf_search="$cf_search $prefix/socks/lib/socks"
13152 }
13153
13154 for cf_subdir_prefix in \
13155 /usr \
13156 /usr/local \
13157 /usr/pkg \
13158 /opt \
13159 /opt/local \
13160 $HOME
13161 do
13162
13163 test "x$cf_subdir_prefix" != "x$prefix" && \
13164 test -d "$cf_subdir_prefix" && \
13165 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13166 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
13167 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
13168 test -d "$cf_subdir_prefix/lib/socks" && cf_search="$cf_search $cf_subdir_prefix/lib/socks"
13169 test -d "$cf_subdir_prefix/lib/socks/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/socks/lib"
13170 test -d "$cf_subdir_prefix/socks/lib" && cf_search="$cf_search $cf_subdir_prefix/socks/lib"
13171 test -d "$cf_subdir_prefix/socks/lib/socks" && cf_search="$cf_search $cf_subdir_prefix/socks/lib/socks"
13172 }
13173
13174 done
13175
13176 cf_search="$cf_library_path_list $cf_search"
13177
13178 for cf_cv_library_path_socks in $cf_search
13179 do
13180 if test -d "$cf_cv_library_path_socks" ; then
13181 test -n "$verbose" && echo " ... testing $cf_cv_library_path_socks" 1>&6
13182
13183 echo "${as_me:-configure}:13183: testing ... testing $cf_cv_library_path_socks ..." 1>&5
13184
13185 CPPFLAGS="$cf_test_CPPFLAGS"
13186 LIBS="-lsocks $cf_save_LIBS"
13187 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_socks"
13188 cat >"conftest.$ac_ext" <<_ACEOF
13189 #line 13189 "configure"
13190 #include "confdefs.h"
13191
13192 #include <stdio.h>
13193
13194 int
13195 main (void)
13196 {
13197
13198 Raccept((char *)0)
13199
13200 ;
13201 return 0;
13202 }
13203 _ACEOF
13204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13205 if { (eval echo "$as_me:13205: \"$ac_link\"") >&5
13206 (eval $ac_link) 2>&5
13207 ac_status=$?
13208 echo "$as_me:13208: \$? = $ac_status" >&5
13209 (exit "$ac_status"); } &&
13210 { ac_try='test -s "conftest$ac_exeext"'
13211 { (eval echo "$as_me:13211: \"$ac_try\"") >&5
13212 (eval $ac_try) 2>&5
13213 ac_status=$?
13214 echo "$as_me:13214: \$? = $ac_status" >&5
13215 (exit "$ac_status"); }; }; then
13216
13217 test -n "$verbose" && echo " ... found socks library in $cf_cv_library_path_socks" 1>&6
13218
13219 echo "${as_me:-configure}:13219: testing ... found socks library in $cf_cv_library_path_socks ..." 1>&5
13220
13221 cf_cv_find_linkage_socks=yes
13222 cf_cv_library_file_socks="-lsocks"
13223 break
13224 else
13225 echo "$as_me: failed program was:" >&5
13226 cat "conftest.$ac_ext" >&5
13227
13228 CPPFLAGS="$cf_save_CPPFLAGS"
13229 LIBS="$cf_save_LIBS"
13230 LDFLAGS="$cf_save_LDFLAGS"
13231
13232 fi
13233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13234 fi
13235 done
13236 CPPFLAGS="$cf_save_CPPFLAGS"
13237 LDFLAGS="$cf_save_LDFLAGS"
13238 fi
13239
13240 else
13241 cf_cv_find_linkage_socks=no
13242 fi
13243
13244 fi
13245 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13246
13247 fi
13248 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13249
13250 LIBS="$cf_save_LIBS"
13251
13252 if test "$cf_cv_find_linkage_socks" = yes ; then
13253
13254 if test -n "$cf_cv_header_path_socks" ; then
13255 for cf_add_incdir in $cf_cv_header_path_socks
13256 do
13257 while test "$cf_add_incdir" != /usr/include
13258 do
13259 if test -d "$cf_add_incdir"
13260 then
13261 cf_have_incdir=no
13262 if test -n "$CFLAGS$CPPFLAGS" ; then
13263 # a loop is needed to ensure we can add subdirs of existing dirs
13264 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13265 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13266 cf_have_incdir=yes; break
13267 fi
13268 done
13269 fi
13270
13271 if test "$cf_have_incdir" = no ; then
13272 if test "$cf_add_incdir" = /usr/local/include ; then
13273 if test "$GCC" = yes
13274 then
13275 cf_save_CPPFLAGS=$CPPFLAGS
13276
13277 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13278 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13279
13280 cat >"conftest.$ac_ext" <<_ACEOF
13281 #line 13281 "configure"
13282 #include "confdefs.h"
13283 #include <stdio.h>
13284 int
13285 main (void)
13286 {
13287 printf("Hello")
13288 ;
13289 return 0;
13290 }
13291 _ACEOF
13292 rm -f "conftest.$ac_objext"
13293 if { (eval echo "$as_me:13293: \"$ac_compile\"") >&5
13294 (eval $ac_compile) 2>&5
13295 ac_status=$?
13296 echo "$as_me:13296: \$? = $ac_status" >&5
13297 (exit "$ac_status"); } &&
13298 { ac_try='test -s "conftest.$ac_objext"'
13299 { (eval echo "$as_me:13299: \"$ac_try\"") >&5
13300 (eval $ac_try) 2>&5
13301 ac_status=$?
13302 echo "$as_me:13302: \$? = $ac_status" >&5
13303 (exit "$ac_status"); }; }; then
13304 :
13305 else
13306 echo "$as_me: failed program was:" >&5
13307 cat "conftest.$ac_ext" >&5
13308 cf_have_incdir=yes
13309 fi
13310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13311 CPPFLAGS=$cf_save_CPPFLAGS
13312 fi
13313 fi
13314 fi
13315
13316 if test "$cf_have_incdir" = no ; then
13317 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
13318
13319 echo "${as_me:-configure}:13319: testing adding $cf_add_incdir to include-path ..." 1>&5
13320
13321 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13322
13323 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13324 test "$cf_top_incdir" = "$cf_add_incdir" && break
13325 cf_add_incdir="$cf_top_incdir"
13326 else
13327 break
13328 fi
13329 else
13330 break
13331 fi
13332 done
13333 done
13334 fi
13335
13336 if test -n "$cf_cv_library_path_socks" ; then
13337 for cf_add_libdir in $cf_cv_library_path_socks
13338 do
13339 if test "$cf_add_libdir" = /usr/lib ; then
13340 :
13341 elif test -d "$cf_add_libdir"
13342 then
13343 cf_have_libdir=no
13344 if test -n "$LDFLAGS$LIBS" ; then
13345 # a loop is needed to ensure we can add subdirs of existing dirs
13346 for cf_test_libdir in $LDFLAGS $LIBS ; do
13347 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13348 cf_have_libdir=yes; break
13349 fi
13350 done
13351 fi
13352 if test "$cf_have_libdir" = no ; then
13353 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
13354
13355 echo "${as_me:-configure}:13355: testing adding $cf_add_libdir to library-path ..." 1>&5
13356
13357 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13358 fi
13359 fi
13360 done
13361 fi
13362
13363 cf_add_libs="$LIBS"
13364 # reverse order
13365 cf_add_0lib=
13366 for cf_add_1lib in -lsocks; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13367 # filter duplicates
13368 for cf_add_1lib in $cf_add_0lib; do
13369 for cf_add_2lib in $cf_add_libs; do
13370 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13371 cf_add_1lib=
13372 break
13373 fi
13374 done
13375 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13376 done
13377 LIBS="$cf_add_libs"
13378
13379 else
13380 { echo "$as_me:13380: WARNING: Cannot find socks library" >&5
13381 echo "$as_me: WARNING: Cannot find socks library" >&2;}
13382 fi
13383
13384 if test "x$cf_cv_find_linkage_socks" = "xyes" ; then
13385
13386 cat >>confdefs.h <<\EOF
13387 #define SOCKS 1
13388 EOF
13389
13390 cat >>confdefs.h <<\EOF
13391 #define accept Raccept
13392 EOF
13393
13394 cat >>confdefs.h <<\EOF
13395 #define bind Rbind
13396 EOF
13397
13398 cat >>confdefs.h <<\EOF
13399 #define connect Rconnect
13400 EOF
13401
13402 cat >>confdefs.h <<\EOF
13403 #define getpeername Rgetpeername
13404 EOF
13405
13406 cat >>confdefs.h <<\EOF
13407 #define getsockname Rgetsockname
13408 EOF
13409
13410 cat >>confdefs.h <<\EOF
13411 #define listen Rlisten
13412 EOF
13413
13414 cat >>confdefs.h <<\EOF
13415 #define recvfrom Rrecvfrom
13416 EOF
13417
13418 cat >>confdefs.h <<\EOF
13419 #define select Rselect
13420 EOF
13421
13422 else
13423 { { echo "$as_me:13423: error: cannot link with socks library" >&5
13424 echo "$as_me: error: cannot link with socks library" >&2;}
13425 { (exit 1); exit 1; }; }
13426 fi
13427
13428 elif test "x$cf_cv_use_libsocks5" != xno ; then
13429
13430 case "x$cf_cv_use_libsocks5" in
13431 (xno|xyes|x)
13432 ;;
13433 (*)
13434
13435 for cf_searchpath in `echo "$cf_cv_use_libsocks5" | tr $PATH_SEPARATOR ' '`; do
13436 if test -d "$cf_searchpath/include" ; then
13437
13438 if test -n "$cf_searchpath/include" ; then
13439 for cf_add_incdir in $cf_searchpath/include
13440 do
13441 while test "$cf_add_incdir" != /usr/include
13442 do
13443 if test -d "$cf_add_incdir"
13444 then
13445 cf_have_incdir=no
13446 if test -n "$CFLAGS$CPPFLAGS" ; then
13447 # a loop is needed to ensure we can add subdirs of existing dirs
13448 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13449 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13450 cf_have_incdir=yes; break
13451 fi
13452 done
13453 fi
13454
13455 if test "$cf_have_incdir" = no ; then
13456 if test "$cf_add_incdir" = /usr/local/include ; then
13457 if test "$GCC" = yes
13458 then
13459 cf_save_CPPFLAGS=$CPPFLAGS
13460
13461 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13462 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13463
13464 cat >"conftest.$ac_ext" <<_ACEOF
13465 #line 13465 "configure"
13466 #include "confdefs.h"
13467 #include <stdio.h>
13468 int
13469 main (void)
13470 {
13471 printf("Hello")
13472 ;
13473 return 0;
13474 }
13475 _ACEOF
13476 rm -f "conftest.$ac_objext"
13477 if { (eval echo "$as_me:13477: \"$ac_compile\"") >&5
13478 (eval $ac_compile) 2>&5
13479 ac_status=$?
13480 echo "$as_me:13480: \$? = $ac_status" >&5
13481 (exit "$ac_status"); } &&
13482 { ac_try='test -s "conftest.$ac_objext"'
13483 { (eval echo "$as_me:13483: \"$ac_try\"") >&5
13484 (eval $ac_try) 2>&5
13485 ac_status=$?
13486 echo "$as_me:13486: \$? = $ac_status" >&5
13487 (exit "$ac_status"); }; }; then
13488 :
13489 else
13490 echo "$as_me: failed program was:" >&5
13491 cat "conftest.$ac_ext" >&5
13492 cf_have_incdir=yes
13493 fi
13494 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13495 CPPFLAGS=$cf_save_CPPFLAGS
13496 fi
13497 fi
13498 fi
13499
13500 if test "$cf_have_incdir" = no ; then
13501 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
13502
13503 echo "${as_me:-configure}:13503: testing adding $cf_add_incdir to include-path ..." 1>&5
13504
13505 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13506
13507 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13508 test "$cf_top_incdir" = "$cf_add_incdir" && break
13509 cf_add_incdir="$cf_top_incdir"
13510 else
13511 break
13512 fi
13513 else
13514 break
13515 fi
13516 done
13517 done
13518 fi
13519
13520 elif test -d "$cf_searchpath/../include" ; then
13521
13522 if test -n "$cf_searchpath/../include" ; then
13523 for cf_add_incdir in $cf_searchpath/../include
13524 do
13525 while test "$cf_add_incdir" != /usr/include
13526 do
13527 if test -d "$cf_add_incdir"
13528 then
13529 cf_have_incdir=no
13530 if test -n "$CFLAGS$CPPFLAGS" ; then
13531 # a loop is needed to ensure we can add subdirs of existing dirs
13532 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13533 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13534 cf_have_incdir=yes; break
13535 fi
13536 done
13537 fi
13538
13539 if test "$cf_have_incdir" = no ; then
13540 if test "$cf_add_incdir" = /usr/local/include ; then
13541 if test "$GCC" = yes
13542 then
13543 cf_save_CPPFLAGS=$CPPFLAGS
13544
13545 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13546 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13547
13548 cat >"conftest.$ac_ext" <<_ACEOF
13549 #line 13549 "configure"
13550 #include "confdefs.h"
13551 #include <stdio.h>
13552 int
13553 main (void)
13554 {
13555 printf("Hello")
13556 ;
13557 return 0;
13558 }
13559 _ACEOF
13560 rm -f "conftest.$ac_objext"
13561 if { (eval echo "$as_me:13561: \"$ac_compile\"") >&5
13562 (eval $ac_compile) 2>&5
13563 ac_status=$?
13564 echo "$as_me:13564: \$? = $ac_status" >&5
13565 (exit "$ac_status"); } &&
13566 { ac_try='test -s "conftest.$ac_objext"'
13567 { (eval echo "$as_me:13567: \"$ac_try\"") >&5
13568 (eval $ac_try) 2>&5
13569 ac_status=$?
13570 echo "$as_me:13570: \$? = $ac_status" >&5
13571 (exit "$ac_status"); }; }; then
13572 :
13573 else
13574 echo "$as_me: failed program was:" >&5
13575 cat "conftest.$ac_ext" >&5
13576 cf_have_incdir=yes
13577 fi
13578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13579 CPPFLAGS=$cf_save_CPPFLAGS
13580 fi
13581 fi
13582 fi
13583
13584 if test "$cf_have_incdir" = no ; then
13585 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
13586
13587 echo "${as_me:-configure}:13587: testing adding $cf_add_incdir to include-path ..." 1>&5
13588
13589 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13590
13591 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13592 test "$cf_top_incdir" = "$cf_add_incdir" && break
13593 cf_add_incdir="$cf_top_incdir"
13594 else
13595 break
13596 fi
13597 else
13598 break
13599 fi
13600 done
13601 done
13602 fi
13603
13604 else
13605 { { echo "$as_me:13605: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
13606 echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
13607 { (exit 1); exit 1; }; }
13608 fi
13609 if test -d "$cf_searchpath/lib" ; then
13610
13611 if test -n "$cf_searchpath/lib" ; then
13612 for cf_add_libdir in $cf_searchpath/lib
13613 do
13614 if test "$cf_add_libdir" = /usr/lib ; then
13615 :
13616 elif test -d "$cf_add_libdir"
13617 then
13618 cf_have_libdir=no
13619 if test -n "$LDFLAGS$LIBS" ; then
13620 # a loop is needed to ensure we can add subdirs of existing dirs
13621 for cf_test_libdir in $LDFLAGS $LIBS ; do
13622 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13623 cf_have_libdir=yes; break
13624 fi
13625 done
13626 fi
13627 if test "$cf_have_libdir" = no ; then
13628 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
13629
13630 echo "${as_me:-configure}:13630: testing adding $cf_add_libdir to library-path ..." 1>&5
13631
13632 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13633 fi
13634 fi
13635 done
13636 fi
13637
13638 elif test -d "$cf_searchpath" ; then
13639
13640 if test -n "$cf_searchpath" ; then
13641 for cf_add_libdir in $cf_searchpath
13642 do
13643 if test "$cf_add_libdir" = /usr/lib ; then
13644 :
13645 elif test -d "$cf_add_libdir"
13646 then
13647 cf_have_libdir=no
13648 if test -n "$LDFLAGS$LIBS" ; then
13649 # a loop is needed to ensure we can add subdirs of existing dirs
13650 for cf_test_libdir in $LDFLAGS $LIBS ; do
13651 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13652 cf_have_libdir=yes; break
13653 fi
13654 done
13655 fi
13656 if test "$cf_have_libdir" = no ; then
13657 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
13658
13659 echo "${as_me:-configure}:13659: testing adding $cf_add_libdir to library-path ..." 1>&5
13660
13661 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13662 fi
13663 fi
13664 done
13665 fi
13666
13667 else
13668 { { echo "$as_me:13668: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
13669 echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
13670 { (exit 1); exit 1; }; }
13671 fi
13672 done
13673
13674 test -n "$verbose" && echo " setting path value for socks5 library to $cf_cv_use_libsocks5" 1>&6
13675
13676 echo "${as_me:-configure}:13676: testing setting path value for socks5 library to $cf_cv_use_libsocks5 ..." 1>&5
13677
13678 ;;
13679 esac
13680
13681 echo "$as_me:13681: checking for SOCKSinit in -lsocks5" >&5
13682 echo $ECHO_N "checking for SOCKSinit in -lsocks5... $ECHO_C" >&6
13683 if test "${ac_cv_lib_socks5_SOCKSinit+set}" = set; then
13684 echo $ECHO_N "(cached) $ECHO_C" >&6
13685 else
13686 ac_check_lib_save_LIBS=$LIBS
13687 LIBS="-lsocks5 $LIBS"
13688 cat >"conftest.$ac_ext" <<_ACEOF
13689 #line 13689 "configure"
13690 #include "confdefs.h"
13691
13692 /* Override any gcc2 internal prototype to avoid an error. */
13693 #ifdef __cplusplus
13694 extern "C"
13695 #endif
13696 /* We use char because int might match the return type of a gcc2
13697 builtin and then its argument prototype would still apply. */
13698 char SOCKSinit (void);
13699 int
13700 main (void)
13701 {
13702 SOCKSinit ();
13703 ;
13704 return 0;
13705 }
13706 _ACEOF
13707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13708 if { (eval echo "$as_me:13708: \"$ac_link\"") >&5
13709 (eval $ac_link) 2>&5
13710 ac_status=$?
13711 echo "$as_me:13711: \$? = $ac_status" >&5
13712 (exit "$ac_status"); } &&
13713 { ac_try='test -s "conftest$ac_exeext"'
13714 { (eval echo "$as_me:13714: \"$ac_try\"") >&5
13715 (eval $ac_try) 2>&5
13716 ac_status=$?
13717 echo "$as_me:13717: \$? = $ac_status" >&5
13718 (exit "$ac_status"); }; }; then
13719 ac_cv_lib_socks5_SOCKSinit=yes
13720 else
13721 echo "$as_me: failed program was:" >&5
13722 cat "conftest.$ac_ext" >&5
13723 ac_cv_lib_socks5_SOCKSinit=no
13724 fi
13725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13726 LIBS=$ac_check_lib_save_LIBS
13727 fi
13728 echo "$as_me:13728: result: $ac_cv_lib_socks5_SOCKSinit" >&5
13729 echo "${ECHO_T}$ac_cv_lib_socks5_SOCKSinit" >&6
13730 if test "$ac_cv_lib_socks5_SOCKSinit" = yes; then
13731 cf_cv_socks_lib=socks5
13732 else
13733
13734 echo "$as_me:13734: checking for SOCKSinit in -lsocksd" >&5
13735 echo $ECHO_N "checking for SOCKSinit in -lsocksd... $ECHO_C" >&6
13736 if test "${ac_cv_lib_socksd_SOCKSinit+set}" = set; then
13737 echo $ECHO_N "(cached) $ECHO_C" >&6
13738 else
13739 ac_check_lib_save_LIBS=$LIBS
13740 LIBS="-lsocksd $LIBS"
13741 cat >"conftest.$ac_ext" <<_ACEOF
13742 #line 13742 "configure"
13743 #include "confdefs.h"
13744
13745 /* Override any gcc2 internal prototype to avoid an error. */
13746 #ifdef __cplusplus
13747 extern "C"
13748 #endif
13749 /* We use char because int might match the return type of a gcc2
13750 builtin and then its argument prototype would still apply. */
13751 char SOCKSinit (void);
13752 int
13753 main (void)
13754 {
13755 SOCKSinit ();
13756 ;
13757 return 0;
13758 }
13759 _ACEOF
13760 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13761 if { (eval echo "$as_me:13761: \"$ac_link\"") >&5
13762 (eval $ac_link) 2>&5
13763 ac_status=$?
13764 echo "$as_me:13764: \$? = $ac_status" >&5
13765 (exit "$ac_status"); } &&
13766 { ac_try='test -s "conftest$ac_exeext"'
13767 { (eval echo "$as_me:13767: \"$ac_try\"") >&5
13768 (eval $ac_try) 2>&5
13769 ac_status=$?
13770 echo "$as_me:13770: \$? = $ac_status" >&5
13771 (exit "$ac_status"); }; }; then
13772 ac_cv_lib_socksd_SOCKSinit=yes
13773 else
13774 echo "$as_me: failed program was:" >&5
13775 cat "conftest.$ac_ext" >&5
13776 ac_cv_lib_socksd_SOCKSinit=no
13777 fi
13778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13779 LIBS=$ac_check_lib_save_LIBS
13780 fi
13781 echo "$as_me:13781: result: $ac_cv_lib_socksd_SOCKSinit" >&5
13782 echo "${ECHO_T}$ac_cv_lib_socksd_SOCKSinit" >&6
13783 if test "$ac_cv_lib_socksd_SOCKSinit" = yes; then
13784 cf_cv_socks_lib=socksd
13785 else
13786
13787 echo "$as_me:13787: checking for SOCKSinit in -lsocks" >&5
13788 echo $ECHO_N "checking for SOCKSinit in -lsocks... $ECHO_C" >&6
13789 if test "${ac_cv_lib_socks_SOCKSinit+set}" = set; then
13790 echo $ECHO_N "(cached) $ECHO_C" >&6
13791 else
13792 ac_check_lib_save_LIBS=$LIBS
13793 LIBS="-lsocks $LIBS"
13794 cat >"conftest.$ac_ext" <<_ACEOF
13795 #line 13795 "configure"
13796 #include "confdefs.h"
13797
13798 /* Override any gcc2 internal prototype to avoid an error. */
13799 #ifdef __cplusplus
13800 extern "C"
13801 #endif
13802 /* We use char because int might match the return type of a gcc2
13803 builtin and then its argument prototype would still apply. */
13804 char SOCKSinit (void);
13805 int
13806 main (void)
13807 {
13808 SOCKSinit ();
13809 ;
13810 return 0;
13811 }
13812 _ACEOF
13813 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13814 if { (eval echo "$as_me:13814: \"$ac_link\"") >&5
13815 (eval $ac_link) 2>&5
13816 ac_status=$?
13817 echo "$as_me:13817: \$? = $ac_status" >&5
13818 (exit "$ac_status"); } &&
13819 { ac_try='test -s "conftest$ac_exeext"'
13820 { (eval echo "$as_me:13820: \"$ac_try\"") >&5
13821 (eval $ac_try) 2>&5
13822 ac_status=$?
13823 echo "$as_me:13823: \$? = $ac_status" >&5
13824 (exit "$ac_status"); }; }; then
13825 ac_cv_lib_socks_SOCKSinit=yes
13826 else
13827 echo "$as_me: failed program was:" >&5
13828 cat "conftest.$ac_ext" >&5
13829 ac_cv_lib_socks_SOCKSinit=no
13830 fi
13831 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13832 LIBS=$ac_check_lib_save_LIBS
13833 fi
13834 echo "$as_me:13834: result: $ac_cv_lib_socks_SOCKSinit" >&5
13835 echo "${ECHO_T}$ac_cv_lib_socks_SOCKSinit" >&6
13836 if test "$ac_cv_lib_socks_SOCKSinit" = yes; then
13837 cf_cv_socks_lib=socks
13838 else
13839
13840 cf_cv_socks_lib=no
13841 fi
13842
13843 fi
13844
13845 fi
13846
13847 if test "$cf_cv_socks_lib" = no ; then
13848 { { echo "$as_me:13848: error: cannot find socks5 library" >&5
13849 echo "$as_me: error: cannot find socks5 library" >&2;}
13850 { (exit 1); exit 1; }; }
13851 else
13852
13853 cf_add_libs="$LIBS"
13854 # reverse order
13855 cf_add_0lib=
13856 for cf_add_1lib in -l$cf_cv_socks_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13857 # filter duplicates
13858 for cf_add_1lib in $cf_add_0lib; do
13859 for cf_add_2lib in $cf_add_libs; do
13860 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13861 cf_add_1lib=
13862 break
13863 fi
13864 done
13865 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13866 done
13867 LIBS="$cf_add_libs"
13868
13869 fi
13870
13871 cat >>confdefs.h <<\EOF
13872 #define USE_SOCKS5 1
13873 EOF
13874
13875 cat >>confdefs.h <<\EOF
13876 #define SOCKS 1
13877 EOF
13878
13879 echo "$as_me:13879: checking if the socks library uses socks4 prefix" >&5
13880 echo $ECHO_N "checking if the socks library uses socks4 prefix... $ECHO_C" >&6
13881 if test "${cf_use_socks4+set}" = set; then
13882 echo $ECHO_N "(cached) $ECHO_C" >&6
13883 else
13884
13885 cf_use_socks4=error
13886 cat >"conftest.$ac_ext" <<_ACEOF
13887 #line 13887 "configure"
13888 #include "confdefs.h"
13889
13890 #include <socks.h>
13891 int
13892 main (void)
13893 {
13894
13895 Rinit((char *)0)
13896 ;
13897 return 0;
13898 }
13899 _ACEOF
13900 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13901 if { (eval echo "$as_me:13901: \"$ac_link\"") >&5
13902 (eval $ac_link) 2>&5
13903 ac_status=$?
13904 echo "$as_me:13904: \$? = $ac_status" >&5
13905 (exit "$ac_status"); } &&
13906 { ac_try='test -s "conftest$ac_exeext"'
13907 { (eval echo "$as_me:13907: \"$ac_try\"") >&5
13908 (eval $ac_try) 2>&5
13909 ac_status=$?
13910 echo "$as_me:13910: \$? = $ac_status" >&5
13911 (exit "$ac_status"); }; }; then
13912 cf_use_socks4=yes
13913 else
13914 echo "$as_me: failed program was:" >&5
13915 cat "conftest.$ac_ext" >&5
13916 cat >"conftest.$ac_ext" <<_ACEOF
13917 #line 13917 "configure"
13918 #include "confdefs.h"
13919 #include <socks.h>
13920 int
13921 main (void)
13922 {
13923 SOCKSinit((char *)0)
13924 ;
13925 return 0;
13926 }
13927 _ACEOF
13928 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13929 if { (eval echo "$as_me:13929: \"$ac_link\"") >&5
13930 (eval $ac_link) 2>&5
13931 ac_status=$?
13932 echo "$as_me:13932: \$? = $ac_status" >&5
13933 (exit "$ac_status"); } &&
13934 { ac_try='test -s "conftest$ac_exeext"'
13935 { (eval echo "$as_me:13935: \"$ac_try\"") >&5
13936 (eval $ac_try) 2>&5
13937 ac_status=$?
13938 echo "$as_me:13938: \$? = $ac_status" >&5
13939 (exit "$ac_status"); }; }; then
13940 cf_use_socks4=no
13941 else
13942 echo "$as_me: failed program was:" >&5
13943 cat "conftest.$ac_ext" >&5
13944 fi
13945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13946 fi
13947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13948 fi
13949 echo "$as_me:13949: result: $cf_use_socks4" >&5
13950 echo "${ECHO_T}$cf_use_socks4" >&6
13951
13952 if test "$cf_use_socks4" = "yes" ; then
13953
13954 cat >>confdefs.h <<\EOF
13955 #define USE_SOCKS4_PREFIX 1
13956 EOF
13957
13958 cat >>confdefs.h <<\EOF
13959 #define accept Raccept
13960 EOF
13961
13962 cat >>confdefs.h <<\EOF
13963 #define bind Rbind
13964 EOF
13965
13966 cat >>confdefs.h <<\EOF
13967 #define connect Rconnect
13968 EOF
13969
13970 cat >>confdefs.h <<\EOF
13971 #define getpeername Rgetpeername
13972 EOF
13973
13974 cat >>confdefs.h <<\EOF
13975 #define getsockname Rgetsockname
13976 EOF
13977
13978 cat >>confdefs.h <<\EOF
13979 #define listen Rlisten
13980 EOF
13981
13982 cat >>confdefs.h <<\EOF
13983 #define recvfrom Rrecvfrom
13984 EOF
13985
13986 cat >>confdefs.h <<\EOF
13987 #define select Rselect
13988 EOF
13989
13990 elif test "$cf_use_socks4" = "no" ; then
13991 cat >>confdefs.h <<\EOF
13992 #define accept SOCKSaccept
13993 EOF
13994
13995 cat >>confdefs.h <<\EOF
13996 #define getpeername SOCKSgetpeername
13997 EOF
13998
13999 cat >>confdefs.h <<\EOF
14000 #define getsockname SOCKSgetsockname
14001 EOF
14002
14003 cat >>confdefs.h <<\EOF
14004 #define recvfrom SOCKSrecvfrom
14005 EOF
14006
14007 else
14008 { { echo "$as_me:14008: error: Cannot link with socks5 library" >&5
14009 echo "$as_me: error: Cannot link with socks5 library" >&2;}
14010 { (exit 1); exit 1; }; }
14011 fi
14012
14013 echo "$as_me:14013: checking if socks5p.h is available" >&5
14014 echo $ECHO_N "checking if socks5p.h is available... $ECHO_C" >&6
14015 cat >"conftest.$ac_ext" <<_ACEOF
14016 #line 14016 "configure"
14017 #include "confdefs.h"
14018
14019 #define INCLUDE_PROTOTYPES
14020 #include <socks.h>
14021 int
14022 main (void)
14023 {
14024
14025 init((char *)0)
14026 ;
14027 return 0;
14028 }
14029 _ACEOF
14030 rm -f "conftest.$ac_objext"
14031 if { (eval echo "$as_me:14031: \"$ac_compile\"") >&5
14032 (eval $ac_compile) 2>&5
14033 ac_status=$?
14034 echo "$as_me:14034: \$? = $ac_status" >&5
14035 (exit "$ac_status"); } &&
14036 { ac_try='test -s "conftest.$ac_objext"'
14037 { (eval echo "$as_me:14037: \"$ac_try\"") >&5
14038 (eval $ac_try) 2>&5
14039 ac_status=$?
14040 echo "$as_me:14040: \$? = $ac_status" >&5
14041 (exit "$ac_status"); }; }; then
14042 cf_use_socks5p_h=yes
14043 else
14044 echo "$as_me: failed program was:" >&5
14045 cat "conftest.$ac_ext" >&5
14046 cf_use_socks5p_h=no
14047 fi
14048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14049 echo "$as_me:14049: result: $cf_use_socks5p_h" >&5
14050 echo "${ECHO_T}$cf_use_socks5p_h" >&6
14051
14052 test "$cf_use_socks5p_h" = yes &&
14053 cat >>confdefs.h <<\EOF
14054 #define INCLUDE_PROTOTYPES 1
14055 EOF
14056
14057 else
14058 cf_cv_socks_lib=no
14059
14060 cf_test_netlibs=no
14061
14062 echo "$as_me:14062: checking for network libraries" >&5
14063 echo $ECHO_N "checking for network libraries... $ECHO_C" >&6
14064
14065 if test "${cf_cv_netlibs+set}" = set; then
14066 echo $ECHO_N "(cached) $ECHO_C" >&6
14067 else
14068
14069 echo "$as_me:14069: result: working..." >&5
14070 echo "${ECHO_T}working..." >&6
14071
14072 cf_cv_netlibs=""
14073 cf_test_netlibs=yes
14074
14075 case "$host_os" in
14076 (mingw*)
14077
14078 for ac_header in windows.h winsock.h winsock2.h
14079 do
14080 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14081 echo "$as_me:14081: checking for $ac_header" >&5
14082 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14083 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14084 echo $ECHO_N "(cached) $ECHO_C" >&6
14085 else
14086 cat >"conftest.$ac_ext" <<_ACEOF
14087 #line 14087 "configure"
14088 #include "confdefs.h"
14089 #include <$ac_header>
14090 _ACEOF
14091 if { (eval echo "$as_me:14091: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14092 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14093 ac_status=$?
14094 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14095 rm -f conftest.er1
14096 cat conftest.err >&5
14097 echo "$as_me:14097: \$? = $ac_status" >&5
14098 (exit "$ac_status"); } >/dev/null; then
14099 if test -s conftest.err; then
14100 ac_cpp_err=$ac_c_preproc_warn_flag
14101 else
14102 ac_cpp_err=
14103 fi
14104 else
14105 ac_cpp_err=yes
14106 fi
14107 if test -z "$ac_cpp_err"; then
14108 eval "$as_ac_Header=yes"
14109 else
14110 echo "$as_me: failed program was:" >&5
14111 cat "conftest.$ac_ext" >&5
14112 eval "$as_ac_Header=no"
14113 fi
14114 rm -f conftest.err "conftest.$ac_ext"
14115 fi
14116 echo "$as_me:14116: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14117 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14118 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14119 cat >>confdefs.h <<EOF
14120 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14121 EOF
14122
14123 fi
14124 done
14125
14126 if test "$ac_cv_header_winsock2_h" = "yes" ; then
14127 cf_winsock_lib="-lws2_32"
14128 elif test "$ac_cv_header_winsock_h" = "yes" ; then
14129 cf_winsock_lib="-lwsock32"
14130 fi
14131
14132 cf_save_LIBS="$LIBS"
14133
14134 cf_add_libs="$LIBS"
14135 # reverse order
14136 cf_add_0lib=
14137 for cf_add_1lib in $cf_winsock_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14138 # filter duplicates
14139 for cf_add_1lib in $cf_add_0lib; do
14140 for cf_add_2lib in $cf_add_libs; do
14141 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14142 cf_add_1lib=
14143 break
14144 fi
14145 done
14146 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14147 done
14148 LIBS="$cf_add_libs"
14149
14150 cat >"conftest.$ac_ext" <<_ACEOF
14151 #line 14151 "configure"
14152 #include "confdefs.h"
14153
14154 #ifdef HAVE_WINDOWS_H
14155 #undef WIN32_LEAN_AND_MEAN
14156 #define WIN32_LEAN_AND_MEAN
14157 #include <windows.h>
14158 #ifdef HAVE_WINSOCK2_H
14159 #include <winsock2.h>
14160 #else
14161 #ifdef HAVE_WINSOCK_H
14162 #include <winsock.h>
14163 #endif
14164 #endif
14165 #endif
14166
14167 int
14168 main (void)
14169 {
14170
14171 char buffer[1024];
14172 gethostname(buffer, sizeof(buffer));
14173 ;
14174 return 0;
14175 }
14176 _ACEOF
14177 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14178 if { (eval echo "$as_me:14178: \"$ac_link\"") >&5
14179 (eval $ac_link) 2>&5
14180 ac_status=$?
14181 echo "$as_me:14181: \$? = $ac_status" >&5
14182 (exit "$ac_status"); } &&
14183 { ac_try='test -s "conftest$ac_exeext"'
14184 { (eval echo "$as_me:14184: \"$ac_try\"") >&5
14185 (eval $ac_try) 2>&5
14186 ac_status=$?
14187 echo "$as_me:14187: \$? = $ac_status" >&5
14188 (exit "$ac_status"); }; }; then
14189 cf_cv_netlibs="$cf_winsock_lib $cf_cv_netlibs"
14190 else
14191 echo "$as_me: failed program was:" >&5
14192 cat "conftest.$ac_ext" >&5
14193 { { echo "$as_me:14193: error: Cannot link against winsock library" >&5
14194 echo "$as_me: error: Cannot link against winsock library" >&2;}
14195 { (exit 1); exit 1; }; }
14196 fi
14197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14198
14199 LIBS="$cf_save_LIBS"
14200 ;;
14201 (*)
14202
14203 for ac_func in gethostname
14204 do
14205 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14206 echo "$as_me:14206: checking for $ac_func" >&5
14207 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14208 if eval "test \"\${$as_ac_var+set}\" = set"; then
14209 echo $ECHO_N "(cached) $ECHO_C" >&6
14210 else
14211 cat >"conftest.$ac_ext" <<_ACEOF
14212 #line 14212 "configure"
14213 #include "confdefs.h"
14214 #define $ac_func autoconf_temporary
14215 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14216 #undef $ac_func
14217
14218 #ifdef __cplusplus
14219 extern "C"
14220 #endif
14221
14222 /* We use char because int might match the return type of a gcc2
14223 builtin and then its argument prototype would still apply. */
14224 char $ac_func (void);
14225
14226 int
14227 main (void)
14228 {
14229
14230 /* The GNU C library defines stubs for functions which it implements
14231 to always fail with ENOSYS. Some functions are actually named
14232 something starting with __ and the normal name is an alias. */
14233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14234 #error found stub for $ac_func
14235 #endif
14236
14237 return $ac_func ();
14238 ;
14239 return 0;
14240 }
14241 _ACEOF
14242 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14243 if { (eval echo "$as_me:14243: \"$ac_link\"") >&5
14244 (eval $ac_link) 2>&5
14245 ac_status=$?
14246 echo "$as_me:14246: \$? = $ac_status" >&5
14247 (exit "$ac_status"); } &&
14248 { ac_try='test -s "conftest$ac_exeext"'
14249 { (eval echo "$as_me:14249: \"$ac_try\"") >&5
14250 (eval $ac_try) 2>&5
14251 ac_status=$?
14252 echo "$as_me:14252: \$? = $ac_status" >&5
14253 (exit "$ac_status"); }; }; then
14254 eval "$as_ac_var=yes"
14255 else
14256 echo "$as_me: failed program was:" >&5
14257 cat "conftest.$ac_ext" >&5
14258 eval "$as_ac_var=no"
14259 fi
14260 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14261 fi
14262 echo "$as_me:14262: result: `eval echo '${'"$as_ac_var"'}'`" >&5
14263 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
14264 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
14265 cat >>confdefs.h <<EOF
14266 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14267 EOF
14268
14269 else
14270
14271 echo "$as_me:14271: checking for gethostname in -lnsl" >&5
14272 echo $ECHO_N "checking for gethostname in -lnsl... $ECHO_C" >&6
14273 if test "${ac_cv_lib_nsl_gethostname+set}" = set; then
14274 echo $ECHO_N "(cached) $ECHO_C" >&6
14275 else
14276 ac_check_lib_save_LIBS=$LIBS
14277 LIBS="-lnsl $cf_cv_netlibs $LIBS"
14278 cat >"conftest.$ac_ext" <<_ACEOF
14279 #line 14279 "configure"
14280 #include "confdefs.h"
14281
14282 /* Override any gcc2 internal prototype to avoid an error. */
14283 #ifdef __cplusplus
14284 extern "C"
14285 #endif
14286 /* We use char because int might match the return type of a gcc2
14287 builtin and then its argument prototype would still apply. */
14288 char gethostname (void);
14289 int
14290 main (void)
14291 {
14292 gethostname ();
14293 ;
14294 return 0;
14295 }
14296 _ACEOF
14297 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14298 if { (eval echo "$as_me:14298: \"$ac_link\"") >&5
14299 (eval $ac_link) 2>&5
14300 ac_status=$?
14301 echo "$as_me:14301: \$? = $ac_status" >&5
14302 (exit "$ac_status"); } &&
14303 { ac_try='test -s "conftest$ac_exeext"'
14304 { (eval echo "$as_me:14304: \"$ac_try\"") >&5
14305 (eval $ac_try) 2>&5
14306 ac_status=$?
14307 echo "$as_me:14307: \$? = $ac_status" >&5
14308 (exit "$ac_status"); }; }; then
14309 ac_cv_lib_nsl_gethostname=yes
14310 else
14311 echo "$as_me: failed program was:" >&5
14312 cat "conftest.$ac_ext" >&5
14313 ac_cv_lib_nsl_gethostname=no
14314 fi
14315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14316 LIBS=$ac_check_lib_save_LIBS
14317 fi
14318 echo "$as_me:14318: result: $ac_cv_lib_nsl_gethostname" >&5
14319 echo "${ECHO_T}$ac_cv_lib_nsl_gethostname" >&6
14320 if test "$ac_cv_lib_nsl_gethostname" = yes; then
14321
14322 cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14323
14324 cat >>confdefs.h <<EOF
14325 #define HAVE_$cf_tr_func 1
14326 EOF
14327
14328 ac_cv_func_gethostname=yes
14329 if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
14330 else
14331
14332 ac_cv_func_gethostname=unknown
14333 unset ac_cv_func_gethostname 2>/dev/null
14334
14335 echo "$as_me:14335: checking for gethostname in -lsocket" >&5
14336 echo $ECHO_N "checking for gethostname in -lsocket... $ECHO_C" >&6
14337 if test "${ac_cv_lib_socket_gethostname+set}" = set; then
14338 echo $ECHO_N "(cached) $ECHO_C" >&6
14339 else
14340 ac_check_lib_save_LIBS=$LIBS
14341 LIBS="-lsocket $cf_cv_netlibs $LIBS"
14342 cat >"conftest.$ac_ext" <<_ACEOF
14343 #line 14343 "configure"
14344 #include "confdefs.h"
14345
14346 /* Override any gcc2 internal prototype to avoid an error. */
14347 #ifdef __cplusplus
14348 extern "C"
14349 #endif
14350 /* We use char because int might match the return type of a gcc2
14351 builtin and then its argument prototype would still apply. */
14352 char gethostname (void);
14353 int
14354 main (void)
14355 {
14356 gethostname ();
14357 ;
14358 return 0;
14359 }
14360 _ACEOF
14361 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14362 if { (eval echo "$as_me:14362: \"$ac_link\"") >&5
14363 (eval $ac_link) 2>&5
14364 ac_status=$?
14365 echo "$as_me:14365: \$? = $ac_status" >&5
14366 (exit "$ac_status"); } &&
14367 { ac_try='test -s "conftest$ac_exeext"'
14368 { (eval echo "$as_me:14368: \"$ac_try\"") >&5
14369 (eval $ac_try) 2>&5
14370 ac_status=$?
14371 echo "$as_me:14371: \$? = $ac_status" >&5
14372 (exit "$ac_status"); }; }; then
14373 ac_cv_lib_socket_gethostname=yes
14374 else
14375 echo "$as_me: failed program was:" >&5
14376 cat "conftest.$ac_ext" >&5
14377 ac_cv_lib_socket_gethostname=no
14378 fi
14379 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14380 LIBS=$ac_check_lib_save_LIBS
14381 fi
14382 echo "$as_me:14382: result: $ac_cv_lib_socket_gethostname" >&5
14383 echo "${ECHO_T}$ac_cv_lib_socket_gethostname" >&6
14384 if test "$ac_cv_lib_socket_gethostname" = yes; then
14385
14386 cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14387
14388 cat >>confdefs.h <<EOF
14389 #define HAVE_$cf_tr_func 1
14390 EOF
14391
14392 ac_cv_func_gethostname=yes
14393 if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
14394 else
14395
14396 ac_cv_func_gethostname=unknown
14397 unset ac_cv_func_gethostname 2>/dev/null
14398
14399 fi
14400
14401 fi
14402
14403 fi
14404 done
14405
14406 echo "$as_me:14406: checking for inet_ntoa in -linet" >&5
14407 echo $ECHO_N "checking for inet_ntoa in -linet... $ECHO_C" >&6
14408 if test "${ac_cv_lib_inet_inet_ntoa+set}" = set; then
14409 echo $ECHO_N "(cached) $ECHO_C" >&6
14410 else
14411 ac_check_lib_save_LIBS=$LIBS
14412 LIBS="-linet $LIBS"
14413 cat >"conftest.$ac_ext" <<_ACEOF
14414 #line 14414 "configure"
14415 #include "confdefs.h"
14416
14417 /* Override any gcc2 internal prototype to avoid an error. */
14418 #ifdef __cplusplus
14419 extern "C"
14420 #endif
14421 /* We use char because int might match the return type of a gcc2
14422 builtin and then its argument prototype would still apply. */
14423 char inet_ntoa (void);
14424 int
14425 main (void)
14426 {
14427 inet_ntoa ();
14428 ;
14429 return 0;
14430 }
14431 _ACEOF
14432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14433 if { (eval echo "$as_me:14433: \"$ac_link\"") >&5
14434 (eval $ac_link) 2>&5
14435 ac_status=$?
14436 echo "$as_me:14436: \$? = $ac_status" >&5
14437 (exit "$ac_status"); } &&
14438 { ac_try='test -s "conftest$ac_exeext"'
14439 { (eval echo "$as_me:14439: \"$ac_try\"") >&5
14440 (eval $ac_try) 2>&5
14441 ac_status=$?
14442 echo "$as_me:14442: \$? = $ac_status" >&5
14443 (exit "$ac_status"); }; }; then
14444 ac_cv_lib_inet_inet_ntoa=yes
14445 else
14446 echo "$as_me: failed program was:" >&5
14447 cat "conftest.$ac_ext" >&5
14448 ac_cv_lib_inet_inet_ntoa=no
14449 fi
14450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14451 LIBS=$ac_check_lib_save_LIBS
14452 fi
14453 echo "$as_me:14453: result: $ac_cv_lib_inet_inet_ntoa" >&5
14454 echo "${ECHO_T}$ac_cv_lib_inet_inet_ntoa" >&6
14455 if test "$ac_cv_lib_inet_inet_ntoa" = yes; then
14456 cf_cv_netlibs="-linet $cf_cv_netlibs"
14457 fi
14458
14459 if test "$ac_cv_func_lsocket" != no ; then
14460
14461 for ac_func in socket
14462 do
14463 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14464 echo "$as_me:14464: checking for $ac_func" >&5
14465 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14466 if eval "test \"\${$as_ac_var+set}\" = set"; then
14467 echo $ECHO_N "(cached) $ECHO_C" >&6
14468 else
14469 cat >"conftest.$ac_ext" <<_ACEOF
14470 #line 14470 "configure"
14471 #include "confdefs.h"
14472 #define $ac_func autoconf_temporary
14473 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14474 #undef $ac_func
14475
14476 #ifdef __cplusplus
14477 extern "C"
14478 #endif
14479
14480 /* We use char because int might match the return type of a gcc2
14481 builtin and then its argument prototype would still apply. */
14482 char $ac_func (void);
14483
14484 int
14485 main (void)
14486 {
14487
14488 /* The GNU C library defines stubs for functions which it implements
14489 to always fail with ENOSYS. Some functions are actually named
14490 something starting with __ and the normal name is an alias. */
14491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14492 #error found stub for $ac_func
14493 #endif
14494
14495 return $ac_func ();
14496 ;
14497 return 0;
14498 }
14499 _ACEOF
14500 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14501 if { (eval echo "$as_me:14501: \"$ac_link\"") >&5
14502 (eval $ac_link) 2>&5
14503 ac_status=$?
14504 echo "$as_me:14504: \$? = $ac_status" >&5
14505 (exit "$ac_status"); } &&
14506 { ac_try='test -s "conftest$ac_exeext"'
14507 { (eval echo "$as_me:14507: \"$ac_try\"") >&5
14508 (eval $ac_try) 2>&5
14509 ac_status=$?
14510 echo "$as_me:14510: \$? = $ac_status" >&5
14511 (exit "$ac_status"); }; }; then
14512 eval "$as_ac_var=yes"
14513 else
14514 echo "$as_me: failed program was:" >&5
14515 cat "conftest.$ac_ext" >&5
14516 eval "$as_ac_var=no"
14517 fi
14518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14519 fi
14520 echo "$as_me:14520: result: `eval echo '${'"$as_ac_var"'}'`" >&5
14521 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
14522 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
14523 cat >>confdefs.h <<EOF
14524 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14525 EOF
14526
14527 else
14528
14529 echo "$as_me:14529: checking for socket in -lsocket" >&5
14530 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
14531 if test "${ac_cv_lib_socket_socket+set}" = set; then
14532 echo $ECHO_N "(cached) $ECHO_C" >&6
14533 else
14534 ac_check_lib_save_LIBS=$LIBS
14535 LIBS="-lsocket $cf_cv_netlibs $LIBS"
14536 cat >"conftest.$ac_ext" <<_ACEOF
14537 #line 14537 "configure"
14538 #include "confdefs.h"
14539
14540 /* Override any gcc2 internal prototype to avoid an error. */
14541 #ifdef __cplusplus
14542 extern "C"
14543 #endif
14544 /* We use char because int might match the return type of a gcc2
14545 builtin and then its argument prototype would still apply. */
14546 char socket (void);
14547 int
14548 main (void)
14549 {
14550 socket ();
14551 ;
14552 return 0;
14553 }
14554 _ACEOF
14555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14556 if { (eval echo "$as_me:14556: \"$ac_link\"") >&5
14557 (eval $ac_link) 2>&5
14558 ac_status=$?
14559 echo "$as_me:14559: \$? = $ac_status" >&5
14560 (exit "$ac_status"); } &&
14561 { ac_try='test -s "conftest$ac_exeext"'
14562 { (eval echo "$as_me:14562: \"$ac_try\"") >&5
14563 (eval $ac_try) 2>&5
14564 ac_status=$?
14565 echo "$as_me:14565: \$? = $ac_status" >&5
14566 (exit "$ac_status"); }; }; then
14567 ac_cv_lib_socket_socket=yes
14568 else
14569 echo "$as_me: failed program was:" >&5
14570 cat "conftest.$ac_ext" >&5
14571 ac_cv_lib_socket_socket=no
14572 fi
14573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14574 LIBS=$ac_check_lib_save_LIBS
14575 fi
14576 echo "$as_me:14576: result: $ac_cv_lib_socket_socket" >&5
14577 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
14578 if test "$ac_cv_lib_socket_socket" = yes; then
14579
14580 cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14581
14582 cat >>confdefs.h <<EOF
14583 #define HAVE_$cf_tr_func 1
14584 EOF
14585
14586 ac_cv_func_socket=yes
14587 if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
14588 else
14589
14590 ac_cv_func_socket=unknown
14591 unset ac_cv_func_socket 2>/dev/null
14592
14593 echo "$as_me:14593: checking for socket in -lbsd" >&5
14594 echo $ECHO_N "checking for socket in -lbsd... $ECHO_C" >&6
14595 if test "${ac_cv_lib_bsd_socket+set}" = set; then
14596 echo $ECHO_N "(cached) $ECHO_C" >&6
14597 else
14598 ac_check_lib_save_LIBS=$LIBS
14599 LIBS="-lbsd $cf_cv_netlibs $LIBS"
14600 cat >"conftest.$ac_ext" <<_ACEOF
14601 #line 14601 "configure"
14602 #include "confdefs.h"
14603
14604 /* Override any gcc2 internal prototype to avoid an error. */
14605 #ifdef __cplusplus
14606 extern "C"
14607 #endif
14608 /* We use char because int might match the return type of a gcc2
14609 builtin and then its argument prototype would still apply. */
14610 char socket (void);
14611 int
14612 main (void)
14613 {
14614 socket ();
14615 ;
14616 return 0;
14617 }
14618 _ACEOF
14619 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14620 if { (eval echo "$as_me:14620: \"$ac_link\"") >&5
14621 (eval $ac_link) 2>&5
14622 ac_status=$?
14623 echo "$as_me:14623: \$? = $ac_status" >&5
14624 (exit "$ac_status"); } &&
14625 { ac_try='test -s "conftest$ac_exeext"'
14626 { (eval echo "$as_me:14626: \"$ac_try\"") >&5
14627 (eval $ac_try) 2>&5
14628 ac_status=$?
14629 echo "$as_me:14629: \$? = $ac_status" >&5
14630 (exit "$ac_status"); }; }; then
14631 ac_cv_lib_bsd_socket=yes
14632 else
14633 echo "$as_me: failed program was:" >&5
14634 cat "conftest.$ac_ext" >&5
14635 ac_cv_lib_bsd_socket=no
14636 fi
14637 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14638 LIBS=$ac_check_lib_save_LIBS
14639 fi
14640 echo "$as_me:14640: result: $ac_cv_lib_bsd_socket" >&5
14641 echo "${ECHO_T}$ac_cv_lib_bsd_socket" >&6
14642 if test "$ac_cv_lib_bsd_socket" = yes; then
14643
14644 cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14645
14646 cat >>confdefs.h <<EOF
14647 #define HAVE_$cf_tr_func 1
14648 EOF
14649
14650 ac_cv_func_socket=yes
14651 if test "$cf_used_lib_bsd" != yes ; then cf_used_lib_bsd=yes; cf_cv_netlibs="-lbsd $cf_cv_netlibs"; fi
14652 else
14653
14654 ac_cv_func_socket=unknown
14655 unset ac_cv_func_socket 2>/dev/null
14656
14657 fi
14658
14659 fi
14660
14661 fi
14662 done
14663
14664 fi
14665
14666 for ac_func in gethostbyname
14667 do
14668 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14669 echo "$as_me:14669: checking for $ac_func" >&5
14670 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14671 if eval "test \"\${$as_ac_var+set}\" = set"; then
14672 echo $ECHO_N "(cached) $ECHO_C" >&6
14673 else
14674 cat >"conftest.$ac_ext" <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14677 #define $ac_func autoconf_temporary
14678 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14679 #undef $ac_func
14680
14681 #ifdef __cplusplus
14682 extern "C"
14683 #endif
14684
14685 /* We use char because int might match the return type of a gcc2
14686 builtin and then its argument prototype would still apply. */
14687 char $ac_func (void);
14688
14689 int
14690 main (void)
14691 {
14692
14693 /* The GNU C library defines stubs for functions which it implements
14694 to always fail with ENOSYS. Some functions are actually named
14695 something starting with __ and the normal name is an alias. */
14696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14697 #error found stub for $ac_func
14698 #endif
14699
14700 return $ac_func ();
14701 ;
14702 return 0;
14703 }
14704 _ACEOF
14705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14706 if { (eval echo "$as_me:14706: \"$ac_link\"") >&5
14707 (eval $ac_link) 2>&5
14708 ac_status=$?
14709 echo "$as_me:14709: \$? = $ac_status" >&5
14710 (exit "$ac_status"); } &&
14711 { ac_try='test -s "conftest$ac_exeext"'
14712 { (eval echo "$as_me:14712: \"$ac_try\"") >&5
14713 (eval $ac_try) 2>&5
14714 ac_status=$?
14715 echo "$as_me:14715: \$? = $ac_status" >&5
14716 (exit "$ac_status"); }; }; then
14717 eval "$as_ac_var=yes"
14718 else
14719 echo "$as_me: failed program was:" >&5
14720 cat "conftest.$ac_ext" >&5
14721 eval "$as_ac_var=no"
14722 fi
14723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14724 fi
14725 echo "$as_me:14725: result: `eval echo '${'"$as_ac_var"'}'`" >&5
14726 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
14727 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
14728 cat >>confdefs.h <<EOF
14729 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14730 EOF
14731
14732 else
14733
14734 echo "$as_me:14734: checking for gethostbyname in -lnsl" >&5
14735 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
14736 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
14737 echo $ECHO_N "(cached) $ECHO_C" >&6
14738 else
14739 ac_check_lib_save_LIBS=$LIBS
14740 LIBS="-lnsl $cf_cv_netlibs $LIBS"
14741 cat >"conftest.$ac_ext" <<_ACEOF
14742 #line 14742 "configure"
14743 #include "confdefs.h"
14744
14745 /* Override any gcc2 internal prototype to avoid an error. */
14746 #ifdef __cplusplus
14747 extern "C"
14748 #endif
14749 /* We use char because int might match the return type of a gcc2
14750 builtin and then its argument prototype would still apply. */
14751 char gethostbyname (void);
14752 int
14753 main (void)
14754 {
14755 gethostbyname ();
14756 ;
14757 return 0;
14758 }
14759 _ACEOF
14760 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14761 if { (eval echo "$as_me:14761: \"$ac_link\"") >&5
14762 (eval $ac_link) 2>&5
14763 ac_status=$?
14764 echo "$as_me:14764: \$? = $ac_status" >&5
14765 (exit "$ac_status"); } &&
14766 { ac_try='test -s "conftest$ac_exeext"'
14767 { (eval echo "$as_me:14767: \"$ac_try\"") >&5
14768 (eval $ac_try) 2>&5
14769 ac_status=$?
14770 echo "$as_me:14770: \$? = $ac_status" >&5
14771 (exit "$ac_status"); }; }; then
14772 ac_cv_lib_nsl_gethostbyname=yes
14773 else
14774 echo "$as_me: failed program was:" >&5
14775 cat "conftest.$ac_ext" >&5
14776 ac_cv_lib_nsl_gethostbyname=no
14777 fi
14778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14779 LIBS=$ac_check_lib_save_LIBS
14780 fi
14781 echo "$as_me:14781: result: $ac_cv_lib_nsl_gethostbyname" >&5
14782 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
14783 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
14784
14785 cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14786
14787 cat >>confdefs.h <<EOF
14788 #define HAVE_$cf_tr_func 1
14789 EOF
14790
14791 ac_cv_func_gethostbyname=yes
14792 if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
14793 else
14794
14795 ac_cv_func_gethostbyname=unknown
14796 unset ac_cv_func_gethostbyname 2>/dev/null
14797
14798 fi
14799
14800 fi
14801 done
14802
14803 for ac_func in inet_ntoa
14804 do
14805 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14806 echo "$as_me:14806: checking for $ac_func" >&5
14807 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14808 if eval "test \"\${$as_ac_var+set}\" = set"; then
14809 echo $ECHO_N "(cached) $ECHO_C" >&6
14810 else
14811 cat >"conftest.$ac_ext" <<_ACEOF
14812 #line 14812 "configure"
14813 #include "confdefs.h"
14814 #define $ac_func autoconf_temporary
14815 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14816 #undef $ac_func
14817
14818 #ifdef __cplusplus
14819 extern "C"
14820 #endif
14821
14822 /* We use char because int might match the return type of a gcc2
14823 builtin and then its argument prototype would still apply. */
14824 char $ac_func (void);
14825
14826 int
14827 main (void)
14828 {
14829
14830 /* The GNU C library defines stubs for functions which it implements
14831 to always fail with ENOSYS. Some functions are actually named
14832 something starting with __ and the normal name is an alias. */
14833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14834 #error found stub for $ac_func
14835 #endif
14836
14837 return $ac_func ();
14838 ;
14839 return 0;
14840 }
14841 _ACEOF
14842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14843 if { (eval echo "$as_me:14843: \"$ac_link\"") >&5
14844 (eval $ac_link) 2>&5
14845 ac_status=$?
14846 echo "$as_me:14846: \$? = $ac_status" >&5
14847 (exit "$ac_status"); } &&
14848 { ac_try='test -s "conftest$ac_exeext"'
14849 { (eval echo "$as_me:14849: \"$ac_try\"") >&5
14850 (eval $ac_try) 2>&5
14851 ac_status=$?
14852 echo "$as_me:14852: \$? = $ac_status" >&5
14853 (exit "$ac_status"); }; }; then
14854 eval "$as_ac_var=yes"
14855 else
14856 echo "$as_me: failed program was:" >&5
14857 cat "conftest.$ac_ext" >&5
14858 eval "$as_ac_var=no"
14859 fi
14860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14861 fi
14862 echo "$as_me:14862: result: `eval echo '${'"$as_ac_var"'}'`" >&5
14863 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
14864 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
14865 cat >>confdefs.h <<EOF
14866 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14867 EOF
14868
14869 else
14870
14871 echo "$as_me:14871: checking for inet_ntoa in -lnsl" >&5
14872 echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6
14873 if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
14874 echo $ECHO_N "(cached) $ECHO_C" >&6
14875 else
14876 ac_check_lib_save_LIBS=$LIBS
14877 LIBS="-lnsl $cf_cv_netlibs $LIBS"
14878 cat >"conftest.$ac_ext" <<_ACEOF
14879 #line 14879 "configure"
14880 #include "confdefs.h"
14881
14882 /* Override any gcc2 internal prototype to avoid an error. */
14883 #ifdef __cplusplus
14884 extern "C"
14885 #endif
14886 /* We use char because int might match the return type of a gcc2
14887 builtin and then its argument prototype would still apply. */
14888 char inet_ntoa (void);
14889 int
14890 main (void)
14891 {
14892 inet_ntoa ();
14893 ;
14894 return 0;
14895 }
14896 _ACEOF
14897 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14898 if { (eval echo "$as_me:14898: \"$ac_link\"") >&5
14899 (eval $ac_link) 2>&5
14900 ac_status=$?
14901 echo "$as_me:14901: \$? = $ac_status" >&5
14902 (exit "$ac_status"); } &&
14903 { ac_try='test -s "conftest$ac_exeext"'
14904 { (eval echo "$as_me:14904: \"$ac_try\"") >&5
14905 (eval $ac_try) 2>&5
14906 ac_status=$?
14907 echo "$as_me:14907: \$? = $ac_status" >&5
14908 (exit "$ac_status"); }; }; then
14909 ac_cv_lib_nsl_inet_ntoa=yes
14910 else
14911 echo "$as_me: failed program was:" >&5
14912 cat "conftest.$ac_ext" >&5
14913 ac_cv_lib_nsl_inet_ntoa=no
14914 fi
14915 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14916 LIBS=$ac_check_lib_save_LIBS
14917 fi
14918 echo "$as_me:14918: result: $ac_cv_lib_nsl_inet_ntoa" >&5
14919 echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6
14920 if test "$ac_cv_lib_nsl_inet_ntoa" = yes; then
14921
14922 cf_tr_func=`echo "inet_ntoa" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14923
14924 cat >>confdefs.h <<EOF
14925 #define HAVE_$cf_tr_func 1
14926 EOF
14927
14928 ac_cv_func_inet_ntoa=yes
14929 if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
14930 else
14931
14932 ac_cv_func_inet_ntoa=unknown
14933 unset ac_cv_func_inet_ntoa 2>/dev/null
14934
14935 fi
14936
14937 fi
14938 done
14939
14940 for ac_func in gethostbyname
14941 do
14942 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14943 echo "$as_me:14943: checking for $ac_func" >&5
14944 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14945 if eval "test \"\${$as_ac_var+set}\" = set"; then
14946 echo $ECHO_N "(cached) $ECHO_C" >&6
14947 else
14948 cat >"conftest.$ac_ext" <<_ACEOF
14949 #line 14949 "configure"
14950 #include "confdefs.h"
14951 #define $ac_func autoconf_temporary
14952 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14953 #undef $ac_func
14954
14955 #ifdef __cplusplus
14956 extern "C"
14957 #endif
14958
14959 /* We use char because int might match the return type of a gcc2
14960 builtin and then its argument prototype would still apply. */
14961 char $ac_func (void);
14962
14963 int
14964 main (void)
14965 {
14966
14967 /* The GNU C library defines stubs for functions which it implements
14968 to always fail with ENOSYS. Some functions are actually named
14969 something starting with __ and the normal name is an alias. */
14970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14971 #error found stub for $ac_func
14972 #endif
14973
14974 return $ac_func ();
14975 ;
14976 return 0;
14977 }
14978 _ACEOF
14979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14980 if { (eval echo "$as_me:14980: \"$ac_link\"") >&5
14981 (eval $ac_link) 2>&5
14982 ac_status=$?
14983 echo "$as_me:14983: \$? = $ac_status" >&5
14984 (exit "$ac_status"); } &&
14985 { ac_try='test -s "conftest$ac_exeext"'
14986 { (eval echo "$as_me:14986: \"$ac_try\"") >&5
14987 (eval $ac_try) 2>&5
14988 ac_status=$?
14989 echo "$as_me:14989: \$? = $ac_status" >&5
14990 (exit "$ac_status"); }; }; then
14991 eval "$as_ac_var=yes"
14992 else
14993 echo "$as_me: failed program was:" >&5
14994 cat "conftest.$ac_ext" >&5
14995 eval "$as_ac_var=no"
14996 fi
14997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14998 fi
14999 echo "$as_me:14999: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15000 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15001 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15002 cat >>confdefs.h <<EOF
15003 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15004 EOF
15005
15006 else
15007
15008 echo "$as_me:15008: checking for gethostbyname in -lnetwork" >&5
15009 echo $ECHO_N "checking for gethostbyname in -lnetwork... $ECHO_C" >&6
15010 if test "${ac_cv_lib_network_gethostbyname+set}" = set; then
15011 echo $ECHO_N "(cached) $ECHO_C" >&6
15012 else
15013 ac_check_lib_save_LIBS=$LIBS
15014 LIBS="-lnetwork $cf_cv_netlibs $LIBS"
15015 cat >"conftest.$ac_ext" <<_ACEOF
15016 #line 15016 "configure"
15017 #include "confdefs.h"
15018
15019 /* Override any gcc2 internal prototype to avoid an error. */
15020 #ifdef __cplusplus
15021 extern "C"
15022 #endif
15023 /* We use char because int might match the return type of a gcc2
15024 builtin and then its argument prototype would still apply. */
15025 char gethostbyname (void);
15026 int
15027 main (void)
15028 {
15029 gethostbyname ();
15030 ;
15031 return 0;
15032 }
15033 _ACEOF
15034 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15035 if { (eval echo "$as_me:15035: \"$ac_link\"") >&5
15036 (eval $ac_link) 2>&5
15037 ac_status=$?
15038 echo "$as_me:15038: \$? = $ac_status" >&5
15039 (exit "$ac_status"); } &&
15040 { ac_try='test -s "conftest$ac_exeext"'
15041 { (eval echo "$as_me:15041: \"$ac_try\"") >&5
15042 (eval $ac_try) 2>&5
15043 ac_status=$?
15044 echo "$as_me:15044: \$? = $ac_status" >&5
15045 (exit "$ac_status"); }; }; then
15046 ac_cv_lib_network_gethostbyname=yes
15047 else
15048 echo "$as_me: failed program was:" >&5
15049 cat "conftest.$ac_ext" >&5
15050 ac_cv_lib_network_gethostbyname=no
15051 fi
15052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15053 LIBS=$ac_check_lib_save_LIBS
15054 fi
15055 echo "$as_me:15055: result: $ac_cv_lib_network_gethostbyname" >&5
15056 echo "${ECHO_T}$ac_cv_lib_network_gethostbyname" >&6
15057 if test "$ac_cv_lib_network_gethostbyname" = yes; then
15058
15059 cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15060
15061 cat >>confdefs.h <<EOF
15062 #define HAVE_$cf_tr_func 1
15063 EOF
15064
15065 ac_cv_func_gethostbyname=yes
15066 if test "$cf_used_lib_network" != yes ; then cf_used_lib_network=yes; cf_cv_netlibs="-lnetwork $cf_cv_netlibs"; fi
15067 else
15068
15069 ac_cv_func_gethostbyname=unknown
15070 unset ac_cv_func_gethostbyname 2>/dev/null
15071
15072 fi
15073
15074 fi
15075 done
15076
15077 for ac_func in strcasecmp
15078 do
15079 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15080 echo "$as_me:15080: checking for $ac_func" >&5
15081 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15082 if eval "test \"\${$as_ac_var+set}\" = set"; then
15083 echo $ECHO_N "(cached) $ECHO_C" >&6
15084 else
15085 cat >"conftest.$ac_ext" <<_ACEOF
15086 #line 15086 "configure"
15087 #include "confdefs.h"
15088 #define $ac_func autoconf_temporary
15089 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15090 #undef $ac_func
15091
15092 #ifdef __cplusplus
15093 extern "C"
15094 #endif
15095
15096 /* We use char because int might match the return type of a gcc2
15097 builtin and then its argument prototype would still apply. */
15098 char $ac_func (void);
15099
15100 int
15101 main (void)
15102 {
15103
15104 /* The GNU C library defines stubs for functions which it implements
15105 to always fail with ENOSYS. Some functions are actually named
15106 something starting with __ and the normal name is an alias. */
15107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15108 #error found stub for $ac_func
15109 #endif
15110
15111 return $ac_func ();
15112 ;
15113 return 0;
15114 }
15115 _ACEOF
15116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15117 if { (eval echo "$as_me:15117: \"$ac_link\"") >&5
15118 (eval $ac_link) 2>&5
15119 ac_status=$?
15120 echo "$as_me:15120: \$? = $ac_status" >&5
15121 (exit "$ac_status"); } &&
15122 { ac_try='test -s "conftest$ac_exeext"'
15123 { (eval echo "$as_me:15123: \"$ac_try\"") >&5
15124 (eval $ac_try) 2>&5
15125 ac_status=$?
15126 echo "$as_me:15126: \$? = $ac_status" >&5
15127 (exit "$ac_status"); }; }; then
15128 eval "$as_ac_var=yes"
15129 else
15130 echo "$as_me: failed program was:" >&5
15131 cat "conftest.$ac_ext" >&5
15132 eval "$as_ac_var=no"
15133 fi
15134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15135 fi
15136 echo "$as_me:15136: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15137 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15138 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15139 cat >>confdefs.h <<EOF
15140 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15141 EOF
15142
15143 else
15144
15145 echo "$as_me:15145: checking for strcasecmp in -lresolv" >&5
15146 echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
15147 if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
15148 echo $ECHO_N "(cached) $ECHO_C" >&6
15149 else
15150 ac_check_lib_save_LIBS=$LIBS
15151 LIBS="-lresolv $cf_cv_netlibs $LIBS"
15152 cat >"conftest.$ac_ext" <<_ACEOF
15153 #line 15153 "configure"
15154 #include "confdefs.h"
15155
15156 /* Override any gcc2 internal prototype to avoid an error. */
15157 #ifdef __cplusplus
15158 extern "C"
15159 #endif
15160 /* We use char because int might match the return type of a gcc2
15161 builtin and then its argument prototype would still apply. */
15162 char strcasecmp (void);
15163 int
15164 main (void)
15165 {
15166 strcasecmp ();
15167 ;
15168 return 0;
15169 }
15170 _ACEOF
15171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15172 if { (eval echo "$as_me:15172: \"$ac_link\"") >&5
15173 (eval $ac_link) 2>&5
15174 ac_status=$?
15175 echo "$as_me:15175: \$? = $ac_status" >&5
15176 (exit "$ac_status"); } &&
15177 { ac_try='test -s "conftest$ac_exeext"'
15178 { (eval echo "$as_me:15178: \"$ac_try\"") >&5
15179 (eval $ac_try) 2>&5
15180 ac_status=$?
15181 echo "$as_me:15181: \$? = $ac_status" >&5
15182 (exit "$ac_status"); }; }; then
15183 ac_cv_lib_resolv_strcasecmp=yes
15184 else
15185 echo "$as_me: failed program was:" >&5
15186 cat "conftest.$ac_ext" >&5
15187 ac_cv_lib_resolv_strcasecmp=no
15188 fi
15189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15190 LIBS=$ac_check_lib_save_LIBS
15191 fi
15192 echo "$as_me:15192: result: $ac_cv_lib_resolv_strcasecmp" >&5
15193 echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
15194 if test "$ac_cv_lib_resolv_strcasecmp" = yes; then
15195
15196 cf_tr_func=`echo "strcasecmp" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15197
15198 cat >>confdefs.h <<EOF
15199 #define HAVE_$cf_tr_func 1
15200 EOF
15201
15202 ac_cv_func_strcasecmp=yes
15203 if test "$cf_used_lib_resolv" != yes ; then cf_used_lib_resolv=yes; cf_cv_netlibs="-lresolv $cf_cv_netlibs"; fi
15204 else
15205
15206 ac_cv_func_strcasecmp=unknown
15207 unset ac_cv_func_strcasecmp 2>/dev/null
15208
15209 fi
15210
15211 fi
15212 done
15213
15214 ;;
15215 esac
15216
15217 fi
15218
15219 case "$cf_cv_netlibs" in
15220 (*ws2_32*)
15221
15222 cat >>confdefs.h <<\EOF
15223 #define USE_WINSOCK2_H 1
15224 EOF
15225
15226 ;;
15227 esac
15228
15229 cf_add_libs="$LIBS"
15230 # reverse order
15231 cf_add_0lib=
15232 for cf_add_1lib in $cf_cv_netlibs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15233 # filter duplicates
15234 for cf_add_1lib in $cf_add_0lib; do
15235 for cf_add_2lib in $cf_add_libs; do
15236 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15237 cf_add_1lib=
15238 break
15239 fi
15240 done
15241 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15242 done
15243 LIBS="$cf_add_libs"
15244
15245 test "$cf_test_netlibs" = no && echo "$cf_cv_netlibs" >&6
15246
15247 fi
15248
15249 # dante(socks5) interferes with configure-checks
15250 if test "x$cf_cv_socks_lib" != xno ; then
15251 LIBS=`echo "x$LIBS" | sed -e "s,x-l$cf_cv_socks_lib *,,"`
15252 fi
15253
15254 echo "$as_me:15254: checking for inet_aton function" >&5
15255 echo $ECHO_N "checking for inet_aton function... $ECHO_C" >&6
15256 if test "${cf_cv_have_inet_aton+set}" = set; then
15257 echo $ECHO_N "(cached) $ECHO_C" >&6
15258 else
15259
15260 cat >"conftest.$ac_ext" <<_ACEOF
15261 #line 15261 "configure"
15262 #include "confdefs.h"
15263
15264 $ac_includes_default
15265 #if defined(__MINGW32__)
15266
15267 #undef WIN32_LEAN_AND_MEAN
15268 #define WIN32_LEAN_AND_MEAN
15269 #include <windows.h>
15270
15271 #ifdef HAVE_WINSOCK2_H
15272 #include <winsock2.h>
15273 #else
15274 #ifdef HAVE_WINSOCK_H
15275 #include <winsock.h>
15276 #endif
15277 #endif
15278
15279 #else
15280
15281 #include <sys/types.h>
15282 #include <sys/socket.h>
15283 #include <netinet/in.h>
15284 #include <arpa/inet.h>
15285
15286 #endif
15287
15288 int
15289 main (void)
15290 {
15291 inet_aton((void*)0, (struct in_addr *)0)
15292 ;
15293 return 0;
15294 }
15295 _ACEOF
15296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15297 if { (eval echo "$as_me:15297: \"$ac_link\"") >&5
15298 (eval $ac_link) 2>&5
15299 ac_status=$?
15300 echo "$as_me:15300: \$? = $ac_status" >&5
15301 (exit "$ac_status"); } &&
15302 { ac_try='test -s "conftest$ac_exeext"'
15303 { (eval echo "$as_me:15303: \"$ac_try\"") >&5
15304 (eval $ac_try) 2>&5
15305 ac_status=$?
15306 echo "$as_me:15306: \$? = $ac_status" >&5
15307 (exit "$ac_status"); }; }; then
15308 cf_cv_have_inet_aton=yes
15309 else
15310 echo "$as_me: failed program was:" >&5
15311 cat "conftest.$ac_ext" >&5
15312 cf_cv_have_inet_aton=no
15313 fi
15314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15315 fi
15316 echo "$as_me:15316: result: $cf_cv_have_inet_aton" >&5
15317 echo "${ECHO_T}$cf_cv_have_inet_aton" >&6
15318 if test "$cf_cv_have_inet_aton" = yes ; then
15319
15320 cat >>confdefs.h <<\EOF
15321 #define HAVE_INET_ATON 1
15322 EOF
15323
15324 else
15325 echo "$as_me:15325: checking for inet_addr function" >&5
15326 echo $ECHO_N "checking for inet_addr function... $ECHO_C" >&6
15327 if test "${cf_cv_have_inet_addr+set}" = set; then
15328 echo $ECHO_N "(cached) $ECHO_C" >&6
15329 else
15330
15331 cat >"conftest.$ac_ext" <<_ACEOF
15332 #line 15332 "configure"
15333 #include "confdefs.h"
15334
15335 $ac_includes_default
15336 #if defined(__MINGW32__)
15337
15338 #undef WIN32_LEAN_AND_MEAN
15339 #define WIN32_LEAN_AND_MEAN
15340 #include <windows.h>
15341
15342 #ifdef HAVE_WINSOCK2_H
15343 #include <winsock2.h>
15344 #else
15345 #ifdef HAVE_WINSOCK_H
15346 #include <winsock.h>
15347 #endif
15348 #endif
15349
15350 #else
15351
15352 #include <sys/types.h>
15353 #include <sys/socket.h>
15354 #include <netinet/in.h>
15355 #include <arpa/inet.h>
15356
15357 #endif
15358
15359 int
15360 main (void)
15361 {
15362 inet_addr((void*)0)
15363 ;
15364 return 0;
15365 }
15366 _ACEOF
15367 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15368 if { (eval echo "$as_me:15368: \"$ac_link\"") >&5
15369 (eval $ac_link) 2>&5
15370 ac_status=$?
15371 echo "$as_me:15371: \$? = $ac_status" >&5
15372 (exit "$ac_status"); } &&
15373 { ac_try='test -s "conftest$ac_exeext"'
15374 { (eval echo "$as_me:15374: \"$ac_try\"") >&5
15375 (eval $ac_try) 2>&5
15376 ac_status=$?
15377 echo "$as_me:15377: \$? = $ac_status" >&5
15378 (exit "$ac_status"); }; }; then
15379 cf_cv_have_inet_addr=yes
15380 else
15381 echo "$as_me: failed program was:" >&5
15382 cat "conftest.$ac_ext" >&5
15383 cf_cv_have_inet_addr=no
15384 fi
15385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15386 fi
15387 echo "$as_me:15387: result: $cf_cv_have_inet_addr" >&5
15388 echo "${ECHO_T}$cf_cv_have_inet_addr" >&6
15389 if test "$cf_cv_have_inet_addr" = no ; then
15390 echo "$as_me:15390: checking for library with inet_addr" >&5
15391 echo $ECHO_N "checking for library with inet_addr... $ECHO_C" >&6
15392 if test "${cf_cv_lib_inet_addr+set}" = set; then
15393 echo $ECHO_N "(cached) $ECHO_C" >&6
15394 else
15395
15396 cf_save_LIBS="$LIBS"
15397 for cf_inetlib in -lbind -lresolv
15398 do
15399 LIBS="$cf_save_LIBS $cf_inetlib"
15400 cat >"conftest.$ac_ext" <<_ACEOF
15401 #line 15401 "configure"
15402 #include "confdefs.h"
15403 #include <sys/types.h>
15404 #include <sys/socket.h>
15405 #include <netinet/in.h>
15406 #include <arpa/inet.h>
15407
15408 int
15409 main (void)
15410 {
15411 inet_addr((void*)0)
15412 ;
15413 return 0;
15414 }
15415 _ACEOF
15416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15417 if { (eval echo "$as_me:15417: \"$ac_link\"") >&5
15418 (eval $ac_link) 2>&5
15419 ac_status=$?
15420 echo "$as_me:15420: \$? = $ac_status" >&5
15421 (exit "$ac_status"); } &&
15422 { ac_try='test -s "conftest$ac_exeext"'
15423 { (eval echo "$as_me:15423: \"$ac_try\"") >&5
15424 (eval $ac_try) 2>&5
15425 ac_status=$?
15426 echo "$as_me:15426: \$? = $ac_status" >&5
15427 (exit "$ac_status"); }; }; then
15428 cf_cv_lib_inet_addr=$cf_inetlib
15429 else
15430 echo "$as_me: failed program was:" >&5
15431 cat "conftest.$ac_ext" >&5
15432 cf_cv_lib_inet_addr=no
15433 fi
15434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15435 LIBS="$cf_save_LIBS"
15436 test "$cf_cv_lib_inet_addr" != no && break
15437 done
15438
15439 fi
15440 echo "$as_me:15440: result: $cf_cv_lib_inet_addr" >&5
15441 echo "${ECHO_T}$cf_cv_lib_inet_addr" >&6
15442 if test "$cf_cv_lib_inet_addr" != no ; then
15443
15444 cf_add_libs="$LIBS"
15445 # reverse order
15446 cf_add_0lib=
15447 for cf_add_1lib in $cf_cv_lib_inet_addr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15448 # filter duplicates
15449 for cf_add_1lib in $cf_add_0lib; do
15450 for cf_add_2lib in $cf_add_libs; do
15451 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15452 cf_add_1lib=
15453 break
15454 fi
15455 done
15456 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15457 done
15458 LIBS="$cf_add_libs"
15459
15460 else
15461 { echo "$as_me:15461: WARNING: Unable to find library for inet_addr function" >&5
15462 echo "$as_me: WARNING: Unable to find library for inet_addr function" >&2;}
15463 fi
15464 fi
15465 fi
15466
15467 if test "x$cf_cv_use_libssl" != xno ; then
15468
15469 cf_cv_have_ssl=no
15470 cf_cv_pkg_config_ssl=no
15471
15472 # command-line option, etc., override default behavior
15473
15474 case "x$cf_cv_use_libssl" in
15475 (xno|xyes|x)
15476 ;;
15477 (*)
15478
15479 for cf_searchpath in `echo "$cf_cv_use_libssl" | tr $PATH_SEPARATOR ' '`; do
15480 if test -d "$cf_searchpath/include" ; then
15481
15482 if test -n "$cf_searchpath/include" ; then
15483 for cf_add_incdir in $cf_searchpath/include
15484 do
15485 while test "$cf_add_incdir" != /usr/include
15486 do
15487 if test -d "$cf_add_incdir"
15488 then
15489 cf_have_incdir=no
15490 if test -n "$CFLAGS$CPPFLAGS" ; then
15491 # a loop is needed to ensure we can add subdirs of existing dirs
15492 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15493 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15494 cf_have_incdir=yes; break
15495 fi
15496 done
15497 fi
15498
15499 if test "$cf_have_incdir" = no ; then
15500 if test "$cf_add_incdir" = /usr/local/include ; then
15501 if test "$GCC" = yes
15502 then
15503 cf_save_CPPFLAGS=$CPPFLAGS
15504
15505 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15506 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15507
15508 cat >"conftest.$ac_ext" <<_ACEOF
15509 #line 15509 "configure"
15510 #include "confdefs.h"
15511 #include <stdio.h>
15512 int
15513 main (void)
15514 {
15515 printf("Hello")
15516 ;
15517 return 0;
15518 }
15519 _ACEOF
15520 rm -f "conftest.$ac_objext"
15521 if { (eval echo "$as_me:15521: \"$ac_compile\"") >&5
15522 (eval $ac_compile) 2>&5
15523 ac_status=$?
15524 echo "$as_me:15524: \$? = $ac_status" >&5
15525 (exit "$ac_status"); } &&
15526 { ac_try='test -s "conftest.$ac_objext"'
15527 { (eval echo "$as_me:15527: \"$ac_try\"") >&5
15528 (eval $ac_try) 2>&5
15529 ac_status=$?
15530 echo "$as_me:15530: \$? = $ac_status" >&5
15531 (exit "$ac_status"); }; }; then
15532 :
15533 else
15534 echo "$as_me: failed program was:" >&5
15535 cat "conftest.$ac_ext" >&5
15536 cf_have_incdir=yes
15537 fi
15538 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15539 CPPFLAGS=$cf_save_CPPFLAGS
15540 fi
15541 fi
15542 fi
15543
15544 if test "$cf_have_incdir" = no ; then
15545 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
15546
15547 echo "${as_me:-configure}:15547: testing adding $cf_add_incdir to include-path ..." 1>&5
15548
15549 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15550
15551 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
15552 test "$cf_top_incdir" = "$cf_add_incdir" && break
15553 cf_add_incdir="$cf_top_incdir"
15554 else
15555 break
15556 fi
15557 else
15558 break
15559 fi
15560 done
15561 done
15562 fi
15563
15564 elif test -d "$cf_searchpath/../include" ; then
15565
15566 if test -n "$cf_searchpath/../include" ; then
15567 for cf_add_incdir in $cf_searchpath/../include
15568 do
15569 while test "$cf_add_incdir" != /usr/include
15570 do
15571 if test -d "$cf_add_incdir"
15572 then
15573 cf_have_incdir=no
15574 if test -n "$CFLAGS$CPPFLAGS" ; then
15575 # a loop is needed to ensure we can add subdirs of existing dirs
15576 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15577 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15578 cf_have_incdir=yes; break
15579 fi
15580 done
15581 fi
15582
15583 if test "$cf_have_incdir" = no ; then
15584 if test "$cf_add_incdir" = /usr/local/include ; then
15585 if test "$GCC" = yes
15586 then
15587 cf_save_CPPFLAGS=$CPPFLAGS
15588
15589 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15590 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15591
15592 cat >"conftest.$ac_ext" <<_ACEOF
15593 #line 15593 "configure"
15594 #include "confdefs.h"
15595 #include <stdio.h>
15596 int
15597 main (void)
15598 {
15599 printf("Hello")
15600 ;
15601 return 0;
15602 }
15603 _ACEOF
15604 rm -f "conftest.$ac_objext"
15605 if { (eval echo "$as_me:15605: \"$ac_compile\"") >&5
15606 (eval $ac_compile) 2>&5
15607 ac_status=$?
15608 echo "$as_me:15608: \$? = $ac_status" >&5
15609 (exit "$ac_status"); } &&
15610 { ac_try='test -s "conftest.$ac_objext"'
15611 { (eval echo "$as_me:15611: \"$ac_try\"") >&5
15612 (eval $ac_try) 2>&5
15613 ac_status=$?
15614 echo "$as_me:15614: \$? = $ac_status" >&5
15615 (exit "$ac_status"); }; }; then
15616 :
15617 else
15618 echo "$as_me: failed program was:" >&5
15619 cat "conftest.$ac_ext" >&5
15620 cf_have_incdir=yes
15621 fi
15622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15623 CPPFLAGS=$cf_save_CPPFLAGS
15624 fi
15625 fi
15626 fi
15627
15628 if test "$cf_have_incdir" = no ; then
15629 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
15630
15631 echo "${as_me:-configure}:15631: testing adding $cf_add_incdir to include-path ..." 1>&5
15632
15633 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15634
15635 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
15636 test "$cf_top_incdir" = "$cf_add_incdir" && break
15637 cf_add_incdir="$cf_top_incdir"
15638 else
15639 break
15640 fi
15641 else
15642 break
15643 fi
15644 done
15645 done
15646 fi
15647
15648 else
15649 { { echo "$as_me:15649: error: cannot find ssl library under $cf_cv_use_libssl" >&5
15650 echo "$as_me: error: cannot find ssl library under $cf_cv_use_libssl" >&2;}
15651 { (exit 1); exit 1; }; }
15652 fi
15653 if test -d "$cf_searchpath/lib" ; then
15654
15655 if test -n "$cf_searchpath/lib" ; then
15656 for cf_add_libdir in $cf_searchpath/lib
15657 do
15658 if test "$cf_add_libdir" = /usr/lib ; then
15659 :
15660 elif test -d "$cf_add_libdir"
15661 then
15662 cf_have_libdir=no
15663 if test -n "$LDFLAGS$LIBS" ; then
15664 # a loop is needed to ensure we can add subdirs of existing dirs
15665 for cf_test_libdir in $LDFLAGS $LIBS ; do
15666 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15667 cf_have_libdir=yes; break
15668 fi
15669 done
15670 fi
15671 if test "$cf_have_libdir" = no ; then
15672 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
15673
15674 echo "${as_me:-configure}:15674: testing adding $cf_add_libdir to library-path ..." 1>&5
15675
15676 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15677 fi
15678 fi
15679 done
15680 fi
15681
15682 elif test -d "$cf_searchpath" ; then
15683
15684 if test -n "$cf_searchpath" ; then
15685 for cf_add_libdir in $cf_searchpath
15686 do
15687 if test "$cf_add_libdir" = /usr/lib ; then
15688 :
15689 elif test -d "$cf_add_libdir"
15690 then
15691 cf_have_libdir=no
15692 if test -n "$LDFLAGS$LIBS" ; then
15693 # a loop is needed to ensure we can add subdirs of existing dirs
15694 for cf_test_libdir in $LDFLAGS $LIBS ; do
15695 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15696 cf_have_libdir=yes; break
15697 fi
15698 done
15699 fi
15700 if test "$cf_have_libdir" = no ; then
15701 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
15702
15703 echo "${as_me:-configure}:15703: testing adding $cf_add_libdir to library-path ..." 1>&5
15704
15705 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15706 fi
15707 fi
15708 done
15709 fi
15710
15711 else
15712 { { echo "$as_me:15712: error: cannot find ssl library under $cf_cv_use_libssl" >&5
15713 echo "$as_me: error: cannot find ssl library under $cf_cv_use_libssl" >&2;}
15714 { (exit 1); exit 1; }; }
15715 fi
15716 done
15717
15718 test -n "$verbose" && echo " setting path value for ssl library to $cf_cv_use_libssl" 1>&6
15719
15720 echo "${as_me:-configure}:15720: testing setting path value for ssl library to $cf_cv_use_libssl ..." 1>&5
15721
15722 ;;
15723 esac
15724
15725 if test "x$PKG_CONFIG" != xnone; then
15726 case "$cf_cv_use_libssl" in
15727 (no)
15728 ;;
15729 (yes) # if no explicit directory given, try pkg-config
15730 cf_cv_pkg_ssl=
15731 for cf_try_package in openssl libssl
15732 do
15733 echo "$as_me:15733: checking pkg-config for $cf_try_package" >&5
15734 echo $ECHO_N "checking pkg-config for $cf_try_package... $ECHO_C" >&6
15735 if "$PKG_CONFIG" --exists $cf_try_package ; then
15736 cf_cv_pkg_ssl=$cf_try_package
15737 echo "$as_me:15737: result: yes" >&5
15738 echo "${ECHO_T}yes" >&6
15739 break
15740 else
15741 echo "$as_me:15741: result: no" >&5
15742 echo "${ECHO_T}no" >&6
15743 fi
15744 done
15745 if test -n "$cf_cv_pkg_ssl" ; then
15746 cf_cv_have_ssl=yes
15747 cf_cv_pkg_config_ssl=yes
15748
15749 cf_cflags_ssl=`$PKG_CONFIG --cflags $cf_cv_pkg_ssl`
15750 cf_libs_ssl=`$PKG_CONFIG --libs $cf_cv_pkg_ssl`
15751
15752 if test -n "$cf_cflags_ssl" ; then
15753 case "$cf_cflags_ssl" in
15754 (*-I*)
15755 cf_cv_header_path_ssl=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
15756 ;;
15757 (*)
15758 cf_cv_header_path_ssl=/usr/include
15759 ;;
15760 esac
15761
15762 cf_fix_cppflags=no
15763 cf_new_cflags=
15764 cf_new_cppflags=
15765 cf_new_extra_cppflags=
15766
15767 for cf_add_cflags in $cf_cflags_ssl
15768 do
15769 case "$cf_fix_cppflags" in
15770 (no)
15771 case "$cf_add_cflags" in
15772 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15773 case "$cf_add_cflags" in
15774 (-D*)
15775 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15776
15777 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15778 && test -z "${cf_tst_cflags}" \
15779 && cf_fix_cppflags=yes
15780
15781 if test "$cf_fix_cppflags" = yes ; then
15782
15783 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15784 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15785
15786 continue
15787 elif test "${cf_tst_cflags}" = "\"'" ; then
15788
15789 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15790 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15791
15792 continue
15793 fi
15794 ;;
15795 esac
15796 case "$CPPFLAGS" in
15797 (*$cf_add_cflags)
15798 ;;
15799 (*)
15800 case "$cf_add_cflags" in
15801 (-D*)
15802 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15803
15804 CPPFLAGS=`echo "$CPPFLAGS" | \
15805 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15806 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15807
15808 ;;
15809 esac
15810
15811 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15812 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15813
15814 ;;
15815 esac
15816 ;;
15817 (*)
15818
15819 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15820 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15821
15822 ;;
15823 esac
15824 ;;
15825 (yes)
15826
15827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15829
15830 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15831
15832 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15833 && test -z "${cf_tst_cflags}" \
15834 && cf_fix_cppflags=no
15835 ;;
15836 esac
15837 done
15838
15839 if test -n "$cf_new_cflags" ; then
15840
15841 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15842 CFLAGS="${CFLAGS}$cf_new_cflags"
15843
15844 fi
15845
15846 if test -n "$cf_new_cppflags" ; then
15847
15848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15849 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15850
15851 fi
15852
15853 if test -n "$cf_new_extra_cppflags" ; then
15854
15855 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15856 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15857
15858 fi
15859
15860 # workaround for broken openssl package using kerberos
15861 case "$cf_cflags_ssl" in
15862 (*kerberos*)
15863 cf_cv_have_ssl=maybe
15864 ;;
15865 esac
15866 else
15867 cf_cv_header_path_ssl=/usr/include
15868 fi
15869
15870 if test -d "$cf_cv_header_path_ssl/openssl" ; then
15871 cf_cv_header_path_ssl=$cf_cv_header_path_ssl/openssl
15872 fi
15873
15874 if test -n "$cf_libs_ssl" ; then
15875 case "x$cf_libs_ssl" in
15876 (*-L*)
15877 cf_cv_library_path_ssl=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
15878 ;;
15879 (*)
15880 cf_cv_library_path_ssl=/usr/lib
15881 ;;
15882 esac
15883 test -n "$verbose" && echo " adding $cf_libs_ssl to LIBS" 1>&6
15884
15885 echo "${as_me:-configure}:15885: testing adding $cf_libs_ssl to LIBS ..." 1>&5
15886
15887 cf_add_libs="$LIBS"
15888 # reverse order
15889 cf_add_0lib=
15890 for cf_add_1lib in $cf_libs_ssl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15891 # filter duplicates
15892 for cf_add_1lib in $cf_add_0lib; do
15893 for cf_add_2lib in $cf_add_libs; do
15894 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15895 cf_add_1lib=
15896 break
15897 fi
15898 done
15899 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15900 done
15901 LIBS="$cf_add_libs"
15902
15903 fi
15904 fi
15905 ;;
15906 esac
15907 fi
15908
15909 if test "$cf_cv_have_ssl" != yes; then
15910 case "$host_os" in
15911 (mingw*)
15912 cf_extra_ssl_libs="-lcrypto -lgdi32"
15913 ;;
15914 (*)
15915 # openssl 0.9.6 and up use dynamic loading for engines.
15916 cf_extra_ssl_libs="-lcrypto"
15917 case "x$LIBS" in
15918 (*-ldl)
15919 ;;
15920 (*)
15921 echo "$as_me:15921: checking for dlsym in -ldl" >&5
15922 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
15923 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
15924 echo $ECHO_N "(cached) $ECHO_C" >&6
15925 else
15926 ac_check_lib_save_LIBS=$LIBS
15927 LIBS="-ldl $LIBS"
15928 cat >"conftest.$ac_ext" <<_ACEOF
15929 #line 15929 "configure"
15930 #include "confdefs.h"
15931
15932 /* Override any gcc2 internal prototype to avoid an error. */
15933 #ifdef __cplusplus
15934 extern "C"
15935 #endif
15936 /* We use char because int might match the return type of a gcc2
15937 builtin and then its argument prototype would still apply. */
15938 char dlsym (void);
15939 int
15940 main (void)
15941 {
15942 dlsym ();
15943 ;
15944 return 0;
15945 }
15946 _ACEOF
15947 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15948 if { (eval echo "$as_me:15948: \"$ac_link\"") >&5
15949 (eval $ac_link) 2>&5
15950 ac_status=$?
15951 echo "$as_me:15951: \$? = $ac_status" >&5
15952 (exit "$ac_status"); } &&
15953 { ac_try='test -s "conftest$ac_exeext"'
15954 { (eval echo "$as_me:15954: \"$ac_try\"") >&5
15955 (eval $ac_try) 2>&5
15956 ac_status=$?
15957 echo "$as_me:15957: \$? = $ac_status" >&5
15958 (exit "$ac_status"); }; }; then
15959 ac_cv_lib_dl_dlsym=yes
15960 else
15961 echo "$as_me: failed program was:" >&5
15962 cat "conftest.$ac_ext" >&5
15963 ac_cv_lib_dl_dlsym=no
15964 fi
15965 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15966 LIBS=$ac_check_lib_save_LIBS
15967 fi
15968 echo "$as_me:15968: result: $ac_cv_lib_dl_dlsym" >&5
15969 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
15970 if test "$ac_cv_lib_dl_dlsym" = yes; then
15971 cf_extra_ssl_libs="$cf_extra_ssl_libs -ldl"
15972 fi
15973
15974 ;;
15975 esac
15976 ;;
15977 esac
15978
15979 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
15980 # will be set on completion of the AC_LINK_IFELSE below.
15981 cf_cv_header_path_ssl=
15982 cf_cv_library_path_ssl=
15983
15984 echo "${as_me:-configure}:15984: testing Starting FIND_LINKAGE(ssl,openssl) ..." 1>&5
15985
15986 cf_save_LIBS="$LIBS"
15987
15988 cat >"conftest.$ac_ext" <<_ACEOF
15989 #line 15989 "configure"
15990 #include "confdefs.h"
15991
15992 #include <stdio.h>
15993 #if defined(USE_OPENSSL_INCL)
15994 #include <openssl/ssl.h>
15995 #elif defined(USE_GNUTLS_INCL)
15996 #include <gnutls/gnutls.h>
15997 #else
15998 #include <ssl.h>
15999 #endif
16000
16001 int
16002 main (void)
16003 {
16004
16005 #ifdef USE_GNUTLS_INCL
16006 gnutls_global_init();
16007 #else
16008 SSL_shutdown((SSL *)0)
16009 #endif
16010
16011 ;
16012 return 0;
16013 }
16014 _ACEOF
16015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16016 if { (eval echo "$as_me:16016: \"$ac_link\"") >&5
16017 (eval $ac_link) 2>&5
16018 ac_status=$?
16019 echo "$as_me:16019: \$? = $ac_status" >&5
16020 (exit "$ac_status"); } &&
16021 { ac_try='test -s "conftest$ac_exeext"'
16022 { (eval echo "$as_me:16022: \"$ac_try\"") >&5
16023 (eval $ac_try) 2>&5
16024 ac_status=$?
16025 echo "$as_me:16025: \$? = $ac_status" >&5
16026 (exit "$ac_status"); }; }; then
16027
16028 cf_cv_find_linkage_ssl=yes
16029 cf_cv_header_path_ssl=/usr/include
16030 cf_cv_library_path_ssl=/usr/lib
16031
16032 else
16033 echo "$as_me: failed program was:" >&5
16034 cat "conftest.$ac_ext" >&5
16035
16036 LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
16037
16038 cat >"conftest.$ac_ext" <<_ACEOF
16039 #line 16039 "configure"
16040 #include "confdefs.h"
16041
16042 #include <stdio.h>
16043 #if defined(USE_OPENSSL_INCL)
16044 #include <openssl/ssl.h>
16045 #elif defined(USE_GNUTLS_INCL)
16046 #include <gnutls/gnutls.h>
16047 #else
16048 #include <ssl.h>
16049 #endif
16050
16051 int
16052 main (void)
16053 {
16054
16055 #ifdef USE_GNUTLS_INCL
16056 gnutls_global_init();
16057 #else
16058 SSL_shutdown((SSL *)0)
16059 #endif
16060
16061 ;
16062 return 0;
16063 }
16064 _ACEOF
16065 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16066 if { (eval echo "$as_me:16066: \"$ac_link\"") >&5
16067 (eval $ac_link) 2>&5
16068 ac_status=$?
16069 echo "$as_me:16069: \$? = $ac_status" >&5
16070 (exit "$ac_status"); } &&
16071 { ac_try='test -s "conftest$ac_exeext"'
16072 { (eval echo "$as_me:16072: \"$ac_try\"") >&5
16073 (eval $ac_try) 2>&5
16074 ac_status=$?
16075 echo "$as_me:16075: \$? = $ac_status" >&5
16076 (exit "$ac_status"); }; }; then
16077
16078 cf_cv_find_linkage_ssl=yes
16079 cf_cv_header_path_ssl=/usr/include
16080 cf_cv_library_path_ssl=/usr/lib
16081 cf_cv_library_file_ssl="-lssl"
16082
16083 else
16084 echo "$as_me: failed program was:" >&5
16085 cat "conftest.$ac_ext" >&5
16086
16087 cf_cv_find_linkage_ssl=no
16088 LIBS="$cf_save_LIBS"
16089
16090 test -n "$verbose" && echo " find linkage for ssl library" 1>&6
16091
16092 echo "${as_me:-configure}:16092: testing find linkage for ssl library ..." 1>&5
16093
16094 echo "${as_me:-configure}:16094: testing Searching for headers in FIND_LINKAGE(ssl,openssl) ..." 1>&5
16095
16096 cf_save_CPPFLAGS="$CPPFLAGS"
16097 cf_test_CPPFLAGS="$CPPFLAGS"
16098
16099 cf_search=
16100
16101 # collect the current set of include-directories from compiler flags
16102 cf_header_path_list=""
16103 if test -n "${CFLAGS}${CPPFLAGS}" ; then
16104 for cf_header_path in $CPPFLAGS $CFLAGS
16105 do
16106 case "$cf_header_path" in
16107 (-I*)
16108 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
16109
16110 test "x$cf_header_path" != "xNONE" && \
16111 test -d "$cf_header_path" && \
16112 {
16113 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
16114 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
16115 test -d "$cf_header_path/include/openssl" && cf_search="$cf_search $cf_header_path/include/openssl"
16116 test -d "$cf_header_path/include/openssl/include" && cf_search="$cf_search $cf_header_path/include/openssl/include"
16117 test -d "$cf_header_path/openssl/include" && cf_search="$cf_search $cf_header_path/openssl/include"
16118 test -d "$cf_header_path/openssl/include/openssl" && cf_search="$cf_search $cf_header_path/openssl/include/openssl"
16119 }
16120
16121 cf_header_path_list="$cf_header_path_list $cf_search"
16122 ;;
16123 esac
16124 done
16125 fi
16126
16127 # add the variations for the package we are looking for
16128
16129 cf_search=
16130
16131 test "x$prefix" != "xNONE" && \
16132 test -d "$prefix" && \
16133 {
16134 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
16135 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
16136 test -d "$prefix/include/openssl" && cf_search="$cf_search $prefix/include/openssl"
16137 test -d "$prefix/include/openssl/include" && cf_search="$cf_search $prefix/include/openssl/include"
16138 test -d "$prefix/openssl/include" && cf_search="$cf_search $prefix/openssl/include"
16139 test -d "$prefix/openssl/include/openssl" && cf_search="$cf_search $prefix/openssl/include/openssl"
16140 }
16141
16142 for cf_subdir_prefix in \
16143 /usr \
16144 /usr/local \
16145 /usr/pkg \
16146 /opt \
16147 /opt/local \
16148 $HOME
16149 do
16150
16151 test "x$cf_subdir_prefix" != "x$prefix" && \
16152 test -d "$cf_subdir_prefix" && \
16153 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
16154 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
16155 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
16156 test -d "$cf_subdir_prefix/include/openssl" && cf_search="$cf_search $cf_subdir_prefix/include/openssl"
16157 test -d "$cf_subdir_prefix/include/openssl/include" && cf_search="$cf_search $cf_subdir_prefix/include/openssl/include"
16158 test -d "$cf_subdir_prefix/openssl/include" && cf_search="$cf_search $cf_subdir_prefix/openssl/include"
16159 test -d "$cf_subdir_prefix/openssl/include/openssl" && cf_search="$cf_search $cf_subdir_prefix/openssl/include/openssl"
16160 }
16161
16162 done
16163
16164 test "$includedir" != NONE && \
16165 test "$includedir" != "/usr/include" && \
16166 test -d "$includedir" && {
16167 test -d "$includedir" && cf_search="$cf_search $includedir"
16168 test -d "$includedir/openssl" && cf_search="$cf_search $includedir/openssl"
16169 }
16170
16171 test "$oldincludedir" != NONE && \
16172 test "$oldincludedir" != "/usr/include" && \
16173 test -d "$oldincludedir" && {
16174 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
16175 test -d "$oldincludedir/openssl" && cf_search="$cf_search $oldincludedir/openssl"
16176 }
16177
16178 cf_search="$cf_search $cf_header_path_list"
16179
16180 for cf_cv_header_path_ssl in $cf_search
16181 do
16182 if test -d "$cf_cv_header_path_ssl" ; then
16183 test -n "$verbose" && echo " ... testing $cf_cv_header_path_ssl" 1>&6
16184
16185 echo "${as_me:-configure}:16185: testing ... testing $cf_cv_header_path_ssl ..." 1>&5
16186
16187 CPPFLAGS="$cf_save_CPPFLAGS"
16188
16189 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16190 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_ssl"
16191
16192 cat >"conftest.$ac_ext" <<_ACEOF
16193 #line 16193 "configure"
16194 #include "confdefs.h"
16195
16196 #include <stdio.h>
16197 #if defined(USE_OPENSSL_INCL)
16198 #include <openssl/ssl.h>
16199 #elif defined(USE_GNUTLS_INCL)
16200 #include <gnutls/gnutls.h>
16201 #else
16202 #include <ssl.h>
16203 #endif
16204
16205 int
16206 main (void)
16207 {
16208
16209 #ifdef USE_GNUTLS_INCL
16210 gnutls_global_init();
16211 #else
16212 SSL_shutdown((SSL *)0)
16213 #endif
16214
16215 ;
16216 return 0;
16217 }
16218 _ACEOF
16219 rm -f "conftest.$ac_objext"
16220 if { (eval echo "$as_me:16220: \"$ac_compile\"") >&5
16221 (eval $ac_compile) 2>&5
16222 ac_status=$?
16223 echo "$as_me:16223: \$? = $ac_status" >&5
16224 (exit "$ac_status"); } &&
16225 { ac_try='test -s "conftest.$ac_objext"'
16226 { (eval echo "$as_me:16226: \"$ac_try\"") >&5
16227 (eval $ac_try) 2>&5
16228 ac_status=$?
16229 echo "$as_me:16229: \$? = $ac_status" >&5
16230 (exit "$ac_status"); }; }; then
16231
16232 test -n "$verbose" && echo " ... found ssl headers in $cf_cv_header_path_ssl" 1>&6
16233
16234 echo "${as_me:-configure}:16234: testing ... found ssl headers in $cf_cv_header_path_ssl ..." 1>&5
16235
16236 cf_cv_find_linkage_ssl=maybe
16237 cf_test_CPPFLAGS="$CPPFLAGS"
16238 break
16239 else
16240 echo "$as_me: failed program was:" >&5
16241 cat "conftest.$ac_ext" >&5
16242
16243 CPPFLAGS="$cf_save_CPPFLAGS"
16244
16245 fi
16246 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16247 fi
16248 done
16249
16250 if test "$cf_cv_find_linkage_ssl" = maybe ; then
16251
16252 echo "${as_me:-configure}:16252: testing Searching for ssl library in FIND_LINKAGE(ssl,openssl) ..." 1>&5
16253
16254 cf_save_LIBS="$LIBS"
16255 cf_save_LDFLAGS="$LDFLAGS"
16256
16257 CPPFLAGS="$cf_test_CPPFLAGS"
16258 LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
16259 cat >"conftest.$ac_ext" <<_ACEOF
16260 #line 16260 "configure"
16261 #include "confdefs.h"
16262
16263 #include <stdio.h>
16264 #if defined(USE_OPENSSL_INCL)
16265 #include <openssl/ssl.h>
16266 #elif defined(USE_GNUTLS_INCL)
16267 #include <gnutls/gnutls.h>
16268 #else
16269 #include <ssl.h>
16270 #endif
16271
16272 int
16273 main (void)
16274 {
16275
16276 #ifdef USE_GNUTLS_INCL
16277 gnutls_global_init();
16278 #else
16279 SSL_shutdown((SSL *)0)
16280 #endif
16281
16282 ;
16283 return 0;
16284 }
16285 _ACEOF
16286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16287 if { (eval echo "$as_me:16287: \"$ac_link\"") >&5
16288 (eval $ac_link) 2>&5
16289 ac_status=$?
16290 echo "$as_me:16290: \$? = $ac_status" >&5
16291 (exit "$ac_status"); } &&
16292 { ac_try='test -s "conftest$ac_exeext"'
16293 { (eval echo "$as_me:16293: \"$ac_try\"") >&5
16294 (eval $ac_try) 2>&5
16295 ac_status=$?
16296 echo "$as_me:16296: \$? = $ac_status" >&5
16297 (exit "$ac_status"); }; }; then
16298
16299 test -n "$verbose" && echo " ... found ssl library in system" 1>&6
16300
16301 echo "${as_me:-configure}:16301: testing ... found ssl library in system ..." 1>&5
16302
16303 cf_cv_find_linkage_ssl=yes
16304 else
16305 echo "$as_me: failed program was:" >&5
16306 cat "conftest.$ac_ext" >&5
16307 fi
16308 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16309 CPPFLAGS="$cf_save_CPPFLAGS"
16310 LIBS="$cf_save_LIBS"
16311
16312 if test "$cf_cv_find_linkage_ssl" != yes ; then
16313
16314 cf_search=
16315 cf_library_path_list=""
16316 if test -n "${LDFLAGS}${LIBS}" ; then
16317 for cf_library_path in $LDFLAGS $LIBS
16318 do
16319 case "$cf_library_path" in
16320 (-L*)
16321 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
16322
16323 test "x$cf_library_path" != "xNONE" && \
16324 test -d "$cf_library_path" && \
16325 {
16326 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
16327 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
16328 test -d "$cf_library_path/lib/ssl" && cf_search="$cf_search $cf_library_path/lib/ssl"
16329 test -d "$cf_library_path/lib/ssl/lib" && cf_search="$cf_search $cf_library_path/lib/ssl/lib"
16330 test -d "$cf_library_path/ssl/lib" && cf_search="$cf_search $cf_library_path/ssl/lib"
16331 test -d "$cf_library_path/ssl/lib/ssl" && cf_search="$cf_search $cf_library_path/ssl/lib/ssl"
16332 }
16333
16334 cf_library_path_list="$cf_library_path_list $cf_search"
16335 ;;
16336 esac
16337 done
16338 fi
16339
16340 cf_search=
16341
16342 test "x$prefix" != "xNONE" && \
16343 test -d "$prefix" && \
16344 {
16345 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
16346 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
16347 test -d "$prefix/lib/ssl" && cf_search="$cf_search $prefix/lib/ssl"
16348 test -d "$prefix/lib/ssl/lib" && cf_search="$cf_search $prefix/lib/ssl/lib"
16349 test -d "$prefix/ssl/lib" && cf_search="$cf_search $prefix/ssl/lib"
16350 test -d "$prefix/ssl/lib/ssl" && cf_search="$cf_search $prefix/ssl/lib/ssl"
16351 }
16352
16353 for cf_subdir_prefix in \
16354 /usr \
16355 /usr/local \
16356 /usr/pkg \
16357 /opt \
16358 /opt/local \
16359 $HOME
16360 do
16361
16362 test "x$cf_subdir_prefix" != "x$prefix" && \
16363 test -d "$cf_subdir_prefix" && \
16364 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
16365 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
16366 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
16367 test -d "$cf_subdir_prefix/lib/ssl" && cf_search="$cf_search $cf_subdir_prefix/lib/ssl"
16368 test -d "$cf_subdir_prefix/lib/ssl/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/ssl/lib"
16369 test -d "$cf_subdir_prefix/ssl/lib" && cf_search="$cf_search $cf_subdir_prefix/ssl/lib"
16370 test -d "$cf_subdir_prefix/ssl/lib/ssl" && cf_search="$cf_search $cf_subdir_prefix/ssl/lib/ssl"
16371 }
16372
16373 done
16374
16375 cf_search="$cf_library_path_list $cf_search"
16376
16377 for cf_cv_library_path_ssl in $cf_search
16378 do
16379 if test -d "$cf_cv_library_path_ssl" ; then
16380 test -n "$verbose" && echo " ... testing $cf_cv_library_path_ssl" 1>&6
16381
16382 echo "${as_me:-configure}:16382: testing ... testing $cf_cv_library_path_ssl ..." 1>&5
16383
16384 CPPFLAGS="$cf_test_CPPFLAGS"
16385 LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
16386 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_ssl"
16387 cat >"conftest.$ac_ext" <<_ACEOF
16388 #line 16388 "configure"
16389 #include "confdefs.h"
16390
16391 #include <stdio.h>
16392 #if defined(USE_OPENSSL_INCL)
16393 #include <openssl/ssl.h>
16394 #elif defined(USE_GNUTLS_INCL)
16395 #include <gnutls/gnutls.h>
16396 #else
16397 #include <ssl.h>
16398 #endif
16399
16400 int
16401 main (void)
16402 {
16403
16404 #ifdef USE_GNUTLS_INCL
16405 gnutls_global_init();
16406 #else
16407 SSL_shutdown((SSL *)0)
16408 #endif
16409
16410 ;
16411 return 0;
16412 }
16413 _ACEOF
16414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16415 if { (eval echo "$as_me:16415: \"$ac_link\"") >&5
16416 (eval $ac_link) 2>&5
16417 ac_status=$?
16418 echo "$as_me:16418: \$? = $ac_status" >&5
16419 (exit "$ac_status"); } &&
16420 { ac_try='test -s "conftest$ac_exeext"'
16421 { (eval echo "$as_me:16421: \"$ac_try\"") >&5
16422 (eval $ac_try) 2>&5
16423 ac_status=$?
16424 echo "$as_me:16424: \$? = $ac_status" >&5
16425 (exit "$ac_status"); }; }; then
16426
16427 test -n "$verbose" && echo " ... found ssl library in $cf_cv_library_path_ssl" 1>&6
16428
16429 echo "${as_me:-configure}:16429: testing ... found ssl library in $cf_cv_library_path_ssl ..." 1>&5
16430
16431 cf_cv_find_linkage_ssl=yes
16432 cf_cv_library_file_ssl="-lssl"
16433 break
16434 else
16435 echo "$as_me: failed program was:" >&5
16436 cat "conftest.$ac_ext" >&5
16437
16438 CPPFLAGS="$cf_save_CPPFLAGS"
16439 LIBS="$cf_save_LIBS"
16440 LDFLAGS="$cf_save_LDFLAGS"
16441
16442 fi
16443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16444 fi
16445 done
16446 CPPFLAGS="$cf_save_CPPFLAGS"
16447 LDFLAGS="$cf_save_LDFLAGS"
16448 fi
16449
16450 else
16451 cf_cv_find_linkage_ssl=no
16452 fi
16453
16454 fi
16455 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16456
16457 fi
16458 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16459
16460 LIBS="$cf_save_LIBS"
16461
16462 if test "$cf_cv_find_linkage_ssl" = yes ; then
16463 cf_cv_have_ssl=yes
16464 else
16465 cf_cv_have_ssl=no
16466 fi
16467
16468 if test "$cf_cv_pkg_config_ssl" != yes ; then
16469 if test "$cf_cv_have_ssl" = yes ; then
16470 if test -n "$cf_cv_library_path_ssl" ; then
16471
16472 if test -n "$cf_cv_library_path_ssl" ; then
16473 for cf_add_libdir in $cf_cv_library_path_ssl
16474 do
16475 if test "$cf_add_libdir" = /usr/lib ; then
16476 :
16477 elif test -d "$cf_add_libdir"
16478 then
16479 cf_have_libdir=no
16480 if test -n "$LDFLAGS$LIBS" ; then
16481 # a loop is needed to ensure we can add subdirs of existing dirs
16482 for cf_test_libdir in $LDFLAGS $LIBS ; do
16483 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16484 cf_have_libdir=yes; break
16485 fi
16486 done
16487 fi
16488 if test "$cf_have_libdir" = no ; then
16489 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
16490
16491 echo "${as_me:-configure}:16491: testing adding $cf_add_libdir to library-path ..." 1>&5
16492
16493 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16494 fi
16495 fi
16496 done
16497 fi
16498
16499 fi
16500
16501 cf_add_libs="$LIBS"
16502 # reverse order
16503 cf_add_0lib=
16504 for cf_add_1lib in -lssl $cf_extra_ssl_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16505 # filter duplicates
16506 for cf_add_1lib in $cf_add_0lib; do
16507 for cf_add_2lib in $cf_add_libs; do
16508 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16509 cf_add_1lib=
16510 break
16511 fi
16512 done
16513 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16514 done
16515 LIBS="$cf_add_libs"
16516
16517 if test -n "$cf_cv_header_path_ssl" ; then
16518 case "$cf_cv_header_path_ssl" in
16519 (/usr/include/openssl)
16520 ;;
16521 (*)
16522
16523 if test -n "$cf_cv_header_path_ssl" ; then
16524 for cf_add_incdir in $cf_cv_header_path_ssl
16525 do
16526 while test "$cf_add_incdir" != /usr/include
16527 do
16528 if test -d "$cf_add_incdir"
16529 then
16530 cf_have_incdir=no
16531 if test -n "$CFLAGS$CPPFLAGS" ; then
16532 # a loop is needed to ensure we can add subdirs of existing dirs
16533 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16534 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16535 cf_have_incdir=yes; break
16536 fi
16537 done
16538 fi
16539
16540 if test "$cf_have_incdir" = no ; then
16541 if test "$cf_add_incdir" = /usr/local/include ; then
16542 if test "$GCC" = yes
16543 then
16544 cf_save_CPPFLAGS=$CPPFLAGS
16545
16546 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16547 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16548
16549 cat >"conftest.$ac_ext" <<_ACEOF
16550 #line 16550 "configure"
16551 #include "confdefs.h"
16552 #include <stdio.h>
16553 int
16554 main (void)
16555 {
16556 printf("Hello")
16557 ;
16558 return 0;
16559 }
16560 _ACEOF
16561 rm -f "conftest.$ac_objext"
16562 if { (eval echo "$as_me:16562: \"$ac_compile\"") >&5
16563 (eval $ac_compile) 2>&5
16564 ac_status=$?
16565 echo "$as_me:16565: \$? = $ac_status" >&5
16566 (exit "$ac_status"); } &&
16567 { ac_try='test -s "conftest.$ac_objext"'
16568 { (eval echo "$as_me:16568: \"$ac_try\"") >&5
16569 (eval $ac_try) 2>&5
16570 ac_status=$?
16571 echo "$as_me:16571: \$? = $ac_status" >&5
16572 (exit "$ac_status"); }; }; then
16573 :
16574 else
16575 echo "$as_me: failed program was:" >&5
16576 cat "conftest.$ac_ext" >&5
16577 cf_have_incdir=yes
16578 fi
16579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16580 CPPFLAGS=$cf_save_CPPFLAGS
16581 fi
16582 fi
16583 fi
16584
16585 if test "$cf_have_incdir" = no ; then
16586 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
16587
16588 echo "${as_me:-configure}:16588: testing adding $cf_add_incdir to include-path ..." 1>&5
16589
16590 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16591
16592 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16593 test "$cf_top_incdir" = "$cf_add_incdir" && break
16594 cf_add_incdir="$cf_top_incdir"
16595 else
16596 break
16597 fi
16598 else
16599 break
16600 fi
16601 done
16602 done
16603 fi
16604
16605 ;;
16606 esac
16607 fi
16608 fi
16609 fi
16610 fi
16611
16612 if test "$cf_cv_have_ssl" = yes ; then
16613
16614 cat >>confdefs.h <<\EOF
16615 #define USE_SSL 1
16616 EOF
16617
16618 if test -n "$cf_cv_header_path_ssl" ; then
16619 test -n "$verbose" && echo " checking ssl header-path $cf_cv_header_path_ssl" 1>&6
16620
16621 echo "${as_me:-configure}:16621: testing checking ssl header-path $cf_cv_header_path_ssl ..." 1>&5
16622
16623 case "$cf_cv_header_path_ssl" in
16624 (*/openssl)
16625
16626 cat >>confdefs.h <<\EOF
16627 #define USE_OPENSSL_INCL 1
16628 EOF
16629
16630 ;;
16631 esac
16632 fi
16633
16634 for ac_func in SSL_clear_options
16635 do
16636 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16637 echo "$as_me:16637: checking for $ac_func" >&5
16638 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16639 if eval "test \"\${$as_ac_var+set}\" = set"; then
16640 echo $ECHO_N "(cached) $ECHO_C" >&6
16641 else
16642 cat >"conftest.$ac_ext" <<_ACEOF
16643 #line 16643 "configure"
16644 #include "confdefs.h"
16645 #define $ac_func autoconf_temporary
16646 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16647 #undef $ac_func
16648
16649 #ifdef __cplusplus
16650 extern "C"
16651 #endif
16652
16653 /* We use char because int might match the return type of a gcc2
16654 builtin and then its argument prototype would still apply. */
16655 char $ac_func (void);
16656
16657 int
16658 main (void)
16659 {
16660
16661 /* The GNU C library defines stubs for functions which it implements
16662 to always fail with ENOSYS. Some functions are actually named
16663 something starting with __ and the normal name is an alias. */
16664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16665 #error found stub for $ac_func
16666 #endif
16667
16668 return $ac_func ();
16669 ;
16670 return 0;
16671 }
16672 _ACEOF
16673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16674 if { (eval echo "$as_me:16674: \"$ac_link\"") >&5
16675 (eval $ac_link) 2>&5
16676 ac_status=$?
16677 echo "$as_me:16677: \$? = $ac_status" >&5
16678 (exit "$ac_status"); } &&
16679 { ac_try='test -s "conftest$ac_exeext"'
16680 { (eval echo "$as_me:16680: \"$ac_try\"") >&5
16681 (eval $ac_try) 2>&5
16682 ac_status=$?
16683 echo "$as_me:16683: \$? = $ac_status" >&5
16684 (exit "$ac_status"); }; }; then
16685 eval "$as_ac_var=yes"
16686 else
16687 echo "$as_me: failed program was:" >&5
16688 cat "conftest.$ac_ext" >&5
16689 eval "$as_ac_var=no"
16690 fi
16691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16692 fi
16693 echo "$as_me:16693: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16694 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16695 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16696 cat >>confdefs.h <<EOF
16697 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16698 EOF
16699
16700 fi
16701 done
16702
16703 echo "$as_me:16703: checking for X509 support" >&5
16704 echo $ECHO_N "checking for X509 support... $ECHO_C" >&6
16705 cat >"conftest.$ac_ext" <<_ACEOF
16706 #line 16706 "configure"
16707 #include "confdefs.h"
16708
16709 #include <stdio.h>
16710 #if defined(USE_OPENSSL_INCL)
16711 #include <openssl/ssl.h>
16712 #elif defined(USE_GNUTLS_INCL)
16713 #include <gnutls/gnutls.h>
16714 #else
16715 #include <ssl.h>
16716 #endif
16717
16718 #if defined(USE_GNUTLS_INCL)
16719 #include <gnutls/x509.h>
16720 #else
16721 #include <openssl/x509.h>
16722 #endif
16723
16724 int
16725 main (void)
16726 {
16727 X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
16728 ;
16729 return 0;
16730 }
16731 _ACEOF
16732 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16733 if { (eval echo "$as_me:16733: \"$ac_link\"") >&5
16734 (eval $ac_link) 2>&5
16735 ac_status=$?
16736 echo "$as_me:16736: \$? = $ac_status" >&5
16737 (exit "$ac_status"); } &&
16738 { ac_try='test -s "conftest$ac_exeext"'
16739 { (eval echo "$as_me:16739: \"$ac_try\"") >&5
16740 (eval $ac_try) 2>&5
16741 ac_status=$?
16742 echo "$as_me:16742: \$? = $ac_status" >&5
16743 (exit "$ac_status"); }; }; then
16744 cf_x509_support=yes
16745 else
16746 echo "$as_me: failed program was:" >&5
16747 cat "conftest.$ac_ext" >&5
16748 cf_x509_support=no
16749 fi
16750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16751 echo "$as_me:16751: result: $cf_x509_support" >&5
16752 echo "${ECHO_T}$cf_x509_support" >&6
16753
16754 if test "$cf_x509_support" = yes ; then
16755 cat >>confdefs.h <<\EOF
16756 #define USE_X509_SUPPORT 1
16757 EOF
16758
16759 fi
16760
16761 fi
16762
16763 elif test "x$cf_cv_use_libgnutls" != xno ; then
16764
16765 cf_cv_have_gnutls=no
16766 cf_cv_pkg_config_ssl=no
16767
16768 case "x$cf_cv_use_libgnutls" in
16769 (xno|xyes|x)
16770 ;;
16771 (*)
16772
16773 for cf_searchpath in `echo "$cf_cv_use_libgnutls" | tr $PATH_SEPARATOR ' '`; do
16774 if test -d "$cf_searchpath/include" ; then
16775
16776 if test -n "$cf_searchpath/include" ; then
16777 for cf_add_incdir in $cf_searchpath/include
16778 do
16779 while test "$cf_add_incdir" != /usr/include
16780 do
16781 if test -d "$cf_add_incdir"
16782 then
16783 cf_have_incdir=no
16784 if test -n "$CFLAGS$CPPFLAGS" ; then
16785 # a loop is needed to ensure we can add subdirs of existing dirs
16786 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16787 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16788 cf_have_incdir=yes; break
16789 fi
16790 done
16791 fi
16792
16793 if test "$cf_have_incdir" = no ; then
16794 if test "$cf_add_incdir" = /usr/local/include ; then
16795 if test "$GCC" = yes
16796 then
16797 cf_save_CPPFLAGS=$CPPFLAGS
16798
16799 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16800 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16801
16802 cat >"conftest.$ac_ext" <<_ACEOF
16803 #line 16803 "configure"
16804 #include "confdefs.h"
16805 #include <stdio.h>
16806 int
16807 main (void)
16808 {
16809 printf("Hello")
16810 ;
16811 return 0;
16812 }
16813 _ACEOF
16814 rm -f "conftest.$ac_objext"
16815 if { (eval echo "$as_me:16815: \"$ac_compile\"") >&5
16816 (eval $ac_compile) 2>&5
16817 ac_status=$?
16818 echo "$as_me:16818: \$? = $ac_status" >&5
16819 (exit "$ac_status"); } &&
16820 { ac_try='test -s "conftest.$ac_objext"'
16821 { (eval echo "$as_me:16821: \"$ac_try\"") >&5
16822 (eval $ac_try) 2>&5
16823 ac_status=$?
16824 echo "$as_me:16824: \$? = $ac_status" >&5
16825 (exit "$ac_status"); }; }; then
16826 :
16827 else
16828 echo "$as_me: failed program was:" >&5
16829 cat "conftest.$ac_ext" >&5
16830 cf_have_incdir=yes
16831 fi
16832 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16833 CPPFLAGS=$cf_save_CPPFLAGS
16834 fi
16835 fi
16836 fi
16837
16838 if test "$cf_have_incdir" = no ; then
16839 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
16840
16841 echo "${as_me:-configure}:16841: testing adding $cf_add_incdir to include-path ..." 1>&5
16842
16843 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16844
16845 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16846 test "$cf_top_incdir" = "$cf_add_incdir" && break
16847 cf_add_incdir="$cf_top_incdir"
16848 else
16849 break
16850 fi
16851 else
16852 break
16853 fi
16854 done
16855 done
16856 fi
16857
16858 elif test -d "$cf_searchpath/../include" ; then
16859
16860 if test -n "$cf_searchpath/../include" ; then
16861 for cf_add_incdir in $cf_searchpath/../include
16862 do
16863 while test "$cf_add_incdir" != /usr/include
16864 do
16865 if test -d "$cf_add_incdir"
16866 then
16867 cf_have_incdir=no
16868 if test -n "$CFLAGS$CPPFLAGS" ; then
16869 # a loop is needed to ensure we can add subdirs of existing dirs
16870 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16871 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16872 cf_have_incdir=yes; break
16873 fi
16874 done
16875 fi
16876
16877 if test "$cf_have_incdir" = no ; then
16878 if test "$cf_add_incdir" = /usr/local/include ; then
16879 if test "$GCC" = yes
16880 then
16881 cf_save_CPPFLAGS=$CPPFLAGS
16882
16883 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16884 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16885
16886 cat >"conftest.$ac_ext" <<_ACEOF
16887 #line 16887 "configure"
16888 #include "confdefs.h"
16889 #include <stdio.h>
16890 int
16891 main (void)
16892 {
16893 printf("Hello")
16894 ;
16895 return 0;
16896 }
16897 _ACEOF
16898 rm -f "conftest.$ac_objext"
16899 if { (eval echo "$as_me:16899: \"$ac_compile\"") >&5
16900 (eval $ac_compile) 2>&5
16901 ac_status=$?
16902 echo "$as_me:16902: \$? = $ac_status" >&5
16903 (exit "$ac_status"); } &&
16904 { ac_try='test -s "conftest.$ac_objext"'
16905 { (eval echo "$as_me:16905: \"$ac_try\"") >&5
16906 (eval $ac_try) 2>&5
16907 ac_status=$?
16908 echo "$as_me:16908: \$? = $ac_status" >&5
16909 (exit "$ac_status"); }; }; then
16910 :
16911 else
16912 echo "$as_me: failed program was:" >&5
16913 cat "conftest.$ac_ext" >&5
16914 cf_have_incdir=yes
16915 fi
16916 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16917 CPPFLAGS=$cf_save_CPPFLAGS
16918 fi
16919 fi
16920 fi
16921
16922 if test "$cf_have_incdir" = no ; then
16923 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
16924
16925 echo "${as_me:-configure}:16925: testing adding $cf_add_incdir to include-path ..." 1>&5
16926
16927 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16928
16929 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16930 test "$cf_top_incdir" = "$cf_add_incdir" && break
16931 cf_add_incdir="$cf_top_incdir"
16932 else
16933 break
16934 fi
16935 else
16936 break
16937 fi
16938 done
16939 done
16940 fi
16941
16942 else
16943 { { echo "$as_me:16943: error: cannot find ssl library under $cf_cv_use_libgnutls" >&5
16944 echo "$as_me: error: cannot find ssl library under $cf_cv_use_libgnutls" >&2;}
16945 { (exit 1); exit 1; }; }
16946 fi
16947 if test -d "$cf_searchpath/lib" ; then
16948
16949 if test -n "$cf_searchpath/lib" ; then
16950 for cf_add_libdir in $cf_searchpath/lib
16951 do
16952 if test "$cf_add_libdir" = /usr/lib ; then
16953 :
16954 elif test -d "$cf_add_libdir"
16955 then
16956 cf_have_libdir=no
16957 if test -n "$LDFLAGS$LIBS" ; then
16958 # a loop is needed to ensure we can add subdirs of existing dirs
16959 for cf_test_libdir in $LDFLAGS $LIBS ; do
16960 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16961 cf_have_libdir=yes; break
16962 fi
16963 done
16964 fi
16965 if test "$cf_have_libdir" = no ; then
16966 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
16967
16968 echo "${as_me:-configure}:16968: testing adding $cf_add_libdir to library-path ..." 1>&5
16969
16970 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16971 fi
16972 fi
16973 done
16974 fi
16975
16976 elif test -d "$cf_searchpath" ; then
16977
16978 if test -n "$cf_searchpath" ; then
16979 for cf_add_libdir in $cf_searchpath
16980 do
16981 if test "$cf_add_libdir" = /usr/lib ; then
16982 :
16983 elif test -d "$cf_add_libdir"
16984 then
16985 cf_have_libdir=no
16986 if test -n "$LDFLAGS$LIBS" ; then
16987 # a loop is needed to ensure we can add subdirs of existing dirs
16988 for cf_test_libdir in $LDFLAGS $LIBS ; do
16989 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16990 cf_have_libdir=yes; break
16991 fi
16992 done
16993 fi
16994 if test "$cf_have_libdir" = no ; then
16995 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
16996
16997 echo "${as_me:-configure}:16997: testing adding $cf_add_libdir to library-path ..." 1>&5
16998
16999 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17000 fi
17001 fi
17002 done
17003 fi
17004
17005 else
17006 { { echo "$as_me:17006: error: cannot find ssl library under $cf_cv_use_libgnutls" >&5
17007 echo "$as_me: error: cannot find ssl library under $cf_cv_use_libgnutls" >&2;}
17008 { (exit 1); exit 1; }; }
17009 fi
17010 done
17011
17012 test -n "$verbose" && echo " setting path value for ssl library to $cf_cv_use_libgnutls" 1>&6
17013
17014 echo "${as_me:-configure}:17014: testing setting path value for ssl library to $cf_cv_use_libgnutls ..." 1>&5
17015
17016 ;;
17017 esac
17018
17019 cf_pkg_gnutls=none
17020 if test "x$PKG_CONFIG" != xnone; then
17021 cf_pkg_gnutls=gnutls
17022 case "$cf_cv_use_libgnutls" in
17023 (no)
17024 ;;
17025 (yes) # if no explicit directory given, try pkg-config
17026 test -n "$verbose" && echo " checking pkg-config for $cf_pkg_gnutls" 1>&6
17027
17028 echo "${as_me:-configure}:17028: testing checking pkg-config for $cf_pkg_gnutls ..." 1>&5
17029
17030 if "$PKG_CONFIG" --exists $cf_pkg_gnutls ; then
17031 test -n "$verbose" && echo " ... found $cf_pkg_gnutls in pkg-config" 1>&6
17032
17033 echo "${as_me:-configure}:17033: testing ... found $cf_pkg_gnutls in pkg-config ..." 1>&5
17034
17035 cf_cv_have_gnutls=yes
17036 cf_cv_pkg_config_ssl=yes
17037
17038 cf_cflags_ssl=`$PKG_CONFIG --cflags $cf_pkg_gnutls`
17039 cf_libs_ssl=`$PKG_CONFIG --libs $cf_pkg_gnutls`
17040
17041 if test -n "$cf_cflags_ssl" ; then
17042 case "$cf_cflags_ssl" in
17043 (*-I*)
17044 cf_cv_header_path_gnutls=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
17045 ;;
17046 (*)
17047 cf_cv_header_path_gnutls=/usr/include
17048 ;;
17049 esac
17050 if test -d "$cf_cv_header_path_gnutls/gnutls" ; then
17051 cf_cv_header_path_gnutls=$cf_cv_header_path_gnutls/gnutls
17052 fi
17053
17054 cf_fix_cppflags=no
17055 cf_new_cflags=
17056 cf_new_cppflags=
17057 cf_new_extra_cppflags=
17058
17059 for cf_add_cflags in $cf_cflags_ssl
17060 do
17061 case "$cf_fix_cppflags" in
17062 (no)
17063 case "$cf_add_cflags" in
17064 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17065 case "$cf_add_cflags" in
17066 (-D*)
17067 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17068
17069 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17070 && test -z "${cf_tst_cflags}" \
17071 && cf_fix_cppflags=yes
17072
17073 if test "$cf_fix_cppflags" = yes ; then
17074
17075 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17076 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17077
17078 continue
17079 elif test "${cf_tst_cflags}" = "\"'" ; then
17080
17081 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17082 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17083
17084 continue
17085 fi
17086 ;;
17087 esac
17088 case "$CPPFLAGS" in
17089 (*$cf_add_cflags)
17090 ;;
17091 (*)
17092 case "$cf_add_cflags" in
17093 (-D*)
17094 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17095
17096 CPPFLAGS=`echo "$CPPFLAGS" | \
17097 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17098 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17099
17100 ;;
17101 esac
17102
17103 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17104 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17105
17106 ;;
17107 esac
17108 ;;
17109 (*)
17110
17111 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17112 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17113
17114 ;;
17115 esac
17116 ;;
17117 (yes)
17118
17119 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17120 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17121
17122 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17123
17124 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17125 && test -z "${cf_tst_cflags}" \
17126 && cf_fix_cppflags=no
17127 ;;
17128 esac
17129 done
17130
17131 if test -n "$cf_new_cflags" ; then
17132
17133 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17134 CFLAGS="${CFLAGS}$cf_new_cflags"
17135
17136 fi
17137
17138 if test -n "$cf_new_cppflags" ; then
17139
17140 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17141 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17142
17143 fi
17144
17145 if test -n "$cf_new_extra_cppflags" ; then
17146
17147 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17148 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17149
17150 fi
17151
17152 fi
17153
17154 if test -n "$cf_libs_ssl" ; then
17155 case "x$cf_libs_ssl" in
17156 (*-L*)
17157 cf_cv_library_path_gnutls=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
17158 ;;
17159 (*)
17160 cf_cv_library_path_gnutls=/usr/lib
17161 ;;
17162 esac
17163 test -n "$verbose" && echo " adding $cf_libs_ssl to LIBS" 1>&6
17164
17165 echo "${as_me:-configure}:17165: testing adding $cf_libs_ssl to LIBS ..." 1>&5
17166
17167 cf_add_libs="$LIBS"
17168 # reverse order
17169 cf_add_0lib=
17170 for cf_add_1lib in $cf_libs_ssl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17171 # filter duplicates
17172 for cf_add_1lib in $cf_add_0lib; do
17173 for cf_add_2lib in $cf_add_libs; do
17174 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17175 cf_add_1lib=
17176 break
17177 fi
17178 done
17179 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17180 done
17181 LIBS="$cf_add_libs"
17182
17183 fi
17184 else
17185 test -n "$verbose" && echo " ... did not find $cf_pkg_gnutls in pkg-config" 1>&6
17186
17187 echo "${as_me:-configure}:17187: testing ... did not find $cf_pkg_gnutls in pkg-config ..." 1>&5
17188
17189 cf_pkg_gnutls=none
17190 fi
17191 ;;
17192 esac
17193 fi
17194
17195 if test "$cf_cv_have_gnutls" = no ; then
17196 cf_gnutls_CPPFLAGS=$CPPFLAGS
17197
17198 CPPFLAGS="$CPPFLAGS -DUSE_GNUTLS_INCL"
17199
17200 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
17201 # will be set on completion of the AC_LINK_IFELSE below.
17202 cf_cv_header_path_gnutls=
17203 cf_cv_library_path_gnutls=
17204
17205 echo "${as_me:-configure}:17205: testing Starting FIND_LINKAGE(gnutls,) ..." 1>&5
17206
17207 cf_save_LIBS="$LIBS"
17208
17209 cat >"conftest.$ac_ext" <<_ACEOF
17210 #line 17210 "configure"
17211 #include "confdefs.h"
17212
17213 #include <stdio.h>
17214 #if defined(USE_OPENSSL_INCL)
17215 #include <openssl/ssl.h>
17216 #elif defined(USE_GNUTLS_INCL)
17217 #include <gnutls/gnutls.h>
17218 #else
17219 #include <ssl.h>
17220 #endif
17221
17222 int
17223 main (void)
17224 {
17225
17226 #ifdef USE_GNUTLS_INCL
17227 gnutls_global_init();
17228 #else
17229 SSL_shutdown((SSL *)0)
17230 #endif
17231
17232 ;
17233 return 0;
17234 }
17235 _ACEOF
17236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17237 if { (eval echo "$as_me:17237: \"$ac_link\"") >&5
17238 (eval $ac_link) 2>&5
17239 ac_status=$?
17240 echo "$as_me:17240: \$? = $ac_status" >&5
17241 (exit "$ac_status"); } &&
17242 { ac_try='test -s "conftest$ac_exeext"'
17243 { (eval echo "$as_me:17243: \"$ac_try\"") >&5
17244 (eval $ac_try) 2>&5
17245 ac_status=$?
17246 echo "$as_me:17246: \$? = $ac_status" >&5
17247 (exit "$ac_status"); }; }; then
17248
17249 cf_cv_find_linkage_gnutls=yes
17250 cf_cv_header_path_gnutls=/usr/include
17251 cf_cv_library_path_gnutls=/usr/lib
17252
17253 else
17254 echo "$as_me: failed program was:" >&5
17255 cat "conftest.$ac_ext" >&5
17256
17257 LIBS="-lgnutls $cf_save_LIBS"
17258
17259 cat >"conftest.$ac_ext" <<_ACEOF
17260 #line 17260 "configure"
17261 #include "confdefs.h"
17262
17263 #include <stdio.h>
17264 #if defined(USE_OPENSSL_INCL)
17265 #include <openssl/ssl.h>
17266 #elif defined(USE_GNUTLS_INCL)
17267 #include <gnutls/gnutls.h>
17268 #else
17269 #include <ssl.h>
17270 #endif
17271
17272 int
17273 main (void)
17274 {
17275
17276 #ifdef USE_GNUTLS_INCL
17277 gnutls_global_init();
17278 #else
17279 SSL_shutdown((SSL *)0)
17280 #endif
17281
17282 ;
17283 return 0;
17284 }
17285 _ACEOF
17286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17287 if { (eval echo "$as_me:17287: \"$ac_link\"") >&5
17288 (eval $ac_link) 2>&5
17289 ac_status=$?
17290 echo "$as_me:17290: \$? = $ac_status" >&5
17291 (exit "$ac_status"); } &&
17292 { ac_try='test -s "conftest$ac_exeext"'
17293 { (eval echo "$as_me:17293: \"$ac_try\"") >&5
17294 (eval $ac_try) 2>&5
17295 ac_status=$?
17296 echo "$as_me:17296: \$? = $ac_status" >&5
17297 (exit "$ac_status"); }; }; then
17298
17299 cf_cv_find_linkage_gnutls=yes
17300 cf_cv_header_path_gnutls=/usr/include
17301 cf_cv_library_path_gnutls=/usr/lib
17302 cf_cv_library_file_gnutls="-lgnutls"
17303
17304 else
17305 echo "$as_me: failed program was:" >&5
17306 cat "conftest.$ac_ext" >&5
17307
17308 cf_cv_find_linkage_gnutls=no
17309 LIBS="$cf_save_LIBS"
17310
17311 test -n "$verbose" && echo " find linkage for gnutls library" 1>&6
17312
17313 echo "${as_me:-configure}:17313: testing find linkage for gnutls library ..." 1>&5
17314
17315 echo "${as_me:-configure}:17315: testing Searching for headers in FIND_LINKAGE(gnutls,) ..." 1>&5
17316
17317 cf_save_CPPFLAGS="$CPPFLAGS"
17318 cf_test_CPPFLAGS="$CPPFLAGS"
17319
17320 cf_search=
17321
17322 # collect the current set of include-directories from compiler flags
17323 cf_header_path_list=""
17324 if test -n "${CFLAGS}${CPPFLAGS}" ; then
17325 for cf_header_path in $CPPFLAGS $CFLAGS
17326 do
17327 case "$cf_header_path" in
17328 (-I*)
17329 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
17330
17331 test "x$cf_header_path" != "xNONE" && \
17332 test -d "$cf_header_path" && \
17333 {
17334 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
17335 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
17336 test -d "$cf_header_path/include/gnutls" && cf_search="$cf_search $cf_header_path/include/gnutls"
17337 test -d "$cf_header_path/include/gnutls/include" && cf_search="$cf_search $cf_header_path/include/gnutls/include"
17338 test -d "$cf_header_path/gnutls/include" && cf_search="$cf_search $cf_header_path/gnutls/include"
17339 test -d "$cf_header_path/gnutls/include/gnutls" && cf_search="$cf_search $cf_header_path/gnutls/include/gnutls"
17340 }
17341
17342 cf_header_path_list="$cf_header_path_list $cf_search"
17343 ;;
17344 esac
17345 done
17346 fi
17347
17348 # add the variations for the package we are looking for
17349
17350 cf_search=
17351
17352 test "x$prefix" != "xNONE" && \
17353 test -d "$prefix" && \
17354 {
17355 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
17356 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
17357 test -d "$prefix/include/gnutls" && cf_search="$cf_search $prefix/include/gnutls"
17358 test -d "$prefix/include/gnutls/include" && cf_search="$cf_search $prefix/include/gnutls/include"
17359 test -d "$prefix/gnutls/include" && cf_search="$cf_search $prefix/gnutls/include"
17360 test -d "$prefix/gnutls/include/gnutls" && cf_search="$cf_search $prefix/gnutls/include/gnutls"
17361 }
17362
17363 for cf_subdir_prefix in \
17364 /usr \
17365 /usr/local \
17366 /usr/pkg \
17367 /opt \
17368 /opt/local \
17369 $HOME
17370 do
17371
17372 test "x$cf_subdir_prefix" != "x$prefix" && \
17373 test -d "$cf_subdir_prefix" && \
17374 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
17375 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
17376 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
17377 test -d "$cf_subdir_prefix/include/gnutls" && cf_search="$cf_search $cf_subdir_prefix/include/gnutls"
17378 test -d "$cf_subdir_prefix/include/gnutls/include" && cf_search="$cf_search $cf_subdir_prefix/include/gnutls/include"
17379 test -d "$cf_subdir_prefix/gnutls/include" && cf_search="$cf_search $cf_subdir_prefix/gnutls/include"
17380 test -d "$cf_subdir_prefix/gnutls/include/gnutls" && cf_search="$cf_search $cf_subdir_prefix/gnutls/include/gnutls"
17381 }
17382
17383 done
17384
17385 test "$includedir" != NONE && \
17386 test "$includedir" != "/usr/include" && \
17387 test -d "$includedir" && {
17388 test -d "$includedir" && cf_search="$cf_search $includedir"
17389 test -d "$includedir/gnutls" && cf_search="$cf_search $includedir/gnutls"
17390 }
17391
17392 test "$oldincludedir" != NONE && \
17393 test "$oldincludedir" != "/usr/include" && \
17394 test -d "$oldincludedir" && {
17395 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
17396 test -d "$oldincludedir/gnutls" && cf_search="$cf_search $oldincludedir/gnutls"
17397 }
17398
17399 cf_search="$cf_search $cf_header_path_list"
17400
17401 for cf_cv_header_path_gnutls in $cf_search
17402 do
17403 if test -d "$cf_cv_header_path_gnutls" ; then
17404 test -n "$verbose" && echo " ... testing $cf_cv_header_path_gnutls" 1>&6
17405
17406 echo "${as_me:-configure}:17406: testing ... testing $cf_cv_header_path_gnutls ..." 1>&5
17407
17408 CPPFLAGS="$cf_save_CPPFLAGS"
17409
17410 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17411 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_gnutls"
17412
17413 cat >"conftest.$ac_ext" <<_ACEOF
17414 #line 17414 "configure"
17415 #include "confdefs.h"
17416
17417 #include <stdio.h>
17418 #if defined(USE_OPENSSL_INCL)
17419 #include <openssl/ssl.h>
17420 #elif defined(USE_GNUTLS_INCL)
17421 #include <gnutls/gnutls.h>
17422 #else
17423 #include <ssl.h>
17424 #endif
17425
17426 int
17427 main (void)
17428 {
17429
17430 #ifdef USE_GNUTLS_INCL
17431 gnutls_global_init();
17432 #else
17433 SSL_shutdown((SSL *)0)
17434 #endif
17435
17436 ;
17437 return 0;
17438 }
17439 _ACEOF
17440 rm -f "conftest.$ac_objext"
17441 if { (eval echo "$as_me:17441: \"$ac_compile\"") >&5
17442 (eval $ac_compile) 2>&5
17443 ac_status=$?
17444 echo "$as_me:17444: \$? = $ac_status" >&5
17445 (exit "$ac_status"); } &&
17446 { ac_try='test -s "conftest.$ac_objext"'
17447 { (eval echo "$as_me:17447: \"$ac_try\"") >&5
17448 (eval $ac_try) 2>&5
17449 ac_status=$?
17450 echo "$as_me:17450: \$? = $ac_status" >&5
17451 (exit "$ac_status"); }; }; then
17452
17453 test -n "$verbose" && echo " ... found gnutls headers in $cf_cv_header_path_gnutls" 1>&6
17454
17455 echo "${as_me:-configure}:17455: testing ... found gnutls headers in $cf_cv_header_path_gnutls ..." 1>&5
17456
17457 cf_cv_find_linkage_gnutls=maybe
17458 cf_test_CPPFLAGS="$CPPFLAGS"
17459 break
17460 else
17461 echo "$as_me: failed program was:" >&5
17462 cat "conftest.$ac_ext" >&5
17463
17464 CPPFLAGS="$cf_save_CPPFLAGS"
17465
17466 fi
17467 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17468 fi
17469 done
17470
17471 if test "$cf_cv_find_linkage_gnutls" = maybe ; then
17472
17473 echo "${as_me:-configure}:17473: testing Searching for gnutls library in FIND_LINKAGE(gnutls,) ..." 1>&5
17474
17475 cf_save_LIBS="$LIBS"
17476 cf_save_LDFLAGS="$LDFLAGS"
17477
17478 if test "$cf_cv_find_linkage_gnutls" != yes ; then
17479
17480 cf_search=
17481 cf_library_path_list=""
17482 if test -n "${LDFLAGS}${LIBS}" ; then
17483 for cf_library_path in $LDFLAGS $LIBS
17484 do
17485 case "$cf_library_path" in
17486 (-L*)
17487 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
17488
17489 test "x$cf_library_path" != "xNONE" && \
17490 test -d "$cf_library_path" && \
17491 {
17492 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
17493 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
17494 test -d "$cf_library_path/lib/gnutls" && cf_search="$cf_search $cf_library_path/lib/gnutls"
17495 test -d "$cf_library_path/lib/gnutls/lib" && cf_search="$cf_search $cf_library_path/lib/gnutls/lib"
17496 test -d "$cf_library_path/gnutls/lib" && cf_search="$cf_search $cf_library_path/gnutls/lib"
17497 test -d "$cf_library_path/gnutls/lib/gnutls" && cf_search="$cf_search $cf_library_path/gnutls/lib/gnutls"
17498 }
17499
17500 cf_library_path_list="$cf_library_path_list $cf_search"
17501 ;;
17502 esac
17503 done
17504 fi
17505
17506 cf_search=
17507
17508 test "x$prefix" != "xNONE" && \
17509 test -d "$prefix" && \
17510 {
17511 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
17512 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
17513 test -d "$prefix/lib/gnutls" && cf_search="$cf_search $prefix/lib/gnutls"
17514 test -d "$prefix/lib/gnutls/lib" && cf_search="$cf_search $prefix/lib/gnutls/lib"
17515 test -d "$prefix/gnutls/lib" && cf_search="$cf_search $prefix/gnutls/lib"
17516 test -d "$prefix/gnutls/lib/gnutls" && cf_search="$cf_search $prefix/gnutls/lib/gnutls"
17517 }
17518
17519 for cf_subdir_prefix in \
17520 /usr \
17521 /usr/local \
17522 /usr/pkg \
17523 /opt \
17524 /opt/local \
17525 $HOME
17526 do
17527
17528 test "x$cf_subdir_prefix" != "x$prefix" && \
17529 test -d "$cf_subdir_prefix" && \
17530 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
17531 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
17532 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
17533 test -d "$cf_subdir_prefix/lib/gnutls" && cf_search="$cf_search $cf_subdir_prefix/lib/gnutls"
17534 test -d "$cf_subdir_prefix/lib/gnutls/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/gnutls/lib"
17535 test -d "$cf_subdir_prefix/gnutls/lib" && cf_search="$cf_search $cf_subdir_prefix/gnutls/lib"
17536 test -d "$cf_subdir_prefix/gnutls/lib/gnutls" && cf_search="$cf_search $cf_subdir_prefix/gnutls/lib/gnutls"
17537 }
17538
17539 done
17540
17541 cf_search="$cf_library_path_list $cf_search"
17542
17543 for cf_cv_library_path_gnutls in $cf_search
17544 do
17545 if test -d "$cf_cv_library_path_gnutls" ; then
17546 test -n "$verbose" && echo " ... testing $cf_cv_library_path_gnutls" 1>&6
17547
17548 echo "${as_me:-configure}:17548: testing ... testing $cf_cv_library_path_gnutls ..." 1>&5
17549
17550 CPPFLAGS="$cf_test_CPPFLAGS"
17551 LIBS="-lgnutls $cf_save_LIBS"
17552 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_gnutls"
17553 cat >"conftest.$ac_ext" <<_ACEOF
17554 #line 17554 "configure"
17555 #include "confdefs.h"
17556
17557 #include <stdio.h>
17558 #if defined(USE_OPENSSL_INCL)
17559 #include <openssl/ssl.h>
17560 #elif defined(USE_GNUTLS_INCL)
17561 #include <gnutls/gnutls.h>
17562 #else
17563 #include <ssl.h>
17564 #endif
17565
17566 int
17567 main (void)
17568 {
17569
17570 #ifdef USE_GNUTLS_INCL
17571 gnutls_global_init();
17572 #else
17573 SSL_shutdown((SSL *)0)
17574 #endif
17575
17576 ;
17577 return 0;
17578 }
17579 _ACEOF
17580 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17581 if { (eval echo "$as_me:17581: \"$ac_link\"") >&5
17582 (eval $ac_link) 2>&5
17583 ac_status=$?
17584 echo "$as_me:17584: \$? = $ac_status" >&5
17585 (exit "$ac_status"); } &&
17586 { ac_try='test -s "conftest$ac_exeext"'
17587 { (eval echo "$as_me:17587: \"$ac_try\"") >&5
17588 (eval $ac_try) 2>&5
17589 ac_status=$?
17590 echo "$as_me:17590: \$? = $ac_status" >&5
17591 (exit "$ac_status"); }; }; then
17592
17593 test -n "$verbose" && echo " ... found gnutls library in $cf_cv_library_path_gnutls" 1>&6
17594
17595 echo "${as_me:-configure}:17595: testing ... found gnutls library in $cf_cv_library_path_gnutls ..." 1>&5
17596
17597 cf_cv_find_linkage_gnutls=yes
17598 cf_cv_library_file_gnutls="-lgnutls"
17599 break
17600 else
17601 echo "$as_me: failed program was:" >&5
17602 cat "conftest.$ac_ext" >&5
17603
17604 CPPFLAGS="$cf_save_CPPFLAGS"
17605 LIBS="$cf_save_LIBS"
17606 LDFLAGS="$cf_save_LDFLAGS"
17607
17608 fi
17609 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17610 fi
17611 done
17612 CPPFLAGS="$cf_save_CPPFLAGS"
17613 LDFLAGS="$cf_save_LDFLAGS"
17614 fi
17615
17616 else
17617 cf_cv_find_linkage_gnutls=no
17618 fi
17619
17620 fi
17621 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17622
17623 fi
17624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17625
17626 LIBS="$cf_save_LIBS"
17627
17628 if test "$cf_cv_find_linkage_gnutls" = yes ; then
17629 cf_cv_have_gnutls=yes
17630 else
17631 cf_cv_have_gnutls=no
17632 fi
17633
17634 CPPFLAGS=$cf_gnutls_CPPFLAGS
17635 fi
17636
17637 if test "$cf_cv_have_gnutls" = yes ; then
17638 echo "$as_me:17638: checking if gnutls is usable" >&5
17639 echo $ECHO_N "checking if gnutls is usable... $ECHO_C" >&6
17640 cat >"conftest.$ac_ext" <<_ACEOF
17641 #line 17641 "configure"
17642 #include "confdefs.h"
17643
17644 $ac_includes_default
17645 #include <gnutls/gnutls.h>
17646
17647 int
17648 main (void)
17649 {
17650
17651 #if defined(GNUTLS_VERSION_NUMBER) && GNUTLS_VERSION_NUMBER >= 0x10000
17652 #else
17653 #error gnutls is not usable
17654 #endif
17655 ;
17656 return 0;
17657 }
17658 _ACEOF
17659 rm -f "conftest.$ac_objext"
17660 if { (eval echo "$as_me:17660: \"$ac_compile\"") >&5
17661 (eval $ac_compile) 2>&5
17662 ac_status=$?
17663 echo "$as_me:17663: \$? = $ac_status" >&5
17664 (exit "$ac_status"); } &&
17665 { ac_try='test -s "conftest.$ac_objext"'
17666 { (eval echo "$as_me:17666: \"$ac_try\"") >&5
17667 (eval $ac_try) 2>&5
17668 ac_status=$?
17669 echo "$as_me:17669: \$? = $ac_status" >&5
17670 (exit "$ac_status"); }; }; then
17671 echo "$as_me:17671: result: perhaps" >&5
17672 echo "${ECHO_T}perhaps" >&6
17673 else
17674 echo "$as_me: failed program was:" >&5
17675 cat "conftest.$ac_ext" >&5
17676 echo "$as_me:17676: result: no" >&5
17677 echo "${ECHO_T}no" >&6
17678 cf_cv_have_gnutls=no
17679 fi
17680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17681 fi
17682
17683 if test "$cf_cv_have_gnutls" = yes ; then
17684
17685 cat >>confdefs.h <<\EOF
17686 #define USE_GNUTLS_INCL 1
17687 EOF
17688
17689 if test -n "$cf_cv_header_path_gnutls" ; then
17690 cat >>confdefs.h <<\EOF
17691 #define USE_SSL 1
17692 EOF
17693
17694 case "$cf_cv_header_path_gnutls" in
17695 (/usr/include/gnutls)
17696 ;;
17697 (*)
17698
17699 if test -n "$cf_cv_header_path_gnutls" ; then
17700 for cf_add_incdir in $cf_cv_header_path_gnutls
17701 do
17702 while test "$cf_add_incdir" != /usr/include
17703 do
17704 if test -d "$cf_add_incdir"
17705 then
17706 cf_have_incdir=no
17707 if test -n "$CFLAGS$CPPFLAGS" ; then
17708 # a loop is needed to ensure we can add subdirs of existing dirs
17709 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17710 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17711 cf_have_incdir=yes; break
17712 fi
17713 done
17714 fi
17715
17716 if test "$cf_have_incdir" = no ; then
17717 if test "$cf_add_incdir" = /usr/local/include ; then
17718 if test "$GCC" = yes
17719 then
17720 cf_save_CPPFLAGS=$CPPFLAGS
17721
17722 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17723 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
17724
17725 cat >"conftest.$ac_ext" <<_ACEOF
17726 #line 17726 "configure"
17727 #include "confdefs.h"
17728 #include <stdio.h>
17729 int
17730 main (void)
17731 {
17732 printf("Hello")
17733 ;
17734 return 0;
17735 }
17736 _ACEOF
17737 rm -f "conftest.$ac_objext"
17738 if { (eval echo "$as_me:17738: \"$ac_compile\"") >&5
17739 (eval $ac_compile) 2>&5
17740 ac_status=$?
17741 echo "$as_me:17741: \$? = $ac_status" >&5
17742 (exit "$ac_status"); } &&
17743 { ac_try='test -s "conftest.$ac_objext"'
17744 { (eval echo "$as_me:17744: \"$ac_try\"") >&5
17745 (eval $ac_try) 2>&5
17746 ac_status=$?
17747 echo "$as_me:17747: \$? = $ac_status" >&5
17748 (exit "$ac_status"); }; }; then
17749 :
17750 else
17751 echo "$as_me: failed program was:" >&5
17752 cat "conftest.$ac_ext" >&5
17753 cf_have_incdir=yes
17754 fi
17755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17756 CPPFLAGS=$cf_save_CPPFLAGS
17757 fi
17758 fi
17759 fi
17760
17761 if test "$cf_have_incdir" = no ; then
17762 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
17763
17764 echo "${as_me:-configure}:17764: testing adding $cf_add_incdir to include-path ..." 1>&5
17765
17766 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17767
17768 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
17769 test "$cf_top_incdir" = "$cf_add_incdir" && break
17770 cf_add_incdir="$cf_top_incdir"
17771 else
17772 break
17773 fi
17774 else
17775 break
17776 fi
17777 done
17778 done
17779 fi
17780
17781 ;;
17782 esac
17783 fi
17784 if test -n "$cf_cv_library_path_gnutls" ; then
17785
17786 if test -n "$cf_cv_library_path_gnutls" ; then
17787 for cf_add_libdir in $cf_cv_library_path_gnutls
17788 do
17789 if test "$cf_add_libdir" = /usr/lib ; then
17790 :
17791 elif test -d "$cf_add_libdir"
17792 then
17793 cf_have_libdir=no
17794 if test -n "$LDFLAGS$LIBS" ; then
17795 # a loop is needed to ensure we can add subdirs of existing dirs
17796 for cf_test_libdir in $LDFLAGS $LIBS ; do
17797 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17798 cf_have_libdir=yes; break
17799 fi
17800 done
17801 fi
17802 if test "$cf_have_libdir" = no ; then
17803 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
17804
17805 echo "${as_me:-configure}:17805: testing adding $cf_add_libdir to library-path ..." 1>&5
17806
17807 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17808 fi
17809 fi
17810 done
17811 fi
17812
17813 fi
17814
17815 cf_add_libs="$LIBS"
17816 # reverse order
17817 cf_add_0lib=
17818 for cf_add_1lib in -lgnutls; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17819 # filter duplicates
17820 for cf_add_1lib in $cf_add_0lib; do
17821 for cf_add_2lib in $cf_add_libs; do
17822 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17823 cf_add_1lib=
17824 break
17825 fi
17826 done
17827 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17828 done
17829 LIBS="$cf_add_libs"
17830
17831 for ac_func in gnutls_protocol_set_enabled gnutls_protocol_set_priority
17832 do
17833 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17834 echo "$as_me:17834: checking for $ac_func" >&5
17835 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17836 if eval "test \"\${$as_ac_var+set}\" = set"; then
17837 echo $ECHO_N "(cached) $ECHO_C" >&6
17838 else
17839 cat >"conftest.$ac_ext" <<_ACEOF
17840 #line 17840 "configure"
17841 #include "confdefs.h"
17842 #define $ac_func autoconf_temporary
17843 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17844 #undef $ac_func
17845
17846 #ifdef __cplusplus
17847 extern "C"
17848 #endif
17849
17850 /* We use char because int might match the return type of a gcc2
17851 builtin and then its argument prototype would still apply. */
17852 char $ac_func (void);
17853
17854 int
17855 main (void)
17856 {
17857
17858 /* The GNU C library defines stubs for functions which it implements
17859 to always fail with ENOSYS. Some functions are actually named
17860 something starting with __ and the normal name is an alias. */
17861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17862 #error found stub for $ac_func
17863 #endif
17864
17865 return $ac_func ();
17866 ;
17867 return 0;
17868 }
17869 _ACEOF
17870 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17871 if { (eval echo "$as_me:17871: \"$ac_link\"") >&5
17872 (eval $ac_link) 2>&5
17873 ac_status=$?
17874 echo "$as_me:17874: \$? = $ac_status" >&5
17875 (exit "$ac_status"); } &&
17876 { ac_try='test -s "conftest$ac_exeext"'
17877 { (eval echo "$as_me:17877: \"$ac_try\"") >&5
17878 (eval $ac_try) 2>&5
17879 ac_status=$?
17880 echo "$as_me:17880: \$? = $ac_status" >&5
17881 (exit "$ac_status"); }; }; then
17882 eval "$as_ac_var=yes"
17883 else
17884 echo "$as_me: failed program was:" >&5
17885 cat "conftest.$ac_ext" >&5
17886 eval "$as_ac_var=no"
17887 fi
17888 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17889 fi
17890 echo "$as_me:17890: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17891 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17892 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17893 cat >>confdefs.h <<EOF
17894 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17895 EOF
17896
17897 fi
17898 done
17899
17900 echo "$as_me:17900: checking for gnutls_rnd" >&5
17901 echo $ECHO_N "checking for gnutls_rnd... $ECHO_C" >&6
17902 if test "${ac_cv_func_gnutls_rnd+set}" = set; then
17903 echo $ECHO_N "(cached) $ECHO_C" >&6
17904 else
17905 cat >"conftest.$ac_ext" <<_ACEOF
17906 #line 17906 "configure"
17907 #include "confdefs.h"
17908 #define gnutls_rnd autoconf_temporary
17909 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17910 #undef gnutls_rnd
17911
17912 #ifdef __cplusplus
17913 extern "C"
17914 #endif
17915
17916 /* We use char because int might match the return type of a gcc2
17917 builtin and then its argument prototype would still apply. */
17918 char gnutls_rnd (void);
17919
17920 int
17921 main (void)
17922 {
17923
17924 /* The GNU C library defines stubs for functions which it implements
17925 to always fail with ENOSYS. Some functions are actually named
17926 something starting with __ and the normal name is an alias. */
17927 #if defined (__stub_gnutls_rnd) || defined (__stub___gnutls_rnd)
17928 #error found stub for gnutls_rnd
17929 #endif
17930
17931 return gnutls_rnd ();
17932 ;
17933 return 0;
17934 }
17935 _ACEOF
17936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17937 if { (eval echo "$as_me:17937: \"$ac_link\"") >&5
17938 (eval $ac_link) 2>&5
17939 ac_status=$?
17940 echo "$as_me:17940: \$? = $ac_status" >&5
17941 (exit "$ac_status"); } &&
17942 { ac_try='test -s "conftest$ac_exeext"'
17943 { (eval echo "$as_me:17943: \"$ac_try\"") >&5
17944 (eval $ac_try) 2>&5
17945 ac_status=$?
17946 echo "$as_me:17946: \$? = $ac_status" >&5
17947 (exit "$ac_status"); }; }; then
17948 ac_cv_func_gnutls_rnd=yes
17949 else
17950 echo "$as_me: failed program was:" >&5
17951 cat "conftest.$ac_ext" >&5
17952 ac_cv_func_gnutls_rnd=no
17953 fi
17954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17955 fi
17956 echo "$as_me:17956: result: $ac_cv_func_gnutls_rnd" >&5
17957 echo "${ECHO_T}$ac_cv_func_gnutls_rnd" >&6
17958 if test "$ac_cv_func_gnutls_rnd" = yes; then
17959
17960 cat >>confdefs.h <<\EOF
17961 #define HAVE_GNUTLS_RND 1
17962 EOF
17963
17964 else
17965
17966 cf_add_libs="$LIBS"
17967 # reverse order
17968 cf_add_0lib=
17969 for cf_add_1lib in -lgcrypt; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17970 # filter duplicates
17971 for cf_add_1lib in $cf_add_0lib; do
17972 for cf_add_2lib in $cf_add_libs; do
17973 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17974 cf_add_1lib=
17975 break
17976 fi
17977 done
17978 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17979 done
17980 LIBS="$cf_add_libs"
17981
17982 fi
17983
17984 EXTRA_OBJS="$EXTRA_OBJS tidy_tls\$o"
17985
17986 echo "$as_me:17986: checking for X509 support" >&5
17987 echo $ECHO_N "checking for X509 support... $ECHO_C" >&6
17988 cat >"conftest.$ac_ext" <<_ACEOF
17989 #line 17989 "configure"
17990 #include "confdefs.h"
17991
17992 #include <stdio.h>
17993 #if defined(USE_OPENSSL_INCL)
17994 #include <openssl/ssl.h>
17995 #elif defined(USE_GNUTLS_INCL)
17996 #include <gnutls/gnutls.h>
17997 #else
17998 #include <ssl.h>
17999 #endif
18000
18001 #if defined(USE_GNUTLS_INCL)
18002 #include <gnutls/x509.h>
18003 #else
18004 #include <openssl/x509.h>
18005 #endif
18006
18007 int
18008 main (void)
18009 {
18010 X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
18011 ;
18012 return 0;
18013 }
18014 _ACEOF
18015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18016 if { (eval echo "$as_me:18016: \"$ac_link\"") >&5
18017 (eval $ac_link) 2>&5
18018 ac_status=$?
18019 echo "$as_me:18019: \$? = $ac_status" >&5
18020 (exit "$ac_status"); } &&
18021 { ac_try='test -s "conftest$ac_exeext"'
18022 { (eval echo "$as_me:18022: \"$ac_try\"") >&5
18023 (eval $ac_try) 2>&5
18024 ac_status=$?
18025 echo "$as_me:18025: \$? = $ac_status" >&5
18026 (exit "$ac_status"); }; }; then
18027 cf_x509_support=yes
18028 else
18029 echo "$as_me: failed program was:" >&5
18030 cat "conftest.$ac_ext" >&5
18031 cf_x509_support=no
18032 fi
18033 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18034 echo "$as_me:18034: result: $cf_x509_support" >&5
18035 echo "${ECHO_T}$cf_x509_support" >&6
18036
18037 if test "$cf_x509_support" = yes ; then
18038 cat >>confdefs.h <<\EOF
18039 #define USE_X509_SUPPORT 1
18040 EOF
18041
18042 fi
18043
18044 fi
18045
18046 fi
18047
18048 ### check for ipv6 support
18049 echo "$as_me:18049: checking whether to enable ipv6" >&5
18050 echo $ECHO_N "checking whether to enable ipv6... $ECHO_C" >&6
18051
18052 # Check whether --enable-ipv6 or --disable-ipv6 was given.
18053 if test "${enable_ipv6+set}" = set; then
18054 enableval="$enable_ipv6"
18055 test "$enableval" != yes && enableval=no
18056 if test "$enableval" != "no" ; then
18057
18058 cat >>confdefs.h <<\EOF
18059 #define ENABLE_IPV6 1
18060 EOF
18061
18062 fi
18063 else
18064 enableval=no
18065 fi;
18066 echo "$as_me:18066: result: $enableval" >&5
18067 echo "${ECHO_T}$enableval" >&6
18068 if test "$enableval" = "yes"; then
18069
18070 echo "$as_me:18070: checking ipv6 stack type" >&5
18071 echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
18072 if test "${cf_cv_ipv6type+set}" = set; then
18073 echo $ECHO_N "(cached) $ECHO_C" >&6
18074 else
18075
18076 cf_cv_ipv6type=unknown
18077 for i in solaris inria kame linux-glibc linux-libinet6 toshiba v6d zeta
18078 do
18079 case "$i" in
18080 (solaris)
18081 if test "SunOS" = "`uname -s`"
18082 then
18083 if test -f /usr/include/netinet/ip6.h
18084 then
18085 cf_cv_ipv6type=$i
18086 fi
18087 fi
18088 ;;
18089 (inria)
18090 cat >"conftest.$ac_ext" <<_ACEOF
18091 #line 18091 "configure"
18092 #include "confdefs.h"
18093
18094 #include <netinet/in.h>
18095 #ifdef IPV6_INRIA_VERSION
18096 yes
18097 #endif
18098 _ACEOF
18099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18100 $EGREP "yes" >/dev/null 2>&1; then
18101 cf_cv_ipv6type=$i
18102 fi
18103 rm -rf conftest*
18104
18105 ;;
18106 (kame)
18107 cat >"conftest.$ac_ext" <<_ACEOF
18108 #line 18108 "configure"
18109 #include "confdefs.h"
18110
18111 #include <netinet/in.h>
18112 #ifdef __KAME__
18113 yes
18114 #endif
18115 _ACEOF
18116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18117 $EGREP "yes" >/dev/null 2>&1; then
18118 cf_cv_ipv6type=$i
18119 fi
18120 rm -rf conftest*
18121
18122 ;;
18123 (linux-glibc)
18124 cat >"conftest.$ac_ext" <<_ACEOF
18125 #line 18125 "configure"
18126 #include "confdefs.h"
18127
18128 #include <features.h>
18129 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
18130 yes
18131 #endif
18132 _ACEOF
18133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18134 $EGREP "yes" >/dev/null 2>&1; then
18135 cf_cv_ipv6type=$i
18136 fi
18137 rm -rf conftest*
18138
18139 ;;
18140 (linux-libinet6)
18141 if test -d /usr/inet6
18142 then
18143 cf_cv_ipv6type=$i
18144 elif test -f /usr/include/netinet/ip6.h
18145 then
18146 cf_cv_ipv6type=$i
18147 fi
18148 ;;
18149 (toshiba)
18150 cat >"conftest.$ac_ext" <<_ACEOF
18151 #line 18151 "configure"
18152 #include "confdefs.h"
18153
18154 #include <sys/param.h>
18155 #ifdef _TOSHIBA_INET6
18156 yes
18157 #endif
18158 _ACEOF
18159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18160 $EGREP "yes" >/dev/null 2>&1; then
18161 cf_cv_ipv6type=$i
18162 fi
18163 rm -rf conftest*
18164
18165 ;;
18166 (v6d)
18167 cat >"conftest.$ac_ext" <<_ACEOF
18168 #line 18168 "configure"
18169 #include "confdefs.h"
18170
18171 #include </usr/local/v6/include/sys/v6config.h>
18172 #ifdef __V6D__
18173 yes
18174 #endif
18175 _ACEOF
18176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18177 $EGREP "yes" >/dev/null 2>&1; then
18178 cf_cv_ipv6type=$i
18179 fi
18180 rm -rf conftest*
18181
18182 ;;
18183 (zeta)
18184 cat >"conftest.$ac_ext" <<_ACEOF
18185 #line 18185 "configure"
18186 #include "confdefs.h"
18187
18188 #include <sys/param.h>
18189 #ifdef _ZETA_MINAMI_INET6
18190 yes
18191 #endif
18192 _ACEOF
18193 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18194 $EGREP "yes" >/dev/null 2>&1; then
18195 cf_cv_ipv6type=$i
18196 fi
18197 rm -rf conftest*
18198
18199 ;;
18200 esac
18201 if test "$cf_cv_ipv6type" != "unknown"; then
18202 break
18203 fi
18204 done
18205
18206 fi
18207 echo "$as_me:18207: result: $cf_cv_ipv6type" >&5
18208 echo "${ECHO_T}$cf_cv_ipv6type" >&6
18209
18210 cf_ipv6lib=none
18211 cf_ipv6dir=none
18212
18213 echo "$as_me:18213: checking for IPv6 library if required" >&5
18214 echo $ECHO_N "checking for IPv6 library if required... $ECHO_C" >&6
18215 case "$cf_cv_ipv6type" in
18216 (solaris)
18217 ;;
18218 (inria)
18219 ;;
18220 (kame)
18221 cf_ipv6lib=inet6
18222 cf_ipv6dir=v6
18223 ;;
18224 (linux-glibc)
18225 ;;
18226 (linux-libinet6)
18227 cf_ipv6lib=inet6
18228 cf_ipv6dir=inet6
18229 ;;
18230 (toshiba)
18231 cf_ipv6lib=inet6
18232 cf_ipv6dir=v6
18233 ;;
18234 (v6d)
18235 cf_ipv6lib=v6
18236 cf_ipv6dir=v6
18237 ;;
18238 (zeta)
18239 cf_ipv6lib=inet6
18240 cf_ipv6dir=v6
18241 ;;
18242 esac
18243 echo "$as_me:18243: result: $cf_ipv6lib" >&5
18244 echo "${ECHO_T}$cf_ipv6lib" >&6
18245
18246 if test "$cf_ipv6lib" != "none"; then
18247
18248 cat >"conftest.$ac_ext" <<_ACEOF
18249 #line 18249 "configure"
18250 #include "confdefs.h"
18251
18252 #include <sys/types.h>
18253 #include <netdb.h>
18254 #include <netinet/in.h>
18255 #include <netinet/ip6.h>
18256 int
18257 main (void)
18258 {
18259 getaddrinfo(NULL, NULL, NULL, NULL)
18260 ;
18261 return 0;
18262 }
18263 _ACEOF
18264 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18265 if { (eval echo "$as_me:18265: \"$ac_link\"") >&5
18266 (eval $ac_link) 2>&5
18267 ac_status=$?
18268 echo "$as_me:18268: \$? = $ac_status" >&5
18269 (exit "$ac_status"); } &&
18270 { ac_try='test -s "conftest$ac_exeext"'
18271 { (eval echo "$as_me:18271: \"$ac_try\"") >&5
18272 (eval $ac_try) 2>&5
18273 ac_status=$?
18274 echo "$as_me:18274: \$? = $ac_status" >&5
18275 (exit "$ac_status"); }; }; then
18276 :
18277 else
18278 echo "$as_me: failed program was:" >&5
18279 cat "conftest.$ac_ext" >&5
18280
18281 cf_search=
18282
18283 # collect the current set of include-directories from compiler flags
18284 cf_header_path_list=""
18285 if test -n "${CFLAGS}${CPPFLAGS}" ; then
18286 for cf_header_path in $CPPFLAGS $CFLAGS
18287 do
18288 case "$cf_header_path" in
18289 (-I*)
18290 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
18291
18292 test "x$cf_header_path" != "xNONE" && \
18293 test -d "$cf_header_path" && \
18294 {
18295 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
18296 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
18297 test -d "$cf_header_path/include/$cf_ipv6dir" && cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir"
18298 test -d "$cf_header_path/include/$cf_ipv6dir/include" && cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir/include"
18299 test -d "$cf_header_path/$cf_ipv6dir/include" && cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include"
18300 test -d "$cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir" && cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir"
18301 }
18302
18303 cf_header_path_list="$cf_header_path_list $cf_search"
18304 ;;
18305 esac
18306 done
18307 fi
18308
18309 # add the variations for the package we are looking for
18310
18311 cf_search=
18312
18313 test "x$prefix" != "xNONE" && \
18314 test -d "$prefix" && \
18315 {
18316 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
18317 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
18318 test -d "$prefix/include/$cf_ipv6dir" && cf_search="$cf_search $prefix/include/$cf_ipv6dir"
18319 test -d "$prefix/include/$cf_ipv6dir/include" && cf_search="$cf_search $prefix/include/$cf_ipv6dir/include"
18320 test -d "$prefix/$cf_ipv6dir/include" && cf_search="$cf_search $prefix/$cf_ipv6dir/include"
18321 test -d "$prefix/$cf_ipv6dir/include/$cf_ipv6dir" && cf_search="$cf_search $prefix/$cf_ipv6dir/include/$cf_ipv6dir"
18322 }
18323
18324 for cf_subdir_prefix in \
18325 /usr \
18326 /usr/local \
18327 /usr/pkg \
18328 /opt \
18329 /opt/local \
18330 $HOME
18331 do
18332
18333 test "x$cf_subdir_prefix" != "x$prefix" && \
18334 test -d "$cf_subdir_prefix" && \
18335 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
18336 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
18337 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
18338 test -d "$cf_subdir_prefix/include/$cf_ipv6dir" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir"
18339 test -d "$cf_subdir_prefix/include/$cf_ipv6dir/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir/include"
18340 test -d "$cf_subdir_prefix/$cf_ipv6dir/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include"
18341 test -d "$cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir" && cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir"
18342 }
18343
18344 done
18345
18346 test "$includedir" != NONE && \
18347 test "$includedir" != "/usr/include" && \
18348 test -d "$includedir" && {
18349 test -d "$includedir" && cf_search="$cf_search $includedir"
18350 test -d "$includedir/$cf_ipv6dir" && cf_search="$cf_search $includedir/$cf_ipv6dir"
18351 }
18352
18353 test "$oldincludedir" != NONE && \
18354 test "$oldincludedir" != "/usr/include" && \
18355 test -d "$oldincludedir" && {
18356 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
18357 test -d "$oldincludedir/$cf_ipv6dir" && cf_search="$cf_search $oldincludedir/$cf_ipv6dir"
18358 }
18359
18360 cf_search="$cf_search $cf_header_path_list"
18361
18362 for cf_incdir in $cf_search
18363 do
18364 cf_header=$cf_incdir/netinet/ip6.h
18365 if test -f "$cf_header"
18366 then
18367
18368 if test -n "$cf_incdir" ; then
18369 for cf_add_incdir in $cf_incdir
18370 do
18371 while test "$cf_add_incdir" != /usr/include
18372 do
18373 if test -d "$cf_add_incdir"
18374 then
18375 cf_have_incdir=no
18376 if test -n "$CFLAGS$CPPFLAGS" ; then
18377 # a loop is needed to ensure we can add subdirs of existing dirs
18378 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18379 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18380 cf_have_incdir=yes; break
18381 fi
18382 done
18383 fi
18384
18385 if test "$cf_have_incdir" = no ; then
18386 if test "$cf_add_incdir" = /usr/local/include ; then
18387 if test "$GCC" = yes
18388 then
18389 cf_save_CPPFLAGS=$CPPFLAGS
18390
18391 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18392 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18393
18394 cat >"conftest.$ac_ext" <<_ACEOF
18395 #line 18395 "configure"
18396 #include "confdefs.h"
18397 #include <stdio.h>
18398 int
18399 main (void)
18400 {
18401 printf("Hello")
18402 ;
18403 return 0;
18404 }
18405 _ACEOF
18406 rm -f "conftest.$ac_objext"
18407 if { (eval echo "$as_me:18407: \"$ac_compile\"") >&5
18408 (eval $ac_compile) 2>&5
18409 ac_status=$?
18410 echo "$as_me:18410: \$? = $ac_status" >&5
18411 (exit "$ac_status"); } &&
18412 { ac_try='test -s "conftest.$ac_objext"'
18413 { (eval echo "$as_me:18413: \"$ac_try\"") >&5
18414 (eval $ac_try) 2>&5
18415 ac_status=$?
18416 echo "$as_me:18416: \$? = $ac_status" >&5
18417 (exit "$ac_status"); }; }; then
18418 :
18419 else
18420 echo "$as_me: failed program was:" >&5
18421 cat "conftest.$ac_ext" >&5
18422 cf_have_incdir=yes
18423 fi
18424 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18425 CPPFLAGS=$cf_save_CPPFLAGS
18426 fi
18427 fi
18428 fi
18429
18430 if test "$cf_have_incdir" = no ; then
18431 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18432
18433 echo "${as_me:-configure}:18433: testing adding $cf_add_incdir to include-path ..." 1>&5
18434
18435 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18436
18437 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18438 test "$cf_top_incdir" = "$cf_add_incdir" && break
18439 cf_add_incdir="$cf_top_incdir"
18440 else
18441 break
18442 fi
18443 else
18444 break
18445 fi
18446 done
18447 done
18448 fi
18449
18450 test -n "$verbose" && echo " ... found $cf_header" 1>&6
18451 break
18452 fi
18453 test -n "$verbose" && echo " ... tested $cf_header" 1>&6
18454 done
18455
18456 fi
18457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18458
18459 eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=no'
18460 cf_libdir=""
18461 echo "$as_me:18461: checking for getaddrinfo" >&5
18462 echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
18463 if test "${ac_cv_func_getaddrinfo+set}" = set; then
18464 echo $ECHO_N "(cached) $ECHO_C" >&6
18465 else
18466 cat >"conftest.$ac_ext" <<_ACEOF
18467 #line 18467 "configure"
18468 #include "confdefs.h"
18469 #define getaddrinfo autoconf_temporary
18470 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18471 #undef getaddrinfo
18472
18473 #ifdef __cplusplus
18474 extern "C"
18475 #endif
18476
18477 /* We use char because int might match the return type of a gcc2
18478 builtin and then its argument prototype would still apply. */
18479 char getaddrinfo (void);
18480
18481 int
18482 main (void)
18483 {
18484
18485 /* The GNU C library defines stubs for functions which it implements
18486 to always fail with ENOSYS. Some functions are actually named
18487 something starting with __ and the normal name is an alias. */
18488 #if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
18489 #error found stub for getaddrinfo
18490 #endif
18491
18492 return getaddrinfo ();
18493 ;
18494 return 0;
18495 }
18496 _ACEOF
18497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18498 if { (eval echo "$as_me:18498: \"$ac_link\"") >&5
18499 (eval $ac_link) 2>&5
18500 ac_status=$?
18501 echo "$as_me:18501: \$? = $ac_status" >&5
18502 (exit "$ac_status"); } &&
18503 { ac_try='test -s "conftest$ac_exeext"'
18504 { (eval echo "$as_me:18504: \"$ac_try\"") >&5
18505 (eval $ac_try) 2>&5
18506 ac_status=$?
18507 echo "$as_me:18507: \$? = $ac_status" >&5
18508 (exit "$ac_status"); }; }; then
18509 ac_cv_func_getaddrinfo=yes
18510 else
18511 echo "$as_me: failed program was:" >&5
18512 cat "conftest.$ac_ext" >&5
18513 ac_cv_func_getaddrinfo=no
18514 fi
18515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18516 fi
18517 echo "$as_me:18517: result: $ac_cv_func_getaddrinfo" >&5
18518 echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
18519 if test "$ac_cv_func_getaddrinfo" = yes; then
18520 eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=yes'
18521 else
18522
18523 cf_save_LIBS="$LIBS"
18524 echo "$as_me:18524: checking for getaddrinfo in -l$cf_ipv6lib" >&5
18525 echo $ECHO_N "checking for getaddrinfo in -l$cf_ipv6lib... $ECHO_C" >&6
18526 LIBS="-l$cf_ipv6lib $LIBS"
18527 cat >"conftest.$ac_ext" <<_ACEOF
18528 #line 18528 "configure"
18529 #include "confdefs.h"
18530
18531 #include <sys/types.h>
18532 #include <netdb.h>
18533 #include <netinet/in.h>
18534 #include <netinet/ip6.h>
18535 int
18536 main (void)
18537 {
18538 getaddrinfo(NULL, NULL, NULL, NULL)
18539 ;
18540 return 0;
18541 }
18542 _ACEOF
18543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18544 if { (eval echo "$as_me:18544: \"$ac_link\"") >&5
18545 (eval $ac_link) 2>&5
18546 ac_status=$?
18547 echo "$as_me:18547: \$? = $ac_status" >&5
18548 (exit "$ac_status"); } &&
18549 { ac_try='test -s "conftest$ac_exeext"'
18550 { (eval echo "$as_me:18550: \"$ac_try\"") >&5
18551 (eval $ac_try) 2>&5
18552 ac_status=$?
18553 echo "$as_me:18553: \$? = $ac_status" >&5
18554 (exit "$ac_status"); }; }; then
18555 echo "$as_me:18555: result: yes" >&5
18556 echo "${ECHO_T}yes" >&6
18557 eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=yes'
18558
18559 else
18560 echo "$as_me: failed program was:" >&5
18561 cat "conftest.$ac_ext" >&5
18562 echo "$as_me:18562: result: no" >&5
18563 echo "${ECHO_T}no" >&6
18564
18565 cf_search=
18566 cf_library_path_list=""
18567 if test -n "${LDFLAGS}${LIBS}" ; then
18568 for cf_library_path in $LDFLAGS $LIBS
18569 do
18570 case "$cf_library_path" in
18571 (-L*)
18572 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
18573
18574 test "x$cf_library_path" != "xNONE" && \
18575 test -d "$cf_library_path" && \
18576 {
18577 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
18578 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
18579 test -d "$cf_library_path/lib/$cf_ipv6dir" && cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir"
18580 test -d "$cf_library_path/lib/$cf_ipv6dir/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir/lib"
18581 test -d "$cf_library_path/$cf_ipv6dir/lib" && cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib"
18582 test -d "$cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir" && cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir"
18583 }
18584
18585 cf_library_path_list="$cf_library_path_list $cf_search"
18586 ;;
18587 esac
18588 done
18589 fi
18590
18591 cf_search=
18592
18593 test "x$prefix" != "xNONE" && \
18594 test -d "$prefix" && \
18595 {
18596 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
18597 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
18598 test -d "$prefix/lib/$cf_ipv6dir" && cf_search="$cf_search $prefix/lib/$cf_ipv6dir"
18599 test -d "$prefix/lib/$cf_ipv6dir/lib" && cf_search="$cf_search $prefix/lib/$cf_ipv6dir/lib"
18600 test -d "$prefix/$cf_ipv6dir/lib" && cf_search="$cf_search $prefix/$cf_ipv6dir/lib"
18601 test -d "$prefix/$cf_ipv6dir/lib/$cf_ipv6dir" && cf_search="$cf_search $prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
18602 }
18603
18604 for cf_subdir_prefix in \
18605 /usr \
18606 /usr/local \
18607 /usr/pkg \
18608 /opt \
18609 /opt/local \
18610 $HOME
18611 do
18612
18613 test "x$cf_subdir_prefix" != "x$prefix" && \
18614 test -d "$cf_subdir_prefix" && \
18615 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
18616 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
18617 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
18618 test -d "$cf_subdir_prefix/lib/$cf_ipv6dir" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir"
18619 test -d "$cf_subdir_prefix/lib/$cf_ipv6dir/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir/lib"
18620 test -d "$cf_subdir_prefix/$cf_ipv6dir/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib"
18621 test -d "$cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir" && cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
18622 }
18623
18624 done
18625
18626 cf_search="$cf_library_path_list $cf_search"
18627
18628 for cf_libdir in $cf_search
18629 do
18630 echo "$as_me:18630: checking for -l$cf_ipv6lib in $cf_libdir" >&5
18631 echo $ECHO_N "checking for -l$cf_ipv6lib in $cf_libdir... $ECHO_C" >&6
18632 LIBS="-L$cf_libdir -l$cf_ipv6lib $cf_save_LIBS"
18633 cat >"conftest.$ac_ext" <<_ACEOF
18634 #line 18634 "configure"
18635 #include "confdefs.h"
18636
18637 #include <sys/types.h>
18638 #include <netdb.h>
18639 #include <netinet/in.h>
18640 #include <netinet/ip6.h>
18641 int
18642 main (void)
18643 {
18644 getaddrinfo(NULL, NULL, NULL, NULL)
18645 ;
18646 return 0;
18647 }
18648 _ACEOF
18649 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18650 if { (eval echo "$as_me:18650: \"$ac_link\"") >&5
18651 (eval $ac_link) 2>&5
18652 ac_status=$?
18653 echo "$as_me:18653: \$? = $ac_status" >&5
18654 (exit "$ac_status"); } &&
18655 { ac_try='test -s "conftest$ac_exeext"'
18656 { (eval echo "$as_me:18656: \"$ac_try\"") >&5
18657 (eval $ac_try) 2>&5
18658 ac_status=$?
18659 echo "$as_me:18659: \$? = $ac_status" >&5
18660 (exit "$ac_status"); }; }; then
18661 echo "$as_me:18661: result: yes" >&5
18662 echo "${ECHO_T}yes" >&6
18663 eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=yes'
18664 break
18665 else
18666 echo "$as_me: failed program was:" >&5
18667 cat "conftest.$ac_ext" >&5
18668 echo "$as_me:18668: result: no" >&5
18669 echo "${ECHO_T}no" >&6
18670 LIBS="$cf_save_LIBS"
18671 fi
18672 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18673 done
18674
18675 fi
18676 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18677
18678 fi
18679
18680 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_ipv6lib"\"
18681
18682 if test "$cf_found_library" = no ; then
18683 { { echo "$as_me:18683: error: No $cf_ipv6lib library found, cannot continue. You must fetch lib$cf_ipv6lib.a
18684 from an appropriate IPv6 kit and compile beforehand." >&5
18685 echo "$as_me: error: No $cf_ipv6lib library found, cannot continue. You must fetch lib$cf_ipv6lib.a
18686 from an appropriate IPv6 kit and compile beforehand." >&2;}
18687 { (exit 1); exit 1; }; }
18688 fi
18689 fi
18690
18691 echo "$as_me:18691: checking working getaddrinfo" >&5
18692 echo $ECHO_N "checking working getaddrinfo... $ECHO_C" >&6
18693 if test "${cf_cv_getaddrinfo+set}" = set; then
18694 echo $ECHO_N "(cached) $ECHO_C" >&6
18695 else
18696
18697 if test "$cross_compiling" = yes; then
18698 cf_cv_getaddrinfo=unknown
18699 else
18700 cat >"conftest.$ac_ext" <<_ACEOF
18701 #line 18701 "configure"
18702 #include "confdefs.h"
18703
18704 $ac_includes_default
18705
18706 #include <netdb.h>
18707 #include <sys/socket.h>
18708 #include <netinet/in.h>
18709
18710 #define expect(a,b) if (strcmp(a,b) != 0) goto bad
18711
18712 int main(void)
18713 {
18714 int passive, gaierr, inet4 = 0, inet6 = 0;
18715 struct addrinfo hints, *ai, *aitop;
18716 char straddr[INET6_ADDRSTRLEN], strport[16];
18717
18718 for (passive = 0; passive <= 1; passive++) {
18719 memset(&hints, 0, sizeof(hints));
18720 hints.ai_family = AF_UNSPEC;
18721 hints.ai_flags = passive ? AI_PASSIVE : 0;
18722 hints.ai_socktype = SOCK_STREAM;
18723 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18724 (void)gai_strerror(gaierr);
18725 goto bad;
18726 }
18727 for (ai = aitop; ai; ai = ai->ai_next) {
18728 if (ai->ai_addr == NULL ||
18729 ai->ai_addrlen == 0 ||
18730 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18731 straddr, sizeof(straddr), strport, sizeof(strport),
18732 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18733 goto bad;
18734 }
18735 switch (ai->ai_family) {
18736 case AF_INET:
18737 expect(strport, "54321");
18738 if (passive) {
18739 expect(straddr, "0.0.0.0");
18740 } else {
18741 expect(straddr, "127.0.0.1");
18742 }
18743 inet4++;
18744 break;
18745 case AF_INET6:
18746 expect(strport, "54321");
18747 if (passive) {
18748 expect(straddr, "::");
18749 } else {
18750 expect(straddr, "::1");
18751 }
18752 inet6++;
18753 break;
18754 case AF_UNSPEC:
18755 goto bad;
18756 break;
18757 default:
18758 /* another family support? */
18759 break;
18760 }
18761 }
18762 }
18763
18764 if (!(inet4 == 0 || inet4 == 2))
18765 goto bad;
18766 if (!(inet6 == 0 || inet6 == 2))
18767 goto bad;
18768
18769 if (aitop)
18770 freeaddrinfo(aitop);
18771 ${cf_cv_main_return:-return}(0);
18772
18773 bad:
18774 if (aitop)
18775 freeaddrinfo(aitop);
18776 ${cf_cv_main_return:-return}(1);
18777 }
18778
18779 _ACEOF
18780 rm -f "conftest$ac_exeext"
18781 if { (eval echo "$as_me:18781: \"$ac_link\"") >&5
18782 (eval $ac_link) 2>&5
18783 ac_status=$?
18784 echo "$as_me:18784: \$? = $ac_status" >&5
18785 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
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_getaddrinfo=yes
18792 else
18793 echo "$as_me: program exited with status $ac_status" >&5
18794 echo "$as_me: failed program was:" >&5
18795 cat "conftest.$ac_ext" >&5
18796 cf_cv_getaddrinfo=no
18797 fi
18798 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18799 fi
18800
18801 fi
18802 echo "$as_me:18802: result: $cf_cv_getaddrinfo" >&5
18803 echo "${ECHO_T}$cf_cv_getaddrinfo" >&6
18804 if test "$cf_cv_getaddrinfo" = yes ; then
18805
18806 cat >>confdefs.h <<\EOF
18807 #define HAVE_GAI_STRERROR 1
18808 EOF
18809
18810 cat >>confdefs.h <<\EOF
18811 #define HAVE_GETADDRINFO 1
18812 EOF
18813
18814 fi
18815
18816 if test "$cf_cv_getaddrinfo" != "yes"; then
18817 if test "$cf_cv_ipv6type" != "linux"; then
18818 { echo "$as_me:18818: WARNING: You must get working getaddrinfo() function,
18819 or you can specify \"--disable-ipv6\"" >&5
18820 echo "$as_me: WARNING: You must get working getaddrinfo() function,
18821 or you can specify \"--disable-ipv6\"" >&2;}
18822 else
18823 { echo "$as_me:18823: WARNING: The getaddrinfo() implementation on your system seems be buggy.
18824 You should upgrade your system library to the newest version
18825 of GNU C library (aka glibc)." >&5
18826 echo "$as_me: WARNING: The getaddrinfo() implementation on your system seems be buggy.
18827 You should upgrade your system library to the newest version
18828 of GNU C library (aka glibc)." >&2;}
18829 fi
18830 fi
18831
18832 fi
18833
18834 echo "$as_me:18834: checking for screen type" >&5
18835 echo $ECHO_N "checking for screen type... $ECHO_C" >&6
18836 if test "${cf_cv_screen+set}" = set; then
18837 echo $ECHO_N "(cached) $ECHO_C" >&6
18838 else
18839
18840 # Check whether --with-screen or --without-screen was given.
18841 if test "${with_screen+set}" = set; then
18842 withval="$with_screen"
18843
18844 case "$withval" in
18845 (curses|ncurses*|pdcurses|slang)
18846 cf_cv_screen=$withval
18847 ;;
18848 (*) { { echo "$as_me:18848: error: Unexpected value $withval" >&5
18849 echo "$as_me: error: Unexpected value $withval" >&2;}
18850 { (exit 1); exit 1; }; }
18851 ;;
18852 esac
18853 else
18854 cf_cv_screen=curses
18855 fi;
18856 fi
18857 echo "$as_me:18857: result: $cf_cv_screen" >&5
18858 echo "${ECHO_T}$cf_cv_screen" >&6
18859
18860 case "$cf_cv_screen" in
18861 (curses|ncurses*)
18862
18863 echo "$as_me:18863: checking for specific curses-directory" >&5
18864 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
18865
18866 # Check whether --with-curses-dir or --without-curses-dir was given.
18867 if test "${with_curses_dir+set}" = set; then
18868 withval="$with_curses_dir"
18869 cf_cv_curses_dir=$withval
18870 else
18871 cf_cv_curses_dir=no
18872 fi;
18873 echo "$as_me:18873: result: $cf_cv_curses_dir" >&5
18874 echo "${ECHO_T}$cf_cv_curses_dir" >&6
18875
18876 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
18877 then
18878
18879 if test "x$prefix" != xNONE; then
18880 cf_path_syntax="$prefix"
18881 else
18882 cf_path_syntax="$ac_default_prefix"
18883 fi
18884
18885 case "x$withval" in
18886 (x\$\(*\)*|x\'*\'*)
18887 ;;
18888 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
18889 ;;
18890 (x\$\{*prefix\}*|x\$\{*dir\}*)
18891 eval withval="$withval"
18892 case "x$withval" in
18893 (xNONE/*)
18894 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18895 ;;
18896 esac
18897 ;;
18898 (xno|xNONE/*)
18899 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18900 ;;
18901 (*)
18902 { { echo "$as_me:18902: error: expected a pathname, not \"$withval\"" >&5
18903 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18904 { (exit 1); exit 1; }; }
18905 ;;
18906 esac
18907
18908 if test -d "$cf_cv_curses_dir"
18909 then
18910
18911 if test -n "$cf_cv_curses_dir/include" ; then
18912 for cf_add_incdir in $cf_cv_curses_dir/include
18913 do
18914 while test "$cf_add_incdir" != /usr/include
18915 do
18916 if test -d "$cf_add_incdir"
18917 then
18918 cf_have_incdir=no
18919 if test -n "$CFLAGS$CPPFLAGS" ; then
18920 # a loop is needed to ensure we can add subdirs of existing dirs
18921 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18922 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18923 cf_have_incdir=yes; break
18924 fi
18925 done
18926 fi
18927
18928 if test "$cf_have_incdir" = no ; then
18929 if test "$cf_add_incdir" = /usr/local/include ; then
18930 if test "$GCC" = yes
18931 then
18932 cf_save_CPPFLAGS=$CPPFLAGS
18933
18934 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18935 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18936
18937 cat >"conftest.$ac_ext" <<_ACEOF
18938 #line 18938 "configure"
18939 #include "confdefs.h"
18940 #include <stdio.h>
18941 int
18942 main (void)
18943 {
18944 printf("Hello")
18945 ;
18946 return 0;
18947 }
18948 _ACEOF
18949 rm -f "conftest.$ac_objext"
18950 if { (eval echo "$as_me:18950: \"$ac_compile\"") >&5
18951 (eval $ac_compile) 2>&5
18952 ac_status=$?
18953 echo "$as_me:18953: \$? = $ac_status" >&5
18954 (exit "$ac_status"); } &&
18955 { ac_try='test -s "conftest.$ac_objext"'
18956 { (eval echo "$as_me:18956: \"$ac_try\"") >&5
18957 (eval $ac_try) 2>&5
18958 ac_status=$?
18959 echo "$as_me:18959: \$? = $ac_status" >&5
18960 (exit "$ac_status"); }; }; then
18961 :
18962 else
18963 echo "$as_me: failed program was:" >&5
18964 cat "conftest.$ac_ext" >&5
18965 cf_have_incdir=yes
18966 fi
18967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18968 CPPFLAGS=$cf_save_CPPFLAGS
18969 fi
18970 fi
18971 fi
18972
18973 if test "$cf_have_incdir" = no ; then
18974 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
18975
18976 echo "${as_me:-configure}:18976: testing adding $cf_add_incdir to include-path ..." 1>&5
18977
18978 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18979
18980 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18981 test "$cf_top_incdir" = "$cf_add_incdir" && break
18982 cf_add_incdir="$cf_top_incdir"
18983 else
18984 break
18985 fi
18986 else
18987 break
18988 fi
18989 done
18990 done
18991 fi
18992
18993 if test -n "$cf_cv_curses_dir/lib" ; then
18994 for cf_add_libdir in $cf_cv_curses_dir/lib
18995 do
18996 if test "$cf_add_libdir" = /usr/lib ; then
18997 :
18998 elif test -d "$cf_add_libdir"
18999 then
19000 cf_have_libdir=no
19001 if test -n "$LDFLAGS$LIBS" ; then
19002 # a loop is needed to ensure we can add subdirs of existing dirs
19003 for cf_test_libdir in $LDFLAGS $LIBS ; do
19004 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19005 cf_have_libdir=yes; break
19006 fi
19007 done
19008 fi
19009 if test "$cf_have_libdir" = no ; then
19010 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
19011
19012 echo "${as_me:-configure}:19012: testing adding $cf_add_libdir to library-path ..." 1>&5
19013
19014 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19015 fi
19016 fi
19017 done
19018 fi
19019
19020 fi
19021 fi
19022
19023 ;;
19024 esac
19025
19026 cf_wide_curses=no
19027 dft_color_style=yes
19028 case "$cf_cv_screen" in
19029 (curses)
19030
19031 echo "$as_me:19031: checking for extra include directories" >&5
19032 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
19033 if test "${cf_cv_curses_incdir+set}" = set; then
19034 echo $ECHO_N "(cached) $ECHO_C" >&6
19035 else
19036
19037 cf_cv_curses_incdir=no
19038 case "$host_os" in
19039 (hpux10.*)
19040 if test "x$cf_cv_screen" = "xcurses_colr"
19041 then
19042 test -d /usr/include/curses_colr && \
19043 cf_cv_curses_incdir="-I/usr/include/curses_colr"
19044 fi
19045 ;;
19046 (sunos3*|sunos4*)
19047 if test "x$cf_cv_screen" = "xcurses_5lib"
19048 then
19049 test -d /usr/5lib && \
19050 test -d /usr/5include && \
19051 cf_cv_curses_incdir="-I/usr/5include"
19052 fi
19053 ;;
19054 esac
19055
19056 fi
19057 echo "$as_me:19057: result: $cf_cv_curses_incdir" >&5
19058 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
19059 if test "$cf_cv_curses_incdir" != no
19060 then
19061
19062 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19063 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
19064
19065 fi
19066
19067 echo "$as_me:19067: checking if we have identified curses headers" >&5
19068 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
19069 if test "${cf_cv_ncurses_header+set}" = set; then
19070 echo $ECHO_N "(cached) $ECHO_C" >&6
19071 else
19072
19073 cf_cv_ncurses_header=none
19074 for cf_header in \
19075 ncurses.h \
19076 curses.h ncurses/ncurses.h ncurses/curses.h
19077 do
19078 cat >"conftest.$ac_ext" <<_ACEOF
19079 #line 19079 "configure"
19080 #include "confdefs.h"
19081 #include <${cf_header}>
19082 int
19083 main (void)
19084 {
19085 initscr(); endwin()
19086 ;
19087 return 0;
19088 }
19089 _ACEOF
19090 rm -f "conftest.$ac_objext"
19091 if { (eval echo "$as_me:19091: \"$ac_compile\"") >&5
19092 (eval $ac_compile) 2>&5
19093 ac_status=$?
19094 echo "$as_me:19094: \$? = $ac_status" >&5
19095 (exit "$ac_status"); } &&
19096 { ac_try='test -s "conftest.$ac_objext"'
19097 { (eval echo "$as_me:19097: \"$ac_try\"") >&5
19098 (eval $ac_try) 2>&5
19099 ac_status=$?
19100 echo "$as_me:19100: \$? = $ac_status" >&5
19101 (exit "$ac_status"); }; }; then
19102 cf_cv_ncurses_header=$cf_header; break
19103 else
19104 echo "$as_me: failed program was:" >&5
19105 cat "conftest.$ac_ext" >&5
19106 fi
19107 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19108 done
19109
19110 fi
19111 echo "$as_me:19111: result: $cf_cv_ncurses_header" >&5
19112 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
19113
19114 if test "$cf_cv_ncurses_header" = none ; then
19115 { { echo "$as_me:19115: error: No curses header-files found" >&5
19116 echo "$as_me: error: No curses header-files found" >&2;}
19117 { (exit 1); exit 1; }; }
19118 fi
19119
19120 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
19121
19122 for ac_header in $cf_cv_ncurses_header
19123 do
19124 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19125 echo "$as_me:19125: checking for $ac_header" >&5
19126 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19127 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19128 echo $ECHO_N "(cached) $ECHO_C" >&6
19129 else
19130 cat >"conftest.$ac_ext" <<_ACEOF
19131 #line 19131 "configure"
19132 #include "confdefs.h"
19133 #include <$ac_header>
19134 _ACEOF
19135 if { (eval echo "$as_me:19135: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19136 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19137 ac_status=$?
19138 $EGREP -v '^ *\+' conftest.er1 >conftest.err
19139 rm -f conftest.er1
19140 cat conftest.err >&5
19141 echo "$as_me:19141: \$? = $ac_status" >&5
19142 (exit "$ac_status"); } >/dev/null; then
19143 if test -s conftest.err; then
19144 ac_cpp_err=$ac_c_preproc_warn_flag
19145 else
19146 ac_cpp_err=
19147 fi
19148 else
19149 ac_cpp_err=yes
19150 fi
19151 if test -z "$ac_cpp_err"; then
19152 eval "$as_ac_Header=yes"
19153 else
19154 echo "$as_me: failed program was:" >&5
19155 cat "conftest.$ac_ext" >&5
19156 eval "$as_ac_Header=no"
19157 fi
19158 rm -f conftest.err "conftest.$ac_ext"
19159 fi
19160 echo "$as_me:19160: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19161 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19162 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19163 cat >>confdefs.h <<EOF
19164 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19165 EOF
19166
19167 fi
19168 done
19169
19170 echo "$as_me:19170: checking for terminfo header" >&5
19171 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
19172 if test "${cf_cv_term_header+set}" = set; then
19173 echo $ECHO_N "(cached) $ECHO_C" >&6
19174 else
19175
19176 case "${cf_cv_ncurses_header}" in
19177 (*/ncurses.h|*/ncursesw.h)
19178 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
19179 ;;
19180 (*)
19181 cf_term_header=term.h
19182 ;;
19183 esac
19184
19185 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
19186 do
19187 cat >"conftest.$ac_ext" <<_ACEOF
19188 #line 19188 "configure"
19189 #include "confdefs.h"
19190 #include <stdio.h>
19191 #include <${cf_cv_ncurses_header:-curses.h}>
19192 #include <$cf_test>
19193
19194 int
19195 main (void)
19196 {
19197 int x = auto_left_margin; (void)x
19198 ;
19199 return 0;
19200 }
19201 _ACEOF
19202 rm -f "conftest.$ac_objext"
19203 if { (eval echo "$as_me:19203: \"$ac_compile\"") >&5
19204 (eval $ac_compile) 2>&5
19205 ac_status=$?
19206 echo "$as_me:19206: \$? = $ac_status" >&5
19207 (exit "$ac_status"); } &&
19208 { ac_try='test -s "conftest.$ac_objext"'
19209 { (eval echo "$as_me:19209: \"$ac_try\"") >&5
19210 (eval $ac_try) 2>&5
19211 ac_status=$?
19212 echo "$as_me:19212: \$? = $ac_status" >&5
19213 (exit "$ac_status"); }; }; then
19214
19215 cf_cv_term_header="$cf_test"
19216 else
19217 echo "$as_me: failed program was:" >&5
19218 cat "conftest.$ac_ext" >&5
19219
19220 cf_cv_term_header=unknown
19221
19222 fi
19223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19224 test "$cf_cv_term_header" != unknown && break
19225 done
19226
19227 fi
19228 echo "$as_me:19228: result: $cf_cv_term_header" >&5
19229 echo "${ECHO_T}$cf_cv_term_header" >&6
19230
19231 # Set definitions to allow ifdef'ing to accommodate subdirectories
19232
19233 case "$cf_cv_term_header" in
19234 (*term.h)
19235
19236 cat >>confdefs.h <<\EOF
19237 #define HAVE_TERM_H 1
19238 EOF
19239
19240 ;;
19241 esac
19242
19243 case "$cf_cv_term_header" in
19244 (ncurses/term.h)
19245
19246 cat >>confdefs.h <<\EOF
19247 #define HAVE_NCURSES_TERM_H 1
19248 EOF
19249
19250 ;;
19251 (ncursesw/term.h)
19252
19253 cat >>confdefs.h <<\EOF
19254 #define HAVE_NCURSESW_TERM_H 1
19255 EOF
19256
19257 ;;
19258 esac
19259
19260 echo "$as_me:19260: checking for ncurses version" >&5
19261 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
19262 if test "${cf_cv_ncurses_version+set}" = set; then
19263 echo $ECHO_N "(cached) $ECHO_C" >&6
19264 else
19265
19266 cf_cv_ncurses_version=no
19267 cf_tempfile=out$$
19268 rm -f "$cf_tempfile"
19269 if test "$cross_compiling" = yes; then
19270
19271 # This will not work if the preprocessor splits the line after the
19272 # Autoconf token. The 'unproto' program does that.
19273 cat > "conftest.$ac_ext" <<EOF
19274 #include <${cf_cv_ncurses_header:-curses.h}>
19275 #undef Autoconf
19276 #ifdef NCURSES_VERSION
19277 Autoconf NCURSES_VERSION
19278 #else
19279 #ifdef __NCURSES_H
19280 Autoconf "old"
19281 #endif
19282 ;
19283 #endif
19284 EOF
19285 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
19286 { (eval echo "$as_me:19286: \"$cf_try\"") >&5
19287 (eval $cf_try) 2>&5
19288 ac_status=$?
19289 echo "$as_me:19289: \$? = $ac_status" >&5
19290 (exit "$ac_status"); }
19291 if test -f conftest.out ; then
19292 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
19293 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
19294 rm -f conftest.out
19295 fi
19296
19297 else
19298 cat >"conftest.$ac_ext" <<_ACEOF
19299 #line 19299 "configure"
19300 #include "confdefs.h"
19301
19302 $ac_includes_default
19303
19304 #include <${cf_cv_ncurses_header:-curses.h}>
19305
19306 int main(void)
19307 {
19308 FILE *fp = fopen("$cf_tempfile", "w");
19309 #ifdef NCURSES_VERSION
19310 # ifdef NCURSES_VERSION_PATCH
19311 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
19312 # else
19313 fprintf(fp, "%s\\n", NCURSES_VERSION);
19314 # endif
19315 #else
19316 # ifdef __NCURSES_H
19317 fprintf(fp, "old\\n");
19318 # else
19319 #error expected ncurses header to define __NCURSES_H
19320 # endif
19321 #endif
19322 ${cf_cv_main_return:-return}(0);
19323 }
19324 _ACEOF
19325 rm -f "conftest$ac_exeext"
19326 if { (eval echo "$as_me:19326: \"$ac_link\"") >&5
19327 (eval $ac_link) 2>&5
19328 ac_status=$?
19329 echo "$as_me:19329: \$? = $ac_status" >&5
19330 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19331 { (eval echo "$as_me:19331: \"$ac_try\"") >&5
19332 (eval $ac_try) 2>&5
19333 ac_status=$?
19334 echo "$as_me:19334: \$? = $ac_status" >&5
19335 (exit "$ac_status"); }; }; then
19336
19337 cf_cv_ncurses_version=`cat $cf_tempfile`
19338 else
19339 echo "$as_me: program exited with status $ac_status" >&5
19340 echo "$as_me: failed program was:" >&5
19341 cat "conftest.$ac_ext" >&5
19342 fi
19343 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19344 fi
19345 rm -f "$cf_tempfile"
19346
19347 fi
19348 echo "$as_me:19348: result: $cf_cv_ncurses_version" >&5
19349 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
19350 test "$cf_cv_ncurses_version" = no ||
19351 cat >>confdefs.h <<\EOF
19352 #define NCURSES 1
19353 EOF
19354
19355 echo "$as_me:19355: checking if we have identified curses libraries" >&5
19356 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
19357 cat >"conftest.$ac_ext" <<_ACEOF
19358 #line 19358 "configure"
19359 #include "confdefs.h"
19360 #include <${cf_cv_ncurses_header:-curses.h}>
19361 int
19362 main (void)
19363 {
19364 initscr(); endwin()
19365 ;
19366 return 0;
19367 }
19368 _ACEOF
19369 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19370 if { (eval echo "$as_me:19370: \"$ac_link\"") >&5
19371 (eval $ac_link) 2>&5
19372 ac_status=$?
19373 echo "$as_me:19373: \$? = $ac_status" >&5
19374 (exit "$ac_status"); } &&
19375 { ac_try='test -s "conftest$ac_exeext"'
19376 { (eval echo "$as_me:19376: \"$ac_try\"") >&5
19377 (eval $ac_try) 2>&5
19378 ac_status=$?
19379 echo "$as_me:19379: \$? = $ac_status" >&5
19380 (exit "$ac_status"); }; }; then
19381 cf_result=yes
19382 else
19383 echo "$as_me: failed program was:" >&5
19384 cat "conftest.$ac_ext" >&5
19385 cf_result=no
19386 fi
19387 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19388 echo "$as_me:19388: result: $cf_result" >&5
19389 echo "${ECHO_T}$cf_result" >&6
19390
19391 if test "$cf_result" = no ; then
19392 case "$host_os" in
19393 (freebsd*)
19394 echo "$as_me:19394: checking for tgoto in -lmytinfo" >&5
19395 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
19396 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
19397 echo $ECHO_N "(cached) $ECHO_C" >&6
19398 else
19399 ac_check_lib_save_LIBS=$LIBS
19400 LIBS="-lmytinfo $LIBS"
19401 cat >"conftest.$ac_ext" <<_ACEOF
19402 #line 19402 "configure"
19403 #include "confdefs.h"
19404
19405 /* Override any gcc2 internal prototype to avoid an error. */
19406 #ifdef __cplusplus
19407 extern "C"
19408 #endif
19409 /* We use char because int might match the return type of a gcc2
19410 builtin and then its argument prototype would still apply. */
19411 char tgoto (void);
19412 int
19413 main (void)
19414 {
19415 tgoto ();
19416 ;
19417 return 0;
19418 }
19419 _ACEOF
19420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19421 if { (eval echo "$as_me:19421: \"$ac_link\"") >&5
19422 (eval $ac_link) 2>&5
19423 ac_status=$?
19424 echo "$as_me:19424: \$? = $ac_status" >&5
19425 (exit "$ac_status"); } &&
19426 { ac_try='test -s "conftest$ac_exeext"'
19427 { (eval echo "$as_me:19427: \"$ac_try\"") >&5
19428 (eval $ac_try) 2>&5
19429 ac_status=$?
19430 echo "$as_me:19430: \$? = $ac_status" >&5
19431 (exit "$ac_status"); }; }; then
19432 ac_cv_lib_mytinfo_tgoto=yes
19433 else
19434 echo "$as_me: failed program was:" >&5
19435 cat "conftest.$ac_ext" >&5
19436 ac_cv_lib_mytinfo_tgoto=no
19437 fi
19438 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19439 LIBS=$ac_check_lib_save_LIBS
19440 fi
19441 echo "$as_me:19441: result: $ac_cv_lib_mytinfo_tgoto" >&5
19442 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
19443 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
19444
19445 cf_add_libs="$LIBS"
19446 # reverse order
19447 cf_add_0lib=
19448 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19449 # filter duplicates
19450 for cf_add_1lib in $cf_add_0lib; do
19451 for cf_add_2lib in $cf_add_libs; do
19452 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19453 cf_add_1lib=
19454 break
19455 fi
19456 done
19457 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19458 done
19459 LIBS="$cf_add_libs"
19460
19461 fi
19462
19463 ;;
19464 (hpux10.*)
19465 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
19466 # next (1998), and xcurses "newer" (2000). There is no header file for
19467 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
19468 # term.h) for cur_colr
19469 if test "x$cf_cv_screen" = "xcurses_colr"
19470 then
19471 echo "$as_me:19471: checking for initscr in -lcur_colr" >&5
19472 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
19473 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
19474 echo $ECHO_N "(cached) $ECHO_C" >&6
19475 else
19476 ac_check_lib_save_LIBS=$LIBS
19477 LIBS="-lcur_colr $LIBS"
19478 cat >"conftest.$ac_ext" <<_ACEOF
19479 #line 19479 "configure"
19480 #include "confdefs.h"
19481
19482 /* Override any gcc2 internal prototype to avoid an error. */
19483 #ifdef __cplusplus
19484 extern "C"
19485 #endif
19486 /* We use char because int might match the return type of a gcc2
19487 builtin and then its argument prototype would still apply. */
19488 char initscr (void);
19489 int
19490 main (void)
19491 {
19492 initscr ();
19493 ;
19494 return 0;
19495 }
19496 _ACEOF
19497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19498 if { (eval echo "$as_me:19498: \"$ac_link\"") >&5
19499 (eval $ac_link) 2>&5
19500 ac_status=$?
19501 echo "$as_me:19501: \$? = $ac_status" >&5
19502 (exit "$ac_status"); } &&
19503 { ac_try='test -s "conftest$ac_exeext"'
19504 { (eval echo "$as_me:19504: \"$ac_try\"") >&5
19505 (eval $ac_try) 2>&5
19506 ac_status=$?
19507 echo "$as_me:19507: \$? = $ac_status" >&5
19508 (exit "$ac_status"); }; }; then
19509 ac_cv_lib_cur_colr_initscr=yes
19510 else
19511 echo "$as_me: failed program was:" >&5
19512 cat "conftest.$ac_ext" >&5
19513 ac_cv_lib_cur_colr_initscr=no
19514 fi
19515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19516 LIBS=$ac_check_lib_save_LIBS
19517 fi
19518 echo "$as_me:19518: result: $ac_cv_lib_cur_colr_initscr" >&5
19519 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
19520 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
19521
19522 cf_add_libs="$LIBS"
19523 # reverse order
19524 cf_add_0lib=
19525 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19526 # filter duplicates
19527 for cf_add_1lib in $cf_add_0lib; do
19528 for cf_add_2lib in $cf_add_libs; do
19529 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19530 cf_add_1lib=
19531 break
19532 fi
19533 done
19534 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19535 done
19536 LIBS="$cf_add_libs"
19537
19538 ac_cv_func_initscr=yes
19539
19540 else
19541
19542 echo "$as_me:19542: checking for initscr in -lHcurses" >&5
19543 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
19544 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
19545 echo $ECHO_N "(cached) $ECHO_C" >&6
19546 else
19547 ac_check_lib_save_LIBS=$LIBS
19548 LIBS="-lHcurses $LIBS"
19549 cat >"conftest.$ac_ext" <<_ACEOF
19550 #line 19550 "configure"
19551 #include "confdefs.h"
19552
19553 /* Override any gcc2 internal prototype to avoid an error. */
19554 #ifdef __cplusplus
19555 extern "C"
19556 #endif
19557 /* We use char because int might match the return type of a gcc2
19558 builtin and then its argument prototype would still apply. */
19559 char initscr (void);
19560 int
19561 main (void)
19562 {
19563 initscr ();
19564 ;
19565 return 0;
19566 }
19567 _ACEOF
19568 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19569 if { (eval echo "$as_me:19569: \"$ac_link\"") >&5
19570 (eval $ac_link) 2>&5
19571 ac_status=$?
19572 echo "$as_me:19572: \$? = $ac_status" >&5
19573 (exit "$ac_status"); } &&
19574 { ac_try='test -s "conftest$ac_exeext"'
19575 { (eval echo "$as_me:19575: \"$ac_try\"") >&5
19576 (eval $ac_try) 2>&5
19577 ac_status=$?
19578 echo "$as_me:19578: \$? = $ac_status" >&5
19579 (exit "$ac_status"); }; }; then
19580 ac_cv_lib_Hcurses_initscr=yes
19581 else
19582 echo "$as_me: failed program was:" >&5
19583 cat "conftest.$ac_ext" >&5
19584 ac_cv_lib_Hcurses_initscr=no
19585 fi
19586 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19587 LIBS=$ac_check_lib_save_LIBS
19588 fi
19589 echo "$as_me:19589: result: $ac_cv_lib_Hcurses_initscr" >&5
19590 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
19591 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
19592
19593 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
19594
19595 cf_add_libs="$LIBS"
19596 # reverse order
19597 cf_add_0lib=
19598 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19599 # filter duplicates
19600 for cf_add_1lib in $cf_add_0lib; do
19601 for cf_add_2lib in $cf_add_libs; do
19602 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19603 cf_add_1lib=
19604 break
19605 fi
19606 done
19607 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19608 done
19609 LIBS="$cf_add_libs"
19610
19611 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19612 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
19613
19614 ac_cv_func_initscr=yes
19615
19616 fi
19617
19618 fi
19619
19620 fi
19621 ;;
19622 (linux*)
19623 case `arch 2>/dev/null` in
19624 (x86_64)
19625 if test -d /lib64
19626 then
19627
19628 if test -n "/lib64" ; then
19629 for cf_add_libdir in /lib64
19630 do
19631 if test "$cf_add_libdir" = /usr/lib ; then
19632 :
19633 elif test -d "$cf_add_libdir"
19634 then
19635 cf_have_libdir=no
19636 if test -n "$LDFLAGS$LIBS" ; then
19637 # a loop is needed to ensure we can add subdirs of existing dirs
19638 for cf_test_libdir in $LDFLAGS $LIBS ; do
19639 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19640 cf_have_libdir=yes; break
19641 fi
19642 done
19643 fi
19644 if test "$cf_have_libdir" = no ; then
19645 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
19646
19647 echo "${as_me:-configure}:19647: testing adding $cf_add_libdir to library-path ..." 1>&5
19648
19649 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19650 fi
19651 fi
19652 done
19653 fi
19654
19655 else
19656
19657 if test -n "/lib" ; then
19658 for cf_add_libdir in /lib
19659 do
19660 if test "$cf_add_libdir" = /usr/lib ; then
19661 :
19662 elif test -d "$cf_add_libdir"
19663 then
19664 cf_have_libdir=no
19665 if test -n "$LDFLAGS$LIBS" ; then
19666 # a loop is needed to ensure we can add subdirs of existing dirs
19667 for cf_test_libdir in $LDFLAGS $LIBS ; do
19668 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19669 cf_have_libdir=yes; break
19670 fi
19671 done
19672 fi
19673 if test "$cf_have_libdir" = no ; then
19674 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
19675
19676 echo "${as_me:-configure}:19676: testing adding $cf_add_libdir to library-path ..." 1>&5
19677
19678 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19679 fi
19680 fi
19681 done
19682 fi
19683
19684 fi
19685 ;;
19686 (*)
19687
19688 if test -n "/lib" ; then
19689 for cf_add_libdir in /lib
19690 do
19691 if test "$cf_add_libdir" = /usr/lib ; then
19692 :
19693 elif test -d "$cf_add_libdir"
19694 then
19695 cf_have_libdir=no
19696 if test -n "$LDFLAGS$LIBS" ; then
19697 # a loop is needed to ensure we can add subdirs of existing dirs
19698 for cf_test_libdir in $LDFLAGS $LIBS ; do
19699 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19700 cf_have_libdir=yes; break
19701 fi
19702 done
19703 fi
19704 if test "$cf_have_libdir" = no ; then
19705 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
19706
19707 echo "${as_me:-configure}:19707: testing adding $cf_add_libdir to library-path ..." 1>&5
19708
19709 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19710 fi
19711 fi
19712 done
19713 fi
19714
19715 ;;
19716 esac
19717 ;;
19718 (sunos3*|sunos4*)
19719 if test "x$cf_cv_screen" = "xcurses_5lib"
19720 then
19721 if test -d /usr/5lib ; then
19722
19723 if test -n "/usr/5lib" ; then
19724 for cf_add_libdir in /usr/5lib
19725 do
19726 if test "$cf_add_libdir" = /usr/lib ; then
19727 :
19728 elif test -d "$cf_add_libdir"
19729 then
19730 cf_have_libdir=no
19731 if test -n "$LDFLAGS$LIBS" ; then
19732 # a loop is needed to ensure we can add subdirs of existing dirs
19733 for cf_test_libdir in $LDFLAGS $LIBS ; do
19734 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19735 cf_have_libdir=yes; break
19736 fi
19737 done
19738 fi
19739 if test "$cf_have_libdir" = no ; then
19740 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
19741
19742 echo "${as_me:-configure}:19742: testing adding $cf_add_libdir to library-path ..." 1>&5
19743
19744 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19745 fi
19746 fi
19747 done
19748 fi
19749
19750 cf_add_libs="$LIBS"
19751 # reverse order
19752 cf_add_0lib=
19753 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19754 # filter duplicates
19755 for cf_add_1lib in $cf_add_0lib; do
19756 for cf_add_2lib in $cf_add_libs; do
19757 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19758 cf_add_1lib=
19759 break
19760 fi
19761 done
19762 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19763 done
19764 LIBS="$cf_add_libs"
19765
19766 fi
19767 fi
19768 ac_cv_func_initscr=yes
19769 ;;
19770 esac
19771
19772 if test ".$ac_cv_func_initscr" != .yes ; then
19773 cf_save_LIBS="$LIBS"
19774
19775 if test ".${cf_cv_ncurses_version:-no}" != .no
19776 then
19777 cf_check_list="ncurses curses cursesX"
19778 else
19779 cf_check_list="cursesX curses ncurses"
19780 fi
19781
19782 # Check for library containing tgoto. Do this before curses library
19783 # because it may be needed to link the test-case for initscr.
19784 if test "x$cf_term_lib" = x
19785 then
19786 echo "$as_me:19786: checking for tgoto" >&5
19787 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
19788 if test "${ac_cv_func_tgoto+set}" = set; then
19789 echo $ECHO_N "(cached) $ECHO_C" >&6
19790 else
19791 cat >"conftest.$ac_ext" <<_ACEOF
19792 #line 19792 "configure"
19793 #include "confdefs.h"
19794 #define tgoto autoconf_temporary
19795 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19796 #undef tgoto
19797
19798 #ifdef __cplusplus
19799 extern "C"
19800 #endif
19801
19802 /* We use char because int might match the return type of a gcc2
19803 builtin and then its argument prototype would still apply. */
19804 char tgoto (void);
19805
19806 int
19807 main (void)
19808 {
19809
19810 /* The GNU C library defines stubs for functions which it implements
19811 to always fail with ENOSYS. Some functions are actually named
19812 something starting with __ and the normal name is an alias. */
19813 #if defined (__stub_tgoto) || defined (__stub___tgoto)
19814 #error found stub for tgoto
19815 #endif
19816
19817 return tgoto ();
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 ac_cv_func_tgoto=yes
19835 else
19836 echo "$as_me: failed program was:" >&5
19837 cat "conftest.$ac_ext" >&5
19838 ac_cv_func_tgoto=no
19839 fi
19840 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19841 fi
19842 echo "$as_me:19842: result: $ac_cv_func_tgoto" >&5
19843 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
19844 if test "$ac_cv_func_tgoto" = yes; then
19845 cf_term_lib=predefined
19846 else
19847
19848 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
19849 do
19850 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
19851 echo "$as_me:19851: checking for tgoto in -l$cf_term_lib" >&5
19852 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
19853 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19854 echo $ECHO_N "(cached) $ECHO_C" >&6
19855 else
19856 ac_check_lib_save_LIBS=$LIBS
19857 LIBS="-l$cf_term_lib $LIBS"
19858 cat >"conftest.$ac_ext" <<_ACEOF
19859 #line 19859 "configure"
19860 #include "confdefs.h"
19861
19862 /* Override any gcc2 internal prototype to avoid an error. */
19863 #ifdef __cplusplus
19864 extern "C"
19865 #endif
19866 /* We use char because int might match the return type of a gcc2
19867 builtin and then its argument prototype would still apply. */
19868 char tgoto (void);
19869 int
19870 main (void)
19871 {
19872 tgoto ();
19873 ;
19874 return 0;
19875 }
19876 _ACEOF
19877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19878 if { (eval echo "$as_me:19878: \"$ac_link\"") >&5
19879 (eval $ac_link) 2>&5
19880 ac_status=$?
19881 echo "$as_me:19881: \$? = $ac_status" >&5
19882 (exit "$ac_status"); } &&
19883 { ac_try='test -s "conftest$ac_exeext"'
19884 { (eval echo "$as_me:19884: \"$ac_try\"") >&5
19885 (eval $ac_try) 2>&5
19886 ac_status=$?
19887 echo "$as_me:19887: \$? = $ac_status" >&5
19888 (exit "$ac_status"); }; }; then
19889 eval "$as_ac_Lib=yes"
19890 else
19891 echo "$as_me: failed program was:" >&5
19892 cat "conftest.$ac_ext" >&5
19893 eval "$as_ac_Lib=no"
19894 fi
19895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19896 LIBS=$ac_check_lib_save_LIBS
19897 fi
19898 echo "$as_me:19898: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19899 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19900 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19901
19902 : "${cf_nculib_root:=$cf_term_lib}"
19903 break
19904
19905 fi
19906
19907 done
19908
19909 fi
19910
19911 fi
19912
19913 # Check for library containing initscr
19914 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
19915 if test "x$cf_curs_lib" = x
19916 then
19917 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
19918 do
19919 LIBS="-l$cf_curs_lib $cf_save_LIBS"
19920 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
19921 echo "$as_me:19921: checking if we can link with $cf_curs_lib library" >&5
19922 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
19923 cat >"conftest.$ac_ext" <<_ACEOF
19924 #line 19924 "configure"
19925 #include "confdefs.h"
19926 #include <${cf_cv_ncurses_header:-curses.h}>
19927 int
19928 main (void)
19929 {
19930 initscr()
19931 ;
19932 return 0;
19933 }
19934 _ACEOF
19935 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19936 if { (eval echo "$as_me:19936: \"$ac_link\"") >&5
19937 (eval $ac_link) 2>&5
19938 ac_status=$?
19939 echo "$as_me:19939: \$? = $ac_status" >&5
19940 (exit "$ac_status"); } &&
19941 { ac_try='test -s "conftest$ac_exeext"'
19942 { (eval echo "$as_me:19942: \"$ac_try\"") >&5
19943 (eval $ac_try) 2>&5
19944 ac_status=$?
19945 echo "$as_me:19945: \$? = $ac_status" >&5
19946 (exit "$ac_status"); }; }; then
19947 cf_result=yes
19948 else
19949 echo "$as_me: failed program was:" >&5
19950 cat "conftest.$ac_ext" >&5
19951 cf_result=no
19952 fi
19953 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19954 echo "$as_me:19954: result: $cf_result" >&5
19955 echo "${ECHO_T}$cf_result" >&6
19956 test "$cf_result" = yes && break
19957 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
19958 cf_result=no
19959 elif test "$cf_term_lib" != predefined ; then
19960 echo "$as_me:19960: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
19961 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
19962 cat >"conftest.$ac_ext" <<_ACEOF
19963 #line 19963 "configure"
19964 #include "confdefs.h"
19965 #include <${cf_cv_ncurses_header:-curses.h}>
19966 int
19967 main (void)
19968 {
19969 initscr(); endwin();
19970 ;
19971 return 0;
19972 }
19973 _ACEOF
19974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19975 if { (eval echo "$as_me:19975: \"$ac_link\"") >&5
19976 (eval $ac_link) 2>&5
19977 ac_status=$?
19978 echo "$as_me:19978: \$? = $ac_status" >&5
19979 (exit "$ac_status"); } &&
19980 { ac_try='test -s "conftest$ac_exeext"'
19981 { (eval echo "$as_me:19981: \"$ac_try\"") >&5
19982 (eval $ac_try) 2>&5
19983 ac_status=$?
19984 echo "$as_me:19984: \$? = $ac_status" >&5
19985 (exit "$ac_status"); }; }; then
19986 cf_result=no
19987 else
19988 echo "$as_me: failed program was:" >&5
19989 cat "conftest.$ac_ext" >&5
19990
19991 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
19992 cat >"conftest.$ac_ext" <<_ACEOF
19993 #line 19993 "configure"
19994 #include "confdefs.h"
19995 #include <${cf_cv_ncurses_header:-curses.h}>
19996 int
19997 main (void)
19998 {
19999 initscr()
20000 ;
20001 return 0;
20002 }
20003 _ACEOF
20004 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20005 if { (eval echo "$as_me:20005: \"$ac_link\"") >&5
20006 (eval $ac_link) 2>&5
20007 ac_status=$?
20008 echo "$as_me:20008: \$? = $ac_status" >&5
20009 (exit "$ac_status"); } &&
20010 { ac_try='test -s "conftest$ac_exeext"'
20011 { (eval echo "$as_me:20011: \"$ac_try\"") >&5
20012 (eval $ac_try) 2>&5
20013 ac_status=$?
20014 echo "$as_me:20014: \$? = $ac_status" >&5
20015 (exit "$ac_status"); }; }; then
20016 cf_result=yes
20017 else
20018 echo "$as_me: failed program was:" >&5
20019 cat "conftest.$ac_ext" >&5
20020 cf_result=error
20021 fi
20022 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20023
20024 fi
20025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20026 echo "$as_me:20026: result: $cf_result" >&5
20027 echo "${ECHO_T}$cf_result" >&6
20028 test "$cf_result" != error && break
20029 fi
20030 done
20031 fi
20032 test "$cf_curs_lib" = unknown && { { echo "$as_me:20032: error: no curses library found" >&5
20033 echo "$as_me: error: no curses library found" >&2;}
20034 { (exit 1); exit 1; }; }
20035 fi
20036 fi
20037
20038 echo "$as_me:20038: checking for curses performance tradeoff" >&5
20039 echo $ECHO_N "checking for curses performance tradeoff... $ECHO_C" >&6
20040 if test "${cf_cv_curs_performance+set}" = set; then
20041 echo $ECHO_N "(cached) $ECHO_C" >&6
20042 else
20043
20044 cf_cv_curs_performance=no
20045 cat >"conftest.$ac_ext" <<_ACEOF
20046 #line 20046 "configure"
20047 #include "confdefs.h"
20048
20049 #include <${cf_cv_ncurses_header:-curses.h}>
20050 int
20051 main (void)
20052 {
20053
20054 #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
20055 int x = ERR;
20056 #else
20057 int x = ; /* force an error */
20058 #endif
20059
20060 ;
20061 return 0;
20062 }
20063 _ACEOF
20064 rm -f "conftest.$ac_objext"
20065 if { (eval echo "$as_me:20065: \"$ac_compile\"") >&5
20066 (eval $ac_compile) 2>&5
20067 ac_status=$?
20068 echo "$as_me:20068: \$? = $ac_status" >&5
20069 (exit "$ac_status"); } &&
20070 { ac_try='test -s "conftest.$ac_objext"'
20071 { (eval echo "$as_me:20071: \"$ac_try\"") >&5
20072 (eval $ac_try) 2>&5
20073 ac_status=$?
20074 echo "$as_me:20074: \$? = $ac_status" >&5
20075 (exit "$ac_status"); }; }; then
20076
20077 cat >"conftest.$ac_ext" <<_ACEOF
20078 #line 20078 "configure"
20079 #include "confdefs.h"
20080
20081 #define CURS_PERFORMANCE
20082 #include <${cf_cv_ncurses_header:-curses.h}>
20083 int
20084 main (void)
20085 {
20086
20087 #if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
20088 int x = ; /* force an error */
20089 #else
20090 int x = ERR;
20091 #endif
20092
20093 ;
20094 return 0;
20095 }
20096 _ACEOF
20097 rm -f "conftest.$ac_objext"
20098 if { (eval echo "$as_me:20098: \"$ac_compile\"") >&5
20099 (eval $ac_compile) 2>&5
20100 ac_status=$?
20101 echo "$as_me:20101: \$? = $ac_status" >&5
20102 (exit "$ac_status"); } &&
20103 { ac_try='test -s "conftest.$ac_objext"'
20104 { (eval echo "$as_me:20104: \"$ac_try\"") >&5
20105 (eval $ac_try) 2>&5
20106 ac_status=$?
20107 echo "$as_me:20107: \$? = $ac_status" >&5
20108 (exit "$ac_status"); }; }; then
20109 cf_cv_curs_performance=yes
20110 else
20111 echo "$as_me: failed program was:" >&5
20112 cat "conftest.$ac_ext" >&5
20113 fi
20114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20115 else
20116 echo "$as_me: failed program was:" >&5
20117 cat "conftest.$ac_ext" >&5
20118 fi
20119 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20120 fi
20121
20122 echo "$as_me:20122: result: $cf_cv_curs_performance" >&5
20123 echo "${ECHO_T}$cf_cv_curs_performance" >&6
20124 test "$cf_cv_curs_performance" = yes &&
20125 cat >>confdefs.h <<\EOF
20126 #define CURS_PERFORMANCE 1
20127 EOF
20128
20129 echo "$as_me:20129: checking for curses touchline function" >&5
20130 echo $ECHO_N "checking for curses touchline function... $ECHO_C" >&6
20131 if test "${cf_cv_curs_touchline+set}" = set; then
20132 echo $ECHO_N "(cached) $ECHO_C" >&6
20133 else
20134
20135 cat >"conftest.$ac_ext" <<_ACEOF
20136 #line 20136 "configure"
20137 #include "confdefs.h"
20138
20139 #include <${cf_cv_ncurses_header:-curses.h}>
20140 int
20141 main (void)
20142 {
20143 touchline(stdscr, 1,2,3);
20144 ;
20145 return 0;
20146 }
20147 _ACEOF
20148 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20149 if { (eval echo "$as_me:20149: \"$ac_link\"") >&5
20150 (eval $ac_link) 2>&5
20151 ac_status=$?
20152 echo "$as_me:20152: \$? = $ac_status" >&5
20153 (exit "$ac_status"); } &&
20154 { ac_try='test -s "conftest$ac_exeext"'
20155 { (eval echo "$as_me:20155: \"$ac_try\"") >&5
20156 (eval $ac_try) 2>&5
20157 ac_status=$?
20158 echo "$as_me:20158: \$? = $ac_status" >&5
20159 (exit "$ac_status"); }; }; then
20160 cf_cv_curs_touchline=bsd
20161 else
20162 echo "$as_me: failed program was:" >&5
20163 cat "conftest.$ac_ext" >&5
20164 cat >"conftest.$ac_ext" <<_ACEOF
20165 #line 20165 "configure"
20166 #include "confdefs.h"
20167
20168 #include <${cf_cv_ncurses_header:-curses.h}>
20169 int
20170 main (void)
20171 {
20172 touchline(stdscr, 1,2);
20173 ;
20174 return 0;
20175 }
20176 _ACEOF
20177 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20178 if { (eval echo "$as_me:20178: \"$ac_link\"") >&5
20179 (eval $ac_link) 2>&5
20180 ac_status=$?
20181 echo "$as_me:20181: \$? = $ac_status" >&5
20182 (exit "$ac_status"); } &&
20183 { ac_try='test -s "conftest$ac_exeext"'
20184 { (eval echo "$as_me:20184: \"$ac_try\"") >&5
20185 (eval $ac_try) 2>&5
20186 ac_status=$?
20187 echo "$as_me:20187: \$? = $ac_status" >&5
20188 (exit "$ac_status"); }; }; then
20189 cf_cv_curs_touchline=sysv
20190 else
20191 echo "$as_me: failed program was:" >&5
20192 cat "conftest.$ac_ext" >&5
20193 cf_cv_curs_touchline=bsd
20194 fi
20195 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20196 fi
20197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20198 fi
20199 echo "$as_me:20199: result: $cf_cv_curs_touchline" >&5
20200 echo "${ECHO_T}$cf_cv_curs_touchline" >&6
20201 case "$cf_cv_curs_touchline" in
20202 (bsd)
20203
20204 cat >>confdefs.h <<\EOF
20205 #define HAVE_BSD_TOUCHLINE 1
20206 EOF
20207
20208 ;;
20209 (sysv)
20210
20211 cat >>confdefs.h <<\EOF
20212 #define HAVE_SYSV_TOUCHLINE 1
20213 EOF
20214
20215 ;;
20216 esac
20217
20218 ;;
20219 (ncursesw*)
20220
20221 for ac_header in wchar.h
20222 do
20223 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20224 echo "$as_me:20224: checking for $ac_header" >&5
20225 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20226 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20227 echo $ECHO_N "(cached) $ECHO_C" >&6
20228 else
20229 cat >"conftest.$ac_ext" <<_ACEOF
20230 #line 20230 "configure"
20231 #include "confdefs.h"
20232 #include <$ac_header>
20233 _ACEOF
20234 if { (eval echo "$as_me:20234: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20235 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20236 ac_status=$?
20237 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20238 rm -f conftest.er1
20239 cat conftest.err >&5
20240 echo "$as_me:20240: \$? = $ac_status" >&5
20241 (exit "$ac_status"); } >/dev/null; then
20242 if test -s conftest.err; then
20243 ac_cpp_err=$ac_c_preproc_warn_flag
20244 else
20245 ac_cpp_err=
20246 fi
20247 else
20248 ac_cpp_err=yes
20249 fi
20250 if test -z "$ac_cpp_err"; then
20251 eval "$as_ac_Header=yes"
20252 else
20253 echo "$as_me: failed program was:" >&5
20254 cat "conftest.$ac_ext" >&5
20255 eval "$as_ac_Header=no"
20256 fi
20257 rm -f conftest.err "conftest.$ac_ext"
20258 fi
20259 echo "$as_me:20259: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20260 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20261 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20262 cat >>confdefs.h <<EOF
20263 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20264 EOF
20265
20266 fi
20267 done
20268
20269 echo "$as_me:20269: checking for multibyte character support" >&5
20270 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
20271 if test "${cf_cv_utf8_lib+set}" = set; then
20272 echo $ECHO_N "(cached) $ECHO_C" >&6
20273 else
20274
20275 cf_save_LIBS="$LIBS"
20276 cat >"conftest.$ac_ext" <<_ACEOF
20277 #line 20277 "configure"
20278 #include "confdefs.h"
20279
20280 $ac_includes_default
20281 #ifdef HAVE_WCHAR_H
20282 #include <wchar.h>
20283 #endif
20284
20285 int
20286 main (void)
20287 {
20288 putwc(0,(FILE*)0);
20289 ;
20290 return 0;
20291 }
20292 _ACEOF
20293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20294 if { (eval echo "$as_me:20294: \"$ac_link\"") >&5
20295 (eval $ac_link) 2>&5
20296 ac_status=$?
20297 echo "$as_me:20297: \$? = $ac_status" >&5
20298 (exit "$ac_status"); } &&
20299 { ac_try='test -s "conftest$ac_exeext"'
20300 { (eval echo "$as_me:20300: \"$ac_try\"") >&5
20301 (eval $ac_try) 2>&5
20302 ac_status=$?
20303 echo "$as_me:20303: \$? = $ac_status" >&5
20304 (exit "$ac_status"); }; }; then
20305 cf_cv_utf8_lib=yes
20306 else
20307 echo "$as_me: failed program was:" >&5
20308 cat "conftest.$ac_ext" >&5
20309
20310 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
20311 # will be set on completion of the AC_LINK_IFELSE below.
20312 cf_cv_header_path_utf8=
20313 cf_cv_library_path_utf8=
20314
20315 echo "${as_me:-configure}:20315: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
20316
20317 cf_save_LIBS="$LIBS"
20318
20319 cat >"conftest.$ac_ext" <<_ACEOF
20320 #line 20320 "configure"
20321 #include "confdefs.h"
20322
20323 #include <libutf8.h>
20324 int
20325 main (void)
20326 {
20327 putwc(0,(FILE*)0);
20328 ;
20329 return 0;
20330 }
20331 _ACEOF
20332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20333 if { (eval echo "$as_me:20333: \"$ac_link\"") >&5
20334 (eval $ac_link) 2>&5
20335 ac_status=$?
20336 echo "$as_me:20336: \$? = $ac_status" >&5
20337 (exit "$ac_status"); } &&
20338 { ac_try='test -s "conftest$ac_exeext"'
20339 { (eval echo "$as_me:20339: \"$ac_try\"") >&5
20340 (eval $ac_try) 2>&5
20341 ac_status=$?
20342 echo "$as_me:20342: \$? = $ac_status" >&5
20343 (exit "$ac_status"); }; }; then
20344
20345 cf_cv_find_linkage_utf8=yes
20346 cf_cv_header_path_utf8=/usr/include
20347 cf_cv_library_path_utf8=/usr/lib
20348
20349 else
20350 echo "$as_me: failed program was:" >&5
20351 cat "conftest.$ac_ext" >&5
20352
20353 LIBS="-lutf8 $cf_save_LIBS"
20354
20355 cat >"conftest.$ac_ext" <<_ACEOF
20356 #line 20356 "configure"
20357 #include "confdefs.h"
20358
20359 #include <libutf8.h>
20360 int
20361 main (void)
20362 {
20363 putwc(0,(FILE*)0);
20364 ;
20365 return 0;
20366 }
20367 _ACEOF
20368 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20369 if { (eval echo "$as_me:20369: \"$ac_link\"") >&5
20370 (eval $ac_link) 2>&5
20371 ac_status=$?
20372 echo "$as_me:20372: \$? = $ac_status" >&5
20373 (exit "$ac_status"); } &&
20374 { ac_try='test -s "conftest$ac_exeext"'
20375 { (eval echo "$as_me:20375: \"$ac_try\"") >&5
20376 (eval $ac_try) 2>&5
20377 ac_status=$?
20378 echo "$as_me:20378: \$? = $ac_status" >&5
20379 (exit "$ac_status"); }; }; then
20380
20381 cf_cv_find_linkage_utf8=yes
20382 cf_cv_header_path_utf8=/usr/include
20383 cf_cv_library_path_utf8=/usr/lib
20384 cf_cv_library_file_utf8="-lutf8"
20385
20386 else
20387 echo "$as_me: failed program was:" >&5
20388 cat "conftest.$ac_ext" >&5
20389
20390 cf_cv_find_linkage_utf8=no
20391 LIBS="$cf_save_LIBS"
20392
20393 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
20394
20395 echo "${as_me:-configure}:20395: testing find linkage for utf8 library ..." 1>&5
20396
20397 echo "${as_me:-configure}:20397: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
20398
20399 cf_save_CPPFLAGS="$CPPFLAGS"
20400 cf_test_CPPFLAGS="$CPPFLAGS"
20401
20402 cf_search=
20403
20404 # collect the current set of include-directories from compiler flags
20405 cf_header_path_list=""
20406 if test -n "${CFLAGS}${CPPFLAGS}" ; then
20407 for cf_header_path in $CPPFLAGS $CFLAGS
20408 do
20409 case "$cf_header_path" in
20410 (-I*)
20411 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
20412
20413 test "x$cf_header_path" != "xNONE" && \
20414 test -d "$cf_header_path" && \
20415 {
20416 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
20417 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
20418 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
20419 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
20420 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
20421 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
20422 }
20423
20424 cf_header_path_list="$cf_header_path_list $cf_search"
20425 ;;
20426 esac
20427 done
20428 fi
20429
20430 # add the variations for the package we are looking for
20431
20432 cf_search=
20433
20434 test "x$prefix" != "xNONE" && \
20435 test -d "$prefix" && \
20436 {
20437 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
20438 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
20439 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
20440 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
20441 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
20442 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
20443 }
20444
20445 for cf_subdir_prefix in \
20446 /usr \
20447 /usr/local \
20448 /usr/pkg \
20449 /opt \
20450 /opt/local \
20451 $HOME
20452 do
20453
20454 test "x$cf_subdir_prefix" != "x$prefix" && \
20455 test -d "$cf_subdir_prefix" && \
20456 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
20457 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
20458 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
20459 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
20460 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
20461 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
20462 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
20463 }
20464
20465 done
20466
20467 test "$includedir" != NONE && \
20468 test "$includedir" != "/usr/include" && \
20469 test -d "$includedir" && {
20470 test -d "$includedir" && cf_search="$cf_search $includedir"
20471 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
20472 }
20473
20474 test "$oldincludedir" != NONE && \
20475 test "$oldincludedir" != "/usr/include" && \
20476 test -d "$oldincludedir" && {
20477 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
20478 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
20479 }
20480
20481 cf_search="$cf_search $cf_header_path_list"
20482
20483 for cf_cv_header_path_utf8 in $cf_search
20484 do
20485 if test -d "$cf_cv_header_path_utf8" ; then
20486 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
20487
20488 echo "${as_me:-configure}:20488: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
20489
20490 CPPFLAGS="$cf_save_CPPFLAGS"
20491
20492 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20493 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
20494
20495 cat >"conftest.$ac_ext" <<_ACEOF
20496 #line 20496 "configure"
20497 #include "confdefs.h"
20498
20499 #include <libutf8.h>
20500 int
20501 main (void)
20502 {
20503 putwc(0,(FILE*)0);
20504 ;
20505 return 0;
20506 }
20507 _ACEOF
20508 rm -f "conftest.$ac_objext"
20509 if { (eval echo "$as_me:20509: \"$ac_compile\"") >&5
20510 (eval $ac_compile) 2>&5
20511 ac_status=$?
20512 echo "$as_me:20512: \$? = $ac_status" >&5
20513 (exit "$ac_status"); } &&
20514 { ac_try='test -s "conftest.$ac_objext"'
20515 { (eval echo "$as_me:20515: \"$ac_try\"") >&5
20516 (eval $ac_try) 2>&5
20517 ac_status=$?
20518 echo "$as_me:20518: \$? = $ac_status" >&5
20519 (exit "$ac_status"); }; }; then
20520
20521 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
20522
20523 echo "${as_me:-configure}:20523: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
20524
20525 cf_cv_find_linkage_utf8=maybe
20526 cf_test_CPPFLAGS="$CPPFLAGS"
20527 break
20528 else
20529 echo "$as_me: failed program was:" >&5
20530 cat "conftest.$ac_ext" >&5
20531
20532 CPPFLAGS="$cf_save_CPPFLAGS"
20533
20534 fi
20535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20536 fi
20537 done
20538
20539 if test "$cf_cv_find_linkage_utf8" = maybe ; then
20540
20541 echo "${as_me:-configure}:20541: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
20542
20543 cf_save_LIBS="$LIBS"
20544 cf_save_LDFLAGS="$LDFLAGS"
20545
20546 if test "$cf_cv_find_linkage_utf8" != yes ; then
20547
20548 cf_search=
20549 cf_library_path_list=""
20550 if test -n "${LDFLAGS}${LIBS}" ; then
20551 for cf_library_path in $LDFLAGS $LIBS
20552 do
20553 case "$cf_library_path" in
20554 (-L*)
20555 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
20556
20557 test "x$cf_library_path" != "xNONE" && \
20558 test -d "$cf_library_path" && \
20559 {
20560 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
20561 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
20562 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
20563 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
20564 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
20565 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
20566 }
20567
20568 cf_library_path_list="$cf_library_path_list $cf_search"
20569 ;;
20570 esac
20571 done
20572 fi
20573
20574 cf_search=
20575
20576 test "x$prefix" != "xNONE" && \
20577 test -d "$prefix" && \
20578 {
20579 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
20580 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
20581 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
20582 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
20583 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
20584 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
20585 }
20586
20587 for cf_subdir_prefix in \
20588 /usr \
20589 /usr/local \
20590 /usr/pkg \
20591 /opt \
20592 /opt/local \
20593 $HOME
20594 do
20595
20596 test "x$cf_subdir_prefix" != "x$prefix" && \
20597 test -d "$cf_subdir_prefix" && \
20598 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
20599 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
20600 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
20601 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
20602 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
20603 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
20604 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
20605 }
20606
20607 done
20608
20609 cf_search="$cf_library_path_list $cf_search"
20610
20611 for cf_cv_library_path_utf8 in $cf_search
20612 do
20613 if test -d "$cf_cv_library_path_utf8" ; then
20614 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
20615
20616 echo "${as_me:-configure}:20616: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
20617
20618 CPPFLAGS="$cf_test_CPPFLAGS"
20619 LIBS="-lutf8 $cf_save_LIBS"
20620 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
20621 cat >"conftest.$ac_ext" <<_ACEOF
20622 #line 20622 "configure"
20623 #include "confdefs.h"
20624
20625 #include <libutf8.h>
20626 int
20627 main (void)
20628 {
20629 putwc(0,(FILE*)0);
20630 ;
20631 return 0;
20632 }
20633 _ACEOF
20634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20635 if { (eval echo "$as_me:20635: \"$ac_link\"") >&5
20636 (eval $ac_link) 2>&5
20637 ac_status=$?
20638 echo "$as_me:20638: \$? = $ac_status" >&5
20639 (exit "$ac_status"); } &&
20640 { ac_try='test -s "conftest$ac_exeext"'
20641 { (eval echo "$as_me:20641: \"$ac_try\"") >&5
20642 (eval $ac_try) 2>&5
20643 ac_status=$?
20644 echo "$as_me:20644: \$? = $ac_status" >&5
20645 (exit "$ac_status"); }; }; then
20646
20647 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
20648
20649 echo "${as_me:-configure}:20649: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
20650
20651 cf_cv_find_linkage_utf8=yes
20652 cf_cv_library_file_utf8="-lutf8"
20653 break
20654 else
20655 echo "$as_me: failed program was:" >&5
20656 cat "conftest.$ac_ext" >&5
20657
20658 CPPFLAGS="$cf_save_CPPFLAGS"
20659 LIBS="$cf_save_LIBS"
20660 LDFLAGS="$cf_save_LDFLAGS"
20661
20662 fi
20663 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20664 fi
20665 done
20666 CPPFLAGS="$cf_save_CPPFLAGS"
20667 LDFLAGS="$cf_save_LDFLAGS"
20668 fi
20669
20670 else
20671 cf_cv_find_linkage_utf8=no
20672 fi
20673
20674 fi
20675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20676
20677 fi
20678 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20679
20680 LIBS="$cf_save_LIBS"
20681
20682 if test "$cf_cv_find_linkage_utf8" = yes ; then
20683 cf_cv_utf8_lib=add-on
20684 else
20685 cf_cv_utf8_lib=no
20686 fi
20687
20688 fi
20689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20690 fi
20691 echo "$as_me:20691: result: $cf_cv_utf8_lib" >&5
20692 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
20693
20694 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
20695 # ncurses/ncursesw:
20696 if test "$cf_cv_utf8_lib" = "add-on" ; then
20697
20698 cat >>confdefs.h <<\EOF
20699 #define HAVE_LIBUTF8_H 1
20700 EOF
20701
20702 if test -n "$cf_cv_header_path_utf8" ; then
20703 for cf_add_incdir in $cf_cv_header_path_utf8
20704 do
20705 while test "$cf_add_incdir" != /usr/include
20706 do
20707 if test -d "$cf_add_incdir"
20708 then
20709 cf_have_incdir=no
20710 if test -n "$CFLAGS$CPPFLAGS" ; then
20711 # a loop is needed to ensure we can add subdirs of existing dirs
20712 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20713 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20714 cf_have_incdir=yes; break
20715 fi
20716 done
20717 fi
20718
20719 if test "$cf_have_incdir" = no ; then
20720 if test "$cf_add_incdir" = /usr/local/include ; then
20721 if test "$GCC" = yes
20722 then
20723 cf_save_CPPFLAGS=$CPPFLAGS
20724
20725 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20726 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20727
20728 cat >"conftest.$ac_ext" <<_ACEOF
20729 #line 20729 "configure"
20730 #include "confdefs.h"
20731 #include <stdio.h>
20732 int
20733 main (void)
20734 {
20735 printf("Hello")
20736 ;
20737 return 0;
20738 }
20739 _ACEOF
20740 rm -f "conftest.$ac_objext"
20741 if { (eval echo "$as_me:20741: \"$ac_compile\"") >&5
20742 (eval $ac_compile) 2>&5
20743 ac_status=$?
20744 echo "$as_me:20744: \$? = $ac_status" >&5
20745 (exit "$ac_status"); } &&
20746 { ac_try='test -s "conftest.$ac_objext"'
20747 { (eval echo "$as_me:20747: \"$ac_try\"") >&5
20748 (eval $ac_try) 2>&5
20749 ac_status=$?
20750 echo "$as_me:20750: \$? = $ac_status" >&5
20751 (exit "$ac_status"); }; }; then
20752 :
20753 else
20754 echo "$as_me: failed program was:" >&5
20755 cat "conftest.$ac_ext" >&5
20756 cf_have_incdir=yes
20757 fi
20758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20759 CPPFLAGS=$cf_save_CPPFLAGS
20760 fi
20761 fi
20762 fi
20763
20764 if test "$cf_have_incdir" = no ; then
20765 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
20766
20767 echo "${as_me:-configure}:20767: testing adding $cf_add_incdir to include-path ..." 1>&5
20768
20769 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20770
20771 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
20772 test "$cf_top_incdir" = "$cf_add_incdir" && break
20773 cf_add_incdir="$cf_top_incdir"
20774 else
20775 break
20776 fi
20777 else
20778 break
20779 fi
20780 done
20781 done
20782 fi
20783
20784 if test -n "$cf_cv_library_path_utf8" ; then
20785 for cf_add_libdir in $cf_cv_library_path_utf8
20786 do
20787 if test "$cf_add_libdir" = /usr/lib ; then
20788 :
20789 elif test -d "$cf_add_libdir"
20790 then
20791 cf_have_libdir=no
20792 if test -n "$LDFLAGS$LIBS" ; then
20793 # a loop is needed to ensure we can add subdirs of existing dirs
20794 for cf_test_libdir in $LDFLAGS $LIBS ; do
20795 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20796 cf_have_libdir=yes; break
20797 fi
20798 done
20799 fi
20800 if test "$cf_have_libdir" = no ; then
20801 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
20802
20803 echo "${as_me:-configure}:20803: testing adding $cf_add_libdir to library-path ..." 1>&5
20804
20805 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20806 fi
20807 fi
20808 done
20809 fi
20810
20811 cf_add_libs="$LIBS"
20812 # reverse order
20813 cf_add_0lib=
20814 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20815 # filter duplicates
20816 for cf_add_1lib in $cf_add_0lib; do
20817 for cf_add_2lib in $cf_add_libs; do
20818 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20819 cf_add_1lib=
20820 break
20821 fi
20822 done
20823 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20824 done
20825 LIBS="$cf_add_libs"
20826
20827 fi
20828
20829 cf_ncuconfig_root=$cf_cv_screen
20830 cf_have_ncuconfig=no
20831
20832 if test "x${PKG_CONFIG:=none}" != xnone; then
20833 echo "$as_me:20833: checking pkg-config for $cf_ncuconfig_root" >&5
20834 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
20835 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
20836 echo "$as_me:20836: result: yes" >&5
20837 echo "${ECHO_T}yes" >&6
20838
20839 echo "$as_me:20839: checking if the $cf_ncuconfig_root package files work" >&5
20840 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
20841 cf_have_ncuconfig=unknown
20842
20843 cf_save_CFLAGS="$CFLAGS"
20844 cf_save_CPPFLAGS="$CPPFLAGS"
20845 cf_save_LIBS="$LIBS"
20846
20847 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
20848 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
20849
20850 # while -W for passing linker flags is prevalent, it is not "standard".
20851 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
20852 # incompatible _and_ non-standard -W option which gives an error. Work
20853 # around that pitfall.
20854 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
20855 (x*c[89]9@@*-W*)
20856
20857 cf_fix_cppflags=no
20858 cf_new_cflags=
20859 cf_new_cppflags=
20860 cf_new_extra_cppflags=
20861
20862 for cf_add_cflags in $cf_pkg_cflags
20863 do
20864 case "$cf_fix_cppflags" in
20865 (no)
20866 case "$cf_add_cflags" in
20867 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20868 case "$cf_add_cflags" in
20869 (-D*)
20870 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20871
20872 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20873 && test -z "${cf_tst_cflags}" \
20874 && cf_fix_cppflags=yes
20875
20876 if test "$cf_fix_cppflags" = yes ; then
20877
20878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20880
20881 continue
20882 elif test "${cf_tst_cflags}" = "\"'" ; then
20883
20884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20886
20887 continue
20888 fi
20889 ;;
20890 esac
20891 case "$CPPFLAGS" in
20892 (*$cf_add_cflags)
20893 ;;
20894 (*)
20895 case "$cf_add_cflags" in
20896 (-D*)
20897 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20898
20899 CPPFLAGS=`echo "$CPPFLAGS" | \
20900 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20901 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20902
20903 ;;
20904 esac
20905
20906 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20907 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20908
20909 ;;
20910 esac
20911 ;;
20912 (*)
20913
20914 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20915 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20916
20917 ;;
20918 esac
20919 ;;
20920 (yes)
20921
20922 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20923 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20924
20925 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20926
20927 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20928 && test -z "${cf_tst_cflags}" \
20929 && cf_fix_cppflags=no
20930 ;;
20931 esac
20932 done
20933
20934 if test -n "$cf_new_cflags" ; then
20935
20936 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20937 CFLAGS="${CFLAGS}$cf_new_cflags"
20938
20939 fi
20940
20941 if test -n "$cf_new_cppflags" ; then
20942
20943 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20944 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20945
20946 fi
20947
20948 if test -n "$cf_new_extra_cppflags" ; then
20949
20950 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20951 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20952
20953 fi
20954
20955 cf_add_libs="$LIBS"
20956 # reverse order
20957 cf_add_0lib=
20958 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20959 # filter duplicates
20960 for cf_add_1lib in $cf_add_0lib; do
20961 for cf_add_2lib in $cf_add_libs; do
20962 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20963 cf_add_1lib=
20964 break
20965 fi
20966 done
20967 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20968 done
20969 LIBS="$cf_add_libs"
20970
20971 cat >"conftest.$ac_ext" <<_ACEOF
20972 #line 20972 "configure"
20973 #include "confdefs.h"
20974 #include <${cf_cv_ncurses_header:-curses.h}>
20975 int
20976 main (void)
20977 {
20978 initscr(); mousemask(0,(mmask_t*)0); tigetstr((char *)0);
20979 ;
20980 return 0;
20981 }
20982 _ACEOF
20983 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20984 if { (eval echo "$as_me:20984: \"$ac_link\"") >&5
20985 (eval $ac_link) 2>&5
20986 ac_status=$?
20987 echo "$as_me:20987: \$? = $ac_status" >&5
20988 (exit "$ac_status"); } &&
20989 { ac_try='test -s "conftest$ac_exeext"'
20990 { (eval echo "$as_me:20990: \"$ac_try\"") >&5
20991 (eval $ac_try) 2>&5
20992 ac_status=$?
20993 echo "$as_me:20993: \$? = $ac_status" >&5
20994 (exit "$ac_status"); }; }; then
20995 if test "$cross_compiling" = yes; then
20996 cf_test_ncuconfig=maybe
20997 else
20998 cat >"conftest.$ac_ext" <<_ACEOF
20999 #line 20999 "configure"
21000 #include "confdefs.h"
21001 #include <${cf_cv_ncurses_header:-curses.h}>
21002 int main(void)
21003 { const char *xx = curses_version(); return (xx == (const char*)0); }
21004 _ACEOF
21005 rm -f "conftest$ac_exeext"
21006 if { (eval echo "$as_me:21006: \"$ac_link\"") >&5
21007 (eval $ac_link) 2>&5
21008 ac_status=$?
21009 echo "$as_me:21009: \$? = $ac_status" >&5
21010 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21011 { (eval echo "$as_me:21011: \"$ac_try\"") >&5
21012 (eval $ac_try) 2>&5
21013 ac_status=$?
21014 echo "$as_me:21014: \$? = $ac_status" >&5
21015 (exit "$ac_status"); }; }; then
21016 cf_test_ncuconfig=yes
21017 else
21018 echo "$as_me: program exited with status $ac_status" >&5
21019 echo "$as_me: failed program was:" >&5
21020 cat "conftest.$ac_ext" >&5
21021 cf_test_ncuconfig=no
21022 fi
21023 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21024 fi
21025 else
21026 echo "$as_me: failed program was:" >&5
21027 cat "conftest.$ac_ext" >&5
21028 cf_test_ncuconfig=no
21029 fi
21030 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21031
21032 CFLAGS="$cf_save_CFLAGS"
21033 CPPFLAGS="$cf_save_CPPFLAGS"
21034 LIBS="$cf_save_LIBS"
21035
21036 if test "x$cf_test_ncuconfig" != xyes; then
21037 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
21038 cf_pkg_cflags="$cf_temp"
21039 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
21040 cf_pkg_libs="$cf_temp"
21041 fi
21042 ;;
21043 esac
21044
21045 for cf_required in $cf_ncuconfig_root
21046 do
21047 # check for duplicates
21048 for cf_require_pkg in $REQUIRE_PKG
21049 do
21050 if test "$cf_required" = "$cf_require_pkg"
21051 then
21052 cf_required=
21053 break
21054 fi
21055 done
21056 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
21057 done
21058
21059 for cf_add_cflags in $cf_pkg_cflags
21060 do
21061 case "x$cf_add_cflags" in
21062 (x-[DU]*)
21063
21064 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
21065 while true
21066 do
21067 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'`
21068 test "$CFLAGS" != "$cf_old_cflag" || break
21069
21070 CFLAGS="$cf_old_cflag"
21071 done
21072
21073 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
21074 while true
21075 do
21076 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'`
21077 test "$CPPFLAGS" != "$cf_old_cflag" || break
21078
21079 CPPFLAGS="$cf_old_cflag"
21080 done
21081
21082 ;;
21083 esac
21084
21085 cf_fix_cppflags=no
21086 cf_new_cflags=
21087 cf_new_cppflags=
21088 cf_new_extra_cppflags=
21089
21090 for cf_add_cflags in $cf_add_cflags
21091 do
21092 case "$cf_fix_cppflags" in
21093 (no)
21094 case "$cf_add_cflags" in
21095 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21096 case "$cf_add_cflags" in
21097 (-D*)
21098 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21099
21100 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21101 && test -z "${cf_tst_cflags}" \
21102 && cf_fix_cppflags=yes
21103
21104 if test "$cf_fix_cppflags" = yes ; then
21105
21106 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21107 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21108
21109 continue
21110 elif test "${cf_tst_cflags}" = "\"'" ; then
21111
21112 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21113 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21114
21115 continue
21116 fi
21117 ;;
21118 esac
21119 case "$CPPFLAGS" in
21120 (*$cf_add_cflags)
21121 ;;
21122 (*)
21123 case "$cf_add_cflags" in
21124 (-D*)
21125 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21126
21127 CPPFLAGS=`echo "$CPPFLAGS" | \
21128 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21129 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21130
21131 ;;
21132 esac
21133
21134 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21135 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21136
21137 ;;
21138 esac
21139 ;;
21140 (*)
21141
21142 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21143 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21144
21145 ;;
21146 esac
21147 ;;
21148 (yes)
21149
21150 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21151 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21152
21153 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21154
21155 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21156 && test -z "${cf_tst_cflags}" \
21157 && cf_fix_cppflags=no
21158 ;;
21159 esac
21160 done
21161
21162 if test -n "$cf_new_cflags" ; then
21163
21164 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21165 CFLAGS="${CFLAGS}$cf_new_cflags"
21166
21167 fi
21168
21169 if test -n "$cf_new_cppflags" ; then
21170
21171 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21172 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21173
21174 fi
21175
21176 if test -n "$cf_new_extra_cppflags" ; then
21177
21178 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21179 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21180
21181 fi
21182
21183 done
21184
21185 cf_add_libs="$LIBS"
21186 # reverse order
21187 cf_add_0lib=
21188 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21189 # filter duplicates
21190 for cf_add_1lib in $cf_add_0lib; do
21191 for cf_add_2lib in $cf_add_libs; do
21192 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21193 cf_add_1lib=
21194 break
21195 fi
21196 done
21197 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21198 done
21199 LIBS="$cf_add_libs"
21200
21201 cat >"conftest.$ac_ext" <<_ACEOF
21202 #line 21202 "configure"
21203 #include "confdefs.h"
21204 #include <${cf_cv_ncurses_header:-curses.h}>
21205 int
21206 main (void)
21207 {
21208 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
21209 ;
21210 return 0;
21211 }
21212 _ACEOF
21213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21214 if { (eval echo "$as_me:21214: \"$ac_link\"") >&5
21215 (eval $ac_link) 2>&5
21216 ac_status=$?
21217 echo "$as_me:21217: \$? = $ac_status" >&5
21218 (exit "$ac_status"); } &&
21219 { ac_try='test -s "conftest$ac_exeext"'
21220 { (eval echo "$as_me:21220: \"$ac_try\"") >&5
21221 (eval $ac_try) 2>&5
21222 ac_status=$?
21223 echo "$as_me:21223: \$? = $ac_status" >&5
21224 (exit "$ac_status"); }; }; then
21225 if test "$cross_compiling" = yes; then
21226 cf_have_ncuconfig=maybe
21227 else
21228 cat >"conftest.$ac_ext" <<_ACEOF
21229 #line 21229 "configure"
21230 #include "confdefs.h"
21231 #include <${cf_cv_ncurses_header:-curses.h}>
21232 int main(void)
21233 { const char *xx = curses_version(); return (xx == (const char*)0); }
21234 _ACEOF
21235 rm -f "conftest$ac_exeext"
21236 if { (eval echo "$as_me:21236: \"$ac_link\"") >&5
21237 (eval $ac_link) 2>&5
21238 ac_status=$?
21239 echo "$as_me:21239: \$? = $ac_status" >&5
21240 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21241 { (eval echo "$as_me:21241: \"$ac_try\"") >&5
21242 (eval $ac_try) 2>&5
21243 ac_status=$?
21244 echo "$as_me:21244: \$? = $ac_status" >&5
21245 (exit "$ac_status"); }; }; then
21246 cf_have_ncuconfig=yes
21247 else
21248 echo "$as_me: program exited with status $ac_status" >&5
21249 echo "$as_me: failed program was:" >&5
21250 cat "conftest.$ac_ext" >&5
21251 cf_have_ncuconfig=no
21252 fi
21253 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21254 fi
21255 else
21256 echo "$as_me: failed program was:" >&5
21257 cat "conftest.$ac_ext" >&5
21258 cf_have_ncuconfig=no
21259 fi
21260 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21261 echo "$as_me:21261: result: $cf_have_ncuconfig" >&5
21262 echo "${ECHO_T}$cf_have_ncuconfig" >&6
21263 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
21264 if test "$cf_have_ncuconfig" != "yes"
21265 then
21266 CPPFLAGS="$cf_save_CPPFLAGS"
21267 LIBS="$cf_save_LIBS"
21268 NCURSES_CONFIG_PKG=none
21269 else
21270
21271 cat >>confdefs.h <<\EOF
21272 #define NCURSES 1
21273 EOF
21274
21275 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
21276
21277 echo "$as_me:21277: checking for terminfo header" >&5
21278 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
21279 if test "${cf_cv_term_header+set}" = set; then
21280 echo $ECHO_N "(cached) $ECHO_C" >&6
21281 else
21282
21283 case "${cf_cv_ncurses_header}" in
21284 (*/ncurses.h|*/ncursesw.h)
21285 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
21286 ;;
21287 (*)
21288 cf_term_header=term.h
21289 ;;
21290 esac
21291
21292 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
21293 do
21294 cat >"conftest.$ac_ext" <<_ACEOF
21295 #line 21295 "configure"
21296 #include "confdefs.h"
21297 #include <stdio.h>
21298 #include <${cf_cv_ncurses_header:-curses.h}>
21299 #include <$cf_test>
21300
21301 int
21302 main (void)
21303 {
21304 int x = auto_left_margin; (void)x
21305 ;
21306 return 0;
21307 }
21308 _ACEOF
21309 rm -f "conftest.$ac_objext"
21310 if { (eval echo "$as_me:21310: \"$ac_compile\"") >&5
21311 (eval $ac_compile) 2>&5
21312 ac_status=$?
21313 echo "$as_me:21313: \$? = $ac_status" >&5
21314 (exit "$ac_status"); } &&
21315 { ac_try='test -s "conftest.$ac_objext"'
21316 { (eval echo "$as_me:21316: \"$ac_try\"") >&5
21317 (eval $ac_try) 2>&5
21318 ac_status=$?
21319 echo "$as_me:21319: \$? = $ac_status" >&5
21320 (exit "$ac_status"); }; }; then
21321
21322 cf_cv_term_header="$cf_test"
21323 else
21324 echo "$as_me: failed program was:" >&5
21325 cat "conftest.$ac_ext" >&5
21326
21327 cf_cv_term_header=unknown
21328
21329 fi
21330 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21331 test "$cf_cv_term_header" != unknown && break
21332 done
21333
21334 fi
21335 echo "$as_me:21335: result: $cf_cv_term_header" >&5
21336 echo "${ECHO_T}$cf_cv_term_header" >&6
21337
21338 # Set definitions to allow ifdef'ing to accommodate subdirectories
21339
21340 case "$cf_cv_term_header" in
21341 (*term.h)
21342
21343 cat >>confdefs.h <<\EOF
21344 #define HAVE_TERM_H 1
21345 EOF
21346
21347 ;;
21348 esac
21349
21350 case "$cf_cv_term_header" in
21351 (ncurses/term.h)
21352
21353 cat >>confdefs.h <<\EOF
21354 #define HAVE_NCURSES_TERM_H 1
21355 EOF
21356
21357 ;;
21358 (ncursesw/term.h)
21359
21360 cat >>confdefs.h <<\EOF
21361 #define HAVE_NCURSESW_TERM_H 1
21362 EOF
21363
21364 ;;
21365 esac
21366
21367 fi
21368
21369 else
21370 echo "$as_me:21370: result: no" >&5
21371 echo "${ECHO_T}no" >&6
21372 NCURSES_CONFIG_PKG=none
21373 fi
21374 else
21375 NCURSES_CONFIG_PKG=none
21376 fi
21377
21378 if test "x$cf_have_ncuconfig" = "xno"; then
21379 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
21380
21381 if test -n "$ac_tool_prefix"; then
21382 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
21383 do
21384 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21385 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21386 echo "$as_me:21386: checking for $ac_word" >&5
21387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21388 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
21389 echo $ECHO_N "(cached) $ECHO_C" >&6
21390 else
21391 if test -n "$NCURSES_CONFIG"; then
21392 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
21393 else
21394 ac_save_IFS=$IFS; IFS=$ac_path_separator
21395 ac_dummy="$PATH"
21396 for ac_dir in $ac_dummy; do
21397 IFS=$ac_save_IFS
21398 test -z "$ac_dir" && ac_dir=.
21399 $as_executable_p "$ac_dir/$ac_word" || continue
21400 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
21401 echo "$as_me:21401: found $ac_dir/$ac_word" >&5
21402 break
21403 done
21404
21405 fi
21406 fi
21407 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
21408 if test -n "$NCURSES_CONFIG"; then
21409 echo "$as_me:21409: result: $NCURSES_CONFIG" >&5
21410 echo "${ECHO_T}$NCURSES_CONFIG" >&6
21411 else
21412 echo "$as_me:21412: result: no" >&5
21413 echo "${ECHO_T}no" >&6
21414 fi
21415
21416 test -n "$NCURSES_CONFIG" && break
21417 done
21418 fi
21419 if test -z "$NCURSES_CONFIG"; then
21420 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
21421 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
21422 do
21423 # Extract the first word of "$ac_prog", so it can be a program name with args.
21424 set dummy $ac_prog; ac_word=$2
21425 echo "$as_me:21425: checking for $ac_word" >&5
21426 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21427 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
21428 echo $ECHO_N "(cached) $ECHO_C" >&6
21429 else
21430 if test -n "$ac_ct_NCURSES_CONFIG"; then
21431 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
21432 else
21433 ac_save_IFS=$IFS; IFS=$ac_path_separator
21434 ac_dummy="$PATH"
21435 for ac_dir in $ac_dummy; do
21436 IFS=$ac_save_IFS
21437 test -z "$ac_dir" && ac_dir=.
21438 $as_executable_p "$ac_dir/$ac_word" || continue
21439 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
21440 echo "$as_me:21440: found $ac_dir/$ac_word" >&5
21441 break
21442 done
21443
21444 fi
21445 fi
21446 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
21447 if test -n "$ac_ct_NCURSES_CONFIG"; then
21448 echo "$as_me:21448: result: $ac_ct_NCURSES_CONFIG" >&5
21449 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
21450 else
21451 echo "$as_me:21451: result: no" >&5
21452 echo "${ECHO_T}no" >&6
21453 fi
21454
21455 test -n "$ac_ct_NCURSES_CONFIG" && break
21456 done
21457 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
21458
21459 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
21460 fi
21461
21462 if test "$NCURSES_CONFIG" != none ; then
21463
21464 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
21465 do
21466 case "x$cf_add_cflags" in
21467 (x-[DU]*)
21468
21469 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
21470 while true
21471 do
21472 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'`
21473 test "$CFLAGS" != "$cf_old_cflag" || break
21474
21475 CFLAGS="$cf_old_cflag"
21476 done
21477
21478 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
21479 while true
21480 do
21481 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'`
21482 test "$CPPFLAGS" != "$cf_old_cflag" || break
21483
21484 CPPFLAGS="$cf_old_cflag"
21485 done
21486
21487 ;;
21488 esac
21489
21490 cf_fix_cppflags=no
21491 cf_new_cflags=
21492 cf_new_cppflags=
21493 cf_new_extra_cppflags=
21494
21495 for cf_add_cflags in $cf_add_cflags
21496 do
21497 case "$cf_fix_cppflags" in
21498 (no)
21499 case "$cf_add_cflags" in
21500 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21501 case "$cf_add_cflags" in
21502 (-D*)
21503 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21504
21505 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21506 && test -z "${cf_tst_cflags}" \
21507 && cf_fix_cppflags=yes
21508
21509 if test "$cf_fix_cppflags" = yes ; then
21510
21511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21513
21514 continue
21515 elif test "${cf_tst_cflags}" = "\"'" ; then
21516
21517 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21518 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21519
21520 continue
21521 fi
21522 ;;
21523 esac
21524 case "$CPPFLAGS" in
21525 (*$cf_add_cflags)
21526 ;;
21527 (*)
21528 case "$cf_add_cflags" in
21529 (-D*)
21530 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21531
21532 CPPFLAGS=`echo "$CPPFLAGS" | \
21533 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21534 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21535
21536 ;;
21537 esac
21538
21539 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21540 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21541
21542 ;;
21543 esac
21544 ;;
21545 (*)
21546
21547 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21548 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21549
21550 ;;
21551 esac
21552 ;;
21553 (yes)
21554
21555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21557
21558 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21559
21560 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21561 && test -z "${cf_tst_cflags}" \
21562 && cf_fix_cppflags=no
21563 ;;
21564 esac
21565 done
21566
21567 if test -n "$cf_new_cflags" ; then
21568
21569 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21570 CFLAGS="${CFLAGS}$cf_new_cflags"
21571
21572 fi
21573
21574 if test -n "$cf_new_cppflags" ; then
21575
21576 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21577 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21578
21579 fi
21580
21581 if test -n "$cf_new_extra_cppflags" ; then
21582
21583 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21584 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21585
21586 fi
21587
21588 done
21589
21590 cf_add_libs="$LIBS"
21591 # reverse order
21592 cf_add_0lib=
21593 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21594 # filter duplicates
21595 for cf_add_1lib in $cf_add_0lib; do
21596 for cf_add_2lib in $cf_add_libs; do
21597 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21598 cf_add_1lib=
21599 break
21600 fi
21601 done
21602 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21603 done
21604 LIBS="$cf_add_libs"
21605
21606 # even with config script, some packages use no-override for curses.h
21607
21608 echo "$as_me:21608: checking if we have identified curses headers" >&5
21609 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
21610 if test "${cf_cv_ncurses_header+set}" = set; then
21611 echo $ECHO_N "(cached) $ECHO_C" >&6
21612 else
21613
21614 cf_cv_ncurses_header=none
21615 for cf_header in \
21616 ncurses.h $cf_cv_screen/ncurses.h \
21617 curses.h $cf_cv_screen/curses.h
21618 do
21619 cat >"conftest.$ac_ext" <<_ACEOF
21620 #line 21620 "configure"
21621 #include "confdefs.h"
21622 #include <${cf_header}>
21623 int
21624 main (void)
21625 {
21626 initscr(); endwin()
21627 ;
21628 return 0;
21629 }
21630 _ACEOF
21631 rm -f "conftest.$ac_objext"
21632 if { (eval echo "$as_me:21632: \"$ac_compile\"") >&5
21633 (eval $ac_compile) 2>&5
21634 ac_status=$?
21635 echo "$as_me:21635: \$? = $ac_status" >&5
21636 (exit "$ac_status"); } &&
21637 { ac_try='test -s "conftest.$ac_objext"'
21638 { (eval echo "$as_me:21638: \"$ac_try\"") >&5
21639 (eval $ac_try) 2>&5
21640 ac_status=$?
21641 echo "$as_me:21641: \$? = $ac_status" >&5
21642 (exit "$ac_status"); }; }; then
21643 cf_cv_ncurses_header=$cf_header; break
21644 else
21645 echo "$as_me: failed program was:" >&5
21646 cat "conftest.$ac_ext" >&5
21647 fi
21648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21649 done
21650
21651 fi
21652 echo "$as_me:21652: result: $cf_cv_ncurses_header" >&5
21653 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
21654
21655 if test "$cf_cv_ncurses_header" = none ; then
21656 { { echo "$as_me:21656: error: No curses header-files found" >&5
21657 echo "$as_me: error: No curses header-files found" >&2;}
21658 { (exit 1); exit 1; }; }
21659 fi
21660
21661 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
21662
21663 for ac_header in $cf_cv_ncurses_header
21664 do
21665 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21666 echo "$as_me:21666: checking for $ac_header" >&5
21667 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21668 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21669 echo $ECHO_N "(cached) $ECHO_C" >&6
21670 else
21671 cat >"conftest.$ac_ext" <<_ACEOF
21672 #line 21672 "configure"
21673 #include "confdefs.h"
21674 #include <$ac_header>
21675 _ACEOF
21676 if { (eval echo "$as_me:21676: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21677 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21678 ac_status=$?
21679 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21680 rm -f conftest.er1
21681 cat conftest.err >&5
21682 echo "$as_me:21682: \$? = $ac_status" >&5
21683 (exit "$ac_status"); } >/dev/null; then
21684 if test -s conftest.err; then
21685 ac_cpp_err=$ac_c_preproc_warn_flag
21686 else
21687 ac_cpp_err=
21688 fi
21689 else
21690 ac_cpp_err=yes
21691 fi
21692 if test -z "$ac_cpp_err"; then
21693 eval "$as_ac_Header=yes"
21694 else
21695 echo "$as_me: failed program was:" >&5
21696 cat "conftest.$ac_ext" >&5
21697 eval "$as_ac_Header=no"
21698 fi
21699 rm -f conftest.err "conftest.$ac_ext"
21700 fi
21701 echo "$as_me:21701: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21702 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21703 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21704 cat >>confdefs.h <<EOF
21705 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21706 EOF
21707
21708 fi
21709 done
21710
21711 cat >>confdefs.h <<\EOF
21712 #define NCURSES 1
21713 EOF
21714
21715 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21716
21717 cat >>confdefs.h <<EOF
21718 #define $cf_nculib_ROOT 1
21719 EOF
21720
21721 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
21722
21723 else
21724
21725 cf_ncuhdr_root=$cf_cv_screen
21726
21727 test -n "$cf_cv_curses_dir" && \
21728 test "$cf_cv_curses_dir" != "no" && { \
21729
21730 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
21731 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
21732 do
21733 while test "$cf_add_incdir" != /usr/include
21734 do
21735 if test -d "$cf_add_incdir"
21736 then
21737 cf_have_incdir=no
21738 if test -n "$CFLAGS$CPPFLAGS" ; then
21739 # a loop is needed to ensure we can add subdirs of existing dirs
21740 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21741 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21742 cf_have_incdir=yes; break
21743 fi
21744 done
21745 fi
21746
21747 if test "$cf_have_incdir" = no ; then
21748 if test "$cf_add_incdir" = /usr/local/include ; then
21749 if test "$GCC" = yes
21750 then
21751 cf_save_CPPFLAGS=$CPPFLAGS
21752
21753 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21754 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21755
21756 cat >"conftest.$ac_ext" <<_ACEOF
21757 #line 21757 "configure"
21758 #include "confdefs.h"
21759 #include <stdio.h>
21760 int
21761 main (void)
21762 {
21763 printf("Hello")
21764 ;
21765 return 0;
21766 }
21767 _ACEOF
21768 rm -f "conftest.$ac_objext"
21769 if { (eval echo "$as_me:21769: \"$ac_compile\"") >&5
21770 (eval $ac_compile) 2>&5
21771 ac_status=$?
21772 echo "$as_me:21772: \$? = $ac_status" >&5
21773 (exit "$ac_status"); } &&
21774 { ac_try='test -s "conftest.$ac_objext"'
21775 { (eval echo "$as_me:21775: \"$ac_try\"") >&5
21776 (eval $ac_try) 2>&5
21777 ac_status=$?
21778 echo "$as_me:21778: \$? = $ac_status" >&5
21779 (exit "$ac_status"); }; }; then
21780 :
21781 else
21782 echo "$as_me: failed program was:" >&5
21783 cat "conftest.$ac_ext" >&5
21784 cf_have_incdir=yes
21785 fi
21786 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21787 CPPFLAGS=$cf_save_CPPFLAGS
21788 fi
21789 fi
21790 fi
21791
21792 if test "$cf_have_incdir" = no ; then
21793 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
21794
21795 echo "${as_me:-configure}:21795: testing adding $cf_add_incdir to include-path ..." 1>&5
21796
21797 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21798
21799 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
21800 test "$cf_top_incdir" = "$cf_add_incdir" && break
21801 cf_add_incdir="$cf_top_incdir"
21802 else
21803 break
21804 fi
21805 else
21806 break
21807 fi
21808 done
21809 done
21810 fi
21811
21812 }
21813
21814 echo "$as_me:21814: checking for $cf_ncuhdr_root header in include-path" >&5
21815 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
21816 if test "${cf_cv_ncurses_h+set}" = set; then
21817 echo $ECHO_N "(cached) $ECHO_C" >&6
21818 else
21819
21820 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
21821 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
21822 for cf_header in $cf_header_list
21823 do
21824
21825 cat >"conftest.$ac_ext" <<_ACEOF
21826 #line 21826 "configure"
21827 #include "confdefs.h"
21828
21829 #include <$cf_header>
21830 int
21831 main (void)
21832 {
21833
21834 #ifdef NCURSES_VERSION
21835
21836 printf("%s\\n", NCURSES_VERSION);
21837 #else
21838 #ifdef __NCURSES_H
21839 printf("old\\n");
21840 #else
21841 #error __NCURSES_H is not defined
21842 #endif
21843 #endif
21844
21845 ;
21846 return 0;
21847 }
21848 _ACEOF
21849 rm -f "conftest.$ac_objext"
21850 if { (eval echo "$as_me:21850: \"$ac_compile\"") >&5
21851 (eval $ac_compile) 2>&5
21852 ac_status=$?
21853 echo "$as_me:21853: \$? = $ac_status" >&5
21854 (exit "$ac_status"); } &&
21855 { ac_try='test -s "conftest.$ac_objext"'
21856 { (eval echo "$as_me:21856: \"$ac_try\"") >&5
21857 (eval $ac_try) 2>&5
21858 ac_status=$?
21859 echo "$as_me:21859: \$? = $ac_status" >&5
21860 (exit "$ac_status"); }; }; then
21861 cf_cv_ncurses_h=$cf_header
21862
21863 else
21864 echo "$as_me: failed program was:" >&5
21865 cat "conftest.$ac_ext" >&5
21866 cf_cv_ncurses_h=no
21867 fi
21868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21869
21870 test "$cf_cv_ncurses_h" != no && break
21871 done
21872
21873 fi
21874 echo "$as_me:21874: result: $cf_cv_ncurses_h" >&5
21875 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
21876
21877 if test "$cf_cv_ncurses_h" != no ; then
21878 cf_cv_ncurses_header=$cf_cv_ncurses_h
21879 else
21880
21881 echo "$as_me:21881: checking for $cf_ncuhdr_root include-path" >&5
21882 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
21883 if test "${cf_cv_ncurses_h2+set}" = set; then
21884 echo $ECHO_N "(cached) $ECHO_C" >&6
21885 else
21886
21887 test -n "$verbose" && echo
21888
21889 cf_search=
21890
21891 # collect the current set of include-directories from compiler flags
21892 cf_header_path_list=""
21893 if test -n "${CFLAGS}${CPPFLAGS}" ; then
21894 for cf_header_path in $CPPFLAGS $CFLAGS
21895 do
21896 case "$cf_header_path" in
21897 (-I*)
21898 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
21899
21900 test "x$cf_header_path" != "xNONE" && \
21901 test -d "$cf_header_path" && \
21902 {
21903 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
21904 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
21905 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
21906 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
21907 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
21908 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"
21909 }
21910
21911 cf_header_path_list="$cf_header_path_list $cf_search"
21912 ;;
21913 esac
21914 done
21915 fi
21916
21917 # add the variations for the package we are looking for
21918
21919 cf_search=
21920
21921 test "x$prefix" != "xNONE" && \
21922 test -d "$prefix" && \
21923 {
21924 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
21925 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
21926 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
21927 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
21928 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
21929 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
21930 }
21931
21932 for cf_subdir_prefix in \
21933 /usr \
21934 /usr/local \
21935 /usr/pkg \
21936 /opt \
21937 /opt/local \
21938 $HOME
21939 do
21940
21941 test "x$cf_subdir_prefix" != "x$prefix" && \
21942 test -d "$cf_subdir_prefix" && \
21943 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
21944 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
21945 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
21946 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
21947 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
21948 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
21949 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"
21950 }
21951
21952 done
21953
21954 test "$includedir" != NONE && \
21955 test "$includedir" != "/usr/include" && \
21956 test -d "$includedir" && {
21957 test -d "$includedir" && cf_search="$cf_search $includedir"
21958 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
21959 }
21960
21961 test "$oldincludedir" != NONE && \
21962 test "$oldincludedir" != "/usr/include" && \
21963 test -d "$oldincludedir" && {
21964 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
21965 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
21966 }
21967
21968 cf_search="$cf_search $cf_header_path_list"
21969
21970 test -n "$verbose" && echo "search path $cf_search"
21971 cf_save2_CPPFLAGS="$CPPFLAGS"
21972 for cf_incdir in $cf_search
21973 do
21974
21975 if test -n "$cf_incdir" ; then
21976 for cf_add_incdir in $cf_incdir
21977 do
21978 while test "$cf_add_incdir" != /usr/include
21979 do
21980 if test -d "$cf_add_incdir"
21981 then
21982 cf_have_incdir=no
21983 if test -n "$CFLAGS$CPPFLAGS" ; then
21984 # a loop is needed to ensure we can add subdirs of existing dirs
21985 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21986 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21987 cf_have_incdir=yes; break
21988 fi
21989 done
21990 fi
21991
21992 if test "$cf_have_incdir" = no ; then
21993 if test "$cf_add_incdir" = /usr/local/include ; then
21994 if test "$GCC" = yes
21995 then
21996 cf_save_CPPFLAGS=$CPPFLAGS
21997
21998 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21999 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22000
22001 cat >"conftest.$ac_ext" <<_ACEOF
22002 #line 22002 "configure"
22003 #include "confdefs.h"
22004 #include <stdio.h>
22005 int
22006 main (void)
22007 {
22008 printf("Hello")
22009 ;
22010 return 0;
22011 }
22012 _ACEOF
22013 rm -f "conftest.$ac_objext"
22014 if { (eval echo "$as_me:22014: \"$ac_compile\"") >&5
22015 (eval $ac_compile) 2>&5
22016 ac_status=$?
22017 echo "$as_me:22017: \$? = $ac_status" >&5
22018 (exit "$ac_status"); } &&
22019 { ac_try='test -s "conftest.$ac_objext"'
22020 { (eval echo "$as_me:22020: \"$ac_try\"") >&5
22021 (eval $ac_try) 2>&5
22022 ac_status=$?
22023 echo "$as_me:22023: \$? = $ac_status" >&5
22024 (exit "$ac_status"); }; }; then
22025 :
22026 else
22027 echo "$as_me: failed program was:" >&5
22028 cat "conftest.$ac_ext" >&5
22029 cf_have_incdir=yes
22030 fi
22031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22032 CPPFLAGS=$cf_save_CPPFLAGS
22033 fi
22034 fi
22035 fi
22036
22037 if test "$cf_have_incdir" = no ; then
22038 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
22039
22040 echo "${as_me:-configure}:22040: testing adding $cf_add_incdir to include-path ..." 1>&5
22041
22042 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22043
22044 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
22045 test "$cf_top_incdir" = "$cf_add_incdir" && break
22046 cf_add_incdir="$cf_top_incdir"
22047 else
22048 break
22049 fi
22050 else
22051 break
22052 fi
22053 done
22054 done
22055 fi
22056
22057 for cf_header in \
22058 ncurses.h \
22059 curses.h
22060 do
22061
22062 cat >"conftest.$ac_ext" <<_ACEOF
22063 #line 22063 "configure"
22064 #include "confdefs.h"
22065
22066 #include <$cf_header>
22067 int
22068 main (void)
22069 {
22070
22071 #ifdef NCURSES_VERSION
22072
22073 printf("%s\\n", NCURSES_VERSION);
22074 #else
22075 #ifdef __NCURSES_H
22076 printf("old\\n");
22077 #else
22078 #error __NCURSES_H is not defined
22079 #endif
22080 #endif
22081
22082 ;
22083 return 0;
22084 }
22085 _ACEOF
22086 rm -f "conftest.$ac_objext"
22087 if { (eval echo "$as_me:22087: \"$ac_compile\"") >&5
22088 (eval $ac_compile) 2>&5
22089 ac_status=$?
22090 echo "$as_me:22090: \$? = $ac_status" >&5
22091 (exit "$ac_status"); } &&
22092 { ac_try='test -s "conftest.$ac_objext"'
22093 { (eval echo "$as_me:22093: \"$ac_try\"") >&5
22094 (eval $ac_try) 2>&5
22095 ac_status=$?
22096 echo "$as_me:22096: \$? = $ac_status" >&5
22097 (exit "$ac_status"); }; }; then
22098 cf_cv_ncurses_h2=$cf_header
22099
22100 else
22101 echo "$as_me: failed program was:" >&5
22102 cat "conftest.$ac_ext" >&5
22103 cf_cv_ncurses_h2=no
22104 fi
22105 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22106
22107 if test "$cf_cv_ncurses_h2" != no ; then
22108 cf_cv_ncurses_h2=$cf_incdir/$cf_header
22109 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
22110 break
22111 fi
22112 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
22113 done
22114 CPPFLAGS="$cf_save2_CPPFLAGS"
22115 test "$cf_cv_ncurses_h2" != no && break
22116 done
22117 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:22117: error: not found" >&5
22118 echo "$as_me: error: not found" >&2;}
22119 { (exit 1); exit 1; }; }
22120
22121 fi
22122 echo "$as_me:22122: result: $cf_cv_ncurses_h2" >&5
22123 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
22124
22125 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
22126 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
22127 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
22128 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
22129 fi
22130
22131 if test -n "$cf_1st_incdir" ; then
22132 for cf_add_incdir in $cf_1st_incdir
22133 do
22134 while test "$cf_add_incdir" != /usr/include
22135 do
22136 if test -d "$cf_add_incdir"
22137 then
22138 cf_have_incdir=no
22139 if test -n "$CFLAGS$CPPFLAGS" ; then
22140 # a loop is needed to ensure we can add subdirs of existing dirs
22141 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22142 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22143 cf_have_incdir=yes; break
22144 fi
22145 done
22146 fi
22147
22148 if test "$cf_have_incdir" = no ; then
22149 if test "$cf_add_incdir" = /usr/local/include ; then
22150 if test "$GCC" = yes
22151 then
22152 cf_save_CPPFLAGS=$CPPFLAGS
22153
22154 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22155 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22156
22157 cat >"conftest.$ac_ext" <<_ACEOF
22158 #line 22158 "configure"
22159 #include "confdefs.h"
22160 #include <stdio.h>
22161 int
22162 main (void)
22163 {
22164 printf("Hello")
22165 ;
22166 return 0;
22167 }
22168 _ACEOF
22169 rm -f "conftest.$ac_objext"
22170 if { (eval echo "$as_me:22170: \"$ac_compile\"") >&5
22171 (eval $ac_compile) 2>&5
22172 ac_status=$?
22173 echo "$as_me:22173: \$? = $ac_status" >&5
22174 (exit "$ac_status"); } &&
22175 { ac_try='test -s "conftest.$ac_objext"'
22176 { (eval echo "$as_me:22176: \"$ac_try\"") >&5
22177 (eval $ac_try) 2>&5
22178 ac_status=$?
22179 echo "$as_me:22179: \$? = $ac_status" >&5
22180 (exit "$ac_status"); }; }; then
22181 :
22182 else
22183 echo "$as_me: failed program was:" >&5
22184 cat "conftest.$ac_ext" >&5
22185 cf_have_incdir=yes
22186 fi
22187 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22188 CPPFLAGS=$cf_save_CPPFLAGS
22189 fi
22190 fi
22191 fi
22192
22193 if test "$cf_have_incdir" = no ; then
22194 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
22195
22196 echo "${as_me:-configure}:22196: testing adding $cf_add_incdir to include-path ..." 1>&5
22197
22198 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22199
22200 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
22201 test "$cf_top_incdir" = "$cf_add_incdir" && break
22202 cf_add_incdir="$cf_top_incdir"
22203 else
22204 break
22205 fi
22206 else
22207 break
22208 fi
22209 done
22210 done
22211 fi
22212
22213 fi
22214
22215 # Set definitions to allow ifdef'ing for ncurses.h
22216
22217 case "$cf_cv_ncurses_header" in
22218 (*ncurses.h)
22219
22220 cat >>confdefs.h <<\EOF
22221 #define HAVE_NCURSES_H 1
22222 EOF
22223
22224 ;;
22225 esac
22226
22227 case "$cf_cv_ncurses_header" in
22228 (ncurses/curses.h|ncurses/ncurses.h)
22229
22230 cat >>confdefs.h <<\EOF
22231 #define HAVE_NCURSES_NCURSES_H 1
22232 EOF
22233
22234 ;;
22235 (ncursesw/curses.h|ncursesw/ncurses.h)
22236
22237 cat >>confdefs.h <<\EOF
22238 #define HAVE_NCURSESW_NCURSES_H 1
22239 EOF
22240
22241 ;;
22242 esac
22243
22244 echo "$as_me:22244: checking for terminfo header" >&5
22245 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
22246 if test "${cf_cv_term_header+set}" = set; then
22247 echo $ECHO_N "(cached) $ECHO_C" >&6
22248 else
22249
22250 case "${cf_cv_ncurses_header}" in
22251 (*/ncurses.h|*/ncursesw.h)
22252 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
22253 ;;
22254 (*)
22255 cf_term_header=term.h
22256 ;;
22257 esac
22258
22259 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
22260 do
22261 cat >"conftest.$ac_ext" <<_ACEOF
22262 #line 22262 "configure"
22263 #include "confdefs.h"
22264 #include <stdio.h>
22265 #include <${cf_cv_ncurses_header:-curses.h}>
22266 #include <$cf_test>
22267
22268 int
22269 main (void)
22270 {
22271 int x = auto_left_margin; (void)x
22272 ;
22273 return 0;
22274 }
22275 _ACEOF
22276 rm -f "conftest.$ac_objext"
22277 if { (eval echo "$as_me:22277: \"$ac_compile\"") >&5
22278 (eval $ac_compile) 2>&5
22279 ac_status=$?
22280 echo "$as_me:22280: \$? = $ac_status" >&5
22281 (exit "$ac_status"); } &&
22282 { ac_try='test -s "conftest.$ac_objext"'
22283 { (eval echo "$as_me:22283: \"$ac_try\"") >&5
22284 (eval $ac_try) 2>&5
22285 ac_status=$?
22286 echo "$as_me:22286: \$? = $ac_status" >&5
22287 (exit "$ac_status"); }; }; then
22288
22289 cf_cv_term_header="$cf_test"
22290 else
22291 echo "$as_me: failed program was:" >&5
22292 cat "conftest.$ac_ext" >&5
22293
22294 cf_cv_term_header=unknown
22295
22296 fi
22297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22298 test "$cf_cv_term_header" != unknown && break
22299 done
22300
22301 fi
22302 echo "$as_me:22302: result: $cf_cv_term_header" >&5
22303 echo "${ECHO_T}$cf_cv_term_header" >&6
22304
22305 # Set definitions to allow ifdef'ing to accommodate subdirectories
22306
22307 case "$cf_cv_term_header" in
22308 (*term.h)
22309
22310 cat >>confdefs.h <<\EOF
22311 #define HAVE_TERM_H 1
22312 EOF
22313
22314 ;;
22315 esac
22316
22317 case "$cf_cv_term_header" in
22318 (ncurses/term.h)
22319
22320 cat >>confdefs.h <<\EOF
22321 #define HAVE_NCURSES_TERM_H 1
22322 EOF
22323
22324 ;;
22325 (ncursesw/term.h)
22326
22327 cat >>confdefs.h <<\EOF
22328 #define HAVE_NCURSESW_TERM_H 1
22329 EOF
22330
22331 ;;
22332 esac
22333
22334 # some applications need this, but should check for NCURSES_VERSION
22335
22336 cat >>confdefs.h <<\EOF
22337 #define NCURSES 1
22338 EOF
22339
22340 echo "$as_me:22340: checking for ncurses version" >&5
22341 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
22342 if test "${cf_cv_ncurses_version+set}" = set; then
22343 echo $ECHO_N "(cached) $ECHO_C" >&6
22344 else
22345
22346 cf_cv_ncurses_version=no
22347 cf_tempfile=out$$
22348 rm -f "$cf_tempfile"
22349 if test "$cross_compiling" = yes; then
22350
22351 # This will not work if the preprocessor splits the line after the
22352 # Autoconf token. The 'unproto' program does that.
22353 cat > "conftest.$ac_ext" <<EOF
22354 #include <${cf_cv_ncurses_header:-curses.h}>
22355 #undef Autoconf
22356 #ifdef NCURSES_VERSION
22357 Autoconf NCURSES_VERSION
22358 #else
22359 #ifdef __NCURSES_H
22360 Autoconf "old"
22361 #endif
22362 ;
22363 #endif
22364 EOF
22365 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
22366 { (eval echo "$as_me:22366: \"$cf_try\"") >&5
22367 (eval $cf_try) 2>&5
22368 ac_status=$?
22369 echo "$as_me:22369: \$? = $ac_status" >&5
22370 (exit "$ac_status"); }
22371 if test -f conftest.out ; then
22372 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
22373 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
22374 rm -f conftest.out
22375 fi
22376
22377 else
22378 cat >"conftest.$ac_ext" <<_ACEOF
22379 #line 22379 "configure"
22380 #include "confdefs.h"
22381
22382 $ac_includes_default
22383
22384 #include <${cf_cv_ncurses_header:-curses.h}>
22385
22386 int main(void)
22387 {
22388 FILE *fp = fopen("$cf_tempfile", "w");
22389 #ifdef NCURSES_VERSION
22390 # ifdef NCURSES_VERSION_PATCH
22391 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
22392 # else
22393 fprintf(fp, "%s\\n", NCURSES_VERSION);
22394 # endif
22395 #else
22396 # ifdef __NCURSES_H
22397 fprintf(fp, "old\\n");
22398 # else
22399 #error expected ncurses header to define __NCURSES_H
22400 # endif
22401 #endif
22402 ${cf_cv_main_return:-return}(0);
22403 }
22404 _ACEOF
22405 rm -f "conftest$ac_exeext"
22406 if { (eval echo "$as_me:22406: \"$ac_link\"") >&5
22407 (eval $ac_link) 2>&5
22408 ac_status=$?
22409 echo "$as_me:22409: \$? = $ac_status" >&5
22410 (exit "$ac_status"); } && { ac_try='"./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
22417 cf_cv_ncurses_version=`cat $cf_tempfile`
22418 else
22419 echo "$as_me: program exited with status $ac_status" >&5
22420 echo "$as_me: failed program was:" >&5
22421 cat "conftest.$ac_ext" >&5
22422 fi
22423 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22424 fi
22425 rm -f "$cf_tempfile"
22426
22427 fi
22428 echo "$as_me:22428: result: $cf_cv_ncurses_version" >&5
22429 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
22430 test "$cf_cv_ncurses_version" = no ||
22431 cat >>confdefs.h <<\EOF
22432 #define NCURSES 1
22433 EOF
22434
22435 cf_nculib_root=$cf_cv_screen
22436 # This works, except for the special case where we find gpm, but
22437 # ncurses is in a nonstandard location via $LIBS, and we really want
22438 # to link gpm.
22439 cf_ncurses_LIBS=""
22440 cf_ncurses_SAVE="$LIBS"
22441 echo "$as_me:22441: checking for Gpm_Open in -lgpm" >&5
22442 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
22443 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
22444 echo $ECHO_N "(cached) $ECHO_C" >&6
22445 else
22446 ac_check_lib_save_LIBS=$LIBS
22447 LIBS="-lgpm $LIBS"
22448 cat >"conftest.$ac_ext" <<_ACEOF
22449 #line 22449 "configure"
22450 #include "confdefs.h"
22451
22452 /* Override any gcc2 internal prototype to avoid an error. */
22453 #ifdef __cplusplus
22454 extern "C"
22455 #endif
22456 /* We use char because int might match the return type of a gcc2
22457 builtin and then its argument prototype would still apply. */
22458 char Gpm_Open (void);
22459 int
22460 main (void)
22461 {
22462 Gpm_Open ();
22463 ;
22464 return 0;
22465 }
22466 _ACEOF
22467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22468 if { (eval echo "$as_me:22468: \"$ac_link\"") >&5
22469 (eval $ac_link) 2>&5
22470 ac_status=$?
22471 echo "$as_me:22471: \$? = $ac_status" >&5
22472 (exit "$ac_status"); } &&
22473 { ac_try='test -s "conftest$ac_exeext"'
22474 { (eval echo "$as_me:22474: \"$ac_try\"") >&5
22475 (eval $ac_try) 2>&5
22476 ac_status=$?
22477 echo "$as_me:22477: \$? = $ac_status" >&5
22478 (exit "$ac_status"); }; }; then
22479 ac_cv_lib_gpm_Gpm_Open=yes
22480 else
22481 echo "$as_me: failed program was:" >&5
22482 cat "conftest.$ac_ext" >&5
22483 ac_cv_lib_gpm_Gpm_Open=no
22484 fi
22485 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22486 LIBS=$ac_check_lib_save_LIBS
22487 fi
22488 echo "$as_me:22488: result: $ac_cv_lib_gpm_Gpm_Open" >&5
22489 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
22490 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
22491 echo "$as_me:22491: checking for initscr in -lgpm" >&5
22492 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
22493 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
22494 echo $ECHO_N "(cached) $ECHO_C" >&6
22495 else
22496 ac_check_lib_save_LIBS=$LIBS
22497 LIBS="-lgpm $LIBS"
22498 cat >"conftest.$ac_ext" <<_ACEOF
22499 #line 22499 "configure"
22500 #include "confdefs.h"
22501
22502 /* Override any gcc2 internal prototype to avoid an error. */
22503 #ifdef __cplusplus
22504 extern "C"
22505 #endif
22506 /* We use char because int might match the return type of a gcc2
22507 builtin and then its argument prototype would still apply. */
22508 char initscr (void);
22509 int
22510 main (void)
22511 {
22512 initscr ();
22513 ;
22514 return 0;
22515 }
22516 _ACEOF
22517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22518 if { (eval echo "$as_me:22518: \"$ac_link\"") >&5
22519 (eval $ac_link) 2>&5
22520 ac_status=$?
22521 echo "$as_me:22521: \$? = $ac_status" >&5
22522 (exit "$ac_status"); } &&
22523 { ac_try='test -s "conftest$ac_exeext"'
22524 { (eval echo "$as_me:22524: \"$ac_try\"") >&5
22525 (eval $ac_try) 2>&5
22526 ac_status=$?
22527 echo "$as_me:22527: \$? = $ac_status" >&5
22528 (exit "$ac_status"); }; }; then
22529 ac_cv_lib_gpm_initscr=yes
22530 else
22531 echo "$as_me: failed program was:" >&5
22532 cat "conftest.$ac_ext" >&5
22533 ac_cv_lib_gpm_initscr=no
22534 fi
22535 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22536 LIBS=$ac_check_lib_save_LIBS
22537 fi
22538 echo "$as_me:22538: result: $ac_cv_lib_gpm_initscr" >&5
22539 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
22540 if test "$ac_cv_lib_gpm_initscr" = yes; then
22541 LIBS="$cf_ncurses_SAVE"
22542 else
22543 cf_ncurses_LIBS="-lgpm"
22544 fi
22545
22546 fi
22547
22548 case "$host_os" in
22549 (freebsd*)
22550 # This is only necessary if you are linking against an obsolete
22551 # version of ncurses (but it should do no harm, since it is static).
22552 if test "$cf_nculib_root" = ncurses ; then
22553 echo "$as_me:22553: checking for tgoto in -lmytinfo" >&5
22554 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
22555 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
22556 echo $ECHO_N "(cached) $ECHO_C" >&6
22557 else
22558 ac_check_lib_save_LIBS=$LIBS
22559 LIBS="-lmytinfo $LIBS"
22560 cat >"conftest.$ac_ext" <<_ACEOF
22561 #line 22561 "configure"
22562 #include "confdefs.h"
22563
22564 /* Override any gcc2 internal prototype to avoid an error. */
22565 #ifdef __cplusplus
22566 extern "C"
22567 #endif
22568 /* We use char because int might match the return type of a gcc2
22569 builtin and then its argument prototype would still apply. */
22570 char tgoto (void);
22571 int
22572 main (void)
22573 {
22574 tgoto ();
22575 ;
22576 return 0;
22577 }
22578 _ACEOF
22579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22580 if { (eval echo "$as_me:22580: \"$ac_link\"") >&5
22581 (eval $ac_link) 2>&5
22582 ac_status=$?
22583 echo "$as_me:22583: \$? = $ac_status" >&5
22584 (exit "$ac_status"); } &&
22585 { ac_try='test -s "conftest$ac_exeext"'
22586 { (eval echo "$as_me:22586: \"$ac_try\"") >&5
22587 (eval $ac_try) 2>&5
22588 ac_status=$?
22589 echo "$as_me:22589: \$? = $ac_status" >&5
22590 (exit "$ac_status"); }; }; then
22591 ac_cv_lib_mytinfo_tgoto=yes
22592 else
22593 echo "$as_me: failed program was:" >&5
22594 cat "conftest.$ac_ext" >&5
22595 ac_cv_lib_mytinfo_tgoto=no
22596 fi
22597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22598 LIBS=$ac_check_lib_save_LIBS
22599 fi
22600 echo "$as_me:22600: result: $ac_cv_lib_mytinfo_tgoto" >&5
22601 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
22602 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
22603 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
22604 fi
22605
22606 fi
22607 ;;
22608 esac
22609
22610 cf_add_libs="$LIBS"
22611 # reverse order
22612 cf_add_0lib=
22613 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22614 # filter duplicates
22615 for cf_add_1lib in $cf_add_0lib; do
22616 for cf_add_2lib in $cf_add_libs; do
22617 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22618 cf_add_1lib=
22619 break
22620 fi
22621 done
22622 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22623 done
22624 LIBS="$cf_add_libs"
22625
22626 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
22627 then
22628
22629 cf_add_libs="$LIBS"
22630 # reverse order
22631 cf_add_0lib=
22632 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22633 # filter duplicates
22634 for cf_add_1lib in $cf_add_0lib; do
22635 for cf_add_2lib in $cf_add_libs; do
22636 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22637 cf_add_1lib=
22638 break
22639 fi
22640 done
22641 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22642 done
22643 LIBS="$cf_add_libs"
22644
22645 else
22646
22647 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
22648 cf_libdir=""
22649 echo "$as_me:22649: checking for initscr" >&5
22650 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
22651 if test "${ac_cv_func_initscr+set}" = set; then
22652 echo $ECHO_N "(cached) $ECHO_C" >&6
22653 else
22654 cat >"conftest.$ac_ext" <<_ACEOF
22655 #line 22655 "configure"
22656 #include "confdefs.h"
22657 #define initscr autoconf_temporary
22658 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22659 #undef initscr
22660
22661 #ifdef __cplusplus
22662 extern "C"
22663 #endif
22664
22665 /* We use char because int might match the return type of a gcc2
22666 builtin and then its argument prototype would still apply. */
22667 char initscr (void);
22668
22669 int
22670 main (void)
22671 {
22672
22673 /* The GNU C library defines stubs for functions which it implements
22674 to always fail with ENOSYS. Some functions are actually named
22675 something starting with __ and the normal name is an alias. */
22676 #if defined (__stub_initscr) || defined (__stub___initscr)
22677 #error found stub for initscr
22678 #endif
22679
22680 return initscr ();
22681 ;
22682 return 0;
22683 }
22684 _ACEOF
22685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22686 if { (eval echo "$as_me:22686: \"$ac_link\"") >&5
22687 (eval $ac_link) 2>&5
22688 ac_status=$?
22689 echo "$as_me:22689: \$? = $ac_status" >&5
22690 (exit "$ac_status"); } &&
22691 { ac_try='test -s "conftest$ac_exeext"'
22692 { (eval echo "$as_me:22692: \"$ac_try\"") >&5
22693 (eval $ac_try) 2>&5
22694 ac_status=$?
22695 echo "$as_me:22695: \$? = $ac_status" >&5
22696 (exit "$ac_status"); }; }; then
22697 ac_cv_func_initscr=yes
22698 else
22699 echo "$as_me: failed program was:" >&5
22700 cat "conftest.$ac_ext" >&5
22701 ac_cv_func_initscr=no
22702 fi
22703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22704 fi
22705 echo "$as_me:22705: result: $ac_cv_func_initscr" >&5
22706 echo "${ECHO_T}$ac_cv_func_initscr" >&6
22707 if test "$ac_cv_func_initscr" = yes; then
22708 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
22709 else
22710
22711 cf_save_LIBS="$LIBS"
22712 echo "$as_me:22712: checking for initscr in -l$cf_nculib_root" >&5
22713 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
22714 LIBS="-l$cf_nculib_root $LIBS"
22715 cat >"conftest.$ac_ext" <<_ACEOF
22716 #line 22716 "configure"
22717 #include "confdefs.h"
22718 #include <${cf_cv_ncurses_header:-curses.h}>
22719 int
22720 main (void)
22721 {
22722 initscr()
22723 ;
22724 return 0;
22725 }
22726 _ACEOF
22727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22728 if { (eval echo "$as_me:22728: \"$ac_link\"") >&5
22729 (eval $ac_link) 2>&5
22730 ac_status=$?
22731 echo "$as_me:22731: \$? = $ac_status" >&5
22732 (exit "$ac_status"); } &&
22733 { ac_try='test -s "conftest$ac_exeext"'
22734 { (eval echo "$as_me:22734: \"$ac_try\"") >&5
22735 (eval $ac_try) 2>&5
22736 ac_status=$?
22737 echo "$as_me:22737: \$? = $ac_status" >&5
22738 (exit "$ac_status"); }; }; then
22739 echo "$as_me:22739: result: yes" >&5
22740 echo "${ECHO_T}yes" >&6
22741 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
22742
22743 else
22744 echo "$as_me: failed program was:" >&5
22745 cat "conftest.$ac_ext" >&5
22746 echo "$as_me:22746: result: no" >&5
22747 echo "${ECHO_T}no" >&6
22748
22749 cf_search=
22750 cf_library_path_list=""
22751 if test -n "${LDFLAGS}${LIBS}" ; then
22752 for cf_library_path in $LDFLAGS $LIBS
22753 do
22754 case "$cf_library_path" in
22755 (-L*)
22756 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
22757
22758 test "x$cf_library_path" != "xNONE" && \
22759 test -d "$cf_library_path" && \
22760 {
22761 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
22762 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
22763 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
22764 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
22765 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
22766 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"
22767 }
22768
22769 cf_library_path_list="$cf_library_path_list $cf_search"
22770 ;;
22771 esac
22772 done
22773 fi
22774
22775 cf_search=
22776
22777 test "x$prefix" != "xNONE" && \
22778 test -d "$prefix" && \
22779 {
22780 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
22781 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
22782 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
22783 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
22784 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
22785 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
22786 }
22787
22788 for cf_subdir_prefix in \
22789 /usr \
22790 /usr/local \
22791 /usr/pkg \
22792 /opt \
22793 /opt/local \
22794 $HOME
22795 do
22796
22797 test "x$cf_subdir_prefix" != "x$prefix" && \
22798 test -d "$cf_subdir_prefix" && \
22799 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
22800 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
22801 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
22802 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
22803 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
22804 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
22805 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"
22806 }
22807
22808 done
22809
22810 cf_search="$cf_library_path_list $cf_search"
22811
22812 for cf_libdir in $cf_search
22813 do
22814 echo "$as_me:22814: checking for -l$cf_nculib_root in $cf_libdir" >&5
22815 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
22816 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
22817 cat >"conftest.$ac_ext" <<_ACEOF
22818 #line 22818 "configure"
22819 #include "confdefs.h"
22820 #include <${cf_cv_ncurses_header:-curses.h}>
22821 int
22822 main (void)
22823 {
22824 initscr()
22825 ;
22826 return 0;
22827 }
22828 _ACEOF
22829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22830 if { (eval echo "$as_me:22830: \"$ac_link\"") >&5
22831 (eval $ac_link) 2>&5
22832 ac_status=$?
22833 echo "$as_me:22833: \$? = $ac_status" >&5
22834 (exit "$ac_status"); } &&
22835 { ac_try='test -s "conftest$ac_exeext"'
22836 { (eval echo "$as_me:22836: \"$ac_try\"") >&5
22837 (eval $ac_try) 2>&5
22838 ac_status=$?
22839 echo "$as_me:22839: \$? = $ac_status" >&5
22840 (exit "$ac_status"); }; }; then
22841 echo "$as_me:22841: result: yes" >&5
22842 echo "${ECHO_T}yes" >&6
22843 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
22844 break
22845 else
22846 echo "$as_me: failed program was:" >&5
22847 cat "conftest.$ac_ext" >&5
22848 echo "$as_me:22848: result: no" >&5
22849 echo "${ECHO_T}no" >&6
22850 LIBS="$cf_save_LIBS"
22851 fi
22852 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22853 done
22854
22855 fi
22856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22857
22858 fi
22859
22860 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
22861
22862 if test "$cf_found_library" = no ; then
22863 { { echo "$as_me:22863: error: Cannot link $cf_nculib_root library" >&5
22864 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
22865 { (exit 1); exit 1; }; }
22866 fi
22867
22868 fi
22869
22870 if test -n "$cf_ncurses_LIBS" ; then
22871 echo "$as_me:22871: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
22872 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
22873 cf_ncurses_SAVE="$LIBS"
22874 for p in $cf_ncurses_LIBS ; do
22875 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
22876 if test "$q" != "$LIBS" ; then
22877 LIBS="$q"
22878 fi
22879 done
22880 cat >"conftest.$ac_ext" <<_ACEOF
22881 #line 22881 "configure"
22882 #include "confdefs.h"
22883 #include <${cf_cv_ncurses_header:-curses.h}>
22884 int
22885 main (void)
22886 {
22887 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
22888 ;
22889 return 0;
22890 }
22891 _ACEOF
22892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22893 if { (eval echo "$as_me:22893: \"$ac_link\"") >&5
22894 (eval $ac_link) 2>&5
22895 ac_status=$?
22896 echo "$as_me:22896: \$? = $ac_status" >&5
22897 (exit "$ac_status"); } &&
22898 { ac_try='test -s "conftest$ac_exeext"'
22899 { (eval echo "$as_me:22899: \"$ac_try\"") >&5
22900 (eval $ac_try) 2>&5
22901 ac_status=$?
22902 echo "$as_me:22902: \$? = $ac_status" >&5
22903 (exit "$ac_status"); }; }; then
22904 echo "$as_me:22904: result: yes" >&5
22905 echo "${ECHO_T}yes" >&6
22906 else
22907 echo "$as_me: failed program was:" >&5
22908 cat "conftest.$ac_ext" >&5
22909 echo "$as_me:22909: result: no" >&5
22910 echo "${ECHO_T}no" >&6
22911 LIBS="$cf_ncurses_SAVE"
22912 fi
22913 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22914 fi
22915
22916 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22917
22918 cat >>confdefs.h <<EOF
22919 #define $cf_nculib_ROOT 1
22920 EOF
22921
22922 fi
22923 else
22924 NCURSES_CONFIG=none
22925 fi
22926
22927 cf_wide_curses=yes
22928 ;;
22929 (ncurses*)
22930
22931 cf_ncuconfig_root=$cf_cv_screen
22932 cf_have_ncuconfig=no
22933
22934 if test "x${PKG_CONFIG:=none}" != xnone; then
22935 echo "$as_me:22935: checking pkg-config for $cf_ncuconfig_root" >&5
22936 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
22937 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
22938 echo "$as_me:22938: result: yes" >&5
22939 echo "${ECHO_T}yes" >&6
22940
22941 echo "$as_me:22941: checking if the $cf_ncuconfig_root package files work" >&5
22942 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
22943 cf_have_ncuconfig=unknown
22944
22945 cf_save_CFLAGS="$CFLAGS"
22946 cf_save_CPPFLAGS="$CPPFLAGS"
22947 cf_save_LIBS="$LIBS"
22948
22949 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
22950 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
22951
22952 # while -W for passing linker flags is prevalent, it is not "standard".
22953 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
22954 # incompatible _and_ non-standard -W option which gives an error. Work
22955 # around that pitfall.
22956 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
22957 (x*c[89]9@@*-W*)
22958
22959 cf_fix_cppflags=no
22960 cf_new_cflags=
22961 cf_new_cppflags=
22962 cf_new_extra_cppflags=
22963
22964 for cf_add_cflags in $cf_pkg_cflags
22965 do
22966 case "$cf_fix_cppflags" in
22967 (no)
22968 case "$cf_add_cflags" in
22969 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22970 case "$cf_add_cflags" in
22971 (-D*)
22972 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22973
22974 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22975 && test -z "${cf_tst_cflags}" \
22976 && cf_fix_cppflags=yes
22977
22978 if test "$cf_fix_cppflags" = yes ; then
22979
22980 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22981 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22982
22983 continue
22984 elif test "${cf_tst_cflags}" = "\"'" ; then
22985
22986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22988
22989 continue
22990 fi
22991 ;;
22992 esac
22993 case "$CPPFLAGS" in
22994 (*$cf_add_cflags)
22995 ;;
22996 (*)
22997 case "$cf_add_cflags" in
22998 (-D*)
22999 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23000
23001 CPPFLAGS=`echo "$CPPFLAGS" | \
23002 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23003 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23004
23005 ;;
23006 esac
23007
23008 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23009 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23010
23011 ;;
23012 esac
23013 ;;
23014 (*)
23015
23016 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23017 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23018
23019 ;;
23020 esac
23021 ;;
23022 (yes)
23023
23024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23026
23027 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23028
23029 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23030 && test -z "${cf_tst_cflags}" \
23031 && cf_fix_cppflags=no
23032 ;;
23033 esac
23034 done
23035
23036 if test -n "$cf_new_cflags" ; then
23037
23038 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23039 CFLAGS="${CFLAGS}$cf_new_cflags"
23040
23041 fi
23042
23043 if test -n "$cf_new_cppflags" ; then
23044
23045 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23046 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23047
23048 fi
23049
23050 if test -n "$cf_new_extra_cppflags" ; then
23051
23052 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23053 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23054
23055 fi
23056
23057 cf_add_libs="$LIBS"
23058 # reverse order
23059 cf_add_0lib=
23060 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23061 # filter duplicates
23062 for cf_add_1lib in $cf_add_0lib; do
23063 for cf_add_2lib in $cf_add_libs; do
23064 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23065 cf_add_1lib=
23066 break
23067 fi
23068 done
23069 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23070 done
23071 LIBS="$cf_add_libs"
23072
23073 cat >"conftest.$ac_ext" <<_ACEOF
23074 #line 23074 "configure"
23075 #include "confdefs.h"
23076 #include <${cf_cv_ncurses_header:-curses.h}>
23077 int
23078 main (void)
23079 {
23080 initscr(); mousemask(0,(mmask_t*)0); tigetstr((char *)0);
23081 ;
23082 return 0;
23083 }
23084 _ACEOF
23085 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23086 if { (eval echo "$as_me:23086: \"$ac_link\"") >&5
23087 (eval $ac_link) 2>&5
23088 ac_status=$?
23089 echo "$as_me:23089: \$? = $ac_status" >&5
23090 (exit "$ac_status"); } &&
23091 { ac_try='test -s "conftest$ac_exeext"'
23092 { (eval echo "$as_me:23092: \"$ac_try\"") >&5
23093 (eval $ac_try) 2>&5
23094 ac_status=$?
23095 echo "$as_me:23095: \$? = $ac_status" >&5
23096 (exit "$ac_status"); }; }; then
23097 if test "$cross_compiling" = yes; then
23098 cf_test_ncuconfig=maybe
23099 else
23100 cat >"conftest.$ac_ext" <<_ACEOF
23101 #line 23101 "configure"
23102 #include "confdefs.h"
23103 #include <${cf_cv_ncurses_header:-curses.h}>
23104 int main(void)
23105 { const char *xx = curses_version(); return (xx == (const char*)0); }
23106 _ACEOF
23107 rm -f "conftest$ac_exeext"
23108 if { (eval echo "$as_me:23108: \"$ac_link\"") >&5
23109 (eval $ac_link) 2>&5
23110 ac_status=$?
23111 echo "$as_me:23111: \$? = $ac_status" >&5
23112 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23113 { (eval echo "$as_me:23113: \"$ac_try\"") >&5
23114 (eval $ac_try) 2>&5
23115 ac_status=$?
23116 echo "$as_me:23116: \$? = $ac_status" >&5
23117 (exit "$ac_status"); }; }; then
23118 cf_test_ncuconfig=yes
23119 else
23120 echo "$as_me: program exited with status $ac_status" >&5
23121 echo "$as_me: failed program was:" >&5
23122 cat "conftest.$ac_ext" >&5
23123 cf_test_ncuconfig=no
23124 fi
23125 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23126 fi
23127 else
23128 echo "$as_me: failed program was:" >&5
23129 cat "conftest.$ac_ext" >&5
23130 cf_test_ncuconfig=no
23131 fi
23132 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23133
23134 CFLAGS="$cf_save_CFLAGS"
23135 CPPFLAGS="$cf_save_CPPFLAGS"
23136 LIBS="$cf_save_LIBS"
23137
23138 if test "x$cf_test_ncuconfig" != xyes; then
23139 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
23140 cf_pkg_cflags="$cf_temp"
23141 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
23142 cf_pkg_libs="$cf_temp"
23143 fi
23144 ;;
23145 esac
23146
23147 for cf_required in $cf_ncuconfig_root
23148 do
23149 # check for duplicates
23150 for cf_require_pkg in $REQUIRE_PKG
23151 do
23152 if test "$cf_required" = "$cf_require_pkg"
23153 then
23154 cf_required=
23155 break
23156 fi
23157 done
23158 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
23159 done
23160
23161 for cf_add_cflags in $cf_pkg_cflags
23162 do
23163 case "x$cf_add_cflags" in
23164 (x-[DU]*)
23165
23166 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
23167 while true
23168 do
23169 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'`
23170 test "$CFLAGS" != "$cf_old_cflag" || break
23171
23172 CFLAGS="$cf_old_cflag"
23173 done
23174
23175 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
23176 while true
23177 do
23178 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'`
23179 test "$CPPFLAGS" != "$cf_old_cflag" || break
23180
23181 CPPFLAGS="$cf_old_cflag"
23182 done
23183
23184 ;;
23185 esac
23186
23187 cf_fix_cppflags=no
23188 cf_new_cflags=
23189 cf_new_cppflags=
23190 cf_new_extra_cppflags=
23191
23192 for cf_add_cflags in $cf_add_cflags
23193 do
23194 case "$cf_fix_cppflags" in
23195 (no)
23196 case "$cf_add_cflags" in
23197 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23198 case "$cf_add_cflags" in
23199 (-D*)
23200 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23201
23202 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23203 && test -z "${cf_tst_cflags}" \
23204 && cf_fix_cppflags=yes
23205
23206 if test "$cf_fix_cppflags" = yes ; then
23207
23208 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23209 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23210
23211 continue
23212 elif test "${cf_tst_cflags}" = "\"'" ; then
23213
23214 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23215 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23216
23217 continue
23218 fi
23219 ;;
23220 esac
23221 case "$CPPFLAGS" in
23222 (*$cf_add_cflags)
23223 ;;
23224 (*)
23225 case "$cf_add_cflags" in
23226 (-D*)
23227 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23228
23229 CPPFLAGS=`echo "$CPPFLAGS" | \
23230 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23231 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23232
23233 ;;
23234 esac
23235
23236 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23237 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23238
23239 ;;
23240 esac
23241 ;;
23242 (*)
23243
23244 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23245 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23246
23247 ;;
23248 esac
23249 ;;
23250 (yes)
23251
23252 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23253 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23254
23255 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23256
23257 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23258 && test -z "${cf_tst_cflags}" \
23259 && cf_fix_cppflags=no
23260 ;;
23261 esac
23262 done
23263
23264 if test -n "$cf_new_cflags" ; then
23265
23266 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23267 CFLAGS="${CFLAGS}$cf_new_cflags"
23268
23269 fi
23270
23271 if test -n "$cf_new_cppflags" ; then
23272
23273 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23274 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23275
23276 fi
23277
23278 if test -n "$cf_new_extra_cppflags" ; then
23279
23280 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23281 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23282
23283 fi
23284
23285 done
23286
23287 cf_add_libs="$LIBS"
23288 # reverse order
23289 cf_add_0lib=
23290 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23291 # filter duplicates
23292 for cf_add_1lib in $cf_add_0lib; do
23293 for cf_add_2lib in $cf_add_libs; do
23294 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23295 cf_add_1lib=
23296 break
23297 fi
23298 done
23299 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23300 done
23301 LIBS="$cf_add_libs"
23302
23303 cat >"conftest.$ac_ext" <<_ACEOF
23304 #line 23304 "configure"
23305 #include "confdefs.h"
23306 #include <${cf_cv_ncurses_header:-curses.h}>
23307 int
23308 main (void)
23309 {
23310 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
23311 ;
23312 return 0;
23313 }
23314 _ACEOF
23315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23316 if { (eval echo "$as_me:23316: \"$ac_link\"") >&5
23317 (eval $ac_link) 2>&5
23318 ac_status=$?
23319 echo "$as_me:23319: \$? = $ac_status" >&5
23320 (exit "$ac_status"); } &&
23321 { ac_try='test -s "conftest$ac_exeext"'
23322 { (eval echo "$as_me:23322: \"$ac_try\"") >&5
23323 (eval $ac_try) 2>&5
23324 ac_status=$?
23325 echo "$as_me:23325: \$? = $ac_status" >&5
23326 (exit "$ac_status"); }; }; then
23327 if test "$cross_compiling" = yes; then
23328 cf_have_ncuconfig=maybe
23329 else
23330 cat >"conftest.$ac_ext" <<_ACEOF
23331 #line 23331 "configure"
23332 #include "confdefs.h"
23333 #include <${cf_cv_ncurses_header:-curses.h}>
23334 int main(void)
23335 { const char *xx = curses_version(); return (xx == (const char*)0); }
23336 _ACEOF
23337 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
23343 { (eval echo "$as_me:23343: \"$ac_try\"") >&5
23344 (eval $ac_try) 2>&5
23345 ac_status=$?
23346 echo "$as_me:23346: \$? = $ac_status" >&5
23347 (exit "$ac_status"); }; }; then
23348 cf_have_ncuconfig=yes
23349 else
23350 echo "$as_me: program exited with status $ac_status" >&5
23351 echo "$as_me: failed program was:" >&5
23352 cat "conftest.$ac_ext" >&5
23353 cf_have_ncuconfig=no
23354 fi
23355 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23356 fi
23357 else
23358 echo "$as_me: failed program was:" >&5
23359 cat "conftest.$ac_ext" >&5
23360 cf_have_ncuconfig=no
23361 fi
23362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23363 echo "$as_me:23363: result: $cf_have_ncuconfig" >&5
23364 echo "${ECHO_T}$cf_have_ncuconfig" >&6
23365 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
23366 if test "$cf_have_ncuconfig" != "yes"
23367 then
23368 CPPFLAGS="$cf_save_CPPFLAGS"
23369 LIBS="$cf_save_LIBS"
23370 NCURSES_CONFIG_PKG=none
23371 else
23372
23373 cat >>confdefs.h <<\EOF
23374 #define NCURSES 1
23375 EOF
23376
23377 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
23378
23379 echo "$as_me:23379: checking for terminfo header" >&5
23380 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
23381 if test "${cf_cv_term_header+set}" = set; then
23382 echo $ECHO_N "(cached) $ECHO_C" >&6
23383 else
23384
23385 case "${cf_cv_ncurses_header}" in
23386 (*/ncurses.h|*/ncursesw.h)
23387 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
23388 ;;
23389 (*)
23390 cf_term_header=term.h
23391 ;;
23392 esac
23393
23394 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
23395 do
23396 cat >"conftest.$ac_ext" <<_ACEOF
23397 #line 23397 "configure"
23398 #include "confdefs.h"
23399 #include <stdio.h>
23400 #include <${cf_cv_ncurses_header:-curses.h}>
23401 #include <$cf_test>
23402
23403 int
23404 main (void)
23405 {
23406 int x = auto_left_margin; (void)x
23407 ;
23408 return 0;
23409 }
23410 _ACEOF
23411 rm -f "conftest.$ac_objext"
23412 if { (eval echo "$as_me:23412: \"$ac_compile\"") >&5
23413 (eval $ac_compile) 2>&5
23414 ac_status=$?
23415 echo "$as_me:23415: \$? = $ac_status" >&5
23416 (exit "$ac_status"); } &&
23417 { ac_try='test -s "conftest.$ac_objext"'
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
23424 cf_cv_term_header="$cf_test"
23425 else
23426 echo "$as_me: failed program was:" >&5
23427 cat "conftest.$ac_ext" >&5
23428
23429 cf_cv_term_header=unknown
23430
23431 fi
23432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23433 test "$cf_cv_term_header" != unknown && break
23434 done
23435
23436 fi
23437 echo "$as_me:23437: result: $cf_cv_term_header" >&5
23438 echo "${ECHO_T}$cf_cv_term_header" >&6
23439
23440 # Set definitions to allow ifdef'ing to accommodate subdirectories
23441
23442 case "$cf_cv_term_header" in
23443 (*term.h)
23444
23445 cat >>confdefs.h <<\EOF
23446 #define HAVE_TERM_H 1
23447 EOF
23448
23449 ;;
23450 esac
23451
23452 case "$cf_cv_term_header" in
23453 (ncurses/term.h)
23454
23455 cat >>confdefs.h <<\EOF
23456 #define HAVE_NCURSES_TERM_H 1
23457 EOF
23458
23459 ;;
23460 (ncursesw/term.h)
23461
23462 cat >>confdefs.h <<\EOF
23463 #define HAVE_NCURSESW_TERM_H 1
23464 EOF
23465
23466 ;;
23467 esac
23468
23469 fi
23470
23471 else
23472 echo "$as_me:23472: result: no" >&5
23473 echo "${ECHO_T}no" >&6
23474 NCURSES_CONFIG_PKG=none
23475 fi
23476 else
23477 NCURSES_CONFIG_PKG=none
23478 fi
23479
23480 if test "x$cf_have_ncuconfig" = "xno"; then
23481 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
23482
23483 if test -n "$ac_tool_prefix"; then
23484 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
23485 do
23486 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
23487 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
23488 echo "$as_me:23488: checking for $ac_word" >&5
23489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23490 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
23491 echo $ECHO_N "(cached) $ECHO_C" >&6
23492 else
23493 if test -n "$NCURSES_CONFIG"; then
23494 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
23495 else
23496 ac_save_IFS=$IFS; IFS=$ac_path_separator
23497 ac_dummy="$PATH"
23498 for ac_dir in $ac_dummy; do
23499 IFS=$ac_save_IFS
23500 test -z "$ac_dir" && ac_dir=.
23501 $as_executable_p "$ac_dir/$ac_word" || continue
23502 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
23503 echo "$as_me:23503: found $ac_dir/$ac_word" >&5
23504 break
23505 done
23506
23507 fi
23508 fi
23509 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
23510 if test -n "$NCURSES_CONFIG"; then
23511 echo "$as_me:23511: result: $NCURSES_CONFIG" >&5
23512 echo "${ECHO_T}$NCURSES_CONFIG" >&6
23513 else
23514 echo "$as_me:23514: result: no" >&5
23515 echo "${ECHO_T}no" >&6
23516 fi
23517
23518 test -n "$NCURSES_CONFIG" && break
23519 done
23520 fi
23521 if test -z "$NCURSES_CONFIG"; then
23522 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
23523 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
23524 do
23525 # Extract the first word of "$ac_prog", so it can be a program name with args.
23526 set dummy $ac_prog; ac_word=$2
23527 echo "$as_me:23527: checking for $ac_word" >&5
23528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23529 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
23530 echo $ECHO_N "(cached) $ECHO_C" >&6
23531 else
23532 if test -n "$ac_ct_NCURSES_CONFIG"; then
23533 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
23534 else
23535 ac_save_IFS=$IFS; IFS=$ac_path_separator
23536 ac_dummy="$PATH"
23537 for ac_dir in $ac_dummy; do
23538 IFS=$ac_save_IFS
23539 test -z "$ac_dir" && ac_dir=.
23540 $as_executable_p "$ac_dir/$ac_word" || continue
23541 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
23542 echo "$as_me:23542: found $ac_dir/$ac_word" >&5
23543 break
23544 done
23545
23546 fi
23547 fi
23548 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
23549 if test -n "$ac_ct_NCURSES_CONFIG"; then
23550 echo "$as_me:23550: result: $ac_ct_NCURSES_CONFIG" >&5
23551 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
23552 else
23553 echo "$as_me:23553: result: no" >&5
23554 echo "${ECHO_T}no" >&6
23555 fi
23556
23557 test -n "$ac_ct_NCURSES_CONFIG" && break
23558 done
23559 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
23560
23561 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
23562 fi
23563
23564 if test "$NCURSES_CONFIG" != none ; then
23565
23566 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
23567 do
23568 case "x$cf_add_cflags" in
23569 (x-[DU]*)
23570
23571 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
23572 while true
23573 do
23574 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'`
23575 test "$CFLAGS" != "$cf_old_cflag" || break
23576
23577 CFLAGS="$cf_old_cflag"
23578 done
23579
23580 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
23581 while true
23582 do
23583 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'`
23584 test "$CPPFLAGS" != "$cf_old_cflag" || break
23585
23586 CPPFLAGS="$cf_old_cflag"
23587 done
23588
23589 ;;
23590 esac
23591
23592 cf_fix_cppflags=no
23593 cf_new_cflags=
23594 cf_new_cppflags=
23595 cf_new_extra_cppflags=
23596
23597 for cf_add_cflags in $cf_add_cflags
23598 do
23599 case "$cf_fix_cppflags" in
23600 (no)
23601 case "$cf_add_cflags" in
23602 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23603 case "$cf_add_cflags" in
23604 (-D*)
23605 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23606
23607 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23608 && test -z "${cf_tst_cflags}" \
23609 && cf_fix_cppflags=yes
23610
23611 if test "$cf_fix_cppflags" = yes ; then
23612
23613 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23614 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23615
23616 continue
23617 elif test "${cf_tst_cflags}" = "\"'" ; then
23618
23619 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23620 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23621
23622 continue
23623 fi
23624 ;;
23625 esac
23626 case "$CPPFLAGS" in
23627 (*$cf_add_cflags)
23628 ;;
23629 (*)
23630 case "$cf_add_cflags" in
23631 (-D*)
23632 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23633
23634 CPPFLAGS=`echo "$CPPFLAGS" | \
23635 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23636 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23637
23638 ;;
23639 esac
23640
23641 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23642 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23643
23644 ;;
23645 esac
23646 ;;
23647 (*)
23648
23649 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23650 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23651
23652 ;;
23653 esac
23654 ;;
23655 (yes)
23656
23657 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23658 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23659
23660 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23661
23662 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23663 && test -z "${cf_tst_cflags}" \
23664 && cf_fix_cppflags=no
23665 ;;
23666 esac
23667 done
23668
23669 if test -n "$cf_new_cflags" ; then
23670
23671 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23672 CFLAGS="${CFLAGS}$cf_new_cflags"
23673
23674 fi
23675
23676 if test -n "$cf_new_cppflags" ; then
23677
23678 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23679 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23680
23681 fi
23682
23683 if test -n "$cf_new_extra_cppflags" ; then
23684
23685 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23686 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23687
23688 fi
23689
23690 done
23691
23692 cf_add_libs="$LIBS"
23693 # reverse order
23694 cf_add_0lib=
23695 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23696 # filter duplicates
23697 for cf_add_1lib in $cf_add_0lib; do
23698 for cf_add_2lib in $cf_add_libs; do
23699 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23700 cf_add_1lib=
23701 break
23702 fi
23703 done
23704 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23705 done
23706 LIBS="$cf_add_libs"
23707
23708 # even with config script, some packages use no-override for curses.h
23709
23710 echo "$as_me:23710: checking if we have identified curses headers" >&5
23711 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
23712 if test "${cf_cv_ncurses_header+set}" = set; then
23713 echo $ECHO_N "(cached) $ECHO_C" >&6
23714 else
23715
23716 cf_cv_ncurses_header=none
23717 for cf_header in \
23718 ncurses.h $cf_cv_screen/ncurses.h \
23719 curses.h $cf_cv_screen/curses.h
23720 do
23721 cat >"conftest.$ac_ext" <<_ACEOF
23722 #line 23722 "configure"
23723 #include "confdefs.h"
23724 #include <${cf_header}>
23725 int
23726 main (void)
23727 {
23728 initscr(); endwin()
23729 ;
23730 return 0;
23731 }
23732 _ACEOF
23733 rm -f "conftest.$ac_objext"
23734 if { (eval echo "$as_me:23734: \"$ac_compile\"") >&5
23735 (eval $ac_compile) 2>&5
23736 ac_status=$?
23737 echo "$as_me:23737: \$? = $ac_status" >&5
23738 (exit "$ac_status"); } &&
23739 { ac_try='test -s "conftest.$ac_objext"'
23740 { (eval echo "$as_me:23740: \"$ac_try\"") >&5
23741 (eval $ac_try) 2>&5
23742 ac_status=$?
23743 echo "$as_me:23743: \$? = $ac_status" >&5
23744 (exit "$ac_status"); }; }; then
23745 cf_cv_ncurses_header=$cf_header; break
23746 else
23747 echo "$as_me: failed program was:" >&5
23748 cat "conftest.$ac_ext" >&5
23749 fi
23750 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23751 done
23752
23753 fi
23754 echo "$as_me:23754: result: $cf_cv_ncurses_header" >&5
23755 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
23756
23757 if test "$cf_cv_ncurses_header" = none ; then
23758 { { echo "$as_me:23758: error: No curses header-files found" >&5
23759 echo "$as_me: error: No curses header-files found" >&2;}
23760 { (exit 1); exit 1; }; }
23761 fi
23762
23763 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
23764
23765 for ac_header in $cf_cv_ncurses_header
23766 do
23767 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23768 echo "$as_me:23768: checking for $ac_header" >&5
23769 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23770 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23771 echo $ECHO_N "(cached) $ECHO_C" >&6
23772 else
23773 cat >"conftest.$ac_ext" <<_ACEOF
23774 #line 23774 "configure"
23775 #include "confdefs.h"
23776 #include <$ac_header>
23777 _ACEOF
23778 if { (eval echo "$as_me:23778: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23779 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23780 ac_status=$?
23781 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23782 rm -f conftest.er1
23783 cat conftest.err >&5
23784 echo "$as_me:23784: \$? = $ac_status" >&5
23785 (exit "$ac_status"); } >/dev/null; then
23786 if test -s conftest.err; then
23787 ac_cpp_err=$ac_c_preproc_warn_flag
23788 else
23789 ac_cpp_err=
23790 fi
23791 else
23792 ac_cpp_err=yes
23793 fi
23794 if test -z "$ac_cpp_err"; then
23795 eval "$as_ac_Header=yes"
23796 else
23797 echo "$as_me: failed program was:" >&5
23798 cat "conftest.$ac_ext" >&5
23799 eval "$as_ac_Header=no"
23800 fi
23801 rm -f conftest.err "conftest.$ac_ext"
23802 fi
23803 echo "$as_me:23803: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23804 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23805 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23806 cat >>confdefs.h <<EOF
23807 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23808 EOF
23809
23810 fi
23811 done
23812
23813 cat >>confdefs.h <<\EOF
23814 #define NCURSES 1
23815 EOF
23816
23817 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23818
23819 cat >>confdefs.h <<EOF
23820 #define $cf_nculib_ROOT 1
23821 EOF
23822
23823 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
23824
23825 else
23826
23827 cf_ncuhdr_root=$cf_cv_screen
23828
23829 test -n "$cf_cv_curses_dir" && \
23830 test "$cf_cv_curses_dir" != "no" && { \
23831
23832 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
23833 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
23834 do
23835 while test "$cf_add_incdir" != /usr/include
23836 do
23837 if test -d "$cf_add_incdir"
23838 then
23839 cf_have_incdir=no
23840 if test -n "$CFLAGS$CPPFLAGS" ; then
23841 # a loop is needed to ensure we can add subdirs of existing dirs
23842 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23843 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23844 cf_have_incdir=yes; break
23845 fi
23846 done
23847 fi
23848
23849 if test "$cf_have_incdir" = no ; then
23850 if test "$cf_add_incdir" = /usr/local/include ; then
23851 if test "$GCC" = yes
23852 then
23853 cf_save_CPPFLAGS=$CPPFLAGS
23854
23855 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23856 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23857
23858 cat >"conftest.$ac_ext" <<_ACEOF
23859 #line 23859 "configure"
23860 #include "confdefs.h"
23861 #include <stdio.h>
23862 int
23863 main (void)
23864 {
23865 printf("Hello")
23866 ;
23867 return 0;
23868 }
23869 _ACEOF
23870 rm -f "conftest.$ac_objext"
23871 if { (eval echo "$as_me:23871: \"$ac_compile\"") >&5
23872 (eval $ac_compile) 2>&5
23873 ac_status=$?
23874 echo "$as_me:23874: \$? = $ac_status" >&5
23875 (exit "$ac_status"); } &&
23876 { ac_try='test -s "conftest.$ac_objext"'
23877 { (eval echo "$as_me:23877: \"$ac_try\"") >&5
23878 (eval $ac_try) 2>&5
23879 ac_status=$?
23880 echo "$as_me:23880: \$? = $ac_status" >&5
23881 (exit "$ac_status"); }; }; then
23882 :
23883 else
23884 echo "$as_me: failed program was:" >&5
23885 cat "conftest.$ac_ext" >&5
23886 cf_have_incdir=yes
23887 fi
23888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23889 CPPFLAGS=$cf_save_CPPFLAGS
23890 fi
23891 fi
23892 fi
23893
23894 if test "$cf_have_incdir" = no ; then
23895 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
23896
23897 echo "${as_me:-configure}:23897: testing adding $cf_add_incdir to include-path ..." 1>&5
23898
23899 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23900
23901 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23902 test "$cf_top_incdir" = "$cf_add_incdir" && break
23903 cf_add_incdir="$cf_top_incdir"
23904 else
23905 break
23906 fi
23907 else
23908 break
23909 fi
23910 done
23911 done
23912 fi
23913
23914 }
23915
23916 echo "$as_me:23916: checking for $cf_ncuhdr_root header in include-path" >&5
23917 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
23918 if test "${cf_cv_ncurses_h+set}" = set; then
23919 echo $ECHO_N "(cached) $ECHO_C" >&6
23920 else
23921
23922 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
23923 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
23924 for cf_header in $cf_header_list
23925 do
23926
23927 cat >"conftest.$ac_ext" <<_ACEOF
23928 #line 23928 "configure"
23929 #include "confdefs.h"
23930
23931 #include <$cf_header>
23932 int
23933 main (void)
23934 {
23935
23936 #ifdef NCURSES_VERSION
23937
23938 printf("%s\\n", NCURSES_VERSION);
23939 #else
23940 #ifdef __NCURSES_H
23941 printf("old\\n");
23942 #else
23943 #error __NCURSES_H is not defined
23944 #endif
23945 #endif
23946
23947 ;
23948 return 0;
23949 }
23950 _ACEOF
23951 rm -f "conftest.$ac_objext"
23952 if { (eval echo "$as_me:23952: \"$ac_compile\"") >&5
23953 (eval $ac_compile) 2>&5
23954 ac_status=$?
23955 echo "$as_me:23955: \$? = $ac_status" >&5
23956 (exit "$ac_status"); } &&
23957 { ac_try='test -s "conftest.$ac_objext"'
23958 { (eval echo "$as_me:23958: \"$ac_try\"") >&5
23959 (eval $ac_try) 2>&5
23960 ac_status=$?
23961 echo "$as_me:23961: \$? = $ac_status" >&5
23962 (exit "$ac_status"); }; }; then
23963 cf_cv_ncurses_h=$cf_header
23964
23965 else
23966 echo "$as_me: failed program was:" >&5
23967 cat "conftest.$ac_ext" >&5
23968 cf_cv_ncurses_h=no
23969 fi
23970 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23971
23972 test "$cf_cv_ncurses_h" != no && break
23973 done
23974
23975 fi
23976 echo "$as_me:23976: result: $cf_cv_ncurses_h" >&5
23977 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
23978
23979 if test "$cf_cv_ncurses_h" != no ; then
23980 cf_cv_ncurses_header=$cf_cv_ncurses_h
23981 else
23982
23983 echo "$as_me:23983: checking for $cf_ncuhdr_root include-path" >&5
23984 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
23985 if test "${cf_cv_ncurses_h2+set}" = set; then
23986 echo $ECHO_N "(cached) $ECHO_C" >&6
23987 else
23988
23989 test -n "$verbose" && echo
23990
23991 cf_search=
23992
23993 # collect the current set of include-directories from compiler flags
23994 cf_header_path_list=""
23995 if test -n "${CFLAGS}${CPPFLAGS}" ; then
23996 for cf_header_path in $CPPFLAGS $CFLAGS
23997 do
23998 case "$cf_header_path" in
23999 (-I*)
24000 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
24001
24002 test "x$cf_header_path" != "xNONE" && \
24003 test -d "$cf_header_path" && \
24004 {
24005 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
24006 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
24007 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
24008 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
24009 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
24010 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"
24011 }
24012
24013 cf_header_path_list="$cf_header_path_list $cf_search"
24014 ;;
24015 esac
24016 done
24017 fi
24018
24019 # add the variations for the package we are looking for
24020
24021 cf_search=
24022
24023 test "x$prefix" != "xNONE" && \
24024 test -d "$prefix" && \
24025 {
24026 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
24027 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
24028 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
24029 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
24030 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
24031 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
24032 }
24033
24034 for cf_subdir_prefix in \
24035 /usr \
24036 /usr/local \
24037 /usr/pkg \
24038 /opt \
24039 /opt/local \
24040 $HOME
24041 do
24042
24043 test "x$cf_subdir_prefix" != "x$prefix" && \
24044 test -d "$cf_subdir_prefix" && \
24045 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24046 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
24047 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
24048 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
24049 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
24050 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
24051 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"
24052 }
24053
24054 done
24055
24056 test "$includedir" != NONE && \
24057 test "$includedir" != "/usr/include" && \
24058 test -d "$includedir" && {
24059 test -d "$includedir" && cf_search="$cf_search $includedir"
24060 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
24061 }
24062
24063 test "$oldincludedir" != NONE && \
24064 test "$oldincludedir" != "/usr/include" && \
24065 test -d "$oldincludedir" && {
24066 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
24067 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
24068 }
24069
24070 cf_search="$cf_search $cf_header_path_list"
24071
24072 test -n "$verbose" && echo "search path $cf_search"
24073 cf_save2_CPPFLAGS="$CPPFLAGS"
24074 for cf_incdir in $cf_search
24075 do
24076
24077 if test -n "$cf_incdir" ; then
24078 for cf_add_incdir in $cf_incdir
24079 do
24080 while test "$cf_add_incdir" != /usr/include
24081 do
24082 if test -d "$cf_add_incdir"
24083 then
24084 cf_have_incdir=no
24085 if test -n "$CFLAGS$CPPFLAGS" ; then
24086 # a loop is needed to ensure we can add subdirs of existing dirs
24087 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24088 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24089 cf_have_incdir=yes; break
24090 fi
24091 done
24092 fi
24093
24094 if test "$cf_have_incdir" = no ; then
24095 if test "$cf_add_incdir" = /usr/local/include ; then
24096 if test "$GCC" = yes
24097 then
24098 cf_save_CPPFLAGS=$CPPFLAGS
24099
24100 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24101 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24102
24103 cat >"conftest.$ac_ext" <<_ACEOF
24104 #line 24104 "configure"
24105 #include "confdefs.h"
24106 #include <stdio.h>
24107 int
24108 main (void)
24109 {
24110 printf("Hello")
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 :
24128 else
24129 echo "$as_me: failed program was:" >&5
24130 cat "conftest.$ac_ext" >&5
24131 cf_have_incdir=yes
24132 fi
24133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24134 CPPFLAGS=$cf_save_CPPFLAGS
24135 fi
24136 fi
24137 fi
24138
24139 if test "$cf_have_incdir" = no ; then
24140 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
24141
24142 echo "${as_me:-configure}:24142: testing adding $cf_add_incdir to include-path ..." 1>&5
24143
24144 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24145
24146 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24147 test "$cf_top_incdir" = "$cf_add_incdir" && break
24148 cf_add_incdir="$cf_top_incdir"
24149 else
24150 break
24151 fi
24152 else
24153 break
24154 fi
24155 done
24156 done
24157 fi
24158
24159 for cf_header in \
24160 ncurses.h \
24161 curses.h
24162 do
24163
24164 cat >"conftest.$ac_ext" <<_ACEOF
24165 #line 24165 "configure"
24166 #include "confdefs.h"
24167
24168 #include <$cf_header>
24169 int
24170 main (void)
24171 {
24172
24173 #ifdef NCURSES_VERSION
24174
24175 printf("%s\\n", NCURSES_VERSION);
24176 #else
24177 #ifdef __NCURSES_H
24178 printf("old\\n");
24179 #else
24180 #error __NCURSES_H is not defined
24181 #endif
24182 #endif
24183
24184 ;
24185 return 0;
24186 }
24187 _ACEOF
24188 rm -f "conftest.$ac_objext"
24189 if { (eval echo "$as_me:24189: \"$ac_compile\"") >&5
24190 (eval $ac_compile) 2>&5
24191 ac_status=$?
24192 echo "$as_me:24192: \$? = $ac_status" >&5
24193 (exit "$ac_status"); } &&
24194 { ac_try='test -s "conftest.$ac_objext"'
24195 { (eval echo "$as_me:24195: \"$ac_try\"") >&5
24196 (eval $ac_try) 2>&5
24197 ac_status=$?
24198 echo "$as_me:24198: \$? = $ac_status" >&5
24199 (exit "$ac_status"); }; }; then
24200 cf_cv_ncurses_h2=$cf_header
24201
24202 else
24203 echo "$as_me: failed program was:" >&5
24204 cat "conftest.$ac_ext" >&5
24205 cf_cv_ncurses_h2=no
24206 fi
24207 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24208
24209 if test "$cf_cv_ncurses_h2" != no ; then
24210 cf_cv_ncurses_h2=$cf_incdir/$cf_header
24211 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
24212 break
24213 fi
24214 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
24215 done
24216 CPPFLAGS="$cf_save2_CPPFLAGS"
24217 test "$cf_cv_ncurses_h2" != no && break
24218 done
24219 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:24219: error: not found" >&5
24220 echo "$as_me: error: not found" >&2;}
24221 { (exit 1); exit 1; }; }
24222
24223 fi
24224 echo "$as_me:24224: result: $cf_cv_ncurses_h2" >&5
24225 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
24226
24227 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
24228 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
24229 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
24230 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
24231 fi
24232
24233 if test -n "$cf_1st_incdir" ; then
24234 for cf_add_incdir in $cf_1st_incdir
24235 do
24236 while test "$cf_add_incdir" != /usr/include
24237 do
24238 if test -d "$cf_add_incdir"
24239 then
24240 cf_have_incdir=no
24241 if test -n "$CFLAGS$CPPFLAGS" ; then
24242 # a loop is needed to ensure we can add subdirs of existing dirs
24243 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24244 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24245 cf_have_incdir=yes; break
24246 fi
24247 done
24248 fi
24249
24250 if test "$cf_have_incdir" = no ; then
24251 if test "$cf_add_incdir" = /usr/local/include ; then
24252 if test "$GCC" = yes
24253 then
24254 cf_save_CPPFLAGS=$CPPFLAGS
24255
24256 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24257 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24258
24259 cat >"conftest.$ac_ext" <<_ACEOF
24260 #line 24260 "configure"
24261 #include "confdefs.h"
24262 #include <stdio.h>
24263 int
24264 main (void)
24265 {
24266 printf("Hello")
24267 ;
24268 return 0;
24269 }
24270 _ACEOF
24271 rm -f "conftest.$ac_objext"
24272 if { (eval echo "$as_me:24272: \"$ac_compile\"") >&5
24273 (eval $ac_compile) 2>&5
24274 ac_status=$?
24275 echo "$as_me:24275: \$? = $ac_status" >&5
24276 (exit "$ac_status"); } &&
24277 { ac_try='test -s "conftest.$ac_objext"'
24278 { (eval echo "$as_me:24278: \"$ac_try\"") >&5
24279 (eval $ac_try) 2>&5
24280 ac_status=$?
24281 echo "$as_me:24281: \$? = $ac_status" >&5
24282 (exit "$ac_status"); }; }; then
24283 :
24284 else
24285 echo "$as_me: failed program was:" >&5
24286 cat "conftest.$ac_ext" >&5
24287 cf_have_incdir=yes
24288 fi
24289 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24290 CPPFLAGS=$cf_save_CPPFLAGS
24291 fi
24292 fi
24293 fi
24294
24295 if test "$cf_have_incdir" = no ; then
24296 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
24297
24298 echo "${as_me:-configure}:24298: testing adding $cf_add_incdir to include-path ..." 1>&5
24299
24300 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24301
24302 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24303 test "$cf_top_incdir" = "$cf_add_incdir" && break
24304 cf_add_incdir="$cf_top_incdir"
24305 else
24306 break
24307 fi
24308 else
24309 break
24310 fi
24311 done
24312 done
24313 fi
24314
24315 fi
24316
24317 # Set definitions to allow ifdef'ing for ncurses.h
24318
24319 case "$cf_cv_ncurses_header" in
24320 (*ncurses.h)
24321
24322 cat >>confdefs.h <<\EOF
24323 #define HAVE_NCURSES_H 1
24324 EOF
24325
24326 ;;
24327 esac
24328
24329 case "$cf_cv_ncurses_header" in
24330 (ncurses/curses.h|ncurses/ncurses.h)
24331
24332 cat >>confdefs.h <<\EOF
24333 #define HAVE_NCURSES_NCURSES_H 1
24334 EOF
24335
24336 ;;
24337 (ncursesw/curses.h|ncursesw/ncurses.h)
24338
24339 cat >>confdefs.h <<\EOF
24340 #define HAVE_NCURSESW_NCURSES_H 1
24341 EOF
24342
24343 ;;
24344 esac
24345
24346 echo "$as_me:24346: checking for terminfo header" >&5
24347 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
24348 if test "${cf_cv_term_header+set}" = set; then
24349 echo $ECHO_N "(cached) $ECHO_C" >&6
24350 else
24351
24352 case "${cf_cv_ncurses_header}" in
24353 (*/ncurses.h|*/ncursesw.h)
24354 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
24355 ;;
24356 (*)
24357 cf_term_header=term.h
24358 ;;
24359 esac
24360
24361 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
24362 do
24363 cat >"conftest.$ac_ext" <<_ACEOF
24364 #line 24364 "configure"
24365 #include "confdefs.h"
24366 #include <stdio.h>
24367 #include <${cf_cv_ncurses_header:-curses.h}>
24368 #include <$cf_test>
24369
24370 int
24371 main (void)
24372 {
24373 int x = auto_left_margin; (void)x
24374 ;
24375 return 0;
24376 }
24377 _ACEOF
24378 rm -f "conftest.$ac_objext"
24379 if { (eval echo "$as_me:24379: \"$ac_compile\"") >&5
24380 (eval $ac_compile) 2>&5
24381 ac_status=$?
24382 echo "$as_me:24382: \$? = $ac_status" >&5
24383 (exit "$ac_status"); } &&
24384 { ac_try='test -s "conftest.$ac_objext"'
24385 { (eval echo "$as_me:24385: \"$ac_try\"") >&5
24386 (eval $ac_try) 2>&5
24387 ac_status=$?
24388 echo "$as_me:24388: \$? = $ac_status" >&5
24389 (exit "$ac_status"); }; }; then
24390
24391 cf_cv_term_header="$cf_test"
24392 else
24393 echo "$as_me: failed program was:" >&5
24394 cat "conftest.$ac_ext" >&5
24395
24396 cf_cv_term_header=unknown
24397
24398 fi
24399 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24400 test "$cf_cv_term_header" != unknown && break
24401 done
24402
24403 fi
24404 echo "$as_me:24404: result: $cf_cv_term_header" >&5
24405 echo "${ECHO_T}$cf_cv_term_header" >&6
24406
24407 # Set definitions to allow ifdef'ing to accommodate subdirectories
24408
24409 case "$cf_cv_term_header" in
24410 (*term.h)
24411
24412 cat >>confdefs.h <<\EOF
24413 #define HAVE_TERM_H 1
24414 EOF
24415
24416 ;;
24417 esac
24418
24419 case "$cf_cv_term_header" in
24420 (ncurses/term.h)
24421
24422 cat >>confdefs.h <<\EOF
24423 #define HAVE_NCURSES_TERM_H 1
24424 EOF
24425
24426 ;;
24427 (ncursesw/term.h)
24428
24429 cat >>confdefs.h <<\EOF
24430 #define HAVE_NCURSESW_TERM_H 1
24431 EOF
24432
24433 ;;
24434 esac
24435
24436 # some applications need this, but should check for NCURSES_VERSION
24437
24438 cat >>confdefs.h <<\EOF
24439 #define NCURSES 1
24440 EOF
24441
24442 echo "$as_me:24442: checking for ncurses version" >&5
24443 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
24444 if test "${cf_cv_ncurses_version+set}" = set; then
24445 echo $ECHO_N "(cached) $ECHO_C" >&6
24446 else
24447
24448 cf_cv_ncurses_version=no
24449 cf_tempfile=out$$
24450 rm -f "$cf_tempfile"
24451 if test "$cross_compiling" = yes; then
24452
24453 # This will not work if the preprocessor splits the line after the
24454 # Autoconf token. The 'unproto' program does that.
24455 cat > "conftest.$ac_ext" <<EOF
24456 #include <${cf_cv_ncurses_header:-curses.h}>
24457 #undef Autoconf
24458 #ifdef NCURSES_VERSION
24459 Autoconf NCURSES_VERSION
24460 #else
24461 #ifdef __NCURSES_H
24462 Autoconf "old"
24463 #endif
24464 ;
24465 #endif
24466 EOF
24467 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
24468 { (eval echo "$as_me:24468: \"$cf_try\"") >&5
24469 (eval $cf_try) 2>&5
24470 ac_status=$?
24471 echo "$as_me:24471: \$? = $ac_status" >&5
24472 (exit "$ac_status"); }
24473 if test -f conftest.out ; then
24474 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
24475 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
24476 rm -f conftest.out
24477 fi
24478
24479 else
24480 cat >"conftest.$ac_ext" <<_ACEOF
24481 #line 24481 "configure"
24482 #include "confdefs.h"
24483
24484 $ac_includes_default
24485
24486 #include <${cf_cv_ncurses_header:-curses.h}>
24487
24488 int main(void)
24489 {
24490 FILE *fp = fopen("$cf_tempfile", "w");
24491 #ifdef NCURSES_VERSION
24492 # ifdef NCURSES_VERSION_PATCH
24493 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
24494 # else
24495 fprintf(fp, "%s\\n", NCURSES_VERSION);
24496 # endif
24497 #else
24498 # ifdef __NCURSES_H
24499 fprintf(fp, "old\\n");
24500 # else
24501 #error expected ncurses header to define __NCURSES_H
24502 # endif
24503 #endif
24504 ${cf_cv_main_return:-return}(0);
24505 }
24506 _ACEOF
24507 rm -f "conftest$ac_exeext"
24508 if { (eval echo "$as_me:24508: \"$ac_link\"") >&5
24509 (eval $ac_link) 2>&5
24510 ac_status=$?
24511 echo "$as_me:24511: \$? = $ac_status" >&5
24512 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24513 { (eval echo "$as_me:24513: \"$ac_try\"") >&5
24514 (eval $ac_try) 2>&5
24515 ac_status=$?
24516 echo "$as_me:24516: \$? = $ac_status" >&5
24517 (exit "$ac_status"); }; }; then
24518
24519 cf_cv_ncurses_version=`cat $cf_tempfile`
24520 else
24521 echo "$as_me: program exited with status $ac_status" >&5
24522 echo "$as_me: failed program was:" >&5
24523 cat "conftest.$ac_ext" >&5
24524 fi
24525 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24526 fi
24527 rm -f "$cf_tempfile"
24528
24529 fi
24530 echo "$as_me:24530: result: $cf_cv_ncurses_version" >&5
24531 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
24532 test "$cf_cv_ncurses_version" = no ||
24533 cat >>confdefs.h <<\EOF
24534 #define NCURSES 1
24535 EOF
24536
24537 cf_nculib_root=$cf_cv_screen
24538 # This works, except for the special case where we find gpm, but
24539 # ncurses is in a nonstandard location via $LIBS, and we really want
24540 # to link gpm.
24541 cf_ncurses_LIBS=""
24542 cf_ncurses_SAVE="$LIBS"
24543 echo "$as_me:24543: checking for Gpm_Open in -lgpm" >&5
24544 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
24545 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
24546 echo $ECHO_N "(cached) $ECHO_C" >&6
24547 else
24548 ac_check_lib_save_LIBS=$LIBS
24549 LIBS="-lgpm $LIBS"
24550 cat >"conftest.$ac_ext" <<_ACEOF
24551 #line 24551 "configure"
24552 #include "confdefs.h"
24553
24554 /* Override any gcc2 internal prototype to avoid an error. */
24555 #ifdef __cplusplus
24556 extern "C"
24557 #endif
24558 /* We use char because int might match the return type of a gcc2
24559 builtin and then its argument prototype would still apply. */
24560 char Gpm_Open (void);
24561 int
24562 main (void)
24563 {
24564 Gpm_Open ();
24565 ;
24566 return 0;
24567 }
24568 _ACEOF
24569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24570 if { (eval echo "$as_me:24570: \"$ac_link\"") >&5
24571 (eval $ac_link) 2>&5
24572 ac_status=$?
24573 echo "$as_me:24573: \$? = $ac_status" >&5
24574 (exit "$ac_status"); } &&
24575 { ac_try='test -s "conftest$ac_exeext"'
24576 { (eval echo "$as_me:24576: \"$ac_try\"") >&5
24577 (eval $ac_try) 2>&5
24578 ac_status=$?
24579 echo "$as_me:24579: \$? = $ac_status" >&5
24580 (exit "$ac_status"); }; }; then
24581 ac_cv_lib_gpm_Gpm_Open=yes
24582 else
24583 echo "$as_me: failed program was:" >&5
24584 cat "conftest.$ac_ext" >&5
24585 ac_cv_lib_gpm_Gpm_Open=no
24586 fi
24587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24588 LIBS=$ac_check_lib_save_LIBS
24589 fi
24590 echo "$as_me:24590: result: $ac_cv_lib_gpm_Gpm_Open" >&5
24591 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
24592 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
24593 echo "$as_me:24593: checking for initscr in -lgpm" >&5
24594 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
24595 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
24596 echo $ECHO_N "(cached) $ECHO_C" >&6
24597 else
24598 ac_check_lib_save_LIBS=$LIBS
24599 LIBS="-lgpm $LIBS"
24600 cat >"conftest.$ac_ext" <<_ACEOF
24601 #line 24601 "configure"
24602 #include "confdefs.h"
24603
24604 /* Override any gcc2 internal prototype to avoid an error. */
24605 #ifdef __cplusplus
24606 extern "C"
24607 #endif
24608 /* We use char because int might match the return type of a gcc2
24609 builtin and then its argument prototype would still apply. */
24610 char initscr (void);
24611 int
24612 main (void)
24613 {
24614 initscr ();
24615 ;
24616 return 0;
24617 }
24618 _ACEOF
24619 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24620 if { (eval echo "$as_me:24620: \"$ac_link\"") >&5
24621 (eval $ac_link) 2>&5
24622 ac_status=$?
24623 echo "$as_me:24623: \$? = $ac_status" >&5
24624 (exit "$ac_status"); } &&
24625 { ac_try='test -s "conftest$ac_exeext"'
24626 { (eval echo "$as_me:24626: \"$ac_try\"") >&5
24627 (eval $ac_try) 2>&5
24628 ac_status=$?
24629 echo "$as_me:24629: \$? = $ac_status" >&5
24630 (exit "$ac_status"); }; }; then
24631 ac_cv_lib_gpm_initscr=yes
24632 else
24633 echo "$as_me: failed program was:" >&5
24634 cat "conftest.$ac_ext" >&5
24635 ac_cv_lib_gpm_initscr=no
24636 fi
24637 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24638 LIBS=$ac_check_lib_save_LIBS
24639 fi
24640 echo "$as_me:24640: result: $ac_cv_lib_gpm_initscr" >&5
24641 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
24642 if test "$ac_cv_lib_gpm_initscr" = yes; then
24643 LIBS="$cf_ncurses_SAVE"
24644 else
24645 cf_ncurses_LIBS="-lgpm"
24646 fi
24647
24648 fi
24649
24650 case "$host_os" in
24651 (freebsd*)
24652 # This is only necessary if you are linking against an obsolete
24653 # version of ncurses (but it should do no harm, since it is static).
24654 if test "$cf_nculib_root" = ncurses ; then
24655 echo "$as_me:24655: checking for tgoto in -lmytinfo" >&5
24656 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
24657 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
24658 echo $ECHO_N "(cached) $ECHO_C" >&6
24659 else
24660 ac_check_lib_save_LIBS=$LIBS
24661 LIBS="-lmytinfo $LIBS"
24662 cat >"conftest.$ac_ext" <<_ACEOF
24663 #line 24663 "configure"
24664 #include "confdefs.h"
24665
24666 /* Override any gcc2 internal prototype to avoid an error. */
24667 #ifdef __cplusplus
24668 extern "C"
24669 #endif
24670 /* We use char because int might match the return type of a gcc2
24671 builtin and then its argument prototype would still apply. */
24672 char tgoto (void);
24673 int
24674 main (void)
24675 {
24676 tgoto ();
24677 ;
24678 return 0;
24679 }
24680 _ACEOF
24681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24682 if { (eval echo "$as_me:24682: \"$ac_link\"") >&5
24683 (eval $ac_link) 2>&5
24684 ac_status=$?
24685 echo "$as_me:24685: \$? = $ac_status" >&5
24686 (exit "$ac_status"); } &&
24687 { ac_try='test -s "conftest$ac_exeext"'
24688 { (eval echo "$as_me:24688: \"$ac_try\"") >&5
24689 (eval $ac_try) 2>&5
24690 ac_status=$?
24691 echo "$as_me:24691: \$? = $ac_status" >&5
24692 (exit "$ac_status"); }; }; then
24693 ac_cv_lib_mytinfo_tgoto=yes
24694 else
24695 echo "$as_me: failed program was:" >&5
24696 cat "conftest.$ac_ext" >&5
24697 ac_cv_lib_mytinfo_tgoto=no
24698 fi
24699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24700 LIBS=$ac_check_lib_save_LIBS
24701 fi
24702 echo "$as_me:24702: result: $ac_cv_lib_mytinfo_tgoto" >&5
24703 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
24704 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
24705 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
24706 fi
24707
24708 fi
24709 ;;
24710 esac
24711
24712 cf_add_libs="$LIBS"
24713 # reverse order
24714 cf_add_0lib=
24715 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24716 # filter duplicates
24717 for cf_add_1lib in $cf_add_0lib; do
24718 for cf_add_2lib in $cf_add_libs; do
24719 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24720 cf_add_1lib=
24721 break
24722 fi
24723 done
24724 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24725 done
24726 LIBS="$cf_add_libs"
24727
24728 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
24729 then
24730
24731 cf_add_libs="$LIBS"
24732 # reverse order
24733 cf_add_0lib=
24734 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24735 # filter duplicates
24736 for cf_add_1lib in $cf_add_0lib; do
24737 for cf_add_2lib in $cf_add_libs; do
24738 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24739 cf_add_1lib=
24740 break
24741 fi
24742 done
24743 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24744 done
24745 LIBS="$cf_add_libs"
24746
24747 else
24748
24749 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
24750 cf_libdir=""
24751 echo "$as_me:24751: checking for initscr" >&5
24752 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
24753 if test "${ac_cv_func_initscr+set}" = set; then
24754 echo $ECHO_N "(cached) $ECHO_C" >&6
24755 else
24756 cat >"conftest.$ac_ext" <<_ACEOF
24757 #line 24757 "configure"
24758 #include "confdefs.h"
24759 #define initscr autoconf_temporary
24760 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
24761 #undef initscr
24762
24763 #ifdef __cplusplus
24764 extern "C"
24765 #endif
24766
24767 /* We use char because int might match the return type of a gcc2
24768 builtin and then its argument prototype would still apply. */
24769 char initscr (void);
24770
24771 int
24772 main (void)
24773 {
24774
24775 /* The GNU C library defines stubs for functions which it implements
24776 to always fail with ENOSYS. Some functions are actually named
24777 something starting with __ and the normal name is an alias. */
24778 #if defined (__stub_initscr) || defined (__stub___initscr)
24779 #error found stub for initscr
24780 #endif
24781
24782 return initscr ();
24783 ;
24784 return 0;
24785 }
24786 _ACEOF
24787 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24788 if { (eval echo "$as_me:24788: \"$ac_link\"") >&5
24789 (eval $ac_link) 2>&5
24790 ac_status=$?
24791 echo "$as_me:24791: \$? = $ac_status" >&5
24792 (exit "$ac_status"); } &&
24793 { ac_try='test -s "conftest$ac_exeext"'
24794 { (eval echo "$as_me:24794: \"$ac_try\"") >&5
24795 (eval $ac_try) 2>&5
24796 ac_status=$?
24797 echo "$as_me:24797: \$? = $ac_status" >&5
24798 (exit "$ac_status"); }; }; then
24799 ac_cv_func_initscr=yes
24800 else
24801 echo "$as_me: failed program was:" >&5
24802 cat "conftest.$ac_ext" >&5
24803 ac_cv_func_initscr=no
24804 fi
24805 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24806 fi
24807 echo "$as_me:24807: result: $ac_cv_func_initscr" >&5
24808 echo "${ECHO_T}$ac_cv_func_initscr" >&6
24809 if test "$ac_cv_func_initscr" = yes; then
24810 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
24811 else
24812
24813 cf_save_LIBS="$LIBS"
24814 echo "$as_me:24814: checking for initscr in -l$cf_nculib_root" >&5
24815 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
24816 LIBS="-l$cf_nculib_root $LIBS"
24817 cat >"conftest.$ac_ext" <<_ACEOF
24818 #line 24818 "configure"
24819 #include "confdefs.h"
24820 #include <${cf_cv_ncurses_header:-curses.h}>
24821 int
24822 main (void)
24823 {
24824 initscr()
24825 ;
24826 return 0;
24827 }
24828 _ACEOF
24829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24830 if { (eval echo "$as_me:24830: \"$ac_link\"") >&5
24831 (eval $ac_link) 2>&5
24832 ac_status=$?
24833 echo "$as_me:24833: \$? = $ac_status" >&5
24834 (exit "$ac_status"); } &&
24835 { ac_try='test -s "conftest$ac_exeext"'
24836 { (eval echo "$as_me:24836: \"$ac_try\"") >&5
24837 (eval $ac_try) 2>&5
24838 ac_status=$?
24839 echo "$as_me:24839: \$? = $ac_status" >&5
24840 (exit "$ac_status"); }; }; then
24841 echo "$as_me:24841: result: yes" >&5
24842 echo "${ECHO_T}yes" >&6
24843 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
24844
24845 else
24846 echo "$as_me: failed program was:" >&5
24847 cat "conftest.$ac_ext" >&5
24848 echo "$as_me:24848: result: no" >&5
24849 echo "${ECHO_T}no" >&6
24850
24851 cf_search=
24852 cf_library_path_list=""
24853 if test -n "${LDFLAGS}${LIBS}" ; then
24854 for cf_library_path in $LDFLAGS $LIBS
24855 do
24856 case "$cf_library_path" in
24857 (-L*)
24858 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
24859
24860 test "x$cf_library_path" != "xNONE" && \
24861 test -d "$cf_library_path" && \
24862 {
24863 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
24864 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
24865 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
24866 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
24867 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
24868 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"
24869 }
24870
24871 cf_library_path_list="$cf_library_path_list $cf_search"
24872 ;;
24873 esac
24874 done
24875 fi
24876
24877 cf_search=
24878
24879 test "x$prefix" != "xNONE" && \
24880 test -d "$prefix" && \
24881 {
24882 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
24883 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
24884 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
24885 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
24886 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
24887 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
24888 }
24889
24890 for cf_subdir_prefix in \
24891 /usr \
24892 /usr/local \
24893 /usr/pkg \
24894 /opt \
24895 /opt/local \
24896 $HOME
24897 do
24898
24899 test "x$cf_subdir_prefix" != "x$prefix" && \
24900 test -d "$cf_subdir_prefix" && \
24901 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24902 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
24903 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
24904 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
24905 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
24906 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
24907 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"
24908 }
24909
24910 done
24911
24912 cf_search="$cf_library_path_list $cf_search"
24913
24914 for cf_libdir in $cf_search
24915 do
24916 echo "$as_me:24916: checking for -l$cf_nculib_root in $cf_libdir" >&5
24917 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
24918 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
24919 cat >"conftest.$ac_ext" <<_ACEOF
24920 #line 24920 "configure"
24921 #include "confdefs.h"
24922 #include <${cf_cv_ncurses_header:-curses.h}>
24923 int
24924 main (void)
24925 {
24926 initscr()
24927 ;
24928 return 0;
24929 }
24930 _ACEOF
24931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24932 if { (eval echo "$as_me:24932: \"$ac_link\"") >&5
24933 (eval $ac_link) 2>&5
24934 ac_status=$?
24935 echo "$as_me:24935: \$? = $ac_status" >&5
24936 (exit "$ac_status"); } &&
24937 { ac_try='test -s "conftest$ac_exeext"'
24938 { (eval echo "$as_me:24938: \"$ac_try\"") >&5
24939 (eval $ac_try) 2>&5
24940 ac_status=$?
24941 echo "$as_me:24941: \$? = $ac_status" >&5
24942 (exit "$ac_status"); }; }; then
24943 echo "$as_me:24943: result: yes" >&5
24944 echo "${ECHO_T}yes" >&6
24945 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
24946 break
24947 else
24948 echo "$as_me: failed program was:" >&5
24949 cat "conftest.$ac_ext" >&5
24950 echo "$as_me:24950: result: no" >&5
24951 echo "${ECHO_T}no" >&6
24952 LIBS="$cf_save_LIBS"
24953 fi
24954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24955 done
24956
24957 fi
24958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24959
24960 fi
24961
24962 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
24963
24964 if test "$cf_found_library" = no ; then
24965 { { echo "$as_me:24965: error: Cannot link $cf_nculib_root library" >&5
24966 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
24967 { (exit 1); exit 1; }; }
24968 fi
24969
24970 fi
24971
24972 if test -n "$cf_ncurses_LIBS" ; then
24973 echo "$as_me:24973: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
24974 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
24975 cf_ncurses_SAVE="$LIBS"
24976 for p in $cf_ncurses_LIBS ; do
24977 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
24978 if test "$q" != "$LIBS" ; then
24979 LIBS="$q"
24980 fi
24981 done
24982 cat >"conftest.$ac_ext" <<_ACEOF
24983 #line 24983 "configure"
24984 #include "confdefs.h"
24985 #include <${cf_cv_ncurses_header:-curses.h}>
24986 int
24987 main (void)
24988 {
24989 initscr(); mousemask(0,(void*)0); tigetstr((char *)0);
24990 ;
24991 return 0;
24992 }
24993 _ACEOF
24994 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24995 if { (eval echo "$as_me:24995: \"$ac_link\"") >&5
24996 (eval $ac_link) 2>&5
24997 ac_status=$?
24998 echo "$as_me:24998: \$? = $ac_status" >&5
24999 (exit "$ac_status"); } &&
25000 { ac_try='test -s "conftest$ac_exeext"'
25001 { (eval echo "$as_me:25001: \"$ac_try\"") >&5
25002 (eval $ac_try) 2>&5
25003 ac_status=$?
25004 echo "$as_me:25004: \$? = $ac_status" >&5
25005 (exit "$ac_status"); }; }; then
25006 echo "$as_me:25006: result: yes" >&5
25007 echo "${ECHO_T}yes" >&6
25008 else
25009 echo "$as_me: failed program was:" >&5
25010 cat "conftest.$ac_ext" >&5
25011 echo "$as_me:25011: result: no" >&5
25012 echo "${ECHO_T}no" >&6
25013 LIBS="$cf_ncurses_SAVE"
25014 fi
25015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25016 fi
25017
25018 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25019
25020 cat >>confdefs.h <<EOF
25021 #define $cf_nculib_ROOT 1
25022 EOF
25023
25024 fi
25025 else
25026 NCURSES_CONFIG=none
25027 fi
25028
25029 ;;
25030 (pdcurses)
25031 case "$host_os" in
25032 (mingw*)
25033 cf_cv_ncurses_header=curses.h
25034 ;;
25035 (*)
25036 cf_cv_ncurses_header=xcurses.h
25037 # do this last, since it changes definition of main: CF_PDCURSES_X11
25038 ;;
25039 esac
25040 ;;
25041 (slang)
25042
25043 echo "$as_me:25043: checking for slang header file" >&5
25044 echo $ECHO_N "checking for slang header file... $ECHO_C" >&6
25045 if test "${cf_cv_slang_header+set}" = set; then
25046 echo $ECHO_N "(cached) $ECHO_C" >&6
25047 else
25048
25049 cf_cv_slang_header=no
25050 cat >"conftest.$ac_ext" <<_ACEOF
25051 #line 25051 "configure"
25052 #include "confdefs.h"
25053 #include <slang.h>
25054 int
25055 main (void)
25056 {
25057 printf("%s\\n", SLANG_VERSION_STRING)
25058 ;
25059 return 0;
25060 }
25061 _ACEOF
25062 rm -f "conftest.$ac_objext"
25063 if { (eval echo "$as_me:25063: \"$ac_compile\"") >&5
25064 (eval $ac_compile) 2>&5
25065 ac_status=$?
25066 echo "$as_me:25066: \$? = $ac_status" >&5
25067 (exit "$ac_status"); } &&
25068 { ac_try='test -s "conftest.$ac_objext"'
25069 { (eval echo "$as_me:25069: \"$ac_try\"") >&5
25070 (eval $ac_try) 2>&5
25071 ac_status=$?
25072 echo "$as_me:25072: \$? = $ac_status" >&5
25073 (exit "$ac_status"); }; }; then
25074 cf_cv_slang_header=predefined
25075 else
25076 echo "$as_me: failed program was:" >&5
25077 cat "conftest.$ac_ext" >&5
25078
25079 cf_search=
25080
25081 # collect the current set of include-directories from compiler flags
25082 cf_header_path_list=""
25083 if test -n "${CFLAGS}${CPPFLAGS}" ; then
25084 for cf_header_path in $CPPFLAGS $CFLAGS
25085 do
25086 case "$cf_header_path" in
25087 (-I*)
25088 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
25089
25090 test "x$cf_header_path" != "xNONE" && \
25091 test -d "$cf_header_path" && \
25092 {
25093 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
25094 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
25095 test -d "$cf_header_path/include/slang" && cf_search="$cf_search $cf_header_path/include/slang"
25096 test -d "$cf_header_path/include/slang/include" && cf_search="$cf_search $cf_header_path/include/slang/include"
25097 test -d "$cf_header_path/slang/include" && cf_search="$cf_search $cf_header_path/slang/include"
25098 test -d "$cf_header_path/slang/include/slang" && cf_search="$cf_search $cf_header_path/slang/include/slang"
25099 }
25100
25101 cf_header_path_list="$cf_header_path_list $cf_search"
25102 ;;
25103 esac
25104 done
25105 fi
25106
25107 # add the variations for the package we are looking for
25108
25109 cf_search=
25110
25111 test "x$prefix" != "xNONE" && \
25112 test -d "$prefix" && \
25113 {
25114 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
25115 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
25116 test -d "$prefix/include/slang" && cf_search="$cf_search $prefix/include/slang"
25117 test -d "$prefix/include/slang/include" && cf_search="$cf_search $prefix/include/slang/include"
25118 test -d "$prefix/slang/include" && cf_search="$cf_search $prefix/slang/include"
25119 test -d "$prefix/slang/include/slang" && cf_search="$cf_search $prefix/slang/include/slang"
25120 }
25121
25122 for cf_subdir_prefix in \
25123 /usr \
25124 /usr/local \
25125 /usr/pkg \
25126 /opt \
25127 /opt/local \
25128 $HOME
25129 do
25130
25131 test "x$cf_subdir_prefix" != "x$prefix" && \
25132 test -d "$cf_subdir_prefix" && \
25133 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25134 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
25135 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
25136 test -d "$cf_subdir_prefix/include/slang" && cf_search="$cf_search $cf_subdir_prefix/include/slang"
25137 test -d "$cf_subdir_prefix/include/slang/include" && cf_search="$cf_search $cf_subdir_prefix/include/slang/include"
25138 test -d "$cf_subdir_prefix/slang/include" && cf_search="$cf_search $cf_subdir_prefix/slang/include"
25139 test -d "$cf_subdir_prefix/slang/include/slang" && cf_search="$cf_search $cf_subdir_prefix/slang/include/slang"
25140 }
25141
25142 done
25143
25144 test "$includedir" != NONE && \
25145 test "$includedir" != "/usr/include" && \
25146 test -d "$includedir" && {
25147 test -d "$includedir" && cf_search="$cf_search $includedir"
25148 test -d "$includedir/slang" && cf_search="$cf_search $includedir/slang"
25149 }
25150
25151 test "$oldincludedir" != NONE && \
25152 test "$oldincludedir" != "/usr/include" && \
25153 test -d "$oldincludedir" && {
25154 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
25155 test -d "$oldincludedir/slang" && cf_search="$cf_search $oldincludedir/slang"
25156 }
25157
25158 cf_search="$cf_search $cf_header_path_list"
25159
25160 for cf_incdir in $cf_search
25161 do
25162 for cf_header in \
25163 slang.h
25164 do
25165 echo trying "$cf_incdir/$cf_header" 1>&5
25166 if ${EGREP-egrep} "SLANG_VERSION" "$cf_incdir/$cf_header" 1>&5 2>&1; then
25167 cf_cv_slang_header=$cf_incdir/$cf_header
25168 break
25169 fi
25170 done
25171 test "$cf_cv_slang_header" != no && break
25172 done
25173
25174 fi
25175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25176 fi
25177 echo "$as_me:25177: result: $cf_cv_slang_header" >&5
25178 echo "${ECHO_T}$cf_cv_slang_header" >&6
25179
25180 if test "x$cf_cv_slang_header" != xno
25181 then
25182
25183 cat >>confdefs.h <<\EOF
25184 #define USE_SLANG 1
25185 EOF
25186
25187 cf_incdir=`echo "$cf_cv_slang_header" | sed -e 's%/[^/]*$%%'`
25188
25189 case "$cf_cv_slang_header" in
25190 (predefined)
25191 ;;
25192 (*)
25193
25194 if test -n "$cf_incdir" ; then
25195 for cf_add_incdir in $cf_incdir
25196 do
25197 while test "$cf_add_incdir" != /usr/include
25198 do
25199 if test -d "$cf_add_incdir"
25200 then
25201 cf_have_incdir=no
25202 if test -n "$CFLAGS$CPPFLAGS" ; then
25203 # a loop is needed to ensure we can add subdirs of existing dirs
25204 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
25205 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
25206 cf_have_incdir=yes; break
25207 fi
25208 done
25209 fi
25210
25211 if test "$cf_have_incdir" = no ; then
25212 if test "$cf_add_incdir" = /usr/local/include ; then
25213 if test "$GCC" = yes
25214 then
25215 cf_save_CPPFLAGS=$CPPFLAGS
25216
25217 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25218 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
25219
25220 cat >"conftest.$ac_ext" <<_ACEOF
25221 #line 25221 "configure"
25222 #include "confdefs.h"
25223 #include <stdio.h>
25224 int
25225 main (void)
25226 {
25227 printf("Hello")
25228 ;
25229 return 0;
25230 }
25231 _ACEOF
25232 rm -f "conftest.$ac_objext"
25233 if { (eval echo "$as_me:25233: \"$ac_compile\"") >&5
25234 (eval $ac_compile) 2>&5
25235 ac_status=$?
25236 echo "$as_me:25236: \$? = $ac_status" >&5
25237 (exit "$ac_status"); } &&
25238 { ac_try='test -s "conftest.$ac_objext"'
25239 { (eval echo "$as_me:25239: \"$ac_try\"") >&5
25240 (eval $ac_try) 2>&5
25241 ac_status=$?
25242 echo "$as_me:25242: \$? = $ac_status" >&5
25243 (exit "$ac_status"); }; }; then
25244 :
25245 else
25246 echo "$as_me: failed program was:" >&5
25247 cat "conftest.$ac_ext" >&5
25248 cf_have_incdir=yes
25249 fi
25250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25251 CPPFLAGS=$cf_save_CPPFLAGS
25252 fi
25253 fi
25254 fi
25255
25256 if test "$cf_have_incdir" = no ; then
25257 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
25258
25259 echo "${as_me:-configure}:25259: testing adding $cf_add_incdir to include-path ..." 1>&5
25260
25261 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
25262
25263 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
25264 test "$cf_top_incdir" = "$cf_add_incdir" && break
25265 cf_add_incdir="$cf_top_incdir"
25266 else
25267 break
25268 fi
25269 else
25270 break
25271 fi
25272 done
25273 done
25274 fi
25275
25276 ;;
25277 esac
25278 fi
25279
25280 if test "x$cf_cv_slang_header" != xno
25281 then
25282
25283 cf_slang_LIBS1="$LIBS"
25284
25285 if test "${cf_cv_termlib+set}" = set; then
25286 echo $ECHO_N "(cached) $ECHO_C" >&6
25287 else
25288
25289 cf_cv_termlib=none
25290 cat >"conftest.$ac_ext" <<_ACEOF
25291 #line 25291 "configure"
25292 #include "confdefs.h"
25293 extern char *tgoto(const char*,int,int);
25294 int
25295 main (void)
25296 {
25297 char *x=tgoto("",0,0); (void)x;
25298 ;
25299 return 0;
25300 }
25301 _ACEOF
25302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25303 if { (eval echo "$as_me:25303: \"$ac_link\"") >&5
25304 (eval $ac_link) 2>&5
25305 ac_status=$?
25306 echo "$as_me:25306: \$? = $ac_status" >&5
25307 (exit "$ac_status"); } &&
25308 { ac_try='test -s "conftest$ac_exeext"'
25309 { (eval echo "$as_me:25309: \"$ac_try\"") >&5
25310 (eval $ac_try) 2>&5
25311 ac_status=$?
25312 echo "$as_me:25312: \$? = $ac_status" >&5
25313 (exit "$ac_status"); }; }; then
25314 cat >"conftest.$ac_ext" <<_ACEOF
25315 #line 25315 "configure"
25316 #include "confdefs.h"
25317 extern char *tigetstr(const char *);
25318 int
25319 main (void)
25320 {
25321 char *x=tigetstr(""); (void)x;
25322 ;
25323 return 0;
25324 }
25325 _ACEOF
25326 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25327 if { (eval echo "$as_me:25327: \"$ac_link\"") >&5
25328 (eval $ac_link) 2>&5
25329 ac_status=$?
25330 echo "$as_me:25330: \$? = $ac_status" >&5
25331 (exit "$ac_status"); } &&
25332 { ac_try='test -s "conftest$ac_exeext"'
25333 { (eval echo "$as_me:25333: \"$ac_try\"") >&5
25334 (eval $ac_try) 2>&5
25335 ac_status=$?
25336 echo "$as_me:25336: \$? = $ac_status" >&5
25337 (exit "$ac_status"); }; }; then
25338 cf_cv_termlib=terminfo
25339 else
25340 echo "$as_me: failed program was:" >&5
25341 cat "conftest.$ac_ext" >&5
25342 cf_cv_termlib=termcap
25343 fi
25344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25345 test -n "$verbose" && echo " using functions in predefined $cf_cv_termlib LIBS" 1>&6
25346
25347 echo "${as_me:-configure}:25347: testing using functions in predefined $cf_cv_termlib LIBS ..." 1>&5
25348
25349 else
25350 echo "$as_me: failed program was:" >&5
25351 cat "conftest.$ac_ext" >&5
25352
25353 if test "$cf_cv_termlib" = none; then
25354 # FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that
25355 # tgetstr lives in -lcurses when it is only an unsatisfied extern.
25356 cf_save_LIBS="$LIBS"
25357 for cf_lib in tinfo curses ncurses termlib termcap
25358 do
25359 LIBS="-l$cf_lib $cf_save_LIBS"
25360 for cf_func in tigetstr tgetstr
25361 do
25362 echo "$as_me:25362: checking for $cf_func in -l$cf_lib" >&5
25363 echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
25364 cat >"conftest.$ac_ext" <<_ACEOF
25365 #line 25365 "configure"
25366 #include "confdefs.h"
25367 extern char *$cf_func(const char *);
25368 int
25369 main (void)
25370 {
25371 char *x = $cf_func(""); (void)x
25372 ;
25373 return 0;
25374 }
25375 _ACEOF
25376 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25377 if { (eval echo "$as_me:25377: \"$ac_link\"") >&5
25378 (eval $ac_link) 2>&5
25379 ac_status=$?
25380 echo "$as_me:25380: \$? = $ac_status" >&5
25381 (exit "$ac_status"); } &&
25382 { ac_try='test -s "conftest$ac_exeext"'
25383 { (eval echo "$as_me:25383: \"$ac_try\"") >&5
25384 (eval $ac_try) 2>&5
25385 ac_status=$?
25386 echo "$as_me:25386: \$? = $ac_status" >&5
25387 (exit "$ac_status"); }; }; then
25388 cf_result=yes
25389 else
25390 echo "$as_me: failed program was:" >&5
25391 cat "conftest.$ac_ext" >&5
25392 cf_result=no
25393 fi
25394 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25395 echo "$as_me:25395: result: $cf_result" >&5
25396 echo "${ECHO_T}$cf_result" >&6
25397 if test "$cf_result" = yes ; then
25398 if test "$cf_func" = tigetstr ; then
25399 cf_cv_termlib=terminfo
25400 else
25401 cf_cv_termlib=termcap
25402 fi
25403 break
25404 fi
25405 done
25406 test "$cf_result" = yes && break
25407 done
25408 test "$cf_result" = no && LIBS="$cf_save_LIBS"
25409 fi
25410 if test "$cf_cv_termlib" = none; then
25411 # allow curses library for broken AIX system.
25412 echo "$as_me:25412: checking for initscr in -lcurses" >&5
25413 echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
25414 if test "${ac_cv_lib_curses_initscr+set}" = set; then
25415 echo $ECHO_N "(cached) $ECHO_C" >&6
25416 else
25417 ac_check_lib_save_LIBS=$LIBS
25418 LIBS="-lcurses $LIBS"
25419 cat >"conftest.$ac_ext" <<_ACEOF
25420 #line 25420 "configure"
25421 #include "confdefs.h"
25422
25423 /* Override any gcc2 internal prototype to avoid an error. */
25424 #ifdef __cplusplus
25425 extern "C"
25426 #endif
25427 /* We use char because int might match the return type of a gcc2
25428 builtin and then its argument prototype would still apply. */
25429 char initscr (void);
25430 int
25431 main (void)
25432 {
25433 initscr ();
25434 ;
25435 return 0;
25436 }
25437 _ACEOF
25438 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25439 if { (eval echo "$as_me:25439: \"$ac_link\"") >&5
25440 (eval $ac_link) 2>&5
25441 ac_status=$?
25442 echo "$as_me:25442: \$? = $ac_status" >&5
25443 (exit "$ac_status"); } &&
25444 { ac_try='test -s "conftest$ac_exeext"'
25445 { (eval echo "$as_me:25445: \"$ac_try\"") >&5
25446 (eval $ac_try) 2>&5
25447 ac_status=$?
25448 echo "$as_me:25448: \$? = $ac_status" >&5
25449 (exit "$ac_status"); }; }; then
25450 ac_cv_lib_curses_initscr=yes
25451 else
25452 echo "$as_me: failed program was:" >&5
25453 cat "conftest.$ac_ext" >&5
25454 ac_cv_lib_curses_initscr=no
25455 fi
25456 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25457 LIBS=$ac_check_lib_save_LIBS
25458 fi
25459 echo "$as_me:25459: result: $ac_cv_lib_curses_initscr" >&5
25460 echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
25461 if test "$ac_cv_lib_curses_initscr" = yes; then
25462
25463 cf_add_libs="$LIBS"
25464 # reverse order
25465 cf_add_0lib=
25466 for cf_add_1lib in -lcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25467 # filter duplicates
25468 for cf_add_1lib in $cf_add_0lib; do
25469 for cf_add_2lib in $cf_add_libs; do
25470 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25471 cf_add_1lib=
25472 break
25473 fi
25474 done
25475 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25476 done
25477 LIBS="$cf_add_libs"
25478
25479 fi
25480
25481 echo "$as_me:25481: checking for tgoto in -ltermcap" >&5
25482 echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
25483 if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
25484 echo $ECHO_N "(cached) $ECHO_C" >&6
25485 else
25486 ac_check_lib_save_LIBS=$LIBS
25487 LIBS="-ltermcap $LIBS"
25488 cat >"conftest.$ac_ext" <<_ACEOF
25489 #line 25489 "configure"
25490 #include "confdefs.h"
25491
25492 /* Override any gcc2 internal prototype to avoid an error. */
25493 #ifdef __cplusplus
25494 extern "C"
25495 #endif
25496 /* We use char because int might match the return type of a gcc2
25497 builtin and then its argument prototype would still apply. */
25498 char tgoto (void);
25499 int
25500 main (void)
25501 {
25502 tgoto ();
25503 ;
25504 return 0;
25505 }
25506 _ACEOF
25507 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25508 if { (eval echo "$as_me:25508: \"$ac_link\"") >&5
25509 (eval $ac_link) 2>&5
25510 ac_status=$?
25511 echo "$as_me:25511: \$? = $ac_status" >&5
25512 (exit "$ac_status"); } &&
25513 { ac_try='test -s "conftest$ac_exeext"'
25514 { (eval echo "$as_me:25514: \"$ac_try\"") >&5
25515 (eval $ac_try) 2>&5
25516 ac_status=$?
25517 echo "$as_me:25517: \$? = $ac_status" >&5
25518 (exit "$ac_status"); }; }; then
25519 ac_cv_lib_termcap_tgoto=yes
25520 else
25521 echo "$as_me: failed program was:" >&5
25522 cat "conftest.$ac_ext" >&5
25523 ac_cv_lib_termcap_tgoto=no
25524 fi
25525 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25526 LIBS=$ac_check_lib_save_LIBS
25527 fi
25528 echo "$as_me:25528: result: $ac_cv_lib_termcap_tgoto" >&5
25529 echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
25530 if test "$ac_cv_lib_termcap_tgoto" = yes; then
25531
25532 cf_add_libs="$LIBS"
25533 # reverse order
25534 cf_add_0lib=
25535 for cf_add_1lib in -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25536 # filter duplicates
25537 for cf_add_1lib in $cf_add_0lib; do
25538 for cf_add_2lib in $cf_add_libs; do
25539 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25540 cf_add_1lib=
25541 break
25542 fi
25543 done
25544 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25545 done
25546 LIBS="$cf_add_libs"
25547 cf_cv_termlib=termcap
25548 fi
25549
25550 fi
25551
25552 fi
25553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25554 if test "$cf_cv_termlib" = none; then
25555 { echo "$as_me:25555: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
25556 echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
25557 fi
25558
25559 fi
25560
25561 cf_slang_LIBS2="$LIBS"
25562 echo "$as_me:25562: checking for acos" >&5
25563 echo $ECHO_N "checking for acos... $ECHO_C" >&6
25564 if test "${ac_cv_func_acos+set}" = set; then
25565 echo $ECHO_N "(cached) $ECHO_C" >&6
25566 else
25567 cat >"conftest.$ac_ext" <<_ACEOF
25568 #line 25568 "configure"
25569 #include "confdefs.h"
25570 #define acos autoconf_temporary
25571 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
25572 #undef acos
25573
25574 #ifdef __cplusplus
25575 extern "C"
25576 #endif
25577
25578 /* We use char because int might match the return type of a gcc2
25579 builtin and then its argument prototype would still apply. */
25580 char acos (void);
25581
25582 int
25583 main (void)
25584 {
25585
25586 /* The GNU C library defines stubs for functions which it implements
25587 to always fail with ENOSYS. Some functions are actually named
25588 something starting with __ and the normal name is an alias. */
25589 #if defined (__stub_acos) || defined (__stub___acos)
25590 #error found stub for acos
25591 #endif
25592
25593 return acos ();
25594 ;
25595 return 0;
25596 }
25597 _ACEOF
25598 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25599 if { (eval echo "$as_me:25599: \"$ac_link\"") >&5
25600 (eval $ac_link) 2>&5
25601 ac_status=$?
25602 echo "$as_me:25602: \$? = $ac_status" >&5
25603 (exit "$ac_status"); } &&
25604 { ac_try='test -s "conftest$ac_exeext"'
25605 { (eval echo "$as_me:25605: \"$ac_try\"") >&5
25606 (eval $ac_try) 2>&5
25607 ac_status=$?
25608 echo "$as_me:25608: \$? = $ac_status" >&5
25609 (exit "$ac_status"); }; }; then
25610 ac_cv_func_acos=yes
25611 else
25612 echo "$as_me: failed program was:" >&5
25613 cat "conftest.$ac_ext" >&5
25614 ac_cv_func_acos=no
25615 fi
25616 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25617 fi
25618 echo "$as_me:25618: result: $ac_cv_func_acos" >&5
25619 echo "${ECHO_T}$ac_cv_func_acos" >&6
25620 if test "$ac_cv_func_acos" = yes; then
25621 :
25622 else
25623
25624 echo "$as_me:25624: checking for acos in -lm" >&5
25625 echo $ECHO_N "checking for acos in -lm... $ECHO_C" >&6
25626 if test "${ac_cv_lib_m_acos+set}" = set; then
25627 echo $ECHO_N "(cached) $ECHO_C" >&6
25628 else
25629 ac_check_lib_save_LIBS=$LIBS
25630 LIBS="-lm $LIBS $LIBS"
25631 cat >"conftest.$ac_ext" <<_ACEOF
25632 #line 25632 "configure"
25633 #include "confdefs.h"
25634
25635 /* Override any gcc2 internal prototype to avoid an error. */
25636 #ifdef __cplusplus
25637 extern "C"
25638 #endif
25639 /* We use char because int might match the return type of a gcc2
25640 builtin and then its argument prototype would still apply. */
25641 char acos (void);
25642 int
25643 main (void)
25644 {
25645 acos ();
25646 ;
25647 return 0;
25648 }
25649 _ACEOF
25650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25651 if { (eval echo "$as_me:25651: \"$ac_link\"") >&5
25652 (eval $ac_link) 2>&5
25653 ac_status=$?
25654 echo "$as_me:25654: \$? = $ac_status" >&5
25655 (exit "$ac_status"); } &&
25656 { ac_try='test -s "conftest$ac_exeext"'
25657 { (eval echo "$as_me:25657: \"$ac_try\"") >&5
25658 (eval $ac_try) 2>&5
25659 ac_status=$?
25660 echo "$as_me:25660: \$? = $ac_status" >&5
25661 (exit "$ac_status"); }; }; then
25662 ac_cv_lib_m_acos=yes
25663 else
25664 echo "$as_me: failed program was:" >&5
25665 cat "conftest.$ac_ext" >&5
25666 ac_cv_lib_m_acos=no
25667 fi
25668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25669 LIBS=$ac_check_lib_save_LIBS
25670 fi
25671 echo "$as_me:25671: result: $ac_cv_lib_m_acos" >&5
25672 echo "${ECHO_T}$ac_cv_lib_m_acos" >&6
25673 if test "$ac_cv_lib_m_acos" = yes; then
25674
25675 cf_tr_func=`echo "acos" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25676
25677 cat >>confdefs.h <<EOF
25678 #define HAVE_$cf_tr_func 1
25679 EOF
25680
25681 ac_cv_func_acos=yes
25682 if test "$cf_used_lib_m" != yes ; then cf_used_lib_m=yes; LIBS="-lm $LIBS"; fi
25683 else
25684
25685 ac_cv_func_acos=unknown
25686 unset ac_cv_func_acos 2>/dev/null
25687
25688 fi
25689
25690 fi
25691
25692 case "$host_os" in
25693 (os2*)
25694
25695 eval 'cf_cv_have_lib_'"video"'=no'
25696 cf_libdir=""
25697 echo "$as_me:25697: checking for v_init" >&5
25698 echo $ECHO_N "checking for v_init... $ECHO_C" >&6
25699 if test "${ac_cv_func_v_init+set}" = set; then
25700 echo $ECHO_N "(cached) $ECHO_C" >&6
25701 else
25702 cat >"conftest.$ac_ext" <<_ACEOF
25703 #line 25703 "configure"
25704 #include "confdefs.h"
25705 #define v_init autoconf_temporary
25706 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
25707 #undef v_init
25708
25709 #ifdef __cplusplus
25710 extern "C"
25711 #endif
25712
25713 /* We use char because int might match the return type of a gcc2
25714 builtin and then its argument prototype would still apply. */
25715 char v_init (void);
25716
25717 int
25718 main (void)
25719 {
25720
25721 /* The GNU C library defines stubs for functions which it implements
25722 to always fail with ENOSYS. Some functions are actually named
25723 something starting with __ and the normal name is an alias. */
25724 #if defined (__stub_v_init) || defined (__stub___v_init)
25725 #error found stub for v_init
25726 #endif
25727
25728 return v_init ();
25729 ;
25730 return 0;
25731 }
25732 _ACEOF
25733 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25734 if { (eval echo "$as_me:25734: \"$ac_link\"") >&5
25735 (eval $ac_link) 2>&5
25736 ac_status=$?
25737 echo "$as_me:25737: \$? = $ac_status" >&5
25738 (exit "$ac_status"); } &&
25739 { ac_try='test -s "conftest$ac_exeext"'
25740 { (eval echo "$as_me:25740: \"$ac_try\"") >&5
25741 (eval $ac_try) 2>&5
25742 ac_status=$?
25743 echo "$as_me:25743: \$? = $ac_status" >&5
25744 (exit "$ac_status"); }; }; then
25745 ac_cv_func_v_init=yes
25746 else
25747 echo "$as_me: failed program was:" >&5
25748 cat "conftest.$ac_ext" >&5
25749 ac_cv_func_v_init=no
25750 fi
25751 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25752 fi
25753 echo "$as_me:25753: result: $ac_cv_func_v_init" >&5
25754 echo "${ECHO_T}$ac_cv_func_v_init" >&6
25755 if test "$ac_cv_func_v_init" = yes; then
25756 eval 'cf_cv_have_lib_'"video"'=yes'
25757 else
25758
25759 cf_save_LIBS="$LIBS"
25760 echo "$as_me:25760: checking for v_init in -lvideo" >&5
25761 echo $ECHO_N "checking for v_init in -lvideo... $ECHO_C" >&6
25762 LIBS="-lvideo $LIBS"
25763 cat >"conftest.$ac_ext" <<_ACEOF
25764 #line 25764 "configure"
25765 #include "confdefs.h"
25766 #include <sys/video.h>
25767 int
25768 main (void)
25769 {
25770 v_init()
25771 ;
25772 return 0;
25773 }
25774 _ACEOF
25775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25776 if { (eval echo "$as_me:25776: \"$ac_link\"") >&5
25777 (eval $ac_link) 2>&5
25778 ac_status=$?
25779 echo "$as_me:25779: \$? = $ac_status" >&5
25780 (exit "$ac_status"); } &&
25781 { ac_try='test -s "conftest$ac_exeext"'
25782 { (eval echo "$as_me:25782: \"$ac_try\"") >&5
25783 (eval $ac_try) 2>&5
25784 ac_status=$?
25785 echo "$as_me:25785: \$? = $ac_status" >&5
25786 (exit "$ac_status"); }; }; then
25787 echo "$as_me:25787: result: yes" >&5
25788 echo "${ECHO_T}yes" >&6
25789 eval 'cf_cv_have_lib_'"video"'=yes'
25790
25791 else
25792 echo "$as_me: failed program was:" >&5
25793 cat "conftest.$ac_ext" >&5
25794 echo "$as_me:25794: result: no" >&5
25795 echo "${ECHO_T}no" >&6
25796
25797 cf_search=
25798 cf_library_path_list=""
25799 if test -n "${LDFLAGS}${LIBS}" ; then
25800 for cf_library_path in $LDFLAGS $LIBS
25801 do
25802 case "$cf_library_path" in
25803 (-L*)
25804 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
25805
25806 test "x$cf_library_path" != "xNONE" && \
25807 test -d "$cf_library_path" && \
25808 {
25809 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
25810 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
25811 test -d "$cf_library_path/lib/video" && cf_search="$cf_search $cf_library_path/lib/video"
25812 test -d "$cf_library_path/lib/video/lib" && cf_search="$cf_search $cf_library_path/lib/video/lib"
25813 test -d "$cf_library_path/video/lib" && cf_search="$cf_search $cf_library_path/video/lib"
25814 test -d "$cf_library_path/video/lib/video" && cf_search="$cf_search $cf_library_path/video/lib/video"
25815 }
25816
25817 cf_library_path_list="$cf_library_path_list $cf_search"
25818 ;;
25819 esac
25820 done
25821 fi
25822
25823 cf_search=
25824
25825 test "x$prefix" != "xNONE" && \
25826 test -d "$prefix" && \
25827 {
25828 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
25829 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
25830 test -d "$prefix/lib/video" && cf_search="$cf_search $prefix/lib/video"
25831 test -d "$prefix/lib/video/lib" && cf_search="$cf_search $prefix/lib/video/lib"
25832 test -d "$prefix/video/lib" && cf_search="$cf_search $prefix/video/lib"
25833 test -d "$prefix/video/lib/video" && cf_search="$cf_search $prefix/video/lib/video"
25834 }
25835
25836 for cf_subdir_prefix in \
25837 /usr \
25838 /usr/local \
25839 /usr/pkg \
25840 /opt \
25841 /opt/local \
25842 $HOME
25843 do
25844
25845 test "x$cf_subdir_prefix" != "x$prefix" && \
25846 test -d "$cf_subdir_prefix" && \
25847 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25848 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
25849 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
25850 test -d "$cf_subdir_prefix/lib/video" && cf_search="$cf_search $cf_subdir_prefix/lib/video"
25851 test -d "$cf_subdir_prefix/lib/video/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/video/lib"
25852 test -d "$cf_subdir_prefix/video/lib" && cf_search="$cf_search $cf_subdir_prefix/video/lib"
25853 test -d "$cf_subdir_prefix/video/lib/video" && cf_search="$cf_search $cf_subdir_prefix/video/lib/video"
25854 }
25855
25856 done
25857
25858 cf_search="$cf_library_path_list $cf_search"
25859
25860 for cf_libdir in $cf_search
25861 do
25862 echo "$as_me:25862: checking for -lvideo in $cf_libdir" >&5
25863 echo $ECHO_N "checking for -lvideo in $cf_libdir... $ECHO_C" >&6
25864 LIBS="-L$cf_libdir -lvideo $cf_save_LIBS"
25865 cat >"conftest.$ac_ext" <<_ACEOF
25866 #line 25866 "configure"
25867 #include "confdefs.h"
25868 #include <sys/video.h>
25869 int
25870 main (void)
25871 {
25872 v_init()
25873 ;
25874 return 0;
25875 }
25876 _ACEOF
25877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25878 if { (eval echo "$as_me:25878: \"$ac_link\"") >&5
25879 (eval $ac_link) 2>&5
25880 ac_status=$?
25881 echo "$as_me:25881: \$? = $ac_status" >&5
25882 (exit "$ac_status"); } &&
25883 { ac_try='test -s "conftest$ac_exeext"'
25884 { (eval echo "$as_me:25884: \"$ac_try\"") >&5
25885 (eval $ac_try) 2>&5
25886 ac_status=$?
25887 echo "$as_me:25887: \$? = $ac_status" >&5
25888 (exit "$ac_status"); }; }; then
25889 echo "$as_me:25889: result: yes" >&5
25890 echo "${ECHO_T}yes" >&6
25891 eval 'cf_cv_have_lib_'"video"'=yes'
25892 break
25893 else
25894 echo "$as_me: failed program was:" >&5
25895 cat "conftest.$ac_ext" >&5
25896 echo "$as_me:25896: result: no" >&5
25897 echo "${ECHO_T}no" >&6
25898 LIBS="$cf_save_LIBS"
25899 fi
25900 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25901 done
25902
25903 fi
25904 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25905
25906 fi
25907
25908 eval 'cf_found_library="$cf_cv_have_lib_'"video"\"
25909
25910 if test "$cf_found_library" = no ; then
25911 { { echo "$as_me:25911: error: Cannot link video library" >&5
25912 echo "$as_me: error: Cannot link video library" >&2;}
25913 { (exit 1); exit 1; }; }
25914 fi
25915
25916 ;;
25917 esac
25918
25919 eval 'cf_cv_have_lib_'"slang"'=no'
25920 cf_libdir=""
25921 echo "$as_me:25921: checking for SLtt_get_screen_size" >&5
25922 echo $ECHO_N "checking for SLtt_get_screen_size... $ECHO_C" >&6
25923 if test "${ac_cv_func_SLtt_get_screen_size+set}" = set; then
25924 echo $ECHO_N "(cached) $ECHO_C" >&6
25925 else
25926 cat >"conftest.$ac_ext" <<_ACEOF
25927 #line 25927 "configure"
25928 #include "confdefs.h"
25929 #define SLtt_get_screen_size autoconf_temporary
25930 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
25931 #undef SLtt_get_screen_size
25932
25933 #ifdef __cplusplus
25934 extern "C"
25935 #endif
25936
25937 /* We use char because int might match the return type of a gcc2
25938 builtin and then its argument prototype would still apply. */
25939 char SLtt_get_screen_size (void);
25940
25941 int
25942 main (void)
25943 {
25944
25945 /* The GNU C library defines stubs for functions which it implements
25946 to always fail with ENOSYS. Some functions are actually named
25947 something starting with __ and the normal name is an alias. */
25948 #if defined (__stub_SLtt_get_screen_size) || defined (__stub___SLtt_get_screen_size)
25949 #error found stub for SLtt_get_screen_size
25950 #endif
25951
25952 return SLtt_get_screen_size ();
25953 ;
25954 return 0;
25955 }
25956 _ACEOF
25957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25958 if { (eval echo "$as_me:25958: \"$ac_link\"") >&5
25959 (eval $ac_link) 2>&5
25960 ac_status=$?
25961 echo "$as_me:25961: \$? = $ac_status" >&5
25962 (exit "$ac_status"); } &&
25963 { ac_try='test -s "conftest$ac_exeext"'
25964 { (eval echo "$as_me:25964: \"$ac_try\"") >&5
25965 (eval $ac_try) 2>&5
25966 ac_status=$?
25967 echo "$as_me:25967: \$? = $ac_status" >&5
25968 (exit "$ac_status"); }; }; then
25969 ac_cv_func_SLtt_get_screen_size=yes
25970 else
25971 echo "$as_me: failed program was:" >&5
25972 cat "conftest.$ac_ext" >&5
25973 ac_cv_func_SLtt_get_screen_size=no
25974 fi
25975 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25976 fi
25977 echo "$as_me:25977: result: $ac_cv_func_SLtt_get_screen_size" >&5
25978 echo "${ECHO_T}$ac_cv_func_SLtt_get_screen_size" >&6
25979 if test "$ac_cv_func_SLtt_get_screen_size" = yes; then
25980 eval 'cf_cv_have_lib_'"slang"'=yes'
25981 else
25982
25983 cf_save_LIBS="$LIBS"
25984 echo "$as_me:25984: checking for SLtt_get_screen_size in -lslang" >&5
25985 echo $ECHO_N "checking for SLtt_get_screen_size in -lslang... $ECHO_C" >&6
25986 LIBS="-lslang $LIBS"
25987 cat >"conftest.$ac_ext" <<_ACEOF
25988 #line 25988 "configure"
25989 #include "confdefs.h"
25990 #include <slang.h>
25991 int
25992 main (void)
25993 {
25994 SLtt_get_screen_size()
25995 ;
25996 return 0;
25997 }
25998 _ACEOF
25999 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26000 if { (eval echo "$as_me:26000: \"$ac_link\"") >&5
26001 (eval $ac_link) 2>&5
26002 ac_status=$?
26003 echo "$as_me:26003: \$? = $ac_status" >&5
26004 (exit "$ac_status"); } &&
26005 { ac_try='test -s "conftest$ac_exeext"'
26006 { (eval echo "$as_me:26006: \"$ac_try\"") >&5
26007 (eval $ac_try) 2>&5
26008 ac_status=$?
26009 echo "$as_me:26009: \$? = $ac_status" >&5
26010 (exit "$ac_status"); }; }; then
26011 echo "$as_me:26011: result: yes" >&5
26012 echo "${ECHO_T}yes" >&6
26013 eval 'cf_cv_have_lib_'"slang"'=yes'
26014
26015 else
26016 echo "$as_me: failed program was:" >&5
26017 cat "conftest.$ac_ext" >&5
26018 echo "$as_me:26018: result: no" >&5
26019 echo "${ECHO_T}no" >&6
26020
26021 cf_search=
26022 cf_library_path_list=""
26023 if test -n "${LDFLAGS}${LIBS}" ; then
26024 for cf_library_path in $LDFLAGS $LIBS
26025 do
26026 case "$cf_library_path" in
26027 (-L*)
26028 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
26029
26030 test "x$cf_library_path" != "xNONE" && \
26031 test -d "$cf_library_path" && \
26032 {
26033 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
26034 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
26035 test -d "$cf_library_path/lib/slang" && cf_search="$cf_search $cf_library_path/lib/slang"
26036 test -d "$cf_library_path/lib/slang/lib" && cf_search="$cf_search $cf_library_path/lib/slang/lib"
26037 test -d "$cf_library_path/slang/lib" && cf_search="$cf_search $cf_library_path/slang/lib"
26038 test -d "$cf_library_path/slang/lib/slang" && cf_search="$cf_search $cf_library_path/slang/lib/slang"
26039 }
26040
26041 cf_library_path_list="$cf_library_path_list $cf_search"
26042 ;;
26043 esac
26044 done
26045 fi
26046
26047 cf_search=
26048
26049 test "x$prefix" != "xNONE" && \
26050 test -d "$prefix" && \
26051 {
26052 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
26053 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
26054 test -d "$prefix/lib/slang" && cf_search="$cf_search $prefix/lib/slang"
26055 test -d "$prefix/lib/slang/lib" && cf_search="$cf_search $prefix/lib/slang/lib"
26056 test -d "$prefix/slang/lib" && cf_search="$cf_search $prefix/slang/lib"
26057 test -d "$prefix/slang/lib/slang" && cf_search="$cf_search $prefix/slang/lib/slang"
26058 }
26059
26060 for cf_subdir_prefix in \
26061 /usr \
26062 /usr/local \
26063 /usr/pkg \
26064 /opt \
26065 /opt/local \
26066 $HOME
26067 do
26068
26069 test "x$cf_subdir_prefix" != "x$prefix" && \
26070 test -d "$cf_subdir_prefix" && \
26071 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
26072 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
26073 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
26074 test -d "$cf_subdir_prefix/lib/slang" && cf_search="$cf_search $cf_subdir_prefix/lib/slang"
26075 test -d "$cf_subdir_prefix/lib/slang/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/slang/lib"
26076 test -d "$cf_subdir_prefix/slang/lib" && cf_search="$cf_search $cf_subdir_prefix/slang/lib"
26077 test -d "$cf_subdir_prefix/slang/lib/slang" && cf_search="$cf_search $cf_subdir_prefix/slang/lib/slang"
26078 }
26079
26080 done
26081
26082 cf_search="$cf_library_path_list $cf_search"
26083
26084 for cf_libdir in $cf_search
26085 do
26086 echo "$as_me:26086: checking for -lslang in $cf_libdir" >&5
26087 echo $ECHO_N "checking for -lslang in $cf_libdir... $ECHO_C" >&6
26088 LIBS="-L$cf_libdir -lslang $cf_save_LIBS"
26089 cat >"conftest.$ac_ext" <<_ACEOF
26090 #line 26090 "configure"
26091 #include "confdefs.h"
26092 #include <slang.h>
26093 int
26094 main (void)
26095 {
26096 SLtt_get_screen_size()
26097 ;
26098 return 0;
26099 }
26100 _ACEOF
26101 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26102 if { (eval echo "$as_me:26102: \"$ac_link\"") >&5
26103 (eval $ac_link) 2>&5
26104 ac_status=$?
26105 echo "$as_me:26105: \$? = $ac_status" >&5
26106 (exit "$ac_status"); } &&
26107 { ac_try='test -s "conftest$ac_exeext"'
26108 { (eval echo "$as_me:26108: \"$ac_try\"") >&5
26109 (eval $ac_try) 2>&5
26110 ac_status=$?
26111 echo "$as_me:26111: \$? = $ac_status" >&5
26112 (exit "$ac_status"); }; }; then
26113 echo "$as_me:26113: result: yes" >&5
26114 echo "${ECHO_T}yes" >&6
26115 eval 'cf_cv_have_lib_'"slang"'=yes'
26116 break
26117 else
26118 echo "$as_me: failed program was:" >&5
26119 cat "conftest.$ac_ext" >&5
26120 echo "$as_me:26120: result: no" >&5
26121 echo "${ECHO_T}no" >&6
26122 LIBS="$cf_save_LIBS"
26123 fi
26124 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26125 done
26126
26127 fi
26128 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26129
26130 fi
26131
26132 eval 'cf_found_library="$cf_cv_have_lib_'"slang"\"
26133
26134 if test "$cf_found_library" = no ; then
26135 { { echo "$as_me:26135: error: Cannot link slang library" >&5
26136 echo "$as_me: error: Cannot link slang library" >&2;}
26137 { (exit 1); exit 1; }; }
26138 fi
26139
26140 cf_slang_LIBS3="$LIBS"
26141 echo "$as_me:26141: checking if we can link slang without termcap" >&5
26142 echo $ECHO_N "checking if we can link slang without termcap... $ECHO_C" >&6
26143 if test -n "`echo "$cf_slang_LIBS1" | sed -e 's/ //g'`" ; then
26144 cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s%$cf_slang_LIBS1%%" -e 's%^.%%'`
26145 else
26146 cf_exclude="$cf_slang_LIBS2"
26147 fi
26148 LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s%$cf_exclude%%" -e 's%^.%%'`
26149 cat >"conftest.$ac_ext" <<_ACEOF
26150 #line 26150 "configure"
26151 #include "confdefs.h"
26152 #include <slang.h>
26153 int
26154 main (void)
26155 {
26156 SLtt_get_screen_size()
26157 ;
26158 return 0;
26159 }
26160 _ACEOF
26161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26162 if { (eval echo "$as_me:26162: \"$ac_link\"") >&5
26163 (eval $ac_link) 2>&5
26164 ac_status=$?
26165 echo "$as_me:26165: \$? = $ac_status" >&5
26166 (exit "$ac_status"); } &&
26167 { ac_try='test -s "conftest$ac_exeext"'
26168 { (eval echo "$as_me:26168: \"$ac_try\"") >&5
26169 (eval $ac_try) 2>&5
26170 ac_status=$?
26171 echo "$as_me:26171: \$? = $ac_status" >&5
26172 (exit "$ac_status"); }; }; then
26173 cf_result=yes
26174 else
26175 echo "$as_me: failed program was:" >&5
26176 cat "conftest.$ac_ext" >&5
26177 cf_result=no
26178 fi
26179 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26180 echo "$as_me:26180: result: $cf_result" >&5
26181 echo "${ECHO_T}$cf_result" >&6
26182 test "$cf_result" = no && LIBS="$cf_slang_LIBS3"
26183
26184 else
26185
26186 echo "$as_me:26186: checking for slang2 header file" >&5
26187 echo $ECHO_N "checking for slang2 header file... $ECHO_C" >&6
26188 if test "${cf_cv_slang2_header+set}" = set; then
26189 echo $ECHO_N "(cached) $ECHO_C" >&6
26190 else
26191
26192 cf_cv_slang2_header=no
26193 cat >"conftest.$ac_ext" <<_ACEOF
26194 #line 26194 "configure"
26195 #include "confdefs.h"
26196 #include <slang.h>
26197 int
26198 main (void)
26199 {
26200 printf("%s\\n", SLANG_VERSION_STRING)
26201 ;
26202 return 0;
26203 }
26204 _ACEOF
26205 rm -f "conftest.$ac_objext"
26206 if { (eval echo "$as_me:26206: \"$ac_compile\"") >&5
26207 (eval $ac_compile) 2>&5
26208 ac_status=$?
26209 echo "$as_me:26209: \$? = $ac_status" >&5
26210 (exit "$ac_status"); } &&
26211 { ac_try='test -s "conftest.$ac_objext"'
26212 { (eval echo "$as_me:26212: \"$ac_try\"") >&5
26213 (eval $ac_try) 2>&5
26214 ac_status=$?
26215 echo "$as_me:26215: \$? = $ac_status" >&5
26216 (exit "$ac_status"); }; }; then
26217 cf_cv_slang2_header=predefined
26218 else
26219 echo "$as_me: failed program was:" >&5
26220 cat "conftest.$ac_ext" >&5
26221
26222 cf_search=
26223
26224 # collect the current set of include-directories from compiler flags
26225 cf_header_path_list=""
26226 if test -n "${CFLAGS}${CPPFLAGS}" ; then
26227 for cf_header_path in $CPPFLAGS $CFLAGS
26228 do
26229 case "$cf_header_path" in
26230 (-I*)
26231 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
26232
26233 test "x$cf_header_path" != "xNONE" && \
26234 test -d "$cf_header_path" && \
26235 {
26236 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
26237 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
26238 test -d "$cf_header_path/include/slang2" && cf_search="$cf_search $cf_header_path/include/slang2"
26239 test -d "$cf_header_path/include/slang2/include" && cf_search="$cf_search $cf_header_path/include/slang2/include"
26240 test -d "$cf_header_path/slang2/include" && cf_search="$cf_search $cf_header_path/slang2/include"
26241 test -d "$cf_header_path/slang2/include/slang2" && cf_search="$cf_search $cf_header_path/slang2/include/slang2"
26242 }
26243
26244 cf_header_path_list="$cf_header_path_list $cf_search"
26245 ;;
26246 esac
26247 done
26248 fi
26249
26250 # add the variations for the package we are looking for
26251
26252 cf_search=
26253
26254 test "x$prefix" != "xNONE" && \
26255 test -d "$prefix" && \
26256 {
26257 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
26258 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
26259 test -d "$prefix/include/slang2" && cf_search="$cf_search $prefix/include/slang2"
26260 test -d "$prefix/include/slang2/include" && cf_search="$cf_search $prefix/include/slang2/include"
26261 test -d "$prefix/slang2/include" && cf_search="$cf_search $prefix/slang2/include"
26262 test -d "$prefix/slang2/include/slang2" && cf_search="$cf_search $prefix/slang2/include/slang2"
26263 }
26264
26265 for cf_subdir_prefix in \
26266 /usr \
26267 /usr/local \
26268 /usr/pkg \
26269 /opt \
26270 /opt/local \
26271 $HOME
26272 do
26273
26274 test "x$cf_subdir_prefix" != "x$prefix" && \
26275 test -d "$cf_subdir_prefix" && \
26276 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
26277 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
26278 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
26279 test -d "$cf_subdir_prefix/include/slang2" && cf_search="$cf_search $cf_subdir_prefix/include/slang2"
26280 test -d "$cf_subdir_prefix/include/slang2/include" && cf_search="$cf_search $cf_subdir_prefix/include/slang2/include"
26281 test -d "$cf_subdir_prefix/slang2/include" && cf_search="$cf_search $cf_subdir_prefix/slang2/include"
26282 test -d "$cf_subdir_prefix/slang2/include/slang2" && cf_search="$cf_search $cf_subdir_prefix/slang2/include/slang2"
26283 }
26284
26285 done
26286
26287 test "$includedir" != NONE && \
26288 test "$includedir" != "/usr/include" && \
26289 test -d "$includedir" && {
26290 test -d "$includedir" && cf_search="$cf_search $includedir"
26291 test -d "$includedir/slang2" && cf_search="$cf_search $includedir/slang2"
26292 }
26293
26294 test "$oldincludedir" != NONE && \
26295 test "$oldincludedir" != "/usr/include" && \
26296 test -d "$oldincludedir" && {
26297 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
26298 test -d "$oldincludedir/slang2" && cf_search="$cf_search $oldincludedir/slang2"
26299 }
26300
26301 cf_search="$cf_search $cf_header_path_list"
26302
26303 for cf_incdir in $cf_search
26304 do
26305 for cf_header in \
26306 slang.h
26307 do
26308 echo trying "$cf_incdir/$cf_header" 1>&5
26309 if ${EGREP-egrep} "SLANG_VERSION" "$cf_incdir/$cf_header" 1>&5 2>&1; then
26310 cf_cv_slang2_header=$cf_incdir/$cf_header
26311 break
26312 fi
26313 done
26314 test "$cf_cv_slang2_header" != no && break
26315 done
26316
26317 fi
26318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26319 fi
26320 echo "$as_me:26320: result: $cf_cv_slang2_header" >&5
26321 echo "${ECHO_T}$cf_cv_slang2_header" >&6
26322
26323 if test "x$cf_cv_slang2_header" != xno
26324 then
26325
26326 cat >>confdefs.h <<\EOF
26327 #define USE_SLANG 1
26328 EOF
26329
26330 cf_incdir=`echo "$cf_cv_slang2_header" | sed -e 's%/[^/]*$%%'`
26331
26332 case "$cf_cv_slang2_header" in
26333 (predefined)
26334 ;;
26335 (*)
26336
26337 if test -n "$cf_incdir" ; then
26338 for cf_add_incdir in $cf_incdir
26339 do
26340 while test "$cf_add_incdir" != /usr/include
26341 do
26342 if test -d "$cf_add_incdir"
26343 then
26344 cf_have_incdir=no
26345 if test -n "$CFLAGS$CPPFLAGS" ; then
26346 # a loop is needed to ensure we can add subdirs of existing dirs
26347 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
26348 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
26349 cf_have_incdir=yes; break
26350 fi
26351 done
26352 fi
26353
26354 if test "$cf_have_incdir" = no ; then
26355 if test "$cf_add_incdir" = /usr/local/include ; then
26356 if test "$GCC" = yes
26357 then
26358 cf_save_CPPFLAGS=$CPPFLAGS
26359
26360 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26361 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
26362
26363 cat >"conftest.$ac_ext" <<_ACEOF
26364 #line 26364 "configure"
26365 #include "confdefs.h"
26366 #include <stdio.h>
26367 int
26368 main (void)
26369 {
26370 printf("Hello")
26371 ;
26372 return 0;
26373 }
26374 _ACEOF
26375 rm -f "conftest.$ac_objext"
26376 if { (eval echo "$as_me:26376: \"$ac_compile\"") >&5
26377 (eval $ac_compile) 2>&5
26378 ac_status=$?
26379 echo "$as_me:26379: \$? = $ac_status" >&5
26380 (exit "$ac_status"); } &&
26381 { ac_try='test -s "conftest.$ac_objext"'
26382 { (eval echo "$as_me:26382: \"$ac_try\"") >&5
26383 (eval $ac_try) 2>&5
26384 ac_status=$?
26385 echo "$as_me:26385: \$? = $ac_status" >&5
26386 (exit "$ac_status"); }; }; then
26387 :
26388 else
26389 echo "$as_me: failed program was:" >&5
26390 cat "conftest.$ac_ext" >&5
26391 cf_have_incdir=yes
26392 fi
26393 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26394 CPPFLAGS=$cf_save_CPPFLAGS
26395 fi
26396 fi
26397 fi
26398
26399 if test "$cf_have_incdir" = no ; then
26400 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
26401
26402 echo "${as_me:-configure}:26402: testing adding $cf_add_incdir to include-path ..." 1>&5
26403
26404 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
26405
26406 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
26407 test "$cf_top_incdir" = "$cf_add_incdir" && break
26408 cf_add_incdir="$cf_top_incdir"
26409 else
26410 break
26411 fi
26412 else
26413 break
26414 fi
26415 done
26416 done
26417 fi
26418
26419 ;;
26420 esac
26421 fi
26422
26423 if test "x$cf_cv_slang2_header" != xno
26424 then
26425
26426 cf_slang_LIBS1="$LIBS"
26427
26428 if test "${cf_cv_termlib+set}" = set; then
26429 echo $ECHO_N "(cached) $ECHO_C" >&6
26430 else
26431
26432 cf_cv_termlib=none
26433 cat >"conftest.$ac_ext" <<_ACEOF
26434 #line 26434 "configure"
26435 #include "confdefs.h"
26436 extern char *tgoto(const char*,int,int);
26437 int
26438 main (void)
26439 {
26440 char *x=tgoto("",0,0); (void)x;
26441 ;
26442 return 0;
26443 }
26444 _ACEOF
26445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26446 if { (eval echo "$as_me:26446: \"$ac_link\"") >&5
26447 (eval $ac_link) 2>&5
26448 ac_status=$?
26449 echo "$as_me:26449: \$? = $ac_status" >&5
26450 (exit "$ac_status"); } &&
26451 { ac_try='test -s "conftest$ac_exeext"'
26452 { (eval echo "$as_me:26452: \"$ac_try\"") >&5
26453 (eval $ac_try) 2>&5
26454 ac_status=$?
26455 echo "$as_me:26455: \$? = $ac_status" >&5
26456 (exit "$ac_status"); }; }; then
26457 cat >"conftest.$ac_ext" <<_ACEOF
26458 #line 26458 "configure"
26459 #include "confdefs.h"
26460 extern char *tigetstr(const char *);
26461 int
26462 main (void)
26463 {
26464 char *x=tigetstr(""); (void)x;
26465 ;
26466 return 0;
26467 }
26468 _ACEOF
26469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26470 if { (eval echo "$as_me:26470: \"$ac_link\"") >&5
26471 (eval $ac_link) 2>&5
26472 ac_status=$?
26473 echo "$as_me:26473: \$? = $ac_status" >&5
26474 (exit "$ac_status"); } &&
26475 { ac_try='test -s "conftest$ac_exeext"'
26476 { (eval echo "$as_me:26476: \"$ac_try\"") >&5
26477 (eval $ac_try) 2>&5
26478 ac_status=$?
26479 echo "$as_me:26479: \$? = $ac_status" >&5
26480 (exit "$ac_status"); }; }; then
26481 cf_cv_termlib=terminfo
26482 else
26483 echo "$as_me: failed program was:" >&5
26484 cat "conftest.$ac_ext" >&5
26485 cf_cv_termlib=termcap
26486 fi
26487 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26488 test -n "$verbose" && echo " using functions in predefined $cf_cv_termlib LIBS" 1>&6
26489
26490 echo "${as_me:-configure}:26490: testing using functions in predefined $cf_cv_termlib LIBS ..." 1>&5
26491
26492 else
26493 echo "$as_me: failed program was:" >&5
26494 cat "conftest.$ac_ext" >&5
26495
26496 if test "$cf_cv_termlib" = none; then
26497 # FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that
26498 # tgetstr lives in -lcurses when it is only an unsatisfied extern.
26499 cf_save_LIBS="$LIBS"
26500 for cf_lib in tinfo curses ncurses termlib termcap
26501 do
26502 LIBS="-l$cf_lib $cf_save_LIBS"
26503 for cf_func in tigetstr tgetstr
26504 do
26505 echo "$as_me:26505: checking for $cf_func in -l$cf_lib" >&5
26506 echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
26507 cat >"conftest.$ac_ext" <<_ACEOF
26508 #line 26508 "configure"
26509 #include "confdefs.h"
26510 extern char *$cf_func(const char *);
26511 int
26512 main (void)
26513 {
26514 char *x = $cf_func(""); (void)x
26515 ;
26516 return 0;
26517 }
26518 _ACEOF
26519 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26520 if { (eval echo "$as_me:26520: \"$ac_link\"") >&5
26521 (eval $ac_link) 2>&5
26522 ac_status=$?
26523 echo "$as_me:26523: \$? = $ac_status" >&5
26524 (exit "$ac_status"); } &&
26525 { ac_try='test -s "conftest$ac_exeext"'
26526 { (eval echo "$as_me:26526: \"$ac_try\"") >&5
26527 (eval $ac_try) 2>&5
26528 ac_status=$?
26529 echo "$as_me:26529: \$? = $ac_status" >&5
26530 (exit "$ac_status"); }; }; then
26531 cf_result=yes
26532 else
26533 echo "$as_me: failed program was:" >&5
26534 cat "conftest.$ac_ext" >&5
26535 cf_result=no
26536 fi
26537 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26538 echo "$as_me:26538: result: $cf_result" >&5
26539 echo "${ECHO_T}$cf_result" >&6
26540 if test "$cf_result" = yes ; then
26541 if test "$cf_func" = tigetstr ; then
26542 cf_cv_termlib=terminfo
26543 else
26544 cf_cv_termlib=termcap
26545 fi
26546 break
26547 fi
26548 done
26549 test "$cf_result" = yes && break
26550 done
26551 test "$cf_result" = no && LIBS="$cf_save_LIBS"
26552 fi
26553 if test "$cf_cv_termlib" = none; then
26554 # allow curses library for broken AIX system.
26555 echo "$as_me:26555: checking for initscr in -lcurses" >&5
26556 echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
26557 if test "${ac_cv_lib_curses_initscr+set}" = set; then
26558 echo $ECHO_N "(cached) $ECHO_C" >&6
26559 else
26560 ac_check_lib_save_LIBS=$LIBS
26561 LIBS="-lcurses $LIBS"
26562 cat >"conftest.$ac_ext" <<_ACEOF
26563 #line 26563 "configure"
26564 #include "confdefs.h"
26565
26566 /* Override any gcc2 internal prototype to avoid an error. */
26567 #ifdef __cplusplus
26568 extern "C"
26569 #endif
26570 /* We use char because int might match the return type of a gcc2
26571 builtin and then its argument prototype would still apply. */
26572 char initscr (void);
26573 int
26574 main (void)
26575 {
26576 initscr ();
26577 ;
26578 return 0;
26579 }
26580 _ACEOF
26581 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26582 if { (eval echo "$as_me:26582: \"$ac_link\"") >&5
26583 (eval $ac_link) 2>&5
26584 ac_status=$?
26585 echo "$as_me:26585: \$? = $ac_status" >&5
26586 (exit "$ac_status"); } &&
26587 { ac_try='test -s "conftest$ac_exeext"'
26588 { (eval echo "$as_me:26588: \"$ac_try\"") >&5
26589 (eval $ac_try) 2>&5
26590 ac_status=$?
26591 echo "$as_me:26591: \$? = $ac_status" >&5
26592 (exit "$ac_status"); }; }; then
26593 ac_cv_lib_curses_initscr=yes
26594 else
26595 echo "$as_me: failed program was:" >&5
26596 cat "conftest.$ac_ext" >&5
26597 ac_cv_lib_curses_initscr=no
26598 fi
26599 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26600 LIBS=$ac_check_lib_save_LIBS
26601 fi
26602 echo "$as_me:26602: result: $ac_cv_lib_curses_initscr" >&5
26603 echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
26604 if test "$ac_cv_lib_curses_initscr" = yes; then
26605
26606 cf_add_libs="$LIBS"
26607 # reverse order
26608 cf_add_0lib=
26609 for cf_add_1lib in -lcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
26610 # filter duplicates
26611 for cf_add_1lib in $cf_add_0lib; do
26612 for cf_add_2lib in $cf_add_libs; do
26613 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
26614 cf_add_1lib=
26615 break
26616 fi
26617 done
26618 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
26619 done
26620 LIBS="$cf_add_libs"
26621
26622 fi
26623
26624 echo "$as_me:26624: checking for tgoto in -ltermcap" >&5
26625 echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
26626 if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
26627 echo $ECHO_N "(cached) $ECHO_C" >&6
26628 else
26629 ac_check_lib_save_LIBS=$LIBS
26630 LIBS="-ltermcap $LIBS"
26631 cat >"conftest.$ac_ext" <<_ACEOF
26632 #line 26632 "configure"
26633 #include "confdefs.h"
26634
26635 /* Override any gcc2 internal prototype to avoid an error. */
26636 #ifdef __cplusplus
26637 extern "C"
26638 #endif
26639 /* We use char because int might match the return type of a gcc2
26640 builtin and then its argument prototype would still apply. */
26641 char tgoto (void);
26642 int
26643 main (void)
26644 {
26645 tgoto ();
26646 ;
26647 return 0;
26648 }
26649 _ACEOF
26650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26651 if { (eval echo "$as_me:26651: \"$ac_link\"") >&5
26652 (eval $ac_link) 2>&5
26653 ac_status=$?
26654 echo "$as_me:26654: \$? = $ac_status" >&5
26655 (exit "$ac_status"); } &&
26656 { ac_try='test -s "conftest$ac_exeext"'
26657 { (eval echo "$as_me:26657: \"$ac_try\"") >&5
26658 (eval $ac_try) 2>&5
26659 ac_status=$?
26660 echo "$as_me:26660: \$? = $ac_status" >&5
26661 (exit "$ac_status"); }; }; then
26662 ac_cv_lib_termcap_tgoto=yes
26663 else
26664 echo "$as_me: failed program was:" >&5
26665 cat "conftest.$ac_ext" >&5
26666 ac_cv_lib_termcap_tgoto=no
26667 fi
26668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26669 LIBS=$ac_check_lib_save_LIBS
26670 fi
26671 echo "$as_me:26671: result: $ac_cv_lib_termcap_tgoto" >&5
26672 echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
26673 if test "$ac_cv_lib_termcap_tgoto" = yes; then
26674
26675 cf_add_libs="$LIBS"
26676 # reverse order
26677 cf_add_0lib=
26678 for cf_add_1lib in -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
26679 # filter duplicates
26680 for cf_add_1lib in $cf_add_0lib; do
26681 for cf_add_2lib in $cf_add_libs; do
26682 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
26683 cf_add_1lib=
26684 break
26685 fi
26686 done
26687 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
26688 done
26689 LIBS="$cf_add_libs"
26690 cf_cv_termlib=termcap
26691 fi
26692
26693 fi
26694
26695 fi
26696 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26697 if test "$cf_cv_termlib" = none; then
26698 { echo "$as_me:26698: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
26699 echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
26700 fi
26701
26702 fi
26703
26704 cf_slang_LIBS2="$LIBS"
26705 echo "$as_me:26705: checking for acos" >&5
26706 echo $ECHO_N "checking for acos... $ECHO_C" >&6
26707 if test "${ac_cv_func_acos+set}" = set; then
26708 echo $ECHO_N "(cached) $ECHO_C" >&6
26709 else
26710 cat >"conftest.$ac_ext" <<_ACEOF
26711 #line 26711 "configure"
26712 #include "confdefs.h"
26713 #define acos autoconf_temporary
26714 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
26715 #undef acos
26716
26717 #ifdef __cplusplus
26718 extern "C"
26719 #endif
26720
26721 /* We use char because int might match the return type of a gcc2
26722 builtin and then its argument prototype would still apply. */
26723 char acos (void);
26724
26725 int
26726 main (void)
26727 {
26728
26729 /* The GNU C library defines stubs for functions which it implements
26730 to always fail with ENOSYS. Some functions are actually named
26731 something starting with __ and the normal name is an alias. */
26732 #if defined (__stub_acos) || defined (__stub___acos)
26733 #error found stub for acos
26734 #endif
26735
26736 return acos ();
26737 ;
26738 return 0;
26739 }
26740 _ACEOF
26741 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26742 if { (eval echo "$as_me:26742: \"$ac_link\"") >&5
26743 (eval $ac_link) 2>&5
26744 ac_status=$?
26745 echo "$as_me:26745: \$? = $ac_status" >&5
26746 (exit "$ac_status"); } &&
26747 { ac_try='test -s "conftest$ac_exeext"'
26748 { (eval echo "$as_me:26748: \"$ac_try\"") >&5
26749 (eval $ac_try) 2>&5
26750 ac_status=$?
26751 echo "$as_me:26751: \$? = $ac_status" >&5
26752 (exit "$ac_status"); }; }; then
26753 ac_cv_func_acos=yes
26754 else
26755 echo "$as_me: failed program was:" >&5
26756 cat "conftest.$ac_ext" >&5
26757 ac_cv_func_acos=no
26758 fi
26759 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26760 fi
26761 echo "$as_me:26761: result: $ac_cv_func_acos" >&5
26762 echo "${ECHO_T}$ac_cv_func_acos" >&6
26763 if test "$ac_cv_func_acos" = yes; then
26764 :
26765 else
26766
26767 echo "$as_me:26767: checking for acos in -lm" >&5
26768 echo $ECHO_N "checking for acos in -lm... $ECHO_C" >&6
26769 if test "${ac_cv_lib_m_acos+set}" = set; then
26770 echo $ECHO_N "(cached) $ECHO_C" >&6
26771 else
26772 ac_check_lib_save_LIBS=$LIBS
26773 LIBS="-lm $LIBS $LIBS"
26774 cat >"conftest.$ac_ext" <<_ACEOF
26775 #line 26775 "configure"
26776 #include "confdefs.h"
26777
26778 /* Override any gcc2 internal prototype to avoid an error. */
26779 #ifdef __cplusplus
26780 extern "C"
26781 #endif
26782 /* We use char because int might match the return type of a gcc2
26783 builtin and then its argument prototype would still apply. */
26784 char acos (void);
26785 int
26786 main (void)
26787 {
26788 acos ();
26789 ;
26790 return 0;
26791 }
26792 _ACEOF
26793 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26794 if { (eval echo "$as_me:26794: \"$ac_link\"") >&5
26795 (eval $ac_link) 2>&5
26796 ac_status=$?
26797 echo "$as_me:26797: \$? = $ac_status" >&5
26798 (exit "$ac_status"); } &&
26799 { ac_try='test -s "conftest$ac_exeext"'
26800 { (eval echo "$as_me:26800: \"$ac_try\"") >&5
26801 (eval $ac_try) 2>&5
26802 ac_status=$?
26803 echo "$as_me:26803: \$? = $ac_status" >&5
26804 (exit "$ac_status"); }; }; then
26805 ac_cv_lib_m_acos=yes
26806 else
26807 echo "$as_me: failed program was:" >&5
26808 cat "conftest.$ac_ext" >&5
26809 ac_cv_lib_m_acos=no
26810 fi
26811 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26812 LIBS=$ac_check_lib_save_LIBS
26813 fi
26814 echo "$as_me:26814: result: $ac_cv_lib_m_acos" >&5
26815 echo "${ECHO_T}$ac_cv_lib_m_acos" >&6
26816 if test "$ac_cv_lib_m_acos" = yes; then
26817
26818 cf_tr_func=`echo "acos" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26819
26820 cat >>confdefs.h <<EOF
26821 #define HAVE_$cf_tr_func 1
26822 EOF
26823
26824 ac_cv_func_acos=yes
26825 if test "$cf_used_lib_m" != yes ; then cf_used_lib_m=yes; LIBS="-lm $LIBS"; fi
26826 else
26827
26828 ac_cv_func_acos=unknown
26829 unset ac_cv_func_acos 2>/dev/null
26830
26831 fi
26832
26833 fi
26834
26835 case "$host_os" in
26836 (os2*)
26837
26838 eval 'cf_cv_have_lib_'"video"'=no'
26839 cf_libdir=""
26840 echo "$as_me:26840: checking for v_init" >&5
26841 echo $ECHO_N "checking for v_init... $ECHO_C" >&6
26842 if test "${ac_cv_func_v_init+set}" = set; then
26843 echo $ECHO_N "(cached) $ECHO_C" >&6
26844 else
26845 cat >"conftest.$ac_ext" <<_ACEOF
26846 #line 26846 "configure"
26847 #include "confdefs.h"
26848 #define v_init autoconf_temporary
26849 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
26850 #undef v_init
26851
26852 #ifdef __cplusplus
26853 extern "C"
26854 #endif
26855
26856 /* We use char because int might match the return type of a gcc2
26857 builtin and then its argument prototype would still apply. */
26858 char v_init (void);
26859
26860 int
26861 main (void)
26862 {
26863
26864 /* The GNU C library defines stubs for functions which it implements
26865 to always fail with ENOSYS. Some functions are actually named
26866 something starting with __ and the normal name is an alias. */
26867 #if defined (__stub_v_init) || defined (__stub___v_init)
26868 #error found stub for v_init
26869 #endif
26870
26871 return v_init ();
26872 ;
26873 return 0;
26874 }
26875 _ACEOF
26876 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26877 if { (eval echo "$as_me:26877: \"$ac_link\"") >&5
26878 (eval $ac_link) 2>&5
26879 ac_status=$?
26880 echo "$as_me:26880: \$? = $ac_status" >&5
26881 (exit "$ac_status"); } &&
26882 { ac_try='test -s "conftest$ac_exeext"'
26883 { (eval echo "$as_me:26883: \"$ac_try\"") >&5
26884 (eval $ac_try) 2>&5
26885 ac_status=$?
26886 echo "$as_me:26886: \$? = $ac_status" >&5
26887 (exit "$ac_status"); }; }; then
26888 ac_cv_func_v_init=yes
26889 else
26890 echo "$as_me: failed program was:" >&5
26891 cat "conftest.$ac_ext" >&5
26892 ac_cv_func_v_init=no
26893 fi
26894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26895 fi
26896 echo "$as_me:26896: result: $ac_cv_func_v_init" >&5
26897 echo "${ECHO_T}$ac_cv_func_v_init" >&6
26898 if test "$ac_cv_func_v_init" = yes; then
26899 eval 'cf_cv_have_lib_'"video"'=yes'
26900 else
26901
26902 cf_save_LIBS="$LIBS"
26903 echo "$as_me:26903: checking for v_init in -lvideo" >&5
26904 echo $ECHO_N "checking for v_init in -lvideo... $ECHO_C" >&6
26905 LIBS="-lvideo $LIBS"
26906 cat >"conftest.$ac_ext" <<_ACEOF
26907 #line 26907 "configure"
26908 #include "confdefs.h"
26909 #include <sys/video.h>
26910 int
26911 main (void)
26912 {
26913 v_init()
26914 ;
26915 return 0;
26916 }
26917 _ACEOF
26918 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26919 if { (eval echo "$as_me:26919: \"$ac_link\"") >&5
26920 (eval $ac_link) 2>&5
26921 ac_status=$?
26922 echo "$as_me:26922: \$? = $ac_status" >&5
26923 (exit "$ac_status"); } &&
26924 { ac_try='test -s "conftest$ac_exeext"'
26925 { (eval echo "$as_me:26925: \"$ac_try\"") >&5
26926 (eval $ac_try) 2>&5
26927 ac_status=$?
26928 echo "$as_me:26928: \$? = $ac_status" >&5
26929 (exit "$ac_status"); }; }; then
26930 echo "$as_me:26930: result: yes" >&5
26931 echo "${ECHO_T}yes" >&6
26932 eval 'cf_cv_have_lib_'"video"'=yes'
26933
26934 else
26935 echo "$as_me: failed program was:" >&5
26936 cat "conftest.$ac_ext" >&5
26937 echo "$as_me:26937: result: no" >&5
26938 echo "${ECHO_T}no" >&6
26939
26940 cf_search=
26941 cf_library_path_list=""
26942 if test -n "${LDFLAGS}${LIBS}" ; then
26943 for cf_library_path in $LDFLAGS $LIBS
26944 do
26945 case "$cf_library_path" in
26946 (-L*)
26947 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
26948
26949 test "x$cf_library_path" != "xNONE" && \
26950 test -d "$cf_library_path" && \
26951 {
26952 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
26953 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
26954 test -d "$cf_library_path/lib/video" && cf_search="$cf_search $cf_library_path/lib/video"
26955 test -d "$cf_library_path/lib/video/lib" && cf_search="$cf_search $cf_library_path/lib/video/lib"
26956 test -d "$cf_library_path/video/lib" && cf_search="$cf_search $cf_library_path/video/lib"
26957 test -d "$cf_library_path/video/lib/video" && cf_search="$cf_search $cf_library_path/video/lib/video"
26958 }
26959
26960 cf_library_path_list="$cf_library_path_list $cf_search"
26961 ;;
26962 esac
26963 done
26964 fi
26965
26966 cf_search=
26967
26968 test "x$prefix" != "xNONE" && \
26969 test -d "$prefix" && \
26970 {
26971 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
26972 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
26973 test -d "$prefix/lib/video" && cf_search="$cf_search $prefix/lib/video"
26974 test -d "$prefix/lib/video/lib" && cf_search="$cf_search $prefix/lib/video/lib"
26975 test -d "$prefix/video/lib" && cf_search="$cf_search $prefix/video/lib"
26976 test -d "$prefix/video/lib/video" && cf_search="$cf_search $prefix/video/lib/video"
26977 }
26978
26979 for cf_subdir_prefix in \
26980 /usr \
26981 /usr/local \
26982 /usr/pkg \
26983 /opt \
26984 /opt/local \
26985 $HOME
26986 do
26987
26988 test "x$cf_subdir_prefix" != "x$prefix" && \
26989 test -d "$cf_subdir_prefix" && \
26990 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
26991 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
26992 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
26993 test -d "$cf_subdir_prefix/lib/video" && cf_search="$cf_search $cf_subdir_prefix/lib/video"
26994 test -d "$cf_subdir_prefix/lib/video/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/video/lib"
26995 test -d "$cf_subdir_prefix/video/lib" && cf_search="$cf_search $cf_subdir_prefix/video/lib"
26996 test -d "$cf_subdir_prefix/video/lib/video" && cf_search="$cf_search $cf_subdir_prefix/video/lib/video"
26997 }
26998
26999 done
27000
27001 cf_search="$cf_library_path_list $cf_search"
27002
27003 for cf_libdir in $cf_search
27004 do
27005 echo "$as_me:27005: checking for -lvideo in $cf_libdir" >&5
27006 echo $ECHO_N "checking for -lvideo in $cf_libdir... $ECHO_C" >&6
27007 LIBS="-L$cf_libdir -lvideo $cf_save_LIBS"
27008 cat >"conftest.$ac_ext" <<_ACEOF
27009 #line 27009 "configure"
27010 #include "confdefs.h"
27011 #include <sys/video.h>
27012 int
27013 main (void)
27014 {
27015 v_init()
27016 ;
27017 return 0;
27018 }
27019 _ACEOF
27020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27021 if { (eval echo "$as_me:27021: \"$ac_link\"") >&5
27022 (eval $ac_link) 2>&5
27023 ac_status=$?
27024 echo "$as_me:27024: \$? = $ac_status" >&5
27025 (exit "$ac_status"); } &&
27026 { ac_try='test -s "conftest$ac_exeext"'
27027 { (eval echo "$as_me:27027: \"$ac_try\"") >&5
27028 (eval $ac_try) 2>&5
27029 ac_status=$?
27030 echo "$as_me:27030: \$? = $ac_status" >&5
27031 (exit "$ac_status"); }; }; then
27032 echo "$as_me:27032: result: yes" >&5
27033 echo "${ECHO_T}yes" >&6
27034 eval 'cf_cv_have_lib_'"video"'=yes'
27035 break
27036 else
27037 echo "$as_me: failed program was:" >&5
27038 cat "conftest.$ac_ext" >&5
27039 echo "$as_me:27039: result: no" >&5
27040 echo "${ECHO_T}no" >&6
27041 LIBS="$cf_save_LIBS"
27042 fi
27043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27044 done
27045
27046 fi
27047 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27048
27049 fi
27050
27051 eval 'cf_found_library="$cf_cv_have_lib_'"video"\"
27052
27053 if test "$cf_found_library" = no ; then
27054 { { echo "$as_me:27054: error: Cannot link video library" >&5
27055 echo "$as_me: error: Cannot link video library" >&2;}
27056 { (exit 1); exit 1; }; }
27057 fi
27058
27059 ;;
27060 esac
27061
27062 eval 'cf_cv_have_lib_'"slang2"'=no'
27063 cf_libdir=""
27064 echo "$as_me:27064: checking for SLtt_get_screen_size" >&5
27065 echo $ECHO_N "checking for SLtt_get_screen_size... $ECHO_C" >&6
27066 if test "${ac_cv_func_SLtt_get_screen_size+set}" = set; then
27067 echo $ECHO_N "(cached) $ECHO_C" >&6
27068 else
27069 cat >"conftest.$ac_ext" <<_ACEOF
27070 #line 27070 "configure"
27071 #include "confdefs.h"
27072 #define SLtt_get_screen_size autoconf_temporary
27073 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
27074 #undef SLtt_get_screen_size
27075
27076 #ifdef __cplusplus
27077 extern "C"
27078 #endif
27079
27080 /* We use char because int might match the return type of a gcc2
27081 builtin and then its argument prototype would still apply. */
27082 char SLtt_get_screen_size (void);
27083
27084 int
27085 main (void)
27086 {
27087
27088 /* The GNU C library defines stubs for functions which it implements
27089 to always fail with ENOSYS. Some functions are actually named
27090 something starting with __ and the normal name is an alias. */
27091 #if defined (__stub_SLtt_get_screen_size) || defined (__stub___SLtt_get_screen_size)
27092 #error found stub for SLtt_get_screen_size
27093 #endif
27094
27095 return SLtt_get_screen_size ();
27096 ;
27097 return 0;
27098 }
27099 _ACEOF
27100 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27101 if { (eval echo "$as_me:27101: \"$ac_link\"") >&5
27102 (eval $ac_link) 2>&5
27103 ac_status=$?
27104 echo "$as_me:27104: \$? = $ac_status" >&5
27105 (exit "$ac_status"); } &&
27106 { ac_try='test -s "conftest$ac_exeext"'
27107 { (eval echo "$as_me:27107: \"$ac_try\"") >&5
27108 (eval $ac_try) 2>&5
27109 ac_status=$?
27110 echo "$as_me:27110: \$? = $ac_status" >&5
27111 (exit "$ac_status"); }; }; then
27112 ac_cv_func_SLtt_get_screen_size=yes
27113 else
27114 echo "$as_me: failed program was:" >&5
27115 cat "conftest.$ac_ext" >&5
27116 ac_cv_func_SLtt_get_screen_size=no
27117 fi
27118 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27119 fi
27120 echo "$as_me:27120: result: $ac_cv_func_SLtt_get_screen_size" >&5
27121 echo "${ECHO_T}$ac_cv_func_SLtt_get_screen_size" >&6
27122 if test "$ac_cv_func_SLtt_get_screen_size" = yes; then
27123 eval 'cf_cv_have_lib_'"slang2"'=yes'
27124 else
27125
27126 cf_save_LIBS="$LIBS"
27127 echo "$as_me:27127: checking for SLtt_get_screen_size in -lslang2" >&5
27128 echo $ECHO_N "checking for SLtt_get_screen_size in -lslang2... $ECHO_C" >&6
27129 LIBS="-lslang2 $LIBS"
27130 cat >"conftest.$ac_ext" <<_ACEOF
27131 #line 27131 "configure"
27132 #include "confdefs.h"
27133 #include <slang.h>
27134 int
27135 main (void)
27136 {
27137 SLtt_get_screen_size()
27138 ;
27139 return 0;
27140 }
27141 _ACEOF
27142 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27143 if { (eval echo "$as_me:27143: \"$ac_link\"") >&5
27144 (eval $ac_link) 2>&5
27145 ac_status=$?
27146 echo "$as_me:27146: \$? = $ac_status" >&5
27147 (exit "$ac_status"); } &&
27148 { ac_try='test -s "conftest$ac_exeext"'
27149 { (eval echo "$as_me:27149: \"$ac_try\"") >&5
27150 (eval $ac_try) 2>&5
27151 ac_status=$?
27152 echo "$as_me:27152: \$? = $ac_status" >&5
27153 (exit "$ac_status"); }; }; then
27154 echo "$as_me:27154: result: yes" >&5
27155 echo "${ECHO_T}yes" >&6
27156 eval 'cf_cv_have_lib_'"slang2"'=yes'
27157
27158 else
27159 echo "$as_me: failed program was:" >&5
27160 cat "conftest.$ac_ext" >&5
27161 echo "$as_me:27161: result: no" >&5
27162 echo "${ECHO_T}no" >&6
27163
27164 cf_search=
27165 cf_library_path_list=""
27166 if test -n "${LDFLAGS}${LIBS}" ; then
27167 for cf_library_path in $LDFLAGS $LIBS
27168 do
27169 case "$cf_library_path" in
27170 (-L*)
27171 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
27172
27173 test "x$cf_library_path" != "xNONE" && \
27174 test -d "$cf_library_path" && \
27175 {
27176 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
27177 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
27178 test -d "$cf_library_path/lib/slang2" && cf_search="$cf_search $cf_library_path/lib/slang2"
27179 test -d "$cf_library_path/lib/slang2/lib" && cf_search="$cf_search $cf_library_path/lib/slang2/lib"
27180 test -d "$cf_library_path/slang2/lib" && cf_search="$cf_search $cf_library_path/slang2/lib"
27181 test -d "$cf_library_path/slang2/lib/slang2" && cf_search="$cf_search $cf_library_path/slang2/lib/slang2"
27182 }
27183
27184 cf_library_path_list="$cf_library_path_list $cf_search"
27185 ;;
27186 esac
27187 done
27188 fi
27189
27190 cf_search=
27191
27192 test "x$prefix" != "xNONE" && \
27193 test -d "$prefix" && \
27194 {
27195 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
27196 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
27197 test -d "$prefix/lib/slang2" && cf_search="$cf_search $prefix/lib/slang2"
27198 test -d "$prefix/lib/slang2/lib" && cf_search="$cf_search $prefix/lib/slang2/lib"
27199 test -d "$prefix/slang2/lib" && cf_search="$cf_search $prefix/slang2/lib"
27200 test -d "$prefix/slang2/lib/slang2" && cf_search="$cf_search $prefix/slang2/lib/slang2"
27201 }
27202
27203 for cf_subdir_prefix in \
27204 /usr \
27205 /usr/local \
27206 /usr/pkg \
27207 /opt \
27208 /opt/local \
27209 $HOME
27210 do
27211
27212 test "x$cf_subdir_prefix" != "x$prefix" && \
27213 test -d "$cf_subdir_prefix" && \
27214 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
27215 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
27216 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
27217 test -d "$cf_subdir_prefix/lib/slang2" && cf_search="$cf_search $cf_subdir_prefix/lib/slang2"
27218 test -d "$cf_subdir_prefix/lib/slang2/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/slang2/lib"
27219 test -d "$cf_subdir_prefix/slang2/lib" && cf_search="$cf_search $cf_subdir_prefix/slang2/lib"
27220 test -d "$cf_subdir_prefix/slang2/lib/slang2" && cf_search="$cf_search $cf_subdir_prefix/slang2/lib/slang2"
27221 }
27222
27223 done
27224
27225 cf_search="$cf_library_path_list $cf_search"
27226
27227 for cf_libdir in $cf_search
27228 do
27229 echo "$as_me:27229: checking for -lslang2 in $cf_libdir" >&5
27230 echo $ECHO_N "checking for -lslang2 in $cf_libdir... $ECHO_C" >&6
27231 LIBS="-L$cf_libdir -lslang2 $cf_save_LIBS"
27232 cat >"conftest.$ac_ext" <<_ACEOF
27233 #line 27233 "configure"
27234 #include "confdefs.h"
27235 #include <slang.h>
27236 int
27237 main (void)
27238 {
27239 SLtt_get_screen_size()
27240 ;
27241 return 0;
27242 }
27243 _ACEOF
27244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27245 if { (eval echo "$as_me:27245: \"$ac_link\"") >&5
27246 (eval $ac_link) 2>&5
27247 ac_status=$?
27248 echo "$as_me:27248: \$? = $ac_status" >&5
27249 (exit "$ac_status"); } &&
27250 { ac_try='test -s "conftest$ac_exeext"'
27251 { (eval echo "$as_me:27251: \"$ac_try\"") >&5
27252 (eval $ac_try) 2>&5
27253 ac_status=$?
27254 echo "$as_me:27254: \$? = $ac_status" >&5
27255 (exit "$ac_status"); }; }; then
27256 echo "$as_me:27256: result: yes" >&5
27257 echo "${ECHO_T}yes" >&6
27258 eval 'cf_cv_have_lib_'"slang2"'=yes'
27259 break
27260 else
27261 echo "$as_me: failed program was:" >&5
27262 cat "conftest.$ac_ext" >&5
27263 echo "$as_me:27263: result: no" >&5
27264 echo "${ECHO_T}no" >&6
27265 LIBS="$cf_save_LIBS"
27266 fi
27267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27268 done
27269
27270 fi
27271 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27272
27273 fi
27274
27275 eval 'cf_found_library="$cf_cv_have_lib_'"slang2"\"
27276
27277 if test "$cf_found_library" = no ; then
27278 { { echo "$as_me:27278: error: Cannot link slang2 library" >&5
27279 echo "$as_me: error: Cannot link slang2 library" >&2;}
27280 { (exit 1); exit 1; }; }
27281 fi
27282
27283 cf_slang_LIBS3="$LIBS"
27284 echo "$as_me:27284: checking if we can link slang2 without termcap" >&5
27285 echo $ECHO_N "checking if we can link slang2 without termcap... $ECHO_C" >&6
27286 if test -n "`echo "$cf_slang_LIBS1" | sed -e 's/ //g'`" ; then
27287 cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s%$cf_slang_LIBS1%%" -e 's%^.%%'`
27288 else
27289 cf_exclude="$cf_slang_LIBS2"
27290 fi
27291 LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s%$cf_exclude%%" -e 's%^.%%'`
27292 cat >"conftest.$ac_ext" <<_ACEOF
27293 #line 27293 "configure"
27294 #include "confdefs.h"
27295 #include <slang.h>
27296 int
27297 main (void)
27298 {
27299 SLtt_get_screen_size()
27300 ;
27301 return 0;
27302 }
27303 _ACEOF
27304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27305 if { (eval echo "$as_me:27305: \"$ac_link\"") >&5
27306 (eval $ac_link) 2>&5
27307 ac_status=$?
27308 echo "$as_me:27308: \$? = $ac_status" >&5
27309 (exit "$ac_status"); } &&
27310 { ac_try='test -s "conftest$ac_exeext"'
27311 { (eval echo "$as_me:27311: \"$ac_try\"") >&5
27312 (eval $ac_try) 2>&5
27313 ac_status=$?
27314 echo "$as_me:27314: \$? = $ac_status" >&5
27315 (exit "$ac_status"); }; }; then
27316 cf_result=yes
27317 else
27318 echo "$as_me: failed program was:" >&5
27319 cat "conftest.$ac_ext" >&5
27320 cf_result=no
27321 fi
27322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27323 echo "$as_me:27323: result: $cf_result" >&5
27324 echo "${ECHO_T}$cf_result" >&6
27325 test "$cf_result" = no && LIBS="$cf_slang_LIBS3"
27326
27327 else
27328 { { echo "$as_me:27328: error: cannot find slang headers" >&5
27329 echo "$as_me: error: cannot find slang headers" >&2;}
27330 { (exit 1); exit 1; }; }
27331 fi
27332 fi
27333
27334 # There's an unofficial set of patches for slang that gives it some limited
27335 # UTF8 capability. Unfortunately it won't compile unless one defines UTF8.
27336 echo "$as_me:27336: checking if we must define UTF8" >&5
27337 echo $ECHO_N "checking if we must define UTF8... $ECHO_C" >&6
27338 if test "${cf_cv_slang_utf8+set}" = set; then
27339 echo $ECHO_N "(cached) $ECHO_C" >&6
27340 else
27341
27342 cat >"conftest.$ac_ext" <<_ACEOF
27343 #line 27343 "configure"
27344 #include "confdefs.h"
27345 #include <slang.h>
27346 int
27347 main (void)
27348 {
27349 SLtt_get_screen_size()
27350 ;
27351 return 0;
27352 }
27353 _ACEOF
27354 rm -f "conftest.$ac_objext"
27355 if { (eval echo "$as_me:27355: \"$ac_compile\"") >&5
27356 (eval $ac_compile) 2>&5
27357 ac_status=$?
27358 echo "$as_me:27358: \$? = $ac_status" >&5
27359 (exit "$ac_status"); } &&
27360 { ac_try='test -s "conftest.$ac_objext"'
27361 { (eval echo "$as_me:27361: \"$ac_try\"") >&5
27362 (eval $ac_try) 2>&5
27363 ac_status=$?
27364 echo "$as_me:27364: \$? = $ac_status" >&5
27365 (exit "$ac_status"); }; }; then
27366 cf_cv_slang_utf8=no
27367 else
27368 echo "$as_me: failed program was:" >&5
27369 cat "conftest.$ac_ext" >&5
27370
27371 cat >"conftest.$ac_ext" <<_ACEOF
27372 #line 27372 "configure"
27373 #include "confdefs.h"
27374
27375 #define UTF8
27376 #include <slang.h>
27377 int
27378 main (void)
27379 {
27380 SLtt_get_screen_size()
27381 ;
27382 return 0;
27383 }
27384 _ACEOF
27385 rm -f "conftest.$ac_objext"
27386 if { (eval echo "$as_me:27386: \"$ac_compile\"") >&5
27387 (eval $ac_compile) 2>&5
27388 ac_status=$?
27389 echo "$as_me:27389: \$? = $ac_status" >&5
27390 (exit "$ac_status"); } &&
27391 { ac_try='test -s "conftest.$ac_objext"'
27392 { (eval echo "$as_me:27392: \"$ac_try\"") >&5
27393 (eval $ac_try) 2>&5
27394 ac_status=$?
27395 echo "$as_me:27395: \$? = $ac_status" >&5
27396 (exit "$ac_status"); }; }; then
27397 cf_cv_slang_utf8=yes
27398 else
27399 echo "$as_me: failed program was:" >&5
27400 cat "conftest.$ac_ext" >&5
27401 cf_cv_slang_utf8=unknown
27402 fi
27403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27404 fi
27405 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27406
27407 fi
27408 echo "$as_me:27408: result: $cf_cv_slang_utf8" >&5
27409 echo "${ECHO_T}$cf_cv_slang_utf8" >&6
27410
27411 if test "$cf_cv_slang_utf8" = yes ; then
27412
27413 cat >>confdefs.h <<\EOF
27414 #define UTF8 1
27415 EOF
27416
27417 fi
27418
27419 echo "$as_me:27419: checking if we must tell slang this is UNIX" >&5
27420 echo $ECHO_N "checking if we must tell slang this is UNIX... $ECHO_C" >&6
27421 if test "${cf_cv_slang_unix+set}" = set; then
27422 echo $ECHO_N "(cached) $ECHO_C" >&6
27423 else
27424
27425 cat >"conftest.$ac_ext" <<_ACEOF
27426 #line 27426 "configure"
27427 #include "confdefs.h"
27428 #include <slang.h>
27429 int
27430 main (void)
27431 {
27432
27433 #ifdef REAL_UNIX_SYSTEM
27434 #error this may not be a "real" unix system
27435 #else
27436 extern int SLang_TT_Baud_Rate;
27437 SLang_TT_Baud_Rate = 1
27438 #endif
27439
27440 ;
27441 return 0;
27442 }
27443 _ACEOF
27444 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27445 if { (eval echo "$as_me:27445: \"$ac_link\"") >&5
27446 (eval $ac_link) 2>&5
27447 ac_status=$?
27448 echo "$as_me:27448: \$? = $ac_status" >&5
27449 (exit "$ac_status"); } &&
27450 { ac_try='test -s "conftest$ac_exeext"'
27451 { (eval echo "$as_me:27451: \"$ac_try\"") >&5
27452 (eval $ac_try) 2>&5
27453 ac_status=$?
27454 echo "$as_me:27454: \$? = $ac_status" >&5
27455 (exit "$ac_status"); }; }; then
27456 cf_cv_slang_unix=yes
27457 else
27458 echo "$as_me: failed program was:" >&5
27459 cat "conftest.$ac_ext" >&5
27460 cf_cv_slang_unix=no
27461 fi
27462 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27463
27464 fi
27465 echo "$as_me:27465: result: $cf_cv_slang_unix" >&5
27466 echo "${ECHO_T}$cf_cv_slang_unix" >&6
27467 test "$cf_cv_slang_unix" = yes &&
27468 cat >>confdefs.h <<\EOF
27469 #define REAL_UNIX_SYSTEM 1
27470 EOF
27471
27472 echo "$as_me:27472: checking for SLsmg_Color_Type" >&5
27473 echo $ECHO_N "checking for SLsmg_Color_Type... $ECHO_C" >&6
27474 if test "${ac_cv_type_SLsmg_Color_Type+set}" = set; then
27475 echo $ECHO_N "(cached) $ECHO_C" >&6
27476 else
27477 cat >"conftest.$ac_ext" <<_ACEOF
27478 #line 27478 "configure"
27479 #include "confdefs.h"
27480 #include <slang.h>
27481
27482 int
27483 main (void)
27484 {
27485 if ((SLsmg_Color_Type *) 0)
27486 return 0;
27487 if (sizeof (SLsmg_Color_Type))
27488 return 0;
27489 ;
27490 return 0;
27491 }
27492 _ACEOF
27493 rm -f "conftest.$ac_objext"
27494 if { (eval echo "$as_me:27494: \"$ac_compile\"") >&5
27495 (eval $ac_compile) 2>&5
27496 ac_status=$?
27497 echo "$as_me:27497: \$? = $ac_status" >&5
27498 (exit "$ac_status"); } &&
27499 { ac_try='test -s "conftest.$ac_objext"'
27500 { (eval echo "$as_me:27500: \"$ac_try\"") >&5
27501 (eval $ac_try) 2>&5
27502 ac_status=$?
27503 echo "$as_me:27503: \$? = $ac_status" >&5
27504 (exit "$ac_status"); }; }; then
27505 ac_cv_type_SLsmg_Color_Type=yes
27506 else
27507 echo "$as_me: failed program was:" >&5
27508 cat "conftest.$ac_ext" >&5
27509 ac_cv_type_SLsmg_Color_Type=no
27510 fi
27511 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27512 fi
27513 echo "$as_me:27513: result: $ac_cv_type_SLsmg_Color_Type" >&5
27514 echo "${ECHO_T}$ac_cv_type_SLsmg_Color_Type" >&6
27515 if test "$ac_cv_type_SLsmg_Color_Type" = yes; then
27516 ac_cv_type_SLsmg_Color_Type=yes
27517 else
27518 ac_cv_type_SLsmg_Color_Type=no
27519 fi
27520
27521 if test "$ac_cv_type_SLsmg_Color_Type" = no; then
27522
27523 cat >>confdefs.h <<\EOF
27524 #define SLsmg_Color_Type int
27525 EOF
27526
27527 fi
27528
27529 echo "$as_me:27529: checking for SLtt_Char_Type" >&5
27530 echo $ECHO_N "checking for SLtt_Char_Type... $ECHO_C" >&6
27531 if test "${ac_cv_type_SLtt_Char_Type+set}" = set; then
27532 echo $ECHO_N "(cached) $ECHO_C" >&6
27533 else
27534 cat >"conftest.$ac_ext" <<_ACEOF
27535 #line 27535 "configure"
27536 #include "confdefs.h"
27537 #include <slang.h>
27538
27539 int
27540 main (void)
27541 {
27542 if ((SLtt_Char_Type *) 0)
27543 return 0;
27544 if (sizeof (SLtt_Char_Type))
27545 return 0;
27546 ;
27547 return 0;
27548 }
27549 _ACEOF
27550 rm -f "conftest.$ac_objext"
27551 if { (eval echo "$as_me:27551: \"$ac_compile\"") >&5
27552 (eval $ac_compile) 2>&5
27553 ac_status=$?
27554 echo "$as_me:27554: \$? = $ac_status" >&5
27555 (exit "$ac_status"); } &&
27556 { ac_try='test -s "conftest.$ac_objext"'
27557 { (eval echo "$as_me:27557: \"$ac_try\"") >&5
27558 (eval $ac_try) 2>&5
27559 ac_status=$?
27560 echo "$as_me:27560: \$? = $ac_status" >&5
27561 (exit "$ac_status"); }; }; then
27562 ac_cv_type_SLtt_Char_Type=yes
27563 else
27564 echo "$as_me: failed program was:" >&5
27565 cat "conftest.$ac_ext" >&5
27566 ac_cv_type_SLtt_Char_Type=no
27567 fi
27568 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27569 fi
27570 echo "$as_me:27570: result: $ac_cv_type_SLtt_Char_Type" >&5
27571 echo "${ECHO_T}$ac_cv_type_SLtt_Char_Type" >&6
27572 if test "$ac_cv_type_SLtt_Char_Type" = yes; then
27573 ac_cv_type_SLtt_Char_Type=yes
27574 else
27575 ac_cv_type_SLtt_Char_Type=no
27576 fi
27577
27578 if test "$ac_cv_type_SLtt_Char_Type" = no; then
27579
27580 cat >>confdefs.h <<\EOF
27581 #define SLtt_Char_Type unsigned long
27582 EOF
27583
27584 fi
27585
27586 dft_color_style=no
27587 ;;
27588 esac
27589
27590 LD_RPATH_OPT=
27591 if test "x$cf_cv_enable_rpath" != xno
27592 then
27593 echo "$as_me:27593: checking for an rpath option" >&5
27594 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
27595 case "$cf_cv_system_name" in
27596 (irix*)
27597 if test "$GCC" = yes; then
27598 LD_RPATH_OPT="-Wl,-rpath,"
27599 else
27600 LD_RPATH_OPT="-rpath "
27601 fi
27602 ;;
27603 (linux*|gnu*|k*bsd*-gnu|freebsd*)
27604 LD_RPATH_OPT="-Wl,-rpath,"
27605 ;;
27606 (openbsd[2-9].*|mirbsd*)
27607 LD_RPATH_OPT="-Wl,-rpath,"
27608 ;;
27609 (dragonfly*)
27610 LD_RPATH_OPT="-rpath "
27611 ;;
27612 (netbsd*)
27613 LD_RPATH_OPT="-Wl,-rpath,"
27614 ;;
27615 (osf*|mls+*)
27616 LD_RPATH_OPT="-rpath "
27617 ;;
27618 (solaris2*)
27619 LD_RPATH_OPT="-R"
27620 ;;
27621 (*)
27622 ;;
27623 esac
27624 echo "$as_me:27624: result: $LD_RPATH_OPT" >&5
27625 echo "${ECHO_T}$LD_RPATH_OPT" >&6
27626
27627 case "x$LD_RPATH_OPT" in
27628 (x-R*)
27629 echo "$as_me:27629: checking if we need a space after rpath option" >&5
27630 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
27631 cf_save_LIBS="$LIBS"
27632
27633 cf_add_libs="$LIBS"
27634 # reverse order
27635 cf_add_0lib=
27636 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
27637 # filter duplicates
27638 for cf_add_1lib in $cf_add_0lib; do
27639 for cf_add_2lib in $cf_add_libs; do
27640 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
27641 cf_add_1lib=
27642 break
27643 fi
27644 done
27645 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
27646 done
27647 LIBS="$cf_add_libs"
27648
27649 cat >"conftest.$ac_ext" <<_ACEOF
27650 #line 27650 "configure"
27651 #include "confdefs.h"
27652
27653 int
27654 main (void)
27655 {
27656
27657 ;
27658 return 0;
27659 }
27660 _ACEOF
27661 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27662 if { (eval echo "$as_me:27662: \"$ac_link\"") >&5
27663 (eval $ac_link) 2>&5
27664 ac_status=$?
27665 echo "$as_me:27665: \$? = $ac_status" >&5
27666 (exit "$ac_status"); } &&
27667 { ac_try='test -s "conftest$ac_exeext"'
27668 { (eval echo "$as_me:27668: \"$ac_try\"") >&5
27669 (eval $ac_try) 2>&5
27670 ac_status=$?
27671 echo "$as_me:27671: \$? = $ac_status" >&5
27672 (exit "$ac_status"); }; }; then
27673 cf_rpath_space=no
27674 else
27675 echo "$as_me: failed program was:" >&5
27676 cat "conftest.$ac_ext" >&5
27677 cf_rpath_space=yes
27678 fi
27679 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27680 LIBS="$cf_save_LIBS"
27681 echo "$as_me:27681: result: $cf_rpath_space" >&5
27682 echo "${ECHO_T}$cf_rpath_space" >&6
27683 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
27684 ;;
27685 esac
27686 fi
27687
27688 if test -z "$LD_RPATH_OPT"
27689 then
27690 test -n "$verbose" && echo " will not attempt to use rpath" 1>&6
27691
27692 echo "${as_me:-configure}:27692: testing will not attempt to use rpath ..." 1>&5
27693
27694 elif test "x${enable_rpath_hack:-yes}" = "xno"
27695 then
27696 test -n "$verbose" && echo " rpath is disabled" 1>&6
27697
27698 echo "${as_me:-configure}:27698: testing rpath is disabled ..." 1>&5
27699
27700 elif test -z "${LD_RUN_PATH}${LD_LIBRARY_PATH}"
27701 then
27702 case "$LIBS" in
27703 (*-L/*)
27704
27705 if test "$cross_compiling" = yes; then
27706 cf_check_run=unknown
27707 else
27708 cat >"conftest.$ac_ext" <<_ACEOF
27709 #line 27709 "configure"
27710 #include "confdefs.h"
27711 $ac_includes_default
27712 int main(void) {
27713 fflush(stderr);
27714 ${cf_cv_main_return:-return}(0);
27715 }
27716 _ACEOF
27717 rm -f "conftest$ac_exeext"
27718 if { (eval echo "$as_me:27718: \"$ac_link\"") >&5
27719 (eval $ac_link) 2>&5
27720 ac_status=$?
27721 echo "$as_me:27721: \$? = $ac_status" >&5
27722 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27723 { (eval echo "$as_me:27723: \"$ac_try\"") >&5
27724 (eval $ac_try) 2>&5
27725 ac_status=$?
27726 echo "$as_me:27726: \$? = $ac_status" >&5
27727 (exit "$ac_status"); }; }; then
27728 cf_check_run=yes
27729 else
27730 echo "$as_me: program exited with status $ac_status" >&5
27731 echo "$as_me: failed program was:" >&5
27732 cat "conftest.$ac_ext" >&5
27733 cf_check_run=no
27734 fi
27735 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27736 fi
27737
27738 if test "x$cf_check_run" = xno
27739 then
27740 test -n "$verbose" && echo " linkage is broken" 1>&6
27741
27742 echo "${as_me:-configure}:27742: testing linkage is broken ..." 1>&5
27743
27744 cf_result=
27745 for cf_item in $LIBS
27746 do
27747 case " $cf_item" in
27748 (\ -L/*)
27749 cf_rpath_arg=`echo " $cf_item" | sed -e "s% -L%$LD_RPATH_OPT%"`
27750 cf_rpath_tmp=`echo "$cf_result " | sed -e "s% $cf_rpath_arg % %"`
27751 if test "x$cf_result " = "x$cf_rpath_tmp"
27752 then
27753 cf_result="$cf_result $cf_rpath_arg"
27754 fi
27755 cf_rpath_tmp=`echo "$cf_result " | sed -e "s% $cf_item % %g"`
27756 if test "x$cf_result " != "x$cf_rpath_tmp"
27757 then
27758 continue
27759 fi
27760 ;;
27761 esac
27762 cf_result="$cf_result $cf_item"
27763 done
27764 cf_result=`echo "$cf_result" | sed -e 's/^ //'`
27765 if test "x$cf_result" != "x$LIBS"
27766 then
27767 cf_save_LIBS="$LIBS"
27768 LIBS="$cf_result"
27769
27770 if test "$cross_compiling" = yes; then
27771 cf_check_run=unknown
27772 else
27773 cat >"conftest.$ac_ext" <<_ACEOF
27774 #line 27774 "configure"
27775 #include "confdefs.h"
27776 $ac_includes_default
27777 int main(void) {
27778 fflush(stderr);
27779 ${cf_cv_main_return:-return}(0);
27780 }
27781 _ACEOF
27782 rm -f "conftest$ac_exeext"
27783 if { (eval echo "$as_me:27783: \"$ac_link\"") >&5
27784 (eval $ac_link) 2>&5
27785 ac_status=$?
27786 echo "$as_me:27786: \$? = $ac_status" >&5
27787 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27788 { (eval echo "$as_me:27788: \"$ac_try\"") >&5
27789 (eval $ac_try) 2>&5
27790 ac_status=$?
27791 echo "$as_me:27791: \$? = $ac_status" >&5
27792 (exit "$ac_status"); }; }; then
27793 cf_check_run=yes
27794 else
27795 echo "$as_me: program exited with status $ac_status" >&5
27796 echo "$as_me: failed program was:" >&5
27797 cat "conftest.$ac_ext" >&5
27798 cf_check_run=no
27799 fi
27800 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27801 fi
27802
27803 if test "x$cf_check_run" = "xyes"
27804 then
27805 test -n "$verbose" && echo " use rpath for $cf_save_LIBS" 1>&6
27806
27807 echo "${as_me:-configure}:27807: testing use rpath for $cf_save_LIBS ..." 1>&5
27808
27809 LIBS="$cf_result"
27810 test -n "$verbose" && echo " result is now $LIBS" 1>&6
27811
27812 echo "${as_me:-configure}:27812: testing result is now $LIBS ..." 1>&5
27813
27814 else
27815 LIBS="$cf_save_LIBS"
27816 fi
27817 fi
27818 fi
27819 ;;
27820 (*)
27821 test -n "$verbose" && echo " will not attempt to use rpath" 1>&6
27822
27823 echo "${as_me:-configure}:27823: testing will not attempt to use rpath ..." 1>&5
27824
27825 ;;
27826 esac
27827 fi
27828
27829 echo "$as_me:27829: checking for chtype typedef" >&5
27830 echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
27831 if test "${cf_cv_chtype_decl+set}" = set; then
27832 echo $ECHO_N "(cached) $ECHO_C" >&6
27833 else
27834
27835 cat >"conftest.$ac_ext" <<_ACEOF
27836 #line 27836 "configure"
27837 #include "confdefs.h"
27838 #include <${cf_cv_ncurses_header:-curses.h}>
27839 int
27840 main (void)
27841 {
27842 chtype foo; (void)foo
27843 ;
27844 return 0;
27845 }
27846 _ACEOF
27847 rm -f "conftest.$ac_objext"
27848 if { (eval echo "$as_me:27848: \"$ac_compile\"") >&5
27849 (eval $ac_compile) 2>&5
27850 ac_status=$?
27851 echo "$as_me:27851: \$? = $ac_status" >&5
27852 (exit "$ac_status"); } &&
27853 { ac_try='test -s "conftest.$ac_objext"'
27854 { (eval echo "$as_me:27854: \"$ac_try\"") >&5
27855 (eval $ac_try) 2>&5
27856 ac_status=$?
27857 echo "$as_me:27857: \$? = $ac_status" >&5
27858 (exit "$ac_status"); }; }; then
27859 cf_cv_chtype_decl=yes
27860 else
27861 echo "$as_me: failed program was:" >&5
27862 cat "conftest.$ac_ext" >&5
27863 cf_cv_chtype_decl=no
27864 fi
27865 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27866 fi
27867 echo "$as_me:27867: result: $cf_cv_chtype_decl" >&5
27868 echo "${ECHO_T}$cf_cv_chtype_decl" >&6
27869 if test "$cf_cv_chtype_decl" = yes ; then
27870
27871 cat >>confdefs.h <<\EOF
27872 #define HAVE_TYPE_CHTYPE 1
27873 EOF
27874
27875 echo "$as_me:27875: checking if chtype is scalar or struct" >&5
27876 echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
27877 if test "${cf_cv_chtype_type+set}" = set; then
27878 echo $ECHO_N "(cached) $ECHO_C" >&6
27879 else
27880
27881 cat >"conftest.$ac_ext" <<_ACEOF
27882 #line 27882 "configure"
27883 #include "confdefs.h"
27884 #include <${cf_cv_ncurses_header:-curses.h}>
27885 int
27886 main (void)
27887 {
27888 static chtype foo; long x = foo; (void)x
27889 ;
27890 return 0;
27891 }
27892 _ACEOF
27893 rm -f "conftest.$ac_objext"
27894 if { (eval echo "$as_me:27894: \"$ac_compile\"") >&5
27895 (eval $ac_compile) 2>&5
27896 ac_status=$?
27897 echo "$as_me:27897: \$? = $ac_status" >&5
27898 (exit "$ac_status"); } &&
27899 { ac_try='test -s "conftest.$ac_objext"'
27900 { (eval echo "$as_me:27900: \"$ac_try\"") >&5
27901 (eval $ac_try) 2>&5
27902 ac_status=$?
27903 echo "$as_me:27903: \$? = $ac_status" >&5
27904 (exit "$ac_status"); }; }; then
27905 cf_cv_chtype_type=scalar
27906 else
27907 echo "$as_me: failed program was:" >&5
27908 cat "conftest.$ac_ext" >&5
27909 cf_cv_chtype_type=struct
27910 fi
27911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27912 fi
27913 echo "$as_me:27913: result: $cf_cv_chtype_type" >&5
27914 echo "${ECHO_T}$cf_cv_chtype_type" >&6
27915 if test "$cf_cv_chtype_type" = scalar ; then
27916
27917 cat >>confdefs.h <<\EOF
27918 #define TYPE_CHTYPE_IS_SCALAR 1
27919 EOF
27920
27921 fi
27922 fi
27923
27924 echo "$as_me:27924: checking if you want the wide-curses features" >&5
27925 echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
27926
27927 # Check whether --enable-widec or --disable-widec was given.
27928 if test "${enable_widec+set}" = set; then
27929 enableval="$enable_widec"
27930 test "$enableval" != yes && enableval=no
27931 if test "$enableval" != "no" ; then
27932 use_wide_curses=$enableval
27933 else
27934 use_wide_curses=$cf_wide_curses
27935 fi
27936 else
27937 enableval=no
27938 use_wide_curses=$cf_wide_curses
27939
27940 fi;
27941 echo "$as_me:27941: result: $use_wide_curses" >&5
27942 echo "${ECHO_T}$use_wide_curses" >&6
27943
27944 echo "$as_me:27944: checking if color-style code should be used" >&5
27945 echo $ECHO_N "checking if color-style code should be used... $ECHO_C" >&6
27946
27947 # Check whether --enable-color-style or --disable-color-style was given.
27948 if test "${enable_color_style+set}" = set; then
27949 enableval="$enable_color_style"
27950 test "$enableval" != no && enableval=yes
27951 if test "$enableval" != "yes" ; then
27952 use_color_style=$enableval
27953 else
27954 use_color_style=$dft_color_style
27955 fi
27956 else
27957 enableval=yes
27958 use_color_style=$dft_color_style
27959
27960 fi;
27961
27962 case "$use_color_style" in
27963 (no)
27964 echo "$as_me:27964: result: no" >&5
27965 echo "${ECHO_T}no" >&6
27966 INSTALL_LSS=
27967 ;;
27968 (*)
27969
27970 cat >>confdefs.h <<\EOF
27971 #define USE_COLOR_STYLE 1
27972 EOF
27973
27974 echo "$as_me:27974: result: yes" >&5
27975 echo "${ECHO_T}yes" >&6
27976
27977 echo "$as_me:27977: checking for location of style-sheet file" >&5
27978 echo $ECHO_N "checking for location of style-sheet file... $ECHO_C" >&6
27979
27980 # Check whether --with-lss-file or --without-lss-file was given.
27981 if test "${with_lss_file+set}" = set; then
27982 withval="$with_lss_file"
27983
27984 else
27985 withval="${LYNX_LSS_FILE:-$sysconfdir/lynx.lss}"
27986 fi; if test -n "$sysconfdir/lynx.lss" ; then
27987
27988 if test "x$prefix" != xNONE; then
27989 cf_path_syntax="$prefix"
27990 else
27991 cf_path_syntax="$ac_default_prefix"
27992 fi
27993
27994 case "x$withval" in
27995 (x\$\(*\)*|x\'*\'*)
27996 ;;
27997 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
27998 ;;
27999 (x\$\{*prefix\}*|x\$\{*dir\}*)
28000 eval withval="$withval"
28001 case "x$withval" in
28002 (xNONE/*)
28003 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28004 ;;
28005 esac
28006 ;;
28007 (xno|xNONE/*)
28008 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28009 ;;
28010 (*)
28011 { { echo "$as_me:28011: error: expected a pathname, not \"$withval\"" >&5
28012 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28013 { (exit 1); exit 1; }; }
28014 ;;
28015 esac
28016
28017 fi
28018 eval LYNX_LSS_FILE="$withval"
28019
28020 echo "$as_me:28020: result: $LYNX_LSS_FILE" >&5
28021 echo "${ECHO_T}$LYNX_LSS_FILE" >&6
28022
28023 test "$LYNX_LSS_FILE" = no && LYNX_LSS_FILE=
28024
28025 cat >>confdefs.h <<EOF
28026 #define LYNX_LSS_FILE "$LYNX_LSS_FILE"
28027 EOF
28028
28029 INSTALL_LSS=install-lss
28030 ;;
28031 esac
28032
28033 echo "$as_me:28033: checking for the default configuration-file" >&5
28034 echo $ECHO_N "checking for the default configuration-file... $ECHO_C" >&6
28035
28036 # Check whether --with-cfg-file or --without-cfg-file was given.
28037 if test "${with_cfg_file+set}" = set; then
28038 withval="$with_cfg_file"
28039
28040 else
28041 withval="${LYNX_CFG_FILE:-$sysconfdir/lynx.cfg}"
28042 fi; if test -n "$sysconfdir/lynx.cfg" ; then
28043
28044 if test "x$prefix" != xNONE; then
28045 cf_path_syntax="$prefix"
28046 else
28047 cf_path_syntax="$ac_default_prefix"
28048 fi
28049
28050 case "x$withval" in
28051 (x\$\(*\)*|x\'*\'*)
28052 ;;
28053 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
28054 ;;
28055 (x\$\{*prefix\}*|x\$\{*dir\}*)
28056 eval withval="$withval"
28057 case "x$withval" in
28058 (xNONE/*)
28059 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28060 ;;
28061 esac
28062 ;;
28063 (xno|xNONE/*)
28064 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28065 ;;
28066 (*)
28067 { { echo "$as_me:28067: error: expected a pathname, not \"$withval\"" >&5
28068 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28069 { (exit 1); exit 1; }; }
28070 ;;
28071 esac
28072
28073 fi
28074 eval LYNX_CFG_FILE="$withval"
28075
28076 echo "$as_me:28076: result: $LYNX_CFG_FILE" >&5
28077 echo "${ECHO_T}$LYNX_CFG_FILE" >&6
28078
28079 test "$LYNX_CFG_FILE" = no && LYNX_CFG_FILE=
28080
28081 cat >>confdefs.h <<EOF
28082 #define LYNX_CFG_FILE "$LYNX_CFG_FILE"
28083 EOF
28084
28085 echo "$as_me:28085: checking for the default configuration-path" >&5
28086 echo $ECHO_N "checking for the default configuration-path... $ECHO_C" >&6
28087
28088 # Check whether --with-cfg-path or --without-cfg-path was given.
28089 if test "${with_cfg_path+set}" = set; then
28090 withval="$with_cfg_path"
28091
28092 else
28093 withval="${LYNX_CFG_PATH:-$sysconfdir}"
28094 fi; if test -n "$sysconfdir" ; then
28095
28096 if test "x$prefix" != xNONE; then
28097 cf_path_syntax="$prefix"
28098 else
28099 cf_path_syntax="$ac_default_prefix"
28100 fi
28101
28102 case "x$withval" in
28103 (x\$\(*\)*|x\'*\'*)
28104 ;;
28105 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
28106 ;;
28107 (x\$\{*prefix\}*|x\$\{*dir\}*)
28108 eval withval="$withval"
28109 case "x$withval" in
28110 (xNONE/*)
28111 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28112 ;;
28113 esac
28114 ;;
28115 (xno|xNONE/*)
28116 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28117 ;;
28118 (*)
28119 { { echo "$as_me:28119: error: expected a pathname, not \"$withval\"" >&5
28120 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28121 { (exit 1); exit 1; }; }
28122 ;;
28123 esac
28124
28125 fi
28126 eval LYNX_CFG_PATH="$withval"
28127
28128 echo "$as_me:28128: result: $LYNX_CFG_PATH" >&5
28129 echo "${ECHO_T}$LYNX_CFG_PATH" >&6
28130
28131 test -z "$LYNX_CFG_PATH" && LYNX_CFG_PATH="`echo "$LYNX_CFG_FILE" | sed -e 's%/[^/]*$%%'`"
28132 test "x$LYNX_CFG_PATH" = xno && LYNX_CFG_PATH=
28133
28134 cat >>confdefs.h <<EOF
28135 #define LYNX_CFG_PATH "$LYNX_CFG_PATH"
28136 EOF
28137
28138 echo "$as_me:28138: checking for MIME library directory" >&5
28139 echo $ECHO_N "checking for MIME library directory... $ECHO_C" >&6
28140
28141 # Check whether --with-mime-libdir or --without-mime-libdir was given.
28142 if test "${with_mime_libdir+set}" = set; then
28143 withval="$with_mime_libdir"
28144
28145 else
28146 withval="${MIME_LIBDIR:-/etc}"
28147 fi; if true ; then
28148
28149 if test "x$prefix" != xNONE; then
28150 cf_path_syntax="$prefix"
28151 else
28152 cf_path_syntax="$ac_default_prefix"
28153 fi
28154
28155 case "x$withval" in
28156 (x\$\(*\)*|x\'*\'*)
28157 ;;
28158 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
28159 ;;
28160 (x\$\{*prefix\}*|x\$\{*dir\}*)
28161 eval withval="$withval"
28162 case "x$withval" in
28163 (xNONE/*)
28164 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28165 ;;
28166 esac
28167 ;;
28168 (xno|xNONE/*)
28169 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28170 ;;
28171 (*)
28172 { { echo "$as_me:28172: error: expected a pathname, not \"$withval\"" >&5
28173 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28174 { (exit 1); exit 1; }; }
28175 ;;
28176 esac
28177
28178 fi
28179 eval MIME_LIBDIR="$withval"
28180
28181 echo "$as_me:28181: result: $MIME_LIBDIR" >&5
28182 echo "${ECHO_T}$MIME_LIBDIR" >&6
28183 MIME_LIBDIR=`echo "$MIME_LIBDIR" | sed -e 's,/$,,' -e 's,$,/,'`
28184
28185 cat >>confdefs.h <<EOF
28186 #define MIME_LIBDIR "$MIME_LIBDIR"
28187 EOF
28188
28189 echo "$as_me:28189: checking for usable UTF-8 support" >&5
28190 echo $ECHO_N "checking for usable UTF-8 support... $ECHO_C" >&6
28191 cf_full_locale=$use_wide_curses
28192 if test "$cf_full_locale" = yes; then
28193 case $cf_cv_screen in
28194 (ncurses*)
28195 ;;
28196 (*)
28197 cf_full_locale=no
28198 ;;
28199 esac
28200 fi
28201 echo "$as_me:28201: result: $cf_full_locale" >&5
28202 echo "${ECHO_T}$cf_full_locale" >&6
28203
28204 echo "$as_me:28204: checking if locale-charset selection logic should be used" >&5
28205 echo $ECHO_N "checking if locale-charset selection logic should be used... $ECHO_C" >&6
28206
28207 # Check whether --enable-locale-charset or --disable-locale-charset was given.
28208 if test "${enable_locale_charset+set}" = set; then
28209 enableval="$enable_locale_charset"
28210 test "$enableval" != no && enableval=yes
28211 if test "$enableval" != "yes" ; then
28212 use_locale_charset=$enableval
28213 else
28214 use_locale_charset=yes
28215 fi
28216 else
28217 enableval=yes
28218 use_locale_charset=yes
28219
28220 fi;
28221 echo "$as_me:28221: result: $use_locale_charset" >&5
28222 echo "${ECHO_T}$use_locale_charset" >&6
28223 if test "$use_locale_charset" != no; then
28224
28225 cat >>confdefs.h <<\EOF
28226 #define USE_LOCALE_CHARSET 1
28227 EOF
28228
28229 DEFAULT_LOCALE_CHARSET=FALSE
28230 test $cf_full_locale = yes && DEFAULT_LOCALE_CHARSET=TRUE
28231 else
28232 DEFAULT_LOCALE_CHARSET=DISABLED
28233 fi
28234
28235 cat >>confdefs.h <<EOF
28236 #define DEFAULT_LOCALE_CHARSET $DEFAULT_LOCALE_CHARSET
28237 EOF
28238
28239 echo "$as_me:28239: checking if wcwidth/UTF-8 logic should be used" >&5
28240 echo $ECHO_N "checking if wcwidth/UTF-8 logic should be used... $ECHO_C" >&6
28241
28242 # Check whether --enable-wcwidth-support or --disable-wcwidth-support was given.
28243 if test "${enable_wcwidth_support+set}" = set; then
28244 enableval="$enable_wcwidth_support"
28245 test "$enableval" != no && enableval=yes
28246 if test "$enableval" != "yes" ; then
28247 use_wcwidth=$enableval
28248 else
28249 use_wcwidth=maybe
28250 fi
28251 else
28252 enableval=yes
28253 use_wcwidth=maybe
28254
28255 fi;
28256 if test "$use_wcwidth" = maybe; then
28257 if test "$cf_full_locale" != no; then
28258 use_wcwidth=yes
28259 else
28260 use_wcwidth=no
28261 fi
28262 fi
28263 echo "$as_me:28263: result: $use_wcwidth" >&5
28264 echo "${ECHO_T}$use_wcwidth" >&6
28265 test "$use_wcwidth" != no &&
28266 cat >>confdefs.h <<\EOF
28267 #define USE_WCWIDTH_SUPPORT 1
28268 EOF
28269
28270 CHARSET_DEFS=
28271
28272 echo "$as_me:28272: checking if you want only a few charsets" >&5
28273 echo $ECHO_N "checking if you want only a few charsets... $ECHO_C" >&6
28274
28275 # Check whether --with-charsets or --without-charsets was given.
28276 if test "${with_charsets+set}" = set; then
28277 withval="$with_charsets"
28278 cf_charsets=$withval
28279 else
28280 cf_charsets=
28281 fi;
28282
28283 if test -n "$cf_charsets" ; then
28284 echo "$as_me:28284: result: yes" >&5
28285 echo "${ECHO_T}yes" >&6
28286
28287 cat >>confdefs.h <<\EOF
28288 #define ALL_CHARSETS 0
28289 EOF
28290
28291 cf_min_charsets=us-ascii,iso-8859-1,utf-8
28292 if test "$cf_charsets" = "no" ; then
28293 cf_charsets=minimal
28294 fi
28295 if test "$cf_charsets" = "minimal" ; then
28296 test -n "$verbose" && echo " using minimal list of charsets: $cf_min_charsets" 1>&6
28297
28298 echo "${as_me:-configure}:28298: testing using minimal list of charsets: $cf_min_charsets ..." 1>&5
28299
28300 fi
28301 cf_charsets=`echo "$cf_charsets" | sed -e "s/minimal/$cf_min_charsets/g" -e 's/,/ /g'`
28302 for cf_charset in $cf_charsets
28303 do
28304 cf_def_charset=`echo "$cf_charset" | sed -e 's/+/_/g' -e 's/-/_/g'`
28305 cf_use_charset=no
28306 # check charsets that are defined via .tbl files
28307 if ( ${EGREP-egrep} '^M'"$cf_charset"'$' "$srcdir"/src/chrtrans/*.tbl 2>/dev/null >/dev/null )
28308 then
28309 cf_use_charset=yes
28310 # check charsets that are "built-in"
28311 else
28312 for cf_tst_charset in big5 euc_cn euc_jp euc_kr shift_jis x_transparent
28313 do
28314 if test "$cf_tst_charset" = "$cf_def_charset"
28315 then
28316 cf_use_charset=yes
28317 break
28318 fi
28319 done
28320 fi
28321 if test "$cf_use_charset" = yes
28322 then
28323 test -n "$verbose" && echo " found $cf_charset" 1>&6
28324
28325 echo "${as_me:-configure}:28325: testing found $cf_charset ..." 1>&5
28326
28327 CHARSET_DEFS="-DNO_CHARSET_${cf_def_charset}=0 $CHARSET_DEFS"
28328 else
28329 test -n "$verbose" && echo " not found $cf_charset" 1>&6
28330
28331 echo "${as_me:-configure}:28331: testing not found $cf_charset ..." 1>&5
28332
28333 fi
28334 done
28335 else
28336 echo "$as_me:28336: result: no" >&5
28337 echo "${ECHO_T}no" >&6
28338 fi
28339
28340 echo "$as_me:28340: checking whether time.h and sys/time.h may both be included" >&5
28341 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
28342 if test "${ac_cv_header_time+set}" = set; then
28343 echo $ECHO_N "(cached) $ECHO_C" >&6
28344 else
28345 cat >"conftest.$ac_ext" <<_ACEOF
28346 #line 28346 "configure"
28347 #include "confdefs.h"
28348 #include <sys/types.h>
28349 #include <sys/time.h>
28350 #include <time.h>
28351
28352 int
28353 main (void)
28354 {
28355 if ((struct tm *) 0)
28356 return 0;
28357 ;
28358 return 0;
28359 }
28360 _ACEOF
28361 rm -f "conftest.$ac_objext"
28362 if { (eval echo "$as_me:28362: \"$ac_compile\"") >&5
28363 (eval $ac_compile) 2>&5
28364 ac_status=$?
28365 echo "$as_me:28365: \$? = $ac_status" >&5
28366 (exit "$ac_status"); } &&
28367 { ac_try='test -s "conftest.$ac_objext"'
28368 { (eval echo "$as_me:28368: \"$ac_try\"") >&5
28369 (eval $ac_try) 2>&5
28370 ac_status=$?
28371 echo "$as_me:28371: \$? = $ac_status" >&5
28372 (exit "$ac_status"); }; }; then
28373 ac_cv_header_time=yes
28374 else
28375 echo "$as_me: failed program was:" >&5
28376 cat "conftest.$ac_ext" >&5
28377 ac_cv_header_time=no
28378 fi
28379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28380 fi
28381 echo "$as_me:28381: result: $ac_cv_header_time" >&5
28382 echo "${ECHO_T}$ac_cv_header_time" >&6
28383 if test $ac_cv_header_time = yes; then
28384
28385 cat >>confdefs.h <<\EOF
28386 #define TIME_WITH_SYS_TIME 1
28387 EOF
28388
28389 fi
28390
28391 ac_header_dirent=no
28392 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
28393 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
28394 echo "$as_me:28394: checking for $ac_hdr that defines DIR" >&5
28395 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
28396 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28397 echo $ECHO_N "(cached) $ECHO_C" >&6
28398 else
28399 cat >"conftest.$ac_ext" <<_ACEOF
28400 #line 28400 "configure"
28401 #include "confdefs.h"
28402 #include <sys/types.h>
28403 #include <$ac_hdr>
28404
28405 int
28406 main (void)
28407 {
28408 if ((DIR *) 0)
28409 return 0;
28410 ;
28411 return 0;
28412 }
28413 _ACEOF
28414 rm -f "conftest.$ac_objext"
28415 if { (eval echo "$as_me:28415: \"$ac_compile\"") >&5
28416 (eval $ac_compile) 2>&5
28417 ac_status=$?
28418 echo "$as_me:28418: \$? = $ac_status" >&5
28419 (exit "$ac_status"); } &&
28420 { ac_try='test -s "conftest.$ac_objext"'
28421 { (eval echo "$as_me:28421: \"$ac_try\"") >&5
28422 (eval $ac_try) 2>&5
28423 ac_status=$?
28424 echo "$as_me:28424: \$? = $ac_status" >&5
28425 (exit "$ac_status"); }; }; then
28426 eval "$as_ac_Header=yes"
28427 else
28428 echo "$as_me: failed program was:" >&5
28429 cat "conftest.$ac_ext" >&5
28430 eval "$as_ac_Header=no"
28431 fi
28432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28433 fi
28434 echo "$as_me:28434: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
28435 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
28436 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
28437 cat >>confdefs.h <<EOF
28438 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
28439 EOF
28440
28441 ac_header_dirent=$ac_hdr; break
28442 fi
28443
28444 done
28445 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
28446 if test $ac_header_dirent = dirent.h; then
28447 echo "$as_me:28447: checking for opendir in -ldir" >&5
28448 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
28449 if test "${ac_cv_lib_dir_opendir+set}" = set; then
28450 echo $ECHO_N "(cached) $ECHO_C" >&6
28451 else
28452 ac_check_lib_save_LIBS=$LIBS
28453 LIBS="-ldir $LIBS"
28454 cat >"conftest.$ac_ext" <<_ACEOF
28455 #line 28455 "configure"
28456 #include "confdefs.h"
28457
28458 /* Override any gcc2 internal prototype to avoid an error. */
28459 #ifdef __cplusplus
28460 extern "C"
28461 #endif
28462 /* We use char because int might match the return type of a gcc2
28463 builtin and then its argument prototype would still apply. */
28464 char opendir (void);
28465 int
28466 main (void)
28467 {
28468 opendir ();
28469 ;
28470 return 0;
28471 }
28472 _ACEOF
28473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28474 if { (eval echo "$as_me:28474: \"$ac_link\"") >&5
28475 (eval $ac_link) 2>&5
28476 ac_status=$?
28477 echo "$as_me:28477: \$? = $ac_status" >&5
28478 (exit "$ac_status"); } &&
28479 { ac_try='test -s "conftest$ac_exeext"'
28480 { (eval echo "$as_me:28480: \"$ac_try\"") >&5
28481 (eval $ac_try) 2>&5
28482 ac_status=$?
28483 echo "$as_me:28483: \$? = $ac_status" >&5
28484 (exit "$ac_status"); }; }; then
28485 ac_cv_lib_dir_opendir=yes
28486 else
28487 echo "$as_me: failed program was:" >&5
28488 cat "conftest.$ac_ext" >&5
28489 ac_cv_lib_dir_opendir=no
28490 fi
28491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28492 LIBS=$ac_check_lib_save_LIBS
28493 fi
28494 echo "$as_me:28494: result: $ac_cv_lib_dir_opendir" >&5
28495 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
28496 if test "$ac_cv_lib_dir_opendir" = yes; then
28497 LIBS="$LIBS -ldir"
28498 fi
28499
28500 else
28501 echo "$as_me:28501: checking for opendir in -lx" >&5
28502 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
28503 if test "${ac_cv_lib_x_opendir+set}" = set; then
28504 echo $ECHO_N "(cached) $ECHO_C" >&6
28505 else
28506 ac_check_lib_save_LIBS=$LIBS
28507 LIBS="-lx $LIBS"
28508 cat >"conftest.$ac_ext" <<_ACEOF
28509 #line 28509 "configure"
28510 #include "confdefs.h"
28511
28512 /* Override any gcc2 internal prototype to avoid an error. */
28513 #ifdef __cplusplus
28514 extern "C"
28515 #endif
28516 /* We use char because int might match the return type of a gcc2
28517 builtin and then its argument prototype would still apply. */
28518 char opendir (void);
28519 int
28520 main (void)
28521 {
28522 opendir ();
28523 ;
28524 return 0;
28525 }
28526 _ACEOF
28527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28528 if { (eval echo "$as_me:28528: \"$ac_link\"") >&5
28529 (eval $ac_link) 2>&5
28530 ac_status=$?
28531 echo "$as_me:28531: \$? = $ac_status" >&5
28532 (exit "$ac_status"); } &&
28533 { ac_try='test -s "conftest$ac_exeext"'
28534 { (eval echo "$as_me:28534: \"$ac_try\"") >&5
28535 (eval $ac_try) 2>&5
28536 ac_status=$?
28537 echo "$as_me:28537: \$? = $ac_status" >&5
28538 (exit "$ac_status"); }; }; then
28539 ac_cv_lib_x_opendir=yes
28540 else
28541 echo "$as_me: failed program was:" >&5
28542 cat "conftest.$ac_ext" >&5
28543 ac_cv_lib_x_opendir=no
28544 fi
28545 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28546 LIBS=$ac_check_lib_save_LIBS
28547 fi
28548 echo "$as_me:28548: result: $ac_cv_lib_x_opendir" >&5
28549 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
28550 if test "$ac_cv_lib_x_opendir" = yes; then
28551 LIBS="$LIBS -lx"
28552 fi
28553
28554 fi
28555
28556 for ac_header in \
28557 arpa/inet.h \
28558 fcntl.h \
28559 limits.h \
28560 sys/fcntl.h \
28561 sys/filio.h \
28562 sys/ioctl.h \
28563 sys/param.h \
28564 sys/timeb.h \
28565 sys/time.h \
28566 syslog.h \
28567 termio.h \
28568 termios.h \
28569 vfork.h \
28570 wchar.h \
28571
28572 do
28573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28574 echo "$as_me:28574: checking for $ac_header" >&5
28575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28577 echo $ECHO_N "(cached) $ECHO_C" >&6
28578 else
28579 cat >"conftest.$ac_ext" <<_ACEOF
28580 #line 28580 "configure"
28581 #include "confdefs.h"
28582 #include <$ac_header>
28583 _ACEOF
28584 if { (eval echo "$as_me:28584: \"$ac_cpp "conftest.$ac_ext"\"") >&5
28585 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
28586 ac_status=$?
28587 $EGREP -v '^ *\+' conftest.er1 >conftest.err
28588 rm -f conftest.er1
28589 cat conftest.err >&5
28590 echo "$as_me:28590: \$? = $ac_status" >&5
28591 (exit "$ac_status"); } >/dev/null; then
28592 if test -s conftest.err; then
28593 ac_cpp_err=$ac_c_preproc_warn_flag
28594 else
28595 ac_cpp_err=
28596 fi
28597 else
28598 ac_cpp_err=yes
28599 fi
28600 if test -z "$ac_cpp_err"; then
28601 eval "$as_ac_Header=yes"
28602 else
28603 echo "$as_me: failed program was:" >&5
28604 cat "conftest.$ac_ext" >&5
28605 eval "$as_ac_Header=no"
28606 fi
28607 rm -f conftest.err "conftest.$ac_ext"
28608 fi
28609 echo "$as_me:28609: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
28610 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
28611 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
28612 cat >>confdefs.h <<EOF
28613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28614 EOF
28615
28616 fi
28617 done
28618
28619 echo "$as_me:28619: checking termio.h and termios.h" >&5
28620 echo $ECHO_N "checking termio.h and termios.h... $ECHO_C" >&6
28621 if test "${cf_cv_termio_and_termios+set}" = set; then
28622 echo $ECHO_N "(cached) $ECHO_C" >&6
28623 else
28624
28625 cat >"conftest.$ac_ext" <<_ACEOF
28626 #line 28626 "configure"
28627 #include "confdefs.h"
28628
28629 #include <stdio.h>
28630 #if HAVE_TERMIO_H
28631 #include <termio.h>
28632 #endif
28633 #if HAVE_TERMIOS_H
28634 #include <termios.h>
28635 #endif
28636 int
28637 main (void)
28638 {
28639 putchar (0x0a)
28640 ;
28641 return 0;
28642 }
28643 _ACEOF
28644 rm -f "conftest.$ac_objext"
28645 if { (eval echo "$as_me:28645: \"$ac_compile\"") >&5
28646 (eval $ac_compile) 2>&5
28647 ac_status=$?
28648 echo "$as_me:28648: \$? = $ac_status" >&5
28649 (exit "$ac_status"); } &&
28650 { ac_try='test -s "conftest.$ac_objext"'
28651 { (eval echo "$as_me:28651: \"$ac_try\"") >&5
28652 (eval $ac_try) 2>&5
28653 ac_status=$?
28654 echo "$as_me:28654: \$? = $ac_status" >&5
28655 (exit "$ac_status"); }; }; then
28656 cf_cv_termio_and_termios=yes
28657 else
28658 echo "$as_me: failed program was:" >&5
28659 cat "conftest.$ac_ext" >&5
28660 cf_cv_termio_and_termios=no
28661 fi
28662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28663 fi
28664
28665 echo "$as_me:28665: result: $cf_cv_termio_and_termios" >&5
28666 echo "${ECHO_T}$cf_cv_termio_and_termios" >&6
28667 test "$cf_cv_termio_and_termios" = no &&
28668 cat >>confdefs.h <<\EOF
28669 #define TERMIO_AND_TERMIOS 1
28670 EOF
28671
28672 echo "$as_me:28672: checking for sigaction and structs" >&5
28673 echo $ECHO_N "checking for sigaction and structs... $ECHO_C" >&6
28674 if test "${cf_cv_func_sigaction+set}" = set; then
28675 echo $ECHO_N "(cached) $ECHO_C" >&6
28676 else
28677
28678 cat >"conftest.$ac_ext" <<_ACEOF
28679 #line 28679 "configure"
28680 #include "confdefs.h"
28681
28682 #include <sys/types.h>
28683 #include <signal.h>
28684 int
28685 main (void)
28686 {
28687 struct sigaction act;
28688 act.sa_handler = SIG_DFL;
28689 #ifdef SA_RESTART
28690 act.sa_flags = SA_RESTART;
28691 #endif /* SA_RESTART */
28692 sigaction(1, &act, (void*)0);
28693
28694 ;
28695 return 0;
28696 }
28697 _ACEOF
28698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28699 if { (eval echo "$as_me:28699: \"$ac_link\"") >&5
28700 (eval $ac_link) 2>&5
28701 ac_status=$?
28702 echo "$as_me:28702: \$? = $ac_status" >&5
28703 (exit "$ac_status"); } &&
28704 { ac_try='test -s "conftest$ac_exeext"'
28705 { (eval echo "$as_me:28705: \"$ac_try\"") >&5
28706 (eval $ac_try) 2>&5
28707 ac_status=$?
28708 echo "$as_me:28708: \$? = $ac_status" >&5
28709 (exit "$ac_status"); }; }; then
28710 cf_cv_func_sigaction=yes
28711 else
28712 echo "$as_me: failed program was:" >&5
28713 cat "conftest.$ac_ext" >&5
28714 cf_cv_func_sigaction=no
28715 fi
28716 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28717
28718 fi
28719 echo "$as_me:28719: result: $cf_cv_func_sigaction" >&5
28720 echo "${ECHO_T}$cf_cv_func_sigaction" >&6
28721 test "$cf_cv_func_sigaction" = yes &&
28722 cat >>confdefs.h <<\EOF
28723 #define HAVE_SIGACTION 1
28724 EOF
28725
28726 for ac_header in sys/wait.h
28727 do
28728 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28729 echo "$as_me:28729: checking for $ac_header" >&5
28730 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28731 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28732 echo $ECHO_N "(cached) $ECHO_C" >&6
28733 else
28734 cat >"conftest.$ac_ext" <<_ACEOF
28735 #line 28735 "configure"
28736 #include "confdefs.h"
28737 #include <$ac_header>
28738 _ACEOF
28739 if { (eval echo "$as_me:28739: \"$ac_cpp "conftest.$ac_ext"\"") >&5
28740 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
28741 ac_status=$?
28742 $EGREP -v '^ *\+' conftest.er1 >conftest.err
28743 rm -f conftest.er1
28744 cat conftest.err >&5
28745 echo "$as_me:28745: \$? = $ac_status" >&5
28746 (exit "$ac_status"); } >/dev/null; then
28747 if test -s conftest.err; then
28748 ac_cpp_err=$ac_c_preproc_warn_flag
28749 else
28750 ac_cpp_err=
28751 fi
28752 else
28753 ac_cpp_err=yes
28754 fi
28755 if test -z "$ac_cpp_err"; then
28756 eval "$as_ac_Header=yes"
28757 else
28758 echo "$as_me: failed program was:" >&5
28759 cat "conftest.$ac_ext" >&5
28760 eval "$as_ac_Header=no"
28761 fi
28762 rm -f conftest.err "conftest.$ac_ext"
28763 fi
28764 echo "$as_me:28764: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
28765 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
28766 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
28767 cat >>confdefs.h <<EOF
28768 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28769 EOF
28770
28771 fi
28772 done
28773
28774 cf_wait_headers="#include <sys/types.h>
28775 "
28776 if test "$ac_cv_header_sys_wait_h" = yes; then
28777 cf_wait_headers="$cf_wait_headers
28778 #include <sys/wait.h>
28779 "
28780 else
28781
28782 for ac_header in wait.h
28783 do
28784 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28785 echo "$as_me:28785: checking for $ac_header" >&5
28786 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28787 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28788 echo $ECHO_N "(cached) $ECHO_C" >&6
28789 else
28790 cat >"conftest.$ac_ext" <<_ACEOF
28791 #line 28791 "configure"
28792 #include "confdefs.h"
28793 #include <$ac_header>
28794 _ACEOF
28795 if { (eval echo "$as_me:28795: \"$ac_cpp "conftest.$ac_ext"\"") >&5
28796 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
28797 ac_status=$?
28798 $EGREP -v '^ *\+' conftest.er1 >conftest.err
28799 rm -f conftest.er1
28800 cat conftest.err >&5
28801 echo "$as_me:28801: \$? = $ac_status" >&5
28802 (exit "$ac_status"); } >/dev/null; then
28803 if test -s conftest.err; then
28804 ac_cpp_err=$ac_c_preproc_warn_flag
28805 else
28806 ac_cpp_err=
28807 fi
28808 else
28809 ac_cpp_err=yes
28810 fi
28811 if test -z "$ac_cpp_err"; then
28812 eval "$as_ac_Header=yes"
28813 else
28814 echo "$as_me: failed program was:" >&5
28815 cat "conftest.$ac_ext" >&5
28816 eval "$as_ac_Header=no"
28817 fi
28818 rm -f conftest.err "conftest.$ac_ext"
28819 fi
28820 echo "$as_me:28820: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
28821 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
28822 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
28823 cat >>confdefs.h <<EOF
28824 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28825 EOF
28826
28827 fi
28828 done
28829
28830 for ac_header in waitstatus.h
28831 do
28832 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28833 echo "$as_me:28833: checking for $ac_header" >&5
28834 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28835 if eval "test \"\${$as_ac_Header+set}\" = set"; then
28836 echo $ECHO_N "(cached) $ECHO_C" >&6
28837 else
28838 cat >"conftest.$ac_ext" <<_ACEOF
28839 #line 28839 "configure"
28840 #include "confdefs.h"
28841 #include <$ac_header>
28842 _ACEOF
28843 if { (eval echo "$as_me:28843: \"$ac_cpp "conftest.$ac_ext"\"") >&5
28844 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
28845 ac_status=$?
28846 $EGREP -v '^ *\+' conftest.er1 >conftest.err
28847 rm -f conftest.er1
28848 cat conftest.err >&5
28849 echo "$as_me:28849: \$? = $ac_status" >&5
28850 (exit "$ac_status"); } >/dev/null; then
28851 if test -s conftest.err; then
28852 ac_cpp_err=$ac_c_preproc_warn_flag
28853 else
28854 ac_cpp_err=
28855 fi
28856 else
28857 ac_cpp_err=yes
28858 fi
28859 if test -z "$ac_cpp_err"; then
28860 eval "$as_ac_Header=yes"
28861 else
28862 echo "$as_me: failed program was:" >&5
28863 cat "conftest.$ac_ext" >&5
28864 eval "$as_ac_Header=no"
28865 fi
28866 rm -f conftest.err "conftest.$ac_ext"
28867 fi
28868 echo "$as_me:28868: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
28869 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
28870 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
28871 cat >>confdefs.h <<EOF
28872 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28873 EOF
28874
28875 fi
28876 done
28877
28878 if test "$ac_cv_header_wait_h" = yes; then
28879 cf_wait_headers="$cf_wait_headers
28880 #include <wait.h>
28881 "
28882 fi
28883 if test "$ac_cv_header_waitstatus_h" = yes; then
28884 cf_wait_headers="$cf_wait_headers
28885 #include <waitstatus.h>
28886 "
28887 fi
28888 fi
28889
28890 echo "$as_me:28890: checking for union wait" >&5
28891 echo $ECHO_N "checking for union wait... $ECHO_C" >&6
28892 if test "${cf_cv_type_unionwait+set}" = set; then
28893 echo $ECHO_N "(cached) $ECHO_C" >&6
28894 else
28895
28896 cat >"conftest.$ac_ext" <<_ACEOF
28897 #line 28897 "configure"
28898 #include "confdefs.h"
28899 $cf_wait_headers
28900 int
28901 main (void)
28902 {
28903 static int x;
28904 int y = WEXITSTATUS(x);
28905 int z = WTERMSIG(x);
28906 wait(&x);
28907 (void)x;
28908 (void)y;
28909 (void)z;
28910
28911 ;
28912 return 0;
28913 }
28914 _ACEOF
28915 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28916 if { (eval echo "$as_me:28916: \"$ac_link\"") >&5
28917 (eval $ac_link) 2>&5
28918 ac_status=$?
28919 echo "$as_me:28919: \$? = $ac_status" >&5
28920 (exit "$ac_status"); } &&
28921 { ac_try='test -s "conftest$ac_exeext"'
28922 { (eval echo "$as_me:28922: \"$ac_try\"") >&5
28923 (eval $ac_try) 2>&5
28924 ac_status=$?
28925 echo "$as_me:28925: \$? = $ac_status" >&5
28926 (exit "$ac_status"); }; }; then
28927 cf_cv_type_unionwait=no
28928 echo compiles ok w/o union wait 1>&5
28929
28930 else
28931 echo "$as_me: failed program was:" >&5
28932 cat "conftest.$ac_ext" >&5
28933
28934 cat >"conftest.$ac_ext" <<_ACEOF
28935 #line 28935 "configure"
28936 #include "confdefs.h"
28937 $cf_wait_headers
28938 int
28939 main (void)
28940 {
28941 union wait x;
28942 #ifdef WEXITSTATUS
28943 int y = WEXITSTATUS(x);
28944 #endif
28945 #ifdef WTERMSIG
28946 int z = WTERMSIG(x);
28947 #endif
28948 wait(&x);
28949 (void)x;
28950 #ifdef WEXITSTATUS
28951 (void)y;
28952 #endif
28953 #ifdef WTERMSIG
28954 (void)z;
28955 #endif
28956
28957 ;
28958 return 0;
28959 }
28960 _ACEOF
28961 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28962 if { (eval echo "$as_me:28962: \"$ac_link\"") >&5
28963 (eval $ac_link) 2>&5
28964 ac_status=$?
28965 echo "$as_me:28965: \$? = $ac_status" >&5
28966 (exit "$ac_status"); } &&
28967 { ac_try='test -s "conftest$ac_exeext"'
28968 { (eval echo "$as_me:28968: \"$ac_try\"") >&5
28969 (eval $ac_try) 2>&5
28970 ac_status=$?
28971 echo "$as_me:28971: \$? = $ac_status" >&5
28972 (exit "$ac_status"); }; }; then
28973 cf_cv_type_unionwait=yes
28974 echo compiles ok with union wait and possibly macros too 1>&5
28975
28976 else
28977 echo "$as_me: failed program was:" >&5
28978 cat "conftest.$ac_ext" >&5
28979 cf_cv_type_unionwait=no
28980 fi
28981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28982 fi
28983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28984 fi
28985
28986 echo "$as_me:28986: result: $cf_cv_type_unionwait" >&5
28987 echo "${ECHO_T}$cf_cv_type_unionwait" >&6
28988 test "$cf_cv_type_unionwait" = yes &&
28989 cat >>confdefs.h <<\EOF
28990 #define HAVE_TYPE_UNIONWAIT 1
28991 EOF
28992
28993 if test "$cf_cv_type_unionwait" = yes; then
28994
28995 echo "$as_me:28995: checking if union wait can be used as wait-arg" >&5
28996 echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
28997 if test "${cf_cv_arg_union_wait+set}" = set; then
28998 echo $ECHO_N "(cached) $ECHO_C" >&6
28999 else
29000
29001 cat >"conftest.$ac_ext" <<_ACEOF
29002 #line 29002 "configure"
29003 #include "confdefs.h"
29004 $cf_wait_headers
29005 int
29006 main (void)
29007 {
29008 union wait x; wait(&x)
29009 ;
29010 return 0;
29011 }
29012 _ACEOF
29013 rm -f "conftest.$ac_objext"
29014 if { (eval echo "$as_me:29014: \"$ac_compile\"") >&5
29015 (eval $ac_compile) 2>&5
29016 ac_status=$?
29017 echo "$as_me:29017: \$? = $ac_status" >&5
29018 (exit "$ac_status"); } &&
29019 { ac_try='test -s "conftest.$ac_objext"'
29020 { (eval echo "$as_me:29020: \"$ac_try\"") >&5
29021 (eval $ac_try) 2>&5
29022 ac_status=$?
29023 echo "$as_me:29023: \$? = $ac_status" >&5
29024 (exit "$ac_status"); }; }; then
29025 cf_cv_arg_union_wait=yes
29026 else
29027 echo "$as_me: failed program was:" >&5
29028 cat "conftest.$ac_ext" >&5
29029 cf_cv_arg_union_wait=no
29030 fi
29031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29032
29033 fi
29034
29035 echo "$as_me:29035: result: $cf_cv_arg_union_wait" >&5
29036 echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
29037 test "$cf_cv_arg_union_wait" = yes &&
29038 cat >>confdefs.h <<\EOF
29039 #define WAIT_USES_UNION 1
29040 EOF
29041
29042 echo "$as_me:29042: checking if union wait can be used as waitpid-arg" >&5
29043 echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
29044 if test "${cf_cv_arg_union_waitpid+set}" = set; then
29045 echo $ECHO_N "(cached) $ECHO_C" >&6
29046 else
29047
29048 cat >"conftest.$ac_ext" <<_ACEOF
29049 #line 29049 "configure"
29050 #include "confdefs.h"
29051 $cf_wait_headers
29052 int
29053 main (void)
29054 {
29055 union wait x; waitpid(0, &x, 0)
29056 ;
29057 return 0;
29058 }
29059 _ACEOF
29060 rm -f "conftest.$ac_objext"
29061 if { (eval echo "$as_me:29061: \"$ac_compile\"") >&5
29062 (eval $ac_compile) 2>&5
29063 ac_status=$?
29064 echo "$as_me:29064: \$? = $ac_status" >&5
29065 (exit "$ac_status"); } &&
29066 { ac_try='test -s "conftest.$ac_objext"'
29067 { (eval echo "$as_me:29067: \"$ac_try\"") >&5
29068 (eval $ac_try) 2>&5
29069 ac_status=$?
29070 echo "$as_me:29070: \$? = $ac_status" >&5
29071 (exit "$ac_status"); }; }; then
29072 cf_cv_arg_union_waitpid=yes
29073 else
29074 echo "$as_me: failed program was:" >&5
29075 cat "conftest.$ac_ext" >&5
29076 cf_cv_arg_union_waitpid=no
29077 fi
29078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29079
29080 fi
29081
29082 echo "$as_me:29082: result: $cf_cv_arg_union_waitpid" >&5
29083 echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
29084 test "$cf_cv_arg_union_waitpid" = yes &&
29085 cat >>confdefs.h <<\EOF
29086 #define WAITPID_USES_UNION 1
29087 EOF
29088
29089 fi
29090
29091 echo "$as_me:29091: checking for uid_t in sys/types.h" >&5
29092 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
29093 if test "${ac_cv_type_uid_t+set}" = set; then
29094 echo $ECHO_N "(cached) $ECHO_C" >&6
29095 else
29096 cat >"conftest.$ac_ext" <<_ACEOF
29097 #line 29097 "configure"
29098 #include "confdefs.h"
29099 #include <sys/types.h>
29100
29101 _ACEOF
29102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29103 $EGREP "uid_t" >/dev/null 2>&1; then
29104 ac_cv_type_uid_t=yes
29105 else
29106 ac_cv_type_uid_t=no
29107 fi
29108 rm -rf conftest*
29109
29110 fi
29111 echo "$as_me:29111: result: $ac_cv_type_uid_t" >&5
29112 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
29113 if test $ac_cv_type_uid_t = no; then
29114
29115 cat >>confdefs.h <<\EOF
29116 #define uid_t int
29117 EOF
29118
29119 cat >>confdefs.h <<\EOF
29120 #define gid_t int
29121 EOF
29122
29123 fi
29124
29125 echo "$as_me:29125: checking type of array argument to getgroups" >&5
29126 echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
29127 if test "${ac_cv_type_getgroups+set}" = set; then
29128 echo $ECHO_N "(cached) $ECHO_C" >&6
29129 else
29130 if test "$cross_compiling" = yes; then
29131 ac_cv_type_getgroups=cross
29132 else
29133 cat >"conftest.$ac_ext" <<_ACEOF
29134 #line 29134 "configure"
29135 #include "confdefs.h"
29136 $ac_includes_default
29137 /* Thanks to Mike Rendell for this test. */
29138 #include <sys/types.h>
29139 #define NGID 256
29140 #undef MAX
29141 #define MAX(x, y) ((x) > (y) ? (x) : (y))
29142
29143 int
29144 main (void)
29145 {
29146 gid_t gidset[NGID];
29147 int i, n;
29148 union { gid_t gval; long lval; } val;
29149
29150 val.lval = -1;
29151 for (i = 0; i < NGID; i++)
29152 gidset[i] = val.gval;
29153 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
29154 gidset);
29155 /* Exit non-zero if getgroups seems to require an array of ints. This
29156 happens when gid_t is short but getgroups modifies an array of ints. */
29157 $ac_main_return ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
29158 }
29159 _ACEOF
29160 rm -f "conftest$ac_exeext"
29161 if { (eval echo "$as_me:29161: \"$ac_link\"") >&5
29162 (eval $ac_link) 2>&5
29163 ac_status=$?
29164 echo "$as_me:29164: \$? = $ac_status" >&5
29165 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
29166 { (eval echo "$as_me:29166: \"$ac_try\"") >&5
29167 (eval $ac_try) 2>&5
29168 ac_status=$?
29169 echo "$as_me:29169: \$? = $ac_status" >&5
29170 (exit "$ac_status"); }; }; then
29171 ac_cv_type_getgroups=gid_t
29172 else
29173 echo "$as_me: program exited with status $ac_status" >&5
29174 echo "$as_me: failed program was:" >&5
29175 cat "conftest.$ac_ext" >&5
29176 ac_cv_type_getgroups=int
29177 fi
29178 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
29179 fi
29180 if test $ac_cv_type_getgroups = cross; then
29181 cat >"conftest.$ac_ext" <<_ACEOF
29182 #line 29182 "configure"
29183 #include "confdefs.h"
29184 #include <unistd.h>
29185
29186 _ACEOF
29187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29188 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
29189 ac_cv_type_getgroups=gid_t
29190 else
29191 ac_cv_type_getgroups=int
29192 fi
29193 rm -rf conftest*
29194
29195 fi
29196 fi
29197 echo "$as_me:29197: result: $ac_cv_type_getgroups" >&5
29198 echo "${ECHO_T}$ac_cv_type_getgroups" >&6
29199
29200 cat >>confdefs.h <<EOF
29201 #define GETGROUPS_T $ac_cv_type_getgroups
29202 EOF
29203
29204 echo "$as_me:29204: checking for off_t" >&5
29205 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
29206 if test "${ac_cv_type_off_t+set}" = set; then
29207 echo $ECHO_N "(cached) $ECHO_C" >&6
29208 else
29209 cat >"conftest.$ac_ext" <<_ACEOF
29210 #line 29210 "configure"
29211 #include "confdefs.h"
29212 $ac_includes_default
29213 int
29214 main (void)
29215 {
29216 if ((off_t *) 0)
29217 return 0;
29218 if (sizeof (off_t))
29219 return 0;
29220 ;
29221 return 0;
29222 }
29223 _ACEOF
29224 rm -f "conftest.$ac_objext"
29225 if { (eval echo "$as_me:29225: \"$ac_compile\"") >&5
29226 (eval $ac_compile) 2>&5
29227 ac_status=$?
29228 echo "$as_me:29228: \$? = $ac_status" >&5
29229 (exit "$ac_status"); } &&
29230 { ac_try='test -s "conftest.$ac_objext"'
29231 { (eval echo "$as_me:29231: \"$ac_try\"") >&5
29232 (eval $ac_try) 2>&5
29233 ac_status=$?
29234 echo "$as_me:29234: \$? = $ac_status" >&5
29235 (exit "$ac_status"); }; }; then
29236 ac_cv_type_off_t=yes
29237 else
29238 echo "$as_me: failed program was:" >&5
29239 cat "conftest.$ac_ext" >&5
29240 ac_cv_type_off_t=no
29241 fi
29242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29243 fi
29244 echo "$as_me:29244: result: $ac_cv_type_off_t" >&5
29245 echo "${ECHO_T}$ac_cv_type_off_t" >&6
29246 if test "$ac_cv_type_off_t" = yes; then
29247 :
29248 else
29249
29250 cat >>confdefs.h <<EOF
29251 #define off_t long
29252 EOF
29253
29254 fi
29255
29256 echo "$as_me:29256: checking for pid_t" >&5
29257 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
29258 if test "${ac_cv_type_pid_t+set}" = set; then
29259 echo $ECHO_N "(cached) $ECHO_C" >&6
29260 else
29261 cat >"conftest.$ac_ext" <<_ACEOF
29262 #line 29262 "configure"
29263 #include "confdefs.h"
29264 $ac_includes_default
29265 int
29266 main (void)
29267 {
29268 if ((pid_t *) 0)
29269 return 0;
29270 if (sizeof (pid_t))
29271 return 0;
29272 ;
29273 return 0;
29274 }
29275 _ACEOF
29276 rm -f "conftest.$ac_objext"
29277 if { (eval echo "$as_me:29277: \"$ac_compile\"") >&5
29278 (eval $ac_compile) 2>&5
29279 ac_status=$?
29280 echo "$as_me:29280: \$? = $ac_status" >&5
29281 (exit "$ac_status"); } &&
29282 { ac_try='test -s "conftest.$ac_objext"'
29283 { (eval echo "$as_me:29283: \"$ac_try\"") >&5
29284 (eval $ac_try) 2>&5
29285 ac_status=$?
29286 echo "$as_me:29286: \$? = $ac_status" >&5
29287 (exit "$ac_status"); }; }; then
29288 ac_cv_type_pid_t=yes
29289 else
29290 echo "$as_me: failed program was:" >&5
29291 cat "conftest.$ac_ext" >&5
29292 ac_cv_type_pid_t=no
29293 fi
29294 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29295 fi
29296 echo "$as_me:29296: result: $ac_cv_type_pid_t" >&5
29297 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
29298 if test "$ac_cv_type_pid_t" = yes; then
29299 :
29300 else
29301
29302 cat >>confdefs.h <<EOF
29303 #define pid_t int
29304 EOF
29305
29306 fi
29307
29308 echo "$as_me:29308: checking for uid_t in sys/types.h" >&5
29309 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
29310 if test "${ac_cv_type_uid_t+set}" = set; then
29311 echo $ECHO_N "(cached) $ECHO_C" >&6
29312 else
29313 cat >"conftest.$ac_ext" <<_ACEOF
29314 #line 29314 "configure"
29315 #include "confdefs.h"
29316 #include <sys/types.h>
29317
29318 _ACEOF
29319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29320 $EGREP "uid_t" >/dev/null 2>&1; then
29321 ac_cv_type_uid_t=yes
29322 else
29323 ac_cv_type_uid_t=no
29324 fi
29325 rm -rf conftest*
29326
29327 fi
29328 echo "$as_me:29328: result: $ac_cv_type_uid_t" >&5
29329 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
29330 if test $ac_cv_type_uid_t = no; then
29331
29332 cat >>confdefs.h <<\EOF
29333 #define uid_t int
29334 EOF
29335
29336 cat >>confdefs.h <<\EOF
29337 #define gid_t int
29338 EOF
29339
29340 fi
29341
29342 echo "$as_me:29342: checking for mode_t" >&5
29343 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
29344 if test "${ac_cv_type_mode_t+set}" = set; then
29345 echo $ECHO_N "(cached) $ECHO_C" >&6
29346 else
29347 cat >"conftest.$ac_ext" <<_ACEOF
29348 #line 29348 "configure"
29349 #include "confdefs.h"
29350 $ac_includes_default
29351 int
29352 main (void)
29353 {
29354 if ((mode_t *) 0)
29355 return 0;
29356 if (sizeof (mode_t))
29357 return 0;
29358 ;
29359 return 0;
29360 }
29361 _ACEOF
29362 rm -f "conftest.$ac_objext"
29363 if { (eval echo "$as_me:29363: \"$ac_compile\"") >&5
29364 (eval $ac_compile) 2>&5
29365 ac_status=$?
29366 echo "$as_me:29366: \$? = $ac_status" >&5
29367 (exit "$ac_status"); } &&
29368 { ac_try='test -s "conftest.$ac_objext"'
29369 { (eval echo "$as_me:29369: \"$ac_try\"") >&5
29370 (eval $ac_try) 2>&5
29371 ac_status=$?
29372 echo "$as_me:29372: \$? = $ac_status" >&5
29373 (exit "$ac_status"); }; }; then
29374 ac_cv_type_mode_t=yes
29375 else
29376 echo "$as_me: failed program was:" >&5
29377 cat "conftest.$ac_ext" >&5
29378 ac_cv_type_mode_t=no
29379 fi
29380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29381 fi
29382 echo "$as_me:29382: result: $ac_cv_type_mode_t" >&5
29383 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
29384 if test "$ac_cv_type_mode_t" = yes; then
29385 :
29386 else
29387
29388 cat >>confdefs.h <<EOF
29389 #define mode_t int
29390 EOF
29391
29392 fi
29393
29394 echo "$as_me:29394: checking for ssize_t" >&5
29395 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
29396 if test "${ac_cv_type_ssize_t+set}" = set; then
29397 echo $ECHO_N "(cached) $ECHO_C" >&6
29398 else
29399 cat >"conftest.$ac_ext" <<_ACEOF
29400 #line 29400 "configure"
29401 #include "confdefs.h"
29402 $ac_includes_default
29403 int
29404 main (void)
29405 {
29406 if ((ssize_t *) 0)
29407 return 0;
29408 if (sizeof (ssize_t))
29409 return 0;
29410 ;
29411 return 0;
29412 }
29413 _ACEOF
29414 rm -f "conftest.$ac_objext"
29415 if { (eval echo "$as_me:29415: \"$ac_compile\"") >&5
29416 (eval $ac_compile) 2>&5
29417 ac_status=$?
29418 echo "$as_me:29418: \$? = $ac_status" >&5
29419 (exit "$ac_status"); } &&
29420 { ac_try='test -s "conftest.$ac_objext"'
29421 { (eval echo "$as_me:29421: \"$ac_try\"") >&5
29422 (eval $ac_try) 2>&5
29423 ac_status=$?
29424 echo "$as_me:29424: \$? = $ac_status" >&5
29425 (exit "$ac_status"); }; }; then
29426 ac_cv_type_ssize_t=yes
29427 else
29428 echo "$as_me: failed program was:" >&5
29429 cat "conftest.$ac_ext" >&5
29430 ac_cv_type_ssize_t=no
29431 fi
29432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29433 fi
29434 echo "$as_me:29434: result: $ac_cv_type_ssize_t" >&5
29435 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
29436 if test "$ac_cv_type_ssize_t" = yes; then
29437 ac_cv_type_ssize_t=yes
29438 else
29439 ac_cv_type_ssize_t=no
29440 fi
29441
29442 if test "$ac_cv_type_ssize_t" = no; then
29443
29444 cat >>confdefs.h <<\EOF
29445 #define ssize_t int
29446 EOF
29447
29448 fi
29449
29450 echo "$as_me:29450: checking for socklen_t" >&5
29451 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
29452 if test "${ac_cv_type_socklen_t+set}" = set; then
29453 echo $ECHO_N "(cached) $ECHO_C" >&6
29454 else
29455 cat >"conftest.$ac_ext" <<_ACEOF
29456 #line 29456 "configure"
29457 #include "confdefs.h"
29458
29459 #include <sys/types.h>
29460 #include <sys/socket.h>
29461
29462 int
29463 main (void)
29464 {
29465 if ((socklen_t *) 0)
29466 return 0;
29467 if (sizeof (socklen_t))
29468 return 0;
29469 ;
29470 return 0;
29471 }
29472 _ACEOF
29473 rm -f "conftest.$ac_objext"
29474 if { (eval echo "$as_me:29474: \"$ac_compile\"") >&5
29475 (eval $ac_compile) 2>&5
29476 ac_status=$?
29477 echo "$as_me:29477: \$? = $ac_status" >&5
29478 (exit "$ac_status"); } &&
29479 { ac_try='test -s "conftest.$ac_objext"'
29480 { (eval echo "$as_me:29480: \"$ac_try\"") >&5
29481 (eval $ac_try) 2>&5
29482 ac_status=$?
29483 echo "$as_me:29483: \$? = $ac_status" >&5
29484 (exit "$ac_status"); }; }; then
29485 ac_cv_type_socklen_t=yes
29486 else
29487 echo "$as_me: failed program was:" >&5
29488 cat "conftest.$ac_ext" >&5
29489 ac_cv_type_socklen_t=no
29490 fi
29491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29492 fi
29493 echo "$as_me:29493: result: $ac_cv_type_socklen_t" >&5
29494 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
29495 if test "$ac_cv_type_socklen_t" = yes; then
29496 ac_cv_type_socklen_t=yes
29497 else
29498 ac_cv_type_socklen_t=no
29499 fi
29500
29501 if test "$ac_cv_type_socklen_t" = no; then
29502
29503 cat >>confdefs.h <<\EOF
29504 #define socklen_t int
29505 EOF
29506
29507 fi
29508
29509 echo "$as_me:29509: checking for long long type" >&5
29510 echo $ECHO_N "checking for long long type... $ECHO_C" >&6
29511 if test "${cf_cv_type_long_long+set}" = set; then
29512 echo $ECHO_N "(cached) $ECHO_C" >&6
29513 else
29514
29515 cat >conftest.$ac_ext <<_CFEOF
29516 #include "confdefs.h"
29517 int
29518 main (void)
29519 {
29520 long long foo = 123456789123456789LL;
29521 return (foo == 0);
29522 }
29523 _CFEOF
29524 (eval "$ac_compile") 2>conftest.err
29525 ac_status=$?
29526 if test "$ac_status" = 0 && test -s conftest.err
29527 then
29528 ${FGREP-fgrep} warning conftest.err >/dev/null 2>&1 && ac_status=1
29529 fi
29530 if test "$ac_status" != 0
29531 then
29532 cf_cv_type_long_long=no
29533 else
29534 cf_cv_type_long_long=yes
29535 fi
29536 test -s conftest.err && cat conftest.err >&5
29537 rm -f conftest*
29538
29539 fi
29540 echo "$as_me:29540: result: $cf_cv_type_long_long" >&5
29541 echo "${ECHO_T}$cf_cv_type_long_long" >&6
29542
29543 if test "$cf_cv_type_long_long" = yes ; then
29544
29545 cat >>confdefs.h <<\EOF
29546 #define HAVE_LONG_LONG 1
29547 EOF
29548
29549 fi
29550
29551 echo "$as_me:29551: checking for tm.tm_gmtoff" >&5
29552 echo $ECHO_N "checking for tm.tm_gmtoff... $ECHO_C" >&6
29553 if test "${cf_cv_tm_gmtoff+set}" = set; then
29554 echo $ECHO_N "(cached) $ECHO_C" >&6
29555 else
29556
29557 cat >"conftest.$ac_ext" <<_ACEOF
29558 #line 29558 "configure"
29559 #include "confdefs.h"
29560
29561 #ifdef TIME_WITH_SYS_TIME
29562 # include <sys/time.h>
29563 # include <time.h>
29564 #else
29565 # ifdef HAVE_SYS_TIME_H
29566 # include <sys/time.h>
29567 # else
29568 # include <time.h>
29569 # endif
29570 #endif
29571
29572 int
29573 main (void)
29574 {
29575
29576 static struct tm foo;
29577 long bar = foo.tm_gmtoff; (void) bar
29578 ;
29579 return 0;
29580 }
29581 _ACEOF
29582 rm -f "conftest.$ac_objext"
29583 if { (eval echo "$as_me:29583: \"$ac_compile\"") >&5
29584 (eval $ac_compile) 2>&5
29585 ac_status=$?
29586 echo "$as_me:29586: \$? = $ac_status" >&5
29587 (exit "$ac_status"); } &&
29588 { ac_try='test -s "conftest.$ac_objext"'
29589 { (eval echo "$as_me:29589: \"$ac_try\"") >&5
29590 (eval $ac_try) 2>&5
29591 ac_status=$?
29592 echo "$as_me:29592: \$? = $ac_status" >&5
29593 (exit "$ac_status"); }; }; then
29594 cf_cv_tm_gmtoff=yes
29595 else
29596 echo "$as_me: failed program was:" >&5
29597 cat "conftest.$ac_ext" >&5
29598 cf_cv_tm_gmtoff=no
29599 fi
29600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29601 fi
29602
29603 echo "$as_me:29603: result: $cf_cv_tm_gmtoff" >&5
29604 echo "${ECHO_T}$cf_cv_tm_gmtoff" >&6
29605 test "$cf_cv_tm_gmtoff" = no &&
29606 cat >>confdefs.h <<\EOF
29607 #define DONT_HAVE_TM_GMTOFF 1
29608 EOF
29609
29610 echo "$as_me:29610: checking for int" >&5
29611 echo $ECHO_N "checking for int... $ECHO_C" >&6
29612 if test "${ac_cv_type_int+set}" = set; then
29613 echo $ECHO_N "(cached) $ECHO_C" >&6
29614 else
29615 cat >"conftest.$ac_ext" <<_ACEOF
29616 #line 29616 "configure"
29617 #include "confdefs.h"
29618 $ac_includes_default
29619 int
29620 main (void)
29621 {
29622 if ((int *) 0)
29623 return 0;
29624 if (sizeof (int))
29625 return 0;
29626 ;
29627 return 0;
29628 }
29629 _ACEOF
29630 rm -f "conftest.$ac_objext"
29631 if { (eval echo "$as_me:29631: \"$ac_compile\"") >&5
29632 (eval $ac_compile) 2>&5
29633 ac_status=$?
29634 echo "$as_me:29634: \$? = $ac_status" >&5
29635 (exit "$ac_status"); } &&
29636 { ac_try='test -s "conftest.$ac_objext"'
29637 { (eval echo "$as_me:29637: \"$ac_try\"") >&5
29638 (eval $ac_try) 2>&5
29639 ac_status=$?
29640 echo "$as_me:29640: \$? = $ac_status" >&5
29641 (exit "$ac_status"); }; }; then
29642 ac_cv_type_int=yes
29643 else
29644 echo "$as_me: failed program was:" >&5
29645 cat "conftest.$ac_ext" >&5
29646 ac_cv_type_int=no
29647 fi
29648 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29649 fi
29650 echo "$as_me:29650: result: $ac_cv_type_int" >&5
29651 echo "${ECHO_T}$ac_cv_type_int" >&6
29652
29653 echo "$as_me:29653: checking size of int" >&5
29654 echo $ECHO_N "checking size of int... $ECHO_C" >&6
29655 if test "${ac_cv_sizeof_int+set}" = set; then
29656 echo $ECHO_N "(cached) $ECHO_C" >&6
29657 else
29658 if test "$ac_cv_type_int" = yes; then
29659 if test "$cross_compiling" = yes; then
29660 # Depending upon the size, compute the lo and hi bounds.
29661 cat >"conftest.$ac_ext" <<_ACEOF
29662 #line 29662 "configure"
29663 #include "confdefs.h"
29664 $ac_includes_default
29665 int
29666 main (void)
29667 {
29668 int _array_ [1 - 2 * !((sizeof (int)) >= 0)]; (void)_array_;
29669 ;
29670 return 0;
29671 }
29672 _ACEOF
29673 rm -f "conftest.$ac_objext"
29674 if { (eval echo "$as_me:29674: \"$ac_compile\"") >&5
29675 (eval $ac_compile) 2>&5
29676 ac_status=$?
29677 echo "$as_me:29677: \$? = $ac_status" >&5
29678 (exit "$ac_status"); } &&
29679 { ac_try='test -s "conftest.$ac_objext"'
29680 { (eval echo "$as_me:29680: \"$ac_try\"") >&5
29681 (eval $ac_try) 2>&5
29682 ac_status=$?
29683 echo "$as_me:29683: \$? = $ac_status" >&5
29684 (exit "$ac_status"); }; }; then
29685 ac_lo=0 ac_mid=0
29686 while :; do
29687 cat >"conftest.$ac_ext" <<_ACEOF
29688 #line 29688 "configure"
29689 #include "confdefs.h"
29690 $ac_includes_default
29691 int
29692 main (void)
29693 {
29694 int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]; (void)_array_;
29695 ;
29696 return 0;
29697 }
29698 _ACEOF
29699 rm -f "conftest.$ac_objext"
29700 if { (eval echo "$as_me:29700: \"$ac_compile\"") >&5
29701 (eval $ac_compile) 2>&5
29702 ac_status=$?
29703 echo "$as_me:29703: \$? = $ac_status" >&5
29704 (exit "$ac_status"); } &&
29705 { ac_try='test -s "conftest.$ac_objext"'
29706 { (eval echo "$as_me:29706: \"$ac_try\"") >&5
29707 (eval $ac_try) 2>&5
29708 ac_status=$?
29709 echo "$as_me:29709: \$? = $ac_status" >&5
29710 (exit "$ac_status"); }; }; then
29711 ac_hi=$ac_mid; break
29712 else
29713 echo "$as_me: failed program was:" >&5
29714 cat "conftest.$ac_ext" >&5
29715 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
29716 fi
29717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29718 done
29719 else
29720 echo "$as_me: failed program was:" >&5
29721 cat "conftest.$ac_ext" >&5
29722 ac_hi=-1 ac_mid=-1
29723 while :; do
29724 cat >"conftest.$ac_ext" <<_ACEOF
29725 #line 29725 "configure"
29726 #include "confdefs.h"
29727 $ac_includes_default
29728 int
29729 main (void)
29730 {
29731 int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]; (void)_array_;
29732 ;
29733 return 0;
29734 }
29735 _ACEOF
29736 rm -f "conftest.$ac_objext"
29737 if { (eval echo "$as_me:29737: \"$ac_compile\"") >&5
29738 (eval $ac_compile) 2>&5
29739 ac_status=$?
29740 echo "$as_me:29740: \$? = $ac_status" >&5
29741 (exit "$ac_status"); } &&
29742 { ac_try='test -s "conftest.$ac_objext"'
29743 { (eval echo "$as_me:29743: \"$ac_try\"") >&5
29744 (eval $ac_try) 2>&5
29745 ac_status=$?
29746 echo "$as_me:29746: \$? = $ac_status" >&5
29747 (exit "$ac_status"); }; }; then
29748 ac_lo=$ac_mid; break
29749 else
29750 echo "$as_me: failed program was:" >&5
29751 cat "conftest.$ac_ext" >&5
29752 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
29753 fi
29754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29755 done
29756 fi
29757 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29758 # Binary search between lo and hi bounds.
29759 while test "x$ac_lo" != "x$ac_hi"; do
29760 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
29761 cat >"conftest.$ac_ext" <<_ACEOF
29762 #line 29762 "configure"
29763 #include "confdefs.h"
29764 $ac_includes_default
29765 int
29766 main (void)
29767 {
29768 int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]; (void)_array_;
29769 ;
29770 return 0;
29771 }
29772 _ACEOF
29773 rm -f "conftest.$ac_objext"
29774 if { (eval echo "$as_me:29774: \"$ac_compile\"") >&5
29775 (eval $ac_compile) 2>&5
29776 ac_status=$?
29777 echo "$as_me:29777: \$? = $ac_status" >&5
29778 (exit "$ac_status"); } &&
29779 { ac_try='test -s "conftest.$ac_objext"'
29780 { (eval echo "$as_me:29780: \"$ac_try\"") >&5
29781 (eval $ac_try) 2>&5
29782 ac_status=$?
29783 echo "$as_me:29783: \$? = $ac_status" >&5
29784 (exit "$ac_status"); }; }; then
29785 ac_hi=$ac_mid
29786 else
29787 echo "$as_me: failed program was:" >&5
29788 cat "conftest.$ac_ext" >&5
29789 ac_lo=`expr "$ac_mid" + 1`
29790 fi
29791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29792 done
29793 ac_cv_sizeof_int=$ac_lo
29794 else
29795 if test "$cross_compiling" = yes; then
29796 { { echo "$as_me:29796: error: cannot run test program while cross compiling" >&5
29797 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
29798 { (exit 1); exit 1; }; }
29799 else
29800 cat >"conftest.$ac_ext" <<_ACEOF
29801 #line 29801 "configure"
29802 #include "confdefs.h"
29803 $ac_includes_default
29804 int
29805 main (void)
29806 {
29807 FILE *f = fopen ("conftest.val", "w");
29808 if (!f)
29809 $ac_main_return (1);
29810 fprintf (f, "%ld", (long)(sizeof (int)));
29811 fclose (f);
29812 ;
29813 return 0;
29814 }
29815 _ACEOF
29816 rm -f "conftest$ac_exeext"
29817 if { (eval echo "$as_me:29817: \"$ac_link\"") >&5
29818 (eval $ac_link) 2>&5
29819 ac_status=$?
29820 echo "$as_me:29820: \$? = $ac_status" >&5
29821 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
29822 { (eval echo "$as_me:29822: \"$ac_try\"") >&5
29823 (eval $ac_try) 2>&5
29824 ac_status=$?
29825 echo "$as_me:29825: \$? = $ac_status" >&5
29826 (exit "$ac_status"); }; }; then
29827 ac_cv_sizeof_int=`cat conftest.val`
29828 else
29829 echo "$as_me: program exited with status $ac_status" >&5
29830 echo "$as_me: failed program was:" >&5
29831 cat "conftest.$ac_ext" >&5
29832 fi
29833 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
29834 fi
29835 fi
29836 rm -f conftest.val
29837 else
29838 ac_cv_sizeof_int=0
29839 fi
29840 fi
29841 echo "$as_me:29841: result: $ac_cv_sizeof_int" >&5
29842 echo "${ECHO_T}$ac_cv_sizeof_int" >&6
29843 cat >>confdefs.h <<EOF
29844 #define SIZEOF_INT $ac_cv_sizeof_int
29845 EOF
29846
29847 if test "${ac_cv_type_int+set}" = set; then
29848 cf_my_sizeof="$ac_cv_sizeof_int"
29849 if test "${ac_cv_sizeof_int+set}" != set; then
29850 { echo "$as_me:29850: WARNING: using 4 for sizeof int" >&5
29851 echo "$as_me: WARNING: using 4 for sizeof int" >&2;}
29852 ac_cv_sizeof_int=4
29853 elif test "x${ac_cv_sizeof_int}" = x0; then
29854 { echo "$as_me:29854: WARNING: sizeof int not found, using 4" >&5
29855 echo "$as_me: WARNING: sizeof int not found, using 4" >&2;}
29856 ac_cv_sizeof_int=4
29857 fi
29858 if test "x$ac_cv_sizeof_int" != "x$cf_my_sizeof"
29859 then
29860
29861 cf_cv_type=`echo "sizeof_int" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29862
29863 sed -e "s/\\([ ]${cf_cv_type}[ ]\\).*/\\1$ac_cv_sizeof_int/" confdefs.h >conftest.val
29864 mv conftest.val confdefs.h
29865 fi
29866 fi
29867
29868 echo "$as_me:29868: checking for long" >&5
29869 echo $ECHO_N "checking for long... $ECHO_C" >&6
29870 if test "${ac_cv_type_long+set}" = set; then
29871 echo $ECHO_N "(cached) $ECHO_C" >&6
29872 else
29873 cat >"conftest.$ac_ext" <<_ACEOF
29874 #line 29874 "configure"
29875 #include "confdefs.h"
29876 $ac_includes_default
29877 int
29878 main (void)
29879 {
29880 if ((long *) 0)
29881 return 0;
29882 if (sizeof (long))
29883 return 0;
29884 ;
29885 return 0;
29886 }
29887 _ACEOF
29888 rm -f "conftest.$ac_objext"
29889 if { (eval echo "$as_me:29889: \"$ac_compile\"") >&5
29890 (eval $ac_compile) 2>&5
29891 ac_status=$?
29892 echo "$as_me:29892: \$? = $ac_status" >&5
29893 (exit "$ac_status"); } &&
29894 { ac_try='test -s "conftest.$ac_objext"'
29895 { (eval echo "$as_me:29895: \"$ac_try\"") >&5
29896 (eval $ac_try) 2>&5
29897 ac_status=$?
29898 echo "$as_me:29898: \$? = $ac_status" >&5
29899 (exit "$ac_status"); }; }; then
29900 ac_cv_type_long=yes
29901 else
29902 echo "$as_me: failed program was:" >&5
29903 cat "conftest.$ac_ext" >&5
29904 ac_cv_type_long=no
29905 fi
29906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29907 fi
29908 echo "$as_me:29908: result: $ac_cv_type_long" >&5
29909 echo "${ECHO_T}$ac_cv_type_long" >&6
29910
29911 echo "$as_me:29911: checking size of long" >&5
29912 echo $ECHO_N "checking size of long... $ECHO_C" >&6
29913 if test "${ac_cv_sizeof_long+set}" = set; then
29914 echo $ECHO_N "(cached) $ECHO_C" >&6
29915 else
29916 if test "$ac_cv_type_long" = yes; then
29917 if test "$cross_compiling" = yes; then
29918 # Depending upon the size, compute the lo and hi bounds.
29919 cat >"conftest.$ac_ext" <<_ACEOF
29920 #line 29920 "configure"
29921 #include "confdefs.h"
29922 $ac_includes_default
29923 int
29924 main (void)
29925 {
29926 int _array_ [1 - 2 * !((sizeof (long)) >= 0)]; (void)_array_;
29927 ;
29928 return 0;
29929 }
29930 _ACEOF
29931 rm -f "conftest.$ac_objext"
29932 if { (eval echo "$as_me:29932: \"$ac_compile\"") >&5
29933 (eval $ac_compile) 2>&5
29934 ac_status=$?
29935 echo "$as_me:29935: \$? = $ac_status" >&5
29936 (exit "$ac_status"); } &&
29937 { ac_try='test -s "conftest.$ac_objext"'
29938 { (eval echo "$as_me:29938: \"$ac_try\"") >&5
29939 (eval $ac_try) 2>&5
29940 ac_status=$?
29941 echo "$as_me:29941: \$? = $ac_status" >&5
29942 (exit "$ac_status"); }; }; then
29943 ac_lo=0 ac_mid=0
29944 while :; do
29945 cat >"conftest.$ac_ext" <<_ACEOF
29946 #line 29946 "configure"
29947 #include "confdefs.h"
29948 $ac_includes_default
29949 int
29950 main (void)
29951 {
29952 int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]; (void)_array_;
29953 ;
29954 return 0;
29955 }
29956 _ACEOF
29957 rm -f "conftest.$ac_objext"
29958 if { (eval echo "$as_me:29958: \"$ac_compile\"") >&5
29959 (eval $ac_compile) 2>&5
29960 ac_status=$?
29961 echo "$as_me:29961: \$? = $ac_status" >&5
29962 (exit "$ac_status"); } &&
29963 { ac_try='test -s "conftest.$ac_objext"'
29964 { (eval echo "$as_me:29964: \"$ac_try\"") >&5
29965 (eval $ac_try) 2>&5
29966 ac_status=$?
29967 echo "$as_me:29967: \$? = $ac_status" >&5
29968 (exit "$ac_status"); }; }; then
29969 ac_hi=$ac_mid; break
29970 else
29971 echo "$as_me: failed program was:" >&5
29972 cat "conftest.$ac_ext" >&5
29973 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
29974 fi
29975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29976 done
29977 else
29978 echo "$as_me: failed program was:" >&5
29979 cat "conftest.$ac_ext" >&5
29980 ac_hi=-1 ac_mid=-1
29981 while :; do
29982 cat >"conftest.$ac_ext" <<_ACEOF
29983 #line 29983 "configure"
29984 #include "confdefs.h"
29985 $ac_includes_default
29986 int
29987 main (void)
29988 {
29989 int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]; (void)_array_;
29990 ;
29991 return 0;
29992 }
29993 _ACEOF
29994 rm -f "conftest.$ac_objext"
29995 if { (eval echo "$as_me:29995: \"$ac_compile\"") >&5
29996 (eval $ac_compile) 2>&5
29997 ac_status=$?
29998 echo "$as_me:29998: \$? = $ac_status" >&5
29999 (exit "$ac_status"); } &&
30000 { ac_try='test -s "conftest.$ac_objext"'
30001 { (eval echo "$as_me:30001: \"$ac_try\"") >&5
30002 (eval $ac_try) 2>&5
30003 ac_status=$?
30004 echo "$as_me:30004: \$? = $ac_status" >&5
30005 (exit "$ac_status"); }; }; then
30006 ac_lo=$ac_mid; break
30007 else
30008 echo "$as_me: failed program was:" >&5
30009 cat "conftest.$ac_ext" >&5
30010 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
30011 fi
30012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30013 done
30014 fi
30015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30016 # Binary search between lo and hi bounds.
30017 while test "x$ac_lo" != "x$ac_hi"; do
30018 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
30019 cat >"conftest.$ac_ext" <<_ACEOF
30020 #line 30020 "configure"
30021 #include "confdefs.h"
30022 $ac_includes_default
30023 int
30024 main (void)
30025 {
30026 int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]; (void)_array_;
30027 ;
30028 return 0;
30029 }
30030 _ACEOF
30031 rm -f "conftest.$ac_objext"
30032 if { (eval echo "$as_me:30032: \"$ac_compile\"") >&5
30033 (eval $ac_compile) 2>&5
30034 ac_status=$?
30035 echo "$as_me:30035: \$? = $ac_status" >&5
30036 (exit "$ac_status"); } &&
30037 { ac_try='test -s "conftest.$ac_objext"'
30038 { (eval echo "$as_me:30038: \"$ac_try\"") >&5
30039 (eval $ac_try) 2>&5
30040 ac_status=$?
30041 echo "$as_me:30041: \$? = $ac_status" >&5
30042 (exit "$ac_status"); }; }; then
30043 ac_hi=$ac_mid
30044 else
30045 echo "$as_me: failed program was:" >&5
30046 cat "conftest.$ac_ext" >&5
30047 ac_lo=`expr "$ac_mid" + 1`
30048 fi
30049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30050 done
30051 ac_cv_sizeof_long=$ac_lo
30052 else
30053 if test "$cross_compiling" = yes; then
30054 { { echo "$as_me:30054: error: cannot run test program while cross compiling" >&5
30055 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
30056 { (exit 1); exit 1; }; }
30057 else
30058 cat >"conftest.$ac_ext" <<_ACEOF
30059 #line 30059 "configure"
30060 #include "confdefs.h"
30061 $ac_includes_default
30062 int
30063 main (void)
30064 {
30065 FILE *f = fopen ("conftest.val", "w");
30066 if (!f)
30067 $ac_main_return (1);
30068 fprintf (f, "%ld", (long)(sizeof (long)));
30069 fclose (f);
30070 ;
30071 return 0;
30072 }
30073 _ACEOF
30074 rm -f "conftest$ac_exeext"
30075 if { (eval echo "$as_me:30075: \"$ac_link\"") >&5
30076 (eval $ac_link) 2>&5
30077 ac_status=$?
30078 echo "$as_me:30078: \$? = $ac_status" >&5
30079 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
30080 { (eval echo "$as_me:30080: \"$ac_try\"") >&5
30081 (eval $ac_try) 2>&5
30082 ac_status=$?
30083 echo "$as_me:30083: \$? = $ac_status" >&5
30084 (exit "$ac_status"); }; }; then
30085 ac_cv_sizeof_long=`cat conftest.val`
30086 else
30087 echo "$as_me: program exited with status $ac_status" >&5
30088 echo "$as_me: failed program was:" >&5
30089 cat "conftest.$ac_ext" >&5
30090 fi
30091 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
30092 fi
30093 fi
30094 rm -f conftest.val
30095 else
30096 ac_cv_sizeof_long=0
30097 fi
30098 fi
30099 echo "$as_me:30099: result: $ac_cv_sizeof_long" >&5
30100 echo "${ECHO_T}$ac_cv_sizeof_long" >&6
30101 cat >>confdefs.h <<EOF
30102 #define SIZEOF_LONG $ac_cv_sizeof_long
30103 EOF
30104
30105 if test "${ac_cv_type_long+set}" = set; then
30106 cf_my_sizeof="$ac_cv_sizeof_long"
30107 if test "${ac_cv_sizeof_long+set}" != set; then
30108 { echo "$as_me:30108: WARNING: using 4 for sizeof long" >&5
30109 echo "$as_me: WARNING: using 4 for sizeof long" >&2;}
30110 ac_cv_sizeof_long=4
30111 elif test "x${ac_cv_sizeof_long}" = x0; then
30112 { echo "$as_me:30112: WARNING: sizeof long not found, using 4" >&5
30113 echo "$as_me: WARNING: sizeof long not found, using 4" >&2;}
30114 ac_cv_sizeof_long=4
30115 fi
30116 if test "x$ac_cv_sizeof_long" != "x$cf_my_sizeof"
30117 then
30118
30119 cf_cv_type=`echo "sizeof_long" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30120
30121 sed -e "s/\\([ ]${cf_cv_type}[ ]\\).*/\\1$ac_cv_sizeof_long/" confdefs.h >conftest.val
30122 mv conftest.val confdefs.h
30123 fi
30124 fi
30125
30126 echo "$as_me:30126: checking for off_t" >&5
30127 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
30128 if test "${ac_cv_type_off_t+set}" = set; then
30129 echo $ECHO_N "(cached) $ECHO_C" >&6
30130 else
30131 cat >"conftest.$ac_ext" <<_ACEOF
30132 #line 30132 "configure"
30133 #include "confdefs.h"
30134 $ac_includes_default
30135 int
30136 main (void)
30137 {
30138 if ((off_t *) 0)
30139 return 0;
30140 if (sizeof (off_t))
30141 return 0;
30142 ;
30143 return 0;
30144 }
30145 _ACEOF
30146 rm -f "conftest.$ac_objext"
30147 if { (eval echo "$as_me:30147: \"$ac_compile\"") >&5
30148 (eval $ac_compile) 2>&5
30149 ac_status=$?
30150 echo "$as_me:30150: \$? = $ac_status" >&5
30151 (exit "$ac_status"); } &&
30152 { ac_try='test -s "conftest.$ac_objext"'
30153 { (eval echo "$as_me:30153: \"$ac_try\"") >&5
30154 (eval $ac_try) 2>&5
30155 ac_status=$?
30156 echo "$as_me:30156: \$? = $ac_status" >&5
30157 (exit "$ac_status"); }; }; then
30158 ac_cv_type_off_t=yes
30159 else
30160 echo "$as_me: failed program was:" >&5
30161 cat "conftest.$ac_ext" >&5
30162 ac_cv_type_off_t=no
30163 fi
30164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30165 fi
30166 echo "$as_me:30166: result: $ac_cv_type_off_t" >&5
30167 echo "${ECHO_T}$ac_cv_type_off_t" >&6
30168
30169 echo "$as_me:30169: checking size of off_t" >&5
30170 echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
30171 if test "${ac_cv_sizeof_off_t+set}" = set; then
30172 echo $ECHO_N "(cached) $ECHO_C" >&6
30173 else
30174 if test "$ac_cv_type_off_t" = yes; then
30175 if test "$cross_compiling" = yes; then
30176 # Depending upon the size, compute the lo and hi bounds.
30177 cat >"conftest.$ac_ext" <<_ACEOF
30178 #line 30178 "configure"
30179 #include "confdefs.h"
30180 $ac_includes_default
30181 int
30182 main (void)
30183 {
30184 int _array_ [1 - 2 * !((sizeof (off_t)) >= 0)]; (void)_array_;
30185 ;
30186 return 0;
30187 }
30188 _ACEOF
30189 rm -f "conftest.$ac_objext"
30190 if { (eval echo "$as_me:30190: \"$ac_compile\"") >&5
30191 (eval $ac_compile) 2>&5
30192 ac_status=$?
30193 echo "$as_me:30193: \$? = $ac_status" >&5
30194 (exit "$ac_status"); } &&
30195 { ac_try='test -s "conftest.$ac_objext"'
30196 { (eval echo "$as_me:30196: \"$ac_try\"") >&5
30197 (eval $ac_try) 2>&5
30198 ac_status=$?
30199 echo "$as_me:30199: \$? = $ac_status" >&5
30200 (exit "$ac_status"); }; }; then
30201 ac_lo=0 ac_mid=0
30202 while :; do
30203 cat >"conftest.$ac_ext" <<_ACEOF
30204 #line 30204 "configure"
30205 #include "confdefs.h"
30206 $ac_includes_default
30207 int
30208 main (void)
30209 {
30210 int _array_ [1 - 2 * !((sizeof (off_t)) <= $ac_mid)]; (void)_array_;
30211 ;
30212 return 0;
30213 }
30214 _ACEOF
30215 rm -f "conftest.$ac_objext"
30216 if { (eval echo "$as_me:30216: \"$ac_compile\"") >&5
30217 (eval $ac_compile) 2>&5
30218 ac_status=$?
30219 echo "$as_me:30219: \$? = $ac_status" >&5
30220 (exit "$ac_status"); } &&
30221 { ac_try='test -s "conftest.$ac_objext"'
30222 { (eval echo "$as_me:30222: \"$ac_try\"") >&5
30223 (eval $ac_try) 2>&5
30224 ac_status=$?
30225 echo "$as_me:30225: \$? = $ac_status" >&5
30226 (exit "$ac_status"); }; }; then
30227 ac_hi=$ac_mid; break
30228 else
30229 echo "$as_me: failed program was:" >&5
30230 cat "conftest.$ac_ext" >&5
30231 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
30232 fi
30233 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30234 done
30235 else
30236 echo "$as_me: failed program was:" >&5
30237 cat "conftest.$ac_ext" >&5
30238 ac_hi=-1 ac_mid=-1
30239 while :; do
30240 cat >"conftest.$ac_ext" <<_ACEOF
30241 #line 30241 "configure"
30242 #include "confdefs.h"
30243 $ac_includes_default
30244 int
30245 main (void)
30246 {
30247 int _array_ [1 - 2 * !((sizeof (off_t)) >= $ac_mid)]; (void)_array_;
30248 ;
30249 return 0;
30250 }
30251 _ACEOF
30252 rm -f "conftest.$ac_objext"
30253 if { (eval echo "$as_me:30253: \"$ac_compile\"") >&5
30254 (eval $ac_compile) 2>&5
30255 ac_status=$?
30256 echo "$as_me:30256: \$? = $ac_status" >&5
30257 (exit "$ac_status"); } &&
30258 { ac_try='test -s "conftest.$ac_objext"'
30259 { (eval echo "$as_me:30259: \"$ac_try\"") >&5
30260 (eval $ac_try) 2>&5
30261 ac_status=$?
30262 echo "$as_me:30262: \$? = $ac_status" >&5
30263 (exit "$ac_status"); }; }; then
30264 ac_lo=$ac_mid; break
30265 else
30266 echo "$as_me: failed program was:" >&5
30267 cat "conftest.$ac_ext" >&5
30268 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
30269 fi
30270 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30271 done
30272 fi
30273 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30274 # Binary search between lo and hi bounds.
30275 while test "x$ac_lo" != "x$ac_hi"; do
30276 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
30277 cat >"conftest.$ac_ext" <<_ACEOF
30278 #line 30278 "configure"
30279 #include "confdefs.h"
30280 $ac_includes_default
30281 int
30282 main (void)
30283 {
30284 int _array_ [1 - 2 * !((sizeof (off_t)) <= $ac_mid)]; (void)_array_;
30285 ;
30286 return 0;
30287 }
30288 _ACEOF
30289 rm -f "conftest.$ac_objext"
30290 if { (eval echo "$as_me:30290: \"$ac_compile\"") >&5
30291 (eval $ac_compile) 2>&5
30292 ac_status=$?
30293 echo "$as_me:30293: \$? = $ac_status" >&5
30294 (exit "$ac_status"); } &&
30295 { ac_try='test -s "conftest.$ac_objext"'
30296 { (eval echo "$as_me:30296: \"$ac_try\"") >&5
30297 (eval $ac_try) 2>&5
30298 ac_status=$?
30299 echo "$as_me:30299: \$? = $ac_status" >&5
30300 (exit "$ac_status"); }; }; then
30301 ac_hi=$ac_mid
30302 else
30303 echo "$as_me: failed program was:" >&5
30304 cat "conftest.$ac_ext" >&5
30305 ac_lo=`expr "$ac_mid" + 1`
30306 fi
30307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30308 done
30309 ac_cv_sizeof_off_t=$ac_lo
30310 else
30311 if test "$cross_compiling" = yes; then
30312 { { echo "$as_me:30312: error: cannot run test program while cross compiling" >&5
30313 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
30314 { (exit 1); exit 1; }; }
30315 else
30316 cat >"conftest.$ac_ext" <<_ACEOF
30317 #line 30317 "configure"
30318 #include "confdefs.h"
30319 $ac_includes_default
30320 int
30321 main (void)
30322 {
30323 FILE *f = fopen ("conftest.val", "w");
30324 if (!f)
30325 $ac_main_return (1);
30326 fprintf (f, "%ld", (long)(sizeof (off_t)));
30327 fclose (f);
30328 ;
30329 return 0;
30330 }
30331 _ACEOF
30332 rm -f "conftest$ac_exeext"
30333 if { (eval echo "$as_me:30333: \"$ac_link\"") >&5
30334 (eval $ac_link) 2>&5
30335 ac_status=$?
30336 echo "$as_me:30336: \$? = $ac_status" >&5
30337 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
30338 { (eval echo "$as_me:30338: \"$ac_try\"") >&5
30339 (eval $ac_try) 2>&5
30340 ac_status=$?
30341 echo "$as_me:30341: \$? = $ac_status" >&5
30342 (exit "$ac_status"); }; }; then
30343 ac_cv_sizeof_off_t=`cat conftest.val`
30344 else
30345 echo "$as_me: program exited with status $ac_status" >&5
30346 echo "$as_me: failed program was:" >&5
30347 cat "conftest.$ac_ext" >&5
30348 fi
30349 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
30350 fi
30351 fi
30352 rm -f conftest.val
30353 else
30354 ac_cv_sizeof_off_t=0
30355 fi
30356 fi
30357 echo "$as_me:30357: result: $ac_cv_sizeof_off_t" >&5
30358 echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
30359 cat >>confdefs.h <<EOF
30360 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
30361 EOF
30362
30363 if test "${ac_cv_type_off_t+set}" = set; then
30364 cf_my_sizeof="$ac_cv_sizeof_off_t"
30365 if test "${ac_cv_sizeof_off_t+set}" != set; then
30366 { echo "$as_me:30366: WARNING: using 4 for sizeof off_t" >&5
30367 echo "$as_me: WARNING: using 4 for sizeof off_t" >&2;}
30368 ac_cv_sizeof_off_t=4
30369 elif test "x${ac_cv_sizeof_off_t}" = x0; then
30370 { echo "$as_me:30370: WARNING: sizeof off_t not found, using 4" >&5
30371 echo "$as_me: WARNING: sizeof off_t not found, using 4" >&2;}
30372 ac_cv_sizeof_off_t=4
30373 fi
30374 if test "x$ac_cv_sizeof_off_t" != "x$cf_my_sizeof"
30375 then
30376
30377 cf_cv_type=`echo "sizeof_off_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30378
30379 sed -e "s/\\([ ]${cf_cv_type}[ ]\\).*/\\1$ac_cv_sizeof_off_t/" confdefs.h >conftest.val
30380 mv conftest.val confdefs.h
30381 fi
30382 fi
30383
30384 echo "$as_me:30384: checking for size_t" >&5
30385 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
30386 if test "${ac_cv_type_size_t+set}" = set; then
30387 echo $ECHO_N "(cached) $ECHO_C" >&6
30388 else
30389 cat >"conftest.$ac_ext" <<_ACEOF
30390 #line 30390 "configure"
30391 #include "confdefs.h"
30392 $ac_includes_default
30393 int
30394 main (void)
30395 {
30396 if ((size_t *) 0)
30397 return 0;
30398 if (sizeof (size_t))
30399 return 0;
30400 ;
30401 return 0;
30402 }
30403 _ACEOF
30404 rm -f "conftest.$ac_objext"
30405 if { (eval echo "$as_me:30405: \"$ac_compile\"") >&5
30406 (eval $ac_compile) 2>&5
30407 ac_status=$?
30408 echo "$as_me:30408: \$? = $ac_status" >&5
30409 (exit "$ac_status"); } &&
30410 { ac_try='test -s "conftest.$ac_objext"'
30411 { (eval echo "$as_me:30411: \"$ac_try\"") >&5
30412 (eval $ac_try) 2>&5
30413 ac_status=$?
30414 echo "$as_me:30414: \$? = $ac_status" >&5
30415 (exit "$ac_status"); }; }; then
30416 ac_cv_type_size_t=yes
30417 else
30418 echo "$as_me: failed program was:" >&5
30419 cat "conftest.$ac_ext" >&5
30420 ac_cv_type_size_t=no
30421 fi
30422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30423 fi
30424 echo "$as_me:30424: result: $ac_cv_type_size_t" >&5
30425 echo "${ECHO_T}$ac_cv_type_size_t" >&6
30426
30427 echo "$as_me:30427: checking size of size_t" >&5
30428 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
30429 if test "${ac_cv_sizeof_size_t+set}" = set; then
30430 echo $ECHO_N "(cached) $ECHO_C" >&6
30431 else
30432 if test "$ac_cv_type_size_t" = yes; then
30433 if test "$cross_compiling" = yes; then
30434 # Depending upon the size, compute the lo and hi bounds.
30435 cat >"conftest.$ac_ext" <<_ACEOF
30436 #line 30436 "configure"
30437 #include "confdefs.h"
30438 $ac_includes_default
30439 int
30440 main (void)
30441 {
30442 int _array_ [1 - 2 * !((sizeof (size_t)) >= 0)]; (void)_array_;
30443 ;
30444 return 0;
30445 }
30446 _ACEOF
30447 rm -f "conftest.$ac_objext"
30448 if { (eval echo "$as_me:30448: \"$ac_compile\"") >&5
30449 (eval $ac_compile) 2>&5
30450 ac_status=$?
30451 echo "$as_me:30451: \$? = $ac_status" >&5
30452 (exit "$ac_status"); } &&
30453 { ac_try='test -s "conftest.$ac_objext"'
30454 { (eval echo "$as_me:30454: \"$ac_try\"") >&5
30455 (eval $ac_try) 2>&5
30456 ac_status=$?
30457 echo "$as_me:30457: \$? = $ac_status" >&5
30458 (exit "$ac_status"); }; }; then
30459 ac_lo=0 ac_mid=0
30460 while :; do
30461 cat >"conftest.$ac_ext" <<_ACEOF
30462 #line 30462 "configure"
30463 #include "confdefs.h"
30464 $ac_includes_default
30465 int
30466 main (void)
30467 {
30468 int _array_ [1 - 2 * !((sizeof (size_t)) <= $ac_mid)]; (void)_array_;
30469 ;
30470 return 0;
30471 }
30472 _ACEOF
30473 rm -f "conftest.$ac_objext"
30474 if { (eval echo "$as_me:30474: \"$ac_compile\"") >&5
30475 (eval $ac_compile) 2>&5
30476 ac_status=$?
30477 echo "$as_me:30477: \$? = $ac_status" >&5
30478 (exit "$ac_status"); } &&
30479 { ac_try='test -s "conftest.$ac_objext"'
30480 { (eval echo "$as_me:30480: \"$ac_try\"") >&5
30481 (eval $ac_try) 2>&5
30482 ac_status=$?
30483 echo "$as_me:30483: \$? = $ac_status" >&5
30484 (exit "$ac_status"); }; }; then
30485 ac_hi=$ac_mid; break
30486 else
30487 echo "$as_me: failed program was:" >&5
30488 cat "conftest.$ac_ext" >&5
30489 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
30490 fi
30491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30492 done
30493 else
30494 echo "$as_me: failed program was:" >&5
30495 cat "conftest.$ac_ext" >&5
30496 ac_hi=-1 ac_mid=-1
30497 while :; do
30498 cat >"conftest.$ac_ext" <<_ACEOF
30499 #line 30499 "configure"
30500 #include "confdefs.h"
30501 $ac_includes_default
30502 int
30503 main (void)
30504 {
30505 int _array_ [1 - 2 * !((sizeof (size_t)) >= $ac_mid)]; (void)_array_;
30506 ;
30507 return 0;
30508 }
30509 _ACEOF
30510 rm -f "conftest.$ac_objext"
30511 if { (eval echo "$as_me:30511: \"$ac_compile\"") >&5
30512 (eval $ac_compile) 2>&5
30513 ac_status=$?
30514 echo "$as_me:30514: \$? = $ac_status" >&5
30515 (exit "$ac_status"); } &&
30516 { ac_try='test -s "conftest.$ac_objext"'
30517 { (eval echo "$as_me:30517: \"$ac_try\"") >&5
30518 (eval $ac_try) 2>&5
30519 ac_status=$?
30520 echo "$as_me:30520: \$? = $ac_status" >&5
30521 (exit "$ac_status"); }; }; then
30522 ac_lo=$ac_mid; break
30523 else
30524 echo "$as_me: failed program was:" >&5
30525 cat "conftest.$ac_ext" >&5
30526 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
30527 fi
30528 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30529 done
30530 fi
30531 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30532 # Binary search between lo and hi bounds.
30533 while test "x$ac_lo" != "x$ac_hi"; do
30534 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
30535 cat >"conftest.$ac_ext" <<_ACEOF
30536 #line 30536 "configure"
30537 #include "confdefs.h"
30538 $ac_includes_default
30539 int
30540 main (void)
30541 {
30542 int _array_ [1 - 2 * !((sizeof (size_t)) <= $ac_mid)]; (void)_array_;
30543 ;
30544 return 0;
30545 }
30546 _ACEOF
30547 rm -f "conftest.$ac_objext"
30548 if { (eval echo "$as_me:30548: \"$ac_compile\"") >&5
30549 (eval $ac_compile) 2>&5
30550 ac_status=$?
30551 echo "$as_me:30551: \$? = $ac_status" >&5
30552 (exit "$ac_status"); } &&
30553 { ac_try='test -s "conftest.$ac_objext"'
30554 { (eval echo "$as_me:30554: \"$ac_try\"") >&5
30555 (eval $ac_try) 2>&5
30556 ac_status=$?
30557 echo "$as_me:30557: \$? = $ac_status" >&5
30558 (exit "$ac_status"); }; }; then
30559 ac_hi=$ac_mid
30560 else
30561 echo "$as_me: failed program was:" >&5
30562 cat "conftest.$ac_ext" >&5
30563 ac_lo=`expr "$ac_mid" + 1`
30564 fi
30565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30566 done
30567 ac_cv_sizeof_size_t=$ac_lo
30568 else
30569 if test "$cross_compiling" = yes; then
30570 { { echo "$as_me:30570: error: cannot run test program while cross compiling" >&5
30571 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
30572 { (exit 1); exit 1; }; }
30573 else
30574 cat >"conftest.$ac_ext" <<_ACEOF
30575 #line 30575 "configure"
30576 #include "confdefs.h"
30577 $ac_includes_default
30578 int
30579 main (void)
30580 {
30581 FILE *f = fopen ("conftest.val", "w");
30582 if (!f)
30583 $ac_main_return (1);
30584 fprintf (f, "%ld", (long)(sizeof (size_t)));
30585 fclose (f);
30586 ;
30587 return 0;
30588 }
30589 _ACEOF
30590 rm -f "conftest$ac_exeext"
30591 if { (eval echo "$as_me:30591: \"$ac_link\"") >&5
30592 (eval $ac_link) 2>&5
30593 ac_status=$?
30594 echo "$as_me:30594: \$? = $ac_status" >&5
30595 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
30596 { (eval echo "$as_me:30596: \"$ac_try\"") >&5
30597 (eval $ac_try) 2>&5
30598 ac_status=$?
30599 echo "$as_me:30599: \$? = $ac_status" >&5
30600 (exit "$ac_status"); }; }; then
30601 ac_cv_sizeof_size_t=`cat conftest.val`
30602 else
30603 echo "$as_me: program exited with status $ac_status" >&5
30604 echo "$as_me: failed program was:" >&5
30605 cat "conftest.$ac_ext" >&5
30606 fi
30607 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
30608 fi
30609 fi
30610 rm -f conftest.val
30611 else
30612 ac_cv_sizeof_size_t=0
30613 fi
30614 fi
30615 echo "$as_me:30615: result: $ac_cv_sizeof_size_t" >&5
30616 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
30617 cat >>confdefs.h <<EOF
30618 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
30619 EOF
30620
30621 if test "${ac_cv_type_size_t+set}" = set; then
30622 cf_my_sizeof="$ac_cv_sizeof_size_t"
30623 if test "${ac_cv_sizeof_size_t+set}" != set; then
30624 { echo "$as_me:30624: WARNING: using 4 for sizeof size_t" >&5
30625 echo "$as_me: WARNING: using 4 for sizeof size_t" >&2;}
30626 ac_cv_sizeof_size_t=4
30627 elif test "x${ac_cv_sizeof_size_t}" = x0; then
30628 { echo "$as_me:30628: WARNING: sizeof size_t not found, using 4" >&5
30629 echo "$as_me: WARNING: sizeof size_t not found, using 4" >&2;}
30630 ac_cv_sizeof_size_t=4
30631 fi
30632 if test "x$ac_cv_sizeof_size_t" != "x$cf_my_sizeof"
30633 then
30634
30635 cf_cv_type=`echo "sizeof_size_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30636
30637 sed -e "s/\\([ ]${cf_cv_type}[ ]\\).*/\\1$ac_cv_sizeof_size_t/" confdefs.h >conftest.val
30638 mv conftest.val confdefs.h
30639 fi
30640 fi
30641
30642 echo "$as_me:30642: checking for time_t" >&5
30643 echo $ECHO_N "checking for time_t... $ECHO_C" >&6
30644 if test "${ac_cv_type_time_t+set}" = set; then
30645 echo $ECHO_N "(cached) $ECHO_C" >&6
30646 else
30647 cat >"conftest.$ac_ext" <<_ACEOF
30648 #line 30648 "configure"
30649 #include "confdefs.h"
30650 $ac_includes_default
30651 int
30652 main (void)
30653 {
30654 if ((time_t *) 0)
30655 return 0;
30656 if (sizeof (time_t))
30657 return 0;
30658 ;
30659 return 0;
30660 }
30661 _ACEOF
30662 rm -f "conftest.$ac_objext"
30663 if { (eval echo "$as_me:30663: \"$ac_compile\"") >&5
30664 (eval $ac_compile) 2>&5
30665 ac_status=$?
30666 echo "$as_me:30666: \$? = $ac_status" >&5
30667 (exit "$ac_status"); } &&
30668 { ac_try='test -s "conftest.$ac_objext"'
30669 { (eval echo "$as_me:30669: \"$ac_try\"") >&5
30670 (eval $ac_try) 2>&5
30671 ac_status=$?
30672 echo "$as_me:30672: \$? = $ac_status" >&5
30673 (exit "$ac_status"); }; }; then
30674 ac_cv_type_time_t=yes
30675 else
30676 echo "$as_me: failed program was:" >&5
30677 cat "conftest.$ac_ext" >&5
30678 ac_cv_type_time_t=no
30679 fi
30680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30681 fi
30682 echo "$as_me:30682: result: $ac_cv_type_time_t" >&5
30683 echo "${ECHO_T}$ac_cv_type_time_t" >&6
30684
30685 echo "$as_me:30685: checking size of time_t" >&5
30686 echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
30687 if test "${ac_cv_sizeof_time_t+set}" = set; then
30688 echo $ECHO_N "(cached) $ECHO_C" >&6
30689 else
30690 if test "$ac_cv_type_time_t" = yes; then
30691 if test "$cross_compiling" = yes; then
30692 # Depending upon the size, compute the lo and hi bounds.
30693 cat >"conftest.$ac_ext" <<_ACEOF
30694 #line 30694 "configure"
30695 #include "confdefs.h"
30696 $ac_includes_default
30697 int
30698 main (void)
30699 {
30700 int _array_ [1 - 2 * !((sizeof (time_t)) >= 0)]; (void)_array_;
30701 ;
30702 return 0;
30703 }
30704 _ACEOF
30705 rm -f "conftest.$ac_objext"
30706 if { (eval echo "$as_me:30706: \"$ac_compile\"") >&5
30707 (eval $ac_compile) 2>&5
30708 ac_status=$?
30709 echo "$as_me:30709: \$? = $ac_status" >&5
30710 (exit "$ac_status"); } &&
30711 { ac_try='test -s "conftest.$ac_objext"'
30712 { (eval echo "$as_me:30712: \"$ac_try\"") >&5
30713 (eval $ac_try) 2>&5
30714 ac_status=$?
30715 echo "$as_me:30715: \$? = $ac_status" >&5
30716 (exit "$ac_status"); }; }; then
30717 ac_lo=0 ac_mid=0
30718 while :; do
30719 cat >"conftest.$ac_ext" <<_ACEOF
30720 #line 30720 "configure"
30721 #include "confdefs.h"
30722 $ac_includes_default
30723 int
30724 main (void)
30725 {
30726 int _array_ [1 - 2 * !((sizeof (time_t)) <= $ac_mid)]; (void)_array_;
30727 ;
30728 return 0;
30729 }
30730 _ACEOF
30731 rm -f "conftest.$ac_objext"
30732 if { (eval echo "$as_me:30732: \"$ac_compile\"") >&5
30733 (eval $ac_compile) 2>&5
30734 ac_status=$?
30735 echo "$as_me:30735: \$? = $ac_status" >&5
30736 (exit "$ac_status"); } &&
30737 { ac_try='test -s "conftest.$ac_objext"'
30738 { (eval echo "$as_me:30738: \"$ac_try\"") >&5
30739 (eval $ac_try) 2>&5
30740 ac_status=$?
30741 echo "$as_me:30741: \$? = $ac_status" >&5
30742 (exit "$ac_status"); }; }; then
30743 ac_hi=$ac_mid; break
30744 else
30745 echo "$as_me: failed program was:" >&5
30746 cat "conftest.$ac_ext" >&5
30747 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
30748 fi
30749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30750 done
30751 else
30752 echo "$as_me: failed program was:" >&5
30753 cat "conftest.$ac_ext" >&5
30754 ac_hi=-1 ac_mid=-1
30755 while :; do
30756 cat >"conftest.$ac_ext" <<_ACEOF
30757 #line 30757 "configure"
30758 #include "confdefs.h"
30759 $ac_includes_default
30760 int
30761 main (void)
30762 {
30763 int _array_ [1 - 2 * !((sizeof (time_t)) >= $ac_mid)]; (void)_array_;
30764 ;
30765 return 0;
30766 }
30767 _ACEOF
30768 rm -f "conftest.$ac_objext"
30769 if { (eval echo "$as_me:30769: \"$ac_compile\"") >&5
30770 (eval $ac_compile) 2>&5
30771 ac_status=$?
30772 echo "$as_me:30772: \$? = $ac_status" >&5
30773 (exit "$ac_status"); } &&
30774 { ac_try='test -s "conftest.$ac_objext"'
30775 { (eval echo "$as_me:30775: \"$ac_try\"") >&5
30776 (eval $ac_try) 2>&5
30777 ac_status=$?
30778 echo "$as_me:30778: \$? = $ac_status" >&5
30779 (exit "$ac_status"); }; }; then
30780 ac_lo=$ac_mid; break
30781 else
30782 echo "$as_me: failed program was:" >&5
30783 cat "conftest.$ac_ext" >&5
30784 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
30785 fi
30786 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30787 done
30788 fi
30789 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30790 # Binary search between lo and hi bounds.
30791 while test "x$ac_lo" != "x$ac_hi"; do
30792 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
30793 cat >"conftest.$ac_ext" <<_ACEOF
30794 #line 30794 "configure"
30795 #include "confdefs.h"
30796 $ac_includes_default
30797 int
30798 main (void)
30799 {
30800 int _array_ [1 - 2 * !((sizeof (time_t)) <= $ac_mid)]; (void)_array_;
30801 ;
30802 return 0;
30803 }
30804 _ACEOF
30805 rm -f "conftest.$ac_objext"
30806 if { (eval echo "$as_me:30806: \"$ac_compile\"") >&5
30807 (eval $ac_compile) 2>&5
30808 ac_status=$?
30809 echo "$as_me:30809: \$? = $ac_status" >&5
30810 (exit "$ac_status"); } &&
30811 { ac_try='test -s "conftest.$ac_objext"'
30812 { (eval echo "$as_me:30812: \"$ac_try\"") >&5
30813 (eval $ac_try) 2>&5
30814 ac_status=$?
30815 echo "$as_me:30815: \$? = $ac_status" >&5
30816 (exit "$ac_status"); }; }; then
30817 ac_hi=$ac_mid
30818 else
30819 echo "$as_me: failed program was:" >&5
30820 cat "conftest.$ac_ext" >&5
30821 ac_lo=`expr "$ac_mid" + 1`
30822 fi
30823 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30824 done
30825 ac_cv_sizeof_time_t=$ac_lo
30826 else
30827 if test "$cross_compiling" = yes; then
30828 { { echo "$as_me:30828: error: cannot run test program while cross compiling" >&5
30829 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
30830 { (exit 1); exit 1; }; }
30831 else
30832 cat >"conftest.$ac_ext" <<_ACEOF
30833 #line 30833 "configure"
30834 #include "confdefs.h"
30835 $ac_includes_default
30836 int
30837 main (void)
30838 {
30839 FILE *f = fopen ("conftest.val", "w");
30840 if (!f)
30841 $ac_main_return (1);
30842 fprintf (f, "%ld", (long)(sizeof (time_t)));
30843 fclose (f);
30844 ;
30845 return 0;
30846 }
30847 _ACEOF
30848 rm -f "conftest$ac_exeext"
30849 if { (eval echo "$as_me:30849: \"$ac_link\"") >&5
30850 (eval $ac_link) 2>&5
30851 ac_status=$?
30852 echo "$as_me:30852: \$? = $ac_status" >&5
30853 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
30854 { (eval echo "$as_me:30854: \"$ac_try\"") >&5
30855 (eval $ac_try) 2>&5
30856 ac_status=$?
30857 echo "$as_me:30857: \$? = $ac_status" >&5
30858 (exit "$ac_status"); }; }; then
30859 ac_cv_sizeof_time_t=`cat conftest.val`
30860 else
30861 echo "$as_me: program exited with status $ac_status" >&5
30862 echo "$as_me: failed program was:" >&5
30863 cat "conftest.$ac_ext" >&5
30864 fi
30865 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
30866 fi
30867 fi
30868 rm -f conftest.val
30869 else
30870 ac_cv_sizeof_time_t=0
30871 fi
30872 fi
30873 echo "$as_me:30873: result: $ac_cv_sizeof_time_t" >&5
30874 echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
30875 cat >>confdefs.h <<EOF
30876 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
30877 EOF
30878
30879 if test "${ac_cv_type_time_t+set}" = set; then
30880 cf_my_sizeof="$ac_cv_sizeof_time_t"
30881 if test "${ac_cv_sizeof_time_t+set}" != set; then
30882 { echo "$as_me:30882: WARNING: using 4 for sizeof time_t" >&5
30883 echo "$as_me: WARNING: using 4 for sizeof time_t" >&2;}
30884 ac_cv_sizeof_time_t=4
30885 elif test "x${ac_cv_sizeof_time_t}" = x0; then
30886 { echo "$as_me:30886: WARNING: sizeof time_t not found, using 4" >&5
30887 echo "$as_me: WARNING: sizeof time_t not found, using 4" >&2;}
30888 ac_cv_sizeof_time_t=4
30889 fi
30890 if test "x$ac_cv_sizeof_time_t" != "x$cf_my_sizeof"
30891 then
30892
30893 cf_cv_type=`echo "sizeof_time_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30894
30895 sed -e "s/\\([ ]${cf_cv_type}[ ]\\).*/\\1$ac_cv_sizeof_time_t/" confdefs.h >conftest.val
30896 mv conftest.val confdefs.h
30897 fi
30898 fi
30899
30900 echo "$as_me:30900: checking for intptr_t" >&5
30901 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
30902 if test "${ac_cv_type_intptr_t+set}" = set; then
30903 echo $ECHO_N "(cached) $ECHO_C" >&6
30904 else
30905 cat >"conftest.$ac_ext" <<_ACEOF
30906 #line 30906 "configure"
30907 #include "confdefs.h"
30908 $ac_includes_default
30909 int
30910 main (void)
30911 {
30912 if ((intptr_t *) 0)
30913 return 0;
30914 if (sizeof (intptr_t))
30915 return 0;
30916 ;
30917 return 0;
30918 }
30919 _ACEOF
30920 rm -f "conftest.$ac_objext"
30921 if { (eval echo "$as_me:30921: \"$ac_compile\"") >&5
30922 (eval $ac_compile) 2>&5
30923 ac_status=$?
30924 echo "$as_me:30924: \$? = $ac_status" >&5
30925 (exit "$ac_status"); } &&
30926 { ac_try='test -s "conftest.$ac_objext"'
30927 { (eval echo "$as_me:30927: \"$ac_try\"") >&5
30928 (eval $ac_try) 2>&5
30929 ac_status=$?
30930 echo "$as_me:30930: \$? = $ac_status" >&5
30931 (exit "$ac_status"); }; }; then
30932 ac_cv_type_intptr_t=yes
30933 else
30934 echo "$as_me: failed program was:" >&5
30935 cat "conftest.$ac_ext" >&5
30936 ac_cv_type_intptr_t=no
30937 fi
30938 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30939 fi
30940 echo "$as_me:30940: result: $ac_cv_type_intptr_t" >&5
30941 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
30942 if test "$ac_cv_type_intptr_t" = yes; then
30943 :
30944 else
30945
30946 cat >>confdefs.h <<EOF
30947 #define intptr_t long
30948 EOF
30949
30950 fi
30951
30952 cf_includes_network="\
30953 $ac_includes_default
30954 #include <sys/socket.h>
30955 #include <netinet/in.h>
30956 "
30957
30958 echo "$as_me:30958: checking for struct sockaddr_in" >&5
30959 echo $ECHO_N "checking for struct sockaddr_in... $ECHO_C" >&6
30960 if test "${ac_cv_type_struct_sockaddr_in+set}" = set; then
30961 echo $ECHO_N "(cached) $ECHO_C" >&6
30962 else
30963 cat >"conftest.$ac_ext" <<_ACEOF
30964 #line 30964 "configure"
30965 #include "confdefs.h"
30966 $cf_includes_network
30967
30968 int
30969 main (void)
30970 {
30971 if ((struct sockaddr_in *) 0)
30972 return 0;
30973 if (sizeof (struct sockaddr_in))
30974 return 0;
30975 ;
30976 return 0;
30977 }
30978 _ACEOF
30979 rm -f "conftest.$ac_objext"
30980 if { (eval echo "$as_me:30980: \"$ac_compile\"") >&5
30981 (eval $ac_compile) 2>&5
30982 ac_status=$?
30983 echo "$as_me:30983: \$? = $ac_status" >&5
30984 (exit "$ac_status"); } &&
30985 { ac_try='test -s "conftest.$ac_objext"'
30986 { (eval echo "$as_me:30986: \"$ac_try\"") >&5
30987 (eval $ac_try) 2>&5
30988 ac_status=$?
30989 echo "$as_me:30989: \$? = $ac_status" >&5
30990 (exit "$ac_status"); }; }; then
30991 ac_cv_type_struct_sockaddr_in=yes
30992 else
30993 echo "$as_me: failed program was:" >&5
30994 cat "conftest.$ac_ext" >&5
30995 ac_cv_type_struct_sockaddr_in=no
30996 fi
30997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30998 fi
30999 echo "$as_me:30999: result: $ac_cv_type_struct_sockaddr_in" >&5
31000 echo "${ECHO_T}$ac_cv_type_struct_sockaddr_in" >&6
31001
31002 echo "$as_me:31002: checking size of struct sockaddr_in" >&5
31003 echo $ECHO_N "checking size of struct sockaddr_in... $ECHO_C" >&6
31004 if test "${ac_cv_sizeof_struct_sockaddr_in+set}" = set; then
31005 echo $ECHO_N "(cached) $ECHO_C" >&6
31006 else
31007 if test "$ac_cv_type_struct_sockaddr_in" = yes; then
31008 if test "$cross_compiling" = yes; then
31009 # Depending upon the size, compute the lo and hi bounds.
31010 cat >"conftest.$ac_ext" <<_ACEOF
31011 #line 31011 "configure"
31012 #include "confdefs.h"
31013 $cf_includes_network
31014
31015 int
31016 main (void)
31017 {
31018 int _array_ [1 - 2 * !((sizeof (struct sockaddr_in)) >= 0)]; (void)_array_;
31019 ;
31020 return 0;
31021 }
31022 _ACEOF
31023 rm -f "conftest.$ac_objext"
31024 if { (eval echo "$as_me:31024: \"$ac_compile\"") >&5
31025 (eval $ac_compile) 2>&5
31026 ac_status=$?
31027 echo "$as_me:31027: \$? = $ac_status" >&5
31028 (exit "$ac_status"); } &&
31029 { ac_try='test -s "conftest.$ac_objext"'
31030 { (eval echo "$as_me:31030: \"$ac_try\"") >&5
31031 (eval $ac_try) 2>&5
31032 ac_status=$?
31033 echo "$as_me:31033: \$? = $ac_status" >&5
31034 (exit "$ac_status"); }; }; then
31035 ac_lo=0 ac_mid=0
31036 while :; do
31037 cat >"conftest.$ac_ext" <<_ACEOF
31038 #line 31038 "configure"
31039 #include "confdefs.h"
31040 $cf_includes_network
31041
31042 int
31043 main (void)
31044 {
31045 int _array_ [1 - 2 * !((sizeof (struct sockaddr_in)) <= $ac_mid)]; (void)_array_;
31046 ;
31047 return 0;
31048 }
31049 _ACEOF
31050 rm -f "conftest.$ac_objext"
31051 if { (eval echo "$as_me:31051: \"$ac_compile\"") >&5
31052 (eval $ac_compile) 2>&5
31053 ac_status=$?
31054 echo "$as_me:31054: \$? = $ac_status" >&5
31055 (exit "$ac_status"); } &&
31056 { ac_try='test -s "conftest.$ac_objext"'
31057 { (eval echo "$as_me:31057: \"$ac_try\"") >&5
31058 (eval $ac_try) 2>&5
31059 ac_status=$?
31060 echo "$as_me:31060: \$? = $ac_status" >&5
31061 (exit "$ac_status"); }; }; then
31062 ac_hi=$ac_mid; break
31063 else
31064 echo "$as_me: failed program was:" >&5
31065 cat "conftest.$ac_ext" >&5
31066 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
31067 fi
31068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31069 done
31070 else
31071 echo "$as_me: failed program was:" >&5
31072 cat "conftest.$ac_ext" >&5
31073 ac_hi=-1 ac_mid=-1
31074 while :; do
31075 cat >"conftest.$ac_ext" <<_ACEOF
31076 #line 31076 "configure"
31077 #include "confdefs.h"
31078 $cf_includes_network
31079
31080 int
31081 main (void)
31082 {
31083 int _array_ [1 - 2 * !((sizeof (struct sockaddr_in)) >= $ac_mid)]; (void)_array_;
31084 ;
31085 return 0;
31086 }
31087 _ACEOF
31088 rm -f "conftest.$ac_objext"
31089 if { (eval echo "$as_me:31089: \"$ac_compile\"") >&5
31090 (eval $ac_compile) 2>&5
31091 ac_status=$?
31092 echo "$as_me:31092: \$? = $ac_status" >&5
31093 (exit "$ac_status"); } &&
31094 { ac_try='test -s "conftest.$ac_objext"'
31095 { (eval echo "$as_me:31095: \"$ac_try\"") >&5
31096 (eval $ac_try) 2>&5
31097 ac_status=$?
31098 echo "$as_me:31098: \$? = $ac_status" >&5
31099 (exit "$ac_status"); }; }; then
31100 ac_lo=$ac_mid; break
31101 else
31102 echo "$as_me: failed program was:" >&5
31103 cat "conftest.$ac_ext" >&5
31104 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
31105 fi
31106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31107 done
31108 fi
31109 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31110 # Binary search between lo and hi bounds.
31111 while test "x$ac_lo" != "x$ac_hi"; do
31112 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
31113 cat >"conftest.$ac_ext" <<_ACEOF
31114 #line 31114 "configure"
31115 #include "confdefs.h"
31116 $cf_includes_network
31117
31118 int
31119 main (void)
31120 {
31121 int _array_ [1 - 2 * !((sizeof (struct sockaddr_in)) <= $ac_mid)]; (void)_array_;
31122 ;
31123 return 0;
31124 }
31125 _ACEOF
31126 rm -f "conftest.$ac_objext"
31127 if { (eval echo "$as_me:31127: \"$ac_compile\"") >&5
31128 (eval $ac_compile) 2>&5
31129 ac_status=$?
31130 echo "$as_me:31130: \$? = $ac_status" >&5
31131 (exit "$ac_status"); } &&
31132 { ac_try='test -s "conftest.$ac_objext"'
31133 { (eval echo "$as_me:31133: \"$ac_try\"") >&5
31134 (eval $ac_try) 2>&5
31135 ac_status=$?
31136 echo "$as_me:31136: \$? = $ac_status" >&5
31137 (exit "$ac_status"); }; }; then
31138 ac_hi=$ac_mid
31139 else
31140 echo "$as_me: failed program was:" >&5
31141 cat "conftest.$ac_ext" >&5
31142 ac_lo=`expr "$ac_mid" + 1`
31143 fi
31144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31145 done
31146 ac_cv_sizeof_struct_sockaddr_in=$ac_lo
31147 else
31148 if test "$cross_compiling" = yes; then
31149 { { echo "$as_me:31149: error: cannot run test program while cross compiling" >&5
31150 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
31151 { (exit 1); exit 1; }; }
31152 else
31153 cat >"conftest.$ac_ext" <<_ACEOF
31154 #line 31154 "configure"
31155 #include "confdefs.h"
31156 $cf_includes_network
31157
31158 int
31159 main (void)
31160 {
31161 FILE *f = fopen ("conftest.val", "w");
31162 if (!f)
31163 $ac_main_return (1);
31164 fprintf (f, "%ld", (long)(sizeof (struct sockaddr_in)));
31165 fclose (f);
31166 ;
31167 return 0;
31168 }
31169 _ACEOF
31170 rm -f "conftest$ac_exeext"
31171 if { (eval echo "$as_me:31171: \"$ac_link\"") >&5
31172 (eval $ac_link) 2>&5
31173 ac_status=$?
31174 echo "$as_me:31174: \$? = $ac_status" >&5
31175 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
31176 { (eval echo "$as_me:31176: \"$ac_try\"") >&5
31177 (eval $ac_try) 2>&5
31178 ac_status=$?
31179 echo "$as_me:31179: \$? = $ac_status" >&5
31180 (exit "$ac_status"); }; }; then
31181 ac_cv_sizeof_struct_sockaddr_in=`cat conftest.val`
31182 else
31183 echo "$as_me: program exited with status $ac_status" >&5
31184 echo "$as_me: failed program was:" >&5
31185 cat "conftest.$ac_ext" >&5
31186 fi
31187 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
31188 fi
31189 fi
31190 rm -f conftest.val
31191 else
31192 ac_cv_sizeof_struct_sockaddr_in=0
31193 fi
31194 fi
31195 echo "$as_me:31195: result: $ac_cv_sizeof_struct_sockaddr_in" >&5
31196 echo "${ECHO_T}$ac_cv_sizeof_struct_sockaddr_in" >&6
31197 cat >>confdefs.h <<EOF
31198 #define SIZEOF_STRUCT_SOCKADDR_IN $ac_cv_sizeof_struct_sockaddr_in
31199 EOF
31200
31201 if test "${ac_cv_type_struct_sockaddr_in+set}" = set; then
31202 cf_my_sizeof="$ac_cv_sizeof_struct_sockaddr_in"
31203 if test "${ac_cv_sizeof_struct_sockaddr_in+set}" != set; then
31204 { echo "$as_me:31204: WARNING: using 256 for sizeof struct sockaddr_in" >&5
31205 echo "$as_me: WARNING: using 256 for sizeof struct sockaddr_in" >&2;}
31206 ac_cv_sizeof_struct_sockaddr_in=256
31207 elif test "x${ac_cv_sizeof_struct_sockaddr_in}" = x0; then
31208 { echo "$as_me:31208: WARNING: sizeof struct sockaddr_in not found, using 256" >&5
31209 echo "$as_me: WARNING: sizeof struct sockaddr_in not found, using 256" >&2;}
31210 ac_cv_sizeof_struct_sockaddr_in=256
31211 fi
31212 if test "x$ac_cv_sizeof_struct_sockaddr_in" != "x$cf_my_sizeof"
31213 then
31214
31215 cf_cv_type=`echo "sizeof_struct_sockaddr_in" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31216
31217 sed -e "s/\\([ ]${cf_cv_type}[ ]\\).*/\\1$ac_cv_sizeof_struct_sockaddr_in/" confdefs.h >conftest.val
31218 mv conftest.val confdefs.h
31219 fi
31220 fi
31221
31222 echo "$as_me:31222: checking for struct sockaddr" >&5
31223 echo $ECHO_N "checking for struct sockaddr... $ECHO_C" >&6
31224 if test "${ac_cv_type_struct_sockaddr+set}" = set; then
31225 echo $ECHO_N "(cached) $ECHO_C" >&6
31226 else
31227 cat >"conftest.$ac_ext" <<_ACEOF
31228 #line 31228 "configure"
31229 #include "confdefs.h"
31230 $cf_includes_network
31231
31232 int
31233 main (void)
31234 {
31235 if ((struct sockaddr *) 0)
31236 return 0;
31237 if (sizeof (struct sockaddr))
31238 return 0;
31239 ;
31240 return 0;
31241 }
31242 _ACEOF
31243 rm -f "conftest.$ac_objext"
31244 if { (eval echo "$as_me:31244: \"$ac_compile\"") >&5
31245 (eval $ac_compile) 2>&5
31246 ac_status=$?
31247 echo "$as_me:31247: \$? = $ac_status" >&5
31248 (exit "$ac_status"); } &&
31249 { ac_try='test -s "conftest.$ac_objext"'
31250 { (eval echo "$as_me:31250: \"$ac_try\"") >&5
31251 (eval $ac_try) 2>&5
31252 ac_status=$?
31253 echo "$as_me:31253: \$? = $ac_status" >&5
31254 (exit "$ac_status"); }; }; then
31255 ac_cv_type_struct_sockaddr=yes
31256 else
31257 echo "$as_me: failed program was:" >&5
31258 cat "conftest.$ac_ext" >&5
31259 ac_cv_type_struct_sockaddr=no
31260 fi
31261 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31262 fi
31263 echo "$as_me:31263: result: $ac_cv_type_struct_sockaddr" >&5
31264 echo "${ECHO_T}$ac_cv_type_struct_sockaddr" >&6
31265
31266 echo "$as_me:31266: checking size of struct sockaddr" >&5
31267 echo $ECHO_N "checking size of struct sockaddr... $ECHO_C" >&6
31268 if test "${ac_cv_sizeof_struct_sockaddr+set}" = set; then
31269 echo $ECHO_N "(cached) $ECHO_C" >&6
31270 else
31271 if test "$ac_cv_type_struct_sockaddr" = yes; then
31272 if test "$cross_compiling" = yes; then
31273 # Depending upon the size, compute the lo and hi bounds.
31274 cat >"conftest.$ac_ext" <<_ACEOF
31275 #line 31275 "configure"
31276 #include "confdefs.h"
31277 $cf_includes_network
31278
31279 int
31280 main (void)
31281 {
31282 int _array_ [1 - 2 * !((sizeof (struct sockaddr)) >= 0)]; (void)_array_;
31283 ;
31284 return 0;
31285 }
31286 _ACEOF
31287 rm -f "conftest.$ac_objext"
31288 if { (eval echo "$as_me:31288: \"$ac_compile\"") >&5
31289 (eval $ac_compile) 2>&5
31290 ac_status=$?
31291 echo "$as_me:31291: \$? = $ac_status" >&5
31292 (exit "$ac_status"); } &&
31293 { ac_try='test -s "conftest.$ac_objext"'
31294 { (eval echo "$as_me:31294: \"$ac_try\"") >&5
31295 (eval $ac_try) 2>&5
31296 ac_status=$?
31297 echo "$as_me:31297: \$? = $ac_status" >&5
31298 (exit "$ac_status"); }; }; then
31299 ac_lo=0 ac_mid=0
31300 while :; do
31301 cat >"conftest.$ac_ext" <<_ACEOF
31302 #line 31302 "configure"
31303 #include "confdefs.h"
31304 $cf_includes_network
31305
31306 int
31307 main (void)
31308 {
31309 int _array_ [1 - 2 * !((sizeof (struct sockaddr)) <= $ac_mid)]; (void)_array_;
31310 ;
31311 return 0;
31312 }
31313 _ACEOF
31314 rm -f "conftest.$ac_objext"
31315 if { (eval echo "$as_me:31315: \"$ac_compile\"") >&5
31316 (eval $ac_compile) 2>&5
31317 ac_status=$?
31318 echo "$as_me:31318: \$? = $ac_status" >&5
31319 (exit "$ac_status"); } &&
31320 { ac_try='test -s "conftest.$ac_objext"'
31321 { (eval echo "$as_me:31321: \"$ac_try\"") >&5
31322 (eval $ac_try) 2>&5
31323 ac_status=$?
31324 echo "$as_me:31324: \$? = $ac_status" >&5
31325 (exit "$ac_status"); }; }; then
31326 ac_hi=$ac_mid; break
31327 else
31328 echo "$as_me: failed program was:" >&5
31329 cat "conftest.$ac_ext" >&5
31330 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
31331 fi
31332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31333 done
31334 else
31335 echo "$as_me: failed program was:" >&5
31336 cat "conftest.$ac_ext" >&5
31337 ac_hi=-1 ac_mid=-1
31338 while :; do
31339 cat >"conftest.$ac_ext" <<_ACEOF
31340 #line 31340 "configure"
31341 #include "confdefs.h"
31342 $cf_includes_network
31343
31344 int
31345 main (void)
31346 {
31347 int _array_ [1 - 2 * !((sizeof (struct sockaddr)) >= $ac_mid)]; (void)_array_;
31348 ;
31349 return 0;
31350 }
31351 _ACEOF
31352 rm -f "conftest.$ac_objext"
31353 if { (eval echo "$as_me:31353: \"$ac_compile\"") >&5
31354 (eval $ac_compile) 2>&5
31355 ac_status=$?
31356 echo "$as_me:31356: \$? = $ac_status" >&5
31357 (exit "$ac_status"); } &&
31358 { ac_try='test -s "conftest.$ac_objext"'
31359 { (eval echo "$as_me:31359: \"$ac_try\"") >&5
31360 (eval $ac_try) 2>&5
31361 ac_status=$?
31362 echo "$as_me:31362: \$? = $ac_status" >&5
31363 (exit "$ac_status"); }; }; then
31364 ac_lo=$ac_mid; break
31365 else
31366 echo "$as_me: failed program was:" >&5
31367 cat "conftest.$ac_ext" >&5
31368 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
31369 fi
31370 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31371 done
31372 fi
31373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31374 # Binary search between lo and hi bounds.
31375 while test "x$ac_lo" != "x$ac_hi"; do
31376 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
31377 cat >"conftest.$ac_ext" <<_ACEOF
31378 #line 31378 "configure"
31379 #include "confdefs.h"
31380 $cf_includes_network
31381
31382 int
31383 main (void)
31384 {
31385 int _array_ [1 - 2 * !((sizeof (struct sockaddr)) <= $ac_mid)]; (void)_array_;
31386 ;
31387 return 0;
31388 }
31389 _ACEOF
31390 rm -f "conftest.$ac_objext"
31391 if { (eval echo "$as_me:31391: \"$ac_compile\"") >&5
31392 (eval $ac_compile) 2>&5
31393 ac_status=$?
31394 echo "$as_me:31394: \$? = $ac_status" >&5
31395 (exit "$ac_status"); } &&
31396 { ac_try='test -s "conftest.$ac_objext"'
31397 { (eval echo "$as_me:31397: \"$ac_try\"") >&5
31398 (eval $ac_try) 2>&5
31399 ac_status=$?
31400 echo "$as_me:31400: \$? = $ac_status" >&5
31401 (exit "$ac_status"); }; }; then
31402 ac_hi=$ac_mid
31403 else
31404 echo "$as_me: failed program was:" >&5
31405 cat "conftest.$ac_ext" >&5
31406 ac_lo=`expr "$ac_mid" + 1`
31407 fi
31408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31409 done
31410 ac_cv_sizeof_struct_sockaddr=$ac_lo
31411 else
31412 if test "$cross_compiling" = yes; then
31413 { { echo "$as_me:31413: error: cannot run test program while cross compiling" >&5
31414 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
31415 { (exit 1); exit 1; }; }
31416 else
31417 cat >"conftest.$ac_ext" <<_ACEOF
31418 #line 31418 "configure"
31419 #include "confdefs.h"
31420 $cf_includes_network
31421
31422 int
31423 main (void)
31424 {
31425 FILE *f = fopen ("conftest.val", "w");
31426 if (!f)
31427 $ac_main_return (1);
31428 fprintf (f, "%ld", (long)(sizeof (struct sockaddr)));
31429 fclose (f);
31430 ;
31431 return 0;
31432 }
31433 _ACEOF
31434 rm -f "conftest$ac_exeext"
31435 if { (eval echo "$as_me:31435: \"$ac_link\"") >&5
31436 (eval $ac_link) 2>&5
31437 ac_status=$?
31438 echo "$as_me:31438: \$? = $ac_status" >&5
31439 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
31440 { (eval echo "$as_me:31440: \"$ac_try\"") >&5
31441 (eval $ac_try) 2>&5
31442 ac_status=$?
31443 echo "$as_me:31443: \$? = $ac_status" >&5
31444 (exit "$ac_status"); }; }; then
31445 ac_cv_sizeof_struct_sockaddr=`cat conftest.val`
31446 else
31447 echo "$as_me: program exited with status $ac_status" >&5
31448 echo "$as_me: failed program was:" >&5
31449 cat "conftest.$ac_ext" >&5
31450 fi
31451 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
31452 fi
31453 fi
31454 rm -f conftest.val
31455 else
31456 ac_cv_sizeof_struct_sockaddr=0
31457 fi
31458 fi
31459 echo "$as_me:31459: result: $ac_cv_sizeof_struct_sockaddr" >&5
31460 echo "${ECHO_T}$ac_cv_sizeof_struct_sockaddr" >&6
31461 cat >>confdefs.h <<EOF
31462 #define SIZEOF_STRUCT_SOCKADDR $ac_cv_sizeof_struct_sockaddr
31463 EOF
31464
31465 if test "${ac_cv_type_struct_sockaddr+set}" = set; then
31466 cf_my_sizeof="$ac_cv_sizeof_struct_sockaddr"
31467 if test "${ac_cv_sizeof_struct_sockaddr+set}" != set; then
31468 { echo "$as_me:31468: WARNING: using 256 for sizeof struct sockaddr" >&5
31469 echo "$as_me: WARNING: using 256 for sizeof struct sockaddr" >&2;}
31470 ac_cv_sizeof_struct_sockaddr=256
31471 elif test "x${ac_cv_sizeof_struct_sockaddr}" = x0; then
31472 { echo "$as_me:31472: WARNING: sizeof struct sockaddr not found, using 256" >&5
31473 echo "$as_me: WARNING: sizeof struct sockaddr not found, using 256" >&2;}
31474 ac_cv_sizeof_struct_sockaddr=256
31475 fi
31476 if test "x$ac_cv_sizeof_struct_sockaddr" != "x$cf_my_sizeof"
31477 then
31478
31479 cf_cv_type=`echo "sizeof_struct_sockaddr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31480
31481 sed -e "s/\\([ ]${cf_cv_type}[ ]\\).*/\\1$ac_cv_sizeof_struct_sockaddr/" confdefs.h >conftest.val
31482 mv conftest.val confdefs.h
31483 fi
31484 fi
31485
31486 echo "$as_me:31486: checking if SA_LEN can be simplified" >&5
31487 echo $ECHO_N "checking if SA_LEN can be simplified... $ECHO_C" >&6
31488 if test "${cf_cv_sockaddr_len+set}" = set; then
31489 echo $ECHO_N "(cached) $ECHO_C" >&6
31490 else
31491
31492 cf_cv_sockaddr_len=no
31493 if test "x$ac_cv_sizeof_struct_sockaddr" = "x$ac_cv_sizeof_struct_sockaddr_in"
31494 then
31495 if test "x$ac_cv_sizeof_struct_sockaddr" = "x256" || test -z "$ac_cv_sizeof_struct_sockaddr"
31496 then
31497 cf_cv_sockaddr_len=unknown
31498 else
31499 cf_cv_sockaddr_len=yes
31500 fi
31501 fi
31502
31503 fi
31504 echo "$as_me:31504: result: $cf_cv_sockaddr_len" >&5
31505 echo "${ECHO_T}$cf_cv_sockaddr_len" >&6
31506
31507 if test "$cf_cv_sockaddr_len" = yes
31508 then
31509
31510 cat >>confdefs.h <<\EOF
31511 #define SOCKADDR_LEN_INET 1
31512 EOF
31513
31514 fi
31515
31516 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
31517 # for constant arguments. Useless!
31518 echo "$as_me:31518: checking for working alloca.h" >&5
31519 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
31520 if test "${ac_cv_working_alloca_h+set}" = set; then
31521 echo $ECHO_N "(cached) $ECHO_C" >&6
31522 else
31523 cat >"conftest.$ac_ext" <<_ACEOF
31524 #line 31524 "configure"
31525 #include "confdefs.h"
31526 #include <alloca.h>
31527 int
31528 main (void)
31529 {
31530 char *p = (char *) alloca (2 * sizeof (int)); (void)p;
31531 ;
31532 return 0;
31533 }
31534 _ACEOF
31535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31536 if { (eval echo "$as_me:31536: \"$ac_link\"") >&5
31537 (eval $ac_link) 2>&5
31538 ac_status=$?
31539 echo "$as_me:31539: \$? = $ac_status" >&5
31540 (exit "$ac_status"); } &&
31541 { ac_try='test -s "conftest$ac_exeext"'
31542 { (eval echo "$as_me:31542: \"$ac_try\"") >&5
31543 (eval $ac_try) 2>&5
31544 ac_status=$?
31545 echo "$as_me:31545: \$? = $ac_status" >&5
31546 (exit "$ac_status"); }; }; then
31547 ac_cv_working_alloca_h=yes
31548 else
31549 echo "$as_me: failed program was:" >&5
31550 cat "conftest.$ac_ext" >&5
31551 ac_cv_working_alloca_h=no
31552 fi
31553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31554 fi
31555 echo "$as_me:31555: result: $ac_cv_working_alloca_h" >&5
31556 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
31557 if test $ac_cv_working_alloca_h = yes; then
31558
31559 cat >>confdefs.h <<\EOF
31560 #define HAVE_ALLOCA_H 1
31561 EOF
31562
31563 fi
31564
31565 echo "$as_me:31565: checking for alloca" >&5
31566 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
31567 if test "${ac_cv_func_alloca_works+set}" = set; then
31568 echo $ECHO_N "(cached) $ECHO_C" >&6
31569 else
31570 cat >"conftest.$ac_ext" <<_ACEOF
31571 #line 31571 "configure"
31572 #include "confdefs.h"
31573 #ifdef __GNUC__
31574 # define alloca __builtin_alloca
31575 #else
31576 # ifdef _MSC_VER
31577 # include <malloc.h>
31578 # define alloca _alloca
31579 # else
31580 # if HAVE_ALLOCA_H
31581 # include <alloca.h>
31582 # else
31583 # ifdef _AIX
31584 #pragma alloca
31585 # else
31586 # ifndef alloca /* predefined by HP cc +Olibcalls */
31587 char *alloca ();
31588 # endif
31589 # endif
31590 # endif
31591 # endif
31592 #endif
31593
31594 int
31595 main (void)
31596 {
31597 char *p = (char *) alloca (1); (void)p;
31598 ;
31599 return 0;
31600 }
31601 _ACEOF
31602 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31603 if { (eval echo "$as_me:31603: \"$ac_link\"") >&5
31604 (eval $ac_link) 2>&5
31605 ac_status=$?
31606 echo "$as_me:31606: \$? = $ac_status" >&5
31607 (exit "$ac_status"); } &&
31608 { ac_try='test -s "conftest$ac_exeext"'
31609 { (eval echo "$as_me:31609: \"$ac_try\"") >&5
31610 (eval $ac_try) 2>&5
31611 ac_status=$?
31612 echo "$as_me:31612: \$? = $ac_status" >&5
31613 (exit "$ac_status"); }; }; then
31614 ac_cv_func_alloca_works=yes
31615 else
31616 echo "$as_me: failed program was:" >&5
31617 cat "conftest.$ac_ext" >&5
31618 ac_cv_func_alloca_works=no
31619 fi
31620 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31621 fi
31622 echo "$as_me:31622: result: $ac_cv_func_alloca_works" >&5
31623 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
31624
31625 if test $ac_cv_func_alloca_works = yes; then
31626
31627 cat >>confdefs.h <<\EOF
31628 #define HAVE_ALLOCA 1
31629 EOF
31630
31631 else
31632 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
31633 # that cause trouble. Some versions do not even contain alloca or
31634 # contain a buggy version. If you still want to use their alloca,
31635 # use ar to extract alloca.o from them instead of compiling alloca.c.
31636
31637 ALLOCA="alloca.$ac_objext"
31638
31639 cat >>confdefs.h <<\EOF
31640 #define C_ALLOCA 1
31641 EOF
31642
31643 echo "$as_me:31643: checking whether \`alloca.c' needs Cray hooks" >&5
31644 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
31645 if test "${ac_cv_os_cray+set}" = set; then
31646 echo $ECHO_N "(cached) $ECHO_C" >&6
31647 else
31648 cat >"conftest.$ac_ext" <<_ACEOF
31649 #line 31649 "configure"
31650 #include "confdefs.h"
31651 #if defined(CRAY) && ! defined(CRAY2)
31652 webecray
31653 #else
31654 wenotbecray
31655 #endif
31656
31657 _ACEOF
31658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31659 $EGREP "webecray" >/dev/null 2>&1; then
31660 ac_cv_os_cray=yes
31661 else
31662 ac_cv_os_cray=no
31663 fi
31664 rm -rf conftest*
31665
31666 fi
31667 echo "$as_me:31667: result: $ac_cv_os_cray" >&5
31668 echo "${ECHO_T}$ac_cv_os_cray" >&6
31669 if test $ac_cv_os_cray = yes; then
31670 for ac_func in _getb67 GETB67 getb67; do
31671 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
31672 echo "$as_me:31672: checking for $ac_func" >&5
31673 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
31674 if eval "test \"\${$as_ac_var+set}\" = set"; then
31675 echo $ECHO_N "(cached) $ECHO_C" >&6
31676 else
31677 cat >"conftest.$ac_ext" <<_ACEOF
31678 #line 31678 "configure"
31679 #include "confdefs.h"
31680 #define $ac_func autoconf_temporary
31681 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
31682 #undef $ac_func
31683
31684 #ifdef __cplusplus
31685 extern "C"
31686 #endif
31687
31688 /* We use char because int might match the return type of a gcc2
31689 builtin and then its argument prototype would still apply. */
31690 char $ac_func (void);
31691
31692 int
31693 main (void)
31694 {
31695
31696 /* The GNU C library defines stubs for functions which it implements
31697 to always fail with ENOSYS. Some functions are actually named
31698 something starting with __ and the normal name is an alias. */
31699 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
31700 #error found stub for $ac_func
31701 #endif
31702
31703 return $ac_func ();
31704 ;
31705 return 0;
31706 }
31707 _ACEOF
31708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31709 if { (eval echo "$as_me:31709: \"$ac_link\"") >&5
31710 (eval $ac_link) 2>&5
31711 ac_status=$?
31712 echo "$as_me:31712: \$? = $ac_status" >&5
31713 (exit "$ac_status"); } &&
31714 { ac_try='test -s "conftest$ac_exeext"'
31715 { (eval echo "$as_me:31715: \"$ac_try\"") >&5
31716 (eval $ac_try) 2>&5
31717 ac_status=$?
31718 echo "$as_me:31718: \$? = $ac_status" >&5
31719 (exit "$ac_status"); }; }; then
31720 eval "$as_ac_var=yes"
31721 else
31722 echo "$as_me: failed program was:" >&5
31723 cat "conftest.$ac_ext" >&5
31724 eval "$as_ac_var=no"
31725 fi
31726 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31727 fi
31728 echo "$as_me:31728: result: `eval echo '${'"$as_ac_var"'}'`" >&5
31729 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
31730 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
31731
31732 cat >>confdefs.h <<EOF
31733 #define CRAY_STACKSEG_END $ac_func
31734 EOF
31735
31736 break
31737 fi
31738
31739 done
31740 fi
31741
31742 echo "$as_me:31742: checking stack direction for C alloca" >&5
31743 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
31744 if test "${ac_cv_c_stack_direction+set}" = set; then
31745 echo $ECHO_N "(cached) $ECHO_C" >&6
31746 else
31747 if test "$cross_compiling" = yes; then
31748 ac_cv_c_stack_direction=0
31749 else
31750 cat >"conftest.$ac_ext" <<_ACEOF
31751 #line 31751 "configure"
31752 #include "confdefs.h"
31753 int
31754 find_stack_direction (void)
31755 {
31756 static char *addr = 0;
31757 auto char dummy;
31758 if (addr == 0)
31759 {
31760 addr = &dummy;
31761 return find_stack_direction ();
31762 }
31763 else
31764 return (&dummy > addr) ? 1 : -1;
31765 }
31766
31767 int
31768 main (void)
31769 {
31770 $ac_main_return (find_stack_direction () < 0);
31771 }
31772 _ACEOF
31773 rm -f "conftest$ac_exeext"
31774 if { (eval echo "$as_me:31774: \"$ac_link\"") >&5
31775 (eval $ac_link) 2>&5
31776 ac_status=$?
31777 echo "$as_me:31777: \$? = $ac_status" >&5
31778 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
31779 { (eval echo "$as_me:31779: \"$ac_try\"") >&5
31780 (eval $ac_try) 2>&5
31781 ac_status=$?
31782 echo "$as_me:31782: \$? = $ac_status" >&5
31783 (exit "$ac_status"); }; }; then
31784 ac_cv_c_stack_direction=1
31785 else
31786 echo "$as_me: program exited with status $ac_status" >&5
31787 echo "$as_me: failed program was:" >&5
31788 cat "conftest.$ac_ext" >&5
31789 ac_cv_c_stack_direction=-1
31790 fi
31791 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
31792 fi
31793 fi
31794 echo "$as_me:31794: result: $ac_cv_c_stack_direction" >&5
31795 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
31796
31797 cat >>confdefs.h <<EOF
31798 #define STACK_DIRECTION $ac_cv_c_stack_direction
31799 EOF
31800
31801 fi
31802
31803 for ac_header in unistd.h vfork.h
31804 do
31805 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31806 echo "$as_me:31806: checking for $ac_header" >&5
31807 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31808 if eval "test \"\${$as_ac_Header+set}\" = set"; then
31809 echo $ECHO_N "(cached) $ECHO_C" >&6
31810 else
31811 cat >"conftest.$ac_ext" <<_ACEOF
31812 #line 31812 "configure"
31813 #include "confdefs.h"
31814 #include <$ac_header>
31815 _ACEOF
31816 if { (eval echo "$as_me:31816: \"$ac_cpp "conftest.$ac_ext"\"") >&5
31817 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
31818 ac_status=$?
31819 $EGREP -v '^ *\+' conftest.er1 >conftest.err
31820 rm -f conftest.er1
31821 cat conftest.err >&5
31822 echo "$as_me:31822: \$? = $ac_status" >&5
31823 (exit "$ac_status"); } >/dev/null; then
31824 if test -s conftest.err; then
31825 ac_cpp_err=$ac_c_preproc_warn_flag
31826 else
31827 ac_cpp_err=
31828 fi
31829 else
31830 ac_cpp_err=yes
31831 fi
31832 if test -z "$ac_cpp_err"; then
31833 eval "$as_ac_Header=yes"
31834 else
31835 echo "$as_me: failed program was:" >&5
31836 cat "conftest.$ac_ext" >&5
31837 eval "$as_ac_Header=no"
31838 fi
31839 rm -f conftest.err "conftest.$ac_ext"
31840 fi
31841 echo "$as_me:31841: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
31842 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
31843 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
31844 cat >>confdefs.h <<EOF
31845 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31846 EOF
31847
31848 fi
31849 done
31850
31851 for ac_func in fork vfork
31852 do
31853 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
31854 echo "$as_me:31854: checking for $ac_func" >&5
31855 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
31856 if eval "test \"\${$as_ac_var+set}\" = set"; then
31857 echo $ECHO_N "(cached) $ECHO_C" >&6
31858 else
31859 cat >"conftest.$ac_ext" <<_ACEOF
31860 #line 31860 "configure"
31861 #include "confdefs.h"
31862 #define $ac_func autoconf_temporary
31863 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
31864 #undef $ac_func
31865
31866 #ifdef __cplusplus
31867 extern "C"
31868 #endif
31869
31870 /* We use char because int might match the return type of a gcc2
31871 builtin and then its argument prototype would still apply. */
31872 char $ac_func (void);
31873
31874 int
31875 main (void)
31876 {
31877
31878 /* The GNU C library defines stubs for functions which it implements
31879 to always fail with ENOSYS. Some functions are actually named
31880 something starting with __ and the normal name is an alias. */
31881 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
31882 #error found stub for $ac_func
31883 #endif
31884
31885 return $ac_func ();
31886 ;
31887 return 0;
31888 }
31889 _ACEOF
31890 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31891 if { (eval echo "$as_me:31891: \"$ac_link\"") >&5
31892 (eval $ac_link) 2>&5
31893 ac_status=$?
31894 echo "$as_me:31894: \$? = $ac_status" >&5
31895 (exit "$ac_status"); } &&
31896 { ac_try='test -s "conftest$ac_exeext"'
31897 { (eval echo "$as_me:31897: \"$ac_try\"") >&5
31898 (eval $ac_try) 2>&5
31899 ac_status=$?
31900 echo "$as_me:31900: \$? = $ac_status" >&5
31901 (exit "$ac_status"); }; }; then
31902 eval "$as_ac_var=yes"
31903 else
31904 echo "$as_me: failed program was:" >&5
31905 cat "conftest.$ac_ext" >&5
31906 eval "$as_ac_var=no"
31907 fi
31908 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31909 fi
31910 echo "$as_me:31910: result: `eval echo '${'"$as_ac_var"'}'`" >&5
31911 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
31912 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
31913 cat >>confdefs.h <<EOF
31914 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
31915 EOF
31916
31917 fi
31918 done
31919
31920 ac_cv_func_fork_works=$ac_cv_func_fork
31921 if test "x$ac_cv_func_fork" = xyes; then
31922 echo "$as_me:31922: checking for working fork" >&5
31923 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
31924 if test "${ac_cv_func_fork_works+set}" = set; then
31925 echo $ECHO_N "(cached) $ECHO_C" >&6
31926 else
31927 if test "$cross_compiling" = yes; then
31928 ac_cv_func_fork_works=cross
31929 else
31930 cat >"conftest.$ac_ext" <<_ACEOF
31931 /* By Rüdiger Kuhlmann. */
31932 #include <sys/types.h>
31933 #if HAVE_UNISTD_H
31934 # include <unistd.h>
31935 #endif
31936 /* Some systems only have a dummy stub for fork() */
31937 int main (void)
31938 {
31939 if (fork() < 0)
31940 $ac_main_return (1);
31941 $ac_main_return (0);
31942 }
31943 _ACEOF
31944 rm -f "conftest$ac_exeext"
31945 if { (eval echo "$as_me:31945: \"$ac_link\"") >&5
31946 (eval $ac_link) 2>&5
31947 ac_status=$?
31948 echo "$as_me:31948: \$? = $ac_status" >&5
31949 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
31950 { (eval echo "$as_me:31950: \"$ac_try\"") >&5
31951 (eval $ac_try) 2>&5
31952 ac_status=$?
31953 echo "$as_me:31953: \$? = $ac_status" >&5
31954 (exit "$ac_status"); }; }; then
31955 ac_cv_func_fork_works=yes
31956 else
31957 echo "$as_me: program exited with status $ac_status" >&5
31958 echo "$as_me: failed program was:" >&5
31959 cat "conftest.$ac_ext" >&5
31960 ac_cv_func_fork_works=no
31961 fi
31962 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
31963 fi
31964 fi
31965 echo "$as_me:31965: result: $ac_cv_func_fork_works" >&5
31966 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
31967
31968 fi
31969 if test "x$ac_cv_func_fork_works" = xcross; then
31970 case $host in
31971 *-*-amigaos* | *-*-msdosdjgpp*)
31972 # Override, as these systems have only a dummy fork() stub
31973 ac_cv_func_fork_works=no
31974 ;;
31975 *)
31976 ac_cv_func_fork_works=yes
31977 ;;
31978 esac
31979 { echo "$as_me:31979: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
31980 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
31981 fi
31982 ac_cv_func_vfork_works=$ac_cv_func_vfork
31983 if test "x$ac_cv_func_vfork" = xyes; then
31984 echo "$as_me:31984: checking for working vfork" >&5
31985 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
31986 if test "${ac_cv_func_vfork_works+set}" = set; then
31987 echo $ECHO_N "(cached) $ECHO_C" >&6
31988 else
31989 if test "$cross_compiling" = yes; then
31990 ac_cv_func_vfork_works=cross
31991 else
31992 cat >"conftest.$ac_ext" <<_ACEOF
31993 #line 31993 "configure"
31994 #include "confdefs.h"
31995 /* Thanks to Paul Eggert for this test. */
31996 #include <stdio.h>
31997 #include <sys/types.h>
31998 #include <sys/stat.h>
31999 #if HAVE_UNISTD_H
32000 # include <unistd.h>
32001 #endif
32002 #if HAVE_VFORK_H
32003 # include <vfork.h>
32004 #endif
32005 /* On some sparc systems, changes by the child to local and incoming
32006 argument registers are propagated back to the parent. The compiler
32007 is told about this with #include <vfork.h>, but some compilers
32008 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
32009 static variable whose address is put into a register that is
32010 clobbered by the vfork. */
32011 static
32012 sparc_address_test (int arg)
32013 {
32014 static pid_t child;
32015 if (!child) {
32016 child = vfork ();
32017 if (child < 0) {
32018 perror ("vfork");
32019 _exit(2);
32020 }
32021 if (!child) {
32022 arg = getpid();
32023 write(-1, "", 0);
32024 _exit (arg);
32025 }
32026 }
32027 }
32028
32029 int
32030 main (void)
32031 {
32032 pid_t parent = getpid ();
32033 pid_t child;
32034
32035 sparc_address_test ();
32036
32037 child = vfork ();
32038
32039 if (child == 0) {
32040 /* Here is another test for sparc vfork register problems. This
32041 test uses lots of local variables, at least as many local
32042 variables as main has allocated so far including compiler
32043 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
32044 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
32045 reuse the register of parent for one of the local variables,
32046 since it will think that parent can't possibly be used any more
32047 in this routine. Assigning to the local variable will thus
32048 munge parent in the parent process. */
32049 pid_t
32050 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
32051 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
32052 /* Convince the compiler that p..p7 are live; otherwise, it might
32053 use the same hardware register for all 8 local variables. */
32054 if (p != p1 || p != p2 || p != p3 || p != p4
32055 || p != p5 || p != p6 || p != p7)
32056 _exit(1);
32057
32058 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
32059 from child file descriptors. If the child closes a descriptor
32060 before it execs or exits, this munges the parent's descriptor
32061 as well. Test for this by closing stdout in the child. */
32062 _exit(close(fileno(stdout)) != 0);
32063 } else {
32064 int status;
32065 struct stat st;
32066
32067 while (wait(&status) != child)
32068 ;
32069 $ac_main_return(
32070 /* Was there some problem with vforking? */
32071 child < 0
32072
32073 /* Did the child fail? (This shouldn't happen.) */
32074 || status
32075
32076 /* Did the vfork/compiler bug occur? */
32077 || parent != getpid()
32078
32079 /* Did the file descriptor bug occur? */
32080 || fstat(fileno(stdout), &st) != 0
32081 );
32082 }
32083 }
32084 _ACEOF
32085 rm -f "conftest$ac_exeext"
32086 if { (eval echo "$as_me:32086: \"$ac_link\"") >&5
32087 (eval $ac_link) 2>&5
32088 ac_status=$?
32089 echo "$as_me:32089: \$? = $ac_status" >&5
32090 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
32091 { (eval echo "$as_me:32091: \"$ac_try\"") >&5
32092 (eval $ac_try) 2>&5
32093 ac_status=$?
32094 echo "$as_me:32094: \$? = $ac_status" >&5
32095 (exit "$ac_status"); }; }; then
32096 ac_cv_func_vfork_works=yes
32097 else
32098 echo "$as_me: program exited with status $ac_status" >&5
32099 echo "$as_me: failed program was:" >&5
32100 cat "conftest.$ac_ext" >&5
32101 ac_cv_func_vfork_works=no
32102 fi
32103 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
32104 fi
32105 fi
32106 echo "$as_me:32106: result: $ac_cv_func_vfork_works" >&5
32107 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
32108
32109 fi;
32110 if test "x$ac_cv_func_fork_works" = xcross; then
32111 ac_cv_func_vfork_works=ac_cv_func_vfork
32112 { echo "$as_me:32112: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
32113 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
32114 fi
32115
32116 if test "x$ac_cv_func_vfork_works" = xyes; then
32117
32118 cat >>confdefs.h <<\EOF
32119 #define HAVE_WORKING_VFORK 1
32120 EOF
32121
32122 else
32123
32124 cat >>confdefs.h <<\EOF
32125 #define vfork fork
32126 EOF
32127
32128 fi
32129 if test "x$ac_cv_func_fork_works" = xyes; then
32130
32131 cat >>confdefs.h <<\EOF
32132 #define HAVE_WORKING_FORK 1
32133 EOF
32134
32135 fi
32136
32137 echo "$as_me:32137: checking if we should use fcntl or ioctl" >&5
32138 echo $ECHO_N "checking if we should use fcntl or ioctl... $ECHO_C" >&6
32139 if test "${cf_cv_fionbio+set}" = set; then
32140 echo $ECHO_N "(cached) $ECHO_C" >&6
32141 else
32142
32143 cat >"conftest.$ac_ext" <<_ACEOF
32144 #line 32144 "configure"
32145 #include "confdefs.h"
32146
32147 #include <sys/types.h>
32148 #include <sys/ioctl.h>
32149
32150 int
32151 main (void)
32152 {
32153
32154 int ret = ioctl(0, FIONBIO, (char *)0); (void) ret
32155
32156 ;
32157 return 0;
32158 }
32159 _ACEOF
32160 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32161 if { (eval echo "$as_me:32161: \"$ac_link\"") >&5
32162 (eval $ac_link) 2>&5
32163 ac_status=$?
32164 echo "$as_me:32164: \$? = $ac_status" >&5
32165 (exit "$ac_status"); } &&
32166 { ac_try='test -s "conftest$ac_exeext"'
32167 { (eval echo "$as_me:32167: \"$ac_try\"") >&5
32168 (eval $ac_try) 2>&5
32169 ac_status=$?
32170 echo "$as_me:32170: \$? = $ac_status" >&5
32171 (exit "$ac_status"); }; }; then
32172 cf_cv_fionbio=ioctl
32173 else
32174 echo "$as_me: failed program was:" >&5
32175 cat "conftest.$ac_ext" >&5
32176
32177 cat >"conftest.$ac_ext" <<_ACEOF
32178 #line 32178 "configure"
32179 #include "confdefs.h"
32180
32181 #include <sys/types.h>
32182 #if HAVE_FCNTL_H
32183 #include <fcntl.h>
32184 #else
32185 #if HAVE_SYS_FCNTL_H
32186 #include <sys/fcntl.h>
32187 #endif
32188 #endif
32189 int
32190 main (void)
32191 {
32192
32193 int ret = fcntl(0, F_SETFL, O_NONBLOCK);
32194
32195 ;
32196 return 0;
32197 }
32198 _ACEOF
32199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32200 if { (eval echo "$as_me:32200: \"$ac_link\"") >&5
32201 (eval $ac_link) 2>&5
32202 ac_status=$?
32203 echo "$as_me:32203: \$? = $ac_status" >&5
32204 (exit "$ac_status"); } &&
32205 { ac_try='test -s "conftest$ac_exeext"'
32206 { (eval echo "$as_me:32206: \"$ac_try\"") >&5
32207 (eval $ac_try) 2>&5
32208 ac_status=$?
32209 echo "$as_me:32209: \$? = $ac_status" >&5
32210 (exit "$ac_status"); }; }; then
32211 cf_cv_fionbio=fcntl
32212 else
32213 echo "$as_me: failed program was:" >&5
32214 cat "conftest.$ac_ext" >&5
32215 cf_cv_fionbio=unknown
32216 fi
32217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32218 fi
32219 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32220
32221 fi
32222 echo "$as_me:32222: result: $cf_cv_fionbio" >&5
32223 echo "${ECHO_T}$cf_cv_fionbio" >&6
32224 test "$cf_cv_fionbio" = "fcntl" &&
32225 cat >>confdefs.h <<\EOF
32226 #define USE_FCNTL 1
32227 EOF
32228
32229 echo "$as_me:32229: checking for broken/missing definition of remove" >&5
32230 echo $ECHO_N "checking for broken/missing definition of remove... $ECHO_C" >&6
32231 if test "${cf_cv_baddef_remove+set}" = set; then
32232 echo $ECHO_N "(cached) $ECHO_C" >&6
32233 else
32234
32235 cat >"conftest.$ac_ext" <<_ACEOF
32236 #line 32236 "configure"
32237 #include "confdefs.h"
32238 #include <stdio.h>
32239 int
32240 main (void)
32241 {
32242 remove("dummy")
32243 ;
32244 return 0;
32245 }
32246 _ACEOF
32247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32248 if { (eval echo "$as_me:32248: \"$ac_link\"") >&5
32249 (eval $ac_link) 2>&5
32250 ac_status=$?
32251 echo "$as_me:32251: \$? = $ac_status" >&5
32252 (exit "$ac_status"); } &&
32253 { ac_try='test -s "conftest$ac_exeext"'
32254 { (eval echo "$as_me:32254: \"$ac_try\"") >&5
32255 (eval $ac_try) 2>&5
32256 ac_status=$?
32257 echo "$as_me:32257: \$? = $ac_status" >&5
32258 (exit "$ac_status"); }; }; then
32259 cf_cv_baddef_remove=no
32260 else
32261 echo "$as_me: failed program was:" >&5
32262 cat "conftest.$ac_ext" >&5
32263 cat >"conftest.$ac_ext" <<_ACEOF
32264 #line 32264 "configure"
32265 #include "confdefs.h"
32266 #include <stdio.h>
32267 int __unlink(name) { return unlink(name); }
32268 int
32269 main (void)
32270 {
32271 remove("dummy")
32272 ;
32273 return 0;
32274 }
32275 _ACEOF
32276 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32277 if { (eval echo "$as_me:32277: \"$ac_link\"") >&5
32278 (eval $ac_link) 2>&5
32279 ac_status=$?
32280 echo "$as_me:32280: \$? = $ac_status" >&5
32281 (exit "$ac_status"); } &&
32282 { ac_try='test -s "conftest$ac_exeext"'
32283 { (eval echo "$as_me:32283: \"$ac_try\"") >&5
32284 (eval $ac_try) 2>&5
32285 ac_status=$?
32286 echo "$as_me:32286: \$? = $ac_status" >&5
32287 (exit "$ac_status"); }; }; then
32288 cf_cv_baddef_remove=yes
32289 else
32290 echo "$as_me: failed program was:" >&5
32291 cat "conftest.$ac_ext" >&5
32292 cf_cv_baddef_remove=unknown
32293 fi
32294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32295
32296 fi
32297 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32298
32299 fi
32300
32301 echo "$as_me:32301: result: $cf_cv_baddef_remove" >&5
32302 echo "${ECHO_T}$cf_cv_baddef_remove" >&6
32303 test "$cf_cv_baddef_remove" != no &&
32304 cat >>confdefs.h <<\EOF
32305 #define NEED_REMOVE 1
32306 EOF
32307
32308 echo "$as_me:32308: checking for lstat" >&5
32309 echo $ECHO_N "checking for lstat... $ECHO_C" >&6
32310 if test "${ac_cv_func_lstat+set}" = set; then
32311 echo $ECHO_N "(cached) $ECHO_C" >&6
32312 else
32313
32314 cat >"conftest.$ac_ext" <<_ACEOF
32315 #line 32315 "configure"
32316 #include "confdefs.h"
32317 $ac_includes_default
32318 int
32319 main (void)
32320 {
32321 struct stat sb; lstat(".", &sb); (void) sb
32322 ;
32323 return 0;
32324 }
32325 _ACEOF
32326 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32327 if { (eval echo "$as_me:32327: \"$ac_link\"") >&5
32328 (eval $ac_link) 2>&5
32329 ac_status=$?
32330 echo "$as_me:32330: \$? = $ac_status" >&5
32331 (exit "$ac_status"); } &&
32332 { ac_try='test -s "conftest$ac_exeext"'
32333 { (eval echo "$as_me:32333: \"$ac_try\"") >&5
32334 (eval $ac_try) 2>&5
32335 ac_status=$?
32336 echo "$as_me:32336: \$? = $ac_status" >&5
32337 (exit "$ac_status"); }; }; then
32338 ac_cv_func_lstat=yes
32339 else
32340 echo "$as_me: failed program was:" >&5
32341 cat "conftest.$ac_ext" >&5
32342 ac_cv_func_lstat=no
32343 fi
32344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32345
32346 fi
32347
32348 echo "$as_me:32348: result: $ac_cv_func_lstat " >&5
32349 echo "${ECHO_T}$ac_cv_func_lstat " >&6
32350 if test "$ac_cv_func_lstat" = yes; then
32351
32352 cat >>confdefs.h <<\EOF
32353 #define HAVE_LSTAT 1
32354 EOF
32355
32356 fi
32357
32358 echo "$as_me:32358: checking for getpwuid" >&5
32359 echo $ECHO_N "checking for getpwuid... $ECHO_C" >&6
32360 if test "${ac_cv_func_getpwuid+set}" = set; then
32361 echo $ECHO_N "(cached) $ECHO_C" >&6
32362 else
32363
32364 cat >"conftest.$ac_ext" <<_ACEOF
32365 #line 32365 "configure"
32366 #include "confdefs.h"
32367
32368 $ac_includes_default
32369 #include <pwd.h>
32370
32371 int
32372 main (void)
32373 {
32374
32375 struct passwd *foo = getpwuid(0);
32376 (void) foo
32377
32378 ;
32379 return 0;
32380 }
32381 _ACEOF
32382 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32383 if { (eval echo "$as_me:32383: \"$ac_link\"") >&5
32384 (eval $ac_link) 2>&5
32385 ac_status=$?
32386 echo "$as_me:32386: \$? = $ac_status" >&5
32387 (exit "$ac_status"); } &&
32388 { ac_try='test -s "conftest$ac_exeext"'
32389 { (eval echo "$as_me:32389: \"$ac_try\"") >&5
32390 (eval $ac_try) 2>&5
32391 ac_status=$?
32392 echo "$as_me:32392: \$? = $ac_status" >&5
32393 (exit "$ac_status"); }; }; then
32394 ac_cv_func_getpwuid=yes
32395 else
32396 echo "$as_me: failed program was:" >&5
32397 cat "conftest.$ac_ext" >&5
32398 ac_cv_func_getpwuid=no
32399 fi
32400 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32401
32402 fi
32403 echo "$as_me:32403: result: $ac_cv_func_getpwuid" >&5
32404 echo "${ECHO_T}$ac_cv_func_getpwuid" >&6
32405 if test "$ac_cv_func_getpwuid" = yes; then
32406 ac_cv_header_pwd_h=yes
32407
32408 cat >>confdefs.h <<\EOF
32409 #define HAVE_PWD_H 1
32410 EOF
32411
32412 cat >>confdefs.h <<\EOF
32413 #define HAVE_GETPWUID 1
32414 EOF
32415
32416 fi
32417
32418 echo "$as_me:32418: checking for passwd.pw_gecos" >&5
32419 echo $ECHO_N "checking for passwd.pw_gecos... $ECHO_C" >&6
32420 if test "${cf_cv_pw_gecos+set}" = set; then
32421 echo $ECHO_N "(cached) $ECHO_C" >&6
32422 else
32423
32424 cat >"conftest.$ac_ext" <<_ACEOF
32425 #line 32425 "configure"
32426 #include "confdefs.h"
32427
32428 #include <pwd.h>
32429
32430 int
32431 main (void)
32432 {
32433
32434 static struct passwd foo;
32435 char *bar = foo.pw_gecos;
32436 (void)bar
32437 ;
32438 return 0;
32439 }
32440 _ACEOF
32441 rm -f "conftest.$ac_objext"
32442 if { (eval echo "$as_me:32442: \"$ac_compile\"") >&5
32443 (eval $ac_compile) 2>&5
32444 ac_status=$?
32445 echo "$as_me:32445: \$? = $ac_status" >&5
32446 (exit "$ac_status"); } &&
32447 { ac_try='test -s "conftest.$ac_objext"'
32448 { (eval echo "$as_me:32448: \"$ac_try\"") >&5
32449 (eval $ac_try) 2>&5
32450 ac_status=$?
32451 echo "$as_me:32451: \$? = $ac_status" >&5
32452 (exit "$ac_status"); }; }; then
32453 cf_cv_pw_gecos=yes
32454 else
32455 echo "$as_me: failed program was:" >&5
32456 cat "conftest.$ac_ext" >&5
32457 cf_cv_pw_gecos=no
32458 fi
32459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32460 fi
32461 echo "$as_me:32461: result: $cf_cv_pw_gecos" >&5
32462 echo "${ECHO_T}$cf_cv_pw_gecos" >&6
32463 test $cf_cv_pw_gecos = no &&
32464 cat >>confdefs.h <<\EOF
32465 #define DONT_HAVE_PW_GECOS 1
32466 EOF
32467
32468 echo "$as_me:32468: checking for vasprintf" >&5
32469 echo $ECHO_N "checking for vasprintf... $ECHO_C" >&6
32470 if test "${ac_cv_func_vasprintf+set}" = set; then
32471 echo $ECHO_N "(cached) $ECHO_C" >&6
32472 else
32473 cat >"conftest.$ac_ext" <<_ACEOF
32474 #line 32474 "configure"
32475 #include "confdefs.h"
32476 #define vasprintf autoconf_temporary
32477 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
32478 #undef vasprintf
32479
32480 #ifdef __cplusplus
32481 extern "C"
32482 #endif
32483
32484 /* We use char because int might match the return type of a gcc2
32485 builtin and then its argument prototype would still apply. */
32486 char vasprintf (void);
32487
32488 int
32489 main (void)
32490 {
32491
32492 /* The GNU C library defines stubs for functions which it implements
32493 to always fail with ENOSYS. Some functions are actually named
32494 something starting with __ and the normal name is an alias. */
32495 #if defined (__stub_vasprintf) || defined (__stub___vasprintf)
32496 #error found stub for vasprintf
32497 #endif
32498
32499 return vasprintf ();
32500 ;
32501 return 0;
32502 }
32503 _ACEOF
32504 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32505 if { (eval echo "$as_me:32505: \"$ac_link\"") >&5
32506 (eval $ac_link) 2>&5
32507 ac_status=$?
32508 echo "$as_me:32508: \$? = $ac_status" >&5
32509 (exit "$ac_status"); } &&
32510 { ac_try='test -s "conftest$ac_exeext"'
32511 { (eval echo "$as_me:32511: \"$ac_try\"") >&5
32512 (eval $ac_try) 2>&5
32513 ac_status=$?
32514 echo "$as_me:32514: \$? = $ac_status" >&5
32515 (exit "$ac_status"); }; }; then
32516 ac_cv_func_vasprintf=yes
32517 else
32518 echo "$as_me: failed program was:" >&5
32519 cat "conftest.$ac_ext" >&5
32520 ac_cv_func_vasprintf=no
32521 fi
32522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32523 fi
32524 echo "$as_me:32524: result: $ac_cv_func_vasprintf" >&5
32525 echo "${ECHO_T}$ac_cv_func_vasprintf" >&6
32526 if test "$ac_cv_func_vasprintf" = yes; then
32527
32528 cat >>confdefs.h <<\EOF
32529 #define HAVE_VASPRINTF 1
32530 EOF
32531
32532 echo "$as_me:32532: checking if vasprintf requires workaround" >&5
32533 echo $ECHO_N "checking if vasprintf requires workaround... $ECHO_C" >&6
32534 cat >"conftest.$ac_ext" <<_ACEOF
32535 #line 32535 "configure"
32536 #include "confdefs.h"
32537
32538 #include <stdio.h>
32539
32540 int
32541 main (void)
32542 {
32543
32544 void *p = (void *)vasprintf; return (p != (void*)0)
32545
32546 ;
32547 return 0;
32548 }
32549 _ACEOF
32550 rm -f "conftest.$ac_objext"
32551 if { (eval echo "$as_me:32551: \"$ac_compile\"") >&5
32552 (eval $ac_compile) 2>&5
32553 ac_status=$?
32554 echo "$as_me:32554: \$? = $ac_status" >&5
32555 (exit "$ac_status"); } &&
32556 { ac_try='test -s "conftest.$ac_objext"'
32557 { (eval echo "$as_me:32557: \"$ac_try\"") >&5
32558 (eval $ac_try) 2>&5
32559 ac_status=$?
32560 echo "$as_me:32560: \$? = $ac_status" >&5
32561 (exit "$ac_status"); }; }; then
32562
32563 echo "$as_me:32563: result: no" >&5
32564 echo "${ECHO_T}no" >&6
32565
32566 else
32567 echo "$as_me: failed program was:" >&5
32568 cat "conftest.$ac_ext" >&5
32569
32570 cat >"conftest.$ac_ext" <<_ACEOF
32571 #line 32571 "configure"
32572 #include "confdefs.h"
32573
32574 #ifndef _GNU_SOURCE
32575 #define _GNU_SOURCE 1
32576 #include <stdio.h>
32577 #endif
32578
32579 int
32580 main (void)
32581 {
32582
32583 void *p = (void *)vasprintf; return (p != (void*)0)
32584
32585 ;
32586 return 0;
32587 }
32588 _ACEOF
32589 rm -f "conftest.$ac_objext"
32590 if { (eval echo "$as_me:32590: \"$ac_compile\"") >&5
32591 (eval $ac_compile) 2>&5
32592 ac_status=$?
32593 echo "$as_me:32593: \$? = $ac_status" >&5
32594 (exit "$ac_status"); } &&
32595 { ac_try='test -s "conftest.$ac_objext"'
32596 { (eval echo "$as_me:32596: \"$ac_try\"") >&5
32597 (eval $ac_try) 2>&5
32598 ac_status=$?
32599 echo "$as_me:32599: \$? = $ac_status" >&5
32600 (exit "$ac_status"); }; }; then
32601
32602 echo "$as_me:32602: result: yes" >&5
32603 echo "${ECHO_T}yes" >&6
32604
32605 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
32606 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
32607
32608 else
32609 echo "$as_me: failed program was:" >&5
32610 cat "conftest.$ac_ext" >&5
32611
32612 echo "$as_me:32612: result: unknown" >&5
32613 echo "${ECHO_T}unknown" >&6
32614
32615 fi
32616 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32617
32618 fi
32619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32620
32621 fi
32622
32623 for ac_func in \
32624 atoll \
32625 ctermid \
32626 cuserid \
32627 ftime \
32628 getcwd \
32629 getgroups \
32630 gettimeofday \
32631 getuid \
32632 popen \
32633 putenv \
32634 readdir \
32635 setuid \
32636 truncate \
32637 ttyname \
32638 unsetenv \
32639 sleep \
32640 usleep \
32641 waitpid \
32642
32643 do
32644 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32645 echo "$as_me:32645: checking for $ac_func" >&5
32646 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32647 if eval "test \"\${$as_ac_var+set}\" = set"; then
32648 echo $ECHO_N "(cached) $ECHO_C" >&6
32649 else
32650 cat >"conftest.$ac_ext" <<_ACEOF
32651 #line 32651 "configure"
32652 #include "confdefs.h"
32653 #define $ac_func autoconf_temporary
32654 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
32655 #undef $ac_func
32656
32657 #ifdef __cplusplus
32658 extern "C"
32659 #endif
32660
32661 /* We use char because int might match the return type of a gcc2
32662 builtin and then its argument prototype would still apply. */
32663 char $ac_func (void);
32664
32665 int
32666 main (void)
32667 {
32668
32669 /* The GNU C library defines stubs for functions which it implements
32670 to always fail with ENOSYS. Some functions are actually named
32671 something starting with __ and the normal name is an alias. */
32672 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32673 #error found stub for $ac_func
32674 #endif
32675
32676 return $ac_func ();
32677 ;
32678 return 0;
32679 }
32680 _ACEOF
32681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32682 if { (eval echo "$as_me:32682: \"$ac_link\"") >&5
32683 (eval $ac_link) 2>&5
32684 ac_status=$?
32685 echo "$as_me:32685: \$? = $ac_status" >&5
32686 (exit "$ac_status"); } &&
32687 { ac_try='test -s "conftest$ac_exeext"'
32688 { (eval echo "$as_me:32688: \"$ac_try\"") >&5
32689 (eval $ac_try) 2>&5
32690 ac_status=$?
32691 echo "$as_me:32691: \$? = $ac_status" >&5
32692 (exit "$ac_status"); }; }; then
32693 eval "$as_ac_var=yes"
32694 else
32695 echo "$as_me: failed program was:" >&5
32696 cat "conftest.$ac_ext" >&5
32697 eval "$as_ac_var=no"
32698 fi
32699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32700 fi
32701 echo "$as_me:32701: result: `eval echo '${'"$as_ac_var"'}'`" >&5
32702 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
32703 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
32704 cat >>confdefs.h <<EOF
32705 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32706 EOF
32707
32708 fi
32709 done
32710
32711 for ac_func in \
32712 mkdtemp
32713 do
32714 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32715 echo "$as_me:32715: checking for $ac_func" >&5
32716 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32717 if eval "test \"\${$as_ac_var+set}\" = set"; then
32718 echo $ECHO_N "(cached) $ECHO_C" >&6
32719 else
32720 cat >"conftest.$ac_ext" <<_ACEOF
32721 #line 32721 "configure"
32722 #include "confdefs.h"
32723 #define $ac_func autoconf_temporary
32724 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
32725 #undef $ac_func
32726
32727 #ifdef __cplusplus
32728 extern "C"
32729 #endif
32730
32731 /* We use char because int might match the return type of a gcc2
32732 builtin and then its argument prototype would still apply. */
32733 char $ac_func (void);
32734
32735 int
32736 main (void)
32737 {
32738
32739 /* The GNU C library defines stubs for functions which it implements
32740 to always fail with ENOSYS. Some functions are actually named
32741 something starting with __ and the normal name is an alias. */
32742 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32743 #error found stub for $ac_func
32744 #endif
32745
32746 return $ac_func ();
32747 ;
32748 return 0;
32749 }
32750 _ACEOF
32751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32752 if { (eval echo "$as_me:32752: \"$ac_link\"") >&5
32753 (eval $ac_link) 2>&5
32754 ac_status=$?
32755 echo "$as_me:32755: \$? = $ac_status" >&5
32756 (exit "$ac_status"); } &&
32757 { ac_try='test -s "conftest$ac_exeext"'
32758 { (eval echo "$as_me:32758: \"$ac_try\"") >&5
32759 (eval $ac_try) 2>&5
32760 ac_status=$?
32761 echo "$as_me:32761: \$? = $ac_status" >&5
32762 (exit "$ac_status"); }; }; then
32763 eval "$as_ac_var=yes"
32764 else
32765 echo "$as_me: failed program was:" >&5
32766 cat "conftest.$ac_ext" >&5
32767 eval "$as_ac_var=no"
32768 fi
32769 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32770 fi
32771 echo "$as_me:32771: result: `eval echo '${'"$as_ac_var"'}'`" >&5
32772 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
32773 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
32774 cat >>confdefs.h <<EOF
32775 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32776 EOF
32777
32778 else
32779
32780 for ac_func in mktemp
32781 do
32782 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32783 echo "$as_me:32783: checking for $ac_func" >&5
32784 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32785 if eval "test \"\${$as_ac_var+set}\" = set"; then
32786 echo $ECHO_N "(cached) $ECHO_C" >&6
32787 else
32788 cat >"conftest.$ac_ext" <<_ACEOF
32789 #line 32789 "configure"
32790 #include "confdefs.h"
32791 #define $ac_func autoconf_temporary
32792 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
32793 #undef $ac_func
32794
32795 #ifdef __cplusplus
32796 extern "C"
32797 #endif
32798
32799 /* We use char because int might match the return type of a gcc2
32800 builtin and then its argument prototype would still apply. */
32801 char $ac_func (void);
32802
32803 int
32804 main (void)
32805 {
32806
32807 /* The GNU C library defines stubs for functions which it implements
32808 to always fail with ENOSYS. Some functions are actually named
32809 something starting with __ and the normal name is an alias. */
32810 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32811 #error found stub for $ac_func
32812 #endif
32813
32814 return $ac_func ();
32815 ;
32816 return 0;
32817 }
32818 _ACEOF
32819 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32820 if { (eval echo "$as_me:32820: \"$ac_link\"") >&5
32821 (eval $ac_link) 2>&5
32822 ac_status=$?
32823 echo "$as_me:32823: \$? = $ac_status" >&5
32824 (exit "$ac_status"); } &&
32825 { ac_try='test -s "conftest$ac_exeext"'
32826 { (eval echo "$as_me:32826: \"$ac_try\"") >&5
32827 (eval $ac_try) 2>&5
32828 ac_status=$?
32829 echo "$as_me:32829: \$? = $ac_status" >&5
32830 (exit "$ac_status"); }; }; then
32831 eval "$as_ac_var=yes"
32832 else
32833 echo "$as_me: failed program was:" >&5
32834 cat "conftest.$ac_ext" >&5
32835 eval "$as_ac_var=no"
32836 fi
32837 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32838 fi
32839 echo "$as_me:32839: result: `eval echo '${'"$as_ac_var"'}'`" >&5
32840 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
32841 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
32842 cat >>confdefs.h <<EOF
32843 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32844 EOF
32845
32846 fi
32847 done
32848
32849 fi
32850 done
32851
32852 for ac_func in \
32853 mktime \
32854 strstr \
32855 wcwidth \
32856
32857 do
32858 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
32859 echo "$as_me:32859: checking for $ac_func" >&5
32860 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
32861 if eval "test \"\${$as_ac_var+set}\" = set"; then
32862 echo $ECHO_N "(cached) $ECHO_C" >&6
32863 else
32864 cat >"conftest.$ac_ext" <<_ACEOF
32865 #line 32865 "configure"
32866 #include "confdefs.h"
32867 #define $ac_func autoconf_temporary
32868 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
32869 #undef $ac_func
32870
32871 #ifdef __cplusplus
32872 extern "C"
32873 #endif
32874
32875 /* We use char because int might match the return type of a gcc2
32876 builtin and then its argument prototype would still apply. */
32877 char $ac_func (void);
32878
32879 int
32880 main (void)
32881 {
32882
32883 /* The GNU C library defines stubs for functions which it implements
32884 to always fail with ENOSYS. Some functions are actually named
32885 something starting with __ and the normal name is an alias. */
32886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
32887 #error found stub for $ac_func
32888 #endif
32889
32890 return $ac_func ();
32891 ;
32892 return 0;
32893 }
32894 _ACEOF
32895 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
32896 if { (eval echo "$as_me:32896: \"$ac_link\"") >&5
32897 (eval $ac_link) 2>&5
32898 ac_status=$?
32899 echo "$as_me:32899: \$? = $ac_status" >&5
32900 (exit "$ac_status"); } &&
32901 { ac_try='test -s "conftest$ac_exeext"'
32902 { (eval echo "$as_me:32902: \"$ac_try\"") >&5
32903 (eval $ac_try) 2>&5
32904 ac_status=$?
32905 echo "$as_me:32905: \$? = $ac_status" >&5
32906 (exit "$ac_status"); }; }; then
32907 eval "$as_ac_var=yes"
32908 else
32909 echo "$as_me: failed program was:" >&5
32910 cat "conftest.$ac_ext" >&5
32911 eval "$as_ac_var=no"
32912 fi
32913 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
32914 fi
32915 echo "$as_me:32915: result: `eval echo '${'"$as_ac_var"'}'`" >&5
32916 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
32917 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
32918 cat >>confdefs.h <<EOF
32919 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
32920 EOF
32921
32922 else
32923 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
32924 fi
32925 done
32926
32927 for ac_header in limits.h
32928 do
32929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
32930 echo "$as_me:32930: checking for $ac_header" >&5
32931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
32932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
32933 echo $ECHO_N "(cached) $ECHO_C" >&6
32934 else
32935 cat >"conftest.$ac_ext" <<_ACEOF
32936 #line 32936 "configure"
32937 #include "confdefs.h"
32938 #include <$ac_header>
32939 _ACEOF
32940 if { (eval echo "$as_me:32940: \"$ac_cpp "conftest.$ac_ext"\"") >&5
32941 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
32942 ac_status=$?
32943 $EGREP -v '^ *\+' conftest.er1 >conftest.err
32944 rm -f conftest.er1
32945 cat conftest.err >&5
32946 echo "$as_me:32946: \$? = $ac_status" >&5
32947 (exit "$ac_status"); } >/dev/null; then
32948 if test -s conftest.err; then
32949 ac_cpp_err=$ac_c_preproc_warn_flag
32950 else
32951 ac_cpp_err=
32952 fi
32953 else
32954 ac_cpp_err=yes
32955 fi
32956 if test -z "$ac_cpp_err"; then
32957 eval "$as_ac_Header=yes"
32958 else
32959 echo "$as_me: failed program was:" >&5
32960 cat "conftest.$ac_ext" >&5
32961 eval "$as_ac_Header=no"
32962 fi
32963 rm -f conftest.err "conftest.$ac_ext"
32964 fi
32965 echo "$as_me:32965: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
32966 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
32967 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
32968 cat >>confdefs.h <<EOF
32969 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
32970 EOF
32971
32972 fi
32973 done
32974
32975 echo "$as_me:32975: checking if you want to use arc4random" >&5
32976 echo $ECHO_N "checking if you want to use arc4random... $ECHO_C" >&6
32977
32978 # Check whether --enable-arc4random or --disable-arc4random was given.
32979 if test "${enable_arc4random+set}" = set; then
32980 enableval="$enable_arc4random"
32981 enable_arc4random=yes
32982 else
32983 enable_arc4random=yes
32984 fi;
32985 echo "$as_me:32985: result: $enable_arc4random" >&5
32986 echo "${ECHO_T}$enable_arc4random" >&6
32987
32988 cf_srand_arc4random=
32989 if test "$enable_arc4random" = yes ; then
32990 echo "$as_me:32990: checking for arc4random" >&5
32991 echo $ECHO_N "checking for arc4random... $ECHO_C" >&6
32992 if test "${ac_cv_func_arc4random+set}" = set; then
32993 echo $ECHO_N "(cached) $ECHO_C" >&6
32994 else
32995 cat >"conftest.$ac_ext" <<_ACEOF
32996 #line 32996 "configure"
32997 #include "confdefs.h"
32998 #define arc4random autoconf_temporary
32999 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
33000 #undef arc4random
33001
33002 #ifdef __cplusplus
33003 extern "C"
33004 #endif
33005
33006 /* We use char because int might match the return type of a gcc2
33007 builtin and then its argument prototype would still apply. */
33008 char arc4random (void);
33009
33010 int
33011 main (void)
33012 {
33013
33014 /* The GNU C library defines stubs for functions which it implements
33015 to always fail with ENOSYS. Some functions are actually named
33016 something starting with __ and the normal name is an alias. */
33017 #if defined (__stub_arc4random) || defined (__stub___arc4random)
33018 #error found stub for arc4random
33019 #endif
33020
33021 return arc4random ();
33022 ;
33023 return 0;
33024 }
33025 _ACEOF
33026 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33027 if { (eval echo "$as_me:33027: \"$ac_link\"") >&5
33028 (eval $ac_link) 2>&5
33029 ac_status=$?
33030 echo "$as_me:33030: \$? = $ac_status" >&5
33031 (exit "$ac_status"); } &&
33032 { ac_try='test -s "conftest$ac_exeext"'
33033 { (eval echo "$as_me:33033: \"$ac_try\"") >&5
33034 (eval $ac_try) 2>&5
33035 ac_status=$?
33036 echo "$as_me:33036: \$? = $ac_status" >&5
33037 (exit "$ac_status"); }; }; then
33038 ac_cv_func_arc4random=yes
33039 else
33040 echo "$as_me: failed program was:" >&5
33041 cat "conftest.$ac_ext" >&5
33042 ac_cv_func_arc4random=no
33043 fi
33044 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33045 fi
33046 echo "$as_me:33046: result: $ac_cv_func_arc4random" >&5
33047 echo "${ECHO_T}$ac_cv_func_arc4random" >&6
33048 if test "$ac_cv_func_arc4random" = yes; then
33049 :
33050 else
33051 echo "$as_me:33051: checking for arc4random in -lbsd" >&5
33052 echo $ECHO_N "checking for arc4random in -lbsd... $ECHO_C" >&6
33053 if test "${ac_cv_lib_bsd_arc4random+set}" = set; then
33054 echo $ECHO_N "(cached) $ECHO_C" >&6
33055 else
33056 ac_check_lib_save_LIBS=$LIBS
33057 LIBS="-lbsd $LIBS"
33058 cat >"conftest.$ac_ext" <<_ACEOF
33059 #line 33059 "configure"
33060 #include "confdefs.h"
33061
33062 /* Override any gcc2 internal prototype to avoid an error. */
33063 #ifdef __cplusplus
33064 extern "C"
33065 #endif
33066 /* We use char because int might match the return type of a gcc2
33067 builtin and then its argument prototype would still apply. */
33068 char arc4random (void);
33069 int
33070 main (void)
33071 {
33072 arc4random ();
33073 ;
33074 return 0;
33075 }
33076 _ACEOF
33077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33078 if { (eval echo "$as_me:33078: \"$ac_link\"") >&5
33079 (eval $ac_link) 2>&5
33080 ac_status=$?
33081 echo "$as_me:33081: \$? = $ac_status" >&5
33082 (exit "$ac_status"); } &&
33083 { ac_try='test -s "conftest$ac_exeext"'
33084 { (eval echo "$as_me:33084: \"$ac_try\"") >&5
33085 (eval $ac_try) 2>&5
33086 ac_status=$?
33087 echo "$as_me:33087: \$? = $ac_status" >&5
33088 (exit "$ac_status"); }; }; then
33089 ac_cv_lib_bsd_arc4random=yes
33090 else
33091 echo "$as_me: failed program was:" >&5
33092 cat "conftest.$ac_ext" >&5
33093 ac_cv_lib_bsd_arc4random=no
33094 fi
33095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33096 LIBS=$ac_check_lib_save_LIBS
33097 fi
33098 echo "$as_me:33098: result: $ac_cv_lib_bsd_arc4random" >&5
33099 echo "${ECHO_T}$ac_cv_lib_bsd_arc4random" >&6
33100 if test "$ac_cv_lib_bsd_arc4random" = yes; then
33101
33102 cf_add_libs="$LIBS"
33103 # reverse order
33104 cf_add_0lib=
33105 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
33106 # filter duplicates
33107 for cf_add_1lib in $cf_add_0lib; do
33108 for cf_add_2lib in $cf_add_libs; do
33109 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
33110 cf_add_1lib=
33111 break
33112 fi
33113 done
33114 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
33115 done
33116 LIBS="$cf_add_libs"
33117
33118 fi
33119
33120 fi
33121
33122 test "$ac_cv_func_arc4random" = yes && cf_srand_arc4random=arc4random_stir/arc4random
33123 fi
33124
33125 echo "$as_me:33125: checking for random-integer functions" >&5
33126 echo $ECHO_N "checking for random-integer functions... $ECHO_C" >&6
33127 if test "${cf_cv_srand_func+set}" = set; then
33128 echo $ECHO_N "(cached) $ECHO_C" >&6
33129 else
33130
33131 cf_cv_srand_func=unknown
33132 for cf_func in $cf_srand_arc4random srandom/random srand48/lrand48 srand/rand
33133 do
33134
33135 cf_srand_func=`echo $cf_func | sed -e 's%/.*%%'`
33136 cf_rand_func=`echo $cf_func | sed -e 's%.*/%%'`
33137
33138 case $cf_srand_func in
33139 (arc4random_stir)
33140 cf_srand_func='(void)'
33141 ;;
33142 esac
33143
33144 cat >"conftest.$ac_ext" <<_ACEOF
33145 #line 33145 "configure"
33146 #include "confdefs.h"
33147
33148 $ac_includes_default
33149 #ifdef HAVE_LIMITS_H
33150 #include <limits.h>
33151 #endif
33152
33153 int
33154 main (void)
33155 {
33156 long seed = 1; $cf_srand_func(seed); seed = $cf_rand_func(); (void)seed
33157 ;
33158 return 0;
33159 }
33160 _ACEOF
33161 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33162 if { (eval echo "$as_me:33162: \"$ac_link\"") >&5
33163 (eval $ac_link) 2>&5
33164 ac_status=$?
33165 echo "$as_me:33165: \$? = $ac_status" >&5
33166 (exit "$ac_status"); } &&
33167 { ac_try='test -s "conftest$ac_exeext"'
33168 { (eval echo "$as_me:33168: \"$ac_try\"") >&5
33169 (eval $ac_try) 2>&5
33170 ac_status=$?
33171 echo "$as_me:33171: \$? = $ac_status" >&5
33172 (exit "$ac_status"); }; }; then
33173 cf_cv_srand_func=$cf_func
33174 break
33175 else
33176 echo "$as_me: failed program was:" >&5
33177 cat "conftest.$ac_ext" >&5
33178 fi
33179 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33180 done
33181
33182 fi
33183 echo "$as_me:33183: result: $cf_cv_srand_func" >&5
33184 echo "${ECHO_T}$cf_cv_srand_func" >&6
33185 if test "$cf_cv_srand_func" != unknown ; then
33186 echo "$as_me:33186: checking for range of random-integers" >&5
33187 echo $ECHO_N "checking for range of random-integers... $ECHO_C" >&6
33188 if test "${cf_cv_rand_max+set}" = set; then
33189 echo $ECHO_N "(cached) $ECHO_C" >&6
33190 else
33191
33192 case "$cf_cv_srand_func" in
33193 (srand/rand)
33194 cf_cv_rand_max=RAND_MAX
33195 cf_rand_max=16
33196 ;;
33197 (*/arc4random)
33198 cf_cv_rand_max=0xFFFFFFFFUL
33199 cf_rand_max=32
33200 ;;
33201 (*)
33202 cf_cv_rand_max=INT_MAX
33203 cf_rand_max=31
33204 ;;
33205 esac
33206 cat >"conftest.$ac_ext" <<_ACEOF
33207 #line 33207 "configure"
33208 #include "confdefs.h"
33209
33210 $ac_includes_default
33211 #ifdef HAVE_LIMITS_H
33212 #include <limits.h>
33213 #endif
33214
33215 int
33216 main (void)
33217 {
33218 long x = $cf_cv_rand_max; (void)x
33219 ;
33220 return 0;
33221 }
33222 _ACEOF
33223 rm -f "conftest.$ac_objext"
33224 if { (eval echo "$as_me:33224: \"$ac_compile\"") >&5
33225 (eval $ac_compile) 2>&5
33226 ac_status=$?
33227 echo "$as_me:33227: \$? = $ac_status" >&5
33228 (exit "$ac_status"); } &&
33229 { ac_try='test -s "conftest.$ac_objext"'
33230 { (eval echo "$as_me:33230: \"$ac_try\"") >&5
33231 (eval $ac_try) 2>&5
33232 ac_status=$?
33233 echo "$as_me:33233: \$? = $ac_status" >&5
33234 (exit "$ac_status"); }; }; then
33235 :
33236 else
33237 echo "$as_me: failed program was:" >&5
33238 cat "conftest.$ac_ext" >&5
33239 cf_cv_rand_max="(1UL<<$cf_rand_max)-1"
33240 fi
33241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33242
33243 fi
33244 echo "$as_me:33244: result: $cf_cv_rand_max" >&5
33245 echo "${ECHO_T}$cf_cv_rand_max" >&6
33246
33247 case "$cf_cv_srand_func" in
33248 (*/arc4random)
33249 echo "$as_me:33249: checking if <bsd/stdlib.h> should be included" >&5
33250 echo $ECHO_N "checking if <bsd/stdlib.h> should be included... $ECHO_C" >&6
33251 cat >"conftest.$ac_ext" <<_ACEOF
33252 #line 33252 "configure"
33253 #include "confdefs.h"
33254
33255 $ac_includes_default
33256 #ifdef HAVE_LIMITS_H
33257 #include <limits.h>
33258 #endif
33259 #include <bsd/stdlib.h>
33260 int
33261 main (void)
33262 {
33263 void *arc4random(int);
33264 void *x = arc4random(1); (void)x
33265 ;
33266 return 0;
33267 }
33268 _ACEOF
33269 rm -f "conftest.$ac_objext"
33270 if { (eval echo "$as_me:33270: \"$ac_compile\"") >&5
33271 (eval $ac_compile) 2>&5
33272 ac_status=$?
33273 echo "$as_me:33273: \$? = $ac_status" >&5
33274 (exit "$ac_status"); } &&
33275 { ac_try='test -s "conftest.$ac_objext"'
33276 { (eval echo "$as_me:33276: \"$ac_try\"") >&5
33277 (eval $ac_try) 2>&5
33278 ac_status=$?
33279 echo "$as_me:33279: \$? = $ac_status" >&5
33280 (exit "$ac_status"); }; }; then
33281 cf_bsd_stdlib_h=no
33282 else
33283 echo "$as_me: failed program was:" >&5
33284 cat "conftest.$ac_ext" >&5
33285 cat >"conftest.$ac_ext" <<_ACEOF
33286 #line 33286 "configure"
33287 #include "confdefs.h"
33288
33289 $ac_includes_default
33290 #ifdef HAVE_LIMITS_H
33291 #include <limits.h>
33292 #endif
33293 #include <bsd/stdlib.h>
33294 int
33295 main (void)
33296 {
33297 unsigned long x = arc4random(); (void)x
33298 ;
33299 return 0;
33300 }
33301 _ACEOF
33302 rm -f "conftest.$ac_objext"
33303 if { (eval echo "$as_me:33303: \"$ac_compile\"") >&5
33304 (eval $ac_compile) 2>&5
33305 ac_status=$?
33306 echo "$as_me:33306: \$? = $ac_status" >&5
33307 (exit "$ac_status"); } &&
33308 { ac_try='test -s "conftest.$ac_objext"'
33309 { (eval echo "$as_me:33309: \"$ac_try\"") >&5
33310 (eval $ac_try) 2>&5
33311 ac_status=$?
33312 echo "$as_me:33312: \$? = $ac_status" >&5
33313 (exit "$ac_status"); }; }; then
33314 cf_bsd_stdlib_h=yes
33315 else
33316 echo "$as_me: failed program was:" >&5
33317 cat "conftest.$ac_ext" >&5
33318 cf_bsd_stdlib_h=no
33319 fi
33320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33321 fi
33322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33323 echo "$as_me:33323: result: $cf_bsd_stdlib_h" >&5
33324 echo "${ECHO_T}$cf_bsd_stdlib_h" >&6
33325 if test "$cf_bsd_stdlib_h" = yes
33326 then
33327
33328 cat >>confdefs.h <<\EOF
33329 #define HAVE_BSD_STDLIB_H 1
33330 EOF
33331
33332 else
33333 echo "$as_me:33333: checking if <bsd/random.h> should be included" >&5
33334 echo $ECHO_N "checking if <bsd/random.h> should be included... $ECHO_C" >&6
33335 cat >"conftest.$ac_ext" <<_ACEOF
33336 #line 33336 "configure"
33337 #include "confdefs.h"
33338
33339 $ac_includes_default
33340 #ifdef HAVE_LIMITS_H
33341 #include <limits.h>
33342 #endif
33343 #include <bsd/random.h>
33344 int
33345 main (void)
33346 {
33347 void *arc4random(int);
33348 void *x = arc4random(1); (void)x
33349 ;
33350 return 0;
33351 }
33352 _ACEOF
33353 rm -f "conftest.$ac_objext"
33354 if { (eval echo "$as_me:33354: \"$ac_compile\"") >&5
33355 (eval $ac_compile) 2>&5
33356 ac_status=$?
33357 echo "$as_me:33357: \$? = $ac_status" >&5
33358 (exit "$ac_status"); } &&
33359 { ac_try='test -s "conftest.$ac_objext"'
33360 { (eval echo "$as_me:33360: \"$ac_try\"") >&5
33361 (eval $ac_try) 2>&5
33362 ac_status=$?
33363 echo "$as_me:33363: \$? = $ac_status" >&5
33364 (exit "$ac_status"); }; }; then
33365 cf_bsd_random_h=no
33366 else
33367 echo "$as_me: failed program was:" >&5
33368 cat "conftest.$ac_ext" >&5
33369 cat >"conftest.$ac_ext" <<_ACEOF
33370 #line 33370 "configure"
33371 #include "confdefs.h"
33372 #include <bsd/random.h>
33373 int
33374 main (void)
33375 {
33376 unsigned long x = arc4random(); (void)x
33377 ;
33378 return 0;
33379 }
33380 _ACEOF
33381 rm -f "conftest.$ac_objext"
33382 if { (eval echo "$as_me:33382: \"$ac_compile\"") >&5
33383 (eval $ac_compile) 2>&5
33384 ac_status=$?
33385 echo "$as_me:33385: \$? = $ac_status" >&5
33386 (exit "$ac_status"); } &&
33387 { ac_try='test -s "conftest.$ac_objext"'
33388 { (eval echo "$as_me:33388: \"$ac_try\"") >&5
33389 (eval $ac_try) 2>&5
33390 ac_status=$?
33391 echo "$as_me:33391: \$? = $ac_status" >&5
33392 (exit "$ac_status"); }; }; then
33393 cf_bsd_random_h=yes
33394 else
33395 echo "$as_me: failed program was:" >&5
33396 cat "conftest.$ac_ext" >&5
33397 cf_bsd_random_h=no
33398 fi
33399 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33400 fi
33401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33402 echo "$as_me:33402: result: $cf_bsd_random_h" >&5
33403 echo "${ECHO_T}$cf_bsd_random_h" >&6
33404 if test "$cf_bsd_random_h" = yes
33405 then
33406
33407 cat >>confdefs.h <<\EOF
33408 #define HAVE_BSD_RANDOM_H 1
33409 EOF
33410
33411 else
33412 { echo "$as_me:33412: WARNING: no header file found for arc4random" >&5
33413 echo "$as_me: WARNING: no header file found for arc4random" >&2;}
33414 fi
33415 fi
33416 ;;
33417 esac
33418
33419 cf_srand_func=`echo $cf_func | sed -e 's%/.*%%'`
33420 cf_rand_func=`echo $cf_func | sed -e 's%.*/%%'`
33421
33422 case $cf_srand_func in
33423 (arc4random_stir)
33424 cf_srand_func='(void)'
33425 ;;
33426 esac
33427
33428 cf_rand_max=`echo "lynx_rand_max" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33429
33430 cat >>confdefs.h <<EOF
33431 #define lynx_srand $cf_srand_func
33432 EOF
33433
33434 cat >>confdefs.h <<EOF
33435 #define lynx_rand $cf_rand_func
33436 EOF
33437
33438 cat >>confdefs.h <<EOF
33439 #define $cf_rand_max $cf_cv_rand_max
33440 EOF
33441
33442 fi
33443
33444 for ac_func in sleep
33445 do
33446
33447 echo "$as_me:33447: checking for $ac_func declaration" >&5
33448 echo $ECHO_N "checking for $ac_func declaration... $ECHO_C" >&6
33449 if eval "test \"\${ac_cv_func_decl_$ac_func+set}\" = set"; then
33450 echo $ECHO_N "(cached) $ECHO_C" >&6
33451 else
33452 cat >"conftest.$ac_ext" <<_ACEOF
33453 #line 33453 "configure"
33454 #include "confdefs.h"
33455
33456 $ac_includes_default
33457
33458 int
33459 main (void)
33460 {
33461 #ifndef $ac_func
33462 extern int $ac_func(void);
33463 #endif
33464 ;
33465 return 0;
33466 }
33467 _ACEOF
33468 rm -f "conftest.$ac_objext"
33469 if { (eval echo "$as_me:33469: \"$ac_compile\"") >&5
33470 (eval $ac_compile) 2>&5
33471 ac_status=$?
33472 echo "$as_me:33472: \$? = $ac_status" >&5
33473 (exit "$ac_status"); } &&
33474 { ac_try='test -s "conftest.$ac_objext"'
33475 { (eval echo "$as_me:33475: \"$ac_try\"") >&5
33476 (eval $ac_try) 2>&5
33477 ac_status=$?
33478 echo "$as_me:33478: \$? = $ac_status" >&5
33479 (exit "$ac_status"); }; }; then
33480
33481 cat >"conftest.$ac_ext" <<_ACEOF
33482 #line 33482 "configure"
33483 #include "confdefs.h"
33484
33485 int
33486 main (void)
33487 {
33488 #ifndef $ac_func
33489 int (*p)(struct cf_check_funcdecl*) = $ac_func;
33490 #endif
33491 ;
33492 return 0;
33493 }
33494 _ACEOF
33495 rm -f "conftest.$ac_objext"
33496 if { (eval echo "$as_me:33496: \"$ac_compile\"") >&5
33497 (eval $ac_compile) 2>&5
33498 ac_status=$?
33499 echo "$as_me:33499: \$? = $ac_status" >&5
33500 (exit "$ac_status"); } &&
33501 { ac_try='test -s "conftest.$ac_objext"'
33502 { (eval echo "$as_me:33502: \"$ac_try\"") >&5
33503 (eval $ac_try) 2>&5
33504 ac_status=$?
33505 echo "$as_me:33505: \$? = $ac_status" >&5
33506 (exit "$ac_status"); }; }; then
33507
33508 eval "ac_cv_func_decl_$ac_func=yes"
33509 else
33510 echo "$as_me: failed program was:" >&5
33511 cat "conftest.$ac_ext" >&5
33512
33513 eval "ac_cv_func_decl_$ac_func=no"
33514 fi
33515 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33516 else
33517 echo "$as_me: failed program was:" >&5
33518 cat "conftest.$ac_ext" >&5
33519
33520 eval "ac_cv_func_decl_$ac_func=yes"
33521 fi
33522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33523 fi
33524
33525 if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
33526 echo "$as_me:33526: result: yes" >&5
33527 echo "${ECHO_T}yes" >&6
33528 :
33529 else
33530 echo "$as_me:33530: result: no" >&5
33531 echo "${ECHO_T}no" >&6
33532
33533 ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33534
33535 cat >>confdefs.h <<EOF
33536 #define $ac_tr_func 1
33537 EOF
33538
33539 fi
33540 done
33541
33542 for ac_func in strstr
33543 do
33544
33545 echo "$as_me:33545: checking for $ac_func declaration" >&5
33546 echo $ECHO_N "checking for $ac_func declaration... $ECHO_C" >&6
33547 if eval "test \"\${ac_cv_func_decl_$ac_func+set}\" = set"; then
33548 echo $ECHO_N "(cached) $ECHO_C" >&6
33549 else
33550 cat >"conftest.$ac_ext" <<_ACEOF
33551 #line 33551 "configure"
33552 #include "confdefs.h"
33553
33554 $ac_includes_default
33555 #include <string.h>
33556 int
33557 main (void)
33558 {
33559 #ifndef $ac_func
33560 extern int $ac_func(void);
33561 #endif
33562 ;
33563 return 0;
33564 }
33565 _ACEOF
33566 rm -f "conftest.$ac_objext"
33567 if { (eval echo "$as_me:33567: \"$ac_compile\"") >&5
33568 (eval $ac_compile) 2>&5
33569 ac_status=$?
33570 echo "$as_me:33570: \$? = $ac_status" >&5
33571 (exit "$ac_status"); } &&
33572 { ac_try='test -s "conftest.$ac_objext"'
33573 { (eval echo "$as_me:33573: \"$ac_try\"") >&5
33574 (eval $ac_try) 2>&5
33575 ac_status=$?
33576 echo "$as_me:33576: \$? = $ac_status" >&5
33577 (exit "$ac_status"); }; }; then
33578
33579 cat >"conftest.$ac_ext" <<_ACEOF
33580 #line 33580 "configure"
33581 #include "confdefs.h"
33582 #include <string.h>
33583 int
33584 main (void)
33585 {
33586 #ifndef $ac_func
33587 int (*p)(struct cf_check_funcdecl*) = $ac_func;
33588 #endif
33589 ;
33590 return 0;
33591 }
33592 _ACEOF
33593 rm -f "conftest.$ac_objext"
33594 if { (eval echo "$as_me:33594: \"$ac_compile\"") >&5
33595 (eval $ac_compile) 2>&5
33596 ac_status=$?
33597 echo "$as_me:33597: \$? = $ac_status" >&5
33598 (exit "$ac_status"); } &&
33599 { ac_try='test -s "conftest.$ac_objext"'
33600 { (eval echo "$as_me:33600: \"$ac_try\"") >&5
33601 (eval $ac_try) 2>&5
33602 ac_status=$?
33603 echo "$as_me:33603: \$? = $ac_status" >&5
33604 (exit "$ac_status"); }; }; then
33605
33606 eval "ac_cv_func_decl_$ac_func=yes"
33607 else
33608 echo "$as_me: failed program was:" >&5
33609 cat "conftest.$ac_ext" >&5
33610
33611 eval "ac_cv_func_decl_$ac_func=no"
33612 fi
33613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33614 else
33615 echo "$as_me: failed program was:" >&5
33616 cat "conftest.$ac_ext" >&5
33617
33618 eval "ac_cv_func_decl_$ac_func=yes"
33619 fi
33620 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33621 fi
33622
33623 if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
33624 echo "$as_me:33624: result: yes" >&5
33625 echo "${ECHO_T}yes" >&6
33626 :
33627 else
33628 echo "$as_me:33628: result: no" >&5
33629 echo "${ECHO_T}no" >&6
33630
33631 ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33632
33633 cat >>confdefs.h <<EOF
33634 #define $ac_tr_func 1
33635 EOF
33636
33637 fi
33638 done
33639
33640 for ac_func in getgrgid getgrnam
33641 do
33642
33643 echo "$as_me:33643: checking for $ac_func declaration" >&5
33644 echo $ECHO_N "checking for $ac_func declaration... $ECHO_C" >&6
33645 if eval "test \"\${ac_cv_func_decl_$ac_func+set}\" = set"; then
33646 echo $ECHO_N "(cached) $ECHO_C" >&6
33647 else
33648 cat >"conftest.$ac_ext" <<_ACEOF
33649 #line 33649 "configure"
33650 #include "confdefs.h"
33651
33652 $ac_includes_default
33653 #include <grp.h>
33654 int
33655 main (void)
33656 {
33657 #ifndef $ac_func
33658 extern int $ac_func(void);
33659 #endif
33660 ;
33661 return 0;
33662 }
33663 _ACEOF
33664 rm -f "conftest.$ac_objext"
33665 if { (eval echo "$as_me:33665: \"$ac_compile\"") >&5
33666 (eval $ac_compile) 2>&5
33667 ac_status=$?
33668 echo "$as_me:33668: \$? = $ac_status" >&5
33669 (exit "$ac_status"); } &&
33670 { ac_try='test -s "conftest.$ac_objext"'
33671 { (eval echo "$as_me:33671: \"$ac_try\"") >&5
33672 (eval $ac_try) 2>&5
33673 ac_status=$?
33674 echo "$as_me:33674: \$? = $ac_status" >&5
33675 (exit "$ac_status"); }; }; then
33676
33677 cat >"conftest.$ac_ext" <<_ACEOF
33678 #line 33678 "configure"
33679 #include "confdefs.h"
33680 #include <grp.h>
33681 int
33682 main (void)
33683 {
33684 #ifndef $ac_func
33685 int (*p)(struct cf_check_funcdecl*) = $ac_func;
33686 #endif
33687 ;
33688 return 0;
33689 }
33690 _ACEOF
33691 rm -f "conftest.$ac_objext"
33692 if { (eval echo "$as_me:33692: \"$ac_compile\"") >&5
33693 (eval $ac_compile) 2>&5
33694 ac_status=$?
33695 echo "$as_me:33695: \$? = $ac_status" >&5
33696 (exit "$ac_status"); } &&
33697 { ac_try='test -s "conftest.$ac_objext"'
33698 { (eval echo "$as_me:33698: \"$ac_try\"") >&5
33699 (eval $ac_try) 2>&5
33700 ac_status=$?
33701 echo "$as_me:33701: \$? = $ac_status" >&5
33702 (exit "$ac_status"); }; }; then
33703
33704 eval "ac_cv_func_decl_$ac_func=yes"
33705 else
33706 echo "$as_me: failed program was:" >&5
33707 cat "conftest.$ac_ext" >&5
33708
33709 eval "ac_cv_func_decl_$ac_func=no"
33710 fi
33711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33712 else
33713 echo "$as_me: failed program was:" >&5
33714 cat "conftest.$ac_ext" >&5
33715
33716 eval "ac_cv_func_decl_$ac_func=yes"
33717 fi
33718 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33719 fi
33720
33721 if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
33722 echo "$as_me:33722: result: yes" >&5
33723 echo "${ECHO_T}yes" >&6
33724 :
33725 else
33726 echo "$as_me:33726: result: no" >&5
33727 echo "${ECHO_T}no" >&6
33728
33729 ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33730
33731 cat >>confdefs.h <<EOF
33732 #define $ac_tr_func 1
33733 EOF
33734
33735 fi
33736 done
33737
33738 echo "$as_me:33738: checking if TRUE/FALSE are defined" >&5
33739 echo $ECHO_N "checking if TRUE/FALSE are defined... $ECHO_C" >&6
33740 if test "${cf_cv_bool_defs+set}" = set; then
33741 echo $ECHO_N "(cached) $ECHO_C" >&6
33742 else
33743
33744 cat >"conftest.$ac_ext" <<_ACEOF
33745 #line 33745 "configure"
33746 #include "confdefs.h"
33747
33748 #include <${cf_cv_ncurses_header:-curses.h}>
33749 #include <stdio.h>
33750 int
33751 main (void)
33752 {
33753 int x = TRUE, y = FALSE; (void)x; (void)y
33754 ;
33755 return 0;
33756 }
33757 _ACEOF
33758 rm -f "conftest.$ac_objext"
33759 if { (eval echo "$as_me:33759: \"$ac_compile\"") >&5
33760 (eval $ac_compile) 2>&5
33761 ac_status=$?
33762 echo "$as_me:33762: \$? = $ac_status" >&5
33763 (exit "$ac_status"); } &&
33764 { ac_try='test -s "conftest.$ac_objext"'
33765 { (eval echo "$as_me:33765: \"$ac_try\"") >&5
33766 (eval $ac_try) 2>&5
33767 ac_status=$?
33768 echo "$as_me:33768: \$? = $ac_status" >&5
33769 (exit "$ac_status"); }; }; then
33770 cf_cv_bool_defs=yes
33771 else
33772 echo "$as_me: failed program was:" >&5
33773 cat "conftest.$ac_ext" >&5
33774 cf_cv_bool_defs=no
33775 fi
33776 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33777 fi
33778
33779 echo "$as_me:33779: result: $cf_cv_bool_defs" >&5
33780 echo "${ECHO_T}$cf_cv_bool_defs" >&6
33781 if test "$cf_cv_bool_defs" = no ; then
33782
33783 cat >>confdefs.h <<\EOF
33784 #define TRUE (1)
33785 EOF
33786
33787 cat >>confdefs.h <<\EOF
33788 #define FALSE (0)
33789 EOF
33790
33791 fi
33792
33793 echo "$as_me:33793: checking if external errno is declared" >&5
33794 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
33795 if test "${cf_cv_dcl_errno+set}" = set; then
33796 echo $ECHO_N "(cached) $ECHO_C" >&6
33797 else
33798
33799 cat >"conftest.$ac_ext" <<_ACEOF
33800 #line 33800 "configure"
33801 #include "confdefs.h"
33802
33803 $ac_includes_default
33804 #include <errno.h>
33805 int
33806 main (void)
33807 {
33808 int x = (int) errno; (void)x
33809 ;
33810 return 0;
33811 }
33812 _ACEOF
33813 rm -f "conftest.$ac_objext"
33814 if { (eval echo "$as_me:33814: \"$ac_compile\"") >&5
33815 (eval $ac_compile) 2>&5
33816 ac_status=$?
33817 echo "$as_me:33817: \$? = $ac_status" >&5
33818 (exit "$ac_status"); } &&
33819 { ac_try='test -s "conftest.$ac_objext"'
33820 { (eval echo "$as_me:33820: \"$ac_try\"") >&5
33821 (eval $ac_try) 2>&5
33822 ac_status=$?
33823 echo "$as_me:33823: \$? = $ac_status" >&5
33824 (exit "$ac_status"); }; }; then
33825 cf_cv_dcl_errno=yes
33826 else
33827 echo "$as_me: failed program was:" >&5
33828 cat "conftest.$ac_ext" >&5
33829 cf_cv_dcl_errno=no
33830 fi
33831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33832
33833 fi
33834 echo "$as_me:33834: result: $cf_cv_dcl_errno" >&5
33835 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
33836
33837 if test "$cf_cv_dcl_errno" = no ; then
33838
33839 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33840
33841 cat >>confdefs.h <<EOF
33842 #define $cf_result 1
33843 EOF
33844
33845 fi
33846
33847 # It's possible (for near-UNIX clones) that the data doesn't exist
33848
33849 echo "$as_me:33849: checking if external errno exists" >&5
33850 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
33851 if test "${cf_cv_have_errno+set}" = set; then
33852 echo $ECHO_N "(cached) $ECHO_C" >&6
33853 else
33854
33855 cat >"conftest.$ac_ext" <<_ACEOF
33856 #line 33856 "configure"
33857 #include "confdefs.h"
33858
33859 #undef errno
33860 extern int errno;
33861
33862 int
33863 main (void)
33864 {
33865 errno = 2
33866 ;
33867 return 0;
33868 }
33869 _ACEOF
33870 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33871 if { (eval echo "$as_me:33871: \"$ac_link\"") >&5
33872 (eval $ac_link) 2>&5
33873 ac_status=$?
33874 echo "$as_me:33874: \$? = $ac_status" >&5
33875 (exit "$ac_status"); } &&
33876 { ac_try='test -s "conftest$ac_exeext"'
33877 { (eval echo "$as_me:33877: \"$ac_try\"") >&5
33878 (eval $ac_try) 2>&5
33879 ac_status=$?
33880 echo "$as_me:33880: \$? = $ac_status" >&5
33881 (exit "$ac_status"); }; }; then
33882 cf_cv_have_errno=yes
33883 else
33884 echo "$as_me: failed program was:" >&5
33885 cat "conftest.$ac_ext" >&5
33886 cf_cv_have_errno=no
33887 fi
33888 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33889
33890 fi
33891 echo "$as_me:33891: result: $cf_cv_have_errno" >&5
33892 echo "${ECHO_T}$cf_cv_have_errno" >&6
33893
33894 if test "$cf_cv_have_errno" = yes ; then
33895
33896 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33897
33898 cat >>confdefs.h <<EOF
33899 #define $cf_result 1
33900 EOF
33901
33902 fi
33903
33904 echo "$as_me:33904: checking if we can set errno" >&5
33905 echo $ECHO_N "checking if we can set errno... $ECHO_C" >&6
33906 if test "${cf_cv_set_errno+set}" = set; then
33907 echo $ECHO_N "(cached) $ECHO_C" >&6
33908 else
33909
33910 if test "$cross_compiling" = yes; then
33911 cat >"conftest.$ac_ext" <<_ACEOF
33912 #line 33912 "configure"
33913 #include "confdefs.h"
33914 #include <errno.h>
33915 int
33916 main (void)
33917 {
33918 errno = 255
33919 ;
33920 return 0;
33921 }
33922 _ACEOF
33923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33924 if { (eval echo "$as_me:33924: \"$ac_link\"") >&5
33925 (eval $ac_link) 2>&5
33926 ac_status=$?
33927 echo "$as_me:33927: \$? = $ac_status" >&5
33928 (exit "$ac_status"); } &&
33929 { ac_try='test -s "conftest$ac_exeext"'
33930 { (eval echo "$as_me:33930: \"$ac_try\"") >&5
33931 (eval $ac_try) 2>&5
33932 ac_status=$?
33933 echo "$as_me:33933: \$? = $ac_status" >&5
33934 (exit "$ac_status"); }; }; then
33935 cf_cv_set_errno=maybe
33936 else
33937 echo "$as_me: failed program was:" >&5
33938 cat "conftest.$ac_ext" >&5
33939 cf_cv_set_errno=no
33940 fi
33941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33942 else
33943 cat >"conftest.$ac_ext" <<_ACEOF
33944 #line 33944 "configure"
33945 #include "confdefs.h"
33946
33947 $ac_includes_default
33948
33949 #include <errno.h>
33950
33951 int main(void)
33952 {
33953 errno = 255;
33954 ${cf_cv_main_return:-return}(errno != 255);
33955 }
33956 _ACEOF
33957 rm -f "conftest$ac_exeext"
33958 if { (eval echo "$as_me:33958: \"$ac_link\"") >&5
33959 (eval $ac_link) 2>&5
33960 ac_status=$?
33961 echo "$as_me:33961: \$? = $ac_status" >&5
33962 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
33963 { (eval echo "$as_me:33963: \"$ac_try\"") >&5
33964 (eval $ac_try) 2>&5
33965 ac_status=$?
33966 echo "$as_me:33966: \$? = $ac_status" >&5
33967 (exit "$ac_status"); }; }; then
33968 cf_cv_set_errno=yes
33969 else
33970 echo "$as_me: program exited with status $ac_status" >&5
33971 echo "$as_me: failed program was:" >&5
33972 cat "conftest.$ac_ext" >&5
33973 cf_cv_set_errno=no
33974 fi
33975 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
33976 fi
33977
33978 fi
33979 echo "$as_me:33979: result: $cf_cv_set_errno" >&5
33980 echo "${ECHO_T}$cf_cv_set_errno" >&6
33981 test "$cf_cv_set_errno" != no &&
33982 cat >>confdefs.h <<\EOF
33983 #define CAN_SET_ERRNO 1
33984 EOF
33985
33986 echo "$as_me:33986: checking for setlocale()" >&5
33987 echo $ECHO_N "checking for setlocale()... $ECHO_C" >&6
33988 if test "${cf_cv_locale+set}" = set; then
33989 echo $ECHO_N "(cached) $ECHO_C" >&6
33990 else
33991
33992 cat >"conftest.$ac_ext" <<_ACEOF
33993 #line 33993 "configure"
33994 #include "confdefs.h"
33995
33996 $ac_includes_default
33997 #include <locale.h>
33998 int
33999 main (void)
34000 {
34001 setlocale(LC_ALL, "")
34002 ;
34003 return 0;
34004 }
34005 _ACEOF
34006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34007 if { (eval echo "$as_me:34007: \"$ac_link\"") >&5
34008 (eval $ac_link) 2>&5
34009 ac_status=$?
34010 echo "$as_me:34010: \$? = $ac_status" >&5
34011 (exit "$ac_status"); } &&
34012 { ac_try='test -s "conftest$ac_exeext"'
34013 { (eval echo "$as_me:34013: \"$ac_try\"") >&5
34014 (eval $ac_try) 2>&5
34015 ac_status=$?
34016 echo "$as_me:34016: \$? = $ac_status" >&5
34017 (exit "$ac_status"); }; }; then
34018 cf_cv_locale=yes
34019 else
34020 echo "$as_me: failed program was:" >&5
34021 cat "conftest.$ac_ext" >&5
34022 cf_cv_locale=no
34023 fi
34024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34025
34026 fi
34027
34028 echo "$as_me:34028: result: $cf_cv_locale" >&5
34029 echo "${ECHO_T}$cf_cv_locale" >&6
34030 test "$cf_cv_locale" = yes && {
34031 cat >>confdefs.h <<\EOF
34032 #define LOCALE 1
34033 EOF
34034 }
34035
34036 for ac_header in sys/param.h limits.h
34037 do
34038 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
34039 echo "$as_me:34039: checking for $ac_header" >&5
34040 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
34041 if eval "test \"\${$as_ac_Header+set}\" = set"; then
34042 echo $ECHO_N "(cached) $ECHO_C" >&6
34043 else
34044 cat >"conftest.$ac_ext" <<_ACEOF
34045 #line 34045 "configure"
34046 #include "confdefs.h"
34047 #include <$ac_header>
34048 _ACEOF
34049 if { (eval echo "$as_me:34049: \"$ac_cpp "conftest.$ac_ext"\"") >&5
34050 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
34051 ac_status=$?
34052 $EGREP -v '^ *\+' conftest.er1 >conftest.err
34053 rm -f conftest.er1
34054 cat conftest.err >&5
34055 echo "$as_me:34055: \$? = $ac_status" >&5
34056 (exit "$ac_status"); } >/dev/null; then
34057 if test -s conftest.err; then
34058 ac_cpp_err=$ac_c_preproc_warn_flag
34059 else
34060 ac_cpp_err=
34061 fi
34062 else
34063 ac_cpp_err=yes
34064 fi
34065 if test -z "$ac_cpp_err"; then
34066 eval "$as_ac_Header=yes"
34067 else
34068 echo "$as_me: failed program was:" >&5
34069 cat "conftest.$ac_ext" >&5
34070 eval "$as_ac_Header=no"
34071 fi
34072 rm -f conftest.err "conftest.$ac_ext"
34073 fi
34074 echo "$as_me:34074: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
34075 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
34076 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
34077 cat >>confdefs.h <<EOF
34078 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
34079 EOF
34080
34081 fi
34082 done
34083
34084 echo "$as_me:34084: checking if NGROUPS is defined" >&5
34085 echo $ECHO_N "checking if NGROUPS is defined... $ECHO_C" >&6
34086 if test "${cf_cv_ngroups+set}" = set; then
34087 echo $ECHO_N "(cached) $ECHO_C" >&6
34088 else
34089
34090 cat >"conftest.$ac_ext" <<_ACEOF
34091 #line 34091 "configure"
34092 #include "confdefs.h"
34093
34094 #if HAVE_SYS_PARAM_H
34095 #include <sys/param.h>
34096 #endif
34097 #if HAVE_LIMITS_H
34098 #include <limits.h>
34099 #endif
34100
34101 int
34102 main (void)
34103 {
34104 int x = NGROUPS; (void)x
34105 ;
34106 return 0;
34107 }
34108 _ACEOF
34109 rm -f "conftest.$ac_objext"
34110 if { (eval echo "$as_me:34110: \"$ac_compile\"") >&5
34111 (eval $ac_compile) 2>&5
34112 ac_status=$?
34113 echo "$as_me:34113: \$? = $ac_status" >&5
34114 (exit "$ac_status"); } &&
34115 { ac_try='test -s "conftest.$ac_objext"'
34116 { (eval echo "$as_me:34116: \"$ac_try\"") >&5
34117 (eval $ac_try) 2>&5
34118 ac_status=$?
34119 echo "$as_me:34119: \$? = $ac_status" >&5
34120 (exit "$ac_status"); }; }; then
34121 cf_cv_ngroups=yes
34122 else
34123 echo "$as_me: failed program was:" >&5
34124 cat "conftest.$ac_ext" >&5
34125 cat >"conftest.$ac_ext" <<_ACEOF
34126 #line 34126 "configure"
34127 #include "confdefs.h"
34128
34129 #if HAVE_SYS_PARAM_H
34130 #include <sys/param.h>
34131 #endif
34132 #if HAVE_LIMITS_H
34133 #include <limits.h>
34134 #endif
34135
34136 int
34137 main (void)
34138 {
34139 int x = NGROUPS_MAX
34140 ;
34141 return 0;
34142 }
34143 _ACEOF
34144 rm -f "conftest.$ac_objext"
34145 if { (eval echo "$as_me:34145: \"$ac_compile\"") >&5
34146 (eval $ac_compile) 2>&5
34147 ac_status=$?
34148 echo "$as_me:34148: \$? = $ac_status" >&5
34149 (exit "$ac_status"); } &&
34150 { ac_try='test -s "conftest.$ac_objext"'
34151 { (eval echo "$as_me:34151: \"$ac_try\"") >&5
34152 (eval $ac_try) 2>&5
34153 ac_status=$?
34154 echo "$as_me:34154: \$? = $ac_status" >&5
34155 (exit "$ac_status"); }; }; then
34156 cf_cv_ngroups=NGROUPS_MAX
34157 else
34158 echo "$as_me: failed program was:" >&5
34159 cat "conftest.$ac_ext" >&5
34160 cf_cv_ngroups=no
34161 fi
34162 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34163
34164 fi
34165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34166 echo "$as_me:34166: result: $cf_cv_ngroups" >&5
34167 echo "${ECHO_T}$cf_cv_ngroups" >&6
34168
34169 fi
34170
34171 if test "$cf_cv_ngroups" = no ; then
34172
34173 cat >>confdefs.h <<\EOF
34174 #define NGROUPS 16
34175 EOF
34176
34177 elif test "$cf_cv_ngroups" = NGROUPS_MAX ; then
34178 cat >>confdefs.h <<\EOF
34179 #define NGROUPS NGROUPS_MAX
34180 EOF
34181
34182 fi
34183
34184 for ac_func in strerror
34185 do
34186 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
34187 echo "$as_me:34187: checking for $ac_func" >&5
34188 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
34189 if eval "test \"\${$as_ac_var+set}\" = set"; then
34190 echo $ECHO_N "(cached) $ECHO_C" >&6
34191 else
34192 cat >"conftest.$ac_ext" <<_ACEOF
34193 #line 34193 "configure"
34194 #include "confdefs.h"
34195 #define $ac_func autoconf_temporary
34196 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
34197 #undef $ac_func
34198
34199 #ifdef __cplusplus
34200 extern "C"
34201 #endif
34202
34203 /* We use char because int might match the return type of a gcc2
34204 builtin and then its argument prototype would still apply. */
34205 char $ac_func (void);
34206
34207 int
34208 main (void)
34209 {
34210
34211 /* The GNU C library defines stubs for functions which it implements
34212 to always fail with ENOSYS. Some functions are actually named
34213 something starting with __ and the normal name is an alias. */
34214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
34215 #error found stub for $ac_func
34216 #endif
34217
34218 return $ac_func ();
34219 ;
34220 return 0;
34221 }
34222 _ACEOF
34223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34224 if { (eval echo "$as_me:34224: \"$ac_link\"") >&5
34225 (eval $ac_link) 2>&5
34226 ac_status=$?
34227 echo "$as_me:34227: \$? = $ac_status" >&5
34228 (exit "$ac_status"); } &&
34229 { ac_try='test -s "conftest$ac_exeext"'
34230 { (eval echo "$as_me:34230: \"$ac_try\"") >&5
34231 (eval $ac_try) 2>&5
34232 ac_status=$?
34233 echo "$as_me:34233: \$? = $ac_status" >&5
34234 (exit "$ac_status"); }; }; then
34235 eval "$as_ac_var=yes"
34236 else
34237 echo "$as_me: failed program was:" >&5
34238 cat "conftest.$ac_ext" >&5
34239 eval "$as_ac_var=no"
34240 fi
34241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34242 fi
34243 echo "$as_me:34243: result: `eval echo '${'"$as_ac_var"'}'`" >&5
34244 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
34245 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
34246 cat >>confdefs.h <<EOF
34247 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
34248 EOF
34249
34250 else
34251
34252 echo "$as_me:34252: checking if external sys_nerr is declared" >&5
34253 echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
34254 if test "${cf_cv_dcl_sys_nerr+set}" = set; then
34255 echo $ECHO_N "(cached) $ECHO_C" >&6
34256 else
34257
34258 cat >"conftest.$ac_ext" <<_ACEOF
34259 #line 34259 "configure"
34260 #include "confdefs.h"
34261
34262 $ac_includes_default
34263 #include <errno.h>
34264 int
34265 main (void)
34266 {
34267 int x = (int) sys_nerr; (void)x
34268 ;
34269 return 0;
34270 }
34271 _ACEOF
34272 rm -f "conftest.$ac_objext"
34273 if { (eval echo "$as_me:34273: \"$ac_compile\"") >&5
34274 (eval $ac_compile) 2>&5
34275 ac_status=$?
34276 echo "$as_me:34276: \$? = $ac_status" >&5
34277 (exit "$ac_status"); } &&
34278 { ac_try='test -s "conftest.$ac_objext"'
34279 { (eval echo "$as_me:34279: \"$ac_try\"") >&5
34280 (eval $ac_try) 2>&5
34281 ac_status=$?
34282 echo "$as_me:34282: \$? = $ac_status" >&5
34283 (exit "$ac_status"); }; }; then
34284 cf_cv_dcl_sys_nerr=yes
34285 else
34286 echo "$as_me: failed program was:" >&5
34287 cat "conftest.$ac_ext" >&5
34288 cf_cv_dcl_sys_nerr=no
34289 fi
34290 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34291
34292 fi
34293 echo "$as_me:34293: result: $cf_cv_dcl_sys_nerr" >&5
34294 echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
34295
34296 if test "$cf_cv_dcl_sys_nerr" = no ; then
34297
34298 cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
34299
34300 cat >>confdefs.h <<EOF
34301 #define $cf_result 1
34302 EOF
34303
34304 fi
34305
34306 # It's possible (for near-UNIX clones) that the data doesn't exist
34307
34308 echo "$as_me:34308: checking if external sys_nerr exists" >&5
34309 echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
34310 if test "${cf_cv_have_sys_nerr+set}" = set; then
34311 echo $ECHO_N "(cached) $ECHO_C" >&6
34312 else
34313
34314 cat >"conftest.$ac_ext" <<_ACEOF
34315 #line 34315 "configure"
34316 #include "confdefs.h"
34317
34318 #undef sys_nerr
34319 extern int sys_nerr;
34320
34321 int
34322 main (void)
34323 {
34324 sys_nerr = 2
34325 ;
34326 return 0;
34327 }
34328 _ACEOF
34329 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34330 if { (eval echo "$as_me:34330: \"$ac_link\"") >&5
34331 (eval $ac_link) 2>&5
34332 ac_status=$?
34333 echo "$as_me:34333: \$? = $ac_status" >&5
34334 (exit "$ac_status"); } &&
34335 { ac_try='test -s "conftest$ac_exeext"'
34336 { (eval echo "$as_me:34336: \"$ac_try\"") >&5
34337 (eval $ac_try) 2>&5
34338 ac_status=$?
34339 echo "$as_me:34339: \$? = $ac_status" >&5
34340 (exit "$ac_status"); }; }; then
34341 cf_cv_have_sys_nerr=yes
34342 else
34343 echo "$as_me: failed program was:" >&5
34344 cat "conftest.$ac_ext" >&5
34345 cf_cv_have_sys_nerr=no
34346 fi
34347 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34348
34349 fi
34350 echo "$as_me:34350: result: $cf_cv_have_sys_nerr" >&5
34351 echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
34352
34353 if test "$cf_cv_have_sys_nerr" = yes ; then
34354
34355 cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
34356
34357 cat >>confdefs.h <<EOF
34358 #define $cf_result 1
34359 EOF
34360
34361 fi
34362
34363 echo "$as_me:34363: checking if external sys_errlist is declared" >&5
34364 echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
34365 if test "${cf_cv_dcl_sys_errlist+set}" = set; then
34366 echo $ECHO_N "(cached) $ECHO_C" >&6
34367 else
34368
34369 cat >"conftest.$ac_ext" <<_ACEOF
34370 #line 34370 "configure"
34371 #include "confdefs.h"
34372
34373 $ac_includes_default
34374 #include <errno.h>
34375 int
34376 main (void)
34377 {
34378 int x = (int) sys_errlist; (void)x
34379 ;
34380 return 0;
34381 }
34382 _ACEOF
34383 rm -f "conftest.$ac_objext"
34384 if { (eval echo "$as_me:34384: \"$ac_compile\"") >&5
34385 (eval $ac_compile) 2>&5
34386 ac_status=$?
34387 echo "$as_me:34387: \$? = $ac_status" >&5
34388 (exit "$ac_status"); } &&
34389 { ac_try='test -s "conftest.$ac_objext"'
34390 { (eval echo "$as_me:34390: \"$ac_try\"") >&5
34391 (eval $ac_try) 2>&5
34392 ac_status=$?
34393 echo "$as_me:34393: \$? = $ac_status" >&5
34394 (exit "$ac_status"); }; }; then
34395 cf_cv_dcl_sys_errlist=yes
34396 else
34397 echo "$as_me: failed program was:" >&5
34398 cat "conftest.$ac_ext" >&5
34399 cf_cv_dcl_sys_errlist=no
34400 fi
34401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34402
34403 fi
34404 echo "$as_me:34404: result: $cf_cv_dcl_sys_errlist" >&5
34405 echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
34406
34407 if test "$cf_cv_dcl_sys_errlist" = no ; then
34408
34409 cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
34410
34411 cat >>confdefs.h <<EOF
34412 #define $cf_result 1
34413 EOF
34414
34415 fi
34416
34417 # It's possible (for near-UNIX clones) that the data doesn't exist
34418
34419 echo "$as_me:34419: checking if external sys_errlist exists" >&5
34420 echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
34421 if test "${cf_cv_have_sys_errlist+set}" = set; then
34422 echo $ECHO_N "(cached) $ECHO_C" >&6
34423 else
34424
34425 cat >"conftest.$ac_ext" <<_ACEOF
34426 #line 34426 "configure"
34427 #include "confdefs.h"
34428
34429 #undef sys_errlist
34430 extern int sys_errlist;
34431
34432 int
34433 main (void)
34434 {
34435 sys_errlist = 2
34436 ;
34437 return 0;
34438 }
34439 _ACEOF
34440 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34441 if { (eval echo "$as_me:34441: \"$ac_link\"") >&5
34442 (eval $ac_link) 2>&5
34443 ac_status=$?
34444 echo "$as_me:34444: \$? = $ac_status" >&5
34445 (exit "$ac_status"); } &&
34446 { ac_try='test -s "conftest$ac_exeext"'
34447 { (eval echo "$as_me:34447: \"$ac_try\"") >&5
34448 (eval $ac_try) 2>&5
34449 ac_status=$?
34450 echo "$as_me:34450: \$? = $ac_status" >&5
34451 (exit "$ac_status"); }; }; then
34452 cf_cv_have_sys_errlist=yes
34453 else
34454 echo "$as_me: failed program was:" >&5
34455 cat "conftest.$ac_ext" >&5
34456 cf_cv_have_sys_errlist=no
34457 fi
34458 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34459
34460 fi
34461 echo "$as_me:34461: result: $cf_cv_have_sys_errlist" >&5
34462 echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
34463
34464 if test "$cf_cv_have_sys_errlist" = yes ; then
34465
34466 cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
34467
34468 cat >>confdefs.h <<EOF
34469 #define $cf_result 1
34470 EOF
34471
34472 fi
34473
34474 fi
34475 done
34476
34477 for ac_header in lastlog.h paths.h
34478 do
34479 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
34480 echo "$as_me:34480: checking for $ac_header" >&5
34481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
34482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
34483 echo $ECHO_N "(cached) $ECHO_C" >&6
34484 else
34485 cat >"conftest.$ac_ext" <<_ACEOF
34486 #line 34486 "configure"
34487 #include "confdefs.h"
34488 #include <$ac_header>
34489 _ACEOF
34490 if { (eval echo "$as_me:34490: \"$ac_cpp "conftest.$ac_ext"\"") >&5
34491 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
34492 ac_status=$?
34493 $EGREP -v '^ *\+' conftest.er1 >conftest.err
34494 rm -f conftest.er1
34495 cat conftest.err >&5
34496 echo "$as_me:34496: \$? = $ac_status" >&5
34497 (exit "$ac_status"); } >/dev/null; then
34498 if test -s conftest.err; then
34499 ac_cpp_err=$ac_c_preproc_warn_flag
34500 else
34501 ac_cpp_err=
34502 fi
34503 else
34504 ac_cpp_err=yes
34505 fi
34506 if test -z "$ac_cpp_err"; then
34507 eval "$as_ac_Header=yes"
34508 else
34509 echo "$as_me: failed program was:" >&5
34510 cat "conftest.$ac_ext" >&5
34511 eval "$as_ac_Header=no"
34512 fi
34513 rm -f conftest.err "conftest.$ac_ext"
34514 fi
34515 echo "$as_me:34515: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
34516 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
34517 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
34518 cat >>confdefs.h <<EOF
34519 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
34520 EOF
34521
34522 fi
34523 done
34524
34525 echo "$as_me:34525: checking for lastlog path" >&5
34526 echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
34527 if test "${cf_cv_path_lastlog+set}" = set; then
34528 echo $ECHO_N "(cached) $ECHO_C" >&6
34529 else
34530
34531 cat >"conftest.$ac_ext" <<_ACEOF
34532 #line 34532 "configure"
34533 #include "confdefs.h"
34534
34535 #include <sys/types.h>
34536 #ifdef HAVE_LASTLOG_H
34537 #include <lastlog.h>
34538 #else
34539 #ifdef HAVE_PATHS_H
34540 #include <paths.h>
34541 #endif
34542 #endif
34543 int
34544 main (void)
34545 {
34546 static char path[] = _PATH_LASTLOG; (void)path
34547 ;
34548 return 0;
34549 }
34550 _ACEOF
34551 rm -f "conftest.$ac_objext"
34552 if { (eval echo "$as_me:34552: \"$ac_compile\"") >&5
34553 (eval $ac_compile) 2>&5
34554 ac_status=$?
34555 echo "$as_me:34555: \$? = $ac_status" >&5
34556 (exit "$ac_status"); } &&
34557 { ac_try='test -s "conftest.$ac_objext"'
34558 { (eval echo "$as_me:34558: \"$ac_try\"") >&5
34559 (eval $ac_try) 2>&5
34560 ac_status=$?
34561 echo "$as_me:34561: \$? = $ac_status" >&5
34562 (exit "$ac_status"); }; }; then
34563 cf_cv_path_lastlog="_PATH_LASTLOG"
34564 else
34565 echo "$as_me: failed program was:" >&5
34566 cat "conftest.$ac_ext" >&5
34567 if test -f /usr/adm/lastlog ; then
34568 cf_cv_path_lastlog=/usr/adm/lastlog
34569 else
34570 cf_cv_path_lastlog=no
34571 fi
34572 fi
34573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34574
34575 fi
34576 echo "$as_me:34576: result: $cf_cv_path_lastlog" >&5
34577 echo "${ECHO_T}$cf_cv_path_lastlog" >&6
34578 test "$cf_cv_path_lastlog" != no &&
34579 cat >>confdefs.h <<\EOF
34580 #define USE_LASTLOG 1
34581 EOF
34582
34583 echo "$as_me:34583: checking for utmp implementation" >&5
34584 echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
34585 if test "${cf_cv_have_utmp+set}" = set; then
34586 echo $ECHO_N "(cached) $ECHO_C" >&6
34587 else
34588
34589 cf_cv_have_utmp=no
34590 for cf_header in utmpx utmp ; do
34591 cf_utmp_includes="
34592 #include <sys/types.h>
34593 #include <${cf_header}.h>
34594 #define getutent getutxent
34595 #ifdef USE_LASTLOG
34596 #include <lastlog.h> /* may conflict with utmpx.h on Linux */
34597 #endif
34598 "
34599 cat >"conftest.$ac_ext" <<_ACEOF
34600 #line 34600 "configure"
34601 #include "confdefs.h"
34602 $cf_utmp_includes
34603 int
34604 main (void)
34605 {
34606 struct $cf_header x;
34607 char *name = x.ut_name; /* utmp.h and compatible definitions */
34608 (void)x;
34609 (void)name;
34610
34611 ;
34612 return 0;
34613 }
34614 _ACEOF
34615 rm -f "conftest.$ac_objext"
34616 if { (eval echo "$as_me:34616: \"$ac_compile\"") >&5
34617 (eval $ac_compile) 2>&5
34618 ac_status=$?
34619 echo "$as_me:34619: \$? = $ac_status" >&5
34620 (exit "$ac_status"); } &&
34621 { ac_try='test -s "conftest.$ac_objext"'
34622 { (eval echo "$as_me:34622: \"$ac_try\"") >&5
34623 (eval $ac_try) 2>&5
34624 ac_status=$?
34625 echo "$as_me:34625: \$? = $ac_status" >&5
34626 (exit "$ac_status"); }; }; then
34627 cf_cv_have_utmp=$cf_header
34628 break
34629 else
34630 echo "$as_me: failed program was:" >&5
34631 cat "conftest.$ac_ext" >&5
34632
34633 cat >"conftest.$ac_ext" <<_ACEOF
34634 #line 34634 "configure"
34635 #include "confdefs.h"
34636 $cf_utmp_includes
34637 int
34638 main (void)
34639 {
34640 struct $cf_header x;
34641 char *name = x.ut_user; /* utmpx.h must declare this */
34642 (void)x;
34643 (void)name;
34644
34645 ;
34646 return 0;
34647 }
34648 _ACEOF
34649 rm -f "conftest.$ac_objext"
34650 if { (eval echo "$as_me:34650: \"$ac_compile\"") >&5
34651 (eval $ac_compile) 2>&5
34652 ac_status=$?
34653 echo "$as_me:34653: \$? = $ac_status" >&5
34654 (exit "$ac_status"); } &&
34655 { ac_try='test -s "conftest.$ac_objext"'
34656 { (eval echo "$as_me:34656: \"$ac_try\"") >&5
34657 (eval $ac_try) 2>&5
34658 ac_status=$?
34659 echo "$as_me:34659: \$? = $ac_status" >&5
34660 (exit "$ac_status"); }; }; then
34661 cf_cv_have_utmp=$cf_header
34662 break
34663
34664 else
34665 echo "$as_me: failed program was:" >&5
34666 cat "conftest.$ac_ext" >&5
34667 fi
34668 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34669 fi
34670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34671 done
34672
34673 fi
34674 echo "$as_me:34674: result: $cf_cv_have_utmp" >&5
34675 echo "${ECHO_T}$cf_cv_have_utmp" >&6
34676
34677 if test "$cf_cv_have_utmp" != no ; then
34678
34679 cat >>confdefs.h <<\EOF
34680 #define HAVE_UTMP 1
34681 EOF
34682
34683 test "$cf_cv_have_utmp" = utmpx &&
34684 cat >>confdefs.h <<\EOF
34685 #define UTMPX_FOR_UTMP 1
34686 EOF
34687
34688 if test "$cf_cv_have_utmp" != no ; then
34689 echo "$as_me:34689: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
34690 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
34691 if test "${cf_cv_have_utmp_ut_host+set}" = set; then
34692 echo $ECHO_N "(cached) $ECHO_C" >&6
34693 else
34694
34695 cat >"conftest.$ac_ext" <<_ACEOF
34696 #line 34696 "configure"
34697 #include "confdefs.h"
34698
34699 #include <sys/types.h>
34700 #include <${cf_cv_have_utmp}.h>
34701 int
34702 main (void)
34703 {
34704 struct $cf_cv_have_utmp x;
34705 char *y = &x.ut_host[0];
34706 (void)x;
34707 (void)y
34708 ;
34709 return 0;
34710 }
34711 _ACEOF
34712 rm -f "conftest.$ac_objext"
34713 if { (eval echo "$as_me:34713: \"$ac_compile\"") >&5
34714 (eval $ac_compile) 2>&5
34715 ac_status=$?
34716 echo "$as_me:34716: \$? = $ac_status" >&5
34717 (exit "$ac_status"); } &&
34718 { ac_try='test -s "conftest.$ac_objext"'
34719 { (eval echo "$as_me:34719: \"$ac_try\"") >&5
34720 (eval $ac_try) 2>&5
34721 ac_status=$?
34722 echo "$as_me:34722: \$? = $ac_status" >&5
34723 (exit "$ac_status"); }; }; then
34724 cf_cv_have_utmp_ut_host=yes
34725 else
34726 echo "$as_me: failed program was:" >&5
34727 cat "conftest.$ac_ext" >&5
34728 cf_cv_have_utmp_ut_host=no
34729 fi
34730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34731
34732 fi
34733
34734 echo "$as_me:34734: result: $cf_cv_have_utmp_ut_host" >&5
34735 echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
34736 test "$cf_cv_have_utmp_ut_host" != no &&
34737 cat >>confdefs.h <<\EOF
34738 #define HAVE_UTMP_UT_HOST 1
34739 EOF
34740
34741 fi
34742
34743 if test "$cf_cv_have_utmp" != no ; then
34744 echo "$as_me:34744: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
34745 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
34746 if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
34747 echo $ECHO_N "(cached) $ECHO_C" >&6
34748 else
34749
34750 cat >"conftest.$ac_ext" <<_ACEOF
34751 #line 34751 "configure"
34752 #include "confdefs.h"
34753
34754 #include <sys/types.h>
34755 #include <${cf_cv_have_utmp}.h>
34756 int
34757 main (void)
34758 {
34759 struct $cf_cv_have_utmp x;
34760 int y = x.ut_syslen;
34761 (void)x;
34762 (void)y
34763 ;
34764 return 0;
34765 }
34766 _ACEOF
34767 rm -f "conftest.$ac_objext"
34768 if { (eval echo "$as_me:34768: \"$ac_compile\"") >&5
34769 (eval $ac_compile) 2>&5
34770 ac_status=$?
34771 echo "$as_me:34771: \$? = $ac_status" >&5
34772 (exit "$ac_status"); } &&
34773 { ac_try='test -s "conftest.$ac_objext"'
34774 { (eval echo "$as_me:34774: \"$ac_try\"") >&5
34775 (eval $ac_try) 2>&5
34776 ac_status=$?
34777 echo "$as_me:34777: \$? = $ac_status" >&5
34778 (exit "$ac_status"); }; }; then
34779 cf_cv_have_utmp_ut_syslen=yes
34780 else
34781 echo "$as_me: failed program was:" >&5
34782 cat "conftest.$ac_ext" >&5
34783 cf_cv_have_utmp_ut_syslen=no
34784 fi
34785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34786
34787 fi
34788
34789 echo "$as_me:34789: result: $cf_cv_have_utmp_ut_syslen" >&5
34790 echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
34791 test "$cf_cv_have_utmp_ut_syslen" != no &&
34792 cat >>confdefs.h <<\EOF
34793 #define HAVE_UTMP_UT_SYSLEN 1
34794 EOF
34795
34796 fi
34797
34798 if test "$cf_cv_have_utmp" != no ; then
34799 echo "$as_me:34799: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
34800 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
34801 if test "${cf_cv_have_utmp_ut_name+set}" = set; then
34802 echo $ECHO_N "(cached) $ECHO_C" >&6
34803 else
34804
34805 cf_cv_have_utmp_ut_name=no
34806 cf_utmp_includes="
34807 #include <sys/types.h>
34808 #include <${cf_cv_have_utmp}.h>
34809 #define getutent getutxent
34810 #ifdef USE_LASTLOG
34811 #include <lastlog.h> /* may conflict with utmpx.h on Linux */
34812 #endif
34813 "
34814 for cf_header in ut_name ut_user ; do
34815 cat >"conftest.$ac_ext" <<_ACEOF
34816 #line 34816 "configure"
34817 #include "confdefs.h"
34818 $cf_utmp_includes
34819 int
34820 main (void)
34821 {
34822 struct $cf_cv_have_utmp x;
34823 char *name = x.$cf_header;
34824 (void)x;
34825 (void)name;
34826
34827 ;
34828 return 0;
34829 }
34830 _ACEOF
34831 rm -f "conftest.$ac_objext"
34832 if { (eval echo "$as_me:34832: \"$ac_compile\"") >&5
34833 (eval $ac_compile) 2>&5
34834 ac_status=$?
34835 echo "$as_me:34835: \$? = $ac_status" >&5
34836 (exit "$ac_status"); } &&
34837 { ac_try='test -s "conftest.$ac_objext"'
34838 { (eval echo "$as_me:34838: \"$ac_try\"") >&5
34839 (eval $ac_try) 2>&5
34840 ac_status=$?
34841 echo "$as_me:34841: \$? = $ac_status" >&5
34842 (exit "$ac_status"); }; }; then
34843 cf_cv_have_utmp_ut_name=$cf_header
34844 break
34845 else
34846 echo "$as_me: failed program was:" >&5
34847 cat "conftest.$ac_ext" >&5
34848 fi
34849 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34850 done
34851
34852 fi
34853 echo "$as_me:34853: result: $cf_cv_have_utmp_ut_name" >&5
34854 echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
34855
34856 case "$cf_cv_have_utmp_ut_name" in
34857 (no)
34858 { { echo "$as_me:34858: error: Cannot find declaration for ut.ut_name" >&5
34859 echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
34860 { (exit 1); exit 1; }; }
34861 ;;
34862 (ut_user)
34863
34864 cat >>confdefs.h <<\EOF
34865 #define ut_name ut_user
34866 EOF
34867
34868 ;;
34869 esac
34870 fi
34871
34872 if test "$cf_cv_have_utmp" != no ; then
34873 echo "$as_me:34873: checking for exit-status in $cf_cv_have_utmp" >&5
34874 echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
34875 if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
34876 echo $ECHO_N "(cached) $ECHO_C" >&6
34877 else
34878
34879 for cf_result in \
34880 ut_exit.__e_exit \
34881 ut_exit.e_exit \
34882 ut_exit.ut_e_exit \
34883 ut_exit.ut_exit
34884 do
34885 cat >"conftest.$ac_ext" <<_ACEOF
34886 #line 34886 "configure"
34887 #include "confdefs.h"
34888
34889 #include <sys/types.h>
34890 #include <${cf_cv_have_utmp}.h>
34891 int
34892 main (void)
34893 {
34894 struct $cf_cv_have_utmp x;
34895 long y = x.$cf_result = 0;
34896 (void)x;
34897 (void)y
34898 ;
34899 return 0;
34900 }
34901 _ACEOF
34902 rm -f "conftest.$ac_objext"
34903 if { (eval echo "$as_me:34903: \"$ac_compile\"") >&5
34904 (eval $ac_compile) 2>&5
34905 ac_status=$?
34906 echo "$as_me:34906: \$? = $ac_status" >&5
34907 (exit "$ac_status"); } &&
34908 { ac_try='test -s "conftest.$ac_objext"'
34909 { (eval echo "$as_me:34909: \"$ac_try\"") >&5
34910 (eval $ac_try) 2>&5
34911 ac_status=$?
34912 echo "$as_me:34912: \$? = $ac_status" >&5
34913 (exit "$ac_status"); }; }; then
34914 cf_cv_have_utmp_ut_xstatus=$cf_result
34915 break
34916 else
34917 echo "$as_me: failed program was:" >&5
34918 cat "conftest.$ac_ext" >&5
34919 cf_cv_have_utmp_ut_xstatus=no
34920 fi
34921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34922 done
34923
34924 fi
34925 echo "$as_me:34925: result: $cf_cv_have_utmp_ut_xstatus" >&5
34926 echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
34927 if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
34928
34929 cat >>confdefs.h <<\EOF
34930 #define HAVE_UTMP_UT_XSTATUS 1
34931 EOF
34932
34933 cat >>confdefs.h <<EOF
34934 #define ut_xstatus $cf_cv_have_utmp_ut_xstatus
34935 EOF
34936
34937 fi
34938 fi
34939
34940 if test "$cf_cv_have_utmp" != no ; then
34941 echo "$as_me:34941: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
34942 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
34943 if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
34944 echo $ECHO_N "(cached) $ECHO_C" >&6
34945 else
34946
34947 cat >"conftest.$ac_ext" <<_ACEOF
34948 #line 34948 "configure"
34949 #include "confdefs.h"
34950
34951 #include <sys/types.h>
34952 #include <${cf_cv_have_utmp}.h>
34953 int
34954 main (void)
34955 {
34956 struct $cf_cv_have_utmp x;
34957 long y = x.ut_xtime = 0;
34958 (void)x;
34959 (void)y
34960 ;
34961 return 0;
34962 }
34963 _ACEOF
34964 rm -f "conftest.$ac_objext"
34965 if { (eval echo "$as_me:34965: \"$ac_compile\"") >&5
34966 (eval $ac_compile) 2>&5
34967 ac_status=$?
34968 echo "$as_me:34968: \$? = $ac_status" >&5
34969 (exit "$ac_status"); } &&
34970 { ac_try='test -s "conftest.$ac_objext"'
34971 { (eval echo "$as_me:34971: \"$ac_try\"") >&5
34972 (eval $ac_try) 2>&5
34973 ac_status=$?
34974 echo "$as_me:34974: \$? = $ac_status" >&5
34975 (exit "$ac_status"); }; }; then
34976 cf_cv_have_utmp_ut_xtime=yes
34977 else
34978 echo "$as_me: failed program was:" >&5
34979 cat "conftest.$ac_ext" >&5
34980 cat >"conftest.$ac_ext" <<_ACEOF
34981 #line 34981 "configure"
34982 #include "confdefs.h"
34983
34984 #include <sys/types.h>
34985 #include <${cf_cv_have_utmp}.h>
34986 int
34987 main (void)
34988 {
34989 struct $cf_cv_have_utmp x;
34990 long y = x.ut_tv.tv_sec;
34991 (void)x;
34992 (void)y
34993 ;
34994 return 0;
34995 }
34996 _ACEOF
34997 rm -f "conftest.$ac_objext"
34998 if { (eval echo "$as_me:34998: \"$ac_compile\"") >&5
34999 (eval $ac_compile) 2>&5
35000 ac_status=$?
35001 echo "$as_me:35001: \$? = $ac_status" >&5
35002 (exit "$ac_status"); } &&
35003 { ac_try='test -s "conftest.$ac_objext"'
35004 { (eval echo "$as_me:35004: \"$ac_try\"") >&5
35005 (eval $ac_try) 2>&5
35006 ac_status=$?
35007 echo "$as_me:35007: \$? = $ac_status" >&5
35008 (exit "$ac_status"); }; }; then
35009 cf_cv_have_utmp_ut_xtime=define
35010 else
35011 echo "$as_me: failed program was:" >&5
35012 cat "conftest.$ac_ext" >&5
35013 cf_cv_have_utmp_ut_xtime=no
35014 fi
35015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35016
35017 fi
35018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35019
35020 fi
35021 echo "$as_me:35021: result: $cf_cv_have_utmp_ut_xtime" >&5
35022 echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
35023 if test "$cf_cv_have_utmp_ut_xtime" != no ; then
35024
35025 cat >>confdefs.h <<\EOF
35026 #define HAVE_UTMP_UT_XTIME 1
35027 EOF
35028
35029 if test "$cf_cv_have_utmp_ut_xtime" = define ; then
35030
35031 cat >>confdefs.h <<\EOF
35032 #define ut_xtime ut_tv.tv_sec
35033 EOF
35034
35035 fi
35036 fi
35037 fi
35038
35039 if test "$cf_cv_have_utmp" != no ; then
35040 echo "$as_me:35040: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
35041 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
35042 if test "${cf_cv_have_utmp_ut_session+set}" = set; then
35043 echo $ECHO_N "(cached) $ECHO_C" >&6
35044 else
35045
35046 cat >"conftest.$ac_ext" <<_ACEOF
35047 #line 35047 "configure"
35048 #include "confdefs.h"
35049
35050 #include <sys/types.h>
35051 #include <${cf_cv_have_utmp}.h>
35052 int
35053 main (void)
35054 {
35055 static struct $cf_cv_have_utmp x;
35056 long y = x.ut_session;
35057 (void)x;
35058 (void)y
35059 ;
35060 return 0;
35061 }
35062 _ACEOF
35063 rm -f "conftest.$ac_objext"
35064 if { (eval echo "$as_me:35064: \"$ac_compile\"") >&5
35065 (eval $ac_compile) 2>&5
35066 ac_status=$?
35067 echo "$as_me:35067: \$? = $ac_status" >&5
35068 (exit "$ac_status"); } &&
35069 { ac_try='test -s "conftest.$ac_objext"'
35070 { (eval echo "$as_me:35070: \"$ac_try\"") >&5
35071 (eval $ac_try) 2>&5
35072 ac_status=$?
35073 echo "$as_me:35073: \$? = $ac_status" >&5
35074 (exit "$ac_status"); }; }; then
35075 cf_cv_have_utmp_ut_session=yes
35076 else
35077 echo "$as_me: failed program was:" >&5
35078 cat "conftest.$ac_ext" >&5
35079 cf_cv_have_utmp_ut_session=no
35080 fi
35081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35082
35083 fi
35084 echo "$as_me:35084: result: $cf_cv_have_utmp_ut_session" >&5
35085 echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
35086 if test "$cf_cv_have_utmp_ut_session" != no ; then
35087
35088 cat >>confdefs.h <<\EOF
35089 #define HAVE_UTMP_UT_SESSION 1
35090 EOF
35091
35092 fi
35093 fi
35094
35095 echo "$as_me:35095: checking if $cf_cv_have_utmp is SYSV flavor" >&5
35096 echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
35097 if test "${cf_cv_sysv_utmp+set}" = set; then
35098 echo $ECHO_N "(cached) $ECHO_C" >&6
35099 else
35100
35101 test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
35102 cat >"conftest.$ac_ext" <<_ACEOF
35103 #line 35103 "configure"
35104 #include "confdefs.h"
35105
35106 #include <sys/types.h>
35107 #include <${cf_cv_have_utmp}.h>
35108 int
35109 main (void)
35110 {
35111
35112 struct $cf_cv_have_utmp x;
35113 set${cf_prefix}ent ();
35114 get${cf_prefix}id(&x);
35115 put${cf_prefix}line(&x);
35116 end${cf_prefix}ent();
35117 ;
35118 return 0;
35119 }
35120 _ACEOF
35121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35122 if { (eval echo "$as_me:35122: \"$ac_link\"") >&5
35123 (eval $ac_link) 2>&5
35124 ac_status=$?
35125 echo "$as_me:35125: \$? = $ac_status" >&5
35126 (exit "$ac_status"); } &&
35127 { ac_try='test -s "conftest$ac_exeext"'
35128 { (eval echo "$as_me:35128: \"$ac_try\"") >&5
35129 (eval $ac_try) 2>&5
35130 ac_status=$?
35131 echo "$as_me:35131: \$? = $ac_status" >&5
35132 (exit "$ac_status"); }; }; then
35133 cf_cv_sysv_utmp=yes
35134 else
35135 echo "$as_me: failed program was:" >&5
35136 cat "conftest.$ac_ext" >&5
35137 cf_cv_sysv_utmp=no
35138 fi
35139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
35140
35141 fi
35142 echo "$as_me:35142: result: $cf_cv_sysv_utmp" >&5
35143 echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
35144 test "$cf_cv_sysv_utmp" = yes &&
35145 cat >>confdefs.h <<\EOF
35146 #define USE_SYSV_UTMP 1
35147 EOF
35148
35149 fi
35150
35151 echo "$as_me:35151: checking if external h_errno exists" >&5
35152 echo $ECHO_N "checking if external h_errno exists... $ECHO_C" >&6
35153 if test "${cf_cv_have_h_errno+set}" = set; then
35154 echo $ECHO_N "(cached) $ECHO_C" >&6
35155 else
35156
35157 cat >"conftest.$ac_ext" <<_ACEOF
35158 #line 35158 "configure"
35159 #include "confdefs.h"
35160
35161 #undef h_errno
35162 extern int h_errno;
35163
35164 int
35165 main (void)
35166 {
35167 h_errno = 2
35168 ;
35169 return 0;
35170 }
35171 _ACEOF
35172 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35173 if { (eval echo "$as_me:35173: \"$ac_link\"") >&5
35174 (eval $ac_link) 2>&5
35175 ac_status=$?
35176 echo "$as_me:35176: \$? = $ac_status" >&5
35177 (exit "$ac_status"); } &&
35178 { ac_try='test -s "conftest$ac_exeext"'
35179 { (eval echo "$as_me:35179: \"$ac_try\"") >&5
35180 (eval $ac_try) 2>&5
35181 ac_status=$?
35182 echo "$as_me:35182: \$? = $ac_status" >&5
35183 (exit "$ac_status"); }; }; then
35184 cf_cv_have_h_errno=yes
35185 else
35186 echo "$as_me: failed program was:" >&5
35187 cat "conftest.$ac_ext" >&5
35188 cf_cv_have_h_errno=no
35189 fi
35190 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
35191
35192 fi
35193 echo "$as_me:35193: result: $cf_cv_have_h_errno" >&5
35194 echo "${ECHO_T}$cf_cv_have_h_errno" >&6
35195
35196 if test "$cf_cv_have_h_errno" = yes ; then
35197
35198 cf_result=`echo "have_h_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35199
35200 cat >>confdefs.h <<EOF
35201 #define $cf_result 1
35202 EOF
35203
35204 fi
35205
35206 echo "$as_me:35206: checking if bibp: URLs should be supported" >&5
35207 echo $ECHO_N "checking if bibp: URLs should be supported... $ECHO_C" >&6
35208
35209 # Check whether --enable-bibp-urls or --disable-bibp-urls was given.
35210 if test "${enable_bibp_urls+set}" = set; then
35211 enableval="$enable_bibp_urls"
35212 test "$enableval" != no && enableval=yes
35213 if test "$enableval" != "yes" ; then
35214 use_bibp_urls=$enableval
35215 else
35216 use_bibp_urls=yes
35217 fi
35218 else
35219 enableval=yes
35220 use_bibp_urls=yes
35221
35222 fi;
35223 echo "$as_me:35223: result: $use_bibp_urls" >&5
35224 echo "${ECHO_T}$use_bibp_urls" >&6
35225 test "$use_bibp_urls" = no &&
35226 cat >>confdefs.h <<\EOF
35227 #define DISABLE_BIBP 1
35228 EOF
35229
35230 echo "$as_me:35230: checking if configuration info should be browsable" >&5
35231 echo $ECHO_N "checking if configuration info should be browsable... $ECHO_C" >&6
35232
35233 # Check whether --enable-config-info or --disable-config-info was given.
35234 if test "${enable_config_info+set}" = set; then
35235 enableval="$enable_config_info"
35236 test "$enableval" != no && enableval=yes
35237 if test "$enableval" != "yes" ; then
35238 use_config_info=$enableval
35239 else
35240 use_config_info=yes
35241 fi
35242 else
35243 enableval=yes
35244 use_config_info=yes
35245
35246 fi;
35247 echo "$as_me:35247: result: $use_config_info" >&5
35248 echo "${ECHO_T}$use_config_info" >&6
35249 test "$use_config_info" = no &&
35250 cat >>confdefs.h <<\EOF
35251 #define NO_CONFIG_INFO 1
35252 EOF
35253
35254 echo "$as_me:35254: checking if new-style forms-based options screen should be used" >&5
35255 echo $ECHO_N "checking if new-style forms-based options screen should be used... $ECHO_C" >&6
35256
35257 # Check whether --enable-forms-options or --disable-forms-options was given.
35258 if test "${enable_forms_options+set}" = set; then
35259 enableval="$enable_forms_options"
35260 test "$enableval" != no && enableval=yes
35261 if test "$enableval" != "yes" ; then
35262 use_forms_options=$enableval
35263 else
35264 use_forms_options=yes
35265 fi
35266 else
35267 enableval=yes
35268 use_forms_options=yes
35269
35270 fi;
35271 echo "$as_me:35271: result: $use_forms_options" >&5
35272 echo "${ECHO_T}$use_forms_options" >&6
35273 test "$use_forms_options" = no &&
35274 cat >>confdefs.h <<\EOF
35275 #define NO_OPTION_FORMS 1
35276 EOF
35277
35278 echo "$as_me:35278: checking if old-style options menu should be used" >&5
35279 echo $ECHO_N "checking if old-style options menu should be used... $ECHO_C" >&6
35280
35281 # Check whether --enable-menu-options or --disable-menu-options was given.
35282 if test "${enable_menu_options+set}" = set; then
35283 enableval="$enable_menu_options"
35284 test "$enableval" != no && enableval=yes
35285 if test "$enableval" != "yes" ; then
35286 use_menu_options=$enableval
35287 else
35288 use_menu_options=yes
35289 fi
35290 else
35291 enableval=yes
35292 use_menu_options=yes
35293
35294 fi;
35295 echo "$as_me:35295: result: $use_menu_options" >&5
35296 echo "${ECHO_T}$use_menu_options" >&6
35297 test "$use_menu_options" = no &&
35298 cat >>confdefs.h <<\EOF
35299 #define NO_OPTION_MENU 1
35300 EOF
35301
35302 echo "$as_me:35302: checking if sessions code should be used" >&5
35303 echo $ECHO_N "checking if sessions code should be used... $ECHO_C" >&6
35304
35305 # Check whether --enable-sessions or --disable-sessions was given.
35306 if test "${enable_sessions+set}" = set; then
35307 enableval="$enable_sessions"
35308 test "$enableval" != no && enableval=yes
35309 if test "$enableval" != "yes" ; then
35310 use_sessions=$enableval
35311 else
35312 use_sessions=yes
35313 fi
35314 else
35315 enableval=yes
35316 use_sessions=yes
35317
35318 fi;
35319 echo "$as_me:35319: result: $use_sessions" >&5
35320 echo "${ECHO_T}$use_sessions" >&6
35321 if test "$use_sessions" != no ; then
35322
35323 cat >>confdefs.h <<\EOF
35324 #define USE_SESSIONS 1
35325 EOF
35326
35327 EXTRA_OBJS="$EXTRA_OBJS LYSession\$o"
35328 fi
35329
35330 echo "$as_me:35330: checking if session-caching code should be used" >&5
35331 echo $ECHO_N "checking if session-caching code should be used... $ECHO_C" >&6
35332
35333 # Check whether --enable-session-cache or --disable-session-cache was given.
35334 if test "${enable_session_cache+set}" = set; then
35335 enableval="$enable_session_cache"
35336 test "$enableval" != no && enableval=yes
35337 if test "$enableval" != "yes" ; then
35338 use_session_cache=$enableval
35339 else
35340 use_session_cache=yes
35341 fi
35342 else
35343 enableval=yes
35344 use_session_cache=yes
35345
35346 fi;
35347 echo "$as_me:35347: result: $use_session_cache" >&5
35348 echo "${ECHO_T}$use_session_cache" >&6
35349 if test "$use_session_cache" != no ; then
35350
35351 cat >>confdefs.h <<\EOF
35352 #define USE_CACHEJAR 1
35353 EOF
35354
35355 fi
35356
35357 echo "$as_me:35357: checking if address-list page should be used" >&5
35358 echo $ECHO_N "checking if address-list page should be used... $ECHO_C" >&6
35359
35360 # Check whether --enable-addrlist-page or --disable-addrlist-page was given.
35361 if test "${enable_addrlist_page+set}" = set; then
35362 enableval="$enable_addrlist_page"
35363 test "$enableval" != no && enableval=yes
35364 if test "$enableval" != "yes" ; then
35365 use_addrlist_page=$enableval
35366 else
35367 use_addrlist_page=yes
35368 fi
35369 else
35370 enableval=yes
35371 use_addrlist_page=yes
35372
35373 fi;
35374 echo "$as_me:35374: result: $use_addrlist_page" >&5
35375 echo "${ECHO_T}$use_addrlist_page" >&6
35376 test "$use_addrlist_page" != no &&
35377 cat >>confdefs.h <<\EOF
35378 #define USE_ADDRLIST_PAGE 1
35379 EOF
35380
35381 echo "$as_me:35381: checking if support for CJK should be used" >&5
35382 echo $ECHO_N "checking if support for CJK should be used... $ECHO_C" >&6
35383
35384 # Check whether --enable-cjk or --disable-cjk was given.
35385 if test "${enable_cjk+set}" = set; then
35386 enableval="$enable_cjk"
35387 test "$enableval" != no && enableval=yes
35388 if test "$enableval" != "yes" ; then
35389 use_cjk=$enableval
35390 else
35391 use_cjk=yes
35392 fi
35393 else
35394 enableval=yes
35395 use_cjk=yes
35396
35397 fi;
35398 echo "$as_me:35398: result: $use_cjk" >&5
35399 echo "${ECHO_T}$use_cjk" >&6
35400 test "$use_cjk" != no &&
35401 cat >>confdefs.h <<\EOF
35402 #define CJK_EX 1
35403 EOF
35404
35405 use_cjk_utf8=no
35406
35407 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
35408 if test "${with_libiconv_prefix+set}" = set; then
35409 withval="$with_libiconv_prefix"
35410
35411 case "x$withval" in
35412 (xno|xyes|x)
35413 ;;
35414 (*)
35415
35416 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
35417 if test -d "$cf_searchpath/include" ; then
35418
35419 if test -n "$cf_searchpath/include" ; then
35420 for cf_add_incdir in $cf_searchpath/include
35421 do
35422 while test "$cf_add_incdir" != /usr/include
35423 do
35424 if test -d "$cf_add_incdir"
35425 then
35426 cf_have_incdir=no
35427 if test -n "$CFLAGS$CPPFLAGS" ; then
35428 # a loop is needed to ensure we can add subdirs of existing dirs
35429 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
35430 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
35431 cf_have_incdir=yes; break
35432 fi
35433 done
35434 fi
35435
35436 if test "$cf_have_incdir" = no ; then
35437 if test "$cf_add_incdir" = /usr/local/include ; then
35438 if test "$GCC" = yes
35439 then
35440 cf_save_CPPFLAGS=$CPPFLAGS
35441
35442 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
35443 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
35444
35445 cat >"conftest.$ac_ext" <<_ACEOF
35446 #line 35446 "configure"
35447 #include "confdefs.h"
35448 #include <stdio.h>
35449 int
35450 main (void)
35451 {
35452 printf("Hello")
35453 ;
35454 return 0;
35455 }
35456 _ACEOF
35457 rm -f "conftest.$ac_objext"
35458 if { (eval echo "$as_me:35458: \"$ac_compile\"") >&5
35459 (eval $ac_compile) 2>&5
35460 ac_status=$?
35461 echo "$as_me:35461: \$? = $ac_status" >&5
35462 (exit "$ac_status"); } &&
35463 { ac_try='test -s "conftest.$ac_objext"'
35464 { (eval echo "$as_me:35464: \"$ac_try\"") >&5
35465 (eval $ac_try) 2>&5
35466 ac_status=$?
35467 echo "$as_me:35467: \$? = $ac_status" >&5
35468 (exit "$ac_status"); }; }; then
35469 :
35470 else
35471 echo "$as_me: failed program was:" >&5
35472 cat "conftest.$ac_ext" >&5
35473 cf_have_incdir=yes
35474 fi
35475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35476 CPPFLAGS=$cf_save_CPPFLAGS
35477 fi
35478 fi
35479 fi
35480
35481 if test "$cf_have_incdir" = no ; then
35482 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
35483
35484 echo "${as_me:-configure}:35484: testing adding $cf_add_incdir to include-path ..." 1>&5
35485
35486 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
35487
35488 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
35489 test "$cf_top_incdir" = "$cf_add_incdir" && break
35490 cf_add_incdir="$cf_top_incdir"
35491 else
35492 break
35493 fi
35494 else
35495 break
35496 fi
35497 done
35498 done
35499 fi
35500
35501 elif test -d "$cf_searchpath/../include" ; then
35502
35503 if test -n "$cf_searchpath/../include" ; then
35504 for cf_add_incdir in $cf_searchpath/../include
35505 do
35506 while test "$cf_add_incdir" != /usr/include
35507 do
35508 if test -d "$cf_add_incdir"
35509 then
35510 cf_have_incdir=no
35511 if test -n "$CFLAGS$CPPFLAGS" ; then
35512 # a loop is needed to ensure we can add subdirs of existing dirs
35513 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
35514 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
35515 cf_have_incdir=yes; break
35516 fi
35517 done
35518 fi
35519
35520 if test "$cf_have_incdir" = no ; then
35521 if test "$cf_add_incdir" = /usr/local/include ; then
35522 if test "$GCC" = yes
35523 then
35524 cf_save_CPPFLAGS=$CPPFLAGS
35525
35526 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
35527 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
35528
35529 cat >"conftest.$ac_ext" <<_ACEOF
35530 #line 35530 "configure"
35531 #include "confdefs.h"
35532 #include <stdio.h>
35533 int
35534 main (void)
35535 {
35536 printf("Hello")
35537 ;
35538 return 0;
35539 }
35540 _ACEOF
35541 rm -f "conftest.$ac_objext"
35542 if { (eval echo "$as_me:35542: \"$ac_compile\"") >&5
35543 (eval $ac_compile) 2>&5
35544 ac_status=$?
35545 echo "$as_me:35545: \$? = $ac_status" >&5
35546 (exit "$ac_status"); } &&
35547 { ac_try='test -s "conftest.$ac_objext"'
35548 { (eval echo "$as_me:35548: \"$ac_try\"") >&5
35549 (eval $ac_try) 2>&5
35550 ac_status=$?
35551 echo "$as_me:35551: \$? = $ac_status" >&5
35552 (exit "$ac_status"); }; }; then
35553 :
35554 else
35555 echo "$as_me: failed program was:" >&5
35556 cat "conftest.$ac_ext" >&5
35557 cf_have_incdir=yes
35558 fi
35559 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35560 CPPFLAGS=$cf_save_CPPFLAGS
35561 fi
35562 fi
35563 fi
35564
35565 if test "$cf_have_incdir" = no ; then
35566 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
35567
35568 echo "${as_me:-configure}:35568: testing adding $cf_add_incdir to include-path ..." 1>&5
35569
35570 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
35571
35572 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
35573 test "$cf_top_incdir" = "$cf_add_incdir" && break
35574 cf_add_incdir="$cf_top_incdir"
35575 else
35576 break
35577 fi
35578 else
35579 break
35580 fi
35581 done
35582 done
35583 fi
35584
35585 else
35586 { { echo "$as_me:35586: error: cannot find libiconv under $withval" >&5
35587 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
35588 { (exit 1); exit 1; }; }
35589 fi
35590 if test -d "$cf_searchpath/lib" ; then
35591
35592 if test -n "$cf_searchpath/lib" ; then
35593 for cf_add_libdir in $cf_searchpath/lib
35594 do
35595 if test "$cf_add_libdir" = /usr/lib ; then
35596 :
35597 elif test -d "$cf_add_libdir"
35598 then
35599 cf_have_libdir=no
35600 if test -n "$LDFLAGS$LIBS" ; then
35601 # a loop is needed to ensure we can add subdirs of existing dirs
35602 for cf_test_libdir in $LDFLAGS $LIBS ; do
35603 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
35604 cf_have_libdir=yes; break
35605 fi
35606 done
35607 fi
35608 if test "$cf_have_libdir" = no ; then
35609 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
35610
35611 echo "${as_me:-configure}:35611: testing adding $cf_add_libdir to library-path ..." 1>&5
35612
35613 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
35614 fi
35615 fi
35616 done
35617 fi
35618
35619 elif test -d "$cf_searchpath" ; then
35620
35621 if test -n "$cf_searchpath" ; then
35622 for cf_add_libdir in $cf_searchpath
35623 do
35624 if test "$cf_add_libdir" = /usr/lib ; then
35625 :
35626 elif test -d "$cf_add_libdir"
35627 then
35628 cf_have_libdir=no
35629 if test -n "$LDFLAGS$LIBS" ; then
35630 # a loop is needed to ensure we can add subdirs of existing dirs
35631 for cf_test_libdir in $LDFLAGS $LIBS ; do
35632 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
35633 cf_have_libdir=yes; break
35634 fi
35635 done
35636 fi
35637 if test "$cf_have_libdir" = no ; then
35638 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
35639
35640 echo "${as_me:-configure}:35640: testing adding $cf_add_libdir to library-path ..." 1>&5
35641
35642 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
35643 fi
35644 fi
35645 done
35646 fi
35647
35648 else
35649 { { echo "$as_me:35649: error: cannot find libiconv under $withval" >&5
35650 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
35651 { (exit 1); exit 1; }; }
35652 fi
35653 done
35654
35655 test -n "$verbose" && echo " setting path value for libiconv to $withval" 1>&6
35656
35657 echo "${as_me:-configure}:35657: testing setting path value for libiconv to $withval ..." 1>&5
35658
35659 ;;
35660 esac
35661
35662 fi;
35663
35664 echo "$as_me:35664: checking for iconv" >&5
35665 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
35666 if test "${am_cv_func_iconv+set}" = set; then
35667 echo $ECHO_N "(cached) $ECHO_C" >&6
35668 else
35669
35670 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
35671 # will be set on completion of the AC_LINK_IFELSE below.
35672 cf_cv_header_path_iconv=
35673 cf_cv_library_path_iconv=
35674
35675 echo "${as_me:-configure}:35675: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
35676
35677 cf_save_LIBS="$LIBS"
35678
35679 cat >"conftest.$ac_ext" <<_ACEOF
35680 #line 35680 "configure"
35681 #include "confdefs.h"
35682
35683 #include <stdlib.h>
35684 #include <iconv.h>
35685
35686 int
35687 main (void)
35688 {
35689
35690 iconv_t cd = iconv_open("","");
35691 iconv(cd,NULL,NULL,NULL,NULL);
35692 iconv_close(cd);
35693
35694 ;
35695 return 0;
35696 }
35697 _ACEOF
35698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35699 if { (eval echo "$as_me:35699: \"$ac_link\"") >&5
35700 (eval $ac_link) 2>&5
35701 ac_status=$?
35702 echo "$as_me:35702: \$? = $ac_status" >&5
35703 (exit "$ac_status"); } &&
35704 { ac_try='test -s "conftest$ac_exeext"'
35705 { (eval echo "$as_me:35705: \"$ac_try\"") >&5
35706 (eval $ac_try) 2>&5
35707 ac_status=$?
35708 echo "$as_me:35708: \$? = $ac_status" >&5
35709 (exit "$ac_status"); }; }; then
35710
35711 cf_cv_find_linkage_iconv=yes
35712 cf_cv_header_path_iconv=/usr/include
35713 cf_cv_library_path_iconv=/usr/lib
35714
35715 else
35716 echo "$as_me: failed program was:" >&5
35717 cat "conftest.$ac_ext" >&5
35718
35719 LIBS="-liconv $cf_save_LIBS"
35720
35721 cat >"conftest.$ac_ext" <<_ACEOF
35722 #line 35722 "configure"
35723 #include "confdefs.h"
35724
35725 #include <stdlib.h>
35726 #include <iconv.h>
35727
35728 int
35729 main (void)
35730 {
35731
35732 iconv_t cd = iconv_open("","");
35733 iconv(cd,NULL,NULL,NULL,NULL);
35734 iconv_close(cd);
35735
35736 ;
35737 return 0;
35738 }
35739 _ACEOF
35740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35741 if { (eval echo "$as_me:35741: \"$ac_link\"") >&5
35742 (eval $ac_link) 2>&5
35743 ac_status=$?
35744 echo "$as_me:35744: \$? = $ac_status" >&5
35745 (exit "$ac_status"); } &&
35746 { ac_try='test -s "conftest$ac_exeext"'
35747 { (eval echo "$as_me:35747: \"$ac_try\"") >&5
35748 (eval $ac_try) 2>&5
35749 ac_status=$?
35750 echo "$as_me:35750: \$? = $ac_status" >&5
35751 (exit "$ac_status"); }; }; then
35752
35753 cf_cv_find_linkage_iconv=yes
35754 cf_cv_header_path_iconv=/usr/include
35755 cf_cv_library_path_iconv=/usr/lib
35756 cf_cv_library_file_iconv="-liconv"
35757
35758 else
35759 echo "$as_me: failed program was:" >&5
35760 cat "conftest.$ac_ext" >&5
35761
35762 cf_cv_find_linkage_iconv=no
35763 LIBS="$cf_save_LIBS"
35764
35765 test -n "$verbose" && echo " find linkage for iconv library" 1>&6
35766
35767 echo "${as_me:-configure}:35767: testing find linkage for iconv library ..." 1>&5
35768
35769 echo "${as_me:-configure}:35769: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
35770
35771 cf_save_CPPFLAGS="$CPPFLAGS"
35772 cf_test_CPPFLAGS="$CPPFLAGS"
35773
35774 cf_search=
35775
35776 # collect the current set of include-directories from compiler flags
35777 cf_header_path_list=""
35778 if test -n "${CFLAGS}${CPPFLAGS}" ; then
35779 for cf_header_path in $CPPFLAGS $CFLAGS
35780 do
35781 case "$cf_header_path" in
35782 (-I*)
35783 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
35784
35785 test "x$cf_header_path" != "xNONE" && \
35786 test -d "$cf_header_path" && \
35787 {
35788 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
35789 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
35790 test -d "$cf_header_path/include/iconv" && cf_search="$cf_search $cf_header_path/include/iconv"
35791 test -d "$cf_header_path/include/iconv/include" && cf_search="$cf_search $cf_header_path/include/iconv/include"
35792 test -d "$cf_header_path/iconv/include" && cf_search="$cf_search $cf_header_path/iconv/include"
35793 test -d "$cf_header_path/iconv/include/iconv" && cf_search="$cf_search $cf_header_path/iconv/include/iconv"
35794 }
35795
35796 cf_header_path_list="$cf_header_path_list $cf_search"
35797 ;;
35798 esac
35799 done
35800 fi
35801
35802 # add the variations for the package we are looking for
35803
35804 cf_search=
35805
35806 test "x$prefix" != "xNONE" && \
35807 test -d "$prefix" && \
35808 {
35809 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
35810 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
35811 test -d "$prefix/include/iconv" && cf_search="$cf_search $prefix/include/iconv"
35812 test -d "$prefix/include/iconv/include" && cf_search="$cf_search $prefix/include/iconv/include"
35813 test -d "$prefix/iconv/include" && cf_search="$cf_search $prefix/iconv/include"
35814 test -d "$prefix/iconv/include/iconv" && cf_search="$cf_search $prefix/iconv/include/iconv"
35815 }
35816
35817 for cf_subdir_prefix in \
35818 /usr \
35819 /usr/local \
35820 /usr/pkg \
35821 /opt \
35822 /opt/local \
35823 $HOME
35824 do
35825
35826 test "x$cf_subdir_prefix" != "x$prefix" && \
35827 test -d "$cf_subdir_prefix" && \
35828 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
35829 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
35830 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
35831 test -d "$cf_subdir_prefix/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/include/iconv"
35832 test -d "$cf_subdir_prefix/include/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
35833 test -d "$cf_subdir_prefix/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/iconv/include"
35834 test -d "$cf_subdir_prefix/iconv/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
35835 }
35836
35837 done
35838
35839 test "$includedir" != NONE && \
35840 test "$includedir" != "/usr/include" && \
35841 test -d "$includedir" && {
35842 test -d "$includedir" && cf_search="$cf_search $includedir"
35843 test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
35844 }
35845
35846 test "$oldincludedir" != NONE && \
35847 test "$oldincludedir" != "/usr/include" && \
35848 test -d "$oldincludedir" && {
35849 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
35850 test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
35851 }
35852
35853 cf_search="$cf_search $cf_header_path_list"
35854
35855 for cf_cv_header_path_iconv in $cf_search
35856 do
35857 if test -d "$cf_cv_header_path_iconv" ; then
35858 test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
35859
35860 echo "${as_me:-configure}:35860: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
35861
35862 CPPFLAGS="$cf_save_CPPFLAGS"
35863
35864 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
35865 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
35866
35867 cat >"conftest.$ac_ext" <<_ACEOF
35868 #line 35868 "configure"
35869 #include "confdefs.h"
35870
35871 #include <stdlib.h>
35872 #include <iconv.h>
35873
35874 int
35875 main (void)
35876 {
35877
35878 iconv_t cd = iconv_open("","");
35879 iconv(cd,NULL,NULL,NULL,NULL);
35880 iconv_close(cd);
35881
35882 ;
35883 return 0;
35884 }
35885 _ACEOF
35886 rm -f "conftest.$ac_objext"
35887 if { (eval echo "$as_me:35887: \"$ac_compile\"") >&5
35888 (eval $ac_compile) 2>&5
35889 ac_status=$?
35890 echo "$as_me:35890: \$? = $ac_status" >&5
35891 (exit "$ac_status"); } &&
35892 { ac_try='test -s "conftest.$ac_objext"'
35893 { (eval echo "$as_me:35893: \"$ac_try\"") >&5
35894 (eval $ac_try) 2>&5
35895 ac_status=$?
35896 echo "$as_me:35896: \$? = $ac_status" >&5
35897 (exit "$ac_status"); }; }; then
35898
35899 test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
35900
35901 echo "${as_me:-configure}:35901: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
35902
35903 cf_cv_find_linkage_iconv=maybe
35904 cf_test_CPPFLAGS="$CPPFLAGS"
35905 break
35906 else
35907 echo "$as_me: failed program was:" >&5
35908 cat "conftest.$ac_ext" >&5
35909
35910 CPPFLAGS="$cf_save_CPPFLAGS"
35911
35912 fi
35913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35914 fi
35915 done
35916
35917 if test "$cf_cv_find_linkage_iconv" = maybe ; then
35918
35919 echo "${as_me:-configure}:35919: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
35920
35921 cf_save_LIBS="$LIBS"
35922 cf_save_LDFLAGS="$LDFLAGS"
35923
35924 if test "$cf_cv_find_linkage_iconv" != yes ; then
35925
35926 cf_search=
35927 cf_library_path_list=""
35928 if test -n "${LDFLAGS}${LIBS}" ; then
35929 for cf_library_path in $LDFLAGS $LIBS
35930 do
35931 case "$cf_library_path" in
35932 (-L*)
35933 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
35934
35935 test "x$cf_library_path" != "xNONE" && \
35936 test -d "$cf_library_path" && \
35937 {
35938 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
35939 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
35940 test -d "$cf_library_path/lib/iconv" && cf_search="$cf_search $cf_library_path/lib/iconv"
35941 test -d "$cf_library_path/lib/iconv/lib" && cf_search="$cf_search $cf_library_path/lib/iconv/lib"
35942 test -d "$cf_library_path/iconv/lib" && cf_search="$cf_search $cf_library_path/iconv/lib"
35943 test -d "$cf_library_path/iconv/lib/iconv" && cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
35944 }
35945
35946 cf_library_path_list="$cf_library_path_list $cf_search"
35947 ;;
35948 esac
35949 done
35950 fi
35951
35952 cf_search=
35953
35954 test "x$prefix" != "xNONE" && \
35955 test -d "$prefix" && \
35956 {
35957 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
35958 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
35959 test -d "$prefix/lib/iconv" && cf_search="$cf_search $prefix/lib/iconv"
35960 test -d "$prefix/lib/iconv/lib" && cf_search="$cf_search $prefix/lib/iconv/lib"
35961 test -d "$prefix/iconv/lib" && cf_search="$cf_search $prefix/iconv/lib"
35962 test -d "$prefix/iconv/lib/iconv" && cf_search="$cf_search $prefix/iconv/lib/iconv"
35963 }
35964
35965 for cf_subdir_prefix in \
35966 /usr \
35967 /usr/local \
35968 /usr/pkg \
35969 /opt \
35970 /opt/local \
35971 $HOME
35972 do
35973
35974 test "x$cf_subdir_prefix" != "x$prefix" && \
35975 test -d "$cf_subdir_prefix" && \
35976 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
35977 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
35978 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
35979 test -d "$cf_subdir_prefix/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
35980 test -d "$cf_subdir_prefix/lib/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
35981 test -d "$cf_subdir_prefix/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
35982 test -d "$cf_subdir_prefix/iconv/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
35983 }
35984
35985 done
35986
35987 cf_search="$cf_library_path_list $cf_search"
35988
35989 for cf_cv_library_path_iconv in $cf_search
35990 do
35991 if test -d "$cf_cv_library_path_iconv" ; then
35992 test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
35993
35994 echo "${as_me:-configure}:35994: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
35995
35996 CPPFLAGS="$cf_test_CPPFLAGS"
35997 LIBS="-liconv $cf_save_LIBS"
35998 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
35999 cat >"conftest.$ac_ext" <<_ACEOF
36000 #line 36000 "configure"
36001 #include "confdefs.h"
36002
36003 #include <stdlib.h>
36004 #include <iconv.h>
36005
36006 int
36007 main (void)
36008 {
36009
36010 iconv_t cd = iconv_open("","");
36011 iconv(cd,NULL,NULL,NULL,NULL);
36012 iconv_close(cd);
36013
36014 ;
36015 return 0;
36016 }
36017 _ACEOF
36018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
36019 if { (eval echo "$as_me:36019: \"$ac_link\"") >&5
36020 (eval $ac_link) 2>&5
36021 ac_status=$?
36022 echo "$as_me:36022: \$? = $ac_status" >&5
36023 (exit "$ac_status"); } &&
36024 { ac_try='test -s "conftest$ac_exeext"'
36025 { (eval echo "$as_me:36025: \"$ac_try\"") >&5
36026 (eval $ac_try) 2>&5
36027 ac_status=$?
36028 echo "$as_me:36028: \$? = $ac_status" >&5
36029 (exit "$ac_status"); }; }; then
36030
36031 test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
36032
36033 echo "${as_me:-configure}:36033: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
36034
36035 cf_cv_find_linkage_iconv=yes
36036 cf_cv_library_file_iconv="-liconv"
36037 break
36038 else
36039 echo "$as_me: failed program was:" >&5
36040 cat "conftest.$ac_ext" >&5
36041
36042 CPPFLAGS="$cf_save_CPPFLAGS"
36043 LIBS="$cf_save_LIBS"
36044 LDFLAGS="$cf_save_LDFLAGS"
36045
36046 fi
36047 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
36048 fi
36049 done
36050 CPPFLAGS="$cf_save_CPPFLAGS"
36051 LDFLAGS="$cf_save_LDFLAGS"
36052 fi
36053
36054 else
36055 cf_cv_find_linkage_iconv=no
36056 fi
36057
36058 fi
36059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
36060
36061 fi
36062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
36063
36064 LIBS="$cf_save_LIBS"
36065
36066 if test "$cf_cv_find_linkage_iconv" = yes ; then
36067 am_cv_func_iconv=yes
36068 else
36069 am_cv_func_iconv="no, consider installing GNU libiconv"
36070 fi
36071
36072 fi
36073 echo "$as_me:36073: result: $am_cv_func_iconv" >&5
36074 echo "${ECHO_T}$am_cv_func_iconv" >&6
36075
36076 if test "$am_cv_func_iconv" = yes; then
36077
36078 cat >>confdefs.h <<\EOF
36079 #define HAVE_ICONV 1
36080 EOF
36081
36082 echo "$as_me:36082: checking if the declaration of iconv() needs const." >&5
36083 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
36084 if test "${am_cv_proto_iconv_const+set}" = set; then
36085 echo $ECHO_N "(cached) $ECHO_C" >&6
36086 else
36087
36088 cat >"conftest.$ac_ext" <<_ACEOF
36089 #line 36089 "configure"
36090 #include "confdefs.h"
36091
36092 #include <stdlib.h>
36093 #include <iconv.h>
36094
36095 extern
36096 #ifdef __cplusplus
36097 "C"
36098 #endif
36099 #if defined(__STDC__) || defined(__cplusplus)
36100 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
36101 #else
36102 size_t iconv();
36103 #endif
36104
36105 int
36106 main (void)
36107 {
36108
36109 ;
36110 return 0;
36111 }
36112 _ACEOF
36113 rm -f "conftest.$ac_objext"
36114 if { (eval echo "$as_me:36114: \"$ac_compile\"") >&5
36115 (eval $ac_compile) 2>&5
36116 ac_status=$?
36117 echo "$as_me:36117: \$? = $ac_status" >&5
36118 (exit "$ac_status"); } &&
36119 { ac_try='test -s "conftest.$ac_objext"'
36120 { (eval echo "$as_me:36120: \"$ac_try\"") >&5
36121 (eval $ac_try) 2>&5
36122 ac_status=$?
36123 echo "$as_me:36123: \$? = $ac_status" >&5
36124 (exit "$ac_status"); }; }; then
36125 am_cv_proto_iconv_const=no
36126 else
36127 echo "$as_me: failed program was:" >&5
36128 cat "conftest.$ac_ext" >&5
36129 am_cv_proto_iconv_const=yes
36130 fi
36131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36132 fi
36133 echo "$as_me:36133: result: $am_cv_proto_iconv_const" >&5
36134 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
36135
36136 if test "$am_cv_proto_iconv_const" = yes ; then
36137 am_cv_proto_iconv_arg1="const"
36138 else
36139 am_cv_proto_iconv_arg1="/* nothing */"
36140 fi
36141
36142 cat >>confdefs.h <<EOF
36143 #define ICONV_CONST $am_cv_proto_iconv_arg1
36144 EOF
36145
36146 fi
36147
36148 LIBICONV=
36149 if test "$cf_cv_find_linkage_iconv" = yes; then
36150
36151 if test -n "$cf_cv_header_path_iconv" ; then
36152 for cf_add_incdir in $cf_cv_header_path_iconv
36153 do
36154 while test "$cf_add_incdir" != /usr/include
36155 do
36156 if test -d "$cf_add_incdir"
36157 then
36158 cf_have_incdir=no
36159 if test -n "$CFLAGS$CPPFLAGS" ; then
36160 # a loop is needed to ensure we can add subdirs of existing dirs
36161 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
36162 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
36163 cf_have_incdir=yes; break
36164 fi
36165 done
36166 fi
36167
36168 if test "$cf_have_incdir" = no ; then
36169 if test "$cf_add_incdir" = /usr/local/include ; then
36170 if test "$GCC" = yes
36171 then
36172 cf_save_CPPFLAGS=$CPPFLAGS
36173
36174 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
36175 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
36176
36177 cat >"conftest.$ac_ext" <<_ACEOF
36178 #line 36178 "configure"
36179 #include "confdefs.h"
36180 #include <stdio.h>
36181 int
36182 main (void)
36183 {
36184 printf("Hello")
36185 ;
36186 return 0;
36187 }
36188 _ACEOF
36189 rm -f "conftest.$ac_objext"
36190 if { (eval echo "$as_me:36190: \"$ac_compile\"") >&5
36191 (eval $ac_compile) 2>&5
36192 ac_status=$?
36193 echo "$as_me:36193: \$? = $ac_status" >&5
36194 (exit "$ac_status"); } &&
36195 { ac_try='test -s "conftest.$ac_objext"'
36196 { (eval echo "$as_me:36196: \"$ac_try\"") >&5
36197 (eval $ac_try) 2>&5
36198 ac_status=$?
36199 echo "$as_me:36199: \$? = $ac_status" >&5
36200 (exit "$ac_status"); }; }; then
36201 :
36202 else
36203 echo "$as_me: failed program was:" >&5
36204 cat "conftest.$ac_ext" >&5
36205 cf_have_incdir=yes
36206 fi
36207 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36208 CPPFLAGS=$cf_save_CPPFLAGS
36209 fi
36210 fi
36211 fi
36212
36213 if test "$cf_have_incdir" = no ; then
36214 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
36215
36216 echo "${as_me:-configure}:36216: testing adding $cf_add_incdir to include-path ..." 1>&5
36217
36218 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
36219
36220 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
36221 test "$cf_top_incdir" = "$cf_add_incdir" && break
36222 cf_add_incdir="$cf_top_incdir"
36223 else
36224 break
36225 fi
36226 else
36227 break
36228 fi
36229 done
36230 done
36231 fi
36232
36233 if test -n "$cf_cv_library_file_iconv" ; then
36234 LIBICONV="-liconv"
36235
36236 if test -n "$cf_cv_library_path_iconv" ; then
36237 for cf_add_libdir in $cf_cv_library_path_iconv
36238 do
36239 if test "$cf_add_libdir" = /usr/lib ; then
36240 :
36241 elif test -d "$cf_add_libdir"
36242 then
36243 cf_have_libdir=no
36244 if test -n "$LDFLAGS$LIBS" ; then
36245 # a loop is needed to ensure we can add subdirs of existing dirs
36246 for cf_test_libdir in $LDFLAGS $LIBS ; do
36247 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
36248 cf_have_libdir=yes; break
36249 fi
36250 done
36251 fi
36252 if test "$cf_have_libdir" = no ; then
36253 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
36254
36255 echo "${as_me:-configure}:36255: testing adding $cf_add_libdir to library-path ..." 1>&5
36256
36257 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
36258 fi
36259 fi
36260 done
36261 fi
36262
36263 fi
36264 fi
36265
36266 if test "x$am_cv_func_iconv" = "xyes"
36267 then
36268
36269 echo "$as_me:36269: checking if experimental support for Chinese UTF-8 should be used" >&5
36270 echo $ECHO_N "checking if experimental support for Chinese UTF-8 should be used... $ECHO_C" >&6
36271
36272 # Check whether --enable-chinese-utf8 or --disable-chinese-utf8 was given.
36273 if test "${enable_chinese_utf8+set}" = set; then
36274 enableval="$enable_chinese_utf8"
36275 test "$enableval" != yes && enableval=no
36276 if test "$enableval" != "no" ; then
36277 use_cn_utf8=$enableval
36278 else
36279 use_cn_utf8=yes
36280 fi
36281 else
36282 enableval=no
36283 use_cn_utf8=yes
36284
36285 fi;
36286 echo "$as_me:36286: result: $use_cn_utf8" >&5
36287 echo "${ECHO_T}$use_cn_utf8" >&6
36288 if test "$use_cn_utf8" != no ; then
36289
36290 cat >>confdefs.h <<\EOF
36291 #define EXP_CHINESEUTF8_SUPPORT 1
36292 EOF
36293
36294 use_cjk_utf8=yes
36295 fi
36296
36297 echo "$as_me:36297: checking if support for Japanese UTF-8 should be used" >&5
36298 echo $ECHO_N "checking if support for Japanese UTF-8 should be used... $ECHO_C" >&6
36299
36300 # Check whether --enable-japanese-utf8 or --disable-japanese-utf8 was given.
36301 if test "${enable_japanese_utf8+set}" = set; then
36302 enableval="$enable_japanese_utf8"
36303 test "$enableval" != no && enableval=yes
36304 if test "$enableval" != "yes" ; then
36305 use_ja_utf8=$enableval
36306 else
36307 use_ja_utf8=yes
36308 fi
36309 else
36310 enableval=yes
36311 use_ja_utf8=yes
36312
36313 fi;
36314 echo "$as_me:36314: result: $use_ja_utf8" >&5
36315 echo "${ECHO_T}$use_ja_utf8" >&6
36316 if test "$use_ja_utf8" != no ; then
36317
36318 cat >>confdefs.h <<\EOF
36319 #define USE_JAPANESEUTF8_SUPPORT 1
36320 EOF
36321
36322 use_cjk_utf8=yes
36323 fi
36324
36325 if test $use_cjk_utf8 = yes
36326 then
36327 if test "$USE_NLS" != yes ; then
36328 LIBS="$LIBICONV $LIBS"
36329 fi
36330 fi
36331
36332 else
36333 test -n "$verbose" && echo " skipping CJK features which depend on iconv" 1>&6
36334
36335 echo "${as_me:-configure}:36335: testing skipping CJK features which depend on iconv ..." 1>&5
36336
36337 fi
36338
36339 use_dft_colors=no
36340 case "$cf_cv_screen" in
36341 (curses|slang|ncurses*)
36342 use_dft_colors=maybe
36343 ;;
36344 esac
36345
36346 if test "$use_dft_colors" != no ; then
36347 echo "$as_me:36347: checking if you want to use default-colors" >&5
36348 echo $ECHO_N "checking if you want to use default-colors... $ECHO_C" >&6
36349
36350 # Check whether --enable-default-colors or --disable-default-colors was given.
36351 if test "${enable_default_colors+set}" = set; then
36352 enableval="$enable_default_colors"
36353 test "$enableval" != yes && enableval=no
36354 if test "$enableval" != "no" ; then
36355 use_dft_colors=yes
36356 else
36357 use_dft_colors=no
36358 fi
36359 else
36360 enableval=no
36361 use_dft_colors=no
36362
36363 fi;
36364 echo "$as_me:36364: result: $use_dft_colors" >&5
36365 echo "${ECHO_T}$use_dft_colors" >&6
36366 test "$use_dft_colors" = "yes" &&
36367 cat >>confdefs.h <<\EOF
36368 #define USE_DEFAULT_COLORS 1
36369 EOF
36370
36371 fi
36372
36373 echo "$as_me:36373: checking if experimental keyboard-layout logic should be used" >&5
36374 echo $ECHO_N "checking if experimental keyboard-layout logic should be used... $ECHO_C" >&6
36375
36376 # Check whether --enable-kbd-layout or --disable-kbd-layout was given.
36377 if test "${enable_kbd_layout+set}" = set; then
36378 enableval="$enable_kbd_layout"
36379 test "$enableval" != yes && enableval=no
36380 if test "$enableval" != "no" ; then
36381 use_kbd_layout=$enableval
36382 else
36383 use_kbd_layout=no
36384 fi
36385 else
36386 enableval=no
36387 use_kbd_layout=no
36388
36389 fi;
36390 echo "$as_me:36390: result: $use_kbd_layout" >&5
36391 echo "${ECHO_T}$use_kbd_layout" >&6
36392 test "$use_kbd_layout" != no &&
36393 cat >>confdefs.h <<\EOF
36394 #define EXP_KEYBOARD_LAYOUT 1
36395 EOF
36396
36397 echo "$as_me:36397: checking if experimental nested-table logic should be used" >&5
36398 echo $ECHO_N "checking if experimental nested-table logic should be used... $ECHO_C" >&6
36399
36400 # Check whether --enable-nested-tables or --disable-nested-tables was given.
36401 if test "${enable_nested_tables+set}" = set; then
36402 enableval="$enable_nested_tables"
36403 test "$enableval" != yes && enableval=no
36404 if test "$enableval" != "no" ; then
36405 use_nested_tables=$enableval
36406 else
36407 use_nested_tables=no
36408 fi
36409 else
36410 enableval=no
36411 use_nested_tables=no
36412
36413 fi;
36414 echo "$as_me:36414: result: $use_nested_tables" >&5
36415 echo "${ECHO_T}$use_nested_tables" >&6
36416 test "$use_nested_tables" != no &&
36417 cat >>confdefs.h <<\EOF
36418 #define EXP_NESTED_TABLES 1
36419 EOF
36420
36421 echo "$as_me:36421: checking if alternative line-edit bindings should be used" >&5
36422 echo $ECHO_N "checking if alternative line-edit bindings should be used... $ECHO_C" >&6
36423
36424 # Check whether --enable-alt-bindings or --disable-alt-bindings was given.
36425 if test "${enable_alt_bindings+set}" = set; then
36426 enableval="$enable_alt_bindings"
36427 test "$enableval" != no && enableval=yes
36428 if test "$enableval" != "yes" ; then
36429 use_alt_bindings=$enableval
36430 else
36431 use_alt_bindings=yes
36432 fi
36433 else
36434 enableval=yes
36435 use_alt_bindings=yes
36436
36437 fi;
36438 echo "$as_me:36438: result: $use_alt_bindings" >&5
36439 echo "${ECHO_T}$use_alt_bindings" >&6
36440 test "$use_alt_bindings" != no &&
36441 cat >>confdefs.h <<\EOF
36442 #define USE_ALT_BINDINGS 1
36443 EOF
36444
36445 echo "$as_me:36445: checking if ascii case-conversion should be used" >&5
36446 echo $ECHO_N "checking if ascii case-conversion should be used... $ECHO_C" >&6
36447
36448 # Check whether --enable-ascii-ctypes or --disable-ascii-ctypes was given.
36449 if test "${enable_ascii_ctypes+set}" = set; then
36450 enableval="$enable_ascii_ctypes"
36451 test "$enableval" != no && enableval=yes
36452 if test "$enableval" != "yes" ; then
36453 use_ascii_ctypes=$enableval
36454 else
36455 use_ascii_ctypes=yes
36456 fi
36457 else
36458 enableval=yes
36459 use_ascii_ctypes=yes
36460
36461 fi;
36462 echo "$as_me:36462: result: $use_ascii_ctypes" >&5
36463 echo "${ECHO_T}$use_ascii_ctypes" >&6
36464 test "$use_ascii_ctypes" != no &&
36465 cat >>confdefs.h <<\EOF
36466 #define USE_ASCII_CTYPES 1
36467 EOF
36468
36469 echo "$as_me:36469: checking if you want to use extended HTML DTD logic" >&5
36470 echo $ECHO_N "checking if you want to use extended HTML DTD logic... $ECHO_C" >&6
36471
36472 # Check whether --enable-extended-dtd or --disable-extended-dtd was given.
36473 if test "${enable_extended_dtd+set}" = set; then
36474 enableval="$enable_extended_dtd"
36475 test "$enableval" != no && enableval=yes
36476 if test "$enableval" != "yes" ; then
36477 use_ext_htmldtd=no
36478 else
36479 use_ext_htmldtd=yes
36480 fi
36481 else
36482 enableval=yes
36483 use_ext_htmldtd=yes
36484
36485 fi;
36486 echo "$as_me:36486: result: $use_ext_htmldtd" >&5
36487 echo "${ECHO_T}$use_ext_htmldtd" >&6
36488 test "$use_ext_htmldtd" = "no" &&
36489 cat >>confdefs.h <<\EOF
36490 #define NO_EXTENDED_HTMLDTD 1
36491 EOF
36492
36493 echo "$as_me:36493: checking if file-upload logic should be used" >&5
36494 echo $ECHO_N "checking if file-upload logic should be used... $ECHO_C" >&6
36495
36496 # Check whether --enable-file-upload or --disable-file-upload was given.
36497 if test "${enable_file_upload+set}" = set; then
36498 enableval="$enable_file_upload"
36499 test "$enableval" != no && enableval=yes
36500 if test "$enableval" != "yes" ; then
36501 use_file_upload=$enableval
36502 else
36503 use_file_upload=yes
36504 fi
36505 else
36506 enableval=yes
36507 use_file_upload=yes
36508
36509 fi;
36510 echo "$as_me:36510: result: $use_file_upload" >&5
36511 echo "${ECHO_T}$use_file_upload" >&6
36512 test "$use_file_upload" != no &&
36513 cat >>confdefs.h <<\EOF
36514 #define USE_FILE_UPLOAD 1
36515 EOF
36516
36517 echo "$as_me:36517: checking if IDNA support should be used" >&5
36518 echo $ECHO_N "checking if IDNA support should be used... $ECHO_C" >&6
36519
36520 # Check whether --enable-idna or --disable-idna was given.
36521 if test "${enable_idna+set}" = set; then
36522 enableval="$enable_idna"
36523 test "$enableval" != no && enableval=yes
36524 if test "$enableval" != "yes" ; then
36525 use_idna=$enableval
36526 else
36527 use_idna=yes
36528 fi
36529 else
36530 enableval=yes
36531 use_idna=yes
36532
36533 fi;
36534 echo "$as_me:36534: result: $use_idna" >&5
36535 echo "${ECHO_T}$use_idna" >&6
36536
36537 if test "$use_idna" = yes ; then
36538
36539 case "x$use_idna" in
36540 (xno|xyes|x)
36541 ;;
36542 (*)
36543
36544 for cf_searchpath in `echo "$use_idna" | tr $PATH_SEPARATOR ' '`; do
36545 if test -d "$cf_searchpath/include" ; then
36546
36547 if test -n "$cf_searchpath/include" ; then
36548 for cf_add_incdir in $cf_searchpath/include
36549 do
36550 while test "$cf_add_incdir" != /usr/include
36551 do
36552 if test -d "$cf_add_incdir"
36553 then
36554 cf_have_incdir=no
36555 if test -n "$CFLAGS$CPPFLAGS" ; then
36556 # a loop is needed to ensure we can add subdirs of existing dirs
36557 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
36558 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
36559 cf_have_incdir=yes; break
36560 fi
36561 done
36562 fi
36563
36564 if test "$cf_have_incdir" = no ; then
36565 if test "$cf_add_incdir" = /usr/local/include ; then
36566 if test "$GCC" = yes
36567 then
36568 cf_save_CPPFLAGS=$CPPFLAGS
36569
36570 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
36571 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
36572
36573 cat >"conftest.$ac_ext" <<_ACEOF
36574 #line 36574 "configure"
36575 #include "confdefs.h"
36576 #include <stdio.h>
36577 int
36578 main (void)
36579 {
36580 printf("Hello")
36581 ;
36582 return 0;
36583 }
36584 _ACEOF
36585 rm -f "conftest.$ac_objext"
36586 if { (eval echo "$as_me:36586: \"$ac_compile\"") >&5
36587 (eval $ac_compile) 2>&5
36588 ac_status=$?
36589 echo "$as_me:36589: \$? = $ac_status" >&5
36590 (exit "$ac_status"); } &&
36591 { ac_try='test -s "conftest.$ac_objext"'
36592 { (eval echo "$as_me:36592: \"$ac_try\"") >&5
36593 (eval $ac_try) 2>&5
36594 ac_status=$?
36595 echo "$as_me:36595: \$? = $ac_status" >&5
36596 (exit "$ac_status"); }; }; then
36597 :
36598 else
36599 echo "$as_me: failed program was:" >&5
36600 cat "conftest.$ac_ext" >&5
36601 cf_have_incdir=yes
36602 fi
36603 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36604 CPPFLAGS=$cf_save_CPPFLAGS
36605 fi
36606 fi
36607 fi
36608
36609 if test "$cf_have_incdir" = no ; then
36610 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
36611
36612 echo "${as_me:-configure}:36612: testing adding $cf_add_incdir to include-path ..." 1>&5
36613
36614 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
36615
36616 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
36617 test "$cf_top_incdir" = "$cf_add_incdir" && break
36618 cf_add_incdir="$cf_top_incdir"
36619 else
36620 break
36621 fi
36622 else
36623 break
36624 fi
36625 done
36626 done
36627 fi
36628
36629 elif test -d "$cf_searchpath/../include" ; then
36630
36631 if test -n "$cf_searchpath/../include" ; then
36632 for cf_add_incdir in $cf_searchpath/../include
36633 do
36634 while test "$cf_add_incdir" != /usr/include
36635 do
36636 if test -d "$cf_add_incdir"
36637 then
36638 cf_have_incdir=no
36639 if test -n "$CFLAGS$CPPFLAGS" ; then
36640 # a loop is needed to ensure we can add subdirs of existing dirs
36641 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
36642 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
36643 cf_have_incdir=yes; break
36644 fi
36645 done
36646 fi
36647
36648 if test "$cf_have_incdir" = no ; then
36649 if test "$cf_add_incdir" = /usr/local/include ; then
36650 if test "$GCC" = yes
36651 then
36652 cf_save_CPPFLAGS=$CPPFLAGS
36653
36654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
36655 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
36656
36657 cat >"conftest.$ac_ext" <<_ACEOF
36658 #line 36658 "configure"
36659 #include "confdefs.h"
36660 #include <stdio.h>
36661 int
36662 main (void)
36663 {
36664 printf("Hello")
36665 ;
36666 return 0;
36667 }
36668 _ACEOF
36669 rm -f "conftest.$ac_objext"
36670 if { (eval echo "$as_me:36670: \"$ac_compile\"") >&5
36671 (eval $ac_compile) 2>&5
36672 ac_status=$?
36673 echo "$as_me:36673: \$? = $ac_status" >&5
36674 (exit "$ac_status"); } &&
36675 { ac_try='test -s "conftest.$ac_objext"'
36676 { (eval echo "$as_me:36676: \"$ac_try\"") >&5
36677 (eval $ac_try) 2>&5
36678 ac_status=$?
36679 echo "$as_me:36679: \$? = $ac_status" >&5
36680 (exit "$ac_status"); }; }; then
36681 :
36682 else
36683 echo "$as_me: failed program was:" >&5
36684 cat "conftest.$ac_ext" >&5
36685 cf_have_incdir=yes
36686 fi
36687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36688 CPPFLAGS=$cf_save_CPPFLAGS
36689 fi
36690 fi
36691 fi
36692
36693 if test "$cf_have_incdir" = no ; then
36694 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
36695
36696 echo "${as_me:-configure}:36696: testing adding $cf_add_incdir to include-path ..." 1>&5
36697
36698 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
36699
36700 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
36701 test "$cf_top_incdir" = "$cf_add_incdir" && break
36702 cf_add_incdir="$cf_top_incdir"
36703 else
36704 break
36705 fi
36706 else
36707 break
36708 fi
36709 done
36710 done
36711 fi
36712
36713 else
36714 { { echo "$as_me:36714: error: cannot find idna library under $use_idna" >&5
36715 echo "$as_me: error: cannot find idna library under $use_idna" >&2;}
36716 { (exit 1); exit 1; }; }
36717 fi
36718 if test -d "$cf_searchpath/lib" ; then
36719
36720 if test -n "$cf_searchpath/lib" ; then
36721 for cf_add_libdir in $cf_searchpath/lib
36722 do
36723 if test "$cf_add_libdir" = /usr/lib ; then
36724 :
36725 elif test -d "$cf_add_libdir"
36726 then
36727 cf_have_libdir=no
36728 if test -n "$LDFLAGS$LIBS" ; then
36729 # a loop is needed to ensure we can add subdirs of existing dirs
36730 for cf_test_libdir in $LDFLAGS $LIBS ; do
36731 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
36732 cf_have_libdir=yes; break
36733 fi
36734 done
36735 fi
36736 if test "$cf_have_libdir" = no ; then
36737 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
36738
36739 echo "${as_me:-configure}:36739: testing adding $cf_add_libdir to library-path ..." 1>&5
36740
36741 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
36742 fi
36743 fi
36744 done
36745 fi
36746
36747 elif test -d "$cf_searchpath" ; then
36748
36749 if test -n "$cf_searchpath" ; then
36750 for cf_add_libdir in $cf_searchpath
36751 do
36752 if test "$cf_add_libdir" = /usr/lib ; then
36753 :
36754 elif test -d "$cf_add_libdir"
36755 then
36756 cf_have_libdir=no
36757 if test -n "$LDFLAGS$LIBS" ; then
36758 # a loop is needed to ensure we can add subdirs of existing dirs
36759 for cf_test_libdir in $LDFLAGS $LIBS ; do
36760 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
36761 cf_have_libdir=yes; break
36762 fi
36763 done
36764 fi
36765 if test "$cf_have_libdir" = no ; then
36766 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
36767
36768 echo "${as_me:-configure}:36768: testing adding $cf_add_libdir to library-path ..." 1>&5
36769
36770 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
36771 fi
36772 fi
36773 done
36774 fi
36775
36776 else
36777 { { echo "$as_me:36777: error: cannot find idna library under $use_idna" >&5
36778 echo "$as_me: error: cannot find idna library under $use_idna" >&2;}
36779 { (exit 1); exit 1; }; }
36780 fi
36781 done
36782
36783 test -n "$verbose" && echo " setting path value for idna library to $use_idna" 1>&6
36784
36785 echo "${as_me:-configure}:36785: testing setting path value for idna library to $use_idna ..." 1>&5
36786
36787 ;;
36788 esac
36789
36790 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
36791 # will be set on completion of the AC_LINK_IFELSE below.
36792 cf_cv_header_path_idn2=
36793 cf_cv_library_path_idn2=
36794
36795 echo "${as_me:-configure}:36795: testing Starting FIND_LINKAGE(idn2,) ..." 1>&5
36796
36797 cf_save_LIBS="$LIBS"
36798
36799 cat >"conftest.$ac_ext" <<_ACEOF
36800 #line 36800 "configure"
36801 #include "confdefs.h"
36802
36803 $ac_includes_default
36804 #include <idn2.h>
36805
36806 int
36807 main (void)
36808 {
36809
36810 char *output = (char*)0;
36811 int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
36812 (void) code;
36813
36814 ;
36815 return 0;
36816 }
36817 _ACEOF
36818 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
36819 if { (eval echo "$as_me:36819: \"$ac_link\"") >&5
36820 (eval $ac_link) 2>&5
36821 ac_status=$?
36822 echo "$as_me:36822: \$? = $ac_status" >&5
36823 (exit "$ac_status"); } &&
36824 { ac_try='test -s "conftest$ac_exeext"'
36825 { (eval echo "$as_me:36825: \"$ac_try\"") >&5
36826 (eval $ac_try) 2>&5
36827 ac_status=$?
36828 echo "$as_me:36828: \$? = $ac_status" >&5
36829 (exit "$ac_status"); }; }; then
36830
36831 cf_cv_find_linkage_idn2=yes
36832 cf_cv_header_path_idn2=/usr/include
36833 cf_cv_library_path_idn2=/usr/lib
36834
36835 else
36836 echo "$as_me: failed program was:" >&5
36837 cat "conftest.$ac_ext" >&5
36838
36839 LIBS="-lidn2 $LIBICONV $cf_save_LIBS"
36840
36841 cat >"conftest.$ac_ext" <<_ACEOF
36842 #line 36842 "configure"
36843 #include "confdefs.h"
36844
36845 $ac_includes_default
36846 #include <idn2.h>
36847
36848 int
36849 main (void)
36850 {
36851
36852 char *output = (char*)0;
36853 int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
36854 (void) code;
36855
36856 ;
36857 return 0;
36858 }
36859 _ACEOF
36860 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
36861 if { (eval echo "$as_me:36861: \"$ac_link\"") >&5
36862 (eval $ac_link) 2>&5
36863 ac_status=$?
36864 echo "$as_me:36864: \$? = $ac_status" >&5
36865 (exit "$ac_status"); } &&
36866 { ac_try='test -s "conftest$ac_exeext"'
36867 { (eval echo "$as_me:36867: \"$ac_try\"") >&5
36868 (eval $ac_try) 2>&5
36869 ac_status=$?
36870 echo "$as_me:36870: \$? = $ac_status" >&5
36871 (exit "$ac_status"); }; }; then
36872
36873 cf_cv_find_linkage_idn2=yes
36874 cf_cv_header_path_idn2=/usr/include
36875 cf_cv_library_path_idn2=/usr/lib
36876 cf_cv_library_file_idn2="-lidn2"
36877
36878 else
36879 echo "$as_me: failed program was:" >&5
36880 cat "conftest.$ac_ext" >&5
36881
36882 cf_cv_find_linkage_idn2=no
36883 LIBS="$cf_save_LIBS"
36884
36885 test -n "$verbose" && echo " find linkage for idn2 library" 1>&6
36886
36887 echo "${as_me:-configure}:36887: testing find linkage for idn2 library ..." 1>&5
36888
36889 echo "${as_me:-configure}:36889: testing Searching for headers in FIND_LINKAGE(idn2,) ..." 1>&5
36890
36891 cf_save_CPPFLAGS="$CPPFLAGS"
36892 cf_test_CPPFLAGS="$CPPFLAGS"
36893
36894 cf_search=
36895
36896 # collect the current set of include-directories from compiler flags
36897 cf_header_path_list=""
36898 if test -n "${CFLAGS}${CPPFLAGS}" ; then
36899 for cf_header_path in $CPPFLAGS $CFLAGS
36900 do
36901 case "$cf_header_path" in
36902 (-I*)
36903 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
36904
36905 test "x$cf_header_path" != "xNONE" && \
36906 test -d "$cf_header_path" && \
36907 {
36908 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
36909 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
36910 test -d "$cf_header_path/include/idn2" && cf_search="$cf_search $cf_header_path/include/idn2"
36911 test -d "$cf_header_path/include/idn2/include" && cf_search="$cf_search $cf_header_path/include/idn2/include"
36912 test -d "$cf_header_path/idn2/include" && cf_search="$cf_search $cf_header_path/idn2/include"
36913 test -d "$cf_header_path/idn2/include/idn2" && cf_search="$cf_search $cf_header_path/idn2/include/idn2"
36914 }
36915
36916 cf_header_path_list="$cf_header_path_list $cf_search"
36917 ;;
36918 esac
36919 done
36920 fi
36921
36922 # add the variations for the package we are looking for
36923
36924 cf_search=
36925
36926 test "x$prefix" != "xNONE" && \
36927 test -d "$prefix" && \
36928 {
36929 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
36930 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
36931 test -d "$prefix/include/idn2" && cf_search="$cf_search $prefix/include/idn2"
36932 test -d "$prefix/include/idn2/include" && cf_search="$cf_search $prefix/include/idn2/include"
36933 test -d "$prefix/idn2/include" && cf_search="$cf_search $prefix/idn2/include"
36934 test -d "$prefix/idn2/include/idn2" && cf_search="$cf_search $prefix/idn2/include/idn2"
36935 }
36936
36937 for cf_subdir_prefix in \
36938 /usr \
36939 /usr/local \
36940 /usr/pkg \
36941 /opt \
36942 /opt/local \
36943 $HOME
36944 do
36945
36946 test "x$cf_subdir_prefix" != "x$prefix" && \
36947 test -d "$cf_subdir_prefix" && \
36948 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
36949 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
36950 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
36951 test -d "$cf_subdir_prefix/include/idn2" && cf_search="$cf_search $cf_subdir_prefix/include/idn2"
36952 test -d "$cf_subdir_prefix/include/idn2/include" && cf_search="$cf_search $cf_subdir_prefix/include/idn2/include"
36953 test -d "$cf_subdir_prefix/idn2/include" && cf_search="$cf_search $cf_subdir_prefix/idn2/include"
36954 test -d "$cf_subdir_prefix/idn2/include/idn2" && cf_search="$cf_search $cf_subdir_prefix/idn2/include/idn2"
36955 }
36956
36957 done
36958
36959 test "$includedir" != NONE && \
36960 test "$includedir" != "/usr/include" && \
36961 test -d "$includedir" && {
36962 test -d "$includedir" && cf_search="$cf_search $includedir"
36963 test -d "$includedir/idn2" && cf_search="$cf_search $includedir/idn2"
36964 }
36965
36966 test "$oldincludedir" != NONE && \
36967 test "$oldincludedir" != "/usr/include" && \
36968 test -d "$oldincludedir" && {
36969 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
36970 test -d "$oldincludedir/idn2" && cf_search="$cf_search $oldincludedir/idn2"
36971 }
36972
36973 cf_search="$cf_search $cf_header_path_list"
36974
36975 for cf_cv_header_path_idn2 in $cf_search
36976 do
36977 if test -d "$cf_cv_header_path_idn2" ; then
36978 test -n "$verbose" && echo " ... testing $cf_cv_header_path_idn2" 1>&6
36979
36980 echo "${as_me:-configure}:36980: testing ... testing $cf_cv_header_path_idn2 ..." 1>&5
36981
36982 CPPFLAGS="$cf_save_CPPFLAGS"
36983
36984 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
36985 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_idn2"
36986
36987 cat >"conftest.$ac_ext" <<_ACEOF
36988 #line 36988 "configure"
36989 #include "confdefs.h"
36990
36991 $ac_includes_default
36992 #include <idn2.h>
36993
36994 int
36995 main (void)
36996 {
36997
36998 char *output = (char*)0;
36999 int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
37000 (void) code;
37001
37002 ;
37003 return 0;
37004 }
37005 _ACEOF
37006 rm -f "conftest.$ac_objext"
37007 if { (eval echo "$as_me:37007: \"$ac_compile\"") >&5
37008 (eval $ac_compile) 2>&5
37009 ac_status=$?
37010 echo "$as_me:37010: \$? = $ac_status" >&5
37011 (exit "$ac_status"); } &&
37012 { ac_try='test -s "conftest.$ac_objext"'
37013 { (eval echo "$as_me:37013: \"$ac_try\"") >&5
37014 (eval $ac_try) 2>&5
37015 ac_status=$?
37016 echo "$as_me:37016: \$? = $ac_status" >&5
37017 (exit "$ac_status"); }; }; then
37018
37019 test -n "$verbose" && echo " ... found idn2 headers in $cf_cv_header_path_idn2" 1>&6
37020
37021 echo "${as_me:-configure}:37021: testing ... found idn2 headers in $cf_cv_header_path_idn2 ..." 1>&5
37022
37023 cf_cv_find_linkage_idn2=maybe
37024 cf_test_CPPFLAGS="$CPPFLAGS"
37025 break
37026 else
37027 echo "$as_me: failed program was:" >&5
37028 cat "conftest.$ac_ext" >&5
37029
37030 CPPFLAGS="$cf_save_CPPFLAGS"
37031
37032 fi
37033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37034 fi
37035 done
37036
37037 if test "$cf_cv_find_linkage_idn2" = maybe ; then
37038
37039 echo "${as_me:-configure}:37039: testing Searching for idn2 library in FIND_LINKAGE(idn2,) ..." 1>&5
37040
37041 cf_save_LIBS="$LIBS"
37042 cf_save_LDFLAGS="$LDFLAGS"
37043
37044 if test "$cf_cv_find_linkage_idn2" != yes ; then
37045
37046 cf_search=
37047 cf_library_path_list=""
37048 if test -n "${LDFLAGS}${LIBS}" ; then
37049 for cf_library_path in $LDFLAGS $LIBS
37050 do
37051 case "$cf_library_path" in
37052 (-L*)
37053 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
37054
37055 test "x$cf_library_path" != "xNONE" && \
37056 test -d "$cf_library_path" && \
37057 {
37058 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
37059 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
37060 test -d "$cf_library_path/lib/idn2" && cf_search="$cf_search $cf_library_path/lib/idn2"
37061 test -d "$cf_library_path/lib/idn2/lib" && cf_search="$cf_search $cf_library_path/lib/idn2/lib"
37062 test -d "$cf_library_path/idn2/lib" && cf_search="$cf_search $cf_library_path/idn2/lib"
37063 test -d "$cf_library_path/idn2/lib/idn2" && cf_search="$cf_search $cf_library_path/idn2/lib/idn2"
37064 }
37065
37066 cf_library_path_list="$cf_library_path_list $cf_search"
37067 ;;
37068 esac
37069 done
37070 fi
37071
37072 cf_search=
37073
37074 test "x$prefix" != "xNONE" && \
37075 test -d "$prefix" && \
37076 {
37077 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
37078 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
37079 test -d "$prefix/lib/idn2" && cf_search="$cf_search $prefix/lib/idn2"
37080 test -d "$prefix/lib/idn2/lib" && cf_search="$cf_search $prefix/lib/idn2/lib"
37081 test -d "$prefix/idn2/lib" && cf_search="$cf_search $prefix/idn2/lib"
37082 test -d "$prefix/idn2/lib/idn2" && cf_search="$cf_search $prefix/idn2/lib/idn2"
37083 }
37084
37085 for cf_subdir_prefix in \
37086 /usr \
37087 /usr/local \
37088 /usr/pkg \
37089 /opt \
37090 /opt/local \
37091 $HOME
37092 do
37093
37094 test "x$cf_subdir_prefix" != "x$prefix" && \
37095 test -d "$cf_subdir_prefix" && \
37096 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
37097 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
37098 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
37099 test -d "$cf_subdir_prefix/lib/idn2" && cf_search="$cf_search $cf_subdir_prefix/lib/idn2"
37100 test -d "$cf_subdir_prefix/lib/idn2/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/idn2/lib"
37101 test -d "$cf_subdir_prefix/idn2/lib" && cf_search="$cf_search $cf_subdir_prefix/idn2/lib"
37102 test -d "$cf_subdir_prefix/idn2/lib/idn2" && cf_search="$cf_search $cf_subdir_prefix/idn2/lib/idn2"
37103 }
37104
37105 done
37106
37107 cf_search="$cf_library_path_list $cf_search"
37108
37109 for cf_cv_library_path_idn2 in $cf_search
37110 do
37111 if test -d "$cf_cv_library_path_idn2" ; then
37112 test -n "$verbose" && echo " ... testing $cf_cv_library_path_idn2" 1>&6
37113
37114 echo "${as_me:-configure}:37114: testing ... testing $cf_cv_library_path_idn2 ..." 1>&5
37115
37116 CPPFLAGS="$cf_test_CPPFLAGS"
37117 LIBS="-lidn2 $LIBICONV $cf_save_LIBS"
37118 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_idn2"
37119 cat >"conftest.$ac_ext" <<_ACEOF
37120 #line 37120 "configure"
37121 #include "confdefs.h"
37122
37123 $ac_includes_default
37124 #include <idn2.h>
37125
37126 int
37127 main (void)
37128 {
37129
37130 char *output = (char*)0;
37131 int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
37132 (void) code;
37133
37134 ;
37135 return 0;
37136 }
37137 _ACEOF
37138 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
37139 if { (eval echo "$as_me:37139: \"$ac_link\"") >&5
37140 (eval $ac_link) 2>&5
37141 ac_status=$?
37142 echo "$as_me:37142: \$? = $ac_status" >&5
37143 (exit "$ac_status"); } &&
37144 { ac_try='test -s "conftest$ac_exeext"'
37145 { (eval echo "$as_me:37145: \"$ac_try\"") >&5
37146 (eval $ac_try) 2>&5
37147 ac_status=$?
37148 echo "$as_me:37148: \$? = $ac_status" >&5
37149 (exit "$ac_status"); }; }; then
37150
37151 test -n "$verbose" && echo " ... found idn2 library in $cf_cv_library_path_idn2" 1>&6
37152
37153 echo "${as_me:-configure}:37153: testing ... found idn2 library in $cf_cv_library_path_idn2 ..." 1>&5
37154
37155 cf_cv_find_linkage_idn2=yes
37156 cf_cv_library_file_idn2="-lidn2"
37157 break
37158 else
37159 echo "$as_me: failed program was:" >&5
37160 cat "conftest.$ac_ext" >&5
37161
37162 CPPFLAGS="$cf_save_CPPFLAGS"
37163 LIBS="$cf_save_LIBS"
37164 LDFLAGS="$cf_save_LDFLAGS"
37165
37166 fi
37167 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37168 fi
37169 done
37170 CPPFLAGS="$cf_save_CPPFLAGS"
37171 LDFLAGS="$cf_save_LDFLAGS"
37172 fi
37173
37174 else
37175 cf_cv_find_linkage_idn2=no
37176 fi
37177
37178 fi
37179 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37180
37181 fi
37182 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37183
37184 LIBS="$cf_save_LIBS"
37185
37186 if test "$cf_cv_find_linkage_idn2" = yes ; then
37187
37188 if test -n "$cf_cv_header_path_idn2" ; then
37189 for cf_add_incdir in $cf_cv_header_path_idn2
37190 do
37191 while test "$cf_add_incdir" != /usr/include
37192 do
37193 if test -d "$cf_add_incdir"
37194 then
37195 cf_have_incdir=no
37196 if test -n "$CFLAGS$CPPFLAGS" ; then
37197 # a loop is needed to ensure we can add subdirs of existing dirs
37198 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
37199 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
37200 cf_have_incdir=yes; break
37201 fi
37202 done
37203 fi
37204
37205 if test "$cf_have_incdir" = no ; then
37206 if test "$cf_add_incdir" = /usr/local/include ; then
37207 if test "$GCC" = yes
37208 then
37209 cf_save_CPPFLAGS=$CPPFLAGS
37210
37211 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
37212 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
37213
37214 cat >"conftest.$ac_ext" <<_ACEOF
37215 #line 37215 "configure"
37216 #include "confdefs.h"
37217 #include <stdio.h>
37218 int
37219 main (void)
37220 {
37221 printf("Hello")
37222 ;
37223 return 0;
37224 }
37225 _ACEOF
37226 rm -f "conftest.$ac_objext"
37227 if { (eval echo "$as_me:37227: \"$ac_compile\"") >&5
37228 (eval $ac_compile) 2>&5
37229 ac_status=$?
37230 echo "$as_me:37230: \$? = $ac_status" >&5
37231 (exit "$ac_status"); } &&
37232 { ac_try='test -s "conftest.$ac_objext"'
37233 { (eval echo "$as_me:37233: \"$ac_try\"") >&5
37234 (eval $ac_try) 2>&5
37235 ac_status=$?
37236 echo "$as_me:37236: \$? = $ac_status" >&5
37237 (exit "$ac_status"); }; }; then
37238 :
37239 else
37240 echo "$as_me: failed program was:" >&5
37241 cat "conftest.$ac_ext" >&5
37242 cf_have_incdir=yes
37243 fi
37244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37245 CPPFLAGS=$cf_save_CPPFLAGS
37246 fi
37247 fi
37248 fi
37249
37250 if test "$cf_have_incdir" = no ; then
37251 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
37252
37253 echo "${as_me:-configure}:37253: testing adding $cf_add_incdir to include-path ..." 1>&5
37254
37255 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
37256
37257 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
37258 test "$cf_top_incdir" = "$cf_add_incdir" && break
37259 cf_add_incdir="$cf_top_incdir"
37260 else
37261 break
37262 fi
37263 else
37264 break
37265 fi
37266 done
37267 done
37268 fi
37269
37270 if test -n "$cf_cv_library_path_idn2" ; then
37271 for cf_add_libdir in $cf_cv_library_path_idn2
37272 do
37273 if test "$cf_add_libdir" = /usr/lib ; then
37274 :
37275 elif test -d "$cf_add_libdir"
37276 then
37277 cf_have_libdir=no
37278 if test -n "$LDFLAGS$LIBS" ; then
37279 # a loop is needed to ensure we can add subdirs of existing dirs
37280 for cf_test_libdir in $LDFLAGS $LIBS ; do
37281 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
37282 cf_have_libdir=yes; break
37283 fi
37284 done
37285 fi
37286 if test "$cf_have_libdir" = no ; then
37287 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
37288
37289 echo "${as_me:-configure}:37289: testing adding $cf_add_libdir to library-path ..." 1>&5
37290
37291 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
37292 fi
37293 fi
37294 done
37295 fi
37296
37297 cf_add_libs="$LIBS"
37298 # reverse order
37299 cf_add_0lib=
37300 for cf_add_1lib in -lidn2; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
37301 # filter duplicates
37302 for cf_add_1lib in $cf_add_0lib; do
37303 for cf_add_2lib in $cf_add_libs; do
37304 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
37305 cf_add_1lib=
37306 break
37307 fi
37308 done
37309 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
37310 done
37311 LIBS="$cf_add_libs"
37312
37313 else
37314 test -n "$verbose" && echo " unsuccessful, will try idn (older)" 1>&6
37315
37316 echo "${as_me:-configure}:37316: testing unsuccessful, will try idn (older) ..." 1>&5
37317
37318 fi
37319
37320 if test "x$cf_cv_find_linkage_idn2" = xyes ; then
37321 test -n "$verbose" && echo " found idn2 library" 1>&6
37322
37323 echo "${as_me:-configure}:37323: testing found idn2 library ..." 1>&5
37324
37325 cat >>confdefs.h <<\EOF
37326 #define USE_IDN2 1
37327 EOF
37328
37329 else
37330
37331 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
37332 # will be set on completion of the AC_LINK_IFELSE below.
37333 cf_cv_header_path_idn=
37334 cf_cv_library_path_idn=
37335
37336 echo "${as_me:-configure}:37336: testing Starting FIND_LINKAGE(idn,) ..." 1>&5
37337
37338 cf_save_LIBS="$LIBS"
37339
37340 cat >"conftest.$ac_ext" <<_ACEOF
37341 #line 37341 "configure"
37342 #include "confdefs.h"
37343
37344 #include <stdio.h>
37345 #include <idna.h>
37346
37347 int
37348 main (void)
37349 {
37350
37351 char *output = 0;
37352 int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
37353 (void) code;
37354
37355 ;
37356 return 0;
37357 }
37358 _ACEOF
37359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
37360 if { (eval echo "$as_me:37360: \"$ac_link\"") >&5
37361 (eval $ac_link) 2>&5
37362 ac_status=$?
37363 echo "$as_me:37363: \$? = $ac_status" >&5
37364 (exit "$ac_status"); } &&
37365 { ac_try='test -s "conftest$ac_exeext"'
37366 { (eval echo "$as_me:37366: \"$ac_try\"") >&5
37367 (eval $ac_try) 2>&5
37368 ac_status=$?
37369 echo "$as_me:37369: \$? = $ac_status" >&5
37370 (exit "$ac_status"); }; }; then
37371
37372 cf_cv_find_linkage_idn=yes
37373 cf_cv_header_path_idn=/usr/include
37374 cf_cv_library_path_idn=/usr/lib
37375
37376 else
37377 echo "$as_me: failed program was:" >&5
37378 cat "conftest.$ac_ext" >&5
37379
37380 LIBS="-lidn $LIBICONV $cf_save_LIBS"
37381
37382 cat >"conftest.$ac_ext" <<_ACEOF
37383 #line 37383 "configure"
37384 #include "confdefs.h"
37385
37386 #include <stdio.h>
37387 #include <idna.h>
37388
37389 int
37390 main (void)
37391 {
37392
37393 char *output = 0;
37394 int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
37395 (void) code;
37396
37397 ;
37398 return 0;
37399 }
37400 _ACEOF
37401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
37402 if { (eval echo "$as_me:37402: \"$ac_link\"") >&5
37403 (eval $ac_link) 2>&5
37404 ac_status=$?
37405 echo "$as_me:37405: \$? = $ac_status" >&5
37406 (exit "$ac_status"); } &&
37407 { ac_try='test -s "conftest$ac_exeext"'
37408 { (eval echo "$as_me:37408: \"$ac_try\"") >&5
37409 (eval $ac_try) 2>&5
37410 ac_status=$?
37411 echo "$as_me:37411: \$? = $ac_status" >&5
37412 (exit "$ac_status"); }; }; then
37413
37414 cf_cv_find_linkage_idn=yes
37415 cf_cv_header_path_idn=/usr/include
37416 cf_cv_library_path_idn=/usr/lib
37417 cf_cv_library_file_idn="-lidn"
37418
37419 else
37420 echo "$as_me: failed program was:" >&5
37421 cat "conftest.$ac_ext" >&5
37422
37423 cf_cv_find_linkage_idn=no
37424 LIBS="$cf_save_LIBS"
37425
37426 test -n "$verbose" && echo " find linkage for idn library" 1>&6
37427
37428 echo "${as_me:-configure}:37428: testing find linkage for idn library ..." 1>&5
37429
37430 echo "${as_me:-configure}:37430: testing Searching for headers in FIND_LINKAGE(idn,) ..." 1>&5
37431
37432 cf_save_CPPFLAGS="$CPPFLAGS"
37433 cf_test_CPPFLAGS="$CPPFLAGS"
37434
37435 cf_search=
37436
37437 # collect the current set of include-directories from compiler flags
37438 cf_header_path_list=""
37439 if test -n "${CFLAGS}${CPPFLAGS}" ; then
37440 for cf_header_path in $CPPFLAGS $CFLAGS
37441 do
37442 case "$cf_header_path" in
37443 (-I*)
37444 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
37445
37446 test "x$cf_header_path" != "xNONE" && \
37447 test -d "$cf_header_path" && \
37448 {
37449 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
37450 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
37451 test -d "$cf_header_path/include/idn" && cf_search="$cf_search $cf_header_path/include/idn"
37452 test -d "$cf_header_path/include/idn/include" && cf_search="$cf_search $cf_header_path/include/idn/include"
37453 test -d "$cf_header_path/idn/include" && cf_search="$cf_search $cf_header_path/idn/include"
37454 test -d "$cf_header_path/idn/include/idn" && cf_search="$cf_search $cf_header_path/idn/include/idn"
37455 }
37456
37457 cf_header_path_list="$cf_header_path_list $cf_search"
37458 ;;
37459 esac
37460 done
37461 fi
37462
37463 # add the variations for the package we are looking for
37464
37465 cf_search=
37466
37467 test "x$prefix" != "xNONE" && \
37468 test -d "$prefix" && \
37469 {
37470 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
37471 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
37472 test -d "$prefix/include/idn" && cf_search="$cf_search $prefix/include/idn"
37473 test -d "$prefix/include/idn/include" && cf_search="$cf_search $prefix/include/idn/include"
37474 test -d "$prefix/idn/include" && cf_search="$cf_search $prefix/idn/include"
37475 test -d "$prefix/idn/include/idn" && cf_search="$cf_search $prefix/idn/include/idn"
37476 }
37477
37478 for cf_subdir_prefix in \
37479 /usr \
37480 /usr/local \
37481 /usr/pkg \
37482 /opt \
37483 /opt/local \
37484 $HOME
37485 do
37486
37487 test "x$cf_subdir_prefix" != "x$prefix" && \
37488 test -d "$cf_subdir_prefix" && \
37489 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
37490 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
37491 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
37492 test -d "$cf_subdir_prefix/include/idn" && cf_search="$cf_search $cf_subdir_prefix/include/idn"
37493 test -d "$cf_subdir_prefix/include/idn/include" && cf_search="$cf_search $cf_subdir_prefix/include/idn/include"
37494 test -d "$cf_subdir_prefix/idn/include" && cf_search="$cf_search $cf_subdir_prefix/idn/include"
37495 test -d "$cf_subdir_prefix/idn/include/idn" && cf_search="$cf_search $cf_subdir_prefix/idn/include/idn"
37496 }
37497
37498 done
37499
37500 test "$includedir" != NONE && \
37501 test "$includedir" != "/usr/include" && \
37502 test -d "$includedir" && {
37503 test -d "$includedir" && cf_search="$cf_search $includedir"
37504 test -d "$includedir/idn" && cf_search="$cf_search $includedir/idn"
37505 }
37506
37507 test "$oldincludedir" != NONE && \
37508 test "$oldincludedir" != "/usr/include" && \
37509 test -d "$oldincludedir" && {
37510 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
37511 test -d "$oldincludedir/idn" && cf_search="$cf_search $oldincludedir/idn"
37512 }
37513
37514 cf_search="$cf_search $cf_header_path_list"
37515
37516 for cf_cv_header_path_idn in $cf_search
37517 do
37518 if test -d "$cf_cv_header_path_idn" ; then
37519 test -n "$verbose" && echo " ... testing $cf_cv_header_path_idn" 1>&6
37520
37521 echo "${as_me:-configure}:37521: testing ... testing $cf_cv_header_path_idn ..." 1>&5
37522
37523 CPPFLAGS="$cf_save_CPPFLAGS"
37524
37525 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
37526 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_idn"
37527
37528 cat >"conftest.$ac_ext" <<_ACEOF
37529 #line 37529 "configure"
37530 #include "confdefs.h"
37531
37532 #include <stdio.h>
37533 #include <idna.h>
37534
37535 int
37536 main (void)
37537 {
37538
37539 char *output = 0;
37540 int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
37541 (void) code;
37542
37543 ;
37544 return 0;
37545 }
37546 _ACEOF
37547 rm -f "conftest.$ac_objext"
37548 if { (eval echo "$as_me:37548: \"$ac_compile\"") >&5
37549 (eval $ac_compile) 2>&5
37550 ac_status=$?
37551 echo "$as_me:37551: \$? = $ac_status" >&5
37552 (exit "$ac_status"); } &&
37553 { ac_try='test -s "conftest.$ac_objext"'
37554 { (eval echo "$as_me:37554: \"$ac_try\"") >&5
37555 (eval $ac_try) 2>&5
37556 ac_status=$?
37557 echo "$as_me:37557: \$? = $ac_status" >&5
37558 (exit "$ac_status"); }; }; then
37559
37560 test -n "$verbose" && echo " ... found idn headers in $cf_cv_header_path_idn" 1>&6
37561
37562 echo "${as_me:-configure}:37562: testing ... found idn headers in $cf_cv_header_path_idn ..." 1>&5
37563
37564 cf_cv_find_linkage_idn=maybe
37565 cf_test_CPPFLAGS="$CPPFLAGS"
37566 break
37567 else
37568 echo "$as_me: failed program was:" >&5
37569 cat "conftest.$ac_ext" >&5
37570
37571 CPPFLAGS="$cf_save_CPPFLAGS"
37572
37573 fi
37574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37575 fi
37576 done
37577
37578 if test "$cf_cv_find_linkage_idn" = maybe ; then
37579
37580 echo "${as_me:-configure}:37580: testing Searching for idn library in FIND_LINKAGE(idn,) ..." 1>&5
37581
37582 cf_save_LIBS="$LIBS"
37583 cf_save_LDFLAGS="$LDFLAGS"
37584
37585 if test "$cf_cv_find_linkage_idn" != yes ; then
37586
37587 cf_search=
37588 cf_library_path_list=""
37589 if test -n "${LDFLAGS}${LIBS}" ; then
37590 for cf_library_path in $LDFLAGS $LIBS
37591 do
37592 case "$cf_library_path" in
37593 (-L*)
37594 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
37595
37596 test "x$cf_library_path" != "xNONE" && \
37597 test -d "$cf_library_path" && \
37598 {
37599 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
37600 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
37601 test -d "$cf_library_path/lib/idn" && cf_search="$cf_search $cf_library_path/lib/idn"
37602 test -d "$cf_library_path/lib/idn/lib" && cf_search="$cf_search $cf_library_path/lib/idn/lib"
37603 test -d "$cf_library_path/idn/lib" && cf_search="$cf_search $cf_library_path/idn/lib"
37604 test -d "$cf_library_path/idn/lib/idn" && cf_search="$cf_search $cf_library_path/idn/lib/idn"
37605 }
37606
37607 cf_library_path_list="$cf_library_path_list $cf_search"
37608 ;;
37609 esac
37610 done
37611 fi
37612
37613 cf_search=
37614
37615 test "x$prefix" != "xNONE" && \
37616 test -d "$prefix" && \
37617 {
37618 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
37619 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
37620 test -d "$prefix/lib/idn" && cf_search="$cf_search $prefix/lib/idn"
37621 test -d "$prefix/lib/idn/lib" && cf_search="$cf_search $prefix/lib/idn/lib"
37622 test -d "$prefix/idn/lib" && cf_search="$cf_search $prefix/idn/lib"
37623 test -d "$prefix/idn/lib/idn" && cf_search="$cf_search $prefix/idn/lib/idn"
37624 }
37625
37626 for cf_subdir_prefix in \
37627 /usr \
37628 /usr/local \
37629 /usr/pkg \
37630 /opt \
37631 /opt/local \
37632 $HOME
37633 do
37634
37635 test "x$cf_subdir_prefix" != "x$prefix" && \
37636 test -d "$cf_subdir_prefix" && \
37637 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
37638 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
37639 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
37640 test -d "$cf_subdir_prefix/lib/idn" && cf_search="$cf_search $cf_subdir_prefix/lib/idn"
37641 test -d "$cf_subdir_prefix/lib/idn/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/idn/lib"
37642 test -d "$cf_subdir_prefix/idn/lib" && cf_search="$cf_search $cf_subdir_prefix/idn/lib"
37643 test -d "$cf_subdir_prefix/idn/lib/idn" && cf_search="$cf_search $cf_subdir_prefix/idn/lib/idn"
37644 }
37645
37646 done
37647
37648 cf_search="$cf_library_path_list $cf_search"
37649
37650 for cf_cv_library_path_idn in $cf_search
37651 do
37652 if test -d "$cf_cv_library_path_idn" ; then
37653 test -n "$verbose" && echo " ... testing $cf_cv_library_path_idn" 1>&6
37654
37655 echo "${as_me:-configure}:37655: testing ... testing $cf_cv_library_path_idn ..." 1>&5
37656
37657 CPPFLAGS="$cf_test_CPPFLAGS"
37658 LIBS="-lidn $LIBICONV $cf_save_LIBS"
37659 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_idn"
37660 cat >"conftest.$ac_ext" <<_ACEOF
37661 #line 37661 "configure"
37662 #include "confdefs.h"
37663
37664 #include <stdio.h>
37665 #include <idna.h>
37666
37667 int
37668 main (void)
37669 {
37670
37671 char *output = 0;
37672 int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
37673 (void) code;
37674
37675 ;
37676 return 0;
37677 }
37678 _ACEOF
37679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
37680 if { (eval echo "$as_me:37680: \"$ac_link\"") >&5
37681 (eval $ac_link) 2>&5
37682 ac_status=$?
37683 echo "$as_me:37683: \$? = $ac_status" >&5
37684 (exit "$ac_status"); } &&
37685 { ac_try='test -s "conftest$ac_exeext"'
37686 { (eval echo "$as_me:37686: \"$ac_try\"") >&5
37687 (eval $ac_try) 2>&5
37688 ac_status=$?
37689 echo "$as_me:37689: \$? = $ac_status" >&5
37690 (exit "$ac_status"); }; }; then
37691
37692 test -n "$verbose" && echo " ... found idn library in $cf_cv_library_path_idn" 1>&6
37693
37694 echo "${as_me:-configure}:37694: testing ... found idn library in $cf_cv_library_path_idn ..." 1>&5
37695
37696 cf_cv_find_linkage_idn=yes
37697 cf_cv_library_file_idn="-lidn"
37698 break
37699 else
37700 echo "$as_me: failed program was:" >&5
37701 cat "conftest.$ac_ext" >&5
37702
37703 CPPFLAGS="$cf_save_CPPFLAGS"
37704 LIBS="$cf_save_LIBS"
37705 LDFLAGS="$cf_save_LDFLAGS"
37706
37707 fi
37708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37709 fi
37710 done
37711 CPPFLAGS="$cf_save_CPPFLAGS"
37712 LDFLAGS="$cf_save_LDFLAGS"
37713 fi
37714
37715 else
37716 cf_cv_find_linkage_idn=no
37717 fi
37718
37719 fi
37720 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37721
37722 fi
37723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37724
37725 LIBS="$cf_save_LIBS"
37726
37727 if test "$cf_cv_find_linkage_idn" = yes ; then
37728
37729 if test -n "$cf_cv_header_path_idn" ; then
37730 for cf_add_incdir in $cf_cv_header_path_idn
37731 do
37732 while test "$cf_add_incdir" != /usr/include
37733 do
37734 if test -d "$cf_add_incdir"
37735 then
37736 cf_have_incdir=no
37737 if test -n "$CFLAGS$CPPFLAGS" ; then
37738 # a loop is needed to ensure we can add subdirs of existing dirs
37739 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
37740 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
37741 cf_have_incdir=yes; break
37742 fi
37743 done
37744 fi
37745
37746 if test "$cf_have_incdir" = no ; then
37747 if test "$cf_add_incdir" = /usr/local/include ; then
37748 if test "$GCC" = yes
37749 then
37750 cf_save_CPPFLAGS=$CPPFLAGS
37751
37752 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
37753 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
37754
37755 cat >"conftest.$ac_ext" <<_ACEOF
37756 #line 37756 "configure"
37757 #include "confdefs.h"
37758 #include <stdio.h>
37759 int
37760 main (void)
37761 {
37762 printf("Hello")
37763 ;
37764 return 0;
37765 }
37766 _ACEOF
37767 rm -f "conftest.$ac_objext"
37768 if { (eval echo "$as_me:37768: \"$ac_compile\"") >&5
37769 (eval $ac_compile) 2>&5
37770 ac_status=$?
37771 echo "$as_me:37771: \$? = $ac_status" >&5
37772 (exit "$ac_status"); } &&
37773 { ac_try='test -s "conftest.$ac_objext"'
37774 { (eval echo "$as_me:37774: \"$ac_try\"") >&5
37775 (eval $ac_try) 2>&5
37776 ac_status=$?
37777 echo "$as_me:37777: \$? = $ac_status" >&5
37778 (exit "$ac_status"); }; }; then
37779 :
37780 else
37781 echo "$as_me: failed program was:" >&5
37782 cat "conftest.$ac_ext" >&5
37783 cf_have_incdir=yes
37784 fi
37785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37786 CPPFLAGS=$cf_save_CPPFLAGS
37787 fi
37788 fi
37789 fi
37790
37791 if test "$cf_have_incdir" = no ; then
37792 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
37793
37794 echo "${as_me:-configure}:37794: testing adding $cf_add_incdir to include-path ..." 1>&5
37795
37796 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
37797
37798 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
37799 test "$cf_top_incdir" = "$cf_add_incdir" && break
37800 cf_add_incdir="$cf_top_incdir"
37801 else
37802 break
37803 fi
37804 else
37805 break
37806 fi
37807 done
37808 done
37809 fi
37810
37811 if test -n "$cf_cv_library_path_idn" ; then
37812 for cf_add_libdir in $cf_cv_library_path_idn
37813 do
37814 if test "$cf_add_libdir" = /usr/lib ; then
37815 :
37816 elif test -d "$cf_add_libdir"
37817 then
37818 cf_have_libdir=no
37819 if test -n "$LDFLAGS$LIBS" ; then
37820 # a loop is needed to ensure we can add subdirs of existing dirs
37821 for cf_test_libdir in $LDFLAGS $LIBS ; do
37822 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
37823 cf_have_libdir=yes; break
37824 fi
37825 done
37826 fi
37827 if test "$cf_have_libdir" = no ; then
37828 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
37829
37830 echo "${as_me:-configure}:37830: testing adding $cf_add_libdir to library-path ..." 1>&5
37831
37832 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
37833 fi
37834 fi
37835 done
37836 fi
37837
37838 cf_add_libs="$LIBS"
37839 # reverse order
37840 cf_add_0lib=
37841 for cf_add_1lib in -lidn; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
37842 # filter duplicates
37843 for cf_add_1lib in $cf_add_0lib; do
37844 for cf_add_2lib in $cf_add_libs; do
37845 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
37846 cf_add_1lib=
37847 break
37848 fi
37849 done
37850 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
37851 done
37852 LIBS="$cf_add_libs"
37853
37854 else
37855 { echo "$as_me:37855: WARNING: Cannot find idn library" >&5
37856 echo "$as_me: WARNING: Cannot find idn library" >&2;}
37857 fi
37858
37859 if test "x$cf_cv_find_linkage_idn" = xyes ; then
37860 test -n "$verbose" && echo " found idn library" 1>&6
37861
37862 echo "${as_me:-configure}:37862: testing found idn library ..." 1>&5
37863
37864 cat >>confdefs.h <<\EOF
37865 #define USE_IDNA 1
37866 EOF
37867
37868 fi
37869 fi
37870
37871 fi
37872
37873 echo "$as_me:37873: checking if element-justification logic should be used" >&5
37874 echo $ECHO_N "checking if element-justification logic should be used... $ECHO_C" >&6
37875
37876 # Check whether --enable-justify-elts or --disable-justify-elts was given.
37877 if test "${enable_justify_elts+set}" = set; then
37878 enableval="$enable_justify_elts"
37879 test "$enableval" != no && enableval=yes
37880 if test "$enableval" != "yes" ; then
37881 use_justify_elts=$enableval
37882 else
37883 use_justify_elts=yes
37884 fi
37885 else
37886 enableval=yes
37887 use_justify_elts=yes
37888
37889 fi;
37890 echo "$as_me:37890: result: $use_justify_elts" >&5
37891 echo "${ECHO_T}$use_justify_elts" >&6
37892 test "$use_justify_elts" != no &&
37893 cat >>confdefs.h <<\EOF
37894 #define USE_JUSTIFY_ELTS 1
37895 EOF
37896
37897 echo "$as_me:37897: checking if partial-display should be used" >&5
37898 echo $ECHO_N "checking if partial-display should be used... $ECHO_C" >&6
37899
37900 # Check whether --enable-partial or --disable-partial was given.
37901 if test "${enable_partial+set}" = set; then
37902 enableval="$enable_partial"
37903 test "$enableval" != no && enableval=yes
37904 if test "$enableval" != "yes" ; then
37905 use_partial_display=$enableval
37906 else
37907 use_partial_display=yes
37908 fi
37909 else
37910 enableval=yes
37911 use_partial_display=yes
37912
37913 fi;
37914 echo "$as_me:37914: result: $use_partial_display" >&5
37915 echo "${ECHO_T}$use_partial_display" >&6
37916 test "$use_partial_display" != no &&
37917 cat >>confdefs.h <<\EOF
37918 #define DISP_PARTIAL 1
37919 EOF
37920
37921 echo "$as_me:37921: checking if persistent-cookie logic should be used" >&5
37922 echo $ECHO_N "checking if persistent-cookie logic should be used... $ECHO_C" >&6
37923
37924 # Check whether --enable-persistent-cookies or --disable-persistent-cookies was given.
37925 if test "${enable_persistent_cookies+set}" = set; then
37926 enableval="$enable_persistent_cookies"
37927 test "$enableval" != no && enableval=yes
37928 if test "$enableval" != "yes" ; then
37929 use_filed_cookies=$enableval
37930 else
37931 use_filed_cookies=yes
37932 fi
37933 else
37934 enableval=yes
37935 use_filed_cookies=yes
37936
37937 fi;
37938 echo "$as_me:37938: result: $use_filed_cookies" >&5
37939 echo "${ECHO_T}$use_filed_cookies" >&6
37940 test "$use_filed_cookies" != no &&
37941 cat >>confdefs.h <<\EOF
37942 #define USE_PERSISTENT_COOKIES 1
37943 EOF
37944
37945 echo "$as_me:37945: checking if html source should be colorized" >&5
37946 echo $ECHO_N "checking if html source should be colorized... $ECHO_C" >&6
37947
37948 # Check whether --enable-prettysrc or --disable-prettysrc was given.
37949 if test "${enable_prettysrc+set}" = set; then
37950 enableval="$enable_prettysrc"
37951 test "$enableval" != no && enableval=yes
37952 if test "$enableval" != "yes" ; then
37953 use_prettysrc=$enableval
37954 else
37955 use_prettysrc=yes
37956 fi
37957 else
37958 enableval=yes
37959 use_prettysrc=yes
37960
37961 fi;
37962 echo "$as_me:37962: result: $use_prettysrc" >&5
37963 echo "${ECHO_T}$use_prettysrc" >&6
37964 test "$use_prettysrc" != no &&
37965 cat >>confdefs.h <<\EOF
37966 #define USE_PRETTYSRC 1
37967 EOF
37968
37969 echo "$as_me:37969: checking if progress-bar code should be used" >&5
37970 echo $ECHO_N "checking if progress-bar code should be used... $ECHO_C" >&6
37971
37972 # Check whether --enable-progressbar or --disable-progressbar was given.
37973 if test "${enable_progressbar+set}" = set; then
37974 enableval="$enable_progressbar"
37975 test "$enableval" != no && enableval=yes
37976 if test "$enableval" != "yes" ; then
37977 use_progressbar=$enableval
37978 else
37979 use_progressbar=yes
37980 fi
37981 else
37982 enableval=yes
37983 use_progressbar=yes
37984
37985 fi;
37986 echo "$as_me:37986: result: $use_progressbar" >&5
37987 echo "${ECHO_T}$use_progressbar" >&6
37988 test "$use_progressbar" != no &&
37989 cat >>confdefs.h <<\EOF
37990 #define USE_PROGRESSBAR 1
37991 EOF
37992
37993 echo "$as_me:37993: checking if read-progress message should show ETA" >&5
37994 echo $ECHO_N "checking if read-progress message should show ETA... $ECHO_C" >&6
37995
37996 # Check whether --enable-read-eta or --disable-read-eta was given.
37997 if test "${enable_read_eta+set}" = set; then
37998 enableval="$enable_read_eta"
37999 test "$enableval" != no && enableval=yes
38000 if test "$enableval" != "yes" ; then
38001 use_read_eta=$enableval
38002 else
38003 use_read_eta=yes
38004 fi
38005 else
38006 enableval=yes
38007 use_read_eta=yes
38008
38009 fi;
38010 echo "$as_me:38010: result: $use_read_eta" >&5
38011 echo "${ECHO_T}$use_read_eta" >&6
38012 test "$use_read_eta" != no &&
38013 cat >>confdefs.h <<\EOF
38014 #define USE_READPROGRESS 1
38015 EOF
38016
38017 echo "$as_me:38017: checking if source caching should be used" >&5
38018 echo $ECHO_N "checking if source caching should be used... $ECHO_C" >&6
38019
38020 # Check whether --enable-source-cache or --disable-source-cache was given.
38021 if test "${enable_source_cache+set}" = set; then
38022 enableval="$enable_source_cache"
38023 test "$enableval" != no && enableval=yes
38024 if test "$enableval" != "yes" ; then
38025 use_source_cache=$enableval
38026 else
38027 use_source_cache=yes
38028 fi
38029 else
38030 enableval=yes
38031 use_source_cache=yes
38032
38033 fi;
38034 echo "$as_me:38034: result: $use_source_cache" >&5
38035 echo "${ECHO_T}$use_source_cache" >&6
38036 test "$use_source_cache" != no &&
38037 cat >>confdefs.h <<\EOF
38038 #define USE_SOURCE_CACHE 1
38039 EOF
38040
38041 echo "$as_me:38041: checking if scrollbar code should be used" >&5
38042 echo $ECHO_N "checking if scrollbar code should be used... $ECHO_C" >&6
38043
38044 # Check whether --enable-scrollbar or --disable-scrollbar was given.
38045 if test "${enable_scrollbar+set}" = set; then
38046 enableval="$enable_scrollbar"
38047 test "$enableval" != no && enableval=yes
38048 if test "$enableval" != "yes" ; then
38049 use_scrollbar=$enableval
38050 else
38051 use_scrollbar=yes
38052 fi
38053 else
38054 enableval=yes
38055 use_scrollbar=yes
38056
38057 fi;
38058 echo "$as_me:38058: result: $use_scrollbar" >&5
38059 echo "${ECHO_T}$use_scrollbar" >&6
38060
38061 echo "$as_me:38061: checking if charset-selection logic should be used" >&5
38062 echo $ECHO_N "checking if charset-selection logic should be used... $ECHO_C" >&6
38063
38064 # Check whether --enable-charset-choice or --disable-charset-choice was given.
38065 if test "${enable_charset_choice+set}" = set; then
38066 enableval="$enable_charset_choice"
38067 test "$enableval" != yes && enableval=no
38068 if test "$enableval" != "no" ; then
38069 use_charset_choice=$enableval
38070 else
38071 use_charset_choice=no
38072 fi
38073 else
38074 enableval=no
38075 use_charset_choice=no
38076
38077 fi;
38078 echo "$as_me:38078: result: $use_charset_choice" >&5
38079 echo "${ECHO_T}$use_charset_choice" >&6
38080 test "$use_charset_choice" != no &&
38081 cat >>confdefs.h <<\EOF
38082 #define USE_CHARSET_CHOICE 1
38083 EOF
38084
38085 echo "$as_me:38085: checking if you want to use external commands" >&5
38086 echo $ECHO_N "checking if you want to use external commands... $ECHO_C" >&6
38087
38088 # Check whether --enable-externs or --disable-externs was given.
38089 if test "${enable_externs+set}" = set; then
38090 enableval="$enable_externs"
38091 test "$enableval" != yes && enableval=no
38092 if test "$enableval" != "no" ; then
38093 use_externs=yes
38094 else
38095 use_externs=no
38096 fi
38097 else
38098 enableval=no
38099 use_externs=no
38100
38101 fi;
38102 echo "$as_me:38102: result: $use_externs" >&5
38103 echo "${ECHO_T}$use_externs" >&6
38104 if test "$use_externs" != "no" ; then
38105
38106 cat >>confdefs.h <<\EOF
38107 #define USE_EXTERNALS 1
38108 EOF
38109
38110 EXTRA_OBJS="$EXTRA_OBJS LYExtern\$o"
38111 fi
38112
38113 echo "$as_me:38113: checking if you want to use setfont support" >&5
38114 echo $ECHO_N "checking if you want to use setfont support... $ECHO_C" >&6
38115
38116 # Check whether --enable-font-switch or --disable-font-switch was given.
38117 if test "${enable_font_switch+set}" = set; then
38118 enableval="$enable_font_switch"
38119 test "$enableval" != yes && enableval=no
38120 if test "$enableval" != "no" ; then
38121 use_setfont=yes
38122 else
38123 use_setfont=no
38124 fi
38125 else
38126 enableval=no
38127 use_setfont=no
38128
38129 fi;
38130 echo "$as_me:38130: result: $use_setfont" >&5
38131 echo "${ECHO_T}$use_setfont" >&6
38132 if test "$use_setfont" = yes ; then
38133 case "$host_os" in
38134 (linux*)
38135
38136 test -z "$SETFONT" && SETFONT="consolechars"
38137 for ac_prog in $SETFONT consolechars setfont
38138 do
38139 # Extract the first word of "$ac_prog", so it can be a program name with args.
38140 set dummy $ac_prog; ac_word=$2
38141 echo "$as_me:38141: checking for $ac_word" >&5
38142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
38143 if test "${ac_cv_path_SETFONT+set}" = set; then
38144 echo $ECHO_N "(cached) $ECHO_C" >&6
38145 else
38146 case $SETFONT in
38147 [\\/]* | ?:[\\/]*)
38148 ac_cv_path_SETFONT="$SETFONT" # Let the user override the test with a path.
38149 ;;
38150 *)
38151 ac_save_IFS=$IFS; IFS=$ac_path_separator
38152 ac_dummy="$PATH"
38153 for ac_dir in $ac_dummy; do
38154 IFS=$ac_save_IFS
38155 test -z "$ac_dir" && ac_dir=.
38156 if $as_executable_p "$ac_dir/$ac_word"; then
38157 ac_cv_path_SETFONT="$ac_dir/$ac_word"
38158 echo "$as_me:38158: found $ac_dir/$ac_word" >&5
38159 break
38160 fi
38161 done
38162
38163 ;;
38164 esac
38165 fi
38166 SETFONT=$ac_cv_path_SETFONT
38167
38168 if test -n "$SETFONT"; then
38169 echo "$as_me:38169: result: $SETFONT" >&5
38170 echo "${ECHO_T}$SETFONT" >&6
38171 else
38172 echo "$as_me:38172: result: no" >&5
38173 echo "${ECHO_T}no" >&6
38174 fi
38175
38176 test -n "$SETFONT" && break
38177 done
38178 test -n "$SETFONT" || SETFONT="$SETFONT"
38179
38180 cf_path_prog=""
38181 cf_path_args=""
38182 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
38183 for cf_temp in $ac_cv_path_SETFONT
38184 do
38185 if test -z "$cf_path_prog" ; then
38186 if test "$with_full_paths" = yes ; then
38187
38188 if test "x$prefix" != xNONE; then
38189 cf_path_syntax="$prefix"
38190 else
38191 cf_path_syntax="$ac_default_prefix"
38192 fi
38193
38194 case "x$cf_temp" in
38195 (x\$\(*\)*|x\'*\'*)
38196 ;;
38197 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
38198 ;;
38199 (x\$\{*prefix\}*|x\$\{*dir\}*)
38200 eval cf_temp="$cf_temp"
38201 case "x$cf_temp" in
38202 (xNONE/*)
38203 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
38204 ;;
38205 esac
38206 ;;
38207 (xno|xNONE/*)
38208 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
38209 ;;
38210 (*)
38211 break
38212 ;;
38213 esac
38214
38215 cf_path_prog="$cf_temp"
38216 else
38217 cf_path_prog="`basename "$cf_temp"`"
38218 fi
38219 elif test -z "$cf_path_args" ; then
38220 cf_path_args="$cf_temp"
38221 else
38222 cf_path_args="$cf_path_args $cf_temp"
38223 fi
38224 done
38225 IFS="$cf_save_ifs"
38226
38227 if test -n "$cf_path_prog" ; then
38228
38229 echo "${as_me:-configure}:38229: testing defining path for ${cf_path_prog} ..." 1>&5
38230
38231 cat >>confdefs.h <<EOF
38232 #define SETFONT_PATH "$cf_path_prog"
38233 EOF
38234
38235 test -n "$cf_path_args" &&
38236 cat >>confdefs.h <<EOF
38237 #define SETFONT_ARGS "$cf_path_args"
38238 EOF
38239
38240 fi
38241
38242 ;;
38243 (os2*)
38244 SETFONT=built-in
38245 test -n "$verbose" && echo " Assume $host_os has font-switching" 1>&6
38246
38247 echo "${as_me:-configure}:38247: testing Assume $host_os has font-switching ..." 1>&5
38248
38249 ;;
38250 (*)
38251 SETFONT=unknown
38252 test -n "$verbose" && echo " Assume $host_os has no font-switching" 1>&6
38253
38254 echo "${as_me:-configure}:38254: testing Assume $host_os has no font-switching ..." 1>&5
38255
38256 ;;
38257 esac
38258 if test -z "$SETFONT" ; then
38259 { echo "$as_me:38259: WARNING: Cannot find a font-setting program" >&5
38260 echo "$as_me: WARNING: Cannot find a font-setting program" >&2;}
38261 elif test "$SETFONT" != unknown ; then
38262
38263 cat >>confdefs.h <<\EOF
38264 #define EXP_CHARTRANS_AUTOSWITCH 1
38265 EOF
38266
38267 fi
38268 fi
38269
38270 echo "$as_me:38270: checking if you want cgi-link support" >&5
38271 echo $ECHO_N "checking if you want cgi-link support... $ECHO_C" >&6
38272
38273 # Check whether --enable-cgi-links or --disable-cgi-links was given.
38274 if test "${enable_cgi_links+set}" = set; then
38275 enableval="$enable_cgi_links"
38276 test "$enableval" != yes && enableval=no
38277 if test "$enableval" != "no" ; then
38278
38279 cat >>confdefs.h <<\EOF
38280 #define LYNXCGI_LINKS 1
38281 EOF
38282
38283 fi
38284 else
38285 enableval=no
38286 fi;
38287 echo "$as_me:38287: result: $enableval" >&5
38288 echo "${ECHO_T}$enableval" >&6
38289
38290 echo "$as_me:38290: checking if you want change-exec support" >&5
38291 echo $ECHO_N "checking if you want change-exec support... $ECHO_C" >&6
38292
38293 # Check whether --enable-change-exec or --disable-change-exec was given.
38294 if test "${enable_change_exec+set}" = set; then
38295 enableval="$enable_change_exec"
38296 test "$enableval" != yes && enableval=no
38297 if test "$enableval" != "no" ; then
38298 use_change_exec=yes
38299 else
38300 use_change_exec=no
38301 fi
38302 else
38303 enableval=no
38304 use_change_exec=no
38305
38306 fi;
38307 echo "$as_me:38307: result: $use_change_exec" >&5
38308 echo "${ECHO_T}$use_change_exec" >&6
38309 test "$use_change_exec" = yes &&
38310 cat >>confdefs.h <<\EOF
38311 #define ENABLE_OPTS_CHANGE_EXEC 1
38312 EOF
38313
38314 echo "$as_me:38314: checking if you want exec-links support" >&5
38315 echo $ECHO_N "checking if you want exec-links support... $ECHO_C" >&6
38316
38317 # Check whether --enable-exec-links or --disable-exec-links was given.
38318 if test "${enable_exec_links+set}" = set; then
38319 enableval="$enable_exec_links"
38320 test "$enableval" != no && enableval=yes
38321 if test "$enableval" != "$use_change_exec" ; then
38322 use_exec_links=$enableval
38323 else
38324 use_exec_links=$enableval
38325 fi
38326 else
38327 enableval=$use_change_exec
38328 use_exec_links=$enableval
38329
38330 fi;
38331 echo "$as_me:38331: result: $use_exec_links" >&5
38332 echo "${ECHO_T}$use_exec_links" >&6
38333 test "$use_exec_links" = yes &&
38334 cat >>confdefs.h <<\EOF
38335 #define EXEC_LINKS 1
38336 EOF
38337
38338 echo "$as_me:38338: checking if you want exec-scripts support" >&5
38339 echo $ECHO_N "checking if you want exec-scripts support... $ECHO_C" >&6
38340
38341 # Check whether --enable-exec-scripts or --disable-exec-scripts was given.
38342 if test "${enable_exec_scripts+set}" = set; then
38343 enableval="$enable_exec_scripts"
38344 test "$enableval" != no && enableval=yes
38345 if test "$enableval" != "$use_change_exec" ; then
38346 use_exec_scripts=$enableval
38347 else
38348 use_exec_scripts=$enableval
38349 fi
38350 else
38351 enableval=$use_change_exec
38352 use_exec_scripts=$enableval
38353
38354 fi;
38355 echo "$as_me:38355: result: $use_exec_scripts" >&5
38356 echo "${ECHO_T}$use_exec_scripts" >&6
38357 test "$use_exec_scripts" = yes &&
38358 cat >>confdefs.h <<\EOF
38359 #define EXEC_SCRIPTS 1
38360 EOF
38361
38362 echo "$as_me:38362: checking if you want internal-links feature" >&5
38363 echo $ECHO_N "checking if you want internal-links feature... $ECHO_C" >&6
38364
38365 # Check whether --enable-internal-links or --disable-internal-links was given.
38366 if test "${enable_internal_links+set}" = set; then
38367 enableval="$enable_internal_links"
38368 test "$enableval" != yes && enableval=no
38369 if test "$enableval" != "no" ; then
38370 use_internal_links=yes
38371 else
38372 use_internal_links=no
38373 fi
38374 else
38375 enableval=no
38376 use_internal_links=no
38377
38378 fi;
38379 echo "$as_me:38379: result: $use_internal_links" >&5
38380 echo "${ECHO_T}$use_internal_links" >&6
38381 test "$use_internal_links" = yes &&
38382 cat >>confdefs.h <<\EOF
38383 #define TRACK_INTERNAL_LINKS 1
38384 EOF
38385
38386 echo "$as_me:38386: checking if you want to fork NSL requests" >&5
38387 echo $ECHO_N "checking if you want to fork NSL requests... $ECHO_C" >&6
38388
38389 # Check whether --enable-nsl-fork or --disable-nsl-fork was given.
38390 if test "${enable_nsl_fork+set}" = set; then
38391 enableval="$enable_nsl_fork"
38392 test "$enableval" != yes && enableval=no
38393 if test "$enableval" != "no" ; then
38394 use_nsl_fork=yes
38395 else
38396 use_nsl_fork=no
38397 fi
38398 else
38399 enableval=no
38400 use_nsl_fork=no
38401
38402 fi;
38403 echo "$as_me:38403: result: $use_nsl_fork" >&5
38404 echo "${ECHO_T}$use_nsl_fork" >&6
38405 if test "$use_nsl_fork" = yes ; then
38406 case "$host_os" in
38407 (mingw*)
38408
38409 cat >>confdefs.h <<\EOF
38410 #define _WINDOWS_NSL 1
38411 EOF
38412
38413 ;;
38414 (*)
38415
38416 cat >>confdefs.h <<\EOF
38417 #define NSL_FORK 1
38418 EOF
38419
38420 ;;
38421 esac
38422 fi
38423
38424 echo "$as_me:38424: checking if you want to log URL requests via syslog" >&5
38425 echo $ECHO_N "checking if you want to log URL requests via syslog... $ECHO_C" >&6
38426
38427 # Check whether --enable-syslog or --disable-syslog was given.
38428 if test "${enable_syslog+set}" = set; then
38429 enableval="$enable_syslog"
38430 test "$enableval" != yes && enableval=no
38431 if test "$enableval" != "no" ; then
38432 use_syslog=yes
38433 else
38434 use_syslog=no
38435 fi
38436 else
38437 enableval=no
38438 use_syslog=no
38439
38440 fi;
38441 echo "$as_me:38441: result: $use_syslog" >&5
38442 echo "${ECHO_T}$use_syslog" >&6
38443 test "$use_syslog" = yes &&
38444 cat >>confdefs.h <<\EOF
38445 #define SYSLOG_REQUESTED_URLS 1
38446 EOF
38447
38448 echo "$as_me:38448: checking if you want to underline links" >&5
38449 echo $ECHO_N "checking if you want to underline links... $ECHO_C" >&6
38450
38451 # Check whether --enable-underlines or --disable-underlines was given.
38452 if test "${enable_underlines+set}" = set; then
38453 enableval="$enable_underlines"
38454 test "$enableval" != yes && enableval=no
38455 if test "$enableval" != "no" ; then
38456 use_underline=yes
38457 else
38458 use_underline=no
38459 fi
38460 else
38461 enableval=no
38462 use_underline=no
38463
38464 fi;
38465 echo "$as_me:38465: result: $use_underline" >&5
38466 echo "${ECHO_T}$use_underline" >&6
38467 test "$use_underline" = yes &&
38468 cat >>confdefs.h <<\EOF
38469 #define UNDERLINE_LINKS 1
38470 EOF
38471
38472 test "$use_underline" = no &&
38473 cat >>confdefs.h <<\EOF
38474 #define UNDERLINE_LINKS 0
38475 EOF
38476
38477 echo "$as_me:38477: checking if htmlized lynx.cfg should be built" >&5
38478 echo $ECHO_N "checking if htmlized lynx.cfg should be built... $ECHO_C" >&6
38479
38480 # Check whether --enable-htmlized-cfg or --disable-htmlized-cfg was given.
38481 if test "${enable_htmlized_cfg+set}" = set; then
38482 enableval="$enable_htmlized_cfg"
38483 test "$enableval" != yes && enableval=no
38484 if test "$enableval" != "no" ; then
38485 use_htmlized_cfg=$enableval
38486 else
38487 use_htmlized_cfg=no
38488 fi
38489 else
38490 enableval=no
38491 use_htmlized_cfg=no
38492
38493 fi;
38494 echo "$as_me:38494: result: $use_htmlized_cfg" >&5
38495 echo "${ECHO_T}$use_htmlized_cfg" >&6
38496
38497 LYNXCFG_MAKE=''
38498 LYNXCFG_NO_MAKE=''
38499 if test "$use_htmlized_cfg" = no ; then
38500 LYNXCFG_MAKE='#'
38501 else
38502 LYNXCFG_NO_MAKE='#'
38503 fi
38504
38505 echo "$as_me:38505: checking if local doc directory should be linked to help page" >&5
38506 echo $ECHO_N "checking if local doc directory should be linked to help page... $ECHO_C" >&6
38507
38508 # Check whether --enable-local-docs or --disable-local-docs was given.
38509 if test "${enable_local_docs+set}" = set; then
38510 enableval="$enable_local_docs"
38511 test "$enableval" != yes && enableval=no
38512 if test "$enableval" != "no" ; then
38513 use_local_docs=$enableval
38514 else
38515 use_local_docs=no
38516 fi
38517 else
38518 enableval=no
38519 use_local_docs=no
38520
38521 fi;
38522 echo "$as_me:38522: result: $use_local_docs" >&5
38523 echo "${ECHO_T}$use_local_docs" >&6
38524
38525 LYNXDOC_MAKE=''
38526 if test "$use_local_docs" = no ; then
38527 LYNXDOC_MAKE='#'
38528 fi
38529
38530 echo "$as_me:38530: checking if help files should be gzip'ed" >&5
38531 echo $ECHO_N "checking if help files should be gzip'ed... $ECHO_C" >&6
38532
38533 # Check whether --enable-gzip-help or --disable-gzip-help was given.
38534 if test "${enable_gzip_help+set}" = set; then
38535 enableval="$enable_gzip_help"
38536 test "$enableval" != yes && enableval=no
38537 if test "$enableval" != "no" ; then
38538 use_gzip_help=$enableval
38539 else
38540 use_gzip_help=no
38541 fi
38542 else
38543 enableval=no
38544 use_gzip_help=no
38545
38546 fi;
38547 echo "$as_me:38547: result: $use_gzip_help" >&5
38548 echo "${ECHO_T}$use_gzip_help" >&6
38549
38550 # Extract the first word of "groff", so it can be a program name with args.
38551 set dummy groff; ac_word=$2
38552 echo "$as_me:38552: checking for $ac_word" >&5
38553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
38554 if test "${ac_cv_path_GROFF_PATH+set}" = set; then
38555 echo $ECHO_N "(cached) $ECHO_C" >&6
38556 else
38557 case $GROFF_PATH in
38558 [\\/]* | ?:[\\/]*)
38559 ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
38560 ;;
38561 *)
38562 ac_save_IFS=$IFS; IFS=$ac_path_separator
38563 ac_dummy="$PATH"
38564 for ac_dir in $ac_dummy; do
38565 IFS=$ac_save_IFS
38566 test -z "$ac_dir" && ac_dir=.
38567 if $as_executable_p "$ac_dir/$ac_word"; then
38568 ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
38569 echo "$as_me:38569: found $ac_dir/$ac_word" >&5
38570 break
38571 fi
38572 done
38573
38574 test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
38575 ;;
38576 esac
38577 fi
38578 GROFF_PATH=$ac_cv_path_GROFF_PATH
38579
38580 if test -n "$GROFF_PATH"; then
38581 echo "$as_me:38581: result: $GROFF_PATH" >&5
38582 echo "${ECHO_T}$GROFF_PATH" >&6
38583 else
38584 echo "$as_me:38584: result: no" >&5
38585 echo "${ECHO_T}no" >&6
38586 fi
38587
38588 for ac_prog in nroff mandoc
38589 do
38590 # Extract the first word of "$ac_prog", so it can be a program name with args.
38591 set dummy $ac_prog; ac_word=$2
38592 echo "$as_me:38592: checking for $ac_word" >&5
38593 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
38594 if test "${ac_cv_path_NROFF_PATH+set}" = set; then
38595 echo $ECHO_N "(cached) $ECHO_C" >&6
38596 else
38597 case $NROFF_PATH in
38598 [\\/]* | ?:[\\/]*)
38599 ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
38600 ;;
38601 *)
38602 ac_save_IFS=$IFS; IFS=$ac_path_separator
38603 ac_dummy="$PATH"
38604 for ac_dir in $ac_dummy; do
38605 IFS=$ac_save_IFS
38606 test -z "$ac_dir" && ac_dir=.
38607 if $as_executable_p "$ac_dir/$ac_word"; then
38608 ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
38609 echo "$as_me:38609: found $ac_dir/$ac_word" >&5
38610 break
38611 fi
38612 done
38613
38614 ;;
38615 esac
38616 fi
38617 NROFF_PATH=$ac_cv_path_NROFF_PATH
38618
38619 if test -n "$NROFF_PATH"; then
38620 echo "$as_me:38620: result: $NROFF_PATH" >&5
38621 echo "${ECHO_T}$NROFF_PATH" >&6
38622 else
38623 echo "$as_me:38623: result: no" >&5
38624 echo "${ECHO_T}no" >&6
38625 fi
38626
38627 test -n "$NROFF_PATH" && break
38628 done
38629 test -n "$NROFF_PATH" || NROFF_PATH="no"
38630
38631 # Extract the first word of "tbl", so it can be a program name with args.
38632 set dummy tbl; ac_word=$2
38633 echo "$as_me:38633: checking for $ac_word" >&5
38634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
38635 if test "${ac_cv_path_TBL_PATH+set}" = set; then
38636 echo $ECHO_N "(cached) $ECHO_C" >&6
38637 else
38638 case $TBL_PATH in
38639 [\\/]* | ?:[\\/]*)
38640 ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
38641 ;;
38642 *)
38643 ac_save_IFS=$IFS; IFS=$ac_path_separator
38644 ac_dummy="$PATH"
38645 for ac_dir in $ac_dummy; do
38646 IFS=$ac_save_IFS
38647 test -z "$ac_dir" && ac_dir=.
38648 if $as_executable_p "$ac_dir/$ac_word"; then
38649 ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
38650 echo "$as_me:38650: found $ac_dir/$ac_word" >&5
38651 break
38652 fi
38653 done
38654
38655 test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
38656 ;;
38657 esac
38658 fi
38659 TBL_PATH=$ac_cv_path_TBL_PATH
38660
38661 if test -n "$TBL_PATH"; then
38662 echo "$as_me:38662: result: $TBL_PATH" >&5
38663 echo "${ECHO_T}$TBL_PATH" >&6
38664 else
38665 echo "$as_me:38665: result: no" >&5
38666 echo "${ECHO_T}no" >&6
38667 fi
38668
38669 if test "x$GROFF_PATH" = xno
38670 then
38671 NROFF_NOTE=
38672 GROFF_NOTE="#"
38673 else
38674 NROFF_NOTE="#"
38675 GROFF_NOTE=
38676 fi
38677
38678 case "x${with_man2html}" in
38679 (xno)
38680 cf_man2html=no
38681 ;;
38682 (x|xyes)
38683 # Extract the first word of "man2html", so it can be a program name with args.
38684 set dummy man2html; ac_word=$2
38685 echo "$as_me:38685: checking for $ac_word" >&5
38686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
38687 if test "${ac_cv_path_cf_man2html+set}" = set; then
38688 echo $ECHO_N "(cached) $ECHO_C" >&6
38689 else
38690 case $cf_man2html in
38691 [\\/]* | ?:[\\/]*)
38692 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
38693 ;;
38694 *)
38695 ac_save_IFS=$IFS; IFS=$ac_path_separator
38696 ac_dummy="$PATH"
38697 for ac_dir in $ac_dummy; do
38698 IFS=$ac_save_IFS
38699 test -z "$ac_dir" && ac_dir=.
38700 if $as_executable_p "$ac_dir/$ac_word"; then
38701 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
38702 echo "$as_me:38702: found $ac_dir/$ac_word" >&5
38703 break
38704 fi
38705 done
38706
38707 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
38708 ;;
38709 esac
38710 fi
38711 cf_man2html=$ac_cv_path_cf_man2html
38712
38713 if test -n "$cf_man2html"; then
38714 echo "$as_me:38714: result: $cf_man2html" >&5
38715 echo "${ECHO_T}$cf_man2html" >&6
38716 else
38717 echo "$as_me:38717: result: no" >&5
38718 echo "${ECHO_T}no" >&6
38719 fi
38720
38721 case "x$cf_man2html" in
38722 (x/*)
38723 echo "$as_me:38723: checking for the modified Earl Hood script" >&5
38724 echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
38725 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
38726 then
38727 cf_man2html_ok=yes
38728 else
38729 cf_man2html=no
38730 cf_man2html_ok=no
38731 fi
38732 echo "$as_me:38732: result: $cf_man2html_ok" >&5
38733 echo "${ECHO_T}$cf_man2html_ok" >&6
38734 ;;
38735 (*)
38736 cf_man2html=no
38737 ;;
38738 esac
38739 esac
38740
38741 echo "$as_me:38741: checking for program to convert manpage to html" >&5
38742 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
38743
38744 # Check whether --with-man2html or --without-man2html was given.
38745 if test "${with_man2html+set}" = set; then
38746 withval="$with_man2html"
38747 cf_man2html=$withval
38748 else
38749 cf_man2html=$cf_man2html
38750 fi;
38751
38752 cf_with_groff=no
38753
38754 case $cf_man2html in
38755 (yes)
38756 echo "$as_me:38756: result: man2html" >&5
38757 echo "${ECHO_T}man2html" >&6
38758 # Extract the first word of "man2html", so it can be a program name with args.
38759 set dummy man2html; ac_word=$2
38760 echo "$as_me:38760: checking for $ac_word" >&5
38761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
38762 if test "${ac_cv_path_cf_man2html+set}" = set; then
38763 echo $ECHO_N "(cached) $ECHO_C" >&6
38764 else
38765 case $cf_man2html in
38766 [\\/]* | ?:[\\/]*)
38767 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
38768 ;;
38769 *)
38770 ac_save_IFS=$IFS; IFS=$ac_path_separator
38771 ac_dummy="$PATH"
38772 for ac_dir in $ac_dummy; do
38773 IFS=$ac_save_IFS
38774 test -z "$ac_dir" && ac_dir=.
38775 if $as_executable_p "$ac_dir/$ac_word"; then
38776 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
38777 echo "$as_me:38777: found $ac_dir/$ac_word" >&5
38778 break
38779 fi
38780 done
38781
38782 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
38783 ;;
38784 esac
38785 fi
38786 cf_man2html=$ac_cv_path_cf_man2html
38787
38788 if test -n "$cf_man2html"; then
38789 echo "$as_me:38789: result: $cf_man2html" >&5
38790 echo "${ECHO_T}$cf_man2html" >&6
38791 else
38792 echo "$as_me:38792: result: no" >&5
38793 echo "${ECHO_T}no" >&6
38794 fi
38795
38796 ;;
38797 (no|groff|*/groff*)
38798 cf_with_groff=yes
38799 cf_man2html=$GROFF_PATH
38800 echo "$as_me:38800: result: $cf_man2html" >&5
38801 echo "${ECHO_T}$cf_man2html" >&6
38802 ;;
38803 (*)
38804 echo "$as_me:38804: result: $cf_man2html" >&5
38805 echo "${ECHO_T}$cf_man2html" >&6
38806 ;;
38807 esac
38808
38809 MAN2HTML_TEMP="man2html.tmp"
38810 cat >$MAN2HTML_TEMP <<CF_EOF
38811 #!$SHELL
38812 # Temporary script generated by CF_WITH_MAN2HTML
38813 # Convert inputs to html, sending result to standard output.
38814 #
38815 # Parameters:
38816 # \${1} = rootname of file to convert
38817 # \${2} = suffix of file to convert, e.g., "1"
38818 # \${3} = macros to use, e.g., "man"
38819 #
38820 ROOT=\$1
38821 TYPE=\$2
38822 MACS=\$3
38823
38824 unset LANG
38825 unset LC_ALL
38826 unset LC_CTYPE
38827 unset LANGUAGE
38828 GROFF_NO_SGR=stupid
38829 export GROFF_NO_SGR
38830
38831 CF_EOF
38832
38833 NROFF_OPTS=
38834 if test "x$cf_with_groff" = xyes
38835 then
38836 MAN2HTML_NOTE="$GROFF_NOTE"
38837 MAN2HTML_PATH="$GROFF_PATH"
38838 cat >>$MAN2HTML_TEMP <<CF_EOF
38839 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
38840 CF_EOF
38841 else
38842 # disable hyphenation if this is groff
38843 if test "x$GROFF_PATH" != xno
38844 then
38845 echo "$as_me:38845: checking if nroff is really groff" >&5
38846 echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
38847 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
38848 test -n "$cf_check_groff" && cf_check_groff=yes
38849 test -n "$cf_check_groff" || cf_check_groff=no
38850 echo "$as_me:38850: result: $cf_check_groff" >&5
38851 echo "${ECHO_T}$cf_check_groff" >&6
38852 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
38853 fi
38854 MAN2HTML_NOTE=""
38855
38856 if test "x$prefix" != xNONE; then
38857 cf_path_syntax="$prefix"
38858 else
38859 cf_path_syntax="$ac_default_prefix"
38860 fi
38861
38862 case "x$cf_man2html" in
38863 (x\$\(*\)*|x\'*\'*)
38864 ;;
38865 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
38866 ;;
38867 (x\$\{*prefix\}*|x\$\{*dir\}*)
38868 eval cf_man2html="$cf_man2html"
38869 case "x$cf_man2html" in
38870 (xNONE/*)
38871 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
38872 ;;
38873 esac
38874 ;;
38875 (xno|xNONE/*)
38876 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
38877 ;;
38878 (*)
38879 { { echo "$as_me:38879: error: expected a pathname, not \"$cf_man2html\"" >&5
38880 echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
38881 { (exit 1); exit 1; }; }
38882 ;;
38883 esac
38884
38885 MAN2HTML_PATH="$cf_man2html"
38886 echo "$as_me:38886: checking for $cf_man2html top/bottom margins" >&5
38887 echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
38888
38889 # for this example, expect 3 lines of content, the remainder is head/foot
38890 cat >conftest.in <<CF_EOF
38891 .TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
38892 .SH SECTION
38893 MARKER
38894 CF_EOF
38895
38896 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
38897
38898 cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
38899 cf_man2html_top=`expr "$cf_man2html_1st" - 2`
38900 cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
38901 cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
38902 cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
38903
38904 echo "$as_me:38904: result: $cf_man2html_top_bot" >&5
38905 echo "${ECHO_T}$cf_man2html_top_bot" >&6
38906
38907 echo "$as_me:38907: checking for pagesize to use" >&5
38908 echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
38909 for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
38910 do
38911 cat >>conftest.in <<CF_EOF
38912 .nf
38913 0
38914 1
38915 2
38916 3
38917 4
38918 5
38919 6
38920 7
38921 8
38922 9
38923 CF_EOF
38924 done
38925
38926 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
38927 cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
38928 test -z "$cf_man2html_page" && cf_man2html_page=99999
38929 test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
38930
38931 rm -rf conftest*
38932 echo "$as_me:38932: result: $cf_man2html_page" >&5
38933 echo "${ECHO_T}$cf_man2html_page" >&6
38934
38935 cat >>$MAN2HTML_TEMP <<CF_EOF
38936 : \${MAN2HTML_PATH=$MAN2HTML_PATH}
38937 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
38938 case \${TYPE} in
38939 (ms)
38940 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
38941 ;;
38942 (*)
38943 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
38944 ;;
38945 esac
38946 CF_EOF
38947 fi
38948
38949 chmod 700 $MAN2HTML_TEMP
38950
38951 echo "$as_me:38951: checking if you want to use libbz2 for decompression of some bzip2 files" >&5
38952 echo $ECHO_N "checking if you want to use libbz2 for decompression of some bzip2 files... $ECHO_C" >&6
38953
38954 # Check whether --with-bzlib or --without-bzlib was given.
38955 if test "${with_bzlib+set}" = set; then
38956 withval="$with_bzlib"
38957 use_bzlib=$withval
38958 else
38959 use_bzlib=yes
38960 fi;
38961 echo "$as_me:38961: result: $use_bzlib" >&5
38962 echo "${ECHO_T}$use_bzlib" >&6
38963
38964 if test ".$use_bzlib" != ".no" ; then
38965
38966 case "x$use_bzlib" in
38967 (xno|xyes|x)
38968 ;;
38969 (*)
38970
38971 for cf_searchpath in `echo "$use_bzlib" | tr $PATH_SEPARATOR ' '`; do
38972 if test -d "$cf_searchpath/include" ; then
38973
38974 if test -n "$cf_searchpath/include" ; then
38975 for cf_add_incdir in $cf_searchpath/include
38976 do
38977 while test "$cf_add_incdir" != /usr/include
38978 do
38979 if test -d "$cf_add_incdir"
38980 then
38981 cf_have_incdir=no
38982 if test -n "$CFLAGS$CPPFLAGS" ; then
38983 # a loop is needed to ensure we can add subdirs of existing dirs
38984 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
38985 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
38986 cf_have_incdir=yes; break
38987 fi
38988 done
38989 fi
38990
38991 if test "$cf_have_incdir" = no ; then
38992 if test "$cf_add_incdir" = /usr/local/include ; then
38993 if test "$GCC" = yes
38994 then
38995 cf_save_CPPFLAGS=$CPPFLAGS
38996
38997 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
38998 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
38999
39000 cat >"conftest.$ac_ext" <<_ACEOF
39001 #line 39001 "configure"
39002 #include "confdefs.h"
39003 #include <stdio.h>
39004 int
39005 main (void)
39006 {
39007 printf("Hello")
39008 ;
39009 return 0;
39010 }
39011 _ACEOF
39012 rm -f "conftest.$ac_objext"
39013 if { (eval echo "$as_me:39013: \"$ac_compile\"") >&5
39014 (eval $ac_compile) 2>&5
39015 ac_status=$?
39016 echo "$as_me:39016: \$? = $ac_status" >&5
39017 (exit "$ac_status"); } &&
39018 { ac_try='test -s "conftest.$ac_objext"'
39019 { (eval echo "$as_me:39019: \"$ac_try\"") >&5
39020 (eval $ac_try) 2>&5
39021 ac_status=$?
39022 echo "$as_me:39022: \$? = $ac_status" >&5
39023 (exit "$ac_status"); }; }; then
39024 :
39025 else
39026 echo "$as_me: failed program was:" >&5
39027 cat "conftest.$ac_ext" >&5
39028 cf_have_incdir=yes
39029 fi
39030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39031 CPPFLAGS=$cf_save_CPPFLAGS
39032 fi
39033 fi
39034 fi
39035
39036 if test "$cf_have_incdir" = no ; then
39037 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
39038
39039 echo "${as_me:-configure}:39039: testing adding $cf_add_incdir to include-path ..." 1>&5
39040
39041 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
39042
39043 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
39044 test "$cf_top_incdir" = "$cf_add_incdir" && break
39045 cf_add_incdir="$cf_top_incdir"
39046 else
39047 break
39048 fi
39049 else
39050 break
39051 fi
39052 done
39053 done
39054 fi
39055
39056 elif test -d "$cf_searchpath/../include" ; then
39057
39058 if test -n "$cf_searchpath/../include" ; then
39059 for cf_add_incdir in $cf_searchpath/../include
39060 do
39061 while test "$cf_add_incdir" != /usr/include
39062 do
39063 if test -d "$cf_add_incdir"
39064 then
39065 cf_have_incdir=no
39066 if test -n "$CFLAGS$CPPFLAGS" ; then
39067 # a loop is needed to ensure we can add subdirs of existing dirs
39068 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
39069 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
39070 cf_have_incdir=yes; break
39071 fi
39072 done
39073 fi
39074
39075 if test "$cf_have_incdir" = no ; then
39076 if test "$cf_add_incdir" = /usr/local/include ; then
39077 if test "$GCC" = yes
39078 then
39079 cf_save_CPPFLAGS=$CPPFLAGS
39080
39081 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
39082 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
39083
39084 cat >"conftest.$ac_ext" <<_ACEOF
39085 #line 39085 "configure"
39086 #include "confdefs.h"
39087 #include <stdio.h>
39088 int
39089 main (void)
39090 {
39091 printf("Hello")
39092 ;
39093 return 0;
39094 }
39095 _ACEOF
39096 rm -f "conftest.$ac_objext"
39097 if { (eval echo "$as_me:39097: \"$ac_compile\"") >&5
39098 (eval $ac_compile) 2>&5
39099 ac_status=$?
39100 echo "$as_me:39100: \$? = $ac_status" >&5
39101 (exit "$ac_status"); } &&
39102 { ac_try='test -s "conftest.$ac_objext"'
39103 { (eval echo "$as_me:39103: \"$ac_try\"") >&5
39104 (eval $ac_try) 2>&5
39105 ac_status=$?
39106 echo "$as_me:39106: \$? = $ac_status" >&5
39107 (exit "$ac_status"); }; }; then
39108 :
39109 else
39110 echo "$as_me: failed program was:" >&5
39111 cat "conftest.$ac_ext" >&5
39112 cf_have_incdir=yes
39113 fi
39114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39115 CPPFLAGS=$cf_save_CPPFLAGS
39116 fi
39117 fi
39118 fi
39119
39120 if test "$cf_have_incdir" = no ; then
39121 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
39122
39123 echo "${as_me:-configure}:39123: testing adding $cf_add_incdir to include-path ..." 1>&5
39124
39125 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
39126
39127 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
39128 test "$cf_top_incdir" = "$cf_add_incdir" && break
39129 cf_add_incdir="$cf_top_incdir"
39130 else
39131 break
39132 fi
39133 else
39134 break
39135 fi
39136 done
39137 done
39138 fi
39139
39140 else
39141 { { echo "$as_me:39141: error: cannot find bzip2 library under $use_bzlib" >&5
39142 echo "$as_me: error: cannot find bzip2 library under $use_bzlib" >&2;}
39143 { (exit 1); exit 1; }; }
39144 fi
39145 if test -d "$cf_searchpath/lib" ; then
39146
39147 if test -n "$cf_searchpath/lib" ; then
39148 for cf_add_libdir in $cf_searchpath/lib
39149 do
39150 if test "$cf_add_libdir" = /usr/lib ; then
39151 :
39152 elif test -d "$cf_add_libdir"
39153 then
39154 cf_have_libdir=no
39155 if test -n "$LDFLAGS$LIBS" ; then
39156 # a loop is needed to ensure we can add subdirs of existing dirs
39157 for cf_test_libdir in $LDFLAGS $LIBS ; do
39158 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
39159 cf_have_libdir=yes; break
39160 fi
39161 done
39162 fi
39163 if test "$cf_have_libdir" = no ; then
39164 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
39165
39166 echo "${as_me:-configure}:39166: testing adding $cf_add_libdir to library-path ..." 1>&5
39167
39168 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
39169 fi
39170 fi
39171 done
39172 fi
39173
39174 elif test -d "$cf_searchpath" ; then
39175
39176 if test -n "$cf_searchpath" ; then
39177 for cf_add_libdir in $cf_searchpath
39178 do
39179 if test "$cf_add_libdir" = /usr/lib ; then
39180 :
39181 elif test -d "$cf_add_libdir"
39182 then
39183 cf_have_libdir=no
39184 if test -n "$LDFLAGS$LIBS" ; then
39185 # a loop is needed to ensure we can add subdirs of existing dirs
39186 for cf_test_libdir in $LDFLAGS $LIBS ; do
39187 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
39188 cf_have_libdir=yes; break
39189 fi
39190 done
39191 fi
39192 if test "$cf_have_libdir" = no ; then
39193 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
39194
39195 echo "${as_me:-configure}:39195: testing adding $cf_add_libdir to library-path ..." 1>&5
39196
39197 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
39198 fi
39199 fi
39200 done
39201 fi
39202
39203 else
39204 { { echo "$as_me:39204: error: cannot find bzip2 library under $use_bzlib" >&5
39205 echo "$as_me: error: cannot find bzip2 library under $use_bzlib" >&2;}
39206 { (exit 1); exit 1; }; }
39207 fi
39208 done
39209
39210 test -n "$verbose" && echo " setting path value for bzip2 library to $use_bzlib" 1>&6
39211
39212 echo "${as_me:-configure}:39212: testing setting path value for bzip2 library to $use_bzlib ..." 1>&5
39213
39214 ;;
39215 esac
39216
39217 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
39218 # will be set on completion of the AC_LINK_IFELSE below.
39219 cf_cv_header_path_bz2=
39220 cf_cv_library_path_bz2=
39221
39222 echo "${as_me:-configure}:39222: testing Starting FIND_LINKAGE(bz2,bzlib) ..." 1>&5
39223
39224 cf_save_LIBS="$LIBS"
39225
39226 cat >"conftest.$ac_ext" <<_ACEOF
39227 #line 39227 "configure"
39228 #include "confdefs.h"
39229
39230 #include <stdio.h>
39231 #include <bzlib.h>
39232
39233 int
39234 main (void)
39235 {
39236
39237 BZ2_bzopen("name","mode")
39238
39239 ;
39240 return 0;
39241 }
39242 _ACEOF
39243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
39244 if { (eval echo "$as_me:39244: \"$ac_link\"") >&5
39245 (eval $ac_link) 2>&5
39246 ac_status=$?
39247 echo "$as_me:39247: \$? = $ac_status" >&5
39248 (exit "$ac_status"); } &&
39249 { ac_try='test -s "conftest$ac_exeext"'
39250 { (eval echo "$as_me:39250: \"$ac_try\"") >&5
39251 (eval $ac_try) 2>&5
39252 ac_status=$?
39253 echo "$as_me:39253: \$? = $ac_status" >&5
39254 (exit "$ac_status"); }; }; then
39255
39256 cf_cv_find_linkage_bz2=yes
39257 cf_cv_header_path_bz2=/usr/include
39258 cf_cv_library_path_bz2=/usr/lib
39259
39260 else
39261 echo "$as_me: failed program was:" >&5
39262 cat "conftest.$ac_ext" >&5
39263
39264 LIBS="-lbz2 $cf_save_LIBS"
39265
39266 cat >"conftest.$ac_ext" <<_ACEOF
39267 #line 39267 "configure"
39268 #include "confdefs.h"
39269
39270 #include <stdio.h>
39271 #include <bzlib.h>
39272
39273 int
39274 main (void)
39275 {
39276
39277 BZ2_bzopen("name","mode")
39278
39279 ;
39280 return 0;
39281 }
39282 _ACEOF
39283 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
39284 if { (eval echo "$as_me:39284: \"$ac_link\"") >&5
39285 (eval $ac_link) 2>&5
39286 ac_status=$?
39287 echo "$as_me:39287: \$? = $ac_status" >&5
39288 (exit "$ac_status"); } &&
39289 { ac_try='test -s "conftest$ac_exeext"'
39290 { (eval echo "$as_me:39290: \"$ac_try\"") >&5
39291 (eval $ac_try) 2>&5
39292 ac_status=$?
39293 echo "$as_me:39293: \$? = $ac_status" >&5
39294 (exit "$ac_status"); }; }; then
39295
39296 cf_cv_find_linkage_bz2=yes
39297 cf_cv_header_path_bz2=/usr/include
39298 cf_cv_library_path_bz2=/usr/lib
39299 cf_cv_library_file_bz2="-lbz2"
39300
39301 else
39302 echo "$as_me: failed program was:" >&5
39303 cat "conftest.$ac_ext" >&5
39304
39305 cf_cv_find_linkage_bz2=no
39306 LIBS="$cf_save_LIBS"
39307
39308 test -n "$verbose" && echo " find linkage for bz2 library" 1>&6
39309
39310 echo "${as_me:-configure}:39310: testing find linkage for bz2 library ..." 1>&5
39311
39312 echo "${as_me:-configure}:39312: testing Searching for headers in FIND_LINKAGE(bz2,bzlib) ..." 1>&5
39313
39314 cf_save_CPPFLAGS="$CPPFLAGS"
39315 cf_test_CPPFLAGS="$CPPFLAGS"
39316
39317 cf_search=
39318
39319 # collect the current set of include-directories from compiler flags
39320 cf_header_path_list=""
39321 if test -n "${CFLAGS}${CPPFLAGS}" ; then
39322 for cf_header_path in $CPPFLAGS $CFLAGS
39323 do
39324 case "$cf_header_path" in
39325 (-I*)
39326 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
39327
39328 test "x$cf_header_path" != "xNONE" && \
39329 test -d "$cf_header_path" && \
39330 {
39331 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
39332 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
39333 test -d "$cf_header_path/include/bzlib" && cf_search="$cf_search $cf_header_path/include/bzlib"
39334 test -d "$cf_header_path/include/bzlib/include" && cf_search="$cf_search $cf_header_path/include/bzlib/include"
39335 test -d "$cf_header_path/bzlib/include" && cf_search="$cf_search $cf_header_path/bzlib/include"
39336 test -d "$cf_header_path/bzlib/include/bzlib" && cf_search="$cf_search $cf_header_path/bzlib/include/bzlib"
39337 }
39338
39339 cf_header_path_list="$cf_header_path_list $cf_search"
39340 ;;
39341 esac
39342 done
39343 fi
39344
39345 # add the variations for the package we are looking for
39346
39347 cf_search=
39348
39349 test "x$prefix" != "xNONE" && \
39350 test -d "$prefix" && \
39351 {
39352 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
39353 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
39354 test -d "$prefix/include/bzlib" && cf_search="$cf_search $prefix/include/bzlib"
39355 test -d "$prefix/include/bzlib/include" && cf_search="$cf_search $prefix/include/bzlib/include"
39356 test -d "$prefix/bzlib/include" && cf_search="$cf_search $prefix/bzlib/include"
39357 test -d "$prefix/bzlib/include/bzlib" && cf_search="$cf_search $prefix/bzlib/include/bzlib"
39358 }
39359
39360 for cf_subdir_prefix in \
39361 /usr \
39362 /usr/local \
39363 /usr/pkg \
39364 /opt \
39365 /opt/local \
39366 $HOME
39367 do
39368
39369 test "x$cf_subdir_prefix" != "x$prefix" && \
39370 test -d "$cf_subdir_prefix" && \
39371 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
39372 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
39373 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
39374 test -d "$cf_subdir_prefix/include/bzlib" && cf_search="$cf_search $cf_subdir_prefix/include/bzlib"
39375 test -d "$cf_subdir_prefix/include/bzlib/include" && cf_search="$cf_search $cf_subdir_prefix/include/bzlib/include"
39376 test -d "$cf_subdir_prefix/bzlib/include" && cf_search="$cf_search $cf_subdir_prefix/bzlib/include"
39377 test -d "$cf_subdir_prefix/bzlib/include/bzlib" && cf_search="$cf_search $cf_subdir_prefix/bzlib/include/bzlib"
39378 }
39379
39380 done
39381
39382 test "$includedir" != NONE && \
39383 test "$includedir" != "/usr/include" && \
39384 test -d "$includedir" && {
39385 test -d "$includedir" && cf_search="$cf_search $includedir"
39386 test -d "$includedir/bzlib" && cf_search="$cf_search $includedir/bzlib"
39387 }
39388
39389 test "$oldincludedir" != NONE && \
39390 test "$oldincludedir" != "/usr/include" && \
39391 test -d "$oldincludedir" && {
39392 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
39393 test -d "$oldincludedir/bzlib" && cf_search="$cf_search $oldincludedir/bzlib"
39394 }
39395
39396 cf_search="$cf_search $cf_header_path_list"
39397
39398 for cf_cv_header_path_bz2 in $cf_search
39399 do
39400 if test -d "$cf_cv_header_path_bz2" ; then
39401 test -n "$verbose" && echo " ... testing $cf_cv_header_path_bz2" 1>&6
39402
39403 echo "${as_me:-configure}:39403: testing ... testing $cf_cv_header_path_bz2 ..." 1>&5
39404
39405 CPPFLAGS="$cf_save_CPPFLAGS"
39406
39407 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
39408 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_bz2"
39409
39410 cat >"conftest.$ac_ext" <<_ACEOF
39411 #line 39411 "configure"
39412 #include "confdefs.h"
39413
39414 #include <stdio.h>
39415 #include <bzlib.h>
39416
39417 int
39418 main (void)
39419 {
39420
39421 BZ2_bzopen("name","mode")
39422
39423 ;
39424 return 0;
39425 }
39426 _ACEOF
39427 rm -f "conftest.$ac_objext"
39428 if { (eval echo "$as_me:39428: \"$ac_compile\"") >&5
39429 (eval $ac_compile) 2>&5
39430 ac_status=$?
39431 echo "$as_me:39431: \$? = $ac_status" >&5
39432 (exit "$ac_status"); } &&
39433 { ac_try='test -s "conftest.$ac_objext"'
39434 { (eval echo "$as_me:39434: \"$ac_try\"") >&5
39435 (eval $ac_try) 2>&5
39436 ac_status=$?
39437 echo "$as_me:39437: \$? = $ac_status" >&5
39438 (exit "$ac_status"); }; }; then
39439
39440 test -n "$verbose" && echo " ... found bz2 headers in $cf_cv_header_path_bz2" 1>&6
39441
39442 echo "${as_me:-configure}:39442: testing ... found bz2 headers in $cf_cv_header_path_bz2 ..." 1>&5
39443
39444 cf_cv_find_linkage_bz2=maybe
39445 cf_test_CPPFLAGS="$CPPFLAGS"
39446 break
39447 else
39448 echo "$as_me: failed program was:" >&5
39449 cat "conftest.$ac_ext" >&5
39450
39451 CPPFLAGS="$cf_save_CPPFLAGS"
39452
39453 fi
39454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39455 fi
39456 done
39457
39458 if test "$cf_cv_find_linkage_bz2" = maybe ; then
39459
39460 echo "${as_me:-configure}:39460: testing Searching for bz2 library in FIND_LINKAGE(bz2,bzlib) ..." 1>&5
39461
39462 cf_save_LIBS="$LIBS"
39463 cf_save_LDFLAGS="$LDFLAGS"
39464
39465 CPPFLAGS="$cf_test_CPPFLAGS"
39466 LIBS="-lbz2 $cf_save_LIBS"
39467 cat >"conftest.$ac_ext" <<_ACEOF
39468 #line 39468 "configure"
39469 #include "confdefs.h"
39470
39471 #include <stdio.h>
39472 #include <bzlib.h>
39473
39474 int
39475 main (void)
39476 {
39477
39478 BZ2_bzopen("name","mode")
39479
39480 ;
39481 return 0;
39482 }
39483 _ACEOF
39484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
39485 if { (eval echo "$as_me:39485: \"$ac_link\"") >&5
39486 (eval $ac_link) 2>&5
39487 ac_status=$?
39488 echo "$as_me:39488: \$? = $ac_status" >&5
39489 (exit "$ac_status"); } &&
39490 { ac_try='test -s "conftest$ac_exeext"'
39491 { (eval echo "$as_me:39491: \"$ac_try\"") >&5
39492 (eval $ac_try) 2>&5
39493 ac_status=$?
39494 echo "$as_me:39494: \$? = $ac_status" >&5
39495 (exit "$ac_status"); }; }; then
39496
39497 test -n "$verbose" && echo " ... found bz2 library in system" 1>&6
39498
39499 echo "${as_me:-configure}:39499: testing ... found bz2 library in system ..." 1>&5
39500
39501 cf_cv_find_linkage_bz2=yes
39502 else
39503 echo "$as_me: failed program was:" >&5
39504 cat "conftest.$ac_ext" >&5
39505 fi
39506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
39507 CPPFLAGS="$cf_save_CPPFLAGS"
39508 LIBS="$cf_save_LIBS"
39509
39510 if test "$cf_cv_find_linkage_bz2" != yes ; then
39511
39512 cf_search=
39513 cf_library_path_list=""
39514 if test -n "${LDFLAGS}${LIBS}" ; then
39515 for cf_library_path in $LDFLAGS $LIBS
39516 do
39517 case "$cf_library_path" in
39518 (-L*)
39519 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
39520
39521 test "x$cf_library_path" != "xNONE" && \
39522 test -d "$cf_library_path" && \
39523 {
39524 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
39525 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
39526 test -d "$cf_library_path/lib/bz2" && cf_search="$cf_search $cf_library_path/lib/bz2"
39527 test -d "$cf_library_path/lib/bz2/lib" && cf_search="$cf_search $cf_library_path/lib/bz2/lib"
39528 test -d "$cf_library_path/bz2/lib" && cf_search="$cf_search $cf_library_path/bz2/lib"
39529 test -d "$cf_library_path/bz2/lib/bz2" && cf_search="$cf_search $cf_library_path/bz2/lib/bz2"
39530 }
39531
39532 cf_library_path_list="$cf_library_path_list $cf_search"
39533 ;;
39534 esac
39535 done
39536 fi
39537
39538 cf_search=
39539
39540 test "x$prefix" != "xNONE" && \
39541 test -d "$prefix" && \
39542 {
39543 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
39544 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
39545 test -d "$prefix/lib/bz2" && cf_search="$cf_search $prefix/lib/bz2"
39546 test -d "$prefix/lib/bz2/lib" && cf_search="$cf_search $prefix/lib/bz2/lib"
39547 test -d "$prefix/bz2/lib" && cf_search="$cf_search $prefix/bz2/lib"
39548 test -d "$prefix/bz2/lib/bz2" && cf_search="$cf_search $prefix/bz2/lib/bz2"
39549 }
39550
39551 for cf_subdir_prefix in \
39552 /usr \
39553 /usr/local \
39554 /usr/pkg \
39555 /opt \
39556 /opt/local \
39557 $HOME
39558 do
39559
39560 test "x$cf_subdir_prefix" != "x$prefix" && \
39561 test -d "$cf_subdir_prefix" && \
39562 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
39563 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
39564 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
39565 test -d "$cf_subdir_prefix/lib/bz2" && cf_search="$cf_search $cf_subdir_prefix/lib/bz2"
39566 test -d "$cf_subdir_prefix/lib/bz2/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/bz2/lib"
39567 test -d "$cf_subdir_prefix/bz2/lib" && cf_search="$cf_search $cf_subdir_prefix/bz2/lib"
39568 test -d "$cf_subdir_prefix/bz2/lib/bz2" && cf_search="$cf_search $cf_subdir_prefix/bz2/lib/bz2"
39569 }
39570
39571 done
39572
39573 cf_search="$cf_library_path_list $cf_search"
39574
39575 for cf_cv_library_path_bz2 in $cf_search
39576 do
39577 if test -d "$cf_cv_library_path_bz2" ; then
39578 test -n "$verbose" && echo " ... testing $cf_cv_library_path_bz2" 1>&6
39579
39580 echo "${as_me:-configure}:39580: testing ... testing $cf_cv_library_path_bz2 ..." 1>&5
39581
39582 CPPFLAGS="$cf_test_CPPFLAGS"
39583 LIBS="-lbz2 $cf_save_LIBS"
39584 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_bz2"
39585 cat >"conftest.$ac_ext" <<_ACEOF
39586 #line 39586 "configure"
39587 #include "confdefs.h"
39588
39589 #include <stdio.h>
39590 #include <bzlib.h>
39591
39592 int
39593 main (void)
39594 {
39595
39596 BZ2_bzopen("name","mode")
39597
39598 ;
39599 return 0;
39600 }
39601 _ACEOF
39602 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
39603 if { (eval echo "$as_me:39603: \"$ac_link\"") >&5
39604 (eval $ac_link) 2>&5
39605 ac_status=$?
39606 echo "$as_me:39606: \$? = $ac_status" >&5
39607 (exit "$ac_status"); } &&
39608 { ac_try='test -s "conftest$ac_exeext"'
39609 { (eval echo "$as_me:39609: \"$ac_try\"") >&5
39610 (eval $ac_try) 2>&5
39611 ac_status=$?
39612 echo "$as_me:39612: \$? = $ac_status" >&5
39613 (exit "$ac_status"); }; }; then
39614
39615 test -n "$verbose" && echo " ... found bz2 library in $cf_cv_library_path_bz2" 1>&6
39616
39617 echo "${as_me:-configure}:39617: testing ... found bz2 library in $cf_cv_library_path_bz2 ..." 1>&5
39618
39619 cf_cv_find_linkage_bz2=yes
39620 cf_cv_library_file_bz2="-lbz2"
39621 break
39622 else
39623 echo "$as_me: failed program was:" >&5
39624 cat "conftest.$ac_ext" >&5
39625
39626 CPPFLAGS="$cf_save_CPPFLAGS"
39627 LIBS="$cf_save_LIBS"
39628 LDFLAGS="$cf_save_LDFLAGS"
39629
39630 fi
39631 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
39632 fi
39633 done
39634 CPPFLAGS="$cf_save_CPPFLAGS"
39635 LDFLAGS="$cf_save_LDFLAGS"
39636 fi
39637
39638 else
39639 cf_cv_find_linkage_bz2=no
39640 fi
39641
39642 fi
39643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
39644
39645 fi
39646 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
39647
39648 LIBS="$cf_save_LIBS"
39649
39650 if test "$cf_cv_find_linkage_bz2" = yes ; then
39651
39652 if test -n "$cf_cv_header_path_bz2" ; then
39653 for cf_add_incdir in $cf_cv_header_path_bz2
39654 do
39655 while test "$cf_add_incdir" != /usr/include
39656 do
39657 if test -d "$cf_add_incdir"
39658 then
39659 cf_have_incdir=no
39660 if test -n "$CFLAGS$CPPFLAGS" ; then
39661 # a loop is needed to ensure we can add subdirs of existing dirs
39662 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
39663 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
39664 cf_have_incdir=yes; break
39665 fi
39666 done
39667 fi
39668
39669 if test "$cf_have_incdir" = no ; then
39670 if test "$cf_add_incdir" = /usr/local/include ; then
39671 if test "$GCC" = yes
39672 then
39673 cf_save_CPPFLAGS=$CPPFLAGS
39674
39675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
39676 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
39677
39678 cat >"conftest.$ac_ext" <<_ACEOF
39679 #line 39679 "configure"
39680 #include "confdefs.h"
39681 #include <stdio.h>
39682 int
39683 main (void)
39684 {
39685 printf("Hello")
39686 ;
39687 return 0;
39688 }
39689 _ACEOF
39690 rm -f "conftest.$ac_objext"
39691 if { (eval echo "$as_me:39691: \"$ac_compile\"") >&5
39692 (eval $ac_compile) 2>&5
39693 ac_status=$?
39694 echo "$as_me:39694: \$? = $ac_status" >&5
39695 (exit "$ac_status"); } &&
39696 { ac_try='test -s "conftest.$ac_objext"'
39697 { (eval echo "$as_me:39697: \"$ac_try\"") >&5
39698 (eval $ac_try) 2>&5
39699 ac_status=$?
39700 echo "$as_me:39700: \$? = $ac_status" >&5
39701 (exit "$ac_status"); }; }; then
39702 :
39703 else
39704 echo "$as_me: failed program was:" >&5
39705 cat "conftest.$ac_ext" >&5
39706 cf_have_incdir=yes
39707 fi
39708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39709 CPPFLAGS=$cf_save_CPPFLAGS
39710 fi
39711 fi
39712 fi
39713
39714 if test "$cf_have_incdir" = no ; then
39715 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
39716
39717 echo "${as_me:-configure}:39717: testing adding $cf_add_incdir to include-path ..." 1>&5
39718
39719 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
39720
39721 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
39722 test "$cf_top_incdir" = "$cf_add_incdir" && break
39723 cf_add_incdir="$cf_top_incdir"
39724 else
39725 break
39726 fi
39727 else
39728 break
39729 fi
39730 done
39731 done
39732 fi
39733
39734 if test -n "$cf_cv_library_path_bz2" ; then
39735 for cf_add_libdir in $cf_cv_library_path_bz2
39736 do
39737 if test "$cf_add_libdir" = /usr/lib ; then
39738 :
39739 elif test -d "$cf_add_libdir"
39740 then
39741 cf_have_libdir=no
39742 if test -n "$LDFLAGS$LIBS" ; then
39743 # a loop is needed to ensure we can add subdirs of existing dirs
39744 for cf_test_libdir in $LDFLAGS $LIBS ; do
39745 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
39746 cf_have_libdir=yes; break
39747 fi
39748 done
39749 fi
39750 if test "$cf_have_libdir" = no ; then
39751 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
39752
39753 echo "${as_me:-configure}:39753: testing adding $cf_add_libdir to library-path ..." 1>&5
39754
39755 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
39756 fi
39757 fi
39758 done
39759 fi
39760
39761 cf_add_libs="$LIBS"
39762 # reverse order
39763 cf_add_0lib=
39764 for cf_add_1lib in -lbz2; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
39765 # filter duplicates
39766 for cf_add_1lib in $cf_add_0lib; do
39767 for cf_add_2lib in $cf_add_libs; do
39768 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
39769 cf_add_1lib=
39770 break
39771 fi
39772 done
39773 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
39774 done
39775 LIBS="$cf_add_libs"
39776
39777 else
39778 { echo "$as_me:39778: WARNING: Cannot find bz2 library" >&5
39779 echo "$as_me: WARNING: Cannot find bz2 library" >&2;}
39780 fi
39781
39782 test "x$cf_cv_find_linkage_bz2" = "xyes" &&
39783 cat >>confdefs.h <<\EOF
39784 #define USE_BZLIB 1
39785 EOF
39786
39787 fi
39788
39789 echo "$as_me:39789: checking if you want to use zlib for decompression of some gzip files" >&5
39790 echo $ECHO_N "checking if you want to use zlib for decompression of some gzip files... $ECHO_C" >&6
39791
39792 # Check whether --with-zlib or --without-zlib was given.
39793 if test "${with_zlib+set}" = set; then
39794 withval="$with_zlib"
39795 use_zlib=$withval
39796 else
39797 use_zlib=yes
39798 fi;
39799 echo "$as_me:39799: result: $use_zlib" >&5
39800 echo "${ECHO_T}$use_zlib" >&6
39801
39802 if test ".$use_zlib" != ".no" ; then
39803
39804 case "x$use_zlib" in
39805 (xno|xyes|x)
39806 ;;
39807 (*)
39808
39809 for cf_searchpath in `echo "$use_zlib" | tr $PATH_SEPARATOR ' '`; do
39810 if test -d "$cf_searchpath/include" ; then
39811
39812 if test -n "$cf_searchpath/include" ; then
39813 for cf_add_incdir in $cf_searchpath/include
39814 do
39815 while test "$cf_add_incdir" != /usr/include
39816 do
39817 if test -d "$cf_add_incdir"
39818 then
39819 cf_have_incdir=no
39820 if test -n "$CFLAGS$CPPFLAGS" ; then
39821 # a loop is needed to ensure we can add subdirs of existing dirs
39822 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
39823 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
39824 cf_have_incdir=yes; break
39825 fi
39826 done
39827 fi
39828
39829 if test "$cf_have_incdir" = no ; then
39830 if test "$cf_add_incdir" = /usr/local/include ; then
39831 if test "$GCC" = yes
39832 then
39833 cf_save_CPPFLAGS=$CPPFLAGS
39834
39835 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
39836 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
39837
39838 cat >"conftest.$ac_ext" <<_ACEOF
39839 #line 39839 "configure"
39840 #include "confdefs.h"
39841 #include <stdio.h>
39842 int
39843 main (void)
39844 {
39845 printf("Hello")
39846 ;
39847 return 0;
39848 }
39849 _ACEOF
39850 rm -f "conftest.$ac_objext"
39851 if { (eval echo "$as_me:39851: \"$ac_compile\"") >&5
39852 (eval $ac_compile) 2>&5
39853 ac_status=$?
39854 echo "$as_me:39854: \$? = $ac_status" >&5
39855 (exit "$ac_status"); } &&
39856 { ac_try='test -s "conftest.$ac_objext"'
39857 { (eval echo "$as_me:39857: \"$ac_try\"") >&5
39858 (eval $ac_try) 2>&5
39859 ac_status=$?
39860 echo "$as_me:39860: \$? = $ac_status" >&5
39861 (exit "$ac_status"); }; }; then
39862 :
39863 else
39864 echo "$as_me: failed program was:" >&5
39865 cat "conftest.$ac_ext" >&5
39866 cf_have_incdir=yes
39867 fi
39868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39869 CPPFLAGS=$cf_save_CPPFLAGS
39870 fi
39871 fi
39872 fi
39873
39874 if test "$cf_have_incdir" = no ; then
39875 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
39876
39877 echo "${as_me:-configure}:39877: testing adding $cf_add_incdir to include-path ..." 1>&5
39878
39879 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
39880
39881 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
39882 test "$cf_top_incdir" = "$cf_add_incdir" && break
39883 cf_add_incdir="$cf_top_incdir"
39884 else
39885 break
39886 fi
39887 else
39888 break
39889 fi
39890 done
39891 done
39892 fi
39893
39894 elif test -d "$cf_searchpath/../include" ; then
39895
39896 if test -n "$cf_searchpath/../include" ; then
39897 for cf_add_incdir in $cf_searchpath/../include
39898 do
39899 while test "$cf_add_incdir" != /usr/include
39900 do
39901 if test -d "$cf_add_incdir"
39902 then
39903 cf_have_incdir=no
39904 if test -n "$CFLAGS$CPPFLAGS" ; then
39905 # a loop is needed to ensure we can add subdirs of existing dirs
39906 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
39907 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
39908 cf_have_incdir=yes; break
39909 fi
39910 done
39911 fi
39912
39913 if test "$cf_have_incdir" = no ; then
39914 if test "$cf_add_incdir" = /usr/local/include ; then
39915 if test "$GCC" = yes
39916 then
39917 cf_save_CPPFLAGS=$CPPFLAGS
39918
39919 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
39920 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
39921
39922 cat >"conftest.$ac_ext" <<_ACEOF
39923 #line 39923 "configure"
39924 #include "confdefs.h"
39925 #include <stdio.h>
39926 int
39927 main (void)
39928 {
39929 printf("Hello")
39930 ;
39931 return 0;
39932 }
39933 _ACEOF
39934 rm -f "conftest.$ac_objext"
39935 if { (eval echo "$as_me:39935: \"$ac_compile\"") >&5
39936 (eval $ac_compile) 2>&5
39937 ac_status=$?
39938 echo "$as_me:39938: \$? = $ac_status" >&5
39939 (exit "$ac_status"); } &&
39940 { ac_try='test -s "conftest.$ac_objext"'
39941 { (eval echo "$as_me:39941: \"$ac_try\"") >&5
39942 (eval $ac_try) 2>&5
39943 ac_status=$?
39944 echo "$as_me:39944: \$? = $ac_status" >&5
39945 (exit "$ac_status"); }; }; then
39946 :
39947 else
39948 echo "$as_me: failed program was:" >&5
39949 cat "conftest.$ac_ext" >&5
39950 cf_have_incdir=yes
39951 fi
39952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39953 CPPFLAGS=$cf_save_CPPFLAGS
39954 fi
39955 fi
39956 fi
39957
39958 if test "$cf_have_incdir" = no ; then
39959 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
39960
39961 echo "${as_me:-configure}:39961: testing adding $cf_add_incdir to include-path ..." 1>&5
39962
39963 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
39964
39965 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
39966 test "$cf_top_incdir" = "$cf_add_incdir" && break
39967 cf_add_incdir="$cf_top_incdir"
39968 else
39969 break
39970 fi
39971 else
39972 break
39973 fi
39974 done
39975 done
39976 fi
39977
39978 else
39979 { { echo "$as_me:39979: error: cannot find zlib under $use_zlib" >&5
39980 echo "$as_me: error: cannot find zlib under $use_zlib" >&2;}
39981 { (exit 1); exit 1; }; }
39982 fi
39983 if test -d "$cf_searchpath/lib" ; then
39984
39985 if test -n "$cf_searchpath/lib" ; then
39986 for cf_add_libdir in $cf_searchpath/lib
39987 do
39988 if test "$cf_add_libdir" = /usr/lib ; then
39989 :
39990 elif test -d "$cf_add_libdir"
39991 then
39992 cf_have_libdir=no
39993 if test -n "$LDFLAGS$LIBS" ; then
39994 # a loop is needed to ensure we can add subdirs of existing dirs
39995 for cf_test_libdir in $LDFLAGS $LIBS ; do
39996 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
39997 cf_have_libdir=yes; break
39998 fi
39999 done
40000 fi
40001 if test "$cf_have_libdir" = no ; then
40002 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
40003
40004 echo "${as_me:-configure}:40004: testing adding $cf_add_libdir to library-path ..." 1>&5
40005
40006 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40007 fi
40008 fi
40009 done
40010 fi
40011
40012 elif test -d "$cf_searchpath" ; then
40013
40014 if test -n "$cf_searchpath" ; then
40015 for cf_add_libdir in $cf_searchpath
40016 do
40017 if test "$cf_add_libdir" = /usr/lib ; then
40018 :
40019 elif test -d "$cf_add_libdir"
40020 then
40021 cf_have_libdir=no
40022 if test -n "$LDFLAGS$LIBS" ; then
40023 # a loop is needed to ensure we can add subdirs of existing dirs
40024 for cf_test_libdir in $LDFLAGS $LIBS ; do
40025 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
40026 cf_have_libdir=yes; break
40027 fi
40028 done
40029 fi
40030 if test "$cf_have_libdir" = no ; then
40031 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
40032
40033 echo "${as_me:-configure}:40033: testing adding $cf_add_libdir to library-path ..." 1>&5
40034
40035 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40036 fi
40037 fi
40038 done
40039 fi
40040
40041 else
40042 { { echo "$as_me:40042: error: cannot find zlib under $use_zlib" >&5
40043 echo "$as_me: error: cannot find zlib under $use_zlib" >&2;}
40044 { (exit 1); exit 1; }; }
40045 fi
40046 done
40047
40048 test -n "$verbose" && echo " setting path value for zlib to $use_zlib" 1>&6
40049
40050 echo "${as_me:-configure}:40050: testing setting path value for zlib to $use_zlib ..." 1>&5
40051
40052 ;;
40053 esac
40054
40055 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
40056 # will be set on completion of the AC_LINK_IFELSE below.
40057 cf_cv_header_path_z=
40058 cf_cv_library_path_z=
40059
40060 echo "${as_me:-configure}:40060: testing Starting FIND_LINKAGE(z,zlib) ..." 1>&5
40061
40062 cf_save_LIBS="$LIBS"
40063
40064 cat >"conftest.$ac_ext" <<_ACEOF
40065 #line 40065 "configure"
40066 #include "confdefs.h"
40067
40068 #include <zlib.h>
40069
40070 int
40071 main (void)
40072 {
40073
40074 gzopen("name","mode")
40075
40076 ;
40077 return 0;
40078 }
40079 _ACEOF
40080 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40081 if { (eval echo "$as_me:40081: \"$ac_link\"") >&5
40082 (eval $ac_link) 2>&5
40083 ac_status=$?
40084 echo "$as_me:40084: \$? = $ac_status" >&5
40085 (exit "$ac_status"); } &&
40086 { ac_try='test -s "conftest$ac_exeext"'
40087 { (eval echo "$as_me:40087: \"$ac_try\"") >&5
40088 (eval $ac_try) 2>&5
40089 ac_status=$?
40090 echo "$as_me:40090: \$? = $ac_status" >&5
40091 (exit "$ac_status"); }; }; then
40092
40093 cf_cv_find_linkage_z=yes
40094 cf_cv_header_path_z=/usr/include
40095 cf_cv_library_path_z=/usr/lib
40096
40097 else
40098 echo "$as_me: failed program was:" >&5
40099 cat "conftest.$ac_ext" >&5
40100
40101 LIBS="-lz $cf_save_LIBS"
40102
40103 cat >"conftest.$ac_ext" <<_ACEOF
40104 #line 40104 "configure"
40105 #include "confdefs.h"
40106
40107 #include <zlib.h>
40108
40109 int
40110 main (void)
40111 {
40112
40113 gzopen("name","mode")
40114
40115 ;
40116 return 0;
40117 }
40118 _ACEOF
40119 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40120 if { (eval echo "$as_me:40120: \"$ac_link\"") >&5
40121 (eval $ac_link) 2>&5
40122 ac_status=$?
40123 echo "$as_me:40123: \$? = $ac_status" >&5
40124 (exit "$ac_status"); } &&
40125 { ac_try='test -s "conftest$ac_exeext"'
40126 { (eval echo "$as_me:40126: \"$ac_try\"") >&5
40127 (eval $ac_try) 2>&5
40128 ac_status=$?
40129 echo "$as_me:40129: \$? = $ac_status" >&5
40130 (exit "$ac_status"); }; }; then
40131
40132 cf_cv_find_linkage_z=yes
40133 cf_cv_header_path_z=/usr/include
40134 cf_cv_library_path_z=/usr/lib
40135 cf_cv_library_file_z="-lz"
40136
40137 else
40138 echo "$as_me: failed program was:" >&5
40139 cat "conftest.$ac_ext" >&5
40140
40141 cf_cv_find_linkage_z=no
40142 LIBS="$cf_save_LIBS"
40143
40144 test -n "$verbose" && echo " find linkage for z library" 1>&6
40145
40146 echo "${as_me:-configure}:40146: testing find linkage for z library ..." 1>&5
40147
40148 echo "${as_me:-configure}:40148: testing Searching for headers in FIND_LINKAGE(z,zlib) ..." 1>&5
40149
40150 cf_save_CPPFLAGS="$CPPFLAGS"
40151 cf_test_CPPFLAGS="$CPPFLAGS"
40152
40153 cf_search=
40154
40155 # collect the current set of include-directories from compiler flags
40156 cf_header_path_list=""
40157 if test -n "${CFLAGS}${CPPFLAGS}" ; then
40158 for cf_header_path in $CPPFLAGS $CFLAGS
40159 do
40160 case "$cf_header_path" in
40161 (-I*)
40162 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
40163
40164 test "x$cf_header_path" != "xNONE" && \
40165 test -d "$cf_header_path" && \
40166 {
40167 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
40168 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
40169 test -d "$cf_header_path/include/zlib" && cf_search="$cf_search $cf_header_path/include/zlib"
40170 test -d "$cf_header_path/include/zlib/include" && cf_search="$cf_search $cf_header_path/include/zlib/include"
40171 test -d "$cf_header_path/zlib/include" && cf_search="$cf_search $cf_header_path/zlib/include"
40172 test -d "$cf_header_path/zlib/include/zlib" && cf_search="$cf_search $cf_header_path/zlib/include/zlib"
40173 }
40174
40175 cf_header_path_list="$cf_header_path_list $cf_search"
40176 ;;
40177 esac
40178 done
40179 fi
40180
40181 # add the variations for the package we are looking for
40182
40183 cf_search=
40184
40185 test "x$prefix" != "xNONE" && \
40186 test -d "$prefix" && \
40187 {
40188 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
40189 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
40190 test -d "$prefix/include/zlib" && cf_search="$cf_search $prefix/include/zlib"
40191 test -d "$prefix/include/zlib/include" && cf_search="$cf_search $prefix/include/zlib/include"
40192 test -d "$prefix/zlib/include" && cf_search="$cf_search $prefix/zlib/include"
40193 test -d "$prefix/zlib/include/zlib" && cf_search="$cf_search $prefix/zlib/include/zlib"
40194 }
40195
40196 for cf_subdir_prefix in \
40197 /usr \
40198 /usr/local \
40199 /usr/pkg \
40200 /opt \
40201 /opt/local \
40202 $HOME
40203 do
40204
40205 test "x$cf_subdir_prefix" != "x$prefix" && \
40206 test -d "$cf_subdir_prefix" && \
40207 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
40208 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
40209 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
40210 test -d "$cf_subdir_prefix/include/zlib" && cf_search="$cf_search $cf_subdir_prefix/include/zlib"
40211 test -d "$cf_subdir_prefix/include/zlib/include" && cf_search="$cf_search $cf_subdir_prefix/include/zlib/include"
40212 test -d "$cf_subdir_prefix/zlib/include" && cf_search="$cf_search $cf_subdir_prefix/zlib/include"
40213 test -d "$cf_subdir_prefix/zlib/include/zlib" && cf_search="$cf_search $cf_subdir_prefix/zlib/include/zlib"
40214 }
40215
40216 done
40217
40218 test "$includedir" != NONE && \
40219 test "$includedir" != "/usr/include" && \
40220 test -d "$includedir" && {
40221 test -d "$includedir" && cf_search="$cf_search $includedir"
40222 test -d "$includedir/zlib" && cf_search="$cf_search $includedir/zlib"
40223 }
40224
40225 test "$oldincludedir" != NONE && \
40226 test "$oldincludedir" != "/usr/include" && \
40227 test -d "$oldincludedir" && {
40228 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
40229 test -d "$oldincludedir/zlib" && cf_search="$cf_search $oldincludedir/zlib"
40230 }
40231
40232 cf_search="$cf_search $cf_header_path_list"
40233
40234 for cf_cv_header_path_z in $cf_search
40235 do
40236 if test -d "$cf_cv_header_path_z" ; then
40237 test -n "$verbose" && echo " ... testing $cf_cv_header_path_z" 1>&6
40238
40239 echo "${as_me:-configure}:40239: testing ... testing $cf_cv_header_path_z ..." 1>&5
40240
40241 CPPFLAGS="$cf_save_CPPFLAGS"
40242
40243 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40244 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_z"
40245
40246 cat >"conftest.$ac_ext" <<_ACEOF
40247 #line 40247 "configure"
40248 #include "confdefs.h"
40249
40250 #include <zlib.h>
40251
40252 int
40253 main (void)
40254 {
40255
40256 gzopen("name","mode")
40257
40258 ;
40259 return 0;
40260 }
40261 _ACEOF
40262 rm -f "conftest.$ac_objext"
40263 if { (eval echo "$as_me:40263: \"$ac_compile\"") >&5
40264 (eval $ac_compile) 2>&5
40265 ac_status=$?
40266 echo "$as_me:40266: \$? = $ac_status" >&5
40267 (exit "$ac_status"); } &&
40268 { ac_try='test -s "conftest.$ac_objext"'
40269 { (eval echo "$as_me:40269: \"$ac_try\"") >&5
40270 (eval $ac_try) 2>&5
40271 ac_status=$?
40272 echo "$as_me:40272: \$? = $ac_status" >&5
40273 (exit "$ac_status"); }; }; then
40274
40275 test -n "$verbose" && echo " ... found z headers in $cf_cv_header_path_z" 1>&6
40276
40277 echo "${as_me:-configure}:40277: testing ... found z headers in $cf_cv_header_path_z ..." 1>&5
40278
40279 cf_cv_find_linkage_z=maybe
40280 cf_test_CPPFLAGS="$CPPFLAGS"
40281 break
40282 else
40283 echo "$as_me: failed program was:" >&5
40284 cat "conftest.$ac_ext" >&5
40285
40286 CPPFLAGS="$cf_save_CPPFLAGS"
40287
40288 fi
40289 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40290 fi
40291 done
40292
40293 if test "$cf_cv_find_linkage_z" = maybe ; then
40294
40295 echo "${as_me:-configure}:40295: testing Searching for z library in FIND_LINKAGE(z,zlib) ..." 1>&5
40296
40297 cf_save_LIBS="$LIBS"
40298 cf_save_LDFLAGS="$LDFLAGS"
40299
40300 CPPFLAGS="$cf_test_CPPFLAGS"
40301 LIBS="-lz $cf_save_LIBS"
40302 cat >"conftest.$ac_ext" <<_ACEOF
40303 #line 40303 "configure"
40304 #include "confdefs.h"
40305
40306 #include <zlib.h>
40307
40308 int
40309 main (void)
40310 {
40311
40312 gzopen("name","mode")
40313
40314 ;
40315 return 0;
40316 }
40317 _ACEOF
40318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40319 if { (eval echo "$as_me:40319: \"$ac_link\"") >&5
40320 (eval $ac_link) 2>&5
40321 ac_status=$?
40322 echo "$as_me:40322: \$? = $ac_status" >&5
40323 (exit "$ac_status"); } &&
40324 { ac_try='test -s "conftest$ac_exeext"'
40325 { (eval echo "$as_me:40325: \"$ac_try\"") >&5
40326 (eval $ac_try) 2>&5
40327 ac_status=$?
40328 echo "$as_me:40328: \$? = $ac_status" >&5
40329 (exit "$ac_status"); }; }; then
40330
40331 test -n "$verbose" && echo " ... found z library in system" 1>&6
40332
40333 echo "${as_me:-configure}:40333: testing ... found z library in system ..." 1>&5
40334
40335 cf_cv_find_linkage_z=yes
40336 else
40337 echo "$as_me: failed program was:" >&5
40338 cat "conftest.$ac_ext" >&5
40339 fi
40340 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40341 CPPFLAGS="$cf_save_CPPFLAGS"
40342 LIBS="$cf_save_LIBS"
40343
40344 if test "$cf_cv_find_linkage_z" != yes ; then
40345
40346 cf_search=
40347 cf_library_path_list=""
40348 if test -n "${LDFLAGS}${LIBS}" ; then
40349 for cf_library_path in $LDFLAGS $LIBS
40350 do
40351 case "$cf_library_path" in
40352 (-L*)
40353 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
40354
40355 test "x$cf_library_path" != "xNONE" && \
40356 test -d "$cf_library_path" && \
40357 {
40358 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
40359 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
40360 test -d "$cf_library_path/lib/z" && cf_search="$cf_search $cf_library_path/lib/z"
40361 test -d "$cf_library_path/lib/z/lib" && cf_search="$cf_search $cf_library_path/lib/z/lib"
40362 test -d "$cf_library_path/z/lib" && cf_search="$cf_search $cf_library_path/z/lib"
40363 test -d "$cf_library_path/z/lib/z" && cf_search="$cf_search $cf_library_path/z/lib/z"
40364 }
40365
40366 cf_library_path_list="$cf_library_path_list $cf_search"
40367 ;;
40368 esac
40369 done
40370 fi
40371
40372 cf_search=
40373
40374 test "x$prefix" != "xNONE" && \
40375 test -d "$prefix" && \
40376 {
40377 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
40378 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
40379 test -d "$prefix/lib/z" && cf_search="$cf_search $prefix/lib/z"
40380 test -d "$prefix/lib/z/lib" && cf_search="$cf_search $prefix/lib/z/lib"
40381 test -d "$prefix/z/lib" && cf_search="$cf_search $prefix/z/lib"
40382 test -d "$prefix/z/lib/z" && cf_search="$cf_search $prefix/z/lib/z"
40383 }
40384
40385 for cf_subdir_prefix in \
40386 /usr \
40387 /usr/local \
40388 /usr/pkg \
40389 /opt \
40390 /opt/local \
40391 $HOME
40392 do
40393
40394 test "x$cf_subdir_prefix" != "x$prefix" && \
40395 test -d "$cf_subdir_prefix" && \
40396 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
40397 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
40398 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
40399 test -d "$cf_subdir_prefix/lib/z" && cf_search="$cf_search $cf_subdir_prefix/lib/z"
40400 test -d "$cf_subdir_prefix/lib/z/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/z/lib"
40401 test -d "$cf_subdir_prefix/z/lib" && cf_search="$cf_search $cf_subdir_prefix/z/lib"
40402 test -d "$cf_subdir_prefix/z/lib/z" && cf_search="$cf_search $cf_subdir_prefix/z/lib/z"
40403 }
40404
40405 done
40406
40407 cf_search="$cf_library_path_list $cf_search"
40408
40409 for cf_cv_library_path_z in $cf_search
40410 do
40411 if test -d "$cf_cv_library_path_z" ; then
40412 test -n "$verbose" && echo " ... testing $cf_cv_library_path_z" 1>&6
40413
40414 echo "${as_me:-configure}:40414: testing ... testing $cf_cv_library_path_z ..." 1>&5
40415
40416 CPPFLAGS="$cf_test_CPPFLAGS"
40417 LIBS="-lz $cf_save_LIBS"
40418 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_z"
40419 cat >"conftest.$ac_ext" <<_ACEOF
40420 #line 40420 "configure"
40421 #include "confdefs.h"
40422
40423 #include <zlib.h>
40424
40425 int
40426 main (void)
40427 {
40428
40429 gzopen("name","mode")
40430
40431 ;
40432 return 0;
40433 }
40434 _ACEOF
40435 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40436 if { (eval echo "$as_me:40436: \"$ac_link\"") >&5
40437 (eval $ac_link) 2>&5
40438 ac_status=$?
40439 echo "$as_me:40439: \$? = $ac_status" >&5
40440 (exit "$ac_status"); } &&
40441 { ac_try='test -s "conftest$ac_exeext"'
40442 { (eval echo "$as_me:40442: \"$ac_try\"") >&5
40443 (eval $ac_try) 2>&5
40444 ac_status=$?
40445 echo "$as_me:40445: \$? = $ac_status" >&5
40446 (exit "$ac_status"); }; }; then
40447
40448 test -n "$verbose" && echo " ... found z library in $cf_cv_library_path_z" 1>&6
40449
40450 echo "${as_me:-configure}:40450: testing ... found z library in $cf_cv_library_path_z ..." 1>&5
40451
40452 cf_cv_find_linkage_z=yes
40453 cf_cv_library_file_z="-lz"
40454 break
40455 else
40456 echo "$as_me: failed program was:" >&5
40457 cat "conftest.$ac_ext" >&5
40458
40459 CPPFLAGS="$cf_save_CPPFLAGS"
40460 LIBS="$cf_save_LIBS"
40461 LDFLAGS="$cf_save_LDFLAGS"
40462
40463 fi
40464 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40465 fi
40466 done
40467 CPPFLAGS="$cf_save_CPPFLAGS"
40468 LDFLAGS="$cf_save_LDFLAGS"
40469 fi
40470
40471 else
40472 cf_cv_find_linkage_z=no
40473 fi
40474
40475 fi
40476 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40477
40478 fi
40479 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40480
40481 LIBS="$cf_save_LIBS"
40482
40483 if test "$cf_cv_find_linkage_z" = yes ; then
40484
40485 if test -n "$cf_cv_header_path_z" ; then
40486 for cf_add_incdir in $cf_cv_header_path_z
40487 do
40488 while test "$cf_add_incdir" != /usr/include
40489 do
40490 if test -d "$cf_add_incdir"
40491 then
40492 cf_have_incdir=no
40493 if test -n "$CFLAGS$CPPFLAGS" ; then
40494 # a loop is needed to ensure we can add subdirs of existing dirs
40495 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
40496 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
40497 cf_have_incdir=yes; break
40498 fi
40499 done
40500 fi
40501
40502 if test "$cf_have_incdir" = no ; then
40503 if test "$cf_add_incdir" = /usr/local/include ; then
40504 if test "$GCC" = yes
40505 then
40506 cf_save_CPPFLAGS=$CPPFLAGS
40507
40508 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40509 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
40510
40511 cat >"conftest.$ac_ext" <<_ACEOF
40512 #line 40512 "configure"
40513 #include "confdefs.h"
40514 #include <stdio.h>
40515 int
40516 main (void)
40517 {
40518 printf("Hello")
40519 ;
40520 return 0;
40521 }
40522 _ACEOF
40523 rm -f "conftest.$ac_objext"
40524 if { (eval echo "$as_me:40524: \"$ac_compile\"") >&5
40525 (eval $ac_compile) 2>&5
40526 ac_status=$?
40527 echo "$as_me:40527: \$? = $ac_status" >&5
40528 (exit "$ac_status"); } &&
40529 { ac_try='test -s "conftest.$ac_objext"'
40530 { (eval echo "$as_me:40530: \"$ac_try\"") >&5
40531 (eval $ac_try) 2>&5
40532 ac_status=$?
40533 echo "$as_me:40533: \$? = $ac_status" >&5
40534 (exit "$ac_status"); }; }; then
40535 :
40536 else
40537 echo "$as_me: failed program was:" >&5
40538 cat "conftest.$ac_ext" >&5
40539 cf_have_incdir=yes
40540 fi
40541 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40542 CPPFLAGS=$cf_save_CPPFLAGS
40543 fi
40544 fi
40545 fi
40546
40547 if test "$cf_have_incdir" = no ; then
40548 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
40549
40550 echo "${as_me:-configure}:40550: testing adding $cf_add_incdir to include-path ..." 1>&5
40551
40552 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
40553
40554 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
40555 test "$cf_top_incdir" = "$cf_add_incdir" && break
40556 cf_add_incdir="$cf_top_incdir"
40557 else
40558 break
40559 fi
40560 else
40561 break
40562 fi
40563 done
40564 done
40565 fi
40566
40567 if test -n "$cf_cv_library_path_z" ; then
40568 for cf_add_libdir in $cf_cv_library_path_z
40569 do
40570 if test "$cf_add_libdir" = /usr/lib ; then
40571 :
40572 elif test -d "$cf_add_libdir"
40573 then
40574 cf_have_libdir=no
40575 if test -n "$LDFLAGS$LIBS" ; then
40576 # a loop is needed to ensure we can add subdirs of existing dirs
40577 for cf_test_libdir in $LDFLAGS $LIBS ; do
40578 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
40579 cf_have_libdir=yes; break
40580 fi
40581 done
40582 fi
40583 if test "$cf_have_libdir" = no ; then
40584 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
40585
40586 echo "${as_me:-configure}:40586: testing adding $cf_add_libdir to library-path ..." 1>&5
40587
40588 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40589 fi
40590 fi
40591 done
40592 fi
40593
40594 cf_add_libs="$LIBS"
40595 # reverse order
40596 cf_add_0lib=
40597 for cf_add_1lib in -lz; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
40598 # filter duplicates
40599 for cf_add_1lib in $cf_add_0lib; do
40600 for cf_add_2lib in $cf_add_libs; do
40601 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
40602 cf_add_1lib=
40603 break
40604 fi
40605 done
40606 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
40607 done
40608 LIBS="$cf_add_libs"
40609
40610 else
40611 { echo "$as_me:40611: WARNING: Cannot find z library" >&5
40612 echo "$as_me: WARNING: Cannot find z library" >&2;}
40613 fi
40614
40615 for ac_func in \
40616 zError \
40617
40618 do
40619 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
40620 echo "$as_me:40620: checking for $ac_func" >&5
40621 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
40622 if eval "test \"\${$as_ac_var+set}\" = set"; then
40623 echo $ECHO_N "(cached) $ECHO_C" >&6
40624 else
40625 cat >"conftest.$ac_ext" <<_ACEOF
40626 #line 40626 "configure"
40627 #include "confdefs.h"
40628 #define $ac_func autoconf_temporary
40629 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
40630 #undef $ac_func
40631
40632 #ifdef __cplusplus
40633 extern "C"
40634 #endif
40635
40636 /* We use char because int might match the return type of a gcc2
40637 builtin and then its argument prototype would still apply. */
40638 char $ac_func (void);
40639
40640 int
40641 main (void)
40642 {
40643
40644 /* The GNU C library defines stubs for functions which it implements
40645 to always fail with ENOSYS. Some functions are actually named
40646 something starting with __ and the normal name is an alias. */
40647 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
40648 #error found stub for $ac_func
40649 #endif
40650
40651 return $ac_func ();
40652 ;
40653 return 0;
40654 }
40655 _ACEOF
40656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40657 if { (eval echo "$as_me:40657: \"$ac_link\"") >&5
40658 (eval $ac_link) 2>&5
40659 ac_status=$?
40660 echo "$as_me:40660: \$? = $ac_status" >&5
40661 (exit "$ac_status"); } &&
40662 { ac_try='test -s "conftest$ac_exeext"'
40663 { (eval echo "$as_me:40663: \"$ac_try\"") >&5
40664 (eval $ac_try) 2>&5
40665 ac_status=$?
40666 echo "$as_me:40666: \$? = $ac_status" >&5
40667 (exit "$ac_status"); }; }; then
40668 eval "$as_ac_var=yes"
40669 else
40670 echo "$as_me: failed program was:" >&5
40671 cat "conftest.$ac_ext" >&5
40672 eval "$as_ac_var=no"
40673 fi
40674 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40675 fi
40676 echo "$as_me:40676: result: `eval echo '${'"$as_ac_var"'}'`" >&5
40677 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
40678 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
40679 cat >>confdefs.h <<EOF
40680 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
40681 EOF
40682
40683 fi
40684 done
40685
40686 test "x$cf_cv_find_linkage_z" = "xyes" &&
40687 cat >>confdefs.h <<\EOF
40688 #define USE_ZLIB 1
40689 EOF
40690
40691 fi
40692
40693 echo "$as_me:40693: checking if you want to use brotli decompression" >&5
40694 echo $ECHO_N "checking if you want to use brotli decompression... $ECHO_C" >&6
40695
40696 # Check whether --with-brotli or --without-brotli was given.
40697 if test "${with_brotli+set}" = set; then
40698 withval="$with_brotli"
40699 use_brotli=$withval
40700 else
40701 use_brotli=yes
40702 fi;
40703 echo "$as_me:40703: result: $use_brotli" >&5
40704 echo "${ECHO_T}$use_brotli" >&6
40705
40706 if test ".$use_brotli" != ".no" ; then
40707
40708 case "x$use_brotli" in
40709 (xno|xyes|x)
40710 ;;
40711 (*)
40712
40713 for cf_searchpath in `echo "$use_brotli" | tr $PATH_SEPARATOR ' '`; do
40714 if test -d "$cf_searchpath/include" ; then
40715
40716 if test -n "$cf_searchpath/include" ; then
40717 for cf_add_incdir in $cf_searchpath/include
40718 do
40719 while test "$cf_add_incdir" != /usr/include
40720 do
40721 if test -d "$cf_add_incdir"
40722 then
40723 cf_have_incdir=no
40724 if test -n "$CFLAGS$CPPFLAGS" ; then
40725 # a loop is needed to ensure we can add subdirs of existing dirs
40726 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
40727 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
40728 cf_have_incdir=yes; break
40729 fi
40730 done
40731 fi
40732
40733 if test "$cf_have_incdir" = no ; then
40734 if test "$cf_add_incdir" = /usr/local/include ; then
40735 if test "$GCC" = yes
40736 then
40737 cf_save_CPPFLAGS=$CPPFLAGS
40738
40739 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40740 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
40741
40742 cat >"conftest.$ac_ext" <<_ACEOF
40743 #line 40743 "configure"
40744 #include "confdefs.h"
40745 #include <stdio.h>
40746 int
40747 main (void)
40748 {
40749 printf("Hello")
40750 ;
40751 return 0;
40752 }
40753 _ACEOF
40754 rm -f "conftest.$ac_objext"
40755 if { (eval echo "$as_me:40755: \"$ac_compile\"") >&5
40756 (eval $ac_compile) 2>&5
40757 ac_status=$?
40758 echo "$as_me:40758: \$? = $ac_status" >&5
40759 (exit "$ac_status"); } &&
40760 { ac_try='test -s "conftest.$ac_objext"'
40761 { (eval echo "$as_me:40761: \"$ac_try\"") >&5
40762 (eval $ac_try) 2>&5
40763 ac_status=$?
40764 echo "$as_me:40764: \$? = $ac_status" >&5
40765 (exit "$ac_status"); }; }; then
40766 :
40767 else
40768 echo "$as_me: failed program was:" >&5
40769 cat "conftest.$ac_ext" >&5
40770 cf_have_incdir=yes
40771 fi
40772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40773 CPPFLAGS=$cf_save_CPPFLAGS
40774 fi
40775 fi
40776 fi
40777
40778 if test "$cf_have_incdir" = no ; then
40779 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
40780
40781 echo "${as_me:-configure}:40781: testing adding $cf_add_incdir to include-path ..." 1>&5
40782
40783 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
40784
40785 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
40786 test "$cf_top_incdir" = "$cf_add_incdir" && break
40787 cf_add_incdir="$cf_top_incdir"
40788 else
40789 break
40790 fi
40791 else
40792 break
40793 fi
40794 done
40795 done
40796 fi
40797
40798 elif test -d "$cf_searchpath/../include" ; then
40799
40800 if test -n "$cf_searchpath/../include" ; then
40801 for cf_add_incdir in $cf_searchpath/../include
40802 do
40803 while test "$cf_add_incdir" != /usr/include
40804 do
40805 if test -d "$cf_add_incdir"
40806 then
40807 cf_have_incdir=no
40808 if test -n "$CFLAGS$CPPFLAGS" ; then
40809 # a loop is needed to ensure we can add subdirs of existing dirs
40810 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
40811 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
40812 cf_have_incdir=yes; break
40813 fi
40814 done
40815 fi
40816
40817 if test "$cf_have_incdir" = no ; then
40818 if test "$cf_add_incdir" = /usr/local/include ; then
40819 if test "$GCC" = yes
40820 then
40821 cf_save_CPPFLAGS=$CPPFLAGS
40822
40823 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40824 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
40825
40826 cat >"conftest.$ac_ext" <<_ACEOF
40827 #line 40827 "configure"
40828 #include "confdefs.h"
40829 #include <stdio.h>
40830 int
40831 main (void)
40832 {
40833 printf("Hello")
40834 ;
40835 return 0;
40836 }
40837 _ACEOF
40838 rm -f "conftest.$ac_objext"
40839 if { (eval echo "$as_me:40839: \"$ac_compile\"") >&5
40840 (eval $ac_compile) 2>&5
40841 ac_status=$?
40842 echo "$as_me:40842: \$? = $ac_status" >&5
40843 (exit "$ac_status"); } &&
40844 { ac_try='test -s "conftest.$ac_objext"'
40845 { (eval echo "$as_me:40845: \"$ac_try\"") >&5
40846 (eval $ac_try) 2>&5
40847 ac_status=$?
40848 echo "$as_me:40848: \$? = $ac_status" >&5
40849 (exit "$ac_status"); }; }; then
40850 :
40851 else
40852 echo "$as_me: failed program was:" >&5
40853 cat "conftest.$ac_ext" >&5
40854 cf_have_incdir=yes
40855 fi
40856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40857 CPPFLAGS=$cf_save_CPPFLAGS
40858 fi
40859 fi
40860 fi
40861
40862 if test "$cf_have_incdir" = no ; then
40863 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
40864
40865 echo "${as_me:-configure}:40865: testing adding $cf_add_incdir to include-path ..." 1>&5
40866
40867 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
40868
40869 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
40870 test "$cf_top_incdir" = "$cf_add_incdir" && break
40871 cf_add_incdir="$cf_top_incdir"
40872 else
40873 break
40874 fi
40875 else
40876 break
40877 fi
40878 done
40879 done
40880 fi
40881
40882 else
40883 { { echo "$as_me:40883: error: cannot find brotli library under $use_brotli" >&5
40884 echo "$as_me: error: cannot find brotli library under $use_brotli" >&2;}
40885 { (exit 1); exit 1; }; }
40886 fi
40887 if test -d "$cf_searchpath/lib" ; then
40888
40889 if test -n "$cf_searchpath/lib" ; then
40890 for cf_add_libdir in $cf_searchpath/lib
40891 do
40892 if test "$cf_add_libdir" = /usr/lib ; then
40893 :
40894 elif test -d "$cf_add_libdir"
40895 then
40896 cf_have_libdir=no
40897 if test -n "$LDFLAGS$LIBS" ; then
40898 # a loop is needed to ensure we can add subdirs of existing dirs
40899 for cf_test_libdir in $LDFLAGS $LIBS ; do
40900 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
40901 cf_have_libdir=yes; break
40902 fi
40903 done
40904 fi
40905 if test "$cf_have_libdir" = no ; then
40906 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
40907
40908 echo "${as_me:-configure}:40908: testing adding $cf_add_libdir to library-path ..." 1>&5
40909
40910 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40911 fi
40912 fi
40913 done
40914 fi
40915
40916 elif test -d "$cf_searchpath" ; then
40917
40918 if test -n "$cf_searchpath" ; then
40919 for cf_add_libdir in $cf_searchpath
40920 do
40921 if test "$cf_add_libdir" = /usr/lib ; then
40922 :
40923 elif test -d "$cf_add_libdir"
40924 then
40925 cf_have_libdir=no
40926 if test -n "$LDFLAGS$LIBS" ; then
40927 # a loop is needed to ensure we can add subdirs of existing dirs
40928 for cf_test_libdir in $LDFLAGS $LIBS ; do
40929 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
40930 cf_have_libdir=yes; break
40931 fi
40932 done
40933 fi
40934 if test "$cf_have_libdir" = no ; then
40935 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
40936
40937 echo "${as_me:-configure}:40937: testing adding $cf_add_libdir to library-path ..." 1>&5
40938
40939 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40940 fi
40941 fi
40942 done
40943 fi
40944
40945 else
40946 { { echo "$as_me:40946: error: cannot find brotli library under $use_brotli" >&5
40947 echo "$as_me: error: cannot find brotli library under $use_brotli" >&2;}
40948 { (exit 1); exit 1; }; }
40949 fi
40950 done
40951
40952 test -n "$verbose" && echo " setting path value for brotli library to $use_brotli" 1>&6
40953
40954 echo "${as_me:-configure}:40954: testing setting path value for brotli library to $use_brotli ..." 1>&5
40955
40956 ;;
40957 esac
40958
40959 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
40960 # will be set on completion of the AC_LINK_IFELSE below.
40961 cf_cv_header_path_brotlidec=
40962 cf_cv_library_path_brotlidec=
40963
40964 echo "${as_me:-configure}:40964: testing Starting FIND_LINKAGE(brotlidec,brotlilib) ..." 1>&5
40965
40966 cf_save_LIBS="$LIBS"
40967
40968 cat >"conftest.$ac_ext" <<_ACEOF
40969 #line 40969 "configure"
40970 #include "confdefs.h"
40971
40972 $ac_includes_default
40973 #include <brotli/decode.h>
40974
40975 int
40976 main (void)
40977 {
40978
40979 BrotliDecoderDecompressStream(
40980 NULL, /* BrotliDecoderState* state */
40981 NULL, /* size_t* available_in */
40982 NULL, /* const uint8_t** next_in */
40983 NULL, /* size_t* available_out */
40984 NULL, /* uint8_t** next_out */
40985 NULL /* size_t* total_out */
40986 );
40987
40988 ;
40989 return 0;
40990 }
40991 _ACEOF
40992 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40993 if { (eval echo "$as_me:40993: \"$ac_link\"") >&5
40994 (eval $ac_link) 2>&5
40995 ac_status=$?
40996 echo "$as_me:40996: \$? = $ac_status" >&5
40997 (exit "$ac_status"); } &&
40998 { ac_try='test -s "conftest$ac_exeext"'
40999 { (eval echo "$as_me:40999: \"$ac_try\"") >&5
41000 (eval $ac_try) 2>&5
41001 ac_status=$?
41002 echo "$as_me:41002: \$? = $ac_status" >&5
41003 (exit "$ac_status"); }; }; then
41004
41005 cf_cv_find_linkage_brotlidec=yes
41006 cf_cv_header_path_brotlidec=/usr/include
41007 cf_cv_library_path_brotlidec=/usr/lib
41008
41009 else
41010 echo "$as_me: failed program was:" >&5
41011 cat "conftest.$ac_ext" >&5
41012
41013 LIBS="-lbrotlidec $cf_save_LIBS"
41014
41015 cat >"conftest.$ac_ext" <<_ACEOF
41016 #line 41016 "configure"
41017 #include "confdefs.h"
41018
41019 $ac_includes_default
41020 #include <brotli/decode.h>
41021
41022 int
41023 main (void)
41024 {
41025
41026 BrotliDecoderDecompressStream(
41027 NULL, /* BrotliDecoderState* state */
41028 NULL, /* size_t* available_in */
41029 NULL, /* const uint8_t** next_in */
41030 NULL, /* size_t* available_out */
41031 NULL, /* uint8_t** next_out */
41032 NULL /* size_t* total_out */
41033 );
41034
41035 ;
41036 return 0;
41037 }
41038 _ACEOF
41039 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41040 if { (eval echo "$as_me:41040: \"$ac_link\"") >&5
41041 (eval $ac_link) 2>&5
41042 ac_status=$?
41043 echo "$as_me:41043: \$? = $ac_status" >&5
41044 (exit "$ac_status"); } &&
41045 { ac_try='test -s "conftest$ac_exeext"'
41046 { (eval echo "$as_me:41046: \"$ac_try\"") >&5
41047 (eval $ac_try) 2>&5
41048 ac_status=$?
41049 echo "$as_me:41049: \$? = $ac_status" >&5
41050 (exit "$ac_status"); }; }; then
41051
41052 cf_cv_find_linkage_brotlidec=yes
41053 cf_cv_header_path_brotlidec=/usr/include
41054 cf_cv_library_path_brotlidec=/usr/lib
41055 cf_cv_library_file_brotlidec="-lbrotlidec"
41056
41057 else
41058 echo "$as_me: failed program was:" >&5
41059 cat "conftest.$ac_ext" >&5
41060
41061 cf_cv_find_linkage_brotlidec=no
41062 LIBS="$cf_save_LIBS"
41063
41064 test -n "$verbose" && echo " find linkage for brotlidec library" 1>&6
41065
41066 echo "${as_me:-configure}:41066: testing find linkage for brotlidec library ..." 1>&5
41067
41068 echo "${as_me:-configure}:41068: testing Searching for headers in FIND_LINKAGE(brotlidec,brotlilib) ..." 1>&5
41069
41070 cf_save_CPPFLAGS="$CPPFLAGS"
41071 cf_test_CPPFLAGS="$CPPFLAGS"
41072
41073 cf_search=
41074
41075 # collect the current set of include-directories from compiler flags
41076 cf_header_path_list=""
41077 if test -n "${CFLAGS}${CPPFLAGS}" ; then
41078 for cf_header_path in $CPPFLAGS $CFLAGS
41079 do
41080 case "$cf_header_path" in
41081 (-I*)
41082 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
41083
41084 test "x$cf_header_path" != "xNONE" && \
41085 test -d "$cf_header_path" && \
41086 {
41087 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
41088 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
41089 test -d "$cf_header_path/include/brotlilib" && cf_search="$cf_search $cf_header_path/include/brotlilib"
41090 test -d "$cf_header_path/include/brotlilib/include" && cf_search="$cf_search $cf_header_path/include/brotlilib/include"
41091 test -d "$cf_header_path/brotlilib/include" && cf_search="$cf_search $cf_header_path/brotlilib/include"
41092 test -d "$cf_header_path/brotlilib/include/brotlilib" && cf_search="$cf_search $cf_header_path/brotlilib/include/brotlilib"
41093 }
41094
41095 cf_header_path_list="$cf_header_path_list $cf_search"
41096 ;;
41097 esac
41098 done
41099 fi
41100
41101 # add the variations for the package we are looking for
41102
41103 cf_search=
41104
41105 test "x$prefix" != "xNONE" && \
41106 test -d "$prefix" && \
41107 {
41108 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
41109 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
41110 test -d "$prefix/include/brotlilib" && cf_search="$cf_search $prefix/include/brotlilib"
41111 test -d "$prefix/include/brotlilib/include" && cf_search="$cf_search $prefix/include/brotlilib/include"
41112 test -d "$prefix/brotlilib/include" && cf_search="$cf_search $prefix/brotlilib/include"
41113 test -d "$prefix/brotlilib/include/brotlilib" && cf_search="$cf_search $prefix/brotlilib/include/brotlilib"
41114 }
41115
41116 for cf_subdir_prefix in \
41117 /usr \
41118 /usr/local \
41119 /usr/pkg \
41120 /opt \
41121 /opt/local \
41122 $HOME
41123 do
41124
41125 test "x$cf_subdir_prefix" != "x$prefix" && \
41126 test -d "$cf_subdir_prefix" && \
41127 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
41128 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
41129 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
41130 test -d "$cf_subdir_prefix/include/brotlilib" && cf_search="$cf_search $cf_subdir_prefix/include/brotlilib"
41131 test -d "$cf_subdir_prefix/include/brotlilib/include" && cf_search="$cf_search $cf_subdir_prefix/include/brotlilib/include"
41132 test -d "$cf_subdir_prefix/brotlilib/include" && cf_search="$cf_search $cf_subdir_prefix/brotlilib/include"
41133 test -d "$cf_subdir_prefix/brotlilib/include/brotlilib" && cf_search="$cf_search $cf_subdir_prefix/brotlilib/include/brotlilib"
41134 }
41135
41136 done
41137
41138 test "$includedir" != NONE && \
41139 test "$includedir" != "/usr/include" && \
41140 test -d "$includedir" && {
41141 test -d "$includedir" && cf_search="$cf_search $includedir"
41142 test -d "$includedir/brotlilib" && cf_search="$cf_search $includedir/brotlilib"
41143 }
41144
41145 test "$oldincludedir" != NONE && \
41146 test "$oldincludedir" != "/usr/include" && \
41147 test -d "$oldincludedir" && {
41148 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
41149 test -d "$oldincludedir/brotlilib" && cf_search="$cf_search $oldincludedir/brotlilib"
41150 }
41151
41152 cf_search="$cf_search $cf_header_path_list"
41153
41154 for cf_cv_header_path_brotlidec in $cf_search
41155 do
41156 if test -d "$cf_cv_header_path_brotlidec" ; then
41157 test -n "$verbose" && echo " ... testing $cf_cv_header_path_brotlidec" 1>&6
41158
41159 echo "${as_me:-configure}:41159: testing ... testing $cf_cv_header_path_brotlidec ..." 1>&5
41160
41161 CPPFLAGS="$cf_save_CPPFLAGS"
41162
41163 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
41164 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_brotlidec"
41165
41166 cat >"conftest.$ac_ext" <<_ACEOF
41167 #line 41167 "configure"
41168 #include "confdefs.h"
41169
41170 $ac_includes_default
41171 #include <brotli/decode.h>
41172
41173 int
41174 main (void)
41175 {
41176
41177 BrotliDecoderDecompressStream(
41178 NULL, /* BrotliDecoderState* state */
41179 NULL, /* size_t* available_in */
41180 NULL, /* const uint8_t** next_in */
41181 NULL, /* size_t* available_out */
41182 NULL, /* uint8_t** next_out */
41183 NULL /* size_t* total_out */
41184 );
41185
41186 ;
41187 return 0;
41188 }
41189 _ACEOF
41190 rm -f "conftest.$ac_objext"
41191 if { (eval echo "$as_me:41191: \"$ac_compile\"") >&5
41192 (eval $ac_compile) 2>&5
41193 ac_status=$?
41194 echo "$as_me:41194: \$? = $ac_status" >&5
41195 (exit "$ac_status"); } &&
41196 { ac_try='test -s "conftest.$ac_objext"'
41197 { (eval echo "$as_me:41197: \"$ac_try\"") >&5
41198 (eval $ac_try) 2>&5
41199 ac_status=$?
41200 echo "$as_me:41200: \$? = $ac_status" >&5
41201 (exit "$ac_status"); }; }; then
41202
41203 test -n "$verbose" && echo " ... found brotlidec headers in $cf_cv_header_path_brotlidec" 1>&6
41204
41205 echo "${as_me:-configure}:41205: testing ... found brotlidec headers in $cf_cv_header_path_brotlidec ..." 1>&5
41206
41207 cf_cv_find_linkage_brotlidec=maybe
41208 cf_test_CPPFLAGS="$CPPFLAGS"
41209 break
41210 else
41211 echo "$as_me: failed program was:" >&5
41212 cat "conftest.$ac_ext" >&5
41213
41214 CPPFLAGS="$cf_save_CPPFLAGS"
41215
41216 fi
41217 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41218 fi
41219 done
41220
41221 if test "$cf_cv_find_linkage_brotlidec" = maybe ; then
41222
41223 echo "${as_me:-configure}:41223: testing Searching for brotlidec library in FIND_LINKAGE(brotlidec,brotlilib) ..." 1>&5
41224
41225 cf_save_LIBS="$LIBS"
41226 cf_save_LDFLAGS="$LDFLAGS"
41227
41228 CPPFLAGS="$cf_test_CPPFLAGS"
41229 LIBS="-lbrotlidec $cf_save_LIBS"
41230 cat >"conftest.$ac_ext" <<_ACEOF
41231 #line 41231 "configure"
41232 #include "confdefs.h"
41233
41234 $ac_includes_default
41235 #include <brotli/decode.h>
41236
41237 int
41238 main (void)
41239 {
41240
41241 BrotliDecoderDecompressStream(
41242 NULL, /* BrotliDecoderState* state */
41243 NULL, /* size_t* available_in */
41244 NULL, /* const uint8_t** next_in */
41245 NULL, /* size_t* available_out */
41246 NULL, /* uint8_t** next_out */
41247 NULL /* size_t* total_out */
41248 );
41249
41250 ;
41251 return 0;
41252 }
41253 _ACEOF
41254 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41255 if { (eval echo "$as_me:41255: \"$ac_link\"") >&5
41256 (eval $ac_link) 2>&5
41257 ac_status=$?
41258 echo "$as_me:41258: \$? = $ac_status" >&5
41259 (exit "$ac_status"); } &&
41260 { ac_try='test -s "conftest$ac_exeext"'
41261 { (eval echo "$as_me:41261: \"$ac_try\"") >&5
41262 (eval $ac_try) 2>&5
41263 ac_status=$?
41264 echo "$as_me:41264: \$? = $ac_status" >&5
41265 (exit "$ac_status"); }; }; then
41266
41267 test -n "$verbose" && echo " ... found brotlidec library in system" 1>&6
41268
41269 echo "${as_me:-configure}:41269: testing ... found brotlidec library in system ..." 1>&5
41270
41271 cf_cv_find_linkage_brotlidec=yes
41272 else
41273 echo "$as_me: failed program was:" >&5
41274 cat "conftest.$ac_ext" >&5
41275 fi
41276 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41277 CPPFLAGS="$cf_save_CPPFLAGS"
41278 LIBS="$cf_save_LIBS"
41279
41280 if test "$cf_cv_find_linkage_brotlidec" != yes ; then
41281
41282 cf_search=
41283 cf_library_path_list=""
41284 if test -n "${LDFLAGS}${LIBS}" ; then
41285 for cf_library_path in $LDFLAGS $LIBS
41286 do
41287 case "$cf_library_path" in
41288 (-L*)
41289 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
41290
41291 test "x$cf_library_path" != "xNONE" && \
41292 test -d "$cf_library_path" && \
41293 {
41294 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
41295 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
41296 test -d "$cf_library_path/lib/brotlidec" && cf_search="$cf_search $cf_library_path/lib/brotlidec"
41297 test -d "$cf_library_path/lib/brotlidec/lib" && cf_search="$cf_search $cf_library_path/lib/brotlidec/lib"
41298 test -d "$cf_library_path/brotlidec/lib" && cf_search="$cf_search $cf_library_path/brotlidec/lib"
41299 test -d "$cf_library_path/brotlidec/lib/brotlidec" && cf_search="$cf_search $cf_library_path/brotlidec/lib/brotlidec"
41300 }
41301
41302 cf_library_path_list="$cf_library_path_list $cf_search"
41303 ;;
41304 esac
41305 done
41306 fi
41307
41308 cf_search=
41309
41310 test "x$prefix" != "xNONE" && \
41311 test -d "$prefix" && \
41312 {
41313 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
41314 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
41315 test -d "$prefix/lib/brotlidec" && cf_search="$cf_search $prefix/lib/brotlidec"
41316 test -d "$prefix/lib/brotlidec/lib" && cf_search="$cf_search $prefix/lib/brotlidec/lib"
41317 test -d "$prefix/brotlidec/lib" && cf_search="$cf_search $prefix/brotlidec/lib"
41318 test -d "$prefix/brotlidec/lib/brotlidec" && cf_search="$cf_search $prefix/brotlidec/lib/brotlidec"
41319 }
41320
41321 for cf_subdir_prefix in \
41322 /usr \
41323 /usr/local \
41324 /usr/pkg \
41325 /opt \
41326 /opt/local \
41327 $HOME
41328 do
41329
41330 test "x$cf_subdir_prefix" != "x$prefix" && \
41331 test -d "$cf_subdir_prefix" && \
41332 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
41333 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
41334 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
41335 test -d "$cf_subdir_prefix/lib/brotlidec" && cf_search="$cf_search $cf_subdir_prefix/lib/brotlidec"
41336 test -d "$cf_subdir_prefix/lib/brotlidec/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/brotlidec/lib"
41337 test -d "$cf_subdir_prefix/brotlidec/lib" && cf_search="$cf_search $cf_subdir_prefix/brotlidec/lib"
41338 test -d "$cf_subdir_prefix/brotlidec/lib/brotlidec" && cf_search="$cf_search $cf_subdir_prefix/brotlidec/lib/brotlidec"
41339 }
41340
41341 done
41342
41343 cf_search="$cf_library_path_list $cf_search"
41344
41345 for cf_cv_library_path_brotlidec in $cf_search
41346 do
41347 if test -d "$cf_cv_library_path_brotlidec" ; then
41348 test -n "$verbose" && echo " ... testing $cf_cv_library_path_brotlidec" 1>&6
41349
41350 echo "${as_me:-configure}:41350: testing ... testing $cf_cv_library_path_brotlidec ..." 1>&5
41351
41352 CPPFLAGS="$cf_test_CPPFLAGS"
41353 LIBS="-lbrotlidec $cf_save_LIBS"
41354 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_brotlidec"
41355 cat >"conftest.$ac_ext" <<_ACEOF
41356 #line 41356 "configure"
41357 #include "confdefs.h"
41358
41359 $ac_includes_default
41360 #include <brotli/decode.h>
41361
41362 int
41363 main (void)
41364 {
41365
41366 BrotliDecoderDecompressStream(
41367 NULL, /* BrotliDecoderState* state */
41368 NULL, /* size_t* available_in */
41369 NULL, /* const uint8_t** next_in */
41370 NULL, /* size_t* available_out */
41371 NULL, /* uint8_t** next_out */
41372 NULL /* size_t* total_out */
41373 );
41374
41375 ;
41376 return 0;
41377 }
41378 _ACEOF
41379 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41380 if { (eval echo "$as_me:41380: \"$ac_link\"") >&5
41381 (eval $ac_link) 2>&5
41382 ac_status=$?
41383 echo "$as_me:41383: \$? = $ac_status" >&5
41384 (exit "$ac_status"); } &&
41385 { ac_try='test -s "conftest$ac_exeext"'
41386 { (eval echo "$as_me:41386: \"$ac_try\"") >&5
41387 (eval $ac_try) 2>&5
41388 ac_status=$?
41389 echo "$as_me:41389: \$? = $ac_status" >&5
41390 (exit "$ac_status"); }; }; then
41391
41392 test -n "$verbose" && echo " ... found brotlidec library in $cf_cv_library_path_brotlidec" 1>&6
41393
41394 echo "${as_me:-configure}:41394: testing ... found brotlidec library in $cf_cv_library_path_brotlidec ..." 1>&5
41395
41396 cf_cv_find_linkage_brotlidec=yes
41397 cf_cv_library_file_brotlidec="-lbrotlidec"
41398 break
41399 else
41400 echo "$as_me: failed program was:" >&5
41401 cat "conftest.$ac_ext" >&5
41402
41403 CPPFLAGS="$cf_save_CPPFLAGS"
41404 LIBS="$cf_save_LIBS"
41405 LDFLAGS="$cf_save_LDFLAGS"
41406
41407 fi
41408 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41409 fi
41410 done
41411 CPPFLAGS="$cf_save_CPPFLAGS"
41412 LDFLAGS="$cf_save_LDFLAGS"
41413 fi
41414
41415 else
41416 cf_cv_find_linkage_brotlidec=no
41417 fi
41418
41419 fi
41420 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41421
41422 fi
41423 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41424
41425 LIBS="$cf_save_LIBS"
41426
41427 if test "$cf_cv_find_linkage_brotlidec" = yes ; then
41428
41429 if test -n "$cf_cv_header_path_brotlidec" ; then
41430 for cf_add_incdir in $cf_cv_header_path_brotlidec
41431 do
41432 while test "$cf_add_incdir" != /usr/include
41433 do
41434 if test -d "$cf_add_incdir"
41435 then
41436 cf_have_incdir=no
41437 if test -n "$CFLAGS$CPPFLAGS" ; then
41438 # a loop is needed to ensure we can add subdirs of existing dirs
41439 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
41440 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
41441 cf_have_incdir=yes; break
41442 fi
41443 done
41444 fi
41445
41446 if test "$cf_have_incdir" = no ; then
41447 if test "$cf_add_incdir" = /usr/local/include ; then
41448 if test "$GCC" = yes
41449 then
41450 cf_save_CPPFLAGS=$CPPFLAGS
41451
41452 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
41453 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
41454
41455 cat >"conftest.$ac_ext" <<_ACEOF
41456 #line 41456 "configure"
41457 #include "confdefs.h"
41458 #include <stdio.h>
41459 int
41460 main (void)
41461 {
41462 printf("Hello")
41463 ;
41464 return 0;
41465 }
41466 _ACEOF
41467 rm -f "conftest.$ac_objext"
41468 if { (eval echo "$as_me:41468: \"$ac_compile\"") >&5
41469 (eval $ac_compile) 2>&5
41470 ac_status=$?
41471 echo "$as_me:41471: \$? = $ac_status" >&5
41472 (exit "$ac_status"); } &&
41473 { ac_try='test -s "conftest.$ac_objext"'
41474 { (eval echo "$as_me:41474: \"$ac_try\"") >&5
41475 (eval $ac_try) 2>&5
41476 ac_status=$?
41477 echo "$as_me:41477: \$? = $ac_status" >&5
41478 (exit "$ac_status"); }; }; then
41479 :
41480 else
41481 echo "$as_me: failed program was:" >&5
41482 cat "conftest.$ac_ext" >&5
41483 cf_have_incdir=yes
41484 fi
41485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41486 CPPFLAGS=$cf_save_CPPFLAGS
41487 fi
41488 fi
41489 fi
41490
41491 if test "$cf_have_incdir" = no ; then
41492 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
41493
41494 echo "${as_me:-configure}:41494: testing adding $cf_add_incdir to include-path ..." 1>&5
41495
41496 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
41497
41498 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
41499 test "$cf_top_incdir" = "$cf_add_incdir" && break
41500 cf_add_incdir="$cf_top_incdir"
41501 else
41502 break
41503 fi
41504 else
41505 break
41506 fi
41507 done
41508 done
41509 fi
41510
41511 if test -n "$cf_cv_library_path_brotlidec" ; then
41512 for cf_add_libdir in $cf_cv_library_path_brotlidec
41513 do
41514 if test "$cf_add_libdir" = /usr/lib ; then
41515 :
41516 elif test -d "$cf_add_libdir"
41517 then
41518 cf_have_libdir=no
41519 if test -n "$LDFLAGS$LIBS" ; then
41520 # a loop is needed to ensure we can add subdirs of existing dirs
41521 for cf_test_libdir in $LDFLAGS $LIBS ; do
41522 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
41523 cf_have_libdir=yes; break
41524 fi
41525 done
41526 fi
41527 if test "$cf_have_libdir" = no ; then
41528 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
41529
41530 echo "${as_me:-configure}:41530: testing adding $cf_add_libdir to library-path ..." 1>&5
41531
41532 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
41533 fi
41534 fi
41535 done
41536 fi
41537
41538 cf_add_libs="$LIBS"
41539 # reverse order
41540 cf_add_0lib=
41541 for cf_add_1lib in -lbrotlidec; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
41542 # filter duplicates
41543 for cf_add_1lib in $cf_add_0lib; do
41544 for cf_add_2lib in $cf_add_libs; do
41545 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
41546 cf_add_1lib=
41547 break
41548 fi
41549 done
41550 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
41551 done
41552 LIBS="$cf_add_libs"
41553
41554 else
41555 { echo "$as_me:41555: WARNING: Cannot find brotlidec library" >&5
41556 echo "$as_me: WARNING: Cannot find brotlidec library" >&2;}
41557 fi
41558
41559 test "x$cf_cv_find_linkage_brotlidec" = "xyes" &&
41560 cat >>confdefs.h <<\EOF
41561 #define USE_BROTLI 1
41562 EOF
41563
41564 fi
41565
41566 echo "$as_me:41566: checking if you want to use zstd decompression" >&5
41567 echo $ECHO_N "checking if you want to use zstd decompression... $ECHO_C" >&6
41568
41569 # Check whether --with-zstd or --without-zstd was given.
41570 if test "${with_zstd+set}" = set; then
41571 withval="$with_zstd"
41572 use_zstd=$withval
41573 else
41574 use_zstd=yes
41575 fi;
41576 echo "$as_me:41576: result: $use_zstd" >&5
41577 echo "${ECHO_T}$use_zstd" >&6
41578
41579 if test ".$use_zstd" != ".no" ; then
41580
41581 case "x$use_zstd" in
41582 (xno|xyes|x)
41583 ;;
41584 (*)
41585
41586 for cf_searchpath in `echo "$use_zstd" | tr $PATH_SEPARATOR ' '`; do
41587 if test -d "$cf_searchpath/include" ; then
41588
41589 if test -n "$cf_searchpath/include" ; then
41590 for cf_add_incdir in $cf_searchpath/include
41591 do
41592 while test "$cf_add_incdir" != /usr/include
41593 do
41594 if test -d "$cf_add_incdir"
41595 then
41596 cf_have_incdir=no
41597 if test -n "$CFLAGS$CPPFLAGS" ; then
41598 # a loop is needed to ensure we can add subdirs of existing dirs
41599 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
41600 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
41601 cf_have_incdir=yes; break
41602 fi
41603 done
41604 fi
41605
41606 if test "$cf_have_incdir" = no ; then
41607 if test "$cf_add_incdir" = /usr/local/include ; then
41608 if test "$GCC" = yes
41609 then
41610 cf_save_CPPFLAGS=$CPPFLAGS
41611
41612 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
41613 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
41614
41615 cat >"conftest.$ac_ext" <<_ACEOF
41616 #line 41616 "configure"
41617 #include "confdefs.h"
41618 #include <stdio.h>
41619 int
41620 main (void)
41621 {
41622 printf("Hello")
41623 ;
41624 return 0;
41625 }
41626 _ACEOF
41627 rm -f "conftest.$ac_objext"
41628 if { (eval echo "$as_me:41628: \"$ac_compile\"") >&5
41629 (eval $ac_compile) 2>&5
41630 ac_status=$?
41631 echo "$as_me:41631: \$? = $ac_status" >&5
41632 (exit "$ac_status"); } &&
41633 { ac_try='test -s "conftest.$ac_objext"'
41634 { (eval echo "$as_me:41634: \"$ac_try\"") >&5
41635 (eval $ac_try) 2>&5
41636 ac_status=$?
41637 echo "$as_me:41637: \$? = $ac_status" >&5
41638 (exit "$ac_status"); }; }; then
41639 :
41640 else
41641 echo "$as_me: failed program was:" >&5
41642 cat "conftest.$ac_ext" >&5
41643 cf_have_incdir=yes
41644 fi
41645 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41646 CPPFLAGS=$cf_save_CPPFLAGS
41647 fi
41648 fi
41649 fi
41650
41651 if test "$cf_have_incdir" = no ; then
41652 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
41653
41654 echo "${as_me:-configure}:41654: testing adding $cf_add_incdir to include-path ..." 1>&5
41655
41656 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
41657
41658 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
41659 test "$cf_top_incdir" = "$cf_add_incdir" && break
41660 cf_add_incdir="$cf_top_incdir"
41661 else
41662 break
41663 fi
41664 else
41665 break
41666 fi
41667 done
41668 done
41669 fi
41670
41671 elif test -d "$cf_searchpath/../include" ; then
41672
41673 if test -n "$cf_searchpath/../include" ; then
41674 for cf_add_incdir in $cf_searchpath/../include
41675 do
41676 while test "$cf_add_incdir" != /usr/include
41677 do
41678 if test -d "$cf_add_incdir"
41679 then
41680 cf_have_incdir=no
41681 if test -n "$CFLAGS$CPPFLAGS" ; then
41682 # a loop is needed to ensure we can add subdirs of existing dirs
41683 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
41684 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
41685 cf_have_incdir=yes; break
41686 fi
41687 done
41688 fi
41689
41690 if test "$cf_have_incdir" = no ; then
41691 if test "$cf_add_incdir" = /usr/local/include ; then
41692 if test "$GCC" = yes
41693 then
41694 cf_save_CPPFLAGS=$CPPFLAGS
41695
41696 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
41697 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
41698
41699 cat >"conftest.$ac_ext" <<_ACEOF
41700 #line 41700 "configure"
41701 #include "confdefs.h"
41702 #include <stdio.h>
41703 int
41704 main (void)
41705 {
41706 printf("Hello")
41707 ;
41708 return 0;
41709 }
41710 _ACEOF
41711 rm -f "conftest.$ac_objext"
41712 if { (eval echo "$as_me:41712: \"$ac_compile\"") >&5
41713 (eval $ac_compile) 2>&5
41714 ac_status=$?
41715 echo "$as_me:41715: \$? = $ac_status" >&5
41716 (exit "$ac_status"); } &&
41717 { ac_try='test -s "conftest.$ac_objext"'
41718 { (eval echo "$as_me:41718: \"$ac_try\"") >&5
41719 (eval $ac_try) 2>&5
41720 ac_status=$?
41721 echo "$as_me:41721: \$? = $ac_status" >&5
41722 (exit "$ac_status"); }; }; then
41723 :
41724 else
41725 echo "$as_me: failed program was:" >&5
41726 cat "conftest.$ac_ext" >&5
41727 cf_have_incdir=yes
41728 fi
41729 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41730 CPPFLAGS=$cf_save_CPPFLAGS
41731 fi
41732 fi
41733 fi
41734
41735 if test "$cf_have_incdir" = no ; then
41736 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
41737
41738 echo "${as_me:-configure}:41738: testing adding $cf_add_incdir to include-path ..." 1>&5
41739
41740 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
41741
41742 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
41743 test "$cf_top_incdir" = "$cf_add_incdir" && break
41744 cf_add_incdir="$cf_top_incdir"
41745 else
41746 break
41747 fi
41748 else
41749 break
41750 fi
41751 done
41752 done
41753 fi
41754
41755 else
41756 { { echo "$as_me:41756: error: cannot find zstd library under $use_zstd" >&5
41757 echo "$as_me: error: cannot find zstd library under $use_zstd" >&2;}
41758 { (exit 1); exit 1; }; }
41759 fi
41760 if test -d "$cf_searchpath/lib" ; then
41761
41762 if test -n "$cf_searchpath/lib" ; then
41763 for cf_add_libdir in $cf_searchpath/lib
41764 do
41765 if test "$cf_add_libdir" = /usr/lib ; then
41766 :
41767 elif test -d "$cf_add_libdir"
41768 then
41769 cf_have_libdir=no
41770 if test -n "$LDFLAGS$LIBS" ; then
41771 # a loop is needed to ensure we can add subdirs of existing dirs
41772 for cf_test_libdir in $LDFLAGS $LIBS ; do
41773 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
41774 cf_have_libdir=yes; break
41775 fi
41776 done
41777 fi
41778 if test "$cf_have_libdir" = no ; then
41779 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
41780
41781 echo "${as_me:-configure}:41781: testing adding $cf_add_libdir to library-path ..." 1>&5
41782
41783 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
41784 fi
41785 fi
41786 done
41787 fi
41788
41789 elif test -d "$cf_searchpath" ; then
41790
41791 if test -n "$cf_searchpath" ; then
41792 for cf_add_libdir in $cf_searchpath
41793 do
41794 if test "$cf_add_libdir" = /usr/lib ; then
41795 :
41796 elif test -d "$cf_add_libdir"
41797 then
41798 cf_have_libdir=no
41799 if test -n "$LDFLAGS$LIBS" ; then
41800 # a loop is needed to ensure we can add subdirs of existing dirs
41801 for cf_test_libdir in $LDFLAGS $LIBS ; do
41802 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
41803 cf_have_libdir=yes; break
41804 fi
41805 done
41806 fi
41807 if test "$cf_have_libdir" = no ; then
41808 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
41809
41810 echo "${as_me:-configure}:41810: testing adding $cf_add_libdir to library-path ..." 1>&5
41811
41812 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
41813 fi
41814 fi
41815 done
41816 fi
41817
41818 else
41819 { { echo "$as_me:41819: error: cannot find zstd library under $use_zstd" >&5
41820 echo "$as_me: error: cannot find zstd library under $use_zstd" >&2;}
41821 { (exit 1); exit 1; }; }
41822 fi
41823 done
41824
41825 test -n "$verbose" && echo " setting path value for zstd library to $use_zstd" 1>&6
41826
41827 echo "${as_me:-configure}:41827: testing setting path value for zstd library to $use_zstd ..." 1>&5
41828
41829 ;;
41830 esac
41831
41832 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
41833 # will be set on completion of the AC_LINK_IFELSE below.
41834 cf_cv_header_path_zstd=
41835 cf_cv_library_path_zstd=
41836
41837 echo "${as_me:-configure}:41837: testing Starting FIND_LINKAGE(zstd,zstd) ..." 1>&5
41838
41839 cf_save_LIBS="$LIBS"
41840
41841 cat >"conftest.$ac_ext" <<_ACEOF
41842 #line 41842 "configure"
41843 #include "confdefs.h"
41844
41845 #include <zstd.h>
41846
41847 int
41848 main (void)
41849 {
41850
41851 ZSTD_DStream *izsp = ZSTD_createDStream();
41852 ZSTD_inBuffer ib;
41853 ZSTD_outBuffer ob;
41854 ZSTD_initDStream(izsp);
41855 ZSTD_decompressStream(izsp, &ob, &ib);
41856 ZSTD_freeDStream(izsp);
41857
41858 ;
41859 return 0;
41860 }
41861 _ACEOF
41862 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41863 if { (eval echo "$as_me:41863: \"$ac_link\"") >&5
41864 (eval $ac_link) 2>&5
41865 ac_status=$?
41866 echo "$as_me:41866: \$? = $ac_status" >&5
41867 (exit "$ac_status"); } &&
41868 { ac_try='test -s "conftest$ac_exeext"'
41869 { (eval echo "$as_me:41869: \"$ac_try\"") >&5
41870 (eval $ac_try) 2>&5
41871 ac_status=$?
41872 echo "$as_me:41872: \$? = $ac_status" >&5
41873 (exit "$ac_status"); }; }; then
41874
41875 cf_cv_find_linkage_zstd=yes
41876 cf_cv_header_path_zstd=/usr/include
41877 cf_cv_library_path_zstd=/usr/lib
41878
41879 else
41880 echo "$as_me: failed program was:" >&5
41881 cat "conftest.$ac_ext" >&5
41882
41883 LIBS="-lzstd $cf_save_LIBS"
41884
41885 cat >"conftest.$ac_ext" <<_ACEOF
41886 #line 41886 "configure"
41887 #include "confdefs.h"
41888
41889 #include <zstd.h>
41890
41891 int
41892 main (void)
41893 {
41894
41895 ZSTD_DStream *izsp = ZSTD_createDStream();
41896 ZSTD_inBuffer ib;
41897 ZSTD_outBuffer ob;
41898 ZSTD_initDStream(izsp);
41899 ZSTD_decompressStream(izsp, &ob, &ib);
41900 ZSTD_freeDStream(izsp);
41901
41902 ;
41903 return 0;
41904 }
41905 _ACEOF
41906 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41907 if { (eval echo "$as_me:41907: \"$ac_link\"") >&5
41908 (eval $ac_link) 2>&5
41909 ac_status=$?
41910 echo "$as_me:41910: \$? = $ac_status" >&5
41911 (exit "$ac_status"); } &&
41912 { ac_try='test -s "conftest$ac_exeext"'
41913 { (eval echo "$as_me:41913: \"$ac_try\"") >&5
41914 (eval $ac_try) 2>&5
41915 ac_status=$?
41916 echo "$as_me:41916: \$? = $ac_status" >&5
41917 (exit "$ac_status"); }; }; then
41918
41919 cf_cv_find_linkage_zstd=yes
41920 cf_cv_header_path_zstd=/usr/include
41921 cf_cv_library_path_zstd=/usr/lib
41922 cf_cv_library_file_zstd="-lzstd"
41923
41924 else
41925 echo "$as_me: failed program was:" >&5
41926 cat "conftest.$ac_ext" >&5
41927
41928 cf_cv_find_linkage_zstd=no
41929 LIBS="$cf_save_LIBS"
41930
41931 test -n "$verbose" && echo " find linkage for zstd library" 1>&6
41932
41933 echo "${as_me:-configure}:41933: testing find linkage for zstd library ..." 1>&5
41934
41935 echo "${as_me:-configure}:41935: testing Searching for headers in FIND_LINKAGE(zstd,zstd) ..." 1>&5
41936
41937 cf_save_CPPFLAGS="$CPPFLAGS"
41938 cf_test_CPPFLAGS="$CPPFLAGS"
41939
41940 cf_search=
41941
41942 # collect the current set of include-directories from compiler flags
41943 cf_header_path_list=""
41944 if test -n "${CFLAGS}${CPPFLAGS}" ; then
41945 for cf_header_path in $CPPFLAGS $CFLAGS
41946 do
41947 case "$cf_header_path" in
41948 (-I*)
41949 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
41950
41951 test "x$cf_header_path" != "xNONE" && \
41952 test -d "$cf_header_path" && \
41953 {
41954 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
41955 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
41956 test -d "$cf_header_path/include/zstd" && cf_search="$cf_search $cf_header_path/include/zstd"
41957 test -d "$cf_header_path/include/zstd/include" && cf_search="$cf_search $cf_header_path/include/zstd/include"
41958 test -d "$cf_header_path/zstd/include" && cf_search="$cf_search $cf_header_path/zstd/include"
41959 test -d "$cf_header_path/zstd/include/zstd" && cf_search="$cf_search $cf_header_path/zstd/include/zstd"
41960 }
41961
41962 cf_header_path_list="$cf_header_path_list $cf_search"
41963 ;;
41964 esac
41965 done
41966 fi
41967
41968 # add the variations for the package we are looking for
41969
41970 cf_search=
41971
41972 test "x$prefix" != "xNONE" && \
41973 test -d "$prefix" && \
41974 {
41975 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
41976 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
41977 test -d "$prefix/include/zstd" && cf_search="$cf_search $prefix/include/zstd"
41978 test -d "$prefix/include/zstd/include" && cf_search="$cf_search $prefix/include/zstd/include"
41979 test -d "$prefix/zstd/include" && cf_search="$cf_search $prefix/zstd/include"
41980 test -d "$prefix/zstd/include/zstd" && cf_search="$cf_search $prefix/zstd/include/zstd"
41981 }
41982
41983 for cf_subdir_prefix in \
41984 /usr \
41985 /usr/local \
41986 /usr/pkg \
41987 /opt \
41988 /opt/local \
41989 $HOME
41990 do
41991
41992 test "x$cf_subdir_prefix" != "x$prefix" && \
41993 test -d "$cf_subdir_prefix" && \
41994 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
41995 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
41996 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
41997 test -d "$cf_subdir_prefix/include/zstd" && cf_search="$cf_search $cf_subdir_prefix/include/zstd"
41998 test -d "$cf_subdir_prefix/include/zstd/include" && cf_search="$cf_search $cf_subdir_prefix/include/zstd/include"
41999 test -d "$cf_subdir_prefix/zstd/include" && cf_search="$cf_search $cf_subdir_prefix/zstd/include"
42000 test -d "$cf_subdir_prefix/zstd/include/zstd" && cf_search="$cf_search $cf_subdir_prefix/zstd/include/zstd"
42001 }
42002
42003 done
42004
42005 test "$includedir" != NONE && \
42006 test "$includedir" != "/usr/include" && \
42007 test -d "$includedir" && {
42008 test -d "$includedir" && cf_search="$cf_search $includedir"
42009 test -d "$includedir/zstd" && cf_search="$cf_search $includedir/zstd"
42010 }
42011
42012 test "$oldincludedir" != NONE && \
42013 test "$oldincludedir" != "/usr/include" && \
42014 test -d "$oldincludedir" && {
42015 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
42016 test -d "$oldincludedir/zstd" && cf_search="$cf_search $oldincludedir/zstd"
42017 }
42018
42019 cf_search="$cf_search $cf_header_path_list"
42020
42021 for cf_cv_header_path_zstd in $cf_search
42022 do
42023 if test -d "$cf_cv_header_path_zstd" ; then
42024 test -n "$verbose" && echo " ... testing $cf_cv_header_path_zstd" 1>&6
42025
42026 echo "${as_me:-configure}:42026: testing ... testing $cf_cv_header_path_zstd ..." 1>&5
42027
42028 CPPFLAGS="$cf_save_CPPFLAGS"
42029
42030 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
42031 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_zstd"
42032
42033 cat >"conftest.$ac_ext" <<_ACEOF
42034 #line 42034 "configure"
42035 #include "confdefs.h"
42036
42037 #include <zstd.h>
42038
42039 int
42040 main (void)
42041 {
42042
42043 ZSTD_DStream *izsp = ZSTD_createDStream();
42044 ZSTD_inBuffer ib;
42045 ZSTD_outBuffer ob;
42046 ZSTD_initDStream(izsp);
42047 ZSTD_decompressStream(izsp, &ob, &ib);
42048 ZSTD_freeDStream(izsp);
42049
42050 ;
42051 return 0;
42052 }
42053 _ACEOF
42054 rm -f "conftest.$ac_objext"
42055 if { (eval echo "$as_me:42055: \"$ac_compile\"") >&5
42056 (eval $ac_compile) 2>&5
42057 ac_status=$?
42058 echo "$as_me:42058: \$? = $ac_status" >&5
42059 (exit "$ac_status"); } &&
42060 { ac_try='test -s "conftest.$ac_objext"'
42061 { (eval echo "$as_me:42061: \"$ac_try\"") >&5
42062 (eval $ac_try) 2>&5
42063 ac_status=$?
42064 echo "$as_me:42064: \$? = $ac_status" >&5
42065 (exit "$ac_status"); }; }; then
42066
42067 test -n "$verbose" && echo " ... found zstd headers in $cf_cv_header_path_zstd" 1>&6
42068
42069 echo "${as_me:-configure}:42069: testing ... found zstd headers in $cf_cv_header_path_zstd ..." 1>&5
42070
42071 cf_cv_find_linkage_zstd=maybe
42072 cf_test_CPPFLAGS="$CPPFLAGS"
42073 break
42074 else
42075 echo "$as_me: failed program was:" >&5
42076 cat "conftest.$ac_ext" >&5
42077
42078 CPPFLAGS="$cf_save_CPPFLAGS"
42079
42080 fi
42081 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
42082 fi
42083 done
42084
42085 if test "$cf_cv_find_linkage_zstd" = maybe ; then
42086
42087 echo "${as_me:-configure}:42087: testing Searching for zstd library in FIND_LINKAGE(zstd,zstd) ..." 1>&5
42088
42089 cf_save_LIBS="$LIBS"
42090 cf_save_LDFLAGS="$LDFLAGS"
42091
42092 CPPFLAGS="$cf_test_CPPFLAGS"
42093 LIBS="-lzstd $cf_save_LIBS"
42094 cat >"conftest.$ac_ext" <<_ACEOF
42095 #line 42095 "configure"
42096 #include "confdefs.h"
42097
42098 #include <zstd.h>
42099
42100 int
42101 main (void)
42102 {
42103
42104 ZSTD_DStream *izsp = ZSTD_createDStream();
42105 ZSTD_inBuffer ib;
42106 ZSTD_outBuffer ob;
42107 ZSTD_initDStream(izsp);
42108 ZSTD_decompressStream(izsp, &ob, &ib);
42109 ZSTD_freeDStream(izsp);
42110
42111 ;
42112 return 0;
42113 }
42114 _ACEOF
42115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
42116 if { (eval echo "$as_me:42116: \"$ac_link\"") >&5
42117 (eval $ac_link) 2>&5
42118 ac_status=$?
42119 echo "$as_me:42119: \$? = $ac_status" >&5
42120 (exit "$ac_status"); } &&
42121 { ac_try='test -s "conftest$ac_exeext"'
42122 { (eval echo "$as_me:42122: \"$ac_try\"") >&5
42123 (eval $ac_try) 2>&5
42124 ac_status=$?
42125 echo "$as_me:42125: \$? = $ac_status" >&5
42126 (exit "$ac_status"); }; }; then
42127
42128 test -n "$verbose" && echo " ... found zstd library in system" 1>&6
42129
42130 echo "${as_me:-configure}:42130: testing ... found zstd library in system ..." 1>&5
42131
42132 cf_cv_find_linkage_zstd=yes
42133 else
42134 echo "$as_me: failed program was:" >&5
42135 cat "conftest.$ac_ext" >&5
42136 fi
42137 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42138 CPPFLAGS="$cf_save_CPPFLAGS"
42139 LIBS="$cf_save_LIBS"
42140
42141 if test "$cf_cv_find_linkage_zstd" != yes ; then
42142
42143 cf_search=
42144 cf_library_path_list=""
42145 if test -n "${LDFLAGS}${LIBS}" ; then
42146 for cf_library_path in $LDFLAGS $LIBS
42147 do
42148 case "$cf_library_path" in
42149 (-L*)
42150 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
42151
42152 test "x$cf_library_path" != "xNONE" && \
42153 test -d "$cf_library_path" && \
42154 {
42155 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
42156 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
42157 test -d "$cf_library_path/lib/zstd" && cf_search="$cf_search $cf_library_path/lib/zstd"
42158 test -d "$cf_library_path/lib/zstd/lib" && cf_search="$cf_search $cf_library_path/lib/zstd/lib"
42159 test -d "$cf_library_path/zstd/lib" && cf_search="$cf_search $cf_library_path/zstd/lib"
42160 test -d "$cf_library_path/zstd/lib/zstd" && cf_search="$cf_search $cf_library_path/zstd/lib/zstd"
42161 }
42162
42163 cf_library_path_list="$cf_library_path_list $cf_search"
42164 ;;
42165 esac
42166 done
42167 fi
42168
42169 cf_search=
42170
42171 test "x$prefix" != "xNONE" && \
42172 test -d "$prefix" && \
42173 {
42174 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
42175 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
42176 test -d "$prefix/lib/zstd" && cf_search="$cf_search $prefix/lib/zstd"
42177 test -d "$prefix/lib/zstd/lib" && cf_search="$cf_search $prefix/lib/zstd/lib"
42178 test -d "$prefix/zstd/lib" && cf_search="$cf_search $prefix/zstd/lib"
42179 test -d "$prefix/zstd/lib/zstd" && cf_search="$cf_search $prefix/zstd/lib/zstd"
42180 }
42181
42182 for cf_subdir_prefix in \
42183 /usr \
42184 /usr/local \
42185 /usr/pkg \
42186 /opt \
42187 /opt/local \
42188 $HOME
42189 do
42190
42191 test "x$cf_subdir_prefix" != "x$prefix" && \
42192 test -d "$cf_subdir_prefix" && \
42193 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
42194 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
42195 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
42196 test -d "$cf_subdir_prefix/lib/zstd" && cf_search="$cf_search $cf_subdir_prefix/lib/zstd"
42197 test -d "$cf_subdir_prefix/lib/zstd/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/zstd/lib"
42198 test -d "$cf_subdir_prefix/zstd/lib" && cf_search="$cf_search $cf_subdir_prefix/zstd/lib"
42199 test -d "$cf_subdir_prefix/zstd/lib/zstd" && cf_search="$cf_search $cf_subdir_prefix/zstd/lib/zstd"
42200 }
42201
42202 done
42203
42204 cf_search="$cf_library_path_list $cf_search"
42205
42206 for cf_cv_library_path_zstd in $cf_search
42207 do
42208 if test -d "$cf_cv_library_path_zstd" ; then
42209 test -n "$verbose" && echo " ... testing $cf_cv_library_path_zstd" 1>&6
42210
42211 echo "${as_me:-configure}:42211: testing ... testing $cf_cv_library_path_zstd ..." 1>&5
42212
42213 CPPFLAGS="$cf_test_CPPFLAGS"
42214 LIBS="-lzstd $cf_save_LIBS"
42215 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_zstd"
42216 cat >"conftest.$ac_ext" <<_ACEOF
42217 #line 42217 "configure"
42218 #include "confdefs.h"
42219
42220 #include <zstd.h>
42221
42222 int
42223 main (void)
42224 {
42225
42226 ZSTD_DStream *izsp = ZSTD_createDStream();
42227 ZSTD_inBuffer ib;
42228 ZSTD_outBuffer ob;
42229 ZSTD_initDStream(izsp);
42230 ZSTD_decompressStream(izsp, &ob, &ib);
42231 ZSTD_freeDStream(izsp);
42232
42233 ;
42234 return 0;
42235 }
42236 _ACEOF
42237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
42238 if { (eval echo "$as_me:42238: \"$ac_link\"") >&5
42239 (eval $ac_link) 2>&5
42240 ac_status=$?
42241 echo "$as_me:42241: \$? = $ac_status" >&5
42242 (exit "$ac_status"); } &&
42243 { ac_try='test -s "conftest$ac_exeext"'
42244 { (eval echo "$as_me:42244: \"$ac_try\"") >&5
42245 (eval $ac_try) 2>&5
42246 ac_status=$?
42247 echo "$as_me:42247: \$? = $ac_status" >&5
42248 (exit "$ac_status"); }; }; then
42249
42250 test -n "$verbose" && echo " ... found zstd library in $cf_cv_library_path_zstd" 1>&6
42251
42252 echo "${as_me:-configure}:42252: testing ... found zstd library in $cf_cv_library_path_zstd ..." 1>&5
42253
42254 cf_cv_find_linkage_zstd=yes
42255 cf_cv_library_file_zstd="-lzstd"
42256 break
42257 else
42258 echo "$as_me: failed program was:" >&5
42259 cat "conftest.$ac_ext" >&5
42260
42261 CPPFLAGS="$cf_save_CPPFLAGS"
42262 LIBS="$cf_save_LIBS"
42263 LDFLAGS="$cf_save_LDFLAGS"
42264
42265 fi
42266 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42267 fi
42268 done
42269 CPPFLAGS="$cf_save_CPPFLAGS"
42270 LDFLAGS="$cf_save_LDFLAGS"
42271 fi
42272
42273 else
42274 cf_cv_find_linkage_zstd=no
42275 fi
42276
42277 fi
42278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42279
42280 fi
42281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42282
42283 LIBS="$cf_save_LIBS"
42284
42285 if test "$cf_cv_find_linkage_zstd" = yes ; then
42286
42287 if test -n "$cf_cv_header_path_zstd" ; then
42288 for cf_add_incdir in $cf_cv_header_path_zstd
42289 do
42290 while test "$cf_add_incdir" != /usr/include
42291 do
42292 if test -d "$cf_add_incdir"
42293 then
42294 cf_have_incdir=no
42295 if test -n "$CFLAGS$CPPFLAGS" ; then
42296 # a loop is needed to ensure we can add subdirs of existing dirs
42297 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
42298 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
42299 cf_have_incdir=yes; break
42300 fi
42301 done
42302 fi
42303
42304 if test "$cf_have_incdir" = no ; then
42305 if test "$cf_add_incdir" = /usr/local/include ; then
42306 if test "$GCC" = yes
42307 then
42308 cf_save_CPPFLAGS=$CPPFLAGS
42309
42310 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
42311 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
42312
42313 cat >"conftest.$ac_ext" <<_ACEOF
42314 #line 42314 "configure"
42315 #include "confdefs.h"
42316 #include <stdio.h>
42317 int
42318 main (void)
42319 {
42320 printf("Hello")
42321 ;
42322 return 0;
42323 }
42324 _ACEOF
42325 rm -f "conftest.$ac_objext"
42326 if { (eval echo "$as_me:42326: \"$ac_compile\"") >&5
42327 (eval $ac_compile) 2>&5
42328 ac_status=$?
42329 echo "$as_me:42329: \$? = $ac_status" >&5
42330 (exit "$ac_status"); } &&
42331 { ac_try='test -s "conftest.$ac_objext"'
42332 { (eval echo "$as_me:42332: \"$ac_try\"") >&5
42333 (eval $ac_try) 2>&5
42334 ac_status=$?
42335 echo "$as_me:42335: \$? = $ac_status" >&5
42336 (exit "$ac_status"); }; }; then
42337 :
42338 else
42339 echo "$as_me: failed program was:" >&5
42340 cat "conftest.$ac_ext" >&5
42341 cf_have_incdir=yes
42342 fi
42343 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
42344 CPPFLAGS=$cf_save_CPPFLAGS
42345 fi
42346 fi
42347 fi
42348
42349 if test "$cf_have_incdir" = no ; then
42350 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
42351
42352 echo "${as_me:-configure}:42352: testing adding $cf_add_incdir to include-path ..." 1>&5
42353
42354 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
42355
42356 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
42357 test "$cf_top_incdir" = "$cf_add_incdir" && break
42358 cf_add_incdir="$cf_top_incdir"
42359 else
42360 break
42361 fi
42362 else
42363 break
42364 fi
42365 done
42366 done
42367 fi
42368
42369 if test -n "$cf_cv_library_path_zstd" ; then
42370 for cf_add_libdir in $cf_cv_library_path_zstd
42371 do
42372 if test "$cf_add_libdir" = /usr/lib ; then
42373 :
42374 elif test -d "$cf_add_libdir"
42375 then
42376 cf_have_libdir=no
42377 if test -n "$LDFLAGS$LIBS" ; then
42378 # a loop is needed to ensure we can add subdirs of existing dirs
42379 for cf_test_libdir in $LDFLAGS $LIBS ; do
42380 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
42381 cf_have_libdir=yes; break
42382 fi
42383 done
42384 fi
42385 if test "$cf_have_libdir" = no ; then
42386 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
42387
42388 echo "${as_me:-configure}:42388: testing adding $cf_add_libdir to library-path ..." 1>&5
42389
42390 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
42391 fi
42392 fi
42393 done
42394 fi
42395
42396 cf_add_libs="$LIBS"
42397 # reverse order
42398 cf_add_0lib=
42399 for cf_add_1lib in -lzstd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
42400 # filter duplicates
42401 for cf_add_1lib in $cf_add_0lib; do
42402 for cf_add_2lib in $cf_add_libs; do
42403 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
42404 cf_add_1lib=
42405 break
42406 fi
42407 done
42408 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
42409 done
42410 LIBS="$cf_add_libs"
42411
42412 else
42413 { echo "$as_me:42413: WARNING: Cannot find zstd library" >&5
42414 echo "$as_me: WARNING: Cannot find zstd library" >&2;}
42415 fi
42416
42417 test "x$cf_cv_find_linkage_zstd" = "xyes" &&
42418 cat >>confdefs.h <<\EOF
42419 #define USE_ZSTD 1
42420 EOF
42421
42422 fi
42423
42424 echo "$as_me:42424: checking if you want to exclude FINGER code" >&5
42425 echo $ECHO_N "checking if you want to exclude FINGER code... $ECHO_C" >&6
42426
42427 # Check whether --enable-finger or --disable-finger was given.
42428 if test "${enable_finger+set}" = set; then
42429 enableval="$enable_finger"
42430 test "$enableval" != no && enableval=yes
42431 if test "$enableval" != "yes" ; then
42432 use_finger=yes
42433 else
42434 use_finger=no
42435 fi
42436 else
42437 enableval=yes
42438 use_finger=no
42439
42440 fi;
42441 echo "$as_me:42441: result: $use_finger" >&5
42442 echo "${ECHO_T}$use_finger" >&6
42443 test "$use_finger" != "no" &&
42444 cat >>confdefs.h <<\EOF
42445 #define DISABLE_FINGER 1
42446 EOF
42447
42448 echo "$as_me:42448: checking if you want to exclude GOPHER code" >&5
42449 echo $ECHO_N "checking if you want to exclude GOPHER code... $ECHO_C" >&6
42450
42451 # Check whether --enable-gopher or --disable-gopher was given.
42452 if test "${enable_gopher+set}" = set; then
42453 enableval="$enable_gopher"
42454 test "$enableval" != no && enableval=yes
42455 if test "$enableval" != "yes" ; then
42456 use_gopher=yes
42457 else
42458 use_gopher=no
42459 fi
42460 else
42461 enableval=yes
42462 use_gopher=no
42463
42464 fi;
42465 echo "$as_me:42465: result: $use_gopher" >&5
42466 echo "${ECHO_T}$use_gopher" >&6
42467 test "$use_gopher" != "no" &&
42468 cat >>confdefs.h <<\EOF
42469 #define DISABLE_GOPHER 1
42470 EOF
42471
42472 echo "$as_me:42472: checking if you want to exclude NEWS code" >&5
42473 echo $ECHO_N "checking if you want to exclude NEWS code... $ECHO_C" >&6
42474
42475 # Check whether --enable-news or --disable-news was given.
42476 if test "${enable_news+set}" = set; then
42477 enableval="$enable_news"
42478 test "$enableval" != no && enableval=yes
42479 if test "$enableval" != "yes" ; then
42480 use_news=yes
42481 else
42482 use_news=no
42483 fi
42484 else
42485 enableval=yes
42486 use_news=no
42487
42488 fi;
42489 echo "$as_me:42489: result: $use_news" >&5
42490 echo "${ECHO_T}$use_news" >&6
42491 test "$use_news" != "no" &&
42492 cat >>confdefs.h <<\EOF
42493 #define DISABLE_NEWS 1
42494 EOF
42495
42496 echo "$as_me:42496: checking if you want to exclude FTP code" >&5
42497 echo $ECHO_N "checking if you want to exclude FTP code... $ECHO_C" >&6
42498
42499 # Check whether --enable-ftp or --disable-ftp was given.
42500 if test "${enable_ftp+set}" = set; then
42501 enableval="$enable_ftp"
42502 test "$enableval" != no && enableval=yes
42503 if test "$enableval" != "yes" ; then
42504 use_ftp=yes
42505 else
42506 use_ftp=no
42507 fi
42508 else
42509 enableval=yes
42510 use_ftp=no
42511
42512 fi;
42513 echo "$as_me:42513: result: $use_ftp" >&5
42514 echo "${ECHO_T}$use_ftp" >&6
42515 test "$use_ftp" != "no" &&
42516 cat >>confdefs.h <<\EOF
42517 #define DISABLE_FTP 1
42518 EOF
42519
42520 echo "$as_me:42520: checking if you want to include WAIS code" >&5
42521 echo $ECHO_N "checking if you want to include WAIS code... $ECHO_C" >&6
42522
42523 # Check whether --enable-wais or --disable-wais was given.
42524 if test "${enable_wais+set}" = set; then
42525 enableval="$enable_wais"
42526 test "$enableval" != yes && enableval=no
42527 if test "$enableval" != "no" ; then
42528 use_wais=yes
42529 else
42530 use_wais=no
42531 fi
42532 else
42533 enableval=no
42534 use_wais=no
42535
42536 fi;
42537 echo "$as_me:42537: result: $use_wais" >&5
42538 echo "${ECHO_T}$use_wais" >&6
42539
42540 MAKE_WAIS="#"
42541 if test "$use_wais" != "no"
42542 then
42543 echo "$as_me:42543: checking for fs_free in -lwais" >&5
42544 echo $ECHO_N "checking for fs_free in -lwais... $ECHO_C" >&6
42545 if test "${ac_cv_lib_wais_fs_free+set}" = set; then
42546 echo $ECHO_N "(cached) $ECHO_C" >&6
42547 else
42548 ac_check_lib_save_LIBS=$LIBS
42549 LIBS="-lwais $LIBS"
42550 cat >"conftest.$ac_ext" <<_ACEOF
42551 #line 42551 "configure"
42552 #include "confdefs.h"
42553
42554 /* Override any gcc2 internal prototype to avoid an error. */
42555 #ifdef __cplusplus
42556 extern "C"
42557 #endif
42558 /* We use char because int might match the return type of a gcc2
42559 builtin and then its argument prototype would still apply. */
42560 char fs_free (void);
42561 int
42562 main (void)
42563 {
42564 fs_free ();
42565 ;
42566 return 0;
42567 }
42568 _ACEOF
42569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
42570 if { (eval echo "$as_me:42570: \"$ac_link\"") >&5
42571 (eval $ac_link) 2>&5
42572 ac_status=$?
42573 echo "$as_me:42573: \$? = $ac_status" >&5
42574 (exit "$ac_status"); } &&
42575 { ac_try='test -s "conftest$ac_exeext"'
42576 { (eval echo "$as_me:42576: \"$ac_try\"") >&5
42577 (eval $ac_try) 2>&5
42578 ac_status=$?
42579 echo "$as_me:42579: \$? = $ac_status" >&5
42580 (exit "$ac_status"); }; }; then
42581 ac_cv_lib_wais_fs_free=yes
42582 else
42583 echo "$as_me: failed program was:" >&5
42584 cat "conftest.$ac_ext" >&5
42585 ac_cv_lib_wais_fs_free=no
42586 fi
42587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42588 LIBS=$ac_check_lib_save_LIBS
42589 fi
42590 echo "$as_me:42590: result: $ac_cv_lib_wais_fs_free" >&5
42591 echo "${ECHO_T}$ac_cv_lib_wais_fs_free" >&6
42592 if test "$ac_cv_lib_wais_fs_free" = yes; then
42593
42594 echo "$as_me:42594: checking if -lm needed for math functions" >&5
42595 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
42596 if test "${cf_cv_need_libm+set}" = set; then
42597 echo $ECHO_N "(cached) $ECHO_C" >&6
42598 else
42599
42600 cat >"conftest.$ac_ext" <<_ACEOF
42601 #line 42601 "configure"
42602 #include "confdefs.h"
42603
42604 #include <stdio.h>
42605 #include <stdlib.h>
42606 #include <math.h>
42607
42608 int
42609 main (void)
42610 {
42611 double x = rand(); printf("result = %g\\n", sin(x))
42612 ;
42613 return 0;
42614 }
42615 _ACEOF
42616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
42617 if { (eval echo "$as_me:42617: \"$ac_link\"") >&5
42618 (eval $ac_link) 2>&5
42619 ac_status=$?
42620 echo "$as_me:42620: \$? = $ac_status" >&5
42621 (exit "$ac_status"); } &&
42622 { ac_try='test -s "conftest$ac_exeext"'
42623 { (eval echo "$as_me:42623: \"$ac_try\"") >&5
42624 (eval $ac_try) 2>&5
42625 ac_status=$?
42626 echo "$as_me:42626: \$? = $ac_status" >&5
42627 (exit "$ac_status"); }; }; then
42628 cf_cv_need_libm=no
42629 else
42630 echo "$as_me: failed program was:" >&5
42631 cat "conftest.$ac_ext" >&5
42632 cf_cv_need_libm=yes
42633 fi
42634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42635 fi
42636 echo "$as_me:42636: result: $cf_cv_need_libm" >&5
42637 echo "${ECHO_T}$cf_cv_need_libm" >&6
42638
42639 if test "$cf_cv_need_libm" = yes
42640 then
42641
42642 cf_save_LIBS="$LIBS"
42643 LIBS="$LIBS -lm"
42644 echo "$as_me:42644: checking if -lm is available for math functions" >&5
42645 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
42646 if test "${cf_cv_have_libm+set}" = set; then
42647 echo $ECHO_N "(cached) $ECHO_C" >&6
42648 else
42649
42650 cat >"conftest.$ac_ext" <<_ACEOF
42651 #line 42651 "configure"
42652 #include "confdefs.h"
42653
42654 #include <stdio.h>
42655 #include <stdlib.h>
42656 #include <math.h>
42657
42658 int
42659 main (void)
42660 {
42661 double x = rand(); printf("result = %g\\n", sin(x))
42662 ;
42663 return 0;
42664 }
42665 _ACEOF
42666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
42667 if { (eval echo "$as_me:42667: \"$ac_link\"") >&5
42668 (eval $ac_link) 2>&5
42669 ac_status=$?
42670 echo "$as_me:42670: \$? = $ac_status" >&5
42671 (exit "$ac_status"); } &&
42672 { ac_try='test -s "conftest$ac_exeext"'
42673 { (eval echo "$as_me:42673: \"$ac_try\"") >&5
42674 (eval $ac_try) 2>&5
42675 ac_status=$?
42676 echo "$as_me:42676: \$? = $ac_status" >&5
42677 (exit "$ac_status"); }; }; then
42678 cf_cv_have_libm=yes
42679 else
42680 echo "$as_me: failed program was:" >&5
42681 cat "conftest.$ac_ext" >&5
42682 cf_cv_have_libm=no
42683 fi
42684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42685 fi
42686 echo "$as_me:42686: result: $cf_cv_have_libm" >&5
42687 echo "${ECHO_T}$cf_cv_have_libm" >&6
42688 LIBS="$cf_save_LIBS"
42689
42690 if test "$cf_cv_have_libm" = yes
42691 then
42692
42693 cf_add_libs="$LIBS"
42694 # reverse order
42695 cf_add_0lib=
42696 for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
42697 # filter duplicates
42698 for cf_add_1lib in $cf_add_0lib; do
42699 for cf_add_2lib in $cf_add_libs; do
42700 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
42701 cf_add_1lib=
42702 break
42703 fi
42704 done
42705 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
42706 done
42707 LIBS="$cf_add_libs"
42708
42709 fi
42710 else
42711 cf_cv_have_libm=yes
42712 fi
42713
42714 if test "$cf_cv_have_libm" = yes
42715 then
42716
42717 cat >>confdefs.h <<\EOF
42718 #define HAVE_MATH_FUNCS 1
42719 EOF
42720
42721 fi
42722
42723 cf_add_libs="$LIBS"
42724 # reverse order
42725 cf_add_0lib=
42726 for cf_add_1lib in -lwais; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
42727 # filter duplicates
42728 for cf_add_1lib in $cf_add_0lib; do
42729 for cf_add_2lib in $cf_add_libs; do
42730 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
42731 cf_add_1lib=
42732 break
42733 fi
42734 done
42735 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
42736 done
42737 LIBS="$cf_add_libs"
42738
42739 for ac_header in wais.h
42740 do
42741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42742 echo "$as_me:42742: checking for $ac_header" >&5
42743 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42744 if eval "test \"\${$as_ac_Header+set}\" = set"; then
42745 echo $ECHO_N "(cached) $ECHO_C" >&6
42746 else
42747 cat >"conftest.$ac_ext" <<_ACEOF
42748 #line 42748 "configure"
42749 #include "confdefs.h"
42750 #include <$ac_header>
42751 _ACEOF
42752 if { (eval echo "$as_me:42752: \"$ac_cpp "conftest.$ac_ext"\"") >&5
42753 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
42754 ac_status=$?
42755 $EGREP -v '^ *\+' conftest.er1 >conftest.err
42756 rm -f conftest.er1
42757 cat conftest.err >&5
42758 echo "$as_me:42758: \$? = $ac_status" >&5
42759 (exit "$ac_status"); } >/dev/null; then
42760 if test -s conftest.err; then
42761 ac_cpp_err=$ac_c_preproc_warn_flag
42762 else
42763 ac_cpp_err=
42764 fi
42765 else
42766 ac_cpp_err=yes
42767 fi
42768 if test -z "$ac_cpp_err"; then
42769 eval "$as_ac_Header=yes"
42770 else
42771 echo "$as_me: failed program was:" >&5
42772 cat "conftest.$ac_ext" >&5
42773 eval "$as_ac_Header=no"
42774 fi
42775 rm -f conftest.err "conftest.$ac_ext"
42776 fi
42777 echo "$as_me:42777: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
42778 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
42779 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
42780 cat >>confdefs.h <<EOF
42781 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42782 EOF
42783
42784 fi
42785 done
42786
42787 MAKE_WAIS=
42788
42789 else
42790 { echo "$as_me:42790: WARNING: could not find WAIS library" >&5
42791 echo "$as_me: WARNING: could not find WAIS library" >&2;}
42792 fi
42793
42794 fi
42795
42796 # All DirEd functions that were enabled on compilation can be disabled
42797 # or modified at run time via DIRED_MENU symbols in lynx.cfg.
42798 echo "$as_me:42798: checking if directory-editor code should be used" >&5
42799 echo $ECHO_N "checking if directory-editor code should be used... $ECHO_C" >&6
42800
42801 # Check whether --enable-dired or --disable-dired was given.
42802 if test "${enable_dired+set}" = set; then
42803 enableval="$enable_dired"
42804 test "$enableval" != no && enableval=yes
42805 if test "$enableval" != "yes" ; then
42806 use_dired=$enableval
42807 else
42808 use_dired=yes
42809 fi
42810 else
42811 enableval=yes
42812 use_dired=yes
42813
42814 fi;
42815 echo "$as_me:42815: result: $use_dired" >&5
42816 echo "${ECHO_T}$use_dired" >&6
42817
42818 if test ".$use_dired" != ".no" ; then
42819 EXTRA_OBJS="$EXTRA_OBJS LYLocal\$o"
42820
42821 cat >>confdefs.h <<\EOF
42822 #define DIRED_SUPPORT 1
42823 EOF
42824
42825 echo "$as_me:42825: checking if you wish to allow extracting from archives via DirEd" >&5
42826 echo $ECHO_N "checking if you wish to allow extracting from archives via DirEd... $ECHO_C" >&6
42827
42828 # Check whether --enable-dired-dearchive or --disable-dired-dearchive was given.
42829 if test "${enable_dired_dearchive+set}" = set; then
42830 enableval="$enable_dired_dearchive"
42831 test "$enableval" != no && enableval=yes
42832 if test "$enableval" != "yes" ; then
42833
42834 cat >>confdefs.h <<\EOF
42835 #define ARCHIVE_ONLY 1
42836 EOF
42837
42838 fi
42839 else
42840 enableval=yes
42841 fi;
42842 echo "$as_me:42842: result: $enableval" >&5
42843 echo "${ECHO_T}$enableval" >&6
42844
42845 echo "$as_me:42845: checking if DirEd mode should override keys" >&5
42846 echo $ECHO_N "checking if DirEd mode should override keys... $ECHO_C" >&6
42847
42848 # Check whether --enable-dired-override or --disable-dired-override was given.
42849 if test "${enable_dired_override+set}" = set; then
42850 enableval="$enable_dired_override"
42851 test "$enableval" != no && enableval=yes
42852 if test "$enableval" != "yes" ; then
42853 :
42854 else
42855
42856 cat >>confdefs.h <<\EOF
42857 #define OK_OVERRIDE 1
42858 EOF
42859
42860 fi
42861 else
42862 enableval=yes
42863
42864 cat >>confdefs.h <<\EOF
42865 #define OK_OVERRIDE 1
42866 EOF
42867
42868 fi;
42869 echo "$as_me:42869: result: $enableval" >&5
42870 echo "${ECHO_T}$enableval" >&6
42871
42872 echo "$as_me:42872: checking if you wish to allow permissions commands via DirEd" >&5
42873 echo $ECHO_N "checking if you wish to allow permissions commands via DirEd... $ECHO_C" >&6
42874
42875 # Check whether --enable-dired-permit or --disable-dired-permit was given.
42876 if test "${enable_dired_permit+set}" = set; then
42877 enableval="$enable_dired_permit"
42878 test "$enableval" != no && enableval=yes
42879 if test "$enableval" != "yes" ; then
42880 :
42881 else
42882
42883 cat >>confdefs.h <<\EOF
42884 #define OK_PERMIT 1
42885 EOF
42886
42887 fi
42888 else
42889 enableval=yes
42890
42891 cat >>confdefs.h <<\EOF
42892 #define OK_PERMIT 1
42893 EOF
42894
42895 fi;
42896 echo "$as_me:42896: result: $enableval" >&5
42897 echo "${ECHO_T}$enableval" >&6
42898
42899 echo "$as_me:42899: checking if you wish to allow executable-permission commands via DirEd" >&5
42900 echo $ECHO_N "checking if you wish to allow executable-permission commands via DirEd... $ECHO_C" >&6
42901
42902 # Check whether --enable-dired-xpermit or --disable-dired-xpermit was given.
42903 if test "${enable_dired_xpermit+set}" = set; then
42904 enableval="$enable_dired_xpermit"
42905 test "$enableval" != no && enableval=yes
42906 if test "$enableval" != "yes" ; then
42907
42908 cat >>confdefs.h <<\EOF
42909 #define NO_CHANGE_EXECUTE_PERMS 1
42910 EOF
42911
42912 fi
42913 else
42914 enableval=yes
42915 fi;
42916 echo "$as_me:42916: result: $enableval" >&5
42917 echo "${ECHO_T}$enableval" >&6
42918
42919 echo "$as_me:42919: checking if you wish to allow \"tar\" commands from DirEd" >&5
42920 echo $ECHO_N "checking if you wish to allow \"tar\" commands from DirEd... $ECHO_C" >&6
42921
42922 # Check whether --enable-dired-tar or --disable-dired-tar was given.
42923 if test "${enable_dired_tar+set}" = set; then
42924 enableval="$enable_dired_tar"
42925 test "$enableval" != no && enableval=yes
42926 if test "$enableval" != "yes" ; then
42927 :
42928 else
42929
42930 cat >>confdefs.h <<\EOF
42931 #define OK_TAR 1
42932 EOF
42933
42934 fi
42935 else
42936 enableval=yes
42937
42938 cat >>confdefs.h <<\EOF
42939 #define OK_TAR 1
42940 EOF
42941
42942 fi;
42943 echo "$as_me:42943: result: $enableval" >&5
42944 echo "${ECHO_T}$enableval" >&6
42945
42946 echo "$as_me:42946: checking if you wish to allow \"uudecode\" commands from DirEd" >&5
42947 echo $ECHO_N "checking if you wish to allow \"uudecode\" commands from DirEd... $ECHO_C" >&6
42948
42949 # Check whether --enable-dired-uudecode or --disable-dired-uudecode was given.
42950 if test "${enable_dired_uudecode+set}" = set; then
42951 enableval="$enable_dired_uudecode"
42952 test "$enableval" != no && enableval=yes
42953 if test "$enableval" != "yes" ; then
42954 :
42955 else
42956
42957 cat >>confdefs.h <<\EOF
42958 #define OK_UUDECODE 1
42959 EOF
42960
42961 fi
42962 else
42963 enableval=yes
42964
42965 cat >>confdefs.h <<\EOF
42966 #define OK_UUDECODE 1
42967 EOF
42968
42969 fi;
42970 echo "$as_me:42970: result: $enableval" >&5
42971 echo "${ECHO_T}$enableval" >&6
42972
42973 echo "$as_me:42973: checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd" >&5
42974 echo $ECHO_N "checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd... $ECHO_C" >&6
42975
42976 # Check whether --enable-dired-zip or --disable-dired-zip was given.
42977 if test "${enable_dired_zip+set}" = set; then
42978 enableval="$enable_dired_zip"
42979 test "$enableval" != no && enableval=yes
42980 if test "$enableval" != "yes" ; then
42981 :
42982 else
42983
42984 cat >>confdefs.h <<\EOF
42985 #define OK_ZIP 1
42986 EOF
42987
42988 fi
42989 else
42990 enableval=yes
42991
42992 cat >>confdefs.h <<\EOF
42993 #define OK_ZIP 1
42994 EOF
42995
42996 fi;
42997 echo "$as_me:42997: result: $enableval" >&5
42998 echo "${ECHO_T}$enableval" >&6
42999
43000 echo "$as_me:43000: checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd" >&5
43001 echo $ECHO_N "checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd... $ECHO_C" >&6
43002
43003 # Check whether --enable-dired-gzip or --disable-dired-gzip was given.
43004 if test "${enable_dired_gzip+set}" = set; then
43005 enableval="$enable_dired_gzip"
43006 test "$enableval" != no && enableval=yes
43007 if test "$enableval" != "yes" ; then
43008 :
43009 else
43010
43011 cat >>confdefs.h <<\EOF
43012 #define OK_GZIP 1
43013 EOF
43014
43015 fi
43016 else
43017 enableval=yes
43018
43019 cat >>confdefs.h <<\EOF
43020 #define OK_GZIP 1
43021 EOF
43022
43023 fi;
43024 echo "$as_me:43024: result: $enableval" >&5
43025 echo "${ECHO_T}$enableval" >&6
43026 fi
43027
43028 echo "$as_me:43028: checking if you want long-directory listings" >&5
43029 echo $ECHO_N "checking if you want long-directory listings... $ECHO_C" >&6
43030
43031 # Check whether --enable-long-list or --disable-long-list was given.
43032 if test "${enable_long_list+set}" = set; then
43033 enableval="$enable_long_list"
43034 test "$enableval" != no && enableval=yes
43035 if test "$enableval" != "yes" ; then
43036 :
43037 else
43038
43039 cat >>confdefs.h <<\EOF
43040 #define LONG_LIST 1
43041 EOF
43042
43043 fi
43044 else
43045 enableval=yes
43046
43047 cat >>confdefs.h <<\EOF
43048 #define LONG_LIST 1
43049 EOF
43050
43051 fi;
43052 echo "$as_me:43052: result: $enableval" >&5
43053 echo "${ECHO_T}$enableval" >&6
43054
43055 echo "$as_me:43055: checking if parent-directory references are permitted" >&5
43056 echo $ECHO_N "checking if parent-directory references are permitted... $ECHO_C" >&6
43057
43058 # Check whether --enable-parent-dir-refs or --disable-parent-dir-refs was given.
43059 if test "${enable_parent_dir_refs+set}" = set; then
43060 enableval="$enable_parent_dir_refs"
43061 test "$enableval" != no && enableval=yes
43062 if test "$enableval" != "yes" ; then
43063
43064 cat >>confdefs.h <<\EOF
43065 #define NO_PARENT_DIR_REFERENCE 1
43066 EOF
43067
43068 fi
43069 else
43070 enableval=yes
43071 fi;
43072 echo "$as_me:43072: result: $enableval" >&5
43073 echo "${ECHO_T}$enableval" >&6
43074
43075 test -z "$TELNET" && TELNET="telnet"
43076 for ac_prog in $TELNET telnet
43077 do
43078 # Extract the first word of "$ac_prog", so it can be a program name with args.
43079 set dummy $ac_prog; ac_word=$2
43080 echo "$as_me:43080: checking for $ac_word" >&5
43081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43082 if test "${ac_cv_path_TELNET+set}" = set; then
43083 echo $ECHO_N "(cached) $ECHO_C" >&6
43084 else
43085 case $TELNET in
43086 [\\/]* | ?:[\\/]*)
43087 ac_cv_path_TELNET="$TELNET" # Let the user override the test with a path.
43088 ;;
43089 *)
43090 ac_save_IFS=$IFS; IFS=$ac_path_separator
43091 ac_dummy="$PATH"
43092 for ac_dir in $ac_dummy; do
43093 IFS=$ac_save_IFS
43094 test -z "$ac_dir" && ac_dir=.
43095 if $as_executable_p "$ac_dir/$ac_word"; then
43096 ac_cv_path_TELNET="$ac_dir/$ac_word"
43097 echo "$as_me:43097: found $ac_dir/$ac_word" >&5
43098 break
43099 fi
43100 done
43101
43102 ;;
43103 esac
43104 fi
43105 TELNET=$ac_cv_path_TELNET
43106
43107 if test -n "$TELNET"; then
43108 echo "$as_me:43108: result: $TELNET" >&5
43109 echo "${ECHO_T}$TELNET" >&6
43110 else
43111 echo "$as_me:43111: result: no" >&5
43112 echo "${ECHO_T}no" >&6
43113 fi
43114
43115 test -n "$TELNET" && break
43116 done
43117 test -n "$TELNET" || TELNET="$TELNET"
43118
43119 cf_path_prog=""
43120 cf_path_args=""
43121 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43122 for cf_temp in $ac_cv_path_TELNET
43123 do
43124 if test -z "$cf_path_prog" ; then
43125 if test "$with_full_paths" = yes ; then
43126
43127 if test "x$prefix" != xNONE; then
43128 cf_path_syntax="$prefix"
43129 else
43130 cf_path_syntax="$ac_default_prefix"
43131 fi
43132
43133 case "x$cf_temp" in
43134 (x\$\(*\)*|x\'*\'*)
43135 ;;
43136 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43137 ;;
43138 (x\$\{*prefix\}*|x\$\{*dir\}*)
43139 eval cf_temp="$cf_temp"
43140 case "x$cf_temp" in
43141 (xNONE/*)
43142 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43143 ;;
43144 esac
43145 ;;
43146 (xno|xNONE/*)
43147 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43148 ;;
43149 (*)
43150 break
43151 ;;
43152 esac
43153
43154 cf_path_prog="$cf_temp"
43155 else
43156 cf_path_prog="`basename "$cf_temp"`"
43157 fi
43158 elif test -z "$cf_path_args" ; then
43159 cf_path_args="$cf_temp"
43160 else
43161 cf_path_args="$cf_path_args $cf_temp"
43162 fi
43163 done
43164 IFS="$cf_save_ifs"
43165
43166 if test -n "$cf_path_prog" ; then
43167
43168 echo "${as_me:-configure}:43168: testing defining path for ${cf_path_prog} ..." 1>&5
43169
43170 cat >>confdefs.h <<EOF
43171 #define TELNET_PATH "$cf_path_prog"
43172 EOF
43173
43174 test -n "$cf_path_args" &&
43175 cat >>confdefs.h <<EOF
43176 #define TELNET_ARGS "$cf_path_args"
43177 EOF
43178
43179 fi
43180
43181 test -z "$TN3270" && TN3270="tn3270"
43182 for ac_prog in $TN3270 tn3270
43183 do
43184 # Extract the first word of "$ac_prog", so it can be a program name with args.
43185 set dummy $ac_prog; ac_word=$2
43186 echo "$as_me:43186: checking for $ac_word" >&5
43187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43188 if test "${ac_cv_path_TN3270+set}" = set; then
43189 echo $ECHO_N "(cached) $ECHO_C" >&6
43190 else
43191 case $TN3270 in
43192 [\\/]* | ?:[\\/]*)
43193 ac_cv_path_TN3270="$TN3270" # Let the user override the test with a path.
43194 ;;
43195 *)
43196 ac_save_IFS=$IFS; IFS=$ac_path_separator
43197 ac_dummy="$PATH"
43198 for ac_dir in $ac_dummy; do
43199 IFS=$ac_save_IFS
43200 test -z "$ac_dir" && ac_dir=.
43201 if $as_executable_p "$ac_dir/$ac_word"; then
43202 ac_cv_path_TN3270="$ac_dir/$ac_word"
43203 echo "$as_me:43203: found $ac_dir/$ac_word" >&5
43204 break
43205 fi
43206 done
43207
43208 ;;
43209 esac
43210 fi
43211 TN3270=$ac_cv_path_TN3270
43212
43213 if test -n "$TN3270"; then
43214 echo "$as_me:43214: result: $TN3270" >&5
43215 echo "${ECHO_T}$TN3270" >&6
43216 else
43217 echo "$as_me:43217: result: no" >&5
43218 echo "${ECHO_T}no" >&6
43219 fi
43220
43221 test -n "$TN3270" && break
43222 done
43223 test -n "$TN3270" || TN3270="$TN3270"
43224
43225 cf_path_prog=""
43226 cf_path_args=""
43227 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43228 for cf_temp in $ac_cv_path_TN3270
43229 do
43230 if test -z "$cf_path_prog" ; then
43231 if test "$with_full_paths" = yes ; then
43232
43233 if test "x$prefix" != xNONE; then
43234 cf_path_syntax="$prefix"
43235 else
43236 cf_path_syntax="$ac_default_prefix"
43237 fi
43238
43239 case "x$cf_temp" in
43240 (x\$\(*\)*|x\'*\'*)
43241 ;;
43242 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43243 ;;
43244 (x\$\{*prefix\}*|x\$\{*dir\}*)
43245 eval cf_temp="$cf_temp"
43246 case "x$cf_temp" in
43247 (xNONE/*)
43248 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43249 ;;
43250 esac
43251 ;;
43252 (xno|xNONE/*)
43253 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43254 ;;
43255 (*)
43256 break
43257 ;;
43258 esac
43259
43260 cf_path_prog="$cf_temp"
43261 else
43262 cf_path_prog="`basename "$cf_temp"`"
43263 fi
43264 elif test -z "$cf_path_args" ; then
43265 cf_path_args="$cf_temp"
43266 else
43267 cf_path_args="$cf_path_args $cf_temp"
43268 fi
43269 done
43270 IFS="$cf_save_ifs"
43271
43272 if test -n "$cf_path_prog" ; then
43273
43274 echo "${as_me:-configure}:43274: testing defining path for ${cf_path_prog} ..." 1>&5
43275
43276 cat >>confdefs.h <<EOF
43277 #define TN3270_PATH "$cf_path_prog"
43278 EOF
43279
43280 test -n "$cf_path_args" &&
43281 cat >>confdefs.h <<EOF
43282 #define TN3270_ARGS "$cf_path_args"
43283 EOF
43284
43285 fi
43286
43287 test -z "$RLOGIN" && RLOGIN="rlogin"
43288 for ac_prog in $RLOGIN rlogin
43289 do
43290 # Extract the first word of "$ac_prog", so it can be a program name with args.
43291 set dummy $ac_prog; ac_word=$2
43292 echo "$as_me:43292: checking for $ac_word" >&5
43293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43294 if test "${ac_cv_path_RLOGIN+set}" = set; then
43295 echo $ECHO_N "(cached) $ECHO_C" >&6
43296 else
43297 case $RLOGIN in
43298 [\\/]* | ?:[\\/]*)
43299 ac_cv_path_RLOGIN="$RLOGIN" # Let the user override the test with a path.
43300 ;;
43301 *)
43302 ac_save_IFS=$IFS; IFS=$ac_path_separator
43303 ac_dummy="$PATH"
43304 for ac_dir in $ac_dummy; do
43305 IFS=$ac_save_IFS
43306 test -z "$ac_dir" && ac_dir=.
43307 if $as_executable_p "$ac_dir/$ac_word"; then
43308 ac_cv_path_RLOGIN="$ac_dir/$ac_word"
43309 echo "$as_me:43309: found $ac_dir/$ac_word" >&5
43310 break
43311 fi
43312 done
43313
43314 ;;
43315 esac
43316 fi
43317 RLOGIN=$ac_cv_path_RLOGIN
43318
43319 if test -n "$RLOGIN"; then
43320 echo "$as_me:43320: result: $RLOGIN" >&5
43321 echo "${ECHO_T}$RLOGIN" >&6
43322 else
43323 echo "$as_me:43323: result: no" >&5
43324 echo "${ECHO_T}no" >&6
43325 fi
43326
43327 test -n "$RLOGIN" && break
43328 done
43329 test -n "$RLOGIN" || RLOGIN="$RLOGIN"
43330
43331 cf_path_prog=""
43332 cf_path_args=""
43333 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43334 for cf_temp in $ac_cv_path_RLOGIN
43335 do
43336 if test -z "$cf_path_prog" ; then
43337 if test "$with_full_paths" = yes ; then
43338
43339 if test "x$prefix" != xNONE; then
43340 cf_path_syntax="$prefix"
43341 else
43342 cf_path_syntax="$ac_default_prefix"
43343 fi
43344
43345 case "x$cf_temp" in
43346 (x\$\(*\)*|x\'*\'*)
43347 ;;
43348 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43349 ;;
43350 (x\$\{*prefix\}*|x\$\{*dir\}*)
43351 eval cf_temp="$cf_temp"
43352 case "x$cf_temp" in
43353 (xNONE/*)
43354 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43355 ;;
43356 esac
43357 ;;
43358 (xno|xNONE/*)
43359 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43360 ;;
43361 (*)
43362 break
43363 ;;
43364 esac
43365
43366 cf_path_prog="$cf_temp"
43367 else
43368 cf_path_prog="`basename "$cf_temp"`"
43369 fi
43370 elif test -z "$cf_path_args" ; then
43371 cf_path_args="$cf_temp"
43372 else
43373 cf_path_args="$cf_path_args $cf_temp"
43374 fi
43375 done
43376 IFS="$cf_save_ifs"
43377
43378 if test -n "$cf_path_prog" ; then
43379
43380 echo "${as_me:-configure}:43380: testing defining path for ${cf_path_prog} ..." 1>&5
43381
43382 cat >>confdefs.h <<EOF
43383 #define RLOGIN_PATH "$cf_path_prog"
43384 EOF
43385
43386 test -n "$cf_path_args" &&
43387 cat >>confdefs.h <<EOF
43388 #define RLOGIN_ARGS "$cf_path_args"
43389 EOF
43390
43391 fi
43392
43393 test -z "$MV" && MV="mv"
43394 for ac_prog in $MV mv
43395 do
43396 # Extract the first word of "$ac_prog", so it can be a program name with args.
43397 set dummy $ac_prog; ac_word=$2
43398 echo "$as_me:43398: checking for $ac_word" >&5
43399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43400 if test "${ac_cv_path_MV+set}" = set; then
43401 echo $ECHO_N "(cached) $ECHO_C" >&6
43402 else
43403 case $MV in
43404 [\\/]* | ?:[\\/]*)
43405 ac_cv_path_MV="$MV" # Let the user override the test with a path.
43406 ;;
43407 *)
43408 ac_save_IFS=$IFS; IFS=$ac_path_separator
43409 ac_dummy="$PATH"
43410 for ac_dir in $ac_dummy; do
43411 IFS=$ac_save_IFS
43412 test -z "$ac_dir" && ac_dir=.
43413 if $as_executable_p "$ac_dir/$ac_word"; then
43414 ac_cv_path_MV="$ac_dir/$ac_word"
43415 echo "$as_me:43415: found $ac_dir/$ac_word" >&5
43416 break
43417 fi
43418 done
43419
43420 ;;
43421 esac
43422 fi
43423 MV=$ac_cv_path_MV
43424
43425 if test -n "$MV"; then
43426 echo "$as_me:43426: result: $MV" >&5
43427 echo "${ECHO_T}$MV" >&6
43428 else
43429 echo "$as_me:43429: result: no" >&5
43430 echo "${ECHO_T}no" >&6
43431 fi
43432
43433 test -n "$MV" && break
43434 done
43435 test -n "$MV" || MV="$MV"
43436
43437 cf_path_prog=""
43438 cf_path_args=""
43439 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43440 for cf_temp in $ac_cv_path_MV
43441 do
43442 if test -z "$cf_path_prog" ; then
43443 if test "$with_full_paths" = yes ; then
43444
43445 if test "x$prefix" != xNONE; then
43446 cf_path_syntax="$prefix"
43447 else
43448 cf_path_syntax="$ac_default_prefix"
43449 fi
43450
43451 case "x$cf_temp" in
43452 (x\$\(*\)*|x\'*\'*)
43453 ;;
43454 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43455 ;;
43456 (x\$\{*prefix\}*|x\$\{*dir\}*)
43457 eval cf_temp="$cf_temp"
43458 case "x$cf_temp" in
43459 (xNONE/*)
43460 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43461 ;;
43462 esac
43463 ;;
43464 (xno|xNONE/*)
43465 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43466 ;;
43467 (*)
43468 break
43469 ;;
43470 esac
43471
43472 cf_path_prog="$cf_temp"
43473 else
43474 cf_path_prog="`basename "$cf_temp"`"
43475 fi
43476 elif test -z "$cf_path_args" ; then
43477 cf_path_args="$cf_temp"
43478 else
43479 cf_path_args="$cf_path_args $cf_temp"
43480 fi
43481 done
43482 IFS="$cf_save_ifs"
43483
43484 if test -n "$cf_path_prog" ; then
43485
43486 echo "${as_me:-configure}:43486: testing defining path for ${cf_path_prog} ..." 1>&5
43487
43488 cat >>confdefs.h <<EOF
43489 #define MV_PATH "$cf_path_prog"
43490 EOF
43491
43492 test -n "$cf_path_args" &&
43493 cat >>confdefs.h <<EOF
43494 #define MV_ARGS "$cf_path_args"
43495 EOF
43496
43497 fi
43498
43499 test -z "$GZIP" && GZIP="gzip"
43500 for ac_prog in $GZIP gzip
43501 do
43502 # Extract the first word of "$ac_prog", so it can be a program name with args.
43503 set dummy $ac_prog; ac_word=$2
43504 echo "$as_me:43504: checking for $ac_word" >&5
43505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43506 if test "${ac_cv_path_GZIP+set}" = set; then
43507 echo $ECHO_N "(cached) $ECHO_C" >&6
43508 else
43509 case $GZIP in
43510 [\\/]* | ?:[\\/]*)
43511 ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
43512 ;;
43513 *)
43514 ac_save_IFS=$IFS; IFS=$ac_path_separator
43515 ac_dummy="$PATH"
43516 for ac_dir in $ac_dummy; do
43517 IFS=$ac_save_IFS
43518 test -z "$ac_dir" && ac_dir=.
43519 if $as_executable_p "$ac_dir/$ac_word"; then
43520 ac_cv_path_GZIP="$ac_dir/$ac_word"
43521 echo "$as_me:43521: found $ac_dir/$ac_word" >&5
43522 break
43523 fi
43524 done
43525
43526 ;;
43527 esac
43528 fi
43529 GZIP=$ac_cv_path_GZIP
43530
43531 if test -n "$GZIP"; then
43532 echo "$as_me:43532: result: $GZIP" >&5
43533 echo "${ECHO_T}$GZIP" >&6
43534 else
43535 echo "$as_me:43535: result: no" >&5
43536 echo "${ECHO_T}no" >&6
43537 fi
43538
43539 test -n "$GZIP" && break
43540 done
43541 test -n "$GZIP" || GZIP="$GZIP"
43542
43543 cf_path_prog=""
43544 cf_path_args=""
43545 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43546 for cf_temp in $ac_cv_path_GZIP
43547 do
43548 if test -z "$cf_path_prog" ; then
43549 if test "$with_full_paths" = yes ; then
43550
43551 if test "x$prefix" != xNONE; then
43552 cf_path_syntax="$prefix"
43553 else
43554 cf_path_syntax="$ac_default_prefix"
43555 fi
43556
43557 case "x$cf_temp" in
43558 (x\$\(*\)*|x\'*\'*)
43559 ;;
43560 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43561 ;;
43562 (x\$\{*prefix\}*|x\$\{*dir\}*)
43563 eval cf_temp="$cf_temp"
43564 case "x$cf_temp" in
43565 (xNONE/*)
43566 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43567 ;;
43568 esac
43569 ;;
43570 (xno|xNONE/*)
43571 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43572 ;;
43573 (*)
43574 break
43575 ;;
43576 esac
43577
43578 cf_path_prog="$cf_temp"
43579 else
43580 cf_path_prog="`basename "$cf_temp"`"
43581 fi
43582 elif test -z "$cf_path_args" ; then
43583 cf_path_args="$cf_temp"
43584 else
43585 cf_path_args="$cf_path_args $cf_temp"
43586 fi
43587 done
43588 IFS="$cf_save_ifs"
43589
43590 if test -n "$cf_path_prog" ; then
43591
43592 echo "${as_me:-configure}:43592: testing defining path for ${cf_path_prog} ..." 1>&5
43593
43594 cat >>confdefs.h <<EOF
43595 #define GZIP_PATH "$cf_path_prog"
43596 EOF
43597
43598 test -n "$cf_path_args" &&
43599 cat >>confdefs.h <<EOF
43600 #define GZIP_ARGS "$cf_path_args"
43601 EOF
43602
43603 fi
43604
43605 test -z "$UNCOMPRESS" && UNCOMPRESS="gunzip"
43606 for ac_prog in $UNCOMPRESS gunzip
43607 do
43608 # Extract the first word of "$ac_prog", so it can be a program name with args.
43609 set dummy $ac_prog; ac_word=$2
43610 echo "$as_me:43610: checking for $ac_word" >&5
43611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43612 if test "${ac_cv_path_UNCOMPRESS+set}" = set; then
43613 echo $ECHO_N "(cached) $ECHO_C" >&6
43614 else
43615 case $UNCOMPRESS in
43616 [\\/]* | ?:[\\/]*)
43617 ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a path.
43618 ;;
43619 *)
43620 ac_save_IFS=$IFS; IFS=$ac_path_separator
43621 ac_dummy="$PATH"
43622 for ac_dir in $ac_dummy; do
43623 IFS=$ac_save_IFS
43624 test -z "$ac_dir" && ac_dir=.
43625 if $as_executable_p "$ac_dir/$ac_word"; then
43626 ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word"
43627 echo "$as_me:43627: found $ac_dir/$ac_word" >&5
43628 break
43629 fi
43630 done
43631
43632 ;;
43633 esac
43634 fi
43635 UNCOMPRESS=$ac_cv_path_UNCOMPRESS
43636
43637 if test -n "$UNCOMPRESS"; then
43638 echo "$as_me:43638: result: $UNCOMPRESS" >&5
43639 echo "${ECHO_T}$UNCOMPRESS" >&6
43640 else
43641 echo "$as_me:43641: result: no" >&5
43642 echo "${ECHO_T}no" >&6
43643 fi
43644
43645 test -n "$UNCOMPRESS" && break
43646 done
43647 test -n "$UNCOMPRESS" || UNCOMPRESS="$UNCOMPRESS"
43648
43649 cf_path_prog=""
43650 cf_path_args=""
43651 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43652 for cf_temp in $ac_cv_path_UNCOMPRESS
43653 do
43654 if test -z "$cf_path_prog" ; then
43655 if test "$with_full_paths" = yes ; then
43656
43657 if test "x$prefix" != xNONE; then
43658 cf_path_syntax="$prefix"
43659 else
43660 cf_path_syntax="$ac_default_prefix"
43661 fi
43662
43663 case "x$cf_temp" in
43664 (x\$\(*\)*|x\'*\'*)
43665 ;;
43666 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43667 ;;
43668 (x\$\{*prefix\}*|x\$\{*dir\}*)
43669 eval cf_temp="$cf_temp"
43670 case "x$cf_temp" in
43671 (xNONE/*)
43672 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43673 ;;
43674 esac
43675 ;;
43676 (xno|xNONE/*)
43677 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43678 ;;
43679 (*)
43680 break
43681 ;;
43682 esac
43683
43684 cf_path_prog="$cf_temp"
43685 else
43686 cf_path_prog="`basename "$cf_temp"`"
43687 fi
43688 elif test -z "$cf_path_args" ; then
43689 cf_path_args="$cf_temp"
43690 else
43691 cf_path_args="$cf_path_args $cf_temp"
43692 fi
43693 done
43694 IFS="$cf_save_ifs"
43695
43696 if test -n "$cf_path_prog" ; then
43697
43698 echo "${as_me:-configure}:43698: testing defining path for ${cf_path_prog} ..." 1>&5
43699
43700 cat >>confdefs.h <<EOF
43701 #define UNCOMPRESS_PATH "$cf_path_prog"
43702 EOF
43703
43704 test -n "$cf_path_args" &&
43705 cat >>confdefs.h <<EOF
43706 #define UNCOMPRESS_ARGS "$cf_path_args"
43707 EOF
43708
43709 fi
43710
43711 test -z "$UNZIP" && UNZIP="unzip"
43712 for ac_prog in $UNZIP unzip
43713 do
43714 # Extract the first word of "$ac_prog", so it can be a program name with args.
43715 set dummy $ac_prog; ac_word=$2
43716 echo "$as_me:43716: checking for $ac_word" >&5
43717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43718 if test "${ac_cv_path_UNZIP+set}" = set; then
43719 echo $ECHO_N "(cached) $ECHO_C" >&6
43720 else
43721 case $UNZIP in
43722 [\\/]* | ?:[\\/]*)
43723 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
43724 ;;
43725 *)
43726 ac_save_IFS=$IFS; IFS=$ac_path_separator
43727 ac_dummy="$PATH"
43728 for ac_dir in $ac_dummy; do
43729 IFS=$ac_save_IFS
43730 test -z "$ac_dir" && ac_dir=.
43731 if $as_executable_p "$ac_dir/$ac_word"; then
43732 ac_cv_path_UNZIP="$ac_dir/$ac_word"
43733 echo "$as_me:43733: found $ac_dir/$ac_word" >&5
43734 break
43735 fi
43736 done
43737
43738 ;;
43739 esac
43740 fi
43741 UNZIP=$ac_cv_path_UNZIP
43742
43743 if test -n "$UNZIP"; then
43744 echo "$as_me:43744: result: $UNZIP" >&5
43745 echo "${ECHO_T}$UNZIP" >&6
43746 else
43747 echo "$as_me:43747: result: no" >&5
43748 echo "${ECHO_T}no" >&6
43749 fi
43750
43751 test -n "$UNZIP" && break
43752 done
43753 test -n "$UNZIP" || UNZIP="$UNZIP"
43754
43755 cf_path_prog=""
43756 cf_path_args=""
43757 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43758 for cf_temp in $ac_cv_path_UNZIP
43759 do
43760 if test -z "$cf_path_prog" ; then
43761 if test "$with_full_paths" = yes ; then
43762
43763 if test "x$prefix" != xNONE; then
43764 cf_path_syntax="$prefix"
43765 else
43766 cf_path_syntax="$ac_default_prefix"
43767 fi
43768
43769 case "x$cf_temp" in
43770 (x\$\(*\)*|x\'*\'*)
43771 ;;
43772 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43773 ;;
43774 (x\$\{*prefix\}*|x\$\{*dir\}*)
43775 eval cf_temp="$cf_temp"
43776 case "x$cf_temp" in
43777 (xNONE/*)
43778 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43779 ;;
43780 esac
43781 ;;
43782 (xno|xNONE/*)
43783 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43784 ;;
43785 (*)
43786 break
43787 ;;
43788 esac
43789
43790 cf_path_prog="$cf_temp"
43791 else
43792 cf_path_prog="`basename "$cf_temp"`"
43793 fi
43794 elif test -z "$cf_path_args" ; then
43795 cf_path_args="$cf_temp"
43796 else
43797 cf_path_args="$cf_path_args $cf_temp"
43798 fi
43799 done
43800 IFS="$cf_save_ifs"
43801
43802 if test -n "$cf_path_prog" ; then
43803
43804 echo "${as_me:-configure}:43804: testing defining path for ${cf_path_prog} ..." 1>&5
43805
43806 cat >>confdefs.h <<EOF
43807 #define UNZIP_PATH "$cf_path_prog"
43808 EOF
43809
43810 test -n "$cf_path_args" &&
43811 cat >>confdefs.h <<EOF
43812 #define UNZIP_ARGS "$cf_path_args"
43813 EOF
43814
43815 fi
43816
43817 test -z "$BZIP2" && BZIP2="bzip2"
43818 for ac_prog in $BZIP2 bzip2
43819 do
43820 # Extract the first word of "$ac_prog", so it can be a program name with args.
43821 set dummy $ac_prog; ac_word=$2
43822 echo "$as_me:43822: checking for $ac_word" >&5
43823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43824 if test "${ac_cv_path_BZIP2+set}" = set; then
43825 echo $ECHO_N "(cached) $ECHO_C" >&6
43826 else
43827 case $BZIP2 in
43828 [\\/]* | ?:[\\/]*)
43829 ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
43830 ;;
43831 *)
43832 ac_save_IFS=$IFS; IFS=$ac_path_separator
43833 ac_dummy="$PATH"
43834 for ac_dir in $ac_dummy; do
43835 IFS=$ac_save_IFS
43836 test -z "$ac_dir" && ac_dir=.
43837 if $as_executable_p "$ac_dir/$ac_word"; then
43838 ac_cv_path_BZIP2="$ac_dir/$ac_word"
43839 echo "$as_me:43839: found $ac_dir/$ac_word" >&5
43840 break
43841 fi
43842 done
43843
43844 ;;
43845 esac
43846 fi
43847 BZIP2=$ac_cv_path_BZIP2
43848
43849 if test -n "$BZIP2"; then
43850 echo "$as_me:43850: result: $BZIP2" >&5
43851 echo "${ECHO_T}$BZIP2" >&6
43852 else
43853 echo "$as_me:43853: result: no" >&5
43854 echo "${ECHO_T}no" >&6
43855 fi
43856
43857 test -n "$BZIP2" && break
43858 done
43859 test -n "$BZIP2" || BZIP2="$BZIP2"
43860
43861 cf_path_prog=""
43862 cf_path_args=""
43863 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43864 for cf_temp in $ac_cv_path_BZIP2
43865 do
43866 if test -z "$cf_path_prog" ; then
43867 if test "$with_full_paths" = yes ; then
43868
43869 if test "x$prefix" != xNONE; then
43870 cf_path_syntax="$prefix"
43871 else
43872 cf_path_syntax="$ac_default_prefix"
43873 fi
43874
43875 case "x$cf_temp" in
43876 (x\$\(*\)*|x\'*\'*)
43877 ;;
43878 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43879 ;;
43880 (x\$\{*prefix\}*|x\$\{*dir\}*)
43881 eval cf_temp="$cf_temp"
43882 case "x$cf_temp" in
43883 (xNONE/*)
43884 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43885 ;;
43886 esac
43887 ;;
43888 (xno|xNONE/*)
43889 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43890 ;;
43891 (*)
43892 break
43893 ;;
43894 esac
43895
43896 cf_path_prog="$cf_temp"
43897 else
43898 cf_path_prog="`basename "$cf_temp"`"
43899 fi
43900 elif test -z "$cf_path_args" ; then
43901 cf_path_args="$cf_temp"
43902 else
43903 cf_path_args="$cf_path_args $cf_temp"
43904 fi
43905 done
43906 IFS="$cf_save_ifs"
43907
43908 if test -n "$cf_path_prog" ; then
43909
43910 echo "${as_me:-configure}:43910: testing defining path for ${cf_path_prog} ..." 1>&5
43911
43912 cat >>confdefs.h <<EOF
43913 #define BZIP2_PATH "$cf_path_prog"
43914 EOF
43915
43916 test -n "$cf_path_args" &&
43917 cat >>confdefs.h <<EOF
43918 #define BZIP2_ARGS "$cf_path_args"
43919 EOF
43920
43921 fi
43922
43923 test -z "$BROTLI" && BROTLI="brotli"
43924 for ac_prog in $BROTLI brotli
43925 do
43926 # Extract the first word of "$ac_prog", so it can be a program name with args.
43927 set dummy $ac_prog; ac_word=$2
43928 echo "$as_me:43928: checking for $ac_word" >&5
43929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43930 if test "${ac_cv_path_BROTLI+set}" = set; then
43931 echo $ECHO_N "(cached) $ECHO_C" >&6
43932 else
43933 case $BROTLI in
43934 [\\/]* | ?:[\\/]*)
43935 ac_cv_path_BROTLI="$BROTLI" # Let the user override the test with a path.
43936 ;;
43937 *)
43938 ac_save_IFS=$IFS; IFS=$ac_path_separator
43939 ac_dummy="$PATH"
43940 for ac_dir in $ac_dummy; do
43941 IFS=$ac_save_IFS
43942 test -z "$ac_dir" && ac_dir=.
43943 if $as_executable_p "$ac_dir/$ac_word"; then
43944 ac_cv_path_BROTLI="$ac_dir/$ac_word"
43945 echo "$as_me:43945: found $ac_dir/$ac_word" >&5
43946 break
43947 fi
43948 done
43949
43950 ;;
43951 esac
43952 fi
43953 BROTLI=$ac_cv_path_BROTLI
43954
43955 if test -n "$BROTLI"; then
43956 echo "$as_me:43956: result: $BROTLI" >&5
43957 echo "${ECHO_T}$BROTLI" >&6
43958 else
43959 echo "$as_me:43959: result: no" >&5
43960 echo "${ECHO_T}no" >&6
43961 fi
43962
43963 test -n "$BROTLI" && break
43964 done
43965 test -n "$BROTLI" || BROTLI="$BROTLI"
43966
43967 cf_path_prog=""
43968 cf_path_args=""
43969 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43970 for cf_temp in $ac_cv_path_BROTLI
43971 do
43972 if test -z "$cf_path_prog" ; then
43973 if test "$with_full_paths" = yes ; then
43974
43975 if test "x$prefix" != xNONE; then
43976 cf_path_syntax="$prefix"
43977 else
43978 cf_path_syntax="$ac_default_prefix"
43979 fi
43980
43981 case "x$cf_temp" in
43982 (x\$\(*\)*|x\'*\'*)
43983 ;;
43984 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
43985 ;;
43986 (x\$\{*prefix\}*|x\$\{*dir\}*)
43987 eval cf_temp="$cf_temp"
43988 case "x$cf_temp" in
43989 (xNONE/*)
43990 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43991 ;;
43992 esac
43993 ;;
43994 (xno|xNONE/*)
43995 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43996 ;;
43997 (*)
43998 break
43999 ;;
44000 esac
44001
44002 cf_path_prog="$cf_temp"
44003 else
44004 cf_path_prog="`basename "$cf_temp"`"
44005 fi
44006 elif test -z "$cf_path_args" ; then
44007 cf_path_args="$cf_temp"
44008 else
44009 cf_path_args="$cf_path_args $cf_temp"
44010 fi
44011 done
44012 IFS="$cf_save_ifs"
44013
44014 if test -n "$cf_path_prog" ; then
44015
44016 echo "${as_me:-configure}:44016: testing defining path for ${cf_path_prog} ..." 1>&5
44017
44018 cat >>confdefs.h <<EOF
44019 #define BROTLI_PATH "$cf_path_prog"
44020 EOF
44021
44022 test -n "$cf_path_args" &&
44023 cat >>confdefs.h <<EOF
44024 #define BROTLI_ARGS "$cf_path_args"
44025 EOF
44026
44027 fi
44028
44029 test -z "$ZSTD" && ZSTD="zstd"
44030 for ac_prog in $ZSTD zstd
44031 do
44032 # Extract the first word of "$ac_prog", so it can be a program name with args.
44033 set dummy $ac_prog; ac_word=$2
44034 echo "$as_me:44034: checking for $ac_word" >&5
44035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44036 if test "${ac_cv_path_ZSTD+set}" = set; then
44037 echo $ECHO_N "(cached) $ECHO_C" >&6
44038 else
44039 case $ZSTD in
44040 [\\/]* | ?:[\\/]*)
44041 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
44042 ;;
44043 *)
44044 ac_save_IFS=$IFS; IFS=$ac_path_separator
44045 ac_dummy="$PATH"
44046 for ac_dir in $ac_dummy; do
44047 IFS=$ac_save_IFS
44048 test -z "$ac_dir" && ac_dir=.
44049 if $as_executable_p "$ac_dir/$ac_word"; then
44050 ac_cv_path_ZSTD="$ac_dir/$ac_word"
44051 echo "$as_me:44051: found $ac_dir/$ac_word" >&5
44052 break
44053 fi
44054 done
44055
44056 ;;
44057 esac
44058 fi
44059 ZSTD=$ac_cv_path_ZSTD
44060
44061 if test -n "$ZSTD"; then
44062 echo "$as_me:44062: result: $ZSTD" >&5
44063 echo "${ECHO_T}$ZSTD" >&6
44064 else
44065 echo "$as_me:44065: result: no" >&5
44066 echo "${ECHO_T}no" >&6
44067 fi
44068
44069 test -n "$ZSTD" && break
44070 done
44071 test -n "$ZSTD" || ZSTD="$ZSTD"
44072
44073 cf_path_prog=""
44074 cf_path_args=""
44075 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44076 for cf_temp in $ac_cv_path_ZSTD
44077 do
44078 if test -z "$cf_path_prog" ; then
44079 if test "$with_full_paths" = yes ; then
44080
44081 if test "x$prefix" != xNONE; then
44082 cf_path_syntax="$prefix"
44083 else
44084 cf_path_syntax="$ac_default_prefix"
44085 fi
44086
44087 case "x$cf_temp" in
44088 (x\$\(*\)*|x\'*\'*)
44089 ;;
44090 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44091 ;;
44092 (x\$\{*prefix\}*|x\$\{*dir\}*)
44093 eval cf_temp="$cf_temp"
44094 case "x$cf_temp" in
44095 (xNONE/*)
44096 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44097 ;;
44098 esac
44099 ;;
44100 (xno|xNONE/*)
44101 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44102 ;;
44103 (*)
44104 break
44105 ;;
44106 esac
44107
44108 cf_path_prog="$cf_temp"
44109 else
44110 cf_path_prog="`basename "$cf_temp"`"
44111 fi
44112 elif test -z "$cf_path_args" ; then
44113 cf_path_args="$cf_temp"
44114 else
44115 cf_path_args="$cf_path_args $cf_temp"
44116 fi
44117 done
44118 IFS="$cf_save_ifs"
44119
44120 if test -n "$cf_path_prog" ; then
44121
44122 echo "${as_me:-configure}:44122: testing defining path for ${cf_path_prog} ..." 1>&5
44123
44124 cat >>confdefs.h <<EOF
44125 #define ZSTD_PATH "$cf_path_prog"
44126 EOF
44127
44128 test -n "$cf_path_args" &&
44129 cat >>confdefs.h <<EOF
44130 #define ZSTD_ARGS "$cf_path_args"
44131 EOF
44132
44133 fi
44134
44135 test -z "$TAR" && TAR="tar"
44136 for ac_prog in $TAR tar pax gtar gnutar bsdtar star
44137 do
44138 # Extract the first word of "$ac_prog", so it can be a program name with args.
44139 set dummy $ac_prog; ac_word=$2
44140 echo "$as_me:44140: checking for $ac_word" >&5
44141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44142 if test "${ac_cv_path_TAR+set}" = set; then
44143 echo $ECHO_N "(cached) $ECHO_C" >&6
44144 else
44145 case $TAR in
44146 [\\/]* | ?:[\\/]*)
44147 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
44148 ;;
44149 *)
44150 ac_save_IFS=$IFS; IFS=$ac_path_separator
44151 ac_dummy="$PATH"
44152 for ac_dir in $ac_dummy; do
44153 IFS=$ac_save_IFS
44154 test -z "$ac_dir" && ac_dir=.
44155 if $as_executable_p "$ac_dir/$ac_word"; then
44156 ac_cv_path_TAR="$ac_dir/$ac_word"
44157 echo "$as_me:44157: found $ac_dir/$ac_word" >&5
44158 break
44159 fi
44160 done
44161
44162 ;;
44163 esac
44164 fi
44165 TAR=$ac_cv_path_TAR
44166
44167 if test -n "$TAR"; then
44168 echo "$as_me:44168: result: $TAR" >&5
44169 echo "${ECHO_T}$TAR" >&6
44170 else
44171 echo "$as_me:44171: result: no" >&5
44172 echo "${ECHO_T}no" >&6
44173 fi
44174
44175 test -n "$TAR" && break
44176 done
44177 test -n "$TAR" || TAR="$TAR"
44178
44179 cf_path_prog=""
44180 cf_path_args=""
44181 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44182 for cf_temp in $ac_cv_path_TAR
44183 do
44184 if test -z "$cf_path_prog" ; then
44185 if test "$with_full_paths" = yes ; then
44186
44187 if test "x$prefix" != xNONE; then
44188 cf_path_syntax="$prefix"
44189 else
44190 cf_path_syntax="$ac_default_prefix"
44191 fi
44192
44193 case "x$cf_temp" in
44194 (x\$\(*\)*|x\'*\'*)
44195 ;;
44196 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44197 ;;
44198 (x\$\{*prefix\}*|x\$\{*dir\}*)
44199 eval cf_temp="$cf_temp"
44200 case "x$cf_temp" in
44201 (xNONE/*)
44202 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44203 ;;
44204 esac
44205 ;;
44206 (xno|xNONE/*)
44207 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44208 ;;
44209 (*)
44210 break
44211 ;;
44212 esac
44213
44214 cf_path_prog="$cf_temp"
44215 else
44216 cf_path_prog="`basename "$cf_temp"`"
44217 fi
44218 elif test -z "$cf_path_args" ; then
44219 cf_path_args="$cf_temp"
44220 else
44221 cf_path_args="$cf_path_args $cf_temp"
44222 fi
44223 done
44224 IFS="$cf_save_ifs"
44225
44226 if test -n "$cf_path_prog" ; then
44227
44228 echo "${as_me:-configure}:44228: testing defining path for ${cf_path_prog} ..." 1>&5
44229
44230 cat >>confdefs.h <<EOF
44231 #define TAR_PATH "$cf_path_prog"
44232 EOF
44233
44234 test -n "$cf_path_args" &&
44235 cat >>confdefs.h <<EOF
44236 #define TAR_ARGS "$cf_path_args"
44237 EOF
44238
44239 fi
44240
44241 case $TAR in
44242 (*pax|*pax$EXEEXT)
44243 TAR_UP_OPTIONS="-w"
44244 TAR_DOWN_OPTIONS="-r"
44245 TAR_PIPE_OPTIONS=""
44246 TAR_FILE_OPTIONS="-f"
44247 ;;
44248 (*star|*star$EXEEXT)
44249 TAR_UP_OPTIONS="-c -f"
44250 TAR_DOWN_OPTIONS="-x -U -f"
44251 TAR_PIPE_OPTIONS="-"
44252 TAR_FILE_OPTIONS=""
44253 ;;
44254 (*tar|*tar$EXEEXT)
44255 # FIXME: some versions of tar require, some don't allow the "-"
44256 TAR_UP_OPTIONS="-cf"
44257 TAR_DOWN_OPTIONS="-xf"
44258 TAR_PIPE_OPTIONS="-"
44259 TAR_FILE_OPTIONS=""
44260 ;;
44261 esac
44262
44263 cat >>confdefs.h <<EOF
44264 #define TAR_UP_OPTIONS "$TAR_UP_OPTIONS"
44265 EOF
44266
44267 cat >>confdefs.h <<EOF
44268 #define TAR_DOWN_OPTIONS "$TAR_DOWN_OPTIONS"
44269 EOF
44270
44271 cat >>confdefs.h <<EOF
44272 #define TAR_FILE_OPTIONS "$TAR_FILE_OPTIONS"
44273 EOF
44274
44275 cat >>confdefs.h <<EOF
44276 #define TAR_PIPE_OPTIONS "$TAR_PIPE_OPTIONS"
44277 EOF
44278
44279 if test ".$use_dired" != ".no" ; then
44280
44281 test -z "$COMPRESS" && COMPRESS="compress"
44282 for ac_prog in $COMPRESS compress
44283 do
44284 # Extract the first word of "$ac_prog", so it can be a program name with args.
44285 set dummy $ac_prog; ac_word=$2
44286 echo "$as_me:44286: checking for $ac_word" >&5
44287 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44288 if test "${ac_cv_path_COMPRESS+set}" = set; then
44289 echo $ECHO_N "(cached) $ECHO_C" >&6
44290 else
44291 case $COMPRESS in
44292 [\\/]* | ?:[\\/]*)
44293 ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
44294 ;;
44295 *)
44296 ac_save_IFS=$IFS; IFS=$ac_path_separator
44297 ac_dummy="$PATH"
44298 for ac_dir in $ac_dummy; do
44299 IFS=$ac_save_IFS
44300 test -z "$ac_dir" && ac_dir=.
44301 if $as_executable_p "$ac_dir/$ac_word"; then
44302 ac_cv_path_COMPRESS="$ac_dir/$ac_word"
44303 echo "$as_me:44303: found $ac_dir/$ac_word" >&5
44304 break
44305 fi
44306 done
44307
44308 ;;
44309 esac
44310 fi
44311 COMPRESS=$ac_cv_path_COMPRESS
44312
44313 if test -n "$COMPRESS"; then
44314 echo "$as_me:44314: result: $COMPRESS" >&5
44315 echo "${ECHO_T}$COMPRESS" >&6
44316 else
44317 echo "$as_me:44317: result: no" >&5
44318 echo "${ECHO_T}no" >&6
44319 fi
44320
44321 test -n "$COMPRESS" && break
44322 done
44323 test -n "$COMPRESS" || COMPRESS="$COMPRESS"
44324
44325 cf_path_prog=""
44326 cf_path_args=""
44327 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44328 for cf_temp in $ac_cv_path_COMPRESS
44329 do
44330 if test -z "$cf_path_prog" ; then
44331 if test "$with_full_paths" = yes ; then
44332
44333 if test "x$prefix" != xNONE; then
44334 cf_path_syntax="$prefix"
44335 else
44336 cf_path_syntax="$ac_default_prefix"
44337 fi
44338
44339 case "x$cf_temp" in
44340 (x\$\(*\)*|x\'*\'*)
44341 ;;
44342 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44343 ;;
44344 (x\$\{*prefix\}*|x\$\{*dir\}*)
44345 eval cf_temp="$cf_temp"
44346 case "x$cf_temp" in
44347 (xNONE/*)
44348 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44349 ;;
44350 esac
44351 ;;
44352 (xno|xNONE/*)
44353 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44354 ;;
44355 (*)
44356 break
44357 ;;
44358 esac
44359
44360 cf_path_prog="$cf_temp"
44361 else
44362 cf_path_prog="`basename "$cf_temp"`"
44363 fi
44364 elif test -z "$cf_path_args" ; then
44365 cf_path_args="$cf_temp"
44366 else
44367 cf_path_args="$cf_path_args $cf_temp"
44368 fi
44369 done
44370 IFS="$cf_save_ifs"
44371
44372 if test -n "$cf_path_prog" ; then
44373
44374 echo "${as_me:-configure}:44374: testing defining path for ${cf_path_prog} ..." 1>&5
44375
44376 cat >>confdefs.h <<EOF
44377 #define COMPRESS_PATH "$cf_path_prog"
44378 EOF
44379
44380 test -n "$cf_path_args" &&
44381 cat >>confdefs.h <<EOF
44382 #define COMPRESS_ARGS "$cf_path_args"
44383 EOF
44384
44385 fi
44386
44387 test -z "$RM" && RM="rm"
44388 for ac_prog in $RM rm
44389 do
44390 # Extract the first word of "$ac_prog", so it can be a program name with args.
44391 set dummy $ac_prog; ac_word=$2
44392 echo "$as_me:44392: checking for $ac_word" >&5
44393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44394 if test "${ac_cv_path_RM+set}" = set; then
44395 echo $ECHO_N "(cached) $ECHO_C" >&6
44396 else
44397 case $RM in
44398 [\\/]* | ?:[\\/]*)
44399 ac_cv_path_RM="$RM" # Let the user override the test with a path.
44400 ;;
44401 *)
44402 ac_save_IFS=$IFS; IFS=$ac_path_separator
44403 ac_dummy="$PATH"
44404 for ac_dir in $ac_dummy; do
44405 IFS=$ac_save_IFS
44406 test -z "$ac_dir" && ac_dir=.
44407 if $as_executable_p "$ac_dir/$ac_word"; then
44408 ac_cv_path_RM="$ac_dir/$ac_word"
44409 echo "$as_me:44409: found $ac_dir/$ac_word" >&5
44410 break
44411 fi
44412 done
44413
44414 ;;
44415 esac
44416 fi
44417 RM=$ac_cv_path_RM
44418
44419 if test -n "$RM"; then
44420 echo "$as_me:44420: result: $RM" >&5
44421 echo "${ECHO_T}$RM" >&6
44422 else
44423 echo "$as_me:44423: result: no" >&5
44424 echo "${ECHO_T}no" >&6
44425 fi
44426
44427 test -n "$RM" && break
44428 done
44429 test -n "$RM" || RM="$RM"
44430
44431 cf_path_prog=""
44432 cf_path_args=""
44433 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44434 for cf_temp in $ac_cv_path_RM
44435 do
44436 if test -z "$cf_path_prog" ; then
44437 if test "$with_full_paths" = yes ; then
44438
44439 if test "x$prefix" != xNONE; then
44440 cf_path_syntax="$prefix"
44441 else
44442 cf_path_syntax="$ac_default_prefix"
44443 fi
44444
44445 case "x$cf_temp" in
44446 (x\$\(*\)*|x\'*\'*)
44447 ;;
44448 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44449 ;;
44450 (x\$\{*prefix\}*|x\$\{*dir\}*)
44451 eval cf_temp="$cf_temp"
44452 case "x$cf_temp" in
44453 (xNONE/*)
44454 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44455 ;;
44456 esac
44457 ;;
44458 (xno|xNONE/*)
44459 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44460 ;;
44461 (*)
44462 break
44463 ;;
44464 esac
44465
44466 cf_path_prog="$cf_temp"
44467 else
44468 cf_path_prog="`basename "$cf_temp"`"
44469 fi
44470 elif test -z "$cf_path_args" ; then
44471 cf_path_args="$cf_temp"
44472 else
44473 cf_path_args="$cf_path_args $cf_temp"
44474 fi
44475 done
44476 IFS="$cf_save_ifs"
44477
44478 if test -n "$cf_path_prog" ; then
44479
44480 echo "${as_me:-configure}:44480: testing defining path for ${cf_path_prog} ..." 1>&5
44481
44482 cat >>confdefs.h <<EOF
44483 #define RM_PATH "$cf_path_prog"
44484 EOF
44485
44486 test -n "$cf_path_args" &&
44487 cat >>confdefs.h <<EOF
44488 #define RM_ARGS "$cf_path_args"
44489 EOF
44490
44491 fi
44492
44493 test -z "$UUDECODE" && UUDECODE="uudecode"
44494 for ac_prog in $UUDECODE uudecode
44495 do
44496 # Extract the first word of "$ac_prog", so it can be a program name with args.
44497 set dummy $ac_prog; ac_word=$2
44498 echo "$as_me:44498: checking for $ac_word" >&5
44499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44500 if test "${ac_cv_path_UUDECODE+set}" = set; then
44501 echo $ECHO_N "(cached) $ECHO_C" >&6
44502 else
44503 case $UUDECODE in
44504 [\\/]* | ?:[\\/]*)
44505 ac_cv_path_UUDECODE="$UUDECODE" # Let the user override the test with a path.
44506 ;;
44507 *)
44508 ac_save_IFS=$IFS; IFS=$ac_path_separator
44509 ac_dummy="$PATH"
44510 for ac_dir in $ac_dummy; do
44511 IFS=$ac_save_IFS
44512 test -z "$ac_dir" && ac_dir=.
44513 if $as_executable_p "$ac_dir/$ac_word"; then
44514 ac_cv_path_UUDECODE="$ac_dir/$ac_word"
44515 echo "$as_me:44515: found $ac_dir/$ac_word" >&5
44516 break
44517 fi
44518 done
44519
44520 ;;
44521 esac
44522 fi
44523 UUDECODE=$ac_cv_path_UUDECODE
44524
44525 if test -n "$UUDECODE"; then
44526 echo "$as_me:44526: result: $UUDECODE" >&5
44527 echo "${ECHO_T}$UUDECODE" >&6
44528 else
44529 echo "$as_me:44529: result: no" >&5
44530 echo "${ECHO_T}no" >&6
44531 fi
44532
44533 test -n "$UUDECODE" && break
44534 done
44535 test -n "$UUDECODE" || UUDECODE="$UUDECODE"
44536
44537 cf_path_prog=""
44538 cf_path_args=""
44539 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44540 for cf_temp in $ac_cv_path_UUDECODE
44541 do
44542 if test -z "$cf_path_prog" ; then
44543 if test "$with_full_paths" = yes ; then
44544
44545 if test "x$prefix" != xNONE; then
44546 cf_path_syntax="$prefix"
44547 else
44548 cf_path_syntax="$ac_default_prefix"
44549 fi
44550
44551 case "x$cf_temp" in
44552 (x\$\(*\)*|x\'*\'*)
44553 ;;
44554 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44555 ;;
44556 (x\$\{*prefix\}*|x\$\{*dir\}*)
44557 eval cf_temp="$cf_temp"
44558 case "x$cf_temp" in
44559 (xNONE/*)
44560 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44561 ;;
44562 esac
44563 ;;
44564 (xno|xNONE/*)
44565 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44566 ;;
44567 (*)
44568 break
44569 ;;
44570 esac
44571
44572 cf_path_prog="$cf_temp"
44573 else
44574 cf_path_prog="`basename "$cf_temp"`"
44575 fi
44576 elif test -z "$cf_path_args" ; then
44577 cf_path_args="$cf_temp"
44578 else
44579 cf_path_args="$cf_path_args $cf_temp"
44580 fi
44581 done
44582 IFS="$cf_save_ifs"
44583
44584 if test -n "$cf_path_prog" ; then
44585
44586 echo "${as_me:-configure}:44586: testing defining path for ${cf_path_prog} ..." 1>&5
44587
44588 cat >>confdefs.h <<EOF
44589 #define UUDECODE_PATH "$cf_path_prog"
44590 EOF
44591
44592 test -n "$cf_path_args" &&
44593 cat >>confdefs.h <<EOF
44594 #define UUDECODE_ARGS "$cf_path_args"
44595 EOF
44596
44597 fi
44598
44599 test -z "$ZCAT" && ZCAT="zcat"
44600 for ac_prog in $ZCAT zcat
44601 do
44602 # Extract the first word of "$ac_prog", so it can be a program name with args.
44603 set dummy $ac_prog; ac_word=$2
44604 echo "$as_me:44604: checking for $ac_word" >&5
44605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44606 if test "${ac_cv_path_ZCAT+set}" = set; then
44607 echo $ECHO_N "(cached) $ECHO_C" >&6
44608 else
44609 case $ZCAT in
44610 [\\/]* | ?:[\\/]*)
44611 ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path.
44612 ;;
44613 *)
44614 ac_save_IFS=$IFS; IFS=$ac_path_separator
44615 ac_dummy="$PATH"
44616 for ac_dir in $ac_dummy; do
44617 IFS=$ac_save_IFS
44618 test -z "$ac_dir" && ac_dir=.
44619 if $as_executable_p "$ac_dir/$ac_word"; then
44620 ac_cv_path_ZCAT="$ac_dir/$ac_word"
44621 echo "$as_me:44621: found $ac_dir/$ac_word" >&5
44622 break
44623 fi
44624 done
44625
44626 ;;
44627 esac
44628 fi
44629 ZCAT=$ac_cv_path_ZCAT
44630
44631 if test -n "$ZCAT"; then
44632 echo "$as_me:44632: result: $ZCAT" >&5
44633 echo "${ECHO_T}$ZCAT" >&6
44634 else
44635 echo "$as_me:44635: result: no" >&5
44636 echo "${ECHO_T}no" >&6
44637 fi
44638
44639 test -n "$ZCAT" && break
44640 done
44641 test -n "$ZCAT" || ZCAT="$ZCAT"
44642
44643 cf_path_prog=""
44644 cf_path_args=""
44645 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44646 for cf_temp in $ac_cv_path_ZCAT
44647 do
44648 if test -z "$cf_path_prog" ; then
44649 if test "$with_full_paths" = yes ; then
44650
44651 if test "x$prefix" != xNONE; then
44652 cf_path_syntax="$prefix"
44653 else
44654 cf_path_syntax="$ac_default_prefix"
44655 fi
44656
44657 case "x$cf_temp" in
44658 (x\$\(*\)*|x\'*\'*)
44659 ;;
44660 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44661 ;;
44662 (x\$\{*prefix\}*|x\$\{*dir\}*)
44663 eval cf_temp="$cf_temp"
44664 case "x$cf_temp" in
44665 (xNONE/*)
44666 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44667 ;;
44668 esac
44669 ;;
44670 (xno|xNONE/*)
44671 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44672 ;;
44673 (*)
44674 break
44675 ;;
44676 esac
44677
44678 cf_path_prog="$cf_temp"
44679 else
44680 cf_path_prog="`basename "$cf_temp"`"
44681 fi
44682 elif test -z "$cf_path_args" ; then
44683 cf_path_args="$cf_temp"
44684 else
44685 cf_path_args="$cf_path_args $cf_temp"
44686 fi
44687 done
44688 IFS="$cf_save_ifs"
44689
44690 if test -n "$cf_path_prog" ; then
44691
44692 echo "${as_me:-configure}:44692: testing defining path for ${cf_path_prog} ..." 1>&5
44693
44694 cat >>confdefs.h <<EOF
44695 #define ZCAT_PATH "$cf_path_prog"
44696 EOF
44697
44698 test -n "$cf_path_args" &&
44699 cat >>confdefs.h <<EOF
44700 #define ZCAT_ARGS "$cf_path_args"
44701 EOF
44702
44703 fi
44704
44705 test -z "$ZIP" && ZIP="zip"
44706 for ac_prog in $ZIP zip
44707 do
44708 # Extract the first word of "$ac_prog", so it can be a program name with args.
44709 set dummy $ac_prog; ac_word=$2
44710 echo "$as_me:44710: checking for $ac_word" >&5
44711 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44712 if test "${ac_cv_path_ZIP+set}" = set; then
44713 echo $ECHO_N "(cached) $ECHO_C" >&6
44714 else
44715 case $ZIP in
44716 [\\/]* | ?:[\\/]*)
44717 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
44718 ;;
44719 *)
44720 ac_save_IFS=$IFS; IFS=$ac_path_separator
44721 ac_dummy="$PATH"
44722 for ac_dir in $ac_dummy; do
44723 IFS=$ac_save_IFS
44724 test -z "$ac_dir" && ac_dir=.
44725 if $as_executable_p "$ac_dir/$ac_word"; then
44726 ac_cv_path_ZIP="$ac_dir/$ac_word"
44727 echo "$as_me:44727: found $ac_dir/$ac_word" >&5
44728 break
44729 fi
44730 done
44731
44732 ;;
44733 esac
44734 fi
44735 ZIP=$ac_cv_path_ZIP
44736
44737 if test -n "$ZIP"; then
44738 echo "$as_me:44738: result: $ZIP" >&5
44739 echo "${ECHO_T}$ZIP" >&6
44740 else
44741 echo "$as_me:44741: result: no" >&5
44742 echo "${ECHO_T}no" >&6
44743 fi
44744
44745 test -n "$ZIP" && break
44746 done
44747 test -n "$ZIP" || ZIP="$ZIP"
44748
44749 cf_path_prog=""
44750 cf_path_args=""
44751 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44752 for cf_temp in $ac_cv_path_ZIP
44753 do
44754 if test -z "$cf_path_prog" ; then
44755 if test "$with_full_paths" = yes ; then
44756
44757 if test "x$prefix" != xNONE; then
44758 cf_path_syntax="$prefix"
44759 else
44760 cf_path_syntax="$ac_default_prefix"
44761 fi
44762
44763 case "x$cf_temp" in
44764 (x\$\(*\)*|x\'*\'*)
44765 ;;
44766 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44767 ;;
44768 (x\$\{*prefix\}*|x\$\{*dir\}*)
44769 eval cf_temp="$cf_temp"
44770 case "x$cf_temp" in
44771 (xNONE/*)
44772 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44773 ;;
44774 esac
44775 ;;
44776 (xno|xNONE/*)
44777 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44778 ;;
44779 (*)
44780 break
44781 ;;
44782 esac
44783
44784 cf_path_prog="$cf_temp"
44785 else
44786 cf_path_prog="`basename "$cf_temp"`"
44787 fi
44788 elif test -z "$cf_path_args" ; then
44789 cf_path_args="$cf_temp"
44790 else
44791 cf_path_args="$cf_path_args $cf_temp"
44792 fi
44793 done
44794 IFS="$cf_save_ifs"
44795
44796 if test -n "$cf_path_prog" ; then
44797
44798 echo "${as_me:-configure}:44798: testing defining path for ${cf_path_prog} ..." 1>&5
44799
44800 cat >>confdefs.h <<EOF
44801 #define ZIP_PATH "$cf_path_prog"
44802 EOF
44803
44804 test -n "$cf_path_args" &&
44805 cat >>confdefs.h <<EOF
44806 #define ZIP_ARGS "$cf_path_args"
44807 EOF
44808
44809 fi
44810
44811 case "$INSTALL" in
44812 ($srcdir*)
44813 cat >>confdefs.h <<EOF
44814 #define INSTALL_PATH "install"
44815 EOF
44816
44817 ;;
44818 (*)
44819 cf_save_INSTALL="$INSTALL"
44820
44821 test -z "$INSTALL" && INSTALL="install"
44822 for ac_prog in $INSTALL install
44823 do
44824 # Extract the first word of "$ac_prog", so it can be a program name with args.
44825 set dummy $ac_prog; ac_word=$2
44826 echo "$as_me:44826: checking for $ac_word" >&5
44827 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44828 if test "${ac_cv_path_INSTALL+set}" = set; then
44829 echo $ECHO_N "(cached) $ECHO_C" >&6
44830 else
44831 case $INSTALL in
44832 [\\/]* | ?:[\\/]*)
44833 ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a path.
44834 ;;
44835 *)
44836 ac_save_IFS=$IFS; IFS=$ac_path_separator
44837 ac_dummy="$PATH"
44838 for ac_dir in $ac_dummy; do
44839 IFS=$ac_save_IFS
44840 test -z "$ac_dir" && ac_dir=.
44841 if $as_executable_p "$ac_dir/$ac_word"; then
44842 ac_cv_path_INSTALL="$ac_dir/$ac_word"
44843 echo "$as_me:44843: found $ac_dir/$ac_word" >&5
44844 break
44845 fi
44846 done
44847
44848 ;;
44849 esac
44850 fi
44851 INSTALL=$ac_cv_path_INSTALL
44852
44853 if test -n "$INSTALL"; then
44854 echo "$as_me:44854: result: $INSTALL" >&5
44855 echo "${ECHO_T}$INSTALL" >&6
44856 else
44857 echo "$as_me:44857: result: no" >&5
44858 echo "${ECHO_T}no" >&6
44859 fi
44860
44861 test -n "$INSTALL" && break
44862 done
44863 test -n "$INSTALL" || INSTALL="$INSTALL"
44864
44865 cf_path_prog=""
44866 cf_path_args=""
44867 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44868 for cf_temp in $ac_cv_path_INSTALL
44869 do
44870 if test -z "$cf_path_prog" ; then
44871 if test "$with_full_paths" = yes ; then
44872
44873 if test "x$prefix" != xNONE; then
44874 cf_path_syntax="$prefix"
44875 else
44876 cf_path_syntax="$ac_default_prefix"
44877 fi
44878
44879 case "x$cf_temp" in
44880 (x\$\(*\)*|x\'*\'*)
44881 ;;
44882 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
44883 ;;
44884 (x\$\{*prefix\}*|x\$\{*dir\}*)
44885 eval cf_temp="$cf_temp"
44886 case "x$cf_temp" in
44887 (xNONE/*)
44888 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44889 ;;
44890 esac
44891 ;;
44892 (xno|xNONE/*)
44893 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44894 ;;
44895 (*)
44896 break
44897 ;;
44898 esac
44899
44900 cf_path_prog="$cf_temp"
44901 else
44902 cf_path_prog="`basename "$cf_temp"`"
44903 fi
44904 elif test -z "$cf_path_args" ; then
44905 cf_path_args="$cf_temp"
44906 else
44907 cf_path_args="$cf_path_args $cf_temp"
44908 fi
44909 done
44910 IFS="$cf_save_ifs"
44911
44912 if test -n "$cf_path_prog" ; then
44913
44914 echo "${as_me:-configure}:44914: testing defining path for ${cf_path_prog} ..." 1>&5
44915
44916 cat >>confdefs.h <<EOF
44917 #define INSTALL_PATH "$cf_path_prog"
44918 EOF
44919
44920 test -n "$cf_path_args" &&
44921 cat >>confdefs.h <<EOF
44922 #define INSTALL_ARGS "$cf_path_args"
44923 EOF
44924
44925 fi
44926
44927 INSTALL="$cf_save_INSTALL"
44928 ;;
44929 esac
44930 fi
44931
44932 COMPRESS_PROG=
44933 COMPRESS_EXT=
44934 if test "$use_gzip_help" = yes ; then
44935 COMPRESS_PROG="$ac_cv_path_GZIP -9 -n"
44936 COMPRESS_EXT=.gz
44937 fi
44938
44939 if test "$cf_cv_screen" = pdcurses ; then
44940
44941 case "$host_os" in
44942 (mingw*)
44943
44944 echo "$as_me:44944: checking for initscr in -lpdcurses" >&5
44945 echo $ECHO_N "checking for initscr in -lpdcurses... $ECHO_C" >&6
44946 if test "${ac_cv_lib_pdcurses_initscr+set}" = set; then
44947 echo $ECHO_N "(cached) $ECHO_C" >&6
44948 else
44949 ac_check_lib_save_LIBS=$LIBS
44950 LIBS="-lpdcurses $LIBS"
44951 cat >"conftest.$ac_ext" <<_ACEOF
44952 #line 44952 "configure"
44953 #include "confdefs.h"
44954
44955 /* Override any gcc2 internal prototype to avoid an error. */
44956 #ifdef __cplusplus
44957 extern "C"
44958 #endif
44959 /* We use char because int might match the return type of a gcc2
44960 builtin and then its argument prototype would still apply. */
44961 char initscr (void);
44962 int
44963 main (void)
44964 {
44965 initscr ();
44966 ;
44967 return 0;
44968 }
44969 _ACEOF
44970 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
44971 if { (eval echo "$as_me:44971: \"$ac_link\"") >&5
44972 (eval $ac_link) 2>&5
44973 ac_status=$?
44974 echo "$as_me:44974: \$? = $ac_status" >&5
44975 (exit "$ac_status"); } &&
44976 { ac_try='test -s "conftest$ac_exeext"'
44977 { (eval echo "$as_me:44977: \"$ac_try\"") >&5
44978 (eval $ac_try) 2>&5
44979 ac_status=$?
44980 echo "$as_me:44980: \$? = $ac_status" >&5
44981 (exit "$ac_status"); }; }; then
44982 ac_cv_lib_pdcurses_initscr=yes
44983 else
44984 echo "$as_me: failed program was:" >&5
44985 cat "conftest.$ac_ext" >&5
44986 ac_cv_lib_pdcurses_initscr=no
44987 fi
44988 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
44989 LIBS=$ac_check_lib_save_LIBS
44990 fi
44991 echo "$as_me:44991: result: $ac_cv_lib_pdcurses_initscr" >&5
44992 echo "${ECHO_T}$ac_cv_lib_pdcurses_initscr" >&6
44993 if test "$ac_cv_lib_pdcurses_initscr" = yes; then
44994
44995 cf_add_libs="$LIBS"
44996 # reverse order
44997 cf_add_0lib=
44998 for cf_add_1lib in -lpdcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
44999 # filter duplicates
45000 for cf_add_1lib in $cf_add_0lib; do
45001 for cf_add_2lib in $cf_add_libs; do
45002 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45003 cf_add_1lib=
45004 break
45005 fi
45006 done
45007 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45008 done
45009 LIBS="$cf_add_libs"
45010
45011 cf_cv_term_header=no
45012 cf_cv_unctrl_header=no
45013 echo "$as_me:45013: checking for winwstr" >&5
45014 echo $ECHO_N "checking for winwstr... $ECHO_C" >&6
45015 if test "${ac_cv_func_winwstr+set}" = set; then
45016 echo $ECHO_N "(cached) $ECHO_C" >&6
45017 else
45018 cat >"conftest.$ac_ext" <<_ACEOF
45019 #line 45019 "configure"
45020 #include "confdefs.h"
45021 #define winwstr autoconf_temporary
45022 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
45023 #undef winwstr
45024
45025 #ifdef __cplusplus
45026 extern "C"
45027 #endif
45028
45029 /* We use char because int might match the return type of a gcc2
45030 builtin and then its argument prototype would still apply. */
45031 char winwstr (void);
45032
45033 int
45034 main (void)
45035 {
45036
45037 /* The GNU C library defines stubs for functions which it implements
45038 to always fail with ENOSYS. Some functions are actually named
45039 something starting with __ and the normal name is an alias. */
45040 #if defined (__stub_winwstr) || defined (__stub___winwstr)
45041 #error found stub for winwstr
45042 #endif
45043
45044 return winwstr ();
45045 ;
45046 return 0;
45047 }
45048 _ACEOF
45049 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
45050 if { (eval echo "$as_me:45050: \"$ac_link\"") >&5
45051 (eval $ac_link) 2>&5
45052 ac_status=$?
45053 echo "$as_me:45053: \$? = $ac_status" >&5
45054 (exit "$ac_status"); } &&
45055 { ac_try='test -s "conftest$ac_exeext"'
45056 { (eval echo "$as_me:45056: \"$ac_try\"") >&5
45057 (eval $ac_try) 2>&5
45058 ac_status=$?
45059 echo "$as_me:45059: \$? = $ac_status" >&5
45060 (exit "$ac_status"); }; }; then
45061 ac_cv_func_winwstr=yes
45062 else
45063 echo "$as_me: failed program was:" >&5
45064 cat "conftest.$ac_ext" >&5
45065 ac_cv_func_winwstr=no
45066 fi
45067 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
45068 fi
45069 echo "$as_me:45069: result: $ac_cv_func_winwstr" >&5
45070 echo "${ECHO_T}$ac_cv_func_winwstr" >&6
45071 if test "$ac_cv_func_winwstr" = yes; then
45072
45073 cat >>confdefs.h <<\EOF
45074 #define PDC_WIDE 1
45075 EOF
45076
45077 fi
45078
45079 echo "$as_me:45079: checking for pdcurses_dll_iname" >&5
45080 echo $ECHO_N "checking for pdcurses_dll_iname... $ECHO_C" >&6
45081 if test "${ac_cv_func_pdcurses_dll_iname+set}" = set; then
45082 echo $ECHO_N "(cached) $ECHO_C" >&6
45083 else
45084 cat >"conftest.$ac_ext" <<_ACEOF
45085 #line 45085 "configure"
45086 #include "confdefs.h"
45087 #define pdcurses_dll_iname autoconf_temporary
45088 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
45089 #undef pdcurses_dll_iname
45090
45091 #ifdef __cplusplus
45092 extern "C"
45093 #endif
45094
45095 /* We use char because int might match the return type of a gcc2
45096 builtin and then its argument prototype would still apply. */
45097 char pdcurses_dll_iname (void);
45098
45099 int
45100 main (void)
45101 {
45102
45103 /* The GNU C library defines stubs for functions which it implements
45104 to always fail with ENOSYS. Some functions are actually named
45105 something starting with __ and the normal name is an alias. */
45106 #if defined (__stub_pdcurses_dll_iname) || defined (__stub___pdcurses_dll_iname)
45107 #error found stub for pdcurses_dll_iname
45108 #endif
45109
45110 return pdcurses_dll_iname ();
45111 ;
45112 return 0;
45113 }
45114 _ACEOF
45115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
45116 if { (eval echo "$as_me:45116: \"$ac_link\"") >&5
45117 (eval $ac_link) 2>&5
45118 ac_status=$?
45119 echo "$as_me:45119: \$? = $ac_status" >&5
45120 (exit "$ac_status"); } &&
45121 { ac_try='test -s "conftest$ac_exeext"'
45122 { (eval echo "$as_me:45122: \"$ac_try\"") >&5
45123 (eval $ac_try) 2>&5
45124 ac_status=$?
45125 echo "$as_me:45125: \$? = $ac_status" >&5
45126 (exit "$ac_status"); }; }; then
45127 ac_cv_func_pdcurses_dll_iname=yes
45128 else
45129 echo "$as_me: failed program was:" >&5
45130 cat "conftest.$ac_ext" >&5
45131 ac_cv_func_pdcurses_dll_iname=no
45132 fi
45133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
45134 fi
45135 echo "$as_me:45135: result: $ac_cv_func_pdcurses_dll_iname" >&5
45136 echo "${ECHO_T}$ac_cv_func_pdcurses_dll_iname" >&6
45137 if test "$ac_cv_func_pdcurses_dll_iname" = yes; then
45138
45139 cat >>confdefs.h <<\EOF
45140 #define PDC_DLL_BUILD 1
45141 EOF
45142
45143 fi
45144
45145 fi
45146
45147 ;;
45148 (*)
45149
45150 cf_x_athena=${cf_x_athena:-Xaw}
45151
45152 echo "$as_me:45152: checking if you want to link with Xaw 3d library" >&5
45153 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
45154 withval=
45155
45156 # Check whether --with-Xaw3d or --without-Xaw3d was given.
45157 if test "${with_Xaw3d+set}" = set; then
45158 withval="$with_Xaw3d"
45159
45160 fi;
45161 if test "$withval" = yes ; then
45162 cf_x_athena=Xaw3d
45163 echo "$as_me:45163: result: yes" >&5
45164 echo "${ECHO_T}yes" >&6
45165 else
45166 echo "$as_me:45166: result: no" >&5
45167 echo "${ECHO_T}no" >&6
45168 fi
45169
45170 echo "$as_me:45170: checking if you want to link with Xaw 3d xft library" >&5
45171 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
45172 withval=
45173
45174 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
45175 if test "${with_Xaw3dxft+set}" = set; then
45176 withval="$with_Xaw3dxft"
45177
45178 fi;
45179 if test "$withval" = yes ; then
45180 cf_x_athena=Xaw3dxft
45181 echo "$as_me:45181: result: yes" >&5
45182 echo "${ECHO_T}yes" >&6
45183 else
45184 echo "$as_me:45184: result: no" >&5
45185 echo "${ECHO_T}no" >&6
45186 fi
45187
45188 echo "$as_me:45188: checking if you want to link with neXT Athena library" >&5
45189 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
45190 withval=
45191
45192 # Check whether --with-neXtaw or --without-neXtaw was given.
45193 if test "${with_neXtaw+set}" = set; then
45194 withval="$with_neXtaw"
45195
45196 fi;
45197 if test "$withval" = yes ; then
45198 cf_x_athena=neXtaw
45199 echo "$as_me:45199: result: yes" >&5
45200 echo "${ECHO_T}yes" >&6
45201 else
45202 echo "$as_me:45202: result: no" >&5
45203 echo "${ECHO_T}no" >&6
45204 fi
45205
45206 echo "$as_me:45206: checking if you want to link with Athena-Plus library" >&5
45207 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
45208 withval=
45209
45210 # Check whether --with-XawPlus or --without-XawPlus was given.
45211 if test "${with_XawPlus+set}" = set; then
45212 withval="$with_XawPlus"
45213
45214 fi;
45215 if test "$withval" = yes ; then
45216 cf_x_athena=XawPlus
45217 echo "$as_me:45217: result: yes" >&5
45218 echo "${ECHO_T}yes" >&6
45219 else
45220 echo "$as_me:45220: result: no" >&5
45221 echo "${ECHO_T}no" >&6
45222 fi
45223
45224 cf_x_athena_lib=""
45225
45226 if test "$PKG_CONFIG" != none ; then
45227 cf_athena_list=
45228 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
45229 for cf_athena_pkg in \
45230 $cf_athena_list \
45231 ${cf_x_athena} \
45232 ${cf_x_athena}-devel \
45233 lib${cf_x_athena} \
45234 lib${cf_x_athena}-devel
45235 do
45236
45237 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
45238 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
45239
45240 echo "${as_me:-configure}:45240: testing found package $cf_athena_pkg ..." 1>&5
45241
45242 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
45243 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
45244 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
45245
45246 echo "${as_me:-configure}:45246: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45247
45248 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
45249
45250 echo "${as_me:-configure}:45250: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
45251
45252 for cf_required in $cf_athena_pkg
45253 do
45254 # check for duplicates
45255 for cf_require_pkg in $REQUIRE_PKG
45256 do
45257 if test "$cf_required" = "$cf_require_pkg"
45258 then
45259 cf_required=
45260 break
45261 fi
45262 done
45263 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
45264 done
45265
45266 cf_fix_cppflags=no
45267 cf_new_cflags=
45268 cf_new_cppflags=
45269 cf_new_extra_cppflags=
45270
45271 for cf_add_cflags in $cf_pkgconfig_incs
45272 do
45273 case "$cf_fix_cppflags" in
45274 (no)
45275 case "$cf_add_cflags" in
45276 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45277 case "$cf_add_cflags" in
45278 (-D*)
45279 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45280
45281 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45282 && test -z "${cf_tst_cflags}" \
45283 && cf_fix_cppflags=yes
45284
45285 if test "$cf_fix_cppflags" = yes ; then
45286
45287 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45288 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45289
45290 continue
45291 elif test "${cf_tst_cflags}" = "\"'" ; then
45292
45293 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45294 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45295
45296 continue
45297 fi
45298 ;;
45299 esac
45300 case "$CPPFLAGS" in
45301 (*$cf_add_cflags)
45302 ;;
45303 (*)
45304 case "$cf_add_cflags" in
45305 (-D*)
45306 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45307
45308 CPPFLAGS=`echo "$CPPFLAGS" | \
45309 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
45310 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
45311
45312 ;;
45313 esac
45314
45315 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45316 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45317
45318 ;;
45319 esac
45320 ;;
45321 (*)
45322
45323 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45324 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45325
45326 ;;
45327 esac
45328 ;;
45329 (yes)
45330
45331 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45332 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45333
45334 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45335
45336 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45337 && test -z "${cf_tst_cflags}" \
45338 && cf_fix_cppflags=no
45339 ;;
45340 esac
45341 done
45342
45343 if test -n "$cf_new_cflags" ; then
45344
45345 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45346 CFLAGS="${CFLAGS}$cf_new_cflags"
45347
45348 fi
45349
45350 if test -n "$cf_new_cppflags" ; then
45351
45352 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45353 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45354
45355 fi
45356
45357 if test -n "$cf_new_extra_cppflags" ; then
45358
45359 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45360 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45361
45362 fi
45363
45364 cf_add_libs="$LIBS"
45365 # reverse order
45366 cf_add_0lib=
45367 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45368 # filter duplicates
45369 for cf_add_1lib in $cf_add_0lib; do
45370 for cf_add_2lib in $cf_add_libs; do
45371 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45372 cf_add_1lib=
45373 break
45374 fi
45375 done
45376 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45377 done
45378 LIBS="$cf_add_libs"
45379
45380 cf_x_athena_lib="$cf_pkgconfig_libs"
45381
45382 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
45383
45384 cat >>confdefs.h <<EOF
45385 #define $cf_x_athena_LIBS 1
45386 EOF
45387
45388 echo "$as_me:45388: checking for usable $cf_x_athena/Xmu package" >&5
45389 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
45390 if test "${cf_cv_xaw_compat+set}" = set; then
45391 echo $ECHO_N "(cached) $ECHO_C" >&6
45392 else
45393
45394 cat >"conftest.$ac_ext" <<_ACEOF
45395 #line 45395 "configure"
45396 #include "confdefs.h"
45397
45398 $ac_includes_default
45399 #include <X11/Xmu/CharSet.h>
45400
45401 int
45402 main (void)
45403 {
45404
45405 int check = XmuCompareISOLatin1("big", "small");
45406 (void)check;
45407
45408 ;
45409 return 0;
45410 }
45411 _ACEOF
45412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
45413 if { (eval echo "$as_me:45413: \"$ac_link\"") >&5
45414 (eval $ac_link) 2>&5
45415 ac_status=$?
45416 echo "$as_me:45416: \$? = $ac_status" >&5
45417 (exit "$ac_status"); } &&
45418 { ac_try='test -s "conftest$ac_exeext"'
45419 { (eval echo "$as_me:45419: \"$ac_try\"") >&5
45420 (eval $ac_try) 2>&5
45421 ac_status=$?
45422 echo "$as_me:45422: \$? = $ac_status" >&5
45423 (exit "$ac_status"); }; }; then
45424 cf_cv_xaw_compat=yes
45425 else
45426 echo "$as_me: failed program was:" >&5
45427 cat "conftest.$ac_ext" >&5
45428 cf_cv_xaw_compat=no
45429 fi
45430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
45431 fi
45432 echo "$as_me:45432: result: $cf_cv_xaw_compat" >&5
45433 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
45434
45435 if test "$cf_cv_xaw_compat" = no
45436 then
45437 # workaround for broken ".pc" files...
45438 case "$cf_x_athena_lib" in
45439 (*-lXmu*)
45440 ;;
45441 (*)
45442 test -n "$verbose" && echo " work around broken package" 1>&6
45443
45444 echo "${as_me:-configure}:45444: testing work around broken package ..." 1>&5
45445
45446 cf_save_xmu="$LIBS"
45447 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
45448
45449 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
45450 test -n "$verbose" && echo " found package xmu" 1>&6
45451
45452 echo "${as_me:-configure}:45452: testing found package xmu ..." 1>&5
45453
45454 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
45455 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
45456 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
45457
45458 echo "${as_me:-configure}:45458: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45459
45460 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
45461
45462 echo "${as_me:-configure}:45462: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
45463
45464 for cf_required in xmu
45465 do
45466 # check for duplicates
45467 for cf_require_pkg in $REQUIRE_PKG
45468 do
45469 if test "$cf_required" = "$cf_require_pkg"
45470 then
45471 cf_required=
45472 break
45473 fi
45474 done
45475 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
45476 done
45477
45478 cf_fix_cppflags=no
45479 cf_new_cflags=
45480 cf_new_cppflags=
45481 cf_new_extra_cppflags=
45482
45483 for cf_add_cflags in $cf_pkgconfig_incs
45484 do
45485 case "$cf_fix_cppflags" in
45486 (no)
45487 case "$cf_add_cflags" in
45488 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45489 case "$cf_add_cflags" in
45490 (-D*)
45491 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45492
45493 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45494 && test -z "${cf_tst_cflags}" \
45495 && cf_fix_cppflags=yes
45496
45497 if test "$cf_fix_cppflags" = yes ; then
45498
45499 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45500 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45501
45502 continue
45503 elif test "${cf_tst_cflags}" = "\"'" ; then
45504
45505 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45506 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45507
45508 continue
45509 fi
45510 ;;
45511 esac
45512 case "$CPPFLAGS" in
45513 (*$cf_add_cflags)
45514 ;;
45515 (*)
45516 case "$cf_add_cflags" in
45517 (-D*)
45518 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45519
45520 CPPFLAGS=`echo "$CPPFLAGS" | \
45521 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
45522 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
45523
45524 ;;
45525 esac
45526
45527 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45528 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45529
45530 ;;
45531 esac
45532 ;;
45533 (*)
45534
45535 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45536 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45537
45538 ;;
45539 esac
45540 ;;
45541 (yes)
45542
45543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45545
45546 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45547
45548 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45549 && test -z "${cf_tst_cflags}" \
45550 && cf_fix_cppflags=no
45551 ;;
45552 esac
45553 done
45554
45555 if test -n "$cf_new_cflags" ; then
45556
45557 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45558 CFLAGS="${CFLAGS}$cf_new_cflags"
45559
45560 fi
45561
45562 if test -n "$cf_new_cppflags" ; then
45563
45564 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45565 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45566
45567 fi
45568
45569 if test -n "$cf_new_extra_cppflags" ; then
45570
45571 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45572 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45573
45574 fi
45575
45576 cf_add_libs="$LIBS"
45577 # reverse order
45578 cf_add_0lib=
45579 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45580 # filter duplicates
45581 for cf_add_1lib in $cf_add_0lib; do
45582 for cf_add_2lib in $cf_add_libs; do
45583 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45584 cf_add_1lib=
45585 break
45586 fi
45587 done
45588 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45589 done
45590 LIBS="$cf_add_libs"
45591
45592 LIBS="$cf_save_xmu"
45593
45594 cf_add_libs="$LIBS"
45595 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
45596
45597 echo "${as_me:-configure}:45597: testing ...before $cf_add_libs ..." 1>&5
45598
45599 for cf_add_1lib in $cf_pkgconfig_libs; do
45600 # filter duplicates
45601 cf_found_2lib=no
45602 for cf_add_2lib in $cf_add_libs; do
45603 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45604 cf_found_2lib=yes
45605 break
45606 fi
45607 done
45608 # if not a duplicate, find the dependent library
45609 if test "$cf_found_2lib" = no
45610 then
45611 cf_found_2lib=no
45612 cf_add_2libs=
45613 for cf_add_2lib in $cf_add_libs
45614 do
45615 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
45616 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
45617 if test "x$cf_add_2lib" = "x$cf_first_lib"
45618 then
45619 cf_found_2lib=yes
45620 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
45621 fi
45622 done
45623 if test "$cf_found_2lib" = yes
45624 then
45625 cf_add_libs="$cf_add_2libs"
45626 else
45627 test -n "$verbose" && echo " ...missed $cf_first_lib" 1>&6
45628
45629 echo "${as_me:-configure}:45629: testing ...missed $cf_first_lib ..." 1>&5
45630
45631 fi
45632 fi
45633 done
45634 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
45635
45636 echo "${as_me:-configure}:45636: testing ...after $cf_add_libs ..." 1>&5
45637
45638 LIBS="$cf_add_libs"
45639
45640 else
45641 cf_pkgconfig_incs=
45642 cf_pkgconfig_libs=
45643
45644 cf_add_libs="$LIBS"
45645 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
45646
45647 echo "${as_me:-configure}:45647: testing ...before $cf_add_libs ..." 1>&5
45648
45649 for cf_add_1lib in -lXmu; do
45650 # filter duplicates
45651 cf_found_2lib=no
45652 for cf_add_2lib in $cf_add_libs; do
45653 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45654 cf_found_2lib=yes
45655 break
45656 fi
45657 done
45658 # if not a duplicate, find the dependent library
45659 if test "$cf_found_2lib" = no
45660 then
45661 cf_found_2lib=no
45662 cf_add_2libs=
45663 for cf_add_2lib in $cf_add_libs
45664 do
45665 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
45666 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
45667 if test "x$cf_add_2lib" = "x$cf_first_lib"
45668 then
45669 cf_found_2lib=yes
45670 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
45671 fi
45672 done
45673 if test "$cf_found_2lib" = yes
45674 then
45675 cf_add_libs="$cf_add_2libs"
45676 else
45677 test -n "$verbose" && echo " ...missed $cf_first_lib" 1>&6
45678
45679 echo "${as_me:-configure}:45679: testing ...missed $cf_first_lib ..." 1>&5
45680
45681 fi
45682 fi
45683 done
45684 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
45685
45686 echo "${as_me:-configure}:45686: testing ...after $cf_add_libs ..." 1>&5
45687
45688 LIBS="$cf_add_libs"
45689
45690 fi
45691
45692 ;;
45693 esac
45694 fi
45695
45696 break
45697 else
45698 cf_pkgconfig_incs=
45699 cf_pkgconfig_libs=
45700 :
45701 fi
45702
45703 done
45704 fi
45705
45706 if test -z "$cf_x_athena_lib" ; then
45707
45708 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
45709 test -n "$verbose" && echo " found package Xext" 1>&6
45710
45711 echo "${as_me:-configure}:45711: testing found package Xext ..." 1>&5
45712
45713 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
45714 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
45715 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
45716
45717 echo "${as_me:-configure}:45717: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45718
45719 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
45720
45721 echo "${as_me:-configure}:45721: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
45722
45723 for cf_required in Xext
45724 do
45725 # check for duplicates
45726 for cf_require_pkg in $REQUIRE_PKG
45727 do
45728 if test "$cf_required" = "$cf_require_pkg"
45729 then
45730 cf_required=
45731 break
45732 fi
45733 done
45734 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
45735 done
45736
45737 cf_fix_cppflags=no
45738 cf_new_cflags=
45739 cf_new_cppflags=
45740 cf_new_extra_cppflags=
45741
45742 for cf_add_cflags in $cf_pkgconfig_incs
45743 do
45744 case "$cf_fix_cppflags" in
45745 (no)
45746 case "$cf_add_cflags" in
45747 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45748 case "$cf_add_cflags" in
45749 (-D*)
45750 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45751
45752 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45753 && test -z "${cf_tst_cflags}" \
45754 && cf_fix_cppflags=yes
45755
45756 if test "$cf_fix_cppflags" = yes ; then
45757
45758 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45759 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45760
45761 continue
45762 elif test "${cf_tst_cflags}" = "\"'" ; then
45763
45764 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45765 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45766
45767 continue
45768 fi
45769 ;;
45770 esac
45771 case "$CPPFLAGS" in
45772 (*$cf_add_cflags)
45773 ;;
45774 (*)
45775 case "$cf_add_cflags" in
45776 (-D*)
45777 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45778
45779 CPPFLAGS=`echo "$CPPFLAGS" | \
45780 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
45781 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
45782
45783 ;;
45784 esac
45785
45786 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45787 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45788
45789 ;;
45790 esac
45791 ;;
45792 (*)
45793
45794 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45795 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45796
45797 ;;
45798 esac
45799 ;;
45800 (yes)
45801
45802 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45803 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45804
45805 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45806
45807 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45808 && test -z "${cf_tst_cflags}" \
45809 && cf_fix_cppflags=no
45810 ;;
45811 esac
45812 done
45813
45814 if test -n "$cf_new_cflags" ; then
45815
45816 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45817 CFLAGS="${CFLAGS}$cf_new_cflags"
45818
45819 fi
45820
45821 if test -n "$cf_new_cppflags" ; then
45822
45823 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45824 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45825
45826 fi
45827
45828 if test -n "$cf_new_extra_cppflags" ; then
45829
45830 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45831 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45832
45833 fi
45834
45835 cf_add_libs="$LIBS"
45836 # reverse order
45837 cf_add_0lib=
45838 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45839 # filter duplicates
45840 for cf_add_1lib in $cf_add_0lib; do
45841 for cf_add_2lib in $cf_add_libs; do
45842 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45843 cf_add_1lib=
45844 break
45845 fi
45846 done
45847 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45848 done
45849 LIBS="$cf_add_libs"
45850
45851 :
45852 else
45853 cf_pkgconfig_incs=
45854 cf_pkgconfig_libs=
45855
45856 echo "$as_me:45856: checking for XextCreateExtension in -lXext" >&5
45857 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
45858 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
45859 echo $ECHO_N "(cached) $ECHO_C" >&6
45860 else
45861 ac_check_lib_save_LIBS=$LIBS
45862 LIBS="-lXext $LIBS"
45863 cat >"conftest.$ac_ext" <<_ACEOF
45864 #line 45864 "configure"
45865 #include "confdefs.h"
45866
45867 /* Override any gcc2 internal prototype to avoid an error. */
45868 #ifdef __cplusplus
45869 extern "C"
45870 #endif
45871 /* We use char because int might match the return type of a gcc2
45872 builtin and then its argument prototype would still apply. */
45873 char XextCreateExtension (void);
45874 int
45875 main (void)
45876 {
45877 XextCreateExtension ();
45878 ;
45879 return 0;
45880 }
45881 _ACEOF
45882 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
45883 if { (eval echo "$as_me:45883: \"$ac_link\"") >&5
45884 (eval $ac_link) 2>&5
45885 ac_status=$?
45886 echo "$as_me:45886: \$? = $ac_status" >&5
45887 (exit "$ac_status"); } &&
45888 { ac_try='test -s "conftest$ac_exeext"'
45889 { (eval echo "$as_me:45889: \"$ac_try\"") >&5
45890 (eval $ac_try) 2>&5
45891 ac_status=$?
45892 echo "$as_me:45892: \$? = $ac_status" >&5
45893 (exit "$ac_status"); }; }; then
45894 ac_cv_lib_Xext_XextCreateExtension=yes
45895 else
45896 echo "$as_me: failed program was:" >&5
45897 cat "conftest.$ac_ext" >&5
45898 ac_cv_lib_Xext_XextCreateExtension=no
45899 fi
45900 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
45901 LIBS=$ac_check_lib_save_LIBS
45902 fi
45903 echo "$as_me:45903: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
45904 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
45905 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
45906
45907 cf_add_libs="$LIBS"
45908 # reverse order
45909 cf_add_0lib=
45910 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45911 # filter duplicates
45912 for cf_add_1lib in $cf_add_0lib; do
45913 for cf_add_2lib in $cf_add_libs; do
45914 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45915 cf_add_1lib=
45916 break
45917 fi
45918 done
45919 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45920 done
45921 LIBS="$cf_add_libs"
45922
45923 fi
45924
45925 fi
45926
45927 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
45928 # in some cases has installed dummy files in the former, other cases replaced
45929 # it with a link to the new location). This complicates the configure script.
45930 # Check for that pitfall, and recover using pkg-config
45931 #
45932 # If none of these are set, the configuration is almost certainly broken.
45933 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
45934 then
45935
45936 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
45937 test -n "$verbose" && echo " found package x11" 1>&6
45938
45939 echo "${as_me:-configure}:45939: testing found package x11 ..." 1>&5
45940
45941 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
45942 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
45943 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
45944
45945 echo "${as_me:-configure}:45945: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45946
45947 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
45948
45949 echo "${as_me:-configure}:45949: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
45950
45951 for cf_required in x11
45952 do
45953 # check for duplicates
45954 for cf_require_pkg in $REQUIRE_PKG
45955 do
45956 if test "$cf_required" = "$cf_require_pkg"
45957 then
45958 cf_required=
45959 break
45960 fi
45961 done
45962 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
45963 done
45964
45965 cf_fix_cppflags=no
45966 cf_new_cflags=
45967 cf_new_cppflags=
45968 cf_new_extra_cppflags=
45969
45970 for cf_add_cflags in $cf_pkgconfig_incs
45971 do
45972 case "$cf_fix_cppflags" in
45973 (no)
45974 case "$cf_add_cflags" in
45975 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45976 case "$cf_add_cflags" in
45977 (-D*)
45978 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45979
45980 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45981 && test -z "${cf_tst_cflags}" \
45982 && cf_fix_cppflags=yes
45983
45984 if test "$cf_fix_cppflags" = yes ; then
45985
45986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45988
45989 continue
45990 elif test "${cf_tst_cflags}" = "\"'" ; then
45991
45992 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45993 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45994
45995 continue
45996 fi
45997 ;;
45998 esac
45999 case "$CPPFLAGS" in
46000 (*$cf_add_cflags)
46001 ;;
46002 (*)
46003 case "$cf_add_cflags" in
46004 (-D*)
46005 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46006
46007 CPPFLAGS=`echo "$CPPFLAGS" | \
46008 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
46009 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
46010
46011 ;;
46012 esac
46013
46014 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46015 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46016
46017 ;;
46018 esac
46019 ;;
46020 (*)
46021
46022 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46023 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46024
46025 ;;
46026 esac
46027 ;;
46028 (yes)
46029
46030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46032
46033 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46034
46035 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46036 && test -z "${cf_tst_cflags}" \
46037 && cf_fix_cppflags=no
46038 ;;
46039 esac
46040 done
46041
46042 if test -n "$cf_new_cflags" ; then
46043
46044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46045 CFLAGS="${CFLAGS}$cf_new_cflags"
46046
46047 fi
46048
46049 if test -n "$cf_new_cppflags" ; then
46050
46051 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46052 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46053
46054 fi
46055
46056 if test -n "$cf_new_extra_cppflags" ; then
46057
46058 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46059 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46060
46061 fi
46062
46063 cf_add_libs="$LIBS"
46064 # reverse order
46065 cf_add_0lib=
46066 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46067 # filter duplicates
46068 for cf_add_1lib in $cf_add_0lib; do
46069 for cf_add_2lib in $cf_add_libs; do
46070 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46071 cf_add_1lib=
46072 break
46073 fi
46074 done
46075 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46076 done
46077 LIBS="$cf_add_libs"
46078
46079 :
46080 else
46081 cf_pkgconfig_incs=
46082 cf_pkgconfig_libs=
46083 { echo "$as_me:46083: WARNING: unable to find X11 library" >&5
46084 echo "$as_me: WARNING: unable to find X11 library" >&2;}
46085 fi
46086
46087 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
46088 test -n "$verbose" && echo " found package ice" 1>&6
46089
46090 echo "${as_me:-configure}:46090: testing found package ice ..." 1>&5
46091
46092 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
46093 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
46094 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
46095
46096 echo "${as_me:-configure}:46096: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
46097
46098 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
46099
46100 echo "${as_me:-configure}:46100: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
46101
46102 for cf_required in ice
46103 do
46104 # check for duplicates
46105 for cf_require_pkg in $REQUIRE_PKG
46106 do
46107 if test "$cf_required" = "$cf_require_pkg"
46108 then
46109 cf_required=
46110 break
46111 fi
46112 done
46113 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
46114 done
46115
46116 cf_fix_cppflags=no
46117 cf_new_cflags=
46118 cf_new_cppflags=
46119 cf_new_extra_cppflags=
46120
46121 for cf_add_cflags in $cf_pkgconfig_incs
46122 do
46123 case "$cf_fix_cppflags" in
46124 (no)
46125 case "$cf_add_cflags" in
46126 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
46127 case "$cf_add_cflags" in
46128 (-D*)
46129 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
46130
46131 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46132 && test -z "${cf_tst_cflags}" \
46133 && cf_fix_cppflags=yes
46134
46135 if test "$cf_fix_cppflags" = yes ; then
46136
46137 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46138 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46139
46140 continue
46141 elif test "${cf_tst_cflags}" = "\"'" ; then
46142
46143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46145
46146 continue
46147 fi
46148 ;;
46149 esac
46150 case "$CPPFLAGS" in
46151 (*$cf_add_cflags)
46152 ;;
46153 (*)
46154 case "$cf_add_cflags" in
46155 (-D*)
46156 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46157
46158 CPPFLAGS=`echo "$CPPFLAGS" | \
46159 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
46160 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
46161
46162 ;;
46163 esac
46164
46165 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46166 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46167
46168 ;;
46169 esac
46170 ;;
46171 (*)
46172
46173 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46174 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46175
46176 ;;
46177 esac
46178 ;;
46179 (yes)
46180
46181 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46182 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46183
46184 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46185
46186 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46187 && test -z "${cf_tst_cflags}" \
46188 && cf_fix_cppflags=no
46189 ;;
46190 esac
46191 done
46192
46193 if test -n "$cf_new_cflags" ; then
46194
46195 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46196 CFLAGS="${CFLAGS}$cf_new_cflags"
46197
46198 fi
46199
46200 if test -n "$cf_new_cppflags" ; then
46201
46202 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46203 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46204
46205 fi
46206
46207 if test -n "$cf_new_extra_cppflags" ; then
46208
46209 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46210 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46211
46212 fi
46213
46214 cf_add_libs="$LIBS"
46215 # reverse order
46216 cf_add_0lib=
46217 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46218 # filter duplicates
46219 for cf_add_1lib in $cf_add_0lib; do
46220 for cf_add_2lib in $cf_add_libs; do
46221 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46222 cf_add_1lib=
46223 break
46224 fi
46225 done
46226 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46227 done
46228 LIBS="$cf_add_libs"
46229
46230 :
46231 else
46232 cf_pkgconfig_incs=
46233 cf_pkgconfig_libs=
46234 { echo "$as_me:46234: WARNING: unable to find ICE library" >&5
46235 echo "$as_me: WARNING: unable to find ICE library" >&2;}
46236 fi
46237
46238 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
46239 test -n "$verbose" && echo " found package sm" 1>&6
46240
46241 echo "${as_me:-configure}:46241: testing found package sm ..." 1>&5
46242
46243 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
46244 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
46245 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
46246
46247 echo "${as_me:-configure}:46247: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
46248
46249 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
46250
46251 echo "${as_me:-configure}:46251: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
46252
46253 for cf_required in sm
46254 do
46255 # check for duplicates
46256 for cf_require_pkg in $REQUIRE_PKG
46257 do
46258 if test "$cf_required" = "$cf_require_pkg"
46259 then
46260 cf_required=
46261 break
46262 fi
46263 done
46264 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
46265 done
46266
46267 cf_fix_cppflags=no
46268 cf_new_cflags=
46269 cf_new_cppflags=
46270 cf_new_extra_cppflags=
46271
46272 for cf_add_cflags in $cf_pkgconfig_incs
46273 do
46274 case "$cf_fix_cppflags" in
46275 (no)
46276 case "$cf_add_cflags" in
46277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
46278 case "$cf_add_cflags" in
46279 (-D*)
46280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
46281
46282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46283 && test -z "${cf_tst_cflags}" \
46284 && cf_fix_cppflags=yes
46285
46286 if test "$cf_fix_cppflags" = yes ; then
46287
46288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46290
46291 continue
46292 elif test "${cf_tst_cflags}" = "\"'" ; then
46293
46294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46296
46297 continue
46298 fi
46299 ;;
46300 esac
46301 case "$CPPFLAGS" in
46302 (*$cf_add_cflags)
46303 ;;
46304 (*)
46305 case "$cf_add_cflags" in
46306 (-D*)
46307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46308
46309 CPPFLAGS=`echo "$CPPFLAGS" | \
46310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
46311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
46312
46313 ;;
46314 esac
46315
46316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46318
46319 ;;
46320 esac
46321 ;;
46322 (*)
46323
46324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46326
46327 ;;
46328 esac
46329 ;;
46330 (yes)
46331
46332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46334
46335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46336
46337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46338 && test -z "${cf_tst_cflags}" \
46339 && cf_fix_cppflags=no
46340 ;;
46341 esac
46342 done
46343
46344 if test -n "$cf_new_cflags" ; then
46345
46346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46347 CFLAGS="${CFLAGS}$cf_new_cflags"
46348
46349 fi
46350
46351 if test -n "$cf_new_cppflags" ; then
46352
46353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46355
46356 fi
46357
46358 if test -n "$cf_new_extra_cppflags" ; then
46359
46360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46362
46363 fi
46364
46365 cf_add_libs="$LIBS"
46366 # reverse order
46367 cf_add_0lib=
46368 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46369 # filter duplicates
46370 for cf_add_1lib in $cf_add_0lib; do
46371 for cf_add_2lib in $cf_add_libs; do
46372 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46373 cf_add_1lib=
46374 break
46375 fi
46376 done
46377 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46378 done
46379 LIBS="$cf_add_libs"
46380
46381 :
46382 else
46383 cf_pkgconfig_incs=
46384 cf_pkgconfig_libs=
46385 { echo "$as_me:46385: WARNING: unable to find SM library" >&5
46386 echo "$as_me: WARNING: unable to find SM library" >&2;}
46387 fi
46388
46389 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
46390 test -n "$verbose" && echo " found package xt" 1>&6
46391
46392 echo "${as_me:-configure}:46392: testing found package xt ..." 1>&5
46393
46394 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
46395 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
46396 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
46397
46398 echo "${as_me:-configure}:46398: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
46399
46400 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
46401
46402 echo "${as_me:-configure}:46402: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
46403
46404 for cf_required in xt
46405 do
46406 # check for duplicates
46407 for cf_require_pkg in $REQUIRE_PKG
46408 do
46409 if test "$cf_required" = "$cf_require_pkg"
46410 then
46411 cf_required=
46412 break
46413 fi
46414 done
46415 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
46416 done
46417
46418 cf_fix_cppflags=no
46419 cf_new_cflags=
46420 cf_new_cppflags=
46421 cf_new_extra_cppflags=
46422
46423 for cf_add_cflags in $cf_pkgconfig_incs
46424 do
46425 case "$cf_fix_cppflags" in
46426 (no)
46427 case "$cf_add_cflags" in
46428 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
46429 case "$cf_add_cflags" in
46430 (-D*)
46431 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
46432
46433 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46434 && test -z "${cf_tst_cflags}" \
46435 && cf_fix_cppflags=yes
46436
46437 if test "$cf_fix_cppflags" = yes ; then
46438
46439 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46440 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46441
46442 continue
46443 elif test "${cf_tst_cflags}" = "\"'" ; then
46444
46445 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46446 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46447
46448 continue
46449 fi
46450 ;;
46451 esac
46452 case "$CPPFLAGS" in
46453 (*$cf_add_cflags)
46454 ;;
46455 (*)
46456 case "$cf_add_cflags" in
46457 (-D*)
46458 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46459
46460 CPPFLAGS=`echo "$CPPFLAGS" | \
46461 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
46462 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
46463
46464 ;;
46465 esac
46466
46467 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46468 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46469
46470 ;;
46471 esac
46472 ;;
46473 (*)
46474
46475 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46476 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46477
46478 ;;
46479 esac
46480 ;;
46481 (yes)
46482
46483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46485
46486 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46487
46488 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46489 && test -z "${cf_tst_cflags}" \
46490 && cf_fix_cppflags=no
46491 ;;
46492 esac
46493 done
46494
46495 if test -n "$cf_new_cflags" ; then
46496
46497 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46498 CFLAGS="${CFLAGS}$cf_new_cflags"
46499
46500 fi
46501
46502 if test -n "$cf_new_cppflags" ; then
46503
46504 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46505 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46506
46507 fi
46508
46509 if test -n "$cf_new_extra_cppflags" ; then
46510
46511 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46512 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46513
46514 fi
46515
46516 cf_add_libs="$LIBS"
46517 # reverse order
46518 cf_add_0lib=
46519 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46520 # filter duplicates
46521 for cf_add_1lib in $cf_add_0lib; do
46522 for cf_add_2lib in $cf_add_libs; do
46523 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46524 cf_add_1lib=
46525 break
46526 fi
46527 done
46528 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46529 done
46530 LIBS="$cf_add_libs"
46531
46532 :
46533 else
46534 cf_pkgconfig_incs=
46535 cf_pkgconfig_libs=
46536 { echo "$as_me:46536: WARNING: unable to find Xt library" >&5
46537 echo "$as_me: WARNING: unable to find Xt library" >&2;}
46538 fi
46539
46540 else
46541 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
46542 fi
46543
46544 cf_have_X_LIBS=no
46545
46546 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
46547 test -n "$verbose" && echo " found package xt" 1>&6
46548
46549 echo "${as_me:-configure}:46549: testing found package xt ..." 1>&5
46550
46551 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
46552 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
46553 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
46554
46555 echo "${as_me:-configure}:46555: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
46556
46557 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
46558
46559 echo "${as_me:-configure}:46559: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
46560
46561 for cf_required in xt
46562 do
46563 # check for duplicates
46564 for cf_require_pkg in $REQUIRE_PKG
46565 do
46566 if test "$cf_required" = "$cf_require_pkg"
46567 then
46568 cf_required=
46569 break
46570 fi
46571 done
46572 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
46573 done
46574
46575 cf_fix_cppflags=no
46576 cf_new_cflags=
46577 cf_new_cppflags=
46578 cf_new_extra_cppflags=
46579
46580 for cf_add_cflags in $cf_pkgconfig_incs
46581 do
46582 case "$cf_fix_cppflags" in
46583 (no)
46584 case "$cf_add_cflags" in
46585 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
46586 case "$cf_add_cflags" in
46587 (-D*)
46588 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
46589
46590 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46591 && test -z "${cf_tst_cflags}" \
46592 && cf_fix_cppflags=yes
46593
46594 if test "$cf_fix_cppflags" = yes ; then
46595
46596 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46597 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46598
46599 continue
46600 elif test "${cf_tst_cflags}" = "\"'" ; then
46601
46602 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46603 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46604
46605 continue
46606 fi
46607 ;;
46608 esac
46609 case "$CPPFLAGS" in
46610 (*$cf_add_cflags)
46611 ;;
46612 (*)
46613 case "$cf_add_cflags" in
46614 (-D*)
46615 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46616
46617 CPPFLAGS=`echo "$CPPFLAGS" | \
46618 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
46619 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
46620
46621 ;;
46622 esac
46623
46624 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46625 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46626
46627 ;;
46628 esac
46629 ;;
46630 (*)
46631
46632 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46633 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46634
46635 ;;
46636 esac
46637 ;;
46638 (yes)
46639
46640 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46641 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46642
46643 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46644
46645 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46646 && test -z "${cf_tst_cflags}" \
46647 && cf_fix_cppflags=no
46648 ;;
46649 esac
46650 done
46651
46652 if test -n "$cf_new_cflags" ; then
46653
46654 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46655 CFLAGS="${CFLAGS}$cf_new_cflags"
46656
46657 fi
46658
46659 if test -n "$cf_new_cppflags" ; then
46660
46661 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46662 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46663
46664 fi
46665
46666 if test -n "$cf_new_extra_cppflags" ; then
46667
46668 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46669 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46670
46671 fi
46672
46673 cf_add_libs="$LIBS"
46674 # reverse order
46675 cf_add_0lib=
46676 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46677 # filter duplicates
46678 for cf_add_1lib in $cf_add_0lib; do
46679 for cf_add_2lib in $cf_add_libs; do
46680 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46681 cf_add_1lib=
46682 break
46683 fi
46684 done
46685 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46686 done
46687 LIBS="$cf_add_libs"
46688
46689 case "x$LIBS" in
46690 (*-lX11*)
46691 ;;
46692 (*)
46693 # we have an "xt" package, but it may omit Xt's dependency on X11
46694 echo "$as_me:46694: checking for usable X dependency" >&5
46695 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
46696 if test "${cf_cv_xt_x11_compat+set}" = set; then
46697 echo $ECHO_N "(cached) $ECHO_C" >&6
46698 else
46699
46700 cat >"conftest.$ac_ext" <<_ACEOF
46701 #line 46701 "configure"
46702 #include "confdefs.h"
46703
46704 $ac_includes_default
46705 #include <X11/Xlib.h>
46706
46707 int
46708 main (void)
46709 {
46710
46711 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
46712 int rc2 = XClearWindow((Display*) 0, (Window) 0);
46713 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
46714 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
46715
46716 ;
46717 return 0;
46718 }
46719 _ACEOF
46720 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46721 if { (eval echo "$as_me:46721: \"$ac_link\"") >&5
46722 (eval $ac_link) 2>&5
46723 ac_status=$?
46724 echo "$as_me:46724: \$? = $ac_status" >&5
46725 (exit "$ac_status"); } &&
46726 { ac_try='test -s "conftest$ac_exeext"'
46727 { (eval echo "$as_me:46727: \"$ac_try\"") >&5
46728 (eval $ac_try) 2>&5
46729 ac_status=$?
46730 echo "$as_me:46730: \$? = $ac_status" >&5
46731 (exit "$ac_status"); }; }; then
46732 cf_cv_xt_x11_compat=yes
46733 else
46734 echo "$as_me: failed program was:" >&5
46735 cat "conftest.$ac_ext" >&5
46736 cf_cv_xt_x11_compat=no
46737 fi
46738 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46739 fi
46740 echo "$as_me:46740: result: $cf_cv_xt_x11_compat" >&5
46741 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
46742 if test "$cf_cv_xt_x11_compat" = no
46743 then
46744 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
46745
46746 echo "${as_me:-configure}:46746: testing work around broken X11 dependency ..." 1>&5
46747
46748 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
46749
46750 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
46751 test -n "$verbose" && echo " found package x11" 1>&6
46752
46753 echo "${as_me:-configure}:46753: testing found package x11 ..." 1>&5
46754
46755 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
46756 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
46757 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
46758
46759 echo "${as_me:-configure}:46759: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
46760
46761 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
46762
46763 echo "${as_me:-configure}:46763: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
46764
46765 for cf_required in x11
46766 do
46767 # check for duplicates
46768 for cf_require_pkg in $REQUIRE_PKG
46769 do
46770 if test "$cf_required" = "$cf_require_pkg"
46771 then
46772 cf_required=
46773 break
46774 fi
46775 done
46776 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
46777 done
46778
46779 cf_fix_cppflags=no
46780 cf_new_cflags=
46781 cf_new_cppflags=
46782 cf_new_extra_cppflags=
46783
46784 for cf_add_cflags in $cf_pkgconfig_incs
46785 do
46786 case "$cf_fix_cppflags" in
46787 (no)
46788 case "$cf_add_cflags" in
46789 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
46790 case "$cf_add_cflags" in
46791 (-D*)
46792 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
46793
46794 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46795 && test -z "${cf_tst_cflags}" \
46796 && cf_fix_cppflags=yes
46797
46798 if test "$cf_fix_cppflags" = yes ; then
46799
46800 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46801 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46802
46803 continue
46804 elif test "${cf_tst_cflags}" = "\"'" ; then
46805
46806 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46807 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46808
46809 continue
46810 fi
46811 ;;
46812 esac
46813 case "$CPPFLAGS" in
46814 (*$cf_add_cflags)
46815 ;;
46816 (*)
46817 case "$cf_add_cflags" in
46818 (-D*)
46819 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46820
46821 CPPFLAGS=`echo "$CPPFLAGS" | \
46822 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
46823 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
46824
46825 ;;
46826 esac
46827
46828 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46829 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46830
46831 ;;
46832 esac
46833 ;;
46834 (*)
46835
46836 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46837 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46838
46839 ;;
46840 esac
46841 ;;
46842 (yes)
46843
46844 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46845 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46846
46847 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46848
46849 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46850 && test -z "${cf_tst_cflags}" \
46851 && cf_fix_cppflags=no
46852 ;;
46853 esac
46854 done
46855
46856 if test -n "$cf_new_cflags" ; then
46857
46858 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46859 CFLAGS="${CFLAGS}$cf_new_cflags"
46860
46861 fi
46862
46863 if test -n "$cf_new_cppflags" ; then
46864
46865 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46866 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46867
46868 fi
46869
46870 if test -n "$cf_new_extra_cppflags" ; then
46871
46872 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46873 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46874
46875 fi
46876
46877 cf_add_libs="$LIBS"
46878 # reverse order
46879 cf_add_0lib=
46880 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46881 # filter duplicates
46882 for cf_add_1lib in $cf_add_0lib; do
46883 for cf_add_2lib in $cf_add_libs; do
46884 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46885 cf_add_1lib=
46886 break
46887 fi
46888 done
46889 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46890 done
46891 LIBS="$cf_add_libs"
46892
46893 :
46894 else
46895 cf_pkgconfig_incs=
46896 cf_pkgconfig_libs=
46897
46898 cf_add_libs="$LIBS"
46899 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
46900
46901 echo "${as_me:-configure}:46901: testing ...before $cf_add_libs ..." 1>&5
46902
46903 for cf_add_1lib in -lX11; do
46904 # filter duplicates
46905 cf_found_2lib=no
46906 for cf_add_2lib in $cf_add_libs; do
46907 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46908 cf_found_2lib=yes
46909 break
46910 fi
46911 done
46912 # if not a duplicate, find the dependent library
46913 if test "$cf_found_2lib" = no
46914 then
46915 cf_found_2lib=no
46916 cf_add_2libs=
46917 for cf_add_2lib in $cf_add_libs
46918 do
46919 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
46920 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
46921 if test "x$cf_add_2lib" = "x-lXt"
46922 then
46923 cf_found_2lib=yes
46924 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
46925 fi
46926 done
46927 if test "$cf_found_2lib" = yes
46928 then
46929 cf_add_libs="$cf_add_2libs"
46930 else
46931 test -n "$verbose" && echo " ...missed -lXt" 1>&6
46932
46933 echo "${as_me:-configure}:46933: testing ...missed -lXt ..." 1>&5
46934
46935 fi
46936 fi
46937 done
46938 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
46939
46940 echo "${as_me:-configure}:46940: testing ...after $cf_add_libs ..." 1>&5
46941
46942 LIBS="$cf_add_libs"
46943
46944 fi
46945
46946 fi
46947 ;;
46948 esac
46949
46950 echo "$as_me:46950: checking for usable X Toolkit package" >&5
46951 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
46952 if test "${cf_cv_xt_ice_compat+set}" = set; then
46953 echo $ECHO_N "(cached) $ECHO_C" >&6
46954 else
46955
46956 cat >"conftest.$ac_ext" <<_ACEOF
46957 #line 46957 "configure"
46958 #include "confdefs.h"
46959
46960 $ac_includes_default
46961 #include <X11/Shell.h>
46962
46963 int
46964 main (void)
46965 {
46966 int num = IceConnectionNumber(NULL); (void) num
46967
46968 ;
46969 return 0;
46970 }
46971 _ACEOF
46972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46973 if { (eval echo "$as_me:46973: \"$ac_link\"") >&5
46974 (eval $ac_link) 2>&5
46975 ac_status=$?
46976 echo "$as_me:46976: \$? = $ac_status" >&5
46977 (exit "$ac_status"); } &&
46978 { ac_try='test -s "conftest$ac_exeext"'
46979 { (eval echo "$as_me:46979: \"$ac_try\"") >&5
46980 (eval $ac_try) 2>&5
46981 ac_status=$?
46982 echo "$as_me:46982: \$? = $ac_status" >&5
46983 (exit "$ac_status"); }; }; then
46984 cf_cv_xt_ice_compat=yes
46985 else
46986 echo "$as_me: failed program was:" >&5
46987 cat "conftest.$ac_ext" >&5
46988 cf_cv_xt_ice_compat=no
46989 fi
46990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46991 fi
46992 echo "$as_me:46992: result: $cf_cv_xt_ice_compat" >&5
46993 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
46994
46995 if test "$cf_cv_xt_ice_compat" = no
46996 then
46997 # workaround for broken ".pc" files used for X Toolkit.
46998 case "x$X_PRE_LIBS" in
46999 (*-lICE*)
47000 case "x$LIBS" in
47001 (*-lICE*)
47002 ;;
47003 (*)
47004 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
47005
47006 echo "${as_me:-configure}:47006: testing work around broken ICE dependency ..." 1>&5
47007
47008 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
47009 test -n "$verbose" && echo " found package ice" 1>&6
47010
47011 echo "${as_me:-configure}:47011: testing found package ice ..." 1>&5
47012
47013 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
47014 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
47015 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
47016
47017 echo "${as_me:-configure}:47017: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
47018
47019 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
47020
47021 echo "${as_me:-configure}:47021: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
47022
47023 for cf_required in ice
47024 do
47025 # check for duplicates
47026 for cf_require_pkg in $REQUIRE_PKG
47027 do
47028 if test "$cf_required" = "$cf_require_pkg"
47029 then
47030 cf_required=
47031 break
47032 fi
47033 done
47034 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
47035 done
47036
47037 cf_fix_cppflags=no
47038 cf_new_cflags=
47039 cf_new_cppflags=
47040 cf_new_extra_cppflags=
47041
47042 for cf_add_cflags in $cf_pkgconfig_incs
47043 do
47044 case "$cf_fix_cppflags" in
47045 (no)
47046 case "$cf_add_cflags" in
47047 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
47048 case "$cf_add_cflags" in
47049 (-D*)
47050 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
47051
47052 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47053 && test -z "${cf_tst_cflags}" \
47054 && cf_fix_cppflags=yes
47055
47056 if test "$cf_fix_cppflags" = yes ; then
47057
47058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47060
47061 continue
47062 elif test "${cf_tst_cflags}" = "\"'" ; then
47063
47064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47066
47067 continue
47068 fi
47069 ;;
47070 esac
47071 case "$CPPFLAGS" in
47072 (*$cf_add_cflags)
47073 ;;
47074 (*)
47075 case "$cf_add_cflags" in
47076 (-D*)
47077 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
47078
47079 CPPFLAGS=`echo "$CPPFLAGS" | \
47080 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
47081 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
47082
47083 ;;
47084 esac
47085
47086 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
47087 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
47088
47089 ;;
47090 esac
47091 ;;
47092 (*)
47093
47094 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
47095 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
47096
47097 ;;
47098 esac
47099 ;;
47100 (yes)
47101
47102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47104
47105 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
47106
47107 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47108 && test -z "${cf_tst_cflags}" \
47109 && cf_fix_cppflags=no
47110 ;;
47111 esac
47112 done
47113
47114 if test -n "$cf_new_cflags" ; then
47115
47116 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
47117 CFLAGS="${CFLAGS}$cf_new_cflags"
47118
47119 fi
47120
47121 if test -n "$cf_new_cppflags" ; then
47122
47123 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
47124 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
47125
47126 fi
47127
47128 if test -n "$cf_new_extra_cppflags" ; then
47129
47130 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
47131 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
47132
47133 fi
47134
47135 cf_add_libs="$LIBS"
47136 # reverse order
47137 cf_add_0lib=
47138 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
47139 # filter duplicates
47140 for cf_add_1lib in $cf_add_0lib; do
47141 for cf_add_2lib in $cf_add_libs; do
47142 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47143 cf_add_1lib=
47144 break
47145 fi
47146 done
47147 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
47148 done
47149 LIBS="$cf_add_libs"
47150
47151 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
47152 test -n "$verbose" && echo " found package sm" 1>&6
47153
47154 echo "${as_me:-configure}:47154: testing found package sm ..." 1>&5
47155
47156 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
47157 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
47158 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
47159
47160 echo "${as_me:-configure}:47160: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
47161
47162 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
47163
47164 echo "${as_me:-configure}:47164: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
47165
47166 for cf_required in sm
47167 do
47168 # check for duplicates
47169 for cf_require_pkg in $REQUIRE_PKG
47170 do
47171 if test "$cf_required" = "$cf_require_pkg"
47172 then
47173 cf_required=
47174 break
47175 fi
47176 done
47177 test -n "$cf_required" && REQUIRE_PKG="$REQUIRE_PKG $cf_required"
47178 done
47179
47180 cf_fix_cppflags=no
47181 cf_new_cflags=
47182 cf_new_cppflags=
47183 cf_new_extra_cppflags=
47184
47185 for cf_add_cflags in $cf_pkgconfig_incs
47186 do
47187 case "$cf_fix_cppflags" in
47188 (no)
47189 case "$cf_add_cflags" in
47190 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
47191 case "$cf_add_cflags" in
47192 (-D*)
47193 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
47194
47195 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47196 && test -z "${cf_tst_cflags}" \
47197 && cf_fix_cppflags=yes
47198
47199 if test "$cf_fix_cppflags" = yes ; then
47200
47201 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47202 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47203
47204 continue
47205 elif test "${cf_tst_cflags}" = "\"'" ; then
47206
47207 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47208 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47209
47210 continue
47211 fi
47212 ;;
47213 esac
47214 case "$CPPFLAGS" in
47215 (*$cf_add_cflags)
47216 ;;
47217 (*)
47218 case "$cf_add_cflags" in
47219 (-D*)
47220 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
47221
47222 CPPFLAGS=`echo "$CPPFLAGS" | \
47223 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
47224 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
47225
47226 ;;
47227 esac
47228
47229 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
47230 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
47231
47232 ;;
47233 esac
47234 ;;
47235 (*)
47236
47237 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
47238 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
47239
47240 ;;
47241 esac
47242 ;;
47243 (yes)
47244
47245 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47246 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47247
47248 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
47249
47250 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47251 && test -z "${cf_tst_cflags}" \
47252 && cf_fix_cppflags=no
47253 ;;
47254 esac
47255 done
47256
47257 if test -n "$cf_new_cflags" ; then
47258
47259 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
47260 CFLAGS="${CFLAGS}$cf_new_cflags"
47261
47262 fi
47263
47264 if test -n "$cf_new_cppflags" ; then
47265
47266 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
47267 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
47268
47269 fi
47270
47271 if test -n "$cf_new_extra_cppflags" ; then
47272
47273 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
47274 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
47275
47276 fi
47277
47278 cf_add_libs="$LIBS"
47279 # reverse order
47280 cf_add_0lib=
47281 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
47282 # filter duplicates
47283 for cf_add_1lib in $cf_add_0lib; do
47284 for cf_add_2lib in $cf_add_libs; do
47285 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47286 cf_add_1lib=
47287 break
47288 fi
47289 done
47290 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
47291 done
47292 LIBS="$cf_add_libs"
47293
47294 :
47295 else
47296 cf_pkgconfig_incs=
47297 cf_pkgconfig_libs=
47298 :
47299 fi
47300
47301 else
47302 cf_pkgconfig_incs=
47303 cf_pkgconfig_libs=
47304
47305 cf_add_libs="$LIBS"
47306 test -n "$verbose" && echo " ...before $cf_add_libs" 1>&6
47307
47308 echo "${as_me:-configure}:47308: testing ...before $cf_add_libs ..." 1>&5
47309
47310 for cf_add_1lib in $X_PRE_LIBS; do
47311 # filter duplicates
47312 cf_found_2lib=no
47313 for cf_add_2lib in $cf_add_libs; do
47314 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47315 cf_found_2lib=yes
47316 break
47317 fi
47318 done
47319 # if not a duplicate, find the dependent library
47320 if test "$cf_found_2lib" = no
47321 then
47322 cf_found_2lib=no
47323 cf_add_2libs=
47324 for cf_add_2lib in $cf_add_libs
47325 do
47326 test -n "$cf_add_2libs" && cf_add_2libs="$cf_add_2libs "
47327 cf_add_2libs="$cf_add_2libs$cf_add_2lib"
47328 if test "x$cf_add_2lib" = "x-lXt"
47329 then
47330 cf_found_2lib=yes
47331 cf_add_2libs="$cf_add_2libs $cf_add_1lib"
47332 fi
47333 done
47334 if test "$cf_found_2lib" = yes
47335 then
47336 cf_add_libs="$cf_add_2libs"
47337 else
47338 test -n "$verbose" && echo " ...missed -lXt" 1>&6
47339
47340 echo "${as_me:-configure}:47340: testing ...missed -lXt ..." 1>&5
47341
47342 fi
47343 fi
47344 done
47345 test -n "$verbose" && echo " ...after $cf_add_libs" 1>&6
47346
47347 echo "${as_me:-configure}:47347: testing ...after $cf_add_libs ..." 1>&5
47348
47349 LIBS="$cf_add_libs"
47350
47351 fi
47352
47353 ;;
47354 esac
47355 ;;
47356 esac
47357 fi
47358
47359 cf_have_X_LIBS=yes
47360
47361 else
47362 cf_pkgconfig_incs=
47363 cf_pkgconfig_libs=
47364
47365 LDFLAGS="$X_LIBS $LDFLAGS"
47366
47367 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
47368
47369 echo "${as_me:-configure}:47369: testing checking additions to CFLAGS ..." 1>&5
47370
47371 cf_check_cflags="$CFLAGS"
47372 cf_check_cppflags="$CPPFLAGS"
47373
47374 cf_fix_cppflags=no
47375 cf_new_cflags=
47376 cf_new_cppflags=
47377 cf_new_extra_cppflags=
47378
47379 for cf_add_cflags in $X_CFLAGS
47380 do
47381 case "$cf_fix_cppflags" in
47382 (no)
47383 case "$cf_add_cflags" in
47384 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
47385 case "$cf_add_cflags" in
47386 (-D*)
47387 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
47388
47389 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47390 && test -z "${cf_tst_cflags}" \
47391 && cf_fix_cppflags=yes
47392
47393 if test "$cf_fix_cppflags" = yes ; then
47394
47395 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47396 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47397
47398 continue
47399 elif test "${cf_tst_cflags}" = "\"'" ; then
47400
47401 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47402 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47403
47404 continue
47405 fi
47406 ;;
47407 esac
47408 case "$CPPFLAGS" in
47409 (*$cf_add_cflags)
47410 ;;
47411 (*)
47412 case "$cf_add_cflags" in
47413 (-D*)
47414 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
47415
47416 CPPFLAGS=`echo "$CPPFLAGS" | \
47417 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
47418 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
47419
47420 ;;
47421 esac
47422
47423 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
47424 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
47425
47426 ;;
47427 esac
47428 ;;
47429 (*)
47430
47431 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
47432 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
47433
47434 ;;
47435 esac
47436 ;;
47437 (yes)
47438
47439 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47440 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47441
47442 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
47443
47444 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47445 && test -z "${cf_tst_cflags}" \
47446 && cf_fix_cppflags=no
47447 ;;
47448 esac
47449 done
47450
47451 if test -n "$cf_new_cflags" ; then
47452 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
47453
47454 echo "${as_me:-configure}:47454: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
47455
47456 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
47457 CFLAGS="${CFLAGS}$cf_new_cflags"
47458
47459 fi
47460
47461 if test -n "$cf_new_cppflags" ; then
47462 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
47463
47464 echo "${as_me:-configure}:47464: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
47465
47466 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
47467 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
47468
47469 fi
47470
47471 if test -n "$cf_new_extra_cppflags" ; then
47472 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
47473
47474 echo "${as_me:-configure}:47474: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
47475
47476 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
47477 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
47478
47479 fi
47480
47481 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
47482 cat >"conftest.$ac_ext" <<_ACEOF
47483 #line 47483 "configure"
47484 #include "confdefs.h"
47485 #include <stdio.h>
47486 int
47487 main (void)
47488 {
47489 printf("Hello world");
47490 ;
47491 return 0;
47492 }
47493 _ACEOF
47494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47495 if { (eval echo "$as_me:47495: \"$ac_link\"") >&5
47496 (eval $ac_link) 2>&5
47497 ac_status=$?
47498 echo "$as_me:47498: \$? = $ac_status" >&5
47499 (exit "$ac_status"); } &&
47500 { ac_try='test -s "conftest$ac_exeext"'
47501 { (eval echo "$as_me:47501: \"$ac_try\"") >&5
47502 (eval $ac_try) 2>&5
47503 ac_status=$?
47504 echo "$as_me:47504: \$? = $ac_status" >&5
47505 (exit "$ac_status"); }; }; then
47506 :
47507 else
47508 echo "$as_me: failed program was:" >&5
47509 cat "conftest.$ac_ext" >&5
47510 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
47511
47512 echo "${as_me:-configure}:47512: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
47513
47514 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
47515 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
47516
47517 echo "${as_me:-configure}:47517: testing but keeping change to \$CPPFLAGS ..." 1>&5
47518
47519 fi
47520 CFLAGS="$cf_check_cflags"
47521 fi
47522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47523 fi
47524
47525 echo "$as_me:47525: checking for XOpenDisplay" >&5
47526 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
47527 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
47528 echo $ECHO_N "(cached) $ECHO_C" >&6
47529 else
47530 cat >"conftest.$ac_ext" <<_ACEOF
47531 #line 47531 "configure"
47532 #include "confdefs.h"
47533 #define XOpenDisplay autoconf_temporary
47534 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
47535 #undef XOpenDisplay
47536
47537 #ifdef __cplusplus
47538 extern "C"
47539 #endif
47540
47541 /* We use char because int might match the return type of a gcc2
47542 builtin and then its argument prototype would still apply. */
47543 char XOpenDisplay (void);
47544
47545 int
47546 main (void)
47547 {
47548
47549 /* The GNU C library defines stubs for functions which it implements
47550 to always fail with ENOSYS. Some functions are actually named
47551 something starting with __ and the normal name is an alias. */
47552 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
47553 #error found stub for XOpenDisplay
47554 #endif
47555
47556 return XOpenDisplay ();
47557 ;
47558 return 0;
47559 }
47560 _ACEOF
47561 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47562 if { (eval echo "$as_me:47562: \"$ac_link\"") >&5
47563 (eval $ac_link) 2>&5
47564 ac_status=$?
47565 echo "$as_me:47565: \$? = $ac_status" >&5
47566 (exit "$ac_status"); } &&
47567 { ac_try='test -s "conftest$ac_exeext"'
47568 { (eval echo "$as_me:47568: \"$ac_try\"") >&5
47569 (eval $ac_try) 2>&5
47570 ac_status=$?
47571 echo "$as_me:47571: \$? = $ac_status" >&5
47572 (exit "$ac_status"); }; }; then
47573 ac_cv_func_XOpenDisplay=yes
47574 else
47575 echo "$as_me: failed program was:" >&5
47576 cat "conftest.$ac_ext" >&5
47577 ac_cv_func_XOpenDisplay=no
47578 fi
47579 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47580 fi
47581 echo "$as_me:47581: result: $ac_cv_func_XOpenDisplay" >&5
47582 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
47583 if test "$ac_cv_func_XOpenDisplay" = yes; then
47584 :
47585 else
47586
47587 echo "$as_me:47587: checking for XOpenDisplay in -lX11" >&5
47588 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
47589 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
47590 echo $ECHO_N "(cached) $ECHO_C" >&6
47591 else
47592 ac_check_lib_save_LIBS=$LIBS
47593 LIBS="-lX11 $LIBS"
47594 cat >"conftest.$ac_ext" <<_ACEOF
47595 #line 47595 "configure"
47596 #include "confdefs.h"
47597
47598 /* Override any gcc2 internal prototype to avoid an error. */
47599 #ifdef __cplusplus
47600 extern "C"
47601 #endif
47602 /* We use char because int might match the return type of a gcc2
47603 builtin and then its argument prototype would still apply. */
47604 char XOpenDisplay (void);
47605 int
47606 main (void)
47607 {
47608 XOpenDisplay ();
47609 ;
47610 return 0;
47611 }
47612 _ACEOF
47613 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47614 if { (eval echo "$as_me:47614: \"$ac_link\"") >&5
47615 (eval $ac_link) 2>&5
47616 ac_status=$?
47617 echo "$as_me:47617: \$? = $ac_status" >&5
47618 (exit "$ac_status"); } &&
47619 { ac_try='test -s "conftest$ac_exeext"'
47620 { (eval echo "$as_me:47620: \"$ac_try\"") >&5
47621 (eval $ac_try) 2>&5
47622 ac_status=$?
47623 echo "$as_me:47623: \$? = $ac_status" >&5
47624 (exit "$ac_status"); }; }; then
47625 ac_cv_lib_X11_XOpenDisplay=yes
47626 else
47627 echo "$as_me: failed program was:" >&5
47628 cat "conftest.$ac_ext" >&5
47629 ac_cv_lib_X11_XOpenDisplay=no
47630 fi
47631 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47632 LIBS=$ac_check_lib_save_LIBS
47633 fi
47634 echo "$as_me:47634: result: $ac_cv_lib_X11_XOpenDisplay" >&5
47635 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
47636 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
47637
47638 cf_add_libs="$LIBS"
47639 # reverse order
47640 cf_add_0lib=
47641 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
47642 # filter duplicates
47643 for cf_add_1lib in $cf_add_0lib; do
47644 for cf_add_2lib in $cf_add_libs; do
47645 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47646 cf_add_1lib=
47647 break
47648 fi
47649 done
47650 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
47651 done
47652 LIBS="$cf_add_libs"
47653
47654 fi
47655
47656 fi
47657
47658 echo "$as_me:47658: checking for XtAppInitialize" >&5
47659 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
47660 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
47661 echo $ECHO_N "(cached) $ECHO_C" >&6
47662 else
47663 cat >"conftest.$ac_ext" <<_ACEOF
47664 #line 47664 "configure"
47665 #include "confdefs.h"
47666 #define XtAppInitialize autoconf_temporary
47667 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
47668 #undef XtAppInitialize
47669
47670 #ifdef __cplusplus
47671 extern "C"
47672 #endif
47673
47674 /* We use char because int might match the return type of a gcc2
47675 builtin and then its argument prototype would still apply. */
47676 char XtAppInitialize (void);
47677
47678 int
47679 main (void)
47680 {
47681
47682 /* The GNU C library defines stubs for functions which it implements
47683 to always fail with ENOSYS. Some functions are actually named
47684 something starting with __ and the normal name is an alias. */
47685 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
47686 #error found stub for XtAppInitialize
47687 #endif
47688
47689 return XtAppInitialize ();
47690 ;
47691 return 0;
47692 }
47693 _ACEOF
47694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47695 if { (eval echo "$as_me:47695: \"$ac_link\"") >&5
47696 (eval $ac_link) 2>&5
47697 ac_status=$?
47698 echo "$as_me:47698: \$? = $ac_status" >&5
47699 (exit "$ac_status"); } &&
47700 { ac_try='test -s "conftest$ac_exeext"'
47701 { (eval echo "$as_me:47701: \"$ac_try\"") >&5
47702 (eval $ac_try) 2>&5
47703 ac_status=$?
47704 echo "$as_me:47704: \$? = $ac_status" >&5
47705 (exit "$ac_status"); }; }; then
47706 ac_cv_func_XtAppInitialize=yes
47707 else
47708 echo "$as_me: failed program was:" >&5
47709 cat "conftest.$ac_ext" >&5
47710 ac_cv_func_XtAppInitialize=no
47711 fi
47712 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47713 fi
47714 echo "$as_me:47714: result: $ac_cv_func_XtAppInitialize" >&5
47715 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
47716 if test "$ac_cv_func_XtAppInitialize" = yes; then
47717 :
47718 else
47719
47720 echo "$as_me:47720: checking for XtAppInitialize in -lXt" >&5
47721 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
47722 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
47723 echo $ECHO_N "(cached) $ECHO_C" >&6
47724 else
47725 ac_check_lib_save_LIBS=$LIBS
47726 LIBS="-lXt $LIBS"
47727 cat >"conftest.$ac_ext" <<_ACEOF
47728 #line 47728 "configure"
47729 #include "confdefs.h"
47730
47731 /* Override any gcc2 internal prototype to avoid an error. */
47732 #ifdef __cplusplus
47733 extern "C"
47734 #endif
47735 /* We use char because int might match the return type of a gcc2
47736 builtin and then its argument prototype would still apply. */
47737 char XtAppInitialize (void);
47738 int
47739 main (void)
47740 {
47741 XtAppInitialize ();
47742 ;
47743 return 0;
47744 }
47745 _ACEOF
47746 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47747 if { (eval echo "$as_me:47747: \"$ac_link\"") >&5
47748 (eval $ac_link) 2>&5
47749 ac_status=$?
47750 echo "$as_me:47750: \$? = $ac_status" >&5
47751 (exit "$ac_status"); } &&
47752 { ac_try='test -s "conftest$ac_exeext"'
47753 { (eval echo "$as_me:47753: \"$ac_try\"") >&5
47754 (eval $ac_try) 2>&5
47755 ac_status=$?
47756 echo "$as_me:47756: \$? = $ac_status" >&5
47757 (exit "$ac_status"); }; }; then
47758 ac_cv_lib_Xt_XtAppInitialize=yes
47759 else
47760 echo "$as_me: failed program was:" >&5
47761 cat "conftest.$ac_ext" >&5
47762 ac_cv_lib_Xt_XtAppInitialize=no
47763 fi
47764 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47765 LIBS=$ac_check_lib_save_LIBS
47766 fi
47767 echo "$as_me:47767: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
47768 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
47769 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
47770
47771 cat >>confdefs.h <<\EOF
47772 #define HAVE_LIBXT 1
47773 EOF
47774
47775 cf_have_X_LIBS=Xt
47776 LIBS="-lXt $LIBS"
47777 fi
47778
47779 fi
47780
47781 fi
47782
47783 if test "$cf_have_X_LIBS" = no ; then
47784 { echo "$as_me:47784: WARNING: Unable to successfully link X Toolkit library (-lXt) with
47785 test program. You will have to check and add the proper libraries by hand
47786 to makefile." >&5
47787 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
47788 test program. You will have to check and add the proper libraries by hand
47789 to makefile." >&2;}
47790 fi
47791
47792 cf_x_athena_root=$cf_x_athena
47793 cf_x_athena_inc=""
47794
47795 for cf_path in default \
47796 /usr/contrib/X11R6 \
47797 /usr/contrib/X11R5 \
47798 /usr/lib/X11R5 \
47799 /usr/local
47800 do
47801 if test -z "$cf_x_athena_inc" ; then
47802
47803 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
47804 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
47805 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
47806 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
47807 for cf_X_CFLAGS in $X_CFLAGS
47808 do
47809 case "x$cf_X_CFLAGS" in
47810 x-[IUD]*)
47811 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
47812 ;;
47813 *)
47814 CFLAGS="$CFLAGS $cf_X_CFLAGS"
47815 ;;
47816 esac
47817 done
47818
47819 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
47820 if test "$cf_path" != default ; then
47821
47822 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
47823 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
47824
47825 echo "$as_me:47825: checking for $cf_test in $cf_path" >&5
47826 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
47827 else
47828 echo "$as_me:47828: checking for $cf_test" >&5
47829 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
47830 fi
47831 cat >"conftest.$ac_ext" <<_ACEOF
47832 #line 47832 "configure"
47833 #include "confdefs.h"
47834
47835 #include <X11/Intrinsic.h>
47836 #include <$cf_test>
47837 int
47838 main (void)
47839 {
47840
47841 ;
47842 return 0;
47843 }
47844 _ACEOF
47845 rm -f "conftest.$ac_objext"
47846 if { (eval echo "$as_me:47846: \"$ac_compile\"") >&5
47847 (eval $ac_compile) 2>&5
47848 ac_status=$?
47849 echo "$as_me:47849: \$? = $ac_status" >&5
47850 (exit "$ac_status"); } &&
47851 { ac_try='test -s "conftest.$ac_objext"'
47852 { (eval echo "$as_me:47852: \"$ac_try\"") >&5
47853 (eval $ac_try) 2>&5
47854 ac_status=$?
47855 echo "$as_me:47855: \$? = $ac_status" >&5
47856 (exit "$ac_status"); }; }; then
47857 cf_result=yes
47858 else
47859 echo "$as_me: failed program was:" >&5
47860 cat "conftest.$ac_ext" >&5
47861 cf_result=no
47862 fi
47863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
47864 echo "$as_me:47864: result: $cf_result" >&5
47865 echo "${ECHO_T}$cf_result" >&6
47866
47867 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
47868 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
47869 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
47870
47871 if test "$cf_result" = yes ; then
47872 test "$cf_path" = default && cf_x_athena_inc=default
47873 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
47874 break
47875 fi
47876 fi
47877 done
47878
47879 if test -z "$cf_x_athena_inc" ; then
47880 { echo "$as_me:47880: WARNING: Unable to find Athena header files" >&5
47881 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
47882 elif test "$cf_x_athena_inc" != default ; then
47883
47884 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
47885 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
47886
47887 fi
47888
47889 cf_x_athena_root=$cf_x_athena
47890 cf_x_athena_lib=""
47891
47892 for cf_path in default \
47893 /usr/contrib/X11R6 \
47894 /usr/contrib/X11R5 \
47895 /usr/lib/X11R5 \
47896 /usr/local
47897 do
47898 for cf_lib in \
47899 ${cf_x_athena_root} \
47900 ${cf_x_athena_root}7 \
47901 ${cf_x_athena_root}6
47902 do
47903 for cf_libs in \
47904 "-l$cf_lib -lXmu" \
47905 "-l$cf_lib -lXpm -lXmu" \
47906 "-l${cf_lib}_s -lXmu_s"
47907 do
47908 test -n "$cf_x_athena_lib" && break
47909
47910 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
47911 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
47912 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
47913 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
47914 for cf_X_CFLAGS in $X_CFLAGS
47915 do
47916 case "x$cf_X_CFLAGS" in
47917 x-[IUD]*)
47918 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
47919 ;;
47920 *)
47921 CFLAGS="$CFLAGS $cf_X_CFLAGS"
47922 ;;
47923 esac
47924 done
47925
47926 cf_test=XawSimpleMenuAddGlobalActions
47927 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
47928
47929 cf_add_libs="$LIBS"
47930 # reverse order
47931 cf_add_0lib=
47932 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
47933 # filter duplicates
47934 for cf_add_1lib in $cf_add_0lib; do
47935 for cf_add_2lib in $cf_add_libs; do
47936 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47937 cf_add_1lib=
47938 break
47939 fi
47940 done
47941 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
47942 done
47943 LIBS="$cf_add_libs"
47944
47945 echo "$as_me:47945: checking for $cf_test in $cf_libs" >&5
47946 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
47947 cat >"conftest.$ac_ext" <<_ACEOF
47948 #line 47948 "configure"
47949 #include "confdefs.h"
47950
47951 $ac_includes_default
47952 #include <X11/Intrinsic.h>
47953 #include <X11/$cf_x_athena_root/SimpleMenu.h>
47954
47955 int
47956 main (void)
47957 {
47958
47959 $cf_test((XtAppContext) 0)
47960 ;
47961 return 0;
47962 }
47963 _ACEOF
47964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47965 if { (eval echo "$as_me:47965: \"$ac_link\"") >&5
47966 (eval $ac_link) 2>&5
47967 ac_status=$?
47968 echo "$as_me:47968: \$? = $ac_status" >&5
47969 (exit "$ac_status"); } &&
47970 { ac_try='test -s "conftest$ac_exeext"'
47971 { (eval echo "$as_me:47971: \"$ac_try\"") >&5
47972 (eval $ac_try) 2>&5
47973 ac_status=$?
47974 echo "$as_me:47974: \$? = $ac_status" >&5
47975 (exit "$ac_status"); }; }; then
47976 cf_result=yes
47977 else
47978 echo "$as_me: failed program was:" >&5
47979 cat "conftest.$ac_ext" >&5
47980 cf_result=no
47981 fi
47982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47983 echo "$as_me:47983: result: $cf_result" >&5
47984 echo "${ECHO_T}$cf_result" >&6
47985
47986 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
47987 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
47988 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
47989
47990 if test "$cf_result" = yes ; then
47991 cf_x_athena_lib="$cf_libs"
47992 break
47993 fi
47994 done # cf_libs
47995 test -n "$cf_x_athena_lib" && break
47996 done # cf_lib
47997 done
47998
47999 if test -z "$cf_x_athena_lib" ; then
48000 { { echo "$as_me:48000: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
48001 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
48002 { (exit 1); exit 1; }; }
48003 fi
48004
48005 cf_add_libs="$LIBS"
48006 # reverse order
48007 cf_add_0lib=
48008 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
48009 # filter duplicates
48010 for cf_add_1lib in $cf_add_0lib; do
48011 for cf_add_2lib in $cf_add_libs; do
48012 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
48013 cf_add_1lib=
48014 break
48015 fi
48016 done
48017 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
48018 done
48019 LIBS="$cf_add_libs"
48020
48021 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
48022
48023 cat >>confdefs.h <<EOF
48024 #define $cf_x_athena_LIBS 1
48025 EOF
48026
48027 fi
48028
48029 if test -n "$ac_tool_prefix"; then
48030 for ac_prog in xcurses-config
48031 do
48032 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
48033 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
48034 echo "$as_me:48034: checking for $ac_word" >&5
48035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
48036 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
48037 echo $ECHO_N "(cached) $ECHO_C" >&6
48038 else
48039 if test -n "$XCURSES_CONFIG"; then
48040 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
48041 else
48042 ac_save_IFS=$IFS; IFS=$ac_path_separator
48043 ac_dummy="$PATH"
48044 for ac_dir in $ac_dummy; do
48045 IFS=$ac_save_IFS
48046 test -z "$ac_dir" && ac_dir=.
48047 $as_executable_p "$ac_dir/$ac_word" || continue
48048 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
48049 echo "$as_me:48049: found $ac_dir/$ac_word" >&5
48050 break
48051 done
48052
48053 fi
48054 fi
48055 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
48056 if test -n "$XCURSES_CONFIG"; then
48057 echo "$as_me:48057: result: $XCURSES_CONFIG" >&5
48058 echo "${ECHO_T}$XCURSES_CONFIG" >&6
48059 else
48060 echo "$as_me:48060: result: no" >&5
48061 echo "${ECHO_T}no" >&6
48062 fi
48063
48064 test -n "$XCURSES_CONFIG" && break
48065 done
48066 fi
48067 if test -z "$XCURSES_CONFIG"; then
48068 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
48069 for ac_prog in xcurses-config
48070 do
48071 # Extract the first word of "$ac_prog", so it can be a program name with args.
48072 set dummy $ac_prog; ac_word=$2
48073 echo "$as_me:48073: checking for $ac_word" >&5
48074 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
48075 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
48076 echo $ECHO_N "(cached) $ECHO_C" >&6
48077 else
48078 if test -n "$ac_ct_XCURSES_CONFIG"; then
48079 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
48080 else
48081 ac_save_IFS=$IFS; IFS=$ac_path_separator
48082 ac_dummy="$PATH"
48083 for ac_dir in $ac_dummy; do
48084 IFS=$ac_save_IFS
48085 test -z "$ac_dir" && ac_dir=.
48086 $as_executable_p "$ac_dir/$ac_word" || continue
48087 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
48088 echo "$as_me:48088: found $ac_dir/$ac_word" >&5
48089 break
48090 done
48091
48092 fi
48093 fi
48094 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
48095 if test -n "$ac_ct_XCURSES_CONFIG"; then
48096 echo "$as_me:48096: result: $ac_ct_XCURSES_CONFIG" >&5
48097 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
48098 else
48099 echo "$as_me:48099: result: no" >&5
48100 echo "${ECHO_T}no" >&6
48101 fi
48102
48103 test -n "$ac_ct_XCURSES_CONFIG" && break
48104 done
48105 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
48106
48107 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
48108 fi
48109
48110 if test "$XCURSES_CONFIG" != none ; then
48111
48112 cf_fix_cppflags=no
48113 cf_new_cflags=
48114 cf_new_cppflags=
48115 cf_new_extra_cppflags=
48116
48117 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
48118 do
48119 case "$cf_fix_cppflags" in
48120 (no)
48121 case "$cf_add_cflags" in
48122 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
48123 case "$cf_add_cflags" in
48124 (-D*)
48125 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
48126
48127 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
48128 && test -z "${cf_tst_cflags}" \
48129 && cf_fix_cppflags=yes
48130
48131 if test "$cf_fix_cppflags" = yes ; then
48132
48133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
48134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
48135
48136 continue
48137 elif test "${cf_tst_cflags}" = "\"'" ; then
48138
48139 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
48140 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
48141
48142 continue
48143 fi
48144 ;;
48145 esac
48146 case "$CPPFLAGS" in
48147 (*$cf_add_cflags)
48148 ;;
48149 (*)
48150 case "$cf_add_cflags" in
48151 (-D*)
48152 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
48153
48154 CPPFLAGS=`echo "$CPPFLAGS" | \
48155 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
48156 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
48157
48158 ;;
48159 esac
48160
48161 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
48162 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
48163
48164 ;;
48165 esac
48166 ;;
48167 (*)
48168
48169 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
48170 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
48171
48172 ;;
48173 esac
48174 ;;
48175 (yes)
48176
48177 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
48178 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
48179
48180 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
48181
48182 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
48183 && test -z "${cf_tst_cflags}" \
48184 && cf_fix_cppflags=no
48185 ;;
48186 esac
48187 done
48188
48189 if test -n "$cf_new_cflags" ; then
48190
48191 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
48192 CFLAGS="${CFLAGS}$cf_new_cflags"
48193
48194 fi
48195
48196 if test -n "$cf_new_cppflags" ; then
48197
48198 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
48199 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
48200
48201 fi
48202
48203 if test -n "$cf_new_extra_cppflags" ; then
48204
48205 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
48206 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
48207
48208 fi
48209
48210 cf_add_libs="$LIBS"
48211 # reverse order
48212 cf_add_0lib=
48213 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
48214 # filter duplicates
48215 for cf_add_1lib in $cf_add_0lib; do
48216 for cf_add_2lib in $cf_add_libs; do
48217 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
48218 cf_add_1lib=
48219 break
48220 fi
48221 done
48222 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
48223 done
48224 LIBS="$cf_add_libs"
48225
48226 cf_cv_lib_XCurses=yes
48227
48228 else
48229
48230 LDFLAGS="$LDFLAGS $X_LIBS"
48231
48232 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
48233
48234 echo "${as_me:-configure}:48234: testing checking additions to CFLAGS ..." 1>&5
48235
48236 cf_check_cflags="$CFLAGS"
48237 cf_check_cppflags="$CPPFLAGS"
48238
48239 cf_fix_cppflags=no
48240 cf_new_cflags=
48241 cf_new_cppflags=
48242 cf_new_extra_cppflags=
48243
48244 for cf_add_cflags in $X_CFLAGS
48245 do
48246 case "$cf_fix_cppflags" in
48247 (no)
48248 case "$cf_add_cflags" in
48249 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
48250 case "$cf_add_cflags" in
48251 (-D*)
48252 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
48253
48254 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
48255 && test -z "${cf_tst_cflags}" \
48256 && cf_fix_cppflags=yes
48257
48258 if test "$cf_fix_cppflags" = yes ; then
48259
48260 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
48261 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
48262
48263 continue
48264 elif test "${cf_tst_cflags}" = "\"'" ; then
48265
48266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
48267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
48268
48269 continue
48270 fi
48271 ;;
48272 esac
48273 case "$CPPFLAGS" in
48274 (*$cf_add_cflags)
48275 ;;
48276 (*)
48277 case "$cf_add_cflags" in
48278 (-D*)
48279 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
48280
48281 CPPFLAGS=`echo "$CPPFLAGS" | \
48282 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
48283 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
48284
48285 ;;
48286 esac
48287
48288 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
48289 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
48290
48291 ;;
48292 esac
48293 ;;
48294 (*)
48295
48296 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
48297 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
48298
48299 ;;
48300 esac
48301 ;;
48302 (yes)
48303
48304 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
48305 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
48306
48307 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
48308
48309 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
48310 && test -z "${cf_tst_cflags}" \
48311 && cf_fix_cppflags=no
48312 ;;
48313 esac
48314 done
48315
48316 if test -n "$cf_new_cflags" ; then
48317 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
48318
48319 echo "${as_me:-configure}:48319: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
48320
48321 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
48322 CFLAGS="${CFLAGS}$cf_new_cflags"
48323
48324 fi
48325
48326 if test -n "$cf_new_cppflags" ; then
48327 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
48328
48329 echo "${as_me:-configure}:48329: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
48330
48331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
48332 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
48333
48334 fi
48335
48336 if test -n "$cf_new_extra_cppflags" ; then
48337 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
48338
48339 echo "${as_me:-configure}:48339: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
48340
48341 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
48342 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
48343
48344 fi
48345
48346 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
48347 cat >"conftest.$ac_ext" <<_ACEOF
48348 #line 48348 "configure"
48349 #include "confdefs.h"
48350 #include <stdio.h>
48351 int
48352 main (void)
48353 {
48354 printf("Hello world");
48355 ;
48356 return 0;
48357 }
48358 _ACEOF
48359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48360 if { (eval echo "$as_me:48360: \"$ac_link\"") >&5
48361 (eval $ac_link) 2>&5
48362 ac_status=$?
48363 echo "$as_me:48363: \$? = $ac_status" >&5
48364 (exit "$ac_status"); } &&
48365 { ac_try='test -s "conftest$ac_exeext"'
48366 { (eval echo "$as_me:48366: \"$ac_try\"") >&5
48367 (eval $ac_try) 2>&5
48368 ac_status=$?
48369 echo "$as_me:48369: \$? = $ac_status" >&5
48370 (exit "$ac_status"); }; }; then
48371 :
48372 else
48373 echo "$as_me: failed program was:" >&5
48374 cat "conftest.$ac_ext" >&5
48375 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
48376
48377 echo "${as_me:-configure}:48377: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
48378
48379 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
48380 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
48381
48382 echo "${as_me:-configure}:48382: testing but keeping change to \$CPPFLAGS ..." 1>&5
48383
48384 fi
48385 CFLAGS="$cf_check_cflags"
48386 fi
48387 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48388 fi
48389
48390 echo "$as_me:48390: checking for XOpenDisplay in -lX11" >&5
48391 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
48392 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
48393 echo $ECHO_N "(cached) $ECHO_C" >&6
48394 else
48395 ac_check_lib_save_LIBS=$LIBS
48396 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
48397 cat >"conftest.$ac_ext" <<_ACEOF
48398 #line 48398 "configure"
48399 #include "confdefs.h"
48400
48401 /* Override any gcc2 internal prototype to avoid an error. */
48402 #ifdef __cplusplus
48403 extern "C"
48404 #endif
48405 /* We use char because int might match the return type of a gcc2
48406 builtin and then its argument prototype would still apply. */
48407 char XOpenDisplay (void);
48408 int
48409 main (void)
48410 {
48411 XOpenDisplay ();
48412 ;
48413 return 0;
48414 }
48415 _ACEOF
48416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48417 if { (eval echo "$as_me:48417: \"$ac_link\"") >&5
48418 (eval $ac_link) 2>&5
48419 ac_status=$?
48420 echo "$as_me:48420: \$? = $ac_status" >&5
48421 (exit "$ac_status"); } &&
48422 { ac_try='test -s "conftest$ac_exeext"'
48423 { (eval echo "$as_me:48423: \"$ac_try\"") >&5
48424 (eval $ac_try) 2>&5
48425 ac_status=$?
48426 echo "$as_me:48426: \$? = $ac_status" >&5
48427 (exit "$ac_status"); }; }; then
48428 ac_cv_lib_X11_XOpenDisplay=yes
48429 else
48430 echo "$as_me: failed program was:" >&5
48431 cat "conftest.$ac_ext" >&5
48432 ac_cv_lib_X11_XOpenDisplay=no
48433 fi
48434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48435 LIBS=$ac_check_lib_save_LIBS
48436 fi
48437 echo "$as_me:48437: result: $ac_cv_lib_X11_XOpenDisplay" >&5
48438 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
48439 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
48440
48441 cf_add_libs="$LIBS"
48442 # reverse order
48443 cf_add_0lib=
48444 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
48445 # filter duplicates
48446 for cf_add_1lib in $cf_add_0lib; do
48447 for cf_add_2lib in $cf_add_libs; do
48448 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
48449 cf_add_1lib=
48450 break
48451 fi
48452 done
48453 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
48454 done
48455 LIBS="$cf_add_libs"
48456
48457 fi
48458
48459 echo "$as_me:48459: checking for XCurses library" >&5
48460 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
48461 if test "${cf_cv_lib_XCurses+set}" = set; then
48462 echo $ECHO_N "(cached) $ECHO_C" >&6
48463 else
48464
48465 cf_add_libs="$LIBS"
48466 # reverse order
48467 cf_add_0lib=
48468 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
48469 # filter duplicates
48470 for cf_add_1lib in $cf_add_0lib; do
48471 for cf_add_2lib in $cf_add_libs; do
48472 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
48473 cf_add_1lib=
48474 break
48475 fi
48476 done
48477 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
48478 done
48479 LIBS="$cf_add_libs"
48480
48481 cat >"conftest.$ac_ext" <<_ACEOF
48482 #line 48482 "configure"
48483 #include "confdefs.h"
48484
48485 #include <xcurses.h>
48486 char *XCursesProgramName = "test";
48487
48488 int
48489 main (void)
48490 {
48491 XCursesExit();
48492 ;
48493 return 0;
48494 }
48495 _ACEOF
48496 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48497 if { (eval echo "$as_me:48497: \"$ac_link\"") >&5
48498 (eval $ac_link) 2>&5
48499 ac_status=$?
48500 echo "$as_me:48500: \$? = $ac_status" >&5
48501 (exit "$ac_status"); } &&
48502 { ac_try='test -s "conftest$ac_exeext"'
48503 { (eval echo "$as_me:48503: \"$ac_try\"") >&5
48504 (eval $ac_try) 2>&5
48505 ac_status=$?
48506 echo "$as_me:48506: \$? = $ac_status" >&5
48507 (exit "$ac_status"); }; }; then
48508 cf_cv_lib_XCurses=yes
48509 else
48510 echo "$as_me: failed program was:" >&5
48511 cat "conftest.$ac_ext" >&5
48512 cf_cv_lib_XCurses=no
48513 fi
48514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48515
48516 fi
48517 echo "$as_me:48517: result: $cf_cv_lib_XCurses" >&5
48518 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
48519
48520 fi
48521
48522 if test "$cf_cv_lib_XCurses" = yes ; then
48523
48524 cat >>confdefs.h <<\EOF
48525 #define UNIX 1
48526 EOF
48527
48528 cat >>confdefs.h <<\EOF
48529 #define XCURSES 1
48530 EOF
48531
48532 echo "$as_me:48532: checking for xcurses.h" >&5
48533 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
48534 if test "${ac_cv_header_xcurses_h+set}" = set; then
48535 echo $ECHO_N "(cached) $ECHO_C" >&6
48536 else
48537 cat >"conftest.$ac_ext" <<_ACEOF
48538 #line 48538 "configure"
48539 #include "confdefs.h"
48540 #include <xcurses.h>
48541 _ACEOF
48542 if { (eval echo "$as_me:48542: \"$ac_cpp "conftest.$ac_ext"\"") >&5
48543 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
48544 ac_status=$?
48545 $EGREP -v '^ *\+' conftest.er1 >conftest.err
48546 rm -f conftest.er1
48547 cat conftest.err >&5
48548 echo "$as_me:48548: \$? = $ac_status" >&5
48549 (exit "$ac_status"); } >/dev/null; then
48550 if test -s conftest.err; then
48551 ac_cpp_err=$ac_c_preproc_warn_flag
48552 else
48553 ac_cpp_err=
48554 fi
48555 else
48556 ac_cpp_err=yes
48557 fi
48558 if test -z "$ac_cpp_err"; then
48559 ac_cv_header_xcurses_h=yes
48560 else
48561 echo "$as_me: failed program was:" >&5
48562 cat "conftest.$ac_ext" >&5
48563 ac_cv_header_xcurses_h=no
48564 fi
48565 rm -f conftest.err "conftest.$ac_ext"
48566 fi
48567 echo "$as_me:48567: result: $ac_cv_header_xcurses_h" >&5
48568 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
48569 if test "$ac_cv_header_xcurses_h" = yes; then
48570
48571 cat >>confdefs.h <<\EOF
48572 #define HAVE_XCURSES 1
48573 EOF
48574
48575 fi
48576
48577 else
48578 { { echo "$as_me:48578: error: Cannot link with XCurses" >&5
48579 echo "$as_me: error: Cannot link with XCurses" >&2;}
48580 { (exit 1); exit 1; }; }
48581 fi
48582
48583 ;;
48584 esac
48585 else
48586
48587 echo "$as_me:48587: checking if we can include termio.h with curses" >&5
48588 echo $ECHO_N "checking if we can include termio.h with curses... $ECHO_C" >&6
48589 if test "${cf_cv_termio_and_curses+set}" = set; then
48590 echo $ECHO_N "(cached) $ECHO_C" >&6
48591 else
48592
48593 cf_save_CFLAGS="$CPPFLAGS"
48594 CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -I${srcdir:-.} -I${srcdir:-.}/src -I${srcdir:-.}/WWW/Library/Implementation"
48595 touch lynx_cfg.h
48596 cat >"conftest.$ac_ext" <<_ACEOF
48597 #line 48597 "configure"
48598 #include "confdefs.h"
48599
48600 #include <LYCurses.h>
48601 #include <termio.h>
48602 int
48603 main (void)
48604 {
48605 putchar(0x0a)
48606 ;
48607 return 0;
48608 }
48609 _ACEOF
48610 rm -f "conftest.$ac_objext"
48611 if { (eval echo "$as_me:48611: \"$ac_compile\"") >&5
48612 (eval $ac_compile) 2>&5
48613 ac_status=$?
48614 echo "$as_me:48614: \$? = $ac_status" >&5
48615 (exit "$ac_status"); } &&
48616 { ac_try='test -s "conftest.$ac_objext"'
48617 { (eval echo "$as_me:48617: \"$ac_try\"") >&5
48618 (eval $ac_try) 2>&5
48619 ac_status=$?
48620 echo "$as_me:48620: \$? = $ac_status" >&5
48621 (exit "$ac_status"); }; }; then
48622 cf_cv_termio_and_curses=yes
48623 else
48624 echo "$as_me: failed program was:" >&5
48625 cat "conftest.$ac_ext" >&5
48626 cf_cv_termio_and_curses=no
48627 fi
48628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48629 CPPFLAGS="$cf_save_CFLAGS"
48630 rm -f lynx_cfg.h
48631
48632 fi
48633 echo "$as_me:48633: result: $cf_cv_termio_and_curses" >&5
48634 echo "${ECHO_T}$cf_cv_termio_and_curses" >&6
48635
48636 test "$cf_cv_termio_and_curses" = yes &&
48637 cat >>confdefs.h <<\EOF
48638 #define TERMIO_AND_CURSES 1
48639 EOF
48640
48641 fi
48642
48643 ### These tests must be run after establishing the curses library.
48644 if test "$cf_cv_screen" != slang ; then
48645 if test "$cf_cv_screen" != pdcurses ; then
48646
48647 for ac_header in $cf_cv_screen/term.h term.h
48648 do
48649 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
48650 echo "$as_me:48650: checking for $ac_header" >&5
48651 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
48652 if eval "test \"\${$as_ac_Header+set}\" = set"; then
48653 echo $ECHO_N "(cached) $ECHO_C" >&6
48654 else
48655 cat >"conftest.$ac_ext" <<_ACEOF
48656 #line 48656 "configure"
48657 #include "confdefs.h"
48658 #include <$ac_header>
48659 _ACEOF
48660 if { (eval echo "$as_me:48660: \"$ac_cpp "conftest.$ac_ext"\"") >&5
48661 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
48662 ac_status=$?
48663 $EGREP -v '^ *\+' conftest.er1 >conftest.err
48664 rm -f conftest.er1
48665 cat conftest.err >&5
48666 echo "$as_me:48666: \$? = $ac_status" >&5
48667 (exit "$ac_status"); } >/dev/null; then
48668 if test -s conftest.err; then
48669 ac_cpp_err=$ac_c_preproc_warn_flag
48670 else
48671 ac_cpp_err=
48672 fi
48673 else
48674 ac_cpp_err=yes
48675 fi
48676 if test -z "$ac_cpp_err"; then
48677 eval "$as_ac_Header=yes"
48678 else
48679 echo "$as_me: failed program was:" >&5
48680 cat "conftest.$ac_ext" >&5
48681 eval "$as_ac_Header=no"
48682 fi
48683 rm -f conftest.err "conftest.$ac_ext"
48684 fi
48685 echo "$as_me:48685: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
48686 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
48687 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
48688 cat >>confdefs.h <<EOF
48689 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
48690 EOF
48691
48692 fi
48693 done
48694
48695 fi
48696
48697 echo "$as_me:48697: checking if curses supports alternate-character set" >&5
48698 echo $ECHO_N "checking if curses supports alternate-character set... $ECHO_C" >&6
48699 if test "${cf_cv_alt_char_set+set}" = set; then
48700 echo $ECHO_N "(cached) $ECHO_C" >&6
48701 else
48702
48703 for mapname in acs_map _acs_map
48704 do
48705 cat >"conftest.$ac_ext" <<_ACEOF
48706 #line 48706 "configure"
48707 #include "confdefs.h"
48708
48709 #include <${cf_cv_ncurses_header:-curses.h}>
48710
48711 int
48712 main (void)
48713 {
48714 chtype x = ${mapname}['l']; ${mapname}['m'] = 0; (void)x
48715 ;
48716 return 0;
48717 }
48718 _ACEOF
48719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48720 if { (eval echo "$as_me:48720: \"$ac_link\"") >&5
48721 (eval $ac_link) 2>&5
48722 ac_status=$?
48723 echo "$as_me:48723: \$? = $ac_status" >&5
48724 (exit "$ac_status"); } &&
48725 { ac_try='test -s "conftest$ac_exeext"'
48726 { (eval echo "$as_me:48726: \"$ac_try\"") >&5
48727 (eval $ac_try) 2>&5
48728 ac_status=$?
48729 echo "$as_me:48729: \$? = $ac_status" >&5
48730 (exit "$ac_status"); }; }; then
48731 cf_cv_alt_char_set=$mapname
48732 break
48733 else
48734 echo "$as_me: failed program was:" >&5
48735 cat "conftest.$ac_ext" >&5
48736 cf_cv_alt_char_set=no
48737 fi
48738 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48739 done
48740
48741 fi
48742
48743 echo "$as_me:48743: result: $cf_cv_alt_char_set" >&5
48744 echo "${ECHO_T}$cf_cv_alt_char_set" >&6
48745 test "$cf_cv_alt_char_set" != no &&
48746 cat >>confdefs.h <<EOF
48747 #define ALT_CHAR_SET $cf_cv_alt_char_set
48748 EOF
48749
48750 echo "$as_me:48750: checking if curses supports fancy attributes" >&5
48751 echo $ECHO_N "checking if curses supports fancy attributes... $ECHO_C" >&6
48752 if test "${cf_cv_fancy_curses+set}" = set; then
48753 echo $ECHO_N "(cached) $ECHO_C" >&6
48754 else
48755
48756 cat >"conftest.$ac_ext" <<_ACEOF
48757 #line 48757 "configure"
48758 #include "confdefs.h"
48759
48760 #include <${cf_cv_ncurses_header:-curses.h}>
48761
48762 int
48763 main (void)
48764 {
48765 attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
48766 wattrset(stdscr, A_BLINK|A_DIM);
48767 attroff(A_BOLD);
48768 keypad(stdscr,TRUE);
48769
48770 ;
48771 return 0;
48772 }
48773 _ACEOF
48774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48775 if { (eval echo "$as_me:48775: \"$ac_link\"") >&5
48776 (eval $ac_link) 2>&5
48777 ac_status=$?
48778 echo "$as_me:48778: \$? = $ac_status" >&5
48779 (exit "$ac_status"); } &&
48780 { ac_try='test -s "conftest$ac_exeext"'
48781 { (eval echo "$as_me:48781: \"$ac_try\"") >&5
48782 (eval $ac_try) 2>&5
48783 ac_status=$?
48784 echo "$as_me:48784: \$? = $ac_status" >&5
48785 (exit "$ac_status"); }; }; then
48786 cf_cv_fancy_curses=yes
48787 else
48788 echo "$as_me: failed program was:" >&5
48789 cat "conftest.$ac_ext" >&5
48790 cf_cv_fancy_curses=no
48791 fi
48792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48793
48794 fi
48795
48796 echo "$as_me:48796: result: $cf_cv_fancy_curses" >&5
48797 echo "${ECHO_T}$cf_cv_fancy_curses" >&6
48798 test "$cf_cv_fancy_curses" = yes &&
48799 cat >>confdefs.h <<\EOF
48800 #define FANCY_CURSES 1
48801 EOF
48802
48803 echo "$as_me:48803: checking for function curses_version" >&5
48804 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
48805 if test "${cf_cv_func_curses_version+set}" = set; then
48806 echo $ECHO_N "(cached) $ECHO_C" >&6
48807 else
48808
48809 if test "$cross_compiling" = yes; then
48810 cf_cv_func_curses_version=unknown
48811 else
48812 cat >"conftest.$ac_ext" <<_ACEOF
48813 #line 48813 "configure"
48814 #include "confdefs.h"
48815
48816 $ac_includes_default
48817
48818 #include <${cf_cv_ncurses_header:-curses.h}>
48819
48820 int main(void)
48821 {
48822 char temp[1024];
48823 sprintf(temp, "%.999s\\n", curses_version());
48824 ${cf_cv_main_return:-return}(0);
48825 }
48826
48827 _ACEOF
48828 rm -f "conftest$ac_exeext"
48829 if { (eval echo "$as_me:48829: \"$ac_link\"") >&5
48830 (eval $ac_link) 2>&5
48831 ac_status=$?
48832 echo "$as_me:48832: \$? = $ac_status" >&5
48833 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
48834 { (eval echo "$as_me:48834: \"$ac_try\"") >&5
48835 (eval $ac_try) 2>&5
48836 ac_status=$?
48837 echo "$as_me:48837: \$? = $ac_status" >&5
48838 (exit "$ac_status"); }; }; then
48839 cf_cv_func_curses_version=yes
48840
48841 else
48842 echo "$as_me: program exited with status $ac_status" >&5
48843 echo "$as_me: failed program was:" >&5
48844 cat "conftest.$ac_ext" >&5
48845 cf_cv_func_curses_version=no
48846
48847 fi
48848 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
48849 fi
48850 rm -f core
48851 fi
48852 echo "$as_me:48852: result: $cf_cv_func_curses_version" >&5
48853 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
48854 test "$cf_cv_func_curses_version" = yes &&
48855 cat >>confdefs.h <<\EOF
48856 #define HAVE_CURSES_VERSION 1
48857 EOF
48858
48859 if test "$cf_cv_ncurses_version" != no ; then
48860 echo "$as_me:48860: checking for obsolete/broken version of ncurses" >&5
48861 echo $ECHO_N "checking for obsolete/broken version of ncurses... $ECHO_C" >&6
48862 if test "${cf_cv_ncurses_broken+set}" = set; then
48863 echo $ECHO_N "(cached) $ECHO_C" >&6
48864 else
48865
48866 cat >"conftest.$ac_ext" <<_ACEOF
48867 #line 48867 "configure"
48868 #include "confdefs.h"
48869
48870 #include <${cf_cv_ncurses_header:-curses.h}>
48871 int
48872 main (void)
48873 {
48874
48875 #if defined(NCURSES_VERSION) && defined(wgetbkgd)
48876 #error expected wgetbkgd to be defined with ncurses
48877 #else
48878 int x = 1; (void)x;
48879 #endif
48880
48881 ;
48882 return 0;
48883 }
48884 _ACEOF
48885 rm -f "conftest.$ac_objext"
48886 if { (eval echo "$as_me:48886: \"$ac_compile\"") >&5
48887 (eval $ac_compile) 2>&5
48888 ac_status=$?
48889 echo "$as_me:48889: \$? = $ac_status" >&5
48890 (exit "$ac_status"); } &&
48891 { ac_try='test -s "conftest.$ac_objext"'
48892 { (eval echo "$as_me:48892: \"$ac_try\"") >&5
48893 (eval $ac_try) 2>&5
48894 ac_status=$?
48895 echo "$as_me:48895: \$? = $ac_status" >&5
48896 (exit "$ac_status"); }; }; then
48897 cf_cv_ncurses_broken=no
48898 else
48899 echo "$as_me: failed program was:" >&5
48900 cat "conftest.$ac_ext" >&5
48901 cf_cv_ncurses_broken=yes
48902 fi
48903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48904
48905 fi
48906
48907 echo "$as_me:48907: result: $cf_cv_ncurses_broken" >&5
48908 echo "${ECHO_T}$cf_cv_ncurses_broken" >&6
48909 if test "$cf_cv_ncurses_broken" = yes ; then
48910 { echo "$as_me:48910: WARNING: hmm... you should get an up-to-date version of ncurses" >&5
48911 echo "$as_me: WARNING: hmm... you should get an up-to-date version of ncurses" >&2;}
48912
48913 cat >>confdefs.h <<\EOF
48914 #define NCURSES_BROKEN 1
48915 EOF
48916
48917 fi
48918 fi
48919
48920 echo "$as_me:48920: checking if curses supports color attributes" >&5
48921 echo $ECHO_N "checking if curses supports color attributes... $ECHO_C" >&6
48922 if test "${cf_cv_color_curses+set}" = set; then
48923 echo $ECHO_N "(cached) $ECHO_C" >&6
48924 else
48925
48926 cat >"conftest.$ac_ext" <<_ACEOF
48927 #line 48927 "configure"
48928 #include "confdefs.h"
48929
48930 #include <${cf_cv_ncurses_header:-curses.h}>
48931
48932 int
48933 main (void)
48934 {
48935
48936 chtype x = COLOR_BLUE; (void)x;
48937 has_colors();
48938 start_color();
48939 #ifndef NCURSES_BROKEN
48940 wbkgd(curscr, getbkgd(stdscr)); /* X/Open XPG4 aka SVr4 Curses */
48941 #endif
48942
48943 ;
48944 return 0;
48945 }
48946 _ACEOF
48947 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48948 if { (eval echo "$as_me:48948: \"$ac_link\"") >&5
48949 (eval $ac_link) 2>&5
48950 ac_status=$?
48951 echo "$as_me:48951: \$? = $ac_status" >&5
48952 (exit "$ac_status"); } &&
48953 { ac_try='test -s "conftest$ac_exeext"'
48954 { (eval echo "$as_me:48954: \"$ac_try\"") >&5
48955 (eval $ac_try) 2>&5
48956 ac_status=$?
48957 echo "$as_me:48957: \$? = $ac_status" >&5
48958 (exit "$ac_status"); }; }; then
48959 cf_cv_color_curses=yes
48960 else
48961 echo "$as_me: failed program was:" >&5
48962 cat "conftest.$ac_ext" >&5
48963 cf_cv_color_curses=no
48964 fi
48965 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48966
48967 fi
48968
48969 echo "$as_me:48969: result: $cf_cv_color_curses" >&5
48970 echo "${ECHO_T}$cf_cv_color_curses" >&6
48971 if test "$cf_cv_color_curses" = yes ; then
48972
48973 cat >>confdefs.h <<\EOF
48974 #define COLOR_CURSES 1
48975 EOF
48976
48977 test ".$cf_cv_ncurses_broken" != .yes &&
48978 cat >>confdefs.h <<\EOF
48979 #define HAVE_GETBKGD 1
48980 EOF
48981
48982 fi
48983
48984 for ac_header in sgtty.h \
48985 termio.h \
48986 termios.h \
48987 unistd.h \
48988 sys/ioctl.h \
48989 sys/termio.h \
48990
48991 do
48992 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
48993 echo "$as_me:48993: checking for $ac_header" >&5
48994 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
48995 if eval "test \"\${$as_ac_Header+set}\" = set"; then
48996 echo $ECHO_N "(cached) $ECHO_C" >&6
48997 else
48998 cat >"conftest.$ac_ext" <<_ACEOF
48999 #line 48999 "configure"
49000 #include "confdefs.h"
49001 #include <$ac_header>
49002 _ACEOF
49003 if { (eval echo "$as_me:49003: \"$ac_cpp "conftest.$ac_ext"\"") >&5
49004 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
49005 ac_status=$?
49006 $EGREP -v '^ *\+' conftest.er1 >conftest.err
49007 rm -f conftest.er1
49008 cat conftest.err >&5
49009 echo "$as_me:49009: \$? = $ac_status" >&5
49010 (exit "$ac_status"); } >/dev/null; then
49011 if test -s conftest.err; then
49012 ac_cpp_err=$ac_c_preproc_warn_flag
49013 else
49014 ac_cpp_err=
49015 fi
49016 else
49017 ac_cpp_err=yes
49018 fi
49019 if test -z "$ac_cpp_err"; then
49020 eval "$as_ac_Header=yes"
49021 else
49022 echo "$as_me: failed program was:" >&5
49023 cat "conftest.$ac_ext" >&5
49024 eval "$as_ac_Header=no"
49025 fi
49026 rm -f conftest.err "conftest.$ac_ext"
49027 fi
49028 echo "$as_me:49028: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
49029 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
49030 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
49031 cat >>confdefs.h <<EOF
49032 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
49033 EOF
49034
49035 fi
49036 done
49037
49038 if test "$ac_cv_header_termios_h" = yes ; then
49039 case "$CFLAGS $CPPFLAGS" in
49040 (*-D_POSIX_SOURCE*)
49041 termios_bad=dunno ;;
49042 (*) termios_bad=maybe ;;
49043 esac
49044 if test "$termios_bad" = maybe ; then
49045 echo "$as_me:49045: checking whether termios.h needs _POSIX_SOURCE" >&5
49046 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
49047 cat >"conftest.$ac_ext" <<_ACEOF
49048 #line 49048 "configure"
49049 #include "confdefs.h"
49050 #include <termios.h>
49051 int
49052 main (void)
49053 {
49054 struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
49055 ;
49056 return 0;
49057 }
49058 _ACEOF
49059 rm -f "conftest.$ac_objext"
49060 if { (eval echo "$as_me:49060: \"$ac_compile\"") >&5
49061 (eval $ac_compile) 2>&5
49062 ac_status=$?
49063 echo "$as_me:49063: \$? = $ac_status" >&5
49064 (exit "$ac_status"); } &&
49065 { ac_try='test -s "conftest.$ac_objext"'
49066 { (eval echo "$as_me:49066: \"$ac_try\"") >&5
49067 (eval $ac_try) 2>&5
49068 ac_status=$?
49069 echo "$as_me:49069: \$? = $ac_status" >&5
49070 (exit "$ac_status"); }; }; then
49071 termios_bad=no
49072 else
49073 echo "$as_me: failed program was:" >&5
49074 cat "conftest.$ac_ext" >&5
49075
49076 cat >"conftest.$ac_ext" <<_ACEOF
49077 #line 49077 "configure"
49078 #include "confdefs.h"
49079
49080 #define _POSIX_SOURCE
49081 #include <termios.h>
49082 int
49083 main (void)
49084 {
49085 struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
49086 ;
49087 return 0;
49088 }
49089 _ACEOF
49090 rm -f "conftest.$ac_objext"
49091 if { (eval echo "$as_me:49091: \"$ac_compile\"") >&5
49092 (eval $ac_compile) 2>&5
49093 ac_status=$?
49094 echo "$as_me:49094: \$? = $ac_status" >&5
49095 (exit "$ac_status"); } &&
49096 { ac_try='test -s "conftest.$ac_objext"'
49097 { (eval echo "$as_me:49097: \"$ac_try\"") >&5
49098 (eval $ac_try) 2>&5
49099 ac_status=$?
49100 echo "$as_me:49100: \$? = $ac_status" >&5
49101 (exit "$ac_status"); }; }; then
49102 termios_bad=unknown
49103 else
49104 echo "$as_me: failed program was:" >&5
49105 cat "conftest.$ac_ext" >&5
49106 termios_bad=yes
49107 cat >>confdefs.h <<\EOF
49108 #define _POSIX_SOURCE 1
49109 EOF
49110
49111 fi
49112 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49113
49114 fi
49115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49116 echo "$as_me:49116: result: $termios_bad" >&5
49117 echo "${ECHO_T}$termios_bad" >&6
49118 fi
49119 fi
49120
49121 echo "$as_me:49121: checking declaration of size-change" >&5
49122 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
49123 if test "${cf_cv_sizechange+set}" = set; then
49124 echo $ECHO_N "(cached) $ECHO_C" >&6
49125 else
49126
49127 cf_cv_sizechange=unknown
49128 cf_save_CPPFLAGS="$CPPFLAGS"
49129
49130 for cf_opts in "" "NEED_PTEM_H"
49131 do
49132
49133 CPPFLAGS="$cf_save_CPPFLAGS"
49134 if test -n "$cf_opts"
49135 then
49136
49137 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
49138 CPPFLAGS="${CPPFLAGS}-D$cf_opts"
49139
49140 fi
49141 cat >"conftest.$ac_ext" <<_ACEOF
49142 #line 49142 "configure"
49143 #include "confdefs.h"
49144 #include <sys/types.h>
49145 #ifdef HAVE_TERMIOS_H
49146 #include <termios.h>
49147 #else
49148 #ifdef HAVE_TERMIO_H
49149 #include <termio.h>
49150 #endif
49151 #endif
49152
49153 #ifdef NEED_PTEM_H
49154 /* This is a workaround for SCO: they neglected to define struct winsize in
49155 * termios.h -- it is only in termio.h and ptem.h
49156 */
49157 #include <sys/stream.h>
49158 #include <sys/ptem.h>
49159 #endif
49160
49161 #ifdef HAVE_SYS_IOCTL_H
49162 #include <sys/ioctl.h>
49163 #endif
49164
49165 int
49166 main (void)
49167 {
49168
49169 #ifdef TIOCGSIZE
49170 struct ttysize win; /* SunOS 3.0... */
49171 int y = win.ts_lines = 2;
49172 int x = win.ts_cols = 1;
49173 (void)y;
49174 (void)x;
49175 #else
49176 #ifdef TIOCGWINSZ
49177 struct winsize win; /* everything else */
49178 int y = win.ws_row = 2;
49179 int x = win.ws_col = 1;
49180 (void)y;
49181 (void)x;
49182 #else
49183 no TIOCGSIZE or TIOCGWINSZ
49184 #endif /* TIOCGWINSZ */
49185 #endif /* TIOCGSIZE */
49186
49187 ;
49188 return 0;
49189 }
49190 _ACEOF
49191 rm -f "conftest.$ac_objext"
49192 if { (eval echo "$as_me:49192: \"$ac_compile\"") >&5
49193 (eval $ac_compile) 2>&5
49194 ac_status=$?
49195 echo "$as_me:49195: \$? = $ac_status" >&5
49196 (exit "$ac_status"); } &&
49197 { ac_try='test -s "conftest.$ac_objext"'
49198 { (eval echo "$as_me:49198: \"$ac_try\"") >&5
49199 (eval $ac_try) 2>&5
49200 ac_status=$?
49201 echo "$as_me:49201: \$? = $ac_status" >&5
49202 (exit "$ac_status"); }; }; then
49203 cf_cv_sizechange=yes
49204 else
49205 echo "$as_me: failed program was:" >&5
49206 cat "conftest.$ac_ext" >&5
49207 cf_cv_sizechange=no
49208 fi
49209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49210
49211 CPPFLAGS="$cf_save_CPPFLAGS"
49212 if test "$cf_cv_sizechange" = yes ; then
49213 echo "size-change succeeded ($cf_opts)" >&5
49214 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
49215 break
49216 fi
49217 done
49218
49219 fi
49220 echo "$as_me:49220: result: $cf_cv_sizechange" >&5
49221 echo "${ECHO_T}$cf_cv_sizechange" >&6
49222 if test "$cf_cv_sizechange" != no ; then
49223
49224 cat >>confdefs.h <<\EOF
49225 #define HAVE_SIZECHANGE 1
49226 EOF
49227
49228 case "$cf_cv_sizechange" in
49229 (NEED*)
49230 cat >>confdefs.h <<EOF
49231 #define $cf_cv_sizechange 1
49232 EOF
49233
49234 ;;
49235 esac
49236 fi
49237
49238 echo "$as_me:49238: checking if ttytype is declared in curses library" >&5
49239 echo $ECHO_N "checking if ttytype is declared in curses library... $ECHO_C" >&6
49240 if test "${cf_cv_have_ttytype+set}" = set; then
49241 echo $ECHO_N "(cached) $ECHO_C" >&6
49242 else
49243
49244 cat >"conftest.$ac_ext" <<_ACEOF
49245 #line 49245 "configure"
49246 #include "confdefs.h"
49247 #include <${cf_cv_ncurses_header:-curses.h}>
49248 int
49249 main (void)
49250 {
49251 char *x = &ttytype[1]; *x = 1
49252 ;
49253 return 0;
49254 }
49255 _ACEOF
49256 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
49257 if { (eval echo "$as_me:49257: \"$ac_link\"") >&5
49258 (eval $ac_link) 2>&5
49259 ac_status=$?
49260 echo "$as_me:49260: \$? = $ac_status" >&5
49261 (exit "$ac_status"); } &&
49262 { ac_try='test -s "conftest$ac_exeext"'
49263 { (eval echo "$as_me:49263: \"$ac_try\"") >&5
49264 (eval $ac_try) 2>&5
49265 ac_status=$?
49266 echo "$as_me:49266: \$? = $ac_status" >&5
49267 (exit "$ac_status"); }; }; then
49268 cf_cv_have_ttytype=yes
49269 else
49270 echo "$as_me: failed program was:" >&5
49271 cat "conftest.$ac_ext" >&5
49272 cf_cv_have_ttytype=no
49273 fi
49274 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
49275
49276 fi
49277
49278 echo "$as_me:49278: result: $cf_cv_have_ttytype" >&5
49279 echo "${ECHO_T}$cf_cv_have_ttytype" >&6
49280 test "$cf_cv_have_ttytype" = yes &&
49281 cat >>confdefs.h <<\EOF
49282 #define HAVE_TTYTYPE 1
49283 EOF
49284
49285 if test "$use_wide_curses" = yes ; then
49286
49287 echo "$as_me:49287: checking if curses supports wide characters" >&5
49288 echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
49289 if test "${cf_cv_widec_curses+set}" = set; then
49290 echo $ECHO_N "(cached) $ECHO_C" >&6
49291 else
49292
49293 cat >"conftest.$ac_ext" <<_ACEOF
49294 #line 49294 "configure"
49295 #include "confdefs.h"
49296
49297 #include <stdlib.h>
49298 #include <${cf_cv_ncurses_header:-curses.h}>
49299 int
49300 main (void)
49301 {
49302
49303 wchar_t temp[2];
49304 wchar_t wch = 'A';
49305 temp[0] = wch;
49306 waddnwstr(stdscr, temp, 1);
49307
49308 ;
49309 return 0;
49310 }
49311 _ACEOF
49312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
49313 if { (eval echo "$as_me:49313: \"$ac_link\"") >&5
49314 (eval $ac_link) 2>&5
49315 ac_status=$?
49316 echo "$as_me:49316: \$? = $ac_status" >&5
49317 (exit "$ac_status"); } &&
49318 { ac_try='test -s "conftest$ac_exeext"'
49319 { (eval echo "$as_me:49319: \"$ac_try\"") >&5
49320 (eval $ac_try) 2>&5
49321 ac_status=$?
49322 echo "$as_me:49322: \$? = $ac_status" >&5
49323 (exit "$ac_status"); }; }; then
49324 cf_cv_widec_curses=yes
49325 else
49326 echo "$as_me: failed program was:" >&5
49327 cat "conftest.$ac_ext" >&5
49328 cf_cv_widec_curses=no
49329 fi
49330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
49331
49332 fi
49333 echo "$as_me:49333: result: $cf_cv_widec_curses" >&5
49334 echo "${ECHO_T}$cf_cv_widec_curses" >&6
49335
49336 if test "$cf_cv_widec_curses" = yes ; then
49337
49338 cat >>confdefs.h <<\EOF
49339 #define WIDEC_CURSES 1
49340 EOF
49341
49342 # This is needed on Tru64 5.0 to declare mbstate_t
49343 echo "$as_me:49343: checking if we must include wchar.h to declare mbstate_t" >&5
49344 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
49345 if test "${cf_cv_widec_mbstate+set}" = set; then
49346 echo $ECHO_N "(cached) $ECHO_C" >&6
49347 else
49348
49349 cat >"conftest.$ac_ext" <<_ACEOF
49350 #line 49350 "configure"
49351 #include "confdefs.h"
49352
49353 #include <stdlib.h>
49354 #include <${cf_cv_ncurses_header:-curses.h}>
49355 int
49356 main (void)
49357 {
49358 mbstate_t state; (void)state
49359 ;
49360 return 0;
49361 }
49362 _ACEOF
49363 rm -f "conftest.$ac_objext"
49364 if { (eval echo "$as_me:49364: \"$ac_compile\"") >&5
49365 (eval $ac_compile) 2>&5
49366 ac_status=$?
49367 echo "$as_me:49367: \$? = $ac_status" >&5
49368 (exit "$ac_status"); } &&
49369 { ac_try='test -s "conftest.$ac_objext"'
49370 { (eval echo "$as_me:49370: \"$ac_try\"") >&5
49371 (eval $ac_try) 2>&5
49372 ac_status=$?
49373 echo "$as_me:49373: \$? = $ac_status" >&5
49374 (exit "$ac_status"); }; }; then
49375 cf_cv_widec_mbstate=no
49376 else
49377 echo "$as_me: failed program was:" >&5
49378 cat "conftest.$ac_ext" >&5
49379 cat >"conftest.$ac_ext" <<_ACEOF
49380 #line 49380 "configure"
49381 #include "confdefs.h"
49382
49383 #include <stdlib.h>
49384 #include <wchar.h>
49385 #include <${cf_cv_ncurses_header:-curses.h}>
49386 int
49387 main (void)
49388 {
49389 mbstate_t state; (void)state
49390 ;
49391 return 0;
49392 }
49393 _ACEOF
49394 rm -f "conftest.$ac_objext"
49395 if { (eval echo "$as_me:49395: \"$ac_compile\"") >&5
49396 (eval $ac_compile) 2>&5
49397 ac_status=$?
49398 echo "$as_me:49398: \$? = $ac_status" >&5
49399 (exit "$ac_status"); } &&
49400 { ac_try='test -s "conftest.$ac_objext"'
49401 { (eval echo "$as_me:49401: \"$ac_try\"") >&5
49402 (eval $ac_try) 2>&5
49403 ac_status=$?
49404 echo "$as_me:49404: \$? = $ac_status" >&5
49405 (exit "$ac_status"); }; }; then
49406 cf_cv_widec_mbstate=yes
49407 else
49408 echo "$as_me: failed program was:" >&5
49409 cat "conftest.$ac_ext" >&5
49410 cf_cv_widec_mbstate=unknown
49411 fi
49412 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49413 fi
49414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49415 fi
49416 echo "$as_me:49416: result: $cf_cv_widec_mbstate" >&5
49417 echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
49418
49419 if test "$cf_cv_widec_mbstate" = yes ; then
49420
49421 cat >>confdefs.h <<\EOF
49422 #define NEED_WCHAR_H 1
49423 EOF
49424
49425 fi
49426
49427 if test "$cf_cv_widec_mbstate" != unknown ; then
49428
49429 cat >>confdefs.h <<\EOF
49430 #define HAVE_MBSTATE_T 1
49431 EOF
49432
49433 fi
49434
49435 fi
49436
49437 fi
49438
49439 echo "$as_me:49439: checking definition to turn on extended curses functions" >&5
49440 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
49441 if test "${cf_cv_need_xopen_extension+set}" = set; then
49442 echo $ECHO_N "(cached) $ECHO_C" >&6
49443 else
49444
49445 cf_cv_need_xopen_extension=unknown
49446 cat >"conftest.$ac_ext" <<_ACEOF
49447 #line 49447 "configure"
49448 #include "confdefs.h"
49449
49450 $ac_includes_default
49451 #include <${cf_cv_ncurses_header:-curses.h}>
49452 int
49453 main (void)
49454 {
49455
49456 #if defined(NCURSES_VERSION_PATCH)
49457 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
49458 #error disallow ncurses versions between 2020/04/03 and 2010/05/01
49459 #endif
49460 #endif
49461 #ifdef NCURSES_WIDECHAR
49462 #error prefer to fall-through on the second checks
49463 #endif
49464 static char dummy[10];
49465 cchar_t check;
49466 int check2 = curs_set((int)sizeof(check));
49467 long x = winnstr(stdscr, dummy, 5);
49468 int x1, y1;
49469 (void)check2;
49470 getbegyx(stdscr, y1, x1);
49471 (void)x;
49472 (void)y1;
49473 (void)x1;
49474
49475 ;
49476 return 0;
49477 }
49478 _ACEOF
49479 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
49480 if { (eval echo "$as_me:49480: \"$ac_link\"") >&5
49481 (eval $ac_link) 2>&5
49482 ac_status=$?
49483 echo "$as_me:49483: \$? = $ac_status" >&5
49484 (exit "$ac_status"); } &&
49485 { ac_try='test -s "conftest$ac_exeext"'
49486 { (eval echo "$as_me:49486: \"$ac_try\"") >&5
49487 (eval $ac_try) 2>&5
49488 ac_status=$?
49489 echo "$as_me:49489: \$? = $ac_status" >&5
49490 (exit "$ac_status"); }; }; then
49491 cf_cv_need_xopen_extension=none
49492 else
49493 echo "$as_me: failed program was:" >&5
49494 cat "conftest.$ac_ext" >&5
49495
49496 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
49497 do
49498 cat >"conftest.$ac_ext" <<_ACEOF
49499 #line 49499 "configure"
49500 #include "confdefs.h"
49501
49502 #define $cf_try_xopen_extension 1
49503 $ac_includes_default
49504 #include <${cf_cv_ncurses_header:-curses.h}>
49505 int
49506 main (void)
49507 {
49508
49509 static char dummy[10];
49510 cchar_t check;
49511 int check2 = curs_set((int)sizeof(check));
49512 long x = winnstr(stdscr, dummy, 5);
49513 int x1, y1;
49514 getbegyx(stdscr, y1, x1);
49515 (void)check2;
49516 (void)x;
49517 (void)y1;
49518 (void)x1;
49519
49520 ;
49521 return 0;
49522 }
49523 _ACEOF
49524 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
49525 if { (eval echo "$as_me:49525: \"$ac_link\"") >&5
49526 (eval $ac_link) 2>&5
49527 ac_status=$?
49528 echo "$as_me:49528: \$? = $ac_status" >&5
49529 (exit "$ac_status"); } &&
49530 { ac_try='test -s "conftest$ac_exeext"'
49531 { (eval echo "$as_me:49531: \"$ac_try\"") >&5
49532 (eval $ac_try) 2>&5
49533 ac_status=$?
49534 echo "$as_me:49534: \$? = $ac_status" >&5
49535 (exit "$ac_status"); }; }; then
49536 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
49537 else
49538 echo "$as_me: failed program was:" >&5
49539 cat "conftest.$ac_ext" >&5
49540 fi
49541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
49542 done
49543
49544 fi
49545 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
49546
49547 fi
49548 echo "$as_me:49548: result: $cf_cv_need_xopen_extension" >&5
49549 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
49550
49551 case "$cf_cv_need_xopen_extension" in
49552 (*_*)
49553
49554 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
49555 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
49556
49557 ;;
49558 esac
49559
49560 echo "$as_me:49560: checking for term.h" >&5
49561 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
49562 if test "${cf_cv_term_header+set}" = set; then
49563 echo $ECHO_N "(cached) $ECHO_C" >&6
49564 else
49565
49566 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
49567 # for <term.h> if we do not find the variant.
49568
49569 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
49570
49571 case "${cf_cv_ncurses_header:-curses.h}" in
49572 (*/*)
49573 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
49574 cf_header_list="$cf_header_item $cf_header_list"
49575 ;;
49576 esac
49577
49578 for cf_header in $cf_header_list
49579 do
49580 cat >"conftest.$ac_ext" <<_ACEOF
49581 #line 49581 "configure"
49582 #include "confdefs.h"
49583
49584 #include <${cf_cv_ncurses_header:-curses.h}>
49585 #include <${cf_header}>
49586 int
49587 main (void)
49588 {
49589 WINDOW *x; (void)x
49590 ;
49591 return 0;
49592 }
49593 _ACEOF
49594 rm -f "conftest.$ac_objext"
49595 if { (eval echo "$as_me:49595: \"$ac_compile\"") >&5
49596 (eval $ac_compile) 2>&5
49597 ac_status=$?
49598 echo "$as_me:49598: \$? = $ac_status" >&5
49599 (exit "$ac_status"); } &&
49600 { ac_try='test -s "conftest.$ac_objext"'
49601 { (eval echo "$as_me:49601: \"$ac_try\"") >&5
49602 (eval $ac_try) 2>&5
49603 ac_status=$?
49604 echo "$as_me:49604: \$? = $ac_status" >&5
49605 (exit "$ac_status"); }; }; then
49606 cf_cv_term_header=$cf_header
49607 break
49608 else
49609 echo "$as_me: failed program was:" >&5
49610 cat "conftest.$ac_ext" >&5
49611 cf_cv_term_header=no
49612 fi
49613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49614 done
49615
49616 case "$cf_cv_term_header" in
49617 (no)
49618 # If curses is ncurses, some packagers still mess it up by trying to make
49619 # us use GNU termcap. This handles the most common case.
49620 for cf_header in ncurses/term.h ncursesw/term.h
49621 do
49622 cat >"conftest.$ac_ext" <<_ACEOF
49623 #line 49623 "configure"
49624 #include "confdefs.h"
49625
49626 #include <${cf_cv_ncurses_header:-curses.h}>
49627 #ifdef NCURSES_VERSION
49628 #include <${cf_header}>
49629 #else
49630 #error expected NCURSES_VERSION to be defined
49631 #endif
49632 int
49633 main (void)
49634 {
49635 WINDOW *x; (void)x
49636 ;
49637 return 0;
49638 }
49639 _ACEOF
49640 rm -f "conftest.$ac_objext"
49641 if { (eval echo "$as_me:49641: \"$ac_compile\"") >&5
49642 (eval $ac_compile) 2>&5
49643 ac_status=$?
49644 echo "$as_me:49644: \$? = $ac_status" >&5
49645 (exit "$ac_status"); } &&
49646 { ac_try='test -s "conftest.$ac_objext"'
49647 { (eval echo "$as_me:49647: \"$ac_try\"") >&5
49648 (eval $ac_try) 2>&5
49649 ac_status=$?
49650 echo "$as_me:49650: \$? = $ac_status" >&5
49651 (exit "$ac_status"); }; }; then
49652 cf_cv_term_header=$cf_header
49653 break
49654 else
49655 echo "$as_me: failed program was:" >&5
49656 cat "conftest.$ac_ext" >&5
49657 cf_cv_term_header=no
49658 fi
49659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49660 done
49661 ;;
49662 esac
49663
49664 fi
49665 echo "$as_me:49665: result: $cf_cv_term_header" >&5
49666 echo "${ECHO_T}$cf_cv_term_header" >&6
49667
49668 case "$cf_cv_term_header" in
49669 (term.h)
49670
49671 cat >>confdefs.h <<\EOF
49672 #define HAVE_TERM_H 1
49673 EOF
49674
49675 ;;
49676 (ncurses/term.h)
49677
49678 cat >>confdefs.h <<\EOF
49679 #define HAVE_NCURSES_TERM_H 1
49680 EOF
49681
49682 ;;
49683 (ncursesw/term.h)
49684
49685 cat >>confdefs.h <<\EOF
49686 #define HAVE_NCURSESW_TERM_H 1
49687 EOF
49688
49689 ;;
49690 esac
49691
49692 echo "$as_me:49692: checking for unctrl.h" >&5
49693 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
49694 if test "${cf_cv_unctrl_header+set}" = set; then
49695 echo $ECHO_N "(cached) $ECHO_C" >&6
49696 else
49697
49698 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
49699 # for <unctrl.h> if we do not find the variant.
49700
49701 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
49702
49703 case "${cf_cv_ncurses_header:-curses.h}" in
49704 (*/*)
49705 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
49706 cf_header_list="$cf_header_item $cf_header_list"
49707 ;;
49708 esac
49709
49710 for cf_header in $cf_header_list
49711 do
49712 cat >"conftest.$ac_ext" <<_ACEOF
49713 #line 49713 "configure"
49714 #include "confdefs.h"
49715
49716 #include <${cf_cv_ncurses_header:-curses.h}>
49717 #include <${cf_header}>
49718 int
49719 main (void)
49720 {
49721 WINDOW *x; (void)x
49722 ;
49723 return 0;
49724 }
49725 _ACEOF
49726 rm -f "conftest.$ac_objext"
49727 if { (eval echo "$as_me:49727: \"$ac_compile\"") >&5
49728 (eval $ac_compile) 2>&5
49729 ac_status=$?
49730 echo "$as_me:49730: \$? = $ac_status" >&5
49731 (exit "$ac_status"); } &&
49732 { ac_try='test -s "conftest.$ac_objext"'
49733 { (eval echo "$as_me:49733: \"$ac_try\"") >&5
49734 (eval $ac_try) 2>&5
49735 ac_status=$?
49736 echo "$as_me:49736: \$? = $ac_status" >&5
49737 (exit "$ac_status"); }; }; then
49738 cf_cv_unctrl_header=$cf_header
49739 break
49740 else
49741 echo "$as_me: failed program was:" >&5
49742 cat "conftest.$ac_ext" >&5
49743 cf_cv_unctrl_header=no
49744 fi
49745 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
49746 done
49747
49748 fi
49749 echo "$as_me:49749: result: $cf_cv_unctrl_header" >&5
49750 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
49751
49752 case "$cf_cv_unctrl_header" in
49753 (no)
49754 { echo "$as_me:49754: WARNING: unctrl.h header not found" >&5
49755 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
49756 ;;
49757 esac
49758
49759 case "$cf_cv_unctrl_header" in
49760 (unctrl.h)
49761
49762 cat >>confdefs.h <<\EOF
49763 #define HAVE_UNCTRL_H 1
49764 EOF
49765
49766 ;;
49767 (ncurses/unctrl.h)
49768
49769 cat >>confdefs.h <<\EOF
49770 #define HAVE_NCURSES_UNCTRL_H 1
49771 EOF
49772
49773 ;;
49774 (ncursesw/unctrl.h)
49775
49776 cat >>confdefs.h <<\EOF
49777 #define HAVE_NCURSESW_UNCTRL_H 1
49778 EOF
49779
49780 ;;
49781 esac
49782
49783 for cf_func in \
49784 assume_default_colors \
49785 cbreak \
49786 define_key \
49787 delscreen \
49788 getattrs \
49789 getbegx \
49790 getbegy \
49791 keypad \
49792 napms \
49793 newpad \
49794 newterm \
49795 pnoutrefresh \
49796 resizeterm \
49797 touchline \
49798 touchwin \
49799 use_default_colors \
49800 use_legacy_coding \
49801 wattr_get \
49802 wborder \
49803 wredrawln \
49804 wresize \
49805
49806 do
49807
49808 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
49809
49810 echo "$as_me:49810: checking for ${cf_func}" >&5
49811 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
49812
49813 echo "${as_me:-configure}:49813: testing ${cf_func} ..." 1>&5
49814
49815 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
49816 echo $ECHO_N "(cached) $ECHO_C" >&6
49817 else
49818
49819 eval cf_result='$ac_cv_func_'$cf_func
49820 if test ".$cf_result" != ".no"; then
49821 cat >"conftest.$ac_ext" <<_ACEOF
49822 #line 49822 "configure"
49823 #include "confdefs.h"
49824
49825 #ifdef HAVE_XCURSES
49826 #include <xcurses.h>
49827 char * XCursesProgramName = "test";
49828 #else
49829 #include <${cf_cv_ncurses_header:-curses.h}>
49830 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
49831 #include <ncursesw/term.h>
49832 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
49833 #include <ncurses/term.h>
49834 #elif defined(HAVE_TERM_H)
49835 #include <term.h>
49836 #endif
49837 #endif
49838
49839 int
49840 main (void)
49841 {
49842
49843 #ifndef ${cf_func}
49844 long foo = (long)(&${cf_func});
49845 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
49846 if (foo + 1234L > 5678L)
49847 ${cf_cv_main_return:-return}(foo != 0);
49848 #endif
49849
49850 ;
49851 return 0;
49852 }
49853 _ACEOF
49854 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
49855 if { (eval echo "$as_me:49855: \"$ac_link\"") >&5
49856 (eval $ac_link) 2>&5
49857 ac_status=$?
49858 echo "$as_me:49858: \$? = $ac_status" >&5
49859 (exit "$ac_status"); } &&
49860 { ac_try='test -s "conftest$ac_exeext"'
49861 { (eval echo "$as_me:49861: \"$ac_try\"") >&5
49862 (eval $ac_try) 2>&5
49863 ac_status=$?
49864 echo "$as_me:49864: \$? = $ac_status" >&5
49865 (exit "$ac_status"); }; }; then
49866 cf_result=yes
49867 else
49868 echo "$as_me: failed program was:" >&5
49869 cat "conftest.$ac_ext" >&5
49870 cf_result=no
49871 fi
49872 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
49873 fi
49874 eval 'cf_cv_func_'$cf_func'="$cf_result"'
49875
49876 fi
49877
49878 # use the computed/retrieved cache-value:
49879 eval 'cf_result=$cf_cv_func_'$cf_func
49880 echo "$as_me:49880: result: $cf_result" >&5
49881 echo "${ECHO_T}$cf_result" >&6
49882 if test "$cf_result" != no; then
49883 cat >>confdefs.h <<EOF
49884 #define HAVE_${cf_tr_func} 1
49885 EOF
49886
49887 fi
49888 done
49889
49890 for ac_func in \
49891 curses_exit \
49892 _nc_free_and_exit \
49893 _nc_freeall \
49894
49895 do
49896 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
49897 echo "$as_me:49897: checking for $ac_func" >&5
49898 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
49899 if eval "test \"\${$as_ac_var+set}\" = set"; then
49900 echo $ECHO_N "(cached) $ECHO_C" >&6
49901 else
49902 cat >"conftest.$ac_ext" <<_ACEOF
49903 #line 49903 "configure"
49904 #include "confdefs.h"
49905 #define $ac_func autoconf_temporary
49906 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
49907 #undef $ac_func
49908
49909 #ifdef __cplusplus
49910 extern "C"
49911 #endif
49912
49913 /* We use char because int might match the return type of a gcc2
49914 builtin and then its argument prototype would still apply. */
49915 char $ac_func (void);
49916
49917 int
49918 main (void)
49919 {
49920
49921 /* The GNU C library defines stubs for functions which it implements
49922 to always fail with ENOSYS. Some functions are actually named
49923 something starting with __ and the normal name is an alias. */
49924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
49925 #error found stub for $ac_func
49926 #endif
49927
49928 return $ac_func ();
49929 ;
49930 return 0;
49931 }
49932 _ACEOF
49933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
49934 if { (eval echo "$as_me:49934: \"$ac_link\"") >&5
49935 (eval $ac_link) 2>&5
49936 ac_status=$?
49937 echo "$as_me:49937: \$? = $ac_status" >&5
49938 (exit "$ac_status"); } &&
49939 { ac_try='test -s "conftest$ac_exeext"'
49940 { (eval echo "$as_me:49940: \"$ac_try\"") >&5
49941 (eval $ac_try) 2>&5
49942 ac_status=$?
49943 echo "$as_me:49943: \$? = $ac_status" >&5
49944 (exit "$ac_status"); }; }; then
49945 eval "$as_ac_var=yes"
49946 else
49947 echo "$as_me: failed program was:" >&5
49948 cat "conftest.$ac_ext" >&5
49949 eval "$as_ac_var=no"
49950 fi
49951 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
49952 fi
49953 echo "$as_me:49953: result: `eval echo '${'"$as_ac_var"'}'`" >&5
49954 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
49955 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
49956 cat >>confdefs.h <<EOF
49957 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
49958 EOF
49959
49960 fi
49961 done
49962
49963 fi
49964
49965 if test "$use_color_style" != no ; then
49966 if test .$cf_cv_color_curses != .yes ; then
49967 { { echo "$as_me:49967: error: Configuration does not support color-styles" >&5
49968 echo "$as_me: error: Configuration does not support color-styles" >&2;}
49969 { (exit 1); exit 1; }; }
49970 fi
49971 if test "$cf_cv_screen" = slang ; then
49972 { { echo "$as_me:49972: error: Configuration does not support color-styles" >&5
49973 echo "$as_me: error: Configuration does not support color-styles" >&2;}
49974 { (exit 1); exit 1; }; }
49975 fi
49976 fi
49977
49978 if test "$use_scrollbar" != no ; then
49979 if test .$cf_cv_fancy_curses != .yes ; then
49980 { echo "$as_me:49980: WARNING: Configuration does not support ACS_xxx definitions" >&5
49981 echo "$as_me: WARNING: Configuration does not support ACS_xxx definitions" >&2;}
49982 else
49983
49984 cat >>confdefs.h <<\EOF
49985 #define USE_SCROLLBAR 1
49986 EOF
49987
49988 fi
49989 fi
49990
49991 # use rpath for libraries in unusual places
49992
49993 echo "$as_me:49993: checking if rpath-hack should be disabled" >&5
49994 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
49995
49996 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
49997 if test "${enable_rpath_hack+set}" = set; then
49998 enableval="$enable_rpath_hack"
49999 test "$enableval" != no && enableval=yes
50000 if test "$enableval" != "yes" ; then
50001 enable_rpath_hack=no
50002 else
50003 enable_rpath_hack=yes
50004 fi
50005 else
50006 enableval=yes
50007 enable_rpath_hack=yes
50008
50009 fi;
50010 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
50011 echo "$as_me:50011: result: $cf_disable_rpath_hack" >&5
50012 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
50013
50014 if test "$enable_rpath_hack" = yes ; then
50015
50016 echo "$as_me:50016: checking for updated LDFLAGS" >&5
50017 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
50018 if test -n "$LD_RPATH_OPT" ; then
50019 echo "$as_me:50019: result: maybe" >&5
50020 echo "${ECHO_T}maybe" >&6
50021
50022 for ac_prog in ldd
50023 do
50024 # Extract the first word of "$ac_prog", so it can be a program name with args.
50025 set dummy $ac_prog; ac_word=$2
50026 echo "$as_me:50026: checking for $ac_word" >&5
50027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
50028 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
50029 echo $ECHO_N "(cached) $ECHO_C" >&6
50030 else
50031 if test -n "$cf_ldd_prog"; then
50032 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
50033 else
50034 ac_save_IFS=$IFS; IFS=$ac_path_separator
50035 ac_dummy="$PATH"
50036 for ac_dir in $ac_dummy; do
50037 IFS=$ac_save_IFS
50038 test -z "$ac_dir" && ac_dir=.
50039 $as_executable_p "$ac_dir/$ac_word" || continue
50040 ac_cv_prog_cf_ldd_prog="$ac_prog"
50041 echo "$as_me:50041: found $ac_dir/$ac_word" >&5
50042 break
50043 done
50044
50045 fi
50046 fi
50047 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
50048 if test -n "$cf_ldd_prog"; then
50049 echo "$as_me:50049: result: $cf_ldd_prog" >&5
50050 echo "${ECHO_T}$cf_ldd_prog" >&6
50051 else
50052 echo "$as_me:50052: result: no" >&5
50053 echo "${ECHO_T}no" >&6
50054 fi
50055
50056 test -n "$cf_ldd_prog" && break
50057 done
50058 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
50059
50060 cf_rpath_list="/usr/lib /lib"
50061 if test "$cf_ldd_prog" != no
50062 then
50063 cf_rpath_oops=
50064
50065 cat >"conftest.$ac_ext" <<_ACEOF
50066 #line 50066 "configure"
50067 #include "confdefs.h"
50068 #include <stdio.h>
50069 int
50070 main (void)
50071 {
50072 printf("Hello");
50073 ;
50074 return 0;
50075 }
50076 _ACEOF
50077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
50078 if { (eval echo "$as_me:50078: \"$ac_link\"") >&5
50079 (eval $ac_link) 2>&5
50080 ac_status=$?
50081 echo "$as_me:50081: \$? = $ac_status" >&5
50082 (exit "$ac_status"); } &&
50083 { ac_try='test -s "conftest$ac_exeext"'
50084 { (eval echo "$as_me:50084: \"$ac_try\"") >&5
50085 (eval $ac_try) 2>&5
50086 ac_status=$?
50087 echo "$as_me:50087: \$? = $ac_status" >&5
50088 (exit "$ac_status"); }; }; then
50089 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
50090 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
50091 else
50092 echo "$as_me: failed program was:" >&5
50093 cat "conftest.$ac_ext" >&5
50094 fi
50095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
50096
50097 # If we passed the link-test, but get a "not found" on a given library,
50098 # this could be due to inept reconfiguration of gcc to make it only
50099 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
50100 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
50101 # /usr/local libraries.
50102 if test -n "$cf_rpath_oops"
50103 then
50104 for cf_rpath_src in $cf_rpath_oops
50105 do
50106 for cf_rpath_dir in \
50107 /usr/local \
50108 /usr/pkg \
50109 /opt/sfw
50110 do
50111 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
50112 then
50113 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
50114
50115 echo "${as_me:-configure}:50115: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
50116
50117 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
50118 break
50119 fi
50120 done
50121 done
50122 fi
50123 fi
50124
50125 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
50126
50127 echo "${as_me:-configure}:50127: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
50128
50129 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
50130
50131 echo "${as_me:-configure}:50131: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
50132
50133 cf_rpath_dst=
50134 for cf_rpath_src in $LDFLAGS
50135 do
50136 case "$cf_rpath_src" in
50137 (-L*)
50138
50139 # check if this refers to a directory which we will ignore
50140 cf_rpath_skip=no
50141 if test -n "$cf_rpath_list"
50142 then
50143 for cf_rpath_item in $cf_rpath_list
50144 do
50145 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
50146 then
50147 cf_rpath_skip=yes
50148 break
50149 fi
50150 done
50151 fi
50152
50153 if test "$cf_rpath_skip" = no
50154 then
50155 # transform the option
50156 if test "$LD_RPATH_OPT" = "-R " ; then
50157 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
50158 else
50159 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
50160 fi
50161
50162 # if we have not already added this, add it now
50163 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
50164 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
50165 then
50166 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
50167
50168 echo "${as_me:-configure}:50168: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
50169
50170 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
50171 fi
50172 fi
50173 ;;
50174 esac
50175 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
50176 done
50177 LDFLAGS=$cf_rpath_dst
50178
50179 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
50180
50181 echo "${as_me:-configure}:50181: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
50182
50183 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
50184
50185 echo "${as_me:-configure}:50185: testing ...checking LIBS $LIBS ..." 1>&5
50186
50187 cf_rpath_dst=
50188 for cf_rpath_src in $LIBS
50189 do
50190 case "$cf_rpath_src" in
50191 (-L*)
50192
50193 # check if this refers to a directory which we will ignore
50194 cf_rpath_skip=no
50195 if test -n "$cf_rpath_list"
50196 then
50197 for cf_rpath_item in $cf_rpath_list
50198 do
50199 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
50200 then
50201 cf_rpath_skip=yes
50202 break
50203 fi
50204 done
50205 fi
50206
50207 if test "$cf_rpath_skip" = no
50208 then
50209 # transform the option
50210 if test "$LD_RPATH_OPT" = "-R " ; then
50211 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
50212 else
50213 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
50214 fi
50215
50216 # if we have not already added this, add it now
50217 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
50218 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
50219 then
50220 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
50221
50222 echo "${as_me:-configure}:50222: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
50223
50224 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
50225 fi
50226 fi
50227 ;;
50228 esac
50229 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
50230 done
50231 LIBS=$cf_rpath_dst
50232
50233 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
50234
50235 echo "${as_me:-configure}:50235: testing ...checked LIBS $LIBS ..." 1>&5
50236
50237 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
50238
50239 echo "${as_me:-configure}:50239: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
50240
50241 else
50242 echo "$as_me:50242: result: no" >&5
50243 echo "${ECHO_T}no" >&6
50244 fi
50245
50246 fi
50247
50248 if test "$GCC" = yes || test "$GXX" = yes
50249 then
50250
50251 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
50252 CFLAGS="${CFLAGS}$EXTRA_CFLAGS"
50253
50254 EXTRA_CFLAGS=
50255 fi
50256
50257 if test "x$cf_cv_socks_lib" != xno ; then
50258
50259 cf_add_libs="$LIBS"
50260 # reverse order
50261 cf_add_0lib=
50262 for cf_add_1lib in -l$cf_cv_socks_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
50263 # filter duplicates
50264 for cf_add_1lib in $cf_add_0lib; do
50265 for cf_add_2lib in $cf_add_libs; do
50266 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
50267 cf_add_1lib=
50268 break
50269 fi
50270 done
50271 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
50272 done
50273 LIBS="$cf_add_libs"
50274
50275 fi
50276
50277 ### Finally, build config.h and the makefiles
50278 test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
50279
50280 srcdir="$srcdir"
50281 SRCDIR_CLEAN="#"
50282 if test -n "$srcdir" ; then
50283 echo "srcdir is $srcdir"
50284 mkdir -p WWW/Library/Implementation
50285 mkdir -p src/chrtrans
50286 test "$USE_INCLUDED_LIBINTL" = yes && mkdir -p intl
50287 test "$srcdir" != "." && SRCDIR_CLEAN=""
50288 fi
50289
50290 HOMEPAGE_URL="https://lynx.invisible-island.net/"
50291
50292 cat >>confdefs.h <<EOF
50293 #define HOMEPAGE_URL "$HOMEPAGE_URL"
50294 EOF
50295
50296 ac_config_files="$ac_config_files makefile WWW/Library/Implementation/makefile src/makefile src/chrtrans/makefile $SUB_MAKEFILE"
50297 ac_config_commands="$ac_config_commands default"
50298 cat >confcache <<\_ACEOF
50299 # This file is a shell script that caches the results of configure
50300 # tests run on this system so they can be shared between configure
50301 # scripts and configure runs, see configure's option --config-cache.
50302 # It is not useful on other systems. If it contains results you don't
50303 # want to keep, you may remove or edit it.
50304 #
50305 # config.status only pays attention to the cache file if you give it
50306 # the --recheck option to rerun configure.
50307 #
50308 # `ac_cv_env_foo' variables (set or unset) will be overridden when
50309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
50310 # following values.
50311
50312 _ACEOF
50313
50314 # The following way of writing the cache mishandles newlines in values,
50315 # but we know of no workaround that is simple, portable, and efficient.
50316 # So, don't put newlines in cache variables' values.
50317 # Ultrix sh set writes to stderr and can't be redirected directly,
50318 # and sets the high bit in the cache file unless we assign to the vars.
50319 {
50320 (set) 2>&1 |
50321 case `(ac_space=' '; set | grep ac_space) 2>&1` in
50322 *ac_space=\ *)
50323 # `set' does not quote correctly, so add quotes (double-quote
50324 # substitution turns \\\\ into \\, and sed turns \\ into \).
50325 sed -n \
50326 "s/'/'\\\\''/g;
50327 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
50328 ;;
50329 *)
50330 # `set' quotes correctly as required by POSIX, so do not add quotes.
50331 sed -n \
50332 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
50333 ;;
50334 esac;
50335 } |
50336 sed '
50337 t clear
50338 : clear
50339 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
50340 t end
50341 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
50342 : end' >>confcache
50343 if cmp -s $cache_file confcache; then :; else
50344 if test -w $cache_file; then
50345 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
50346 cat confcache >$cache_file
50347 else
50348 echo "not updating unwritable cache $cache_file"
50349 fi
50350 fi
50351 rm -f confcache
50352
50353 test "x$prefix" = xNONE && prefix=$ac_default_prefix
50354 # Let make expand exec_prefix.
50355 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50356
50357 # VPATH may cause trouble with some makes, so we remove $(srcdir),
50358 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
50359 # trailing colons and then remove the whole line if VPATH becomes empty
50360 # (actually we leave an empty line to preserve line numbers).
50361 if test "x$srcdir" = x.; then
50362 ac_vpsub='/^[ ]*VPATH[ ]*=/{
50363 s/:*\$(srcdir):*/:/;
50364 s/:*\${srcdir}:*/:/;
50365 s/:*@srcdir@:*/:/;
50366 s/^\([^=]*=[ ]*\):*/\1/;
50367 s/:*$//;
50368 s/^[^=]*=[ ]*$//;
50369 }'
50370 fi
50371
50372 DEFS=-DHAVE_CONFIG_H
50373
50374 : "${CONFIG_STATUS=./config.status}"
50375 ac_clean_files_save=$ac_clean_files
50376 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50377 { echo "$as_me:50377: creating $CONFIG_STATUS" >&5
50378 echo "$as_me: creating $CONFIG_STATUS" >&6;}
50379 cat >"$CONFIG_STATUS" <<_ACEOF
50380 #! $SHELL
50381 # Generated automatically by configure.
50382 # Run this file to recreate the current configuration.
50383 # Compiler output produced by configure, useful for debugging
50384 # configure, is in config.log if it exists.
50385
50386 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
50387
50388 debug=false
50389 SHELL=\${CONFIG_SHELL-$SHELL}
50390 ac_cs_invocation="\$0 \$@"
50391
50392 CLICOLOR_FORCE= GREP_OPTIONS=
50393 unset CLICOLOR_FORCE GREP_OPTIONS
50394 _ACEOF
50395
50396 cat >>"$CONFIG_STATUS" <<\_ACEOF
50397 # Be Bourne compatible
50398 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
50399 emulate sh
50400 NULLCMD=:
50401 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
50402 set -o posix
50403 fi
50404
50405 # Name of the executable.
50406 as_me=`echo "$0" |sed 's,.*[\\/],,'`
50407
50408 if expr a : '\(a\)' >/dev/null 2>&1; then
50409 as_expr="expr"
50410 else
50411 as_expr="false"
50412 fi
50413
50414 rm -f conf$$ conf$$.exe conf$$.file
50415 echo >conf$$.file
50416 if ln -s conf$$.file conf$$ 2>/dev/null; then
50417 # We could just check for DJGPP; but this test a) works b) is more generic
50418 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
50419 if test -f conf$$.exe; then
50420 # Don't use ln at all; we don't have any links
50421 as_ln_s='cp -p'
50422 else
50423 as_ln_s='ln -s'
50424 fi
50425 elif ln conf$$.file conf$$ 2>/dev/null; then
50426 as_ln_s='ln'
50427 else
50428 as_ln_s='cp -p'
50429 fi
50430 rm -f conf$$ conf$$.exe conf$$.file
50431
50432 as_executable_p="test -f"
50433
50434 # Support unset when possible.
50435 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
50436 as_unset="unset"
50437 else
50438 as_unset="false"
50439 fi
50440
50441 # NLS nuisances.
50442 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
50443 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
50444 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
50445 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
50446 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
50447 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
50448 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
50449 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
50450
50451 # IFS
50452 # We need space, tab and new line, in precisely that order.
50453 as_nl='
50454 '
50455 IFS=" $as_nl"
50456
50457 # CDPATH.
50458 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
50459
50460 exec 6>&1
50461
50462 _ACEOF
50463
50464 # Files that config.status was made for.
50465 if test -n "$ac_config_files"; then
50466 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
50467 fi
50468
50469 if test -n "$ac_config_headers"; then
50470 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
50471 fi
50472
50473 if test -n "$ac_config_links"; then
50474 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
50475 fi
50476
50477 if test -n "$ac_config_commands"; then
50478 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
50479 fi
50480
50481 cat >>"$CONFIG_STATUS" <<\EOF
50482
50483 ac_cs_usage="\
50484 \`$as_me' instantiates files from templates according to the
50485 current configuration.
50486
50487 Usage: $0 [OPTIONS] [FILE]...
50488
50489 -h, --help print this help, then exit
50490 -V, --version print version number, then exit
50491 -d, --debug don't remove temporary files
50492 --recheck update $as_me by reconfiguring in the same conditions
50493 --file=FILE[:TEMPLATE]
50494 instantiate the configuration file FILE
50495 --header=FILE[:TEMPLATE]
50496 instantiate the configuration header FILE
50497
50498 Configuration files:
50499 $config_files
50500
50501 Configuration headers:
50502 $config_headers
50503
50504 Configuration commands:
50505 $config_commands
50506
50507 Report bugs to <[email protected]>."
50508 EOF
50509
50510 cat >>"$CONFIG_STATUS" <<EOF
50511 ac_cs_version="\\
50512 lynx config.status 2.9.3
50513 configured by $0, generated by GNU Autoconf 2.52.20260412,
50514 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
50515
50516 Copyright 2003-2023,2025 Thomas E. Dickey
50517 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
50518 Free Software Foundation, Inc.
50519 This config.status script is free software; the Free Software Foundation
50520 gives unlimited permission to copy, distribute and modify it."
50521 srcdir="$srcdir"
50522 INSTALL="$INSTALL"
50523 EOF
50524
50525 cat >>"$CONFIG_STATUS" <<\EOF
50526 # If no file are specified by the user, then we need to provide default
50527 # value. By we need to know if files were specified by the user.
50528 ac_need_defaults=:
50529 while test $# != 0
50530 do
50531 case $1 in
50532 --*=*)
50533 ac_option=`expr "x$1" : 'x\([^=]*\)='`
50534 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
50535 shift
50536 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
50537 shift
50538 ;;
50539 -*);;
50540 *) # This is not an option, so the user has probably given explicit
50541 # arguments.
50542 ac_need_defaults=false;;
50543 esac
50544
50545 case $1 in
50546 # Handling of the options.
50547 EOF
50548 cat >>"$CONFIG_STATUS" <<EOF
50549 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50550 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
50551 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
50552 EOF
50553 cat >>"$CONFIG_STATUS" <<\EOF
50554 --version | --vers* | -V )
50555 echo "$ac_cs_version"; exit 0 ;;
50556 --he | --h)
50557 # Conflict between --help and --header
50558 { { echo "$as_me:50558: error: ambiguous option: $1
50559 Try \`$0 --help' for more information." >&5
50560 echo "$as_me: error: ambiguous option: $1
50561 Try \`$0 --help' for more information." >&2;}
50562 { (exit 1); exit 1; }; };;
50563 --help | --hel | -h )
50564 echo "$ac_cs_usage"; exit 0 ;;
50565 --debug | --d* | -d )
50566 debug=: ;;
50567 --file | --fil | --fi | --f )
50568 shift
50569 CONFIG_FILES="$CONFIG_FILES $1"
50570 ac_need_defaults=false;;
50571 --header | --heade | --head | --hea )
50572 shift
50573 CONFIG_HEADERS="$CONFIG_HEADERS $1"
50574 ac_need_defaults=false;;
50575
50576 # This is an error.
50577 -*) { { echo "$as_me:50577: error: unrecognized option: $1
50578 Try \`$0 --help' for more information." >&5
50579 echo "$as_me: error: unrecognized option: $1
50580 Try \`$0 --help' for more information." >&2;}
50581 { (exit 1); exit 1; }; } ;;
50582
50583 *) ac_config_targets="$ac_config_targets $1" ;;
50584
50585 esac
50586 shift
50587 done
50588
50589 exec 5>>config.log
50590 cat >&5 << _ACEOF
50591
50592 ## ----------------------- ##
50593 ## Running config.status. ##
50594 ## ----------------------- ##
50595
50596 This file was extended by $as_me (lynx 2.9.3) 2.52.20260412, executed with
50597 CONFIG_FILES = $CONFIG_FILES
50598 CONFIG_HEADERS = $CONFIG_HEADERS
50599 CONFIG_LINKS = $CONFIG_LINKS
50600 CONFIG_COMMANDS = $CONFIG_COMMANDS
50601 > "$ac_cs_invocation"
50602 on `(hostname || uname -n) 2>/dev/null | sed 1q`
50603
50604 _ACEOF
50605 EOF
50606
50607 cat >>"$CONFIG_STATUS" <<EOF
50608 #
50609 # INIT-COMMANDS section.
50610 #
50611
50612 USE_NLS=$USE_NLS
50613 use_our_messages=$use_our_messages
50614
50615 EOF
50616
50617 cat >>"$CONFIG_STATUS" <<\EOF
50618 for ac_config_target in $ac_config_targets
50619 do
50620 case "$ac_config_target" in
50621 # Handling of arguments.
50622 "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
50623 "WWW/Library/Implementation/makefile" ) CONFIG_FILES="$CONFIG_FILES WWW/Library/Implementation/makefile" ;;
50624 "src/makefile" ) CONFIG_FILES="$CONFIG_FILES src/makefile" ;;
50625 "src/chrtrans/makefile" ) CONFIG_FILES="$CONFIG_FILES src/chrtrans/makefile" ;;
50626 "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
50627 "config-NLS" ) CONFIG_COMMANDS="$CONFIG_COMMANDS config-NLS" ;;
50628 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
50629 "$CONFIG_H" ) CONFIG_HEADERS="$CONFIG_HEADERS $CONFIG_H:config.hin" ;;
50630 *) { { echo "$as_me:50630: error: invalid argument: $ac_config_target" >&5
50631 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
50632 { (exit 1); exit 1; }; };;
50633 esac
50634 done
50635
50636 # If the user did not use the arguments to specify the items to instantiate,
50637 # then the envvar interface is used. Set only those that are not.
50638 # We use the long form for the default assignment because of an extremely
50639 # bizarre bug on SunOS 4.1.3.
50640 if "$ac_need_defaults"; then
50641 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
50642 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
50643 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
50644 fi
50645
50646 # Create a temporary directory, and hook for its removal unless debugging.
50647 $debug ||
50648 {
50649 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
50650 trap '{ (exit 1); exit 1; }' 1 2 13 15
50651 }
50652
50653 # Create a (secure) tmp directory for tmp files.
50654 : "${TMPDIR=/tmp}"
50655 {
50656 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
50657 test -n "$tmp" && test -d "$tmp"
50658 } ||
50659 {
50660 tmp=$TMPDIR/cs$$-$RANDOM
50661 (umask 077 && mkdir "$tmp")
50662 } ||
50663 {
50664 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
50665 { (exit 1); exit 1; }
50666 }
50667
50668 EOF
50669
50670 cat >>"$CONFIG_STATUS" <<EOF
50671
50672 #
50673 # CONFIG_FILES section.
50674 #
50675
50676 # No need to generate the scripts if there are no CONFIG_FILES.
50677 # This happens for instance when ./config.status config.h
50678 if test -n "\$CONFIG_FILES"; then
50679 # Protect against being on the right side of a sed subst in config.status.
50680 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
50681 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
50682 s,@SHELL@,$SHELL,;t t
50683 s,@exec_prefix@,$exec_prefix,;t t
50684 s,@prefix@,$prefix,;t t
50685 s,@program_transform_name@,$program_transform_name,;t t
50686 s,@bindir@,$bindir,;t t
50687 s,@sbindir@,$sbindir,;t t
50688 s,@libexecdir@,$libexecdir,;t t
50689 s,@datarootdir@,$datarootdir,;t t
50690 s,@datadir@,$datadir,;t t
50691 s,@sysconfdir@,$sysconfdir,;t t
50692 s,@sharedstatedir@,$sharedstatedir,;t t
50693 s,@localstatedir@,$localstatedir,;t t
50694 s,@runstatedir@,$runstatedir,;t t
50695 s,@libdir@,$libdir,;t t
50696 s,@includedir@,$includedir,;t t
50697 s,@oldincludedir@,$oldincludedir,;t t
50698 s,@infodir@,$infodir,;t t
50699 s,@mandir@,$mandir,;t t
50700 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
50701 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
50702 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
50703 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
50704 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
50705 s,@build_alias@,$build_alias,;t t
50706 s,@host_alias@,$host_alias,;t t
50707 s,@target_alias@,$target_alias,;t t
50708 s,@ECHO_C@,$ECHO_C,;t t
50709 s,@ECHO_N@,$ECHO_N,;t t
50710 s,@ECHO_T@,$ECHO_T,;t t
50711 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
50712 s,@DEFS@,$DEFS,;t t
50713 s,@LIBS@,$LIBS,;t t
50714 s,@CONFIG_H@,$CONFIG_H,;t t
50715 s,@build@,$build,;t t
50716 s,@build_cpu@,$build_cpu,;t t
50717 s,@build_vendor@,$build_vendor,;t t
50718 s,@build_os@,$build_os,;t t
50719 s,@host@,$host,;t t
50720 s,@host_cpu@,$host_cpu,;t t
50721 s,@host_vendor@,$host_vendor,;t t
50722 s,@host_os@,$host_os,;t t
50723 s,@target@,$target,;t t
50724 s,@target_cpu@,$target_cpu,;t t
50725 s,@target_vendor@,$target_vendor,;t t
50726 s,@target_os@,$target_os,;t t
50727 s,@PACKAGE@,$PACKAGE,;t t
50728 s,@VERSION@,$VERSION,;t t
50729 s,@NO_DOTS_VERSION@,$NO_DOTS_VERSION,;t t
50730 s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
50731 s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
50732 s,@DESTDIR@,$DESTDIR,;t t
50733 s,@CC@,$CC,;t t
50734 s,@CFLAGS@,$CFLAGS,;t t
50735 s,@LDFLAGS@,$LDFLAGS,;t t
50736 s,@CPPFLAGS@,$CPPFLAGS,;t t
50737 s,@ac_ct_CC@,$ac_ct_CC,;t t
50738 s,@EXEEXT@,$EXEEXT,;t t
50739 s,@OBJEXT@,$OBJEXT,;t t
50740 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
50741 s,@CPP@,$CPP,;t t
50742 s,@GREP@,$GREP,;t t
50743 s,@EGREP@,$EGREP,;t t
50744 s,@LN_S@,$LN_S,;t t
50745 s,@SET_MAKE@,$SET_MAKE,;t t
50746 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
50747 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
50748 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
50749 s,@YACC@,$YACC,;t t
50750 s,@LINT@,$LINT,;t t
50751 s,@LINT_OPTS@,$LINT_OPTS,;t t
50752 s,@LINT_LIBS@,$LINT_LIBS,;t t
50753 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
50754 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
50755 s,@CTAGS@,$CTAGS,;t t
50756 s,@ETAGS@,$ETAGS,;t t
50757 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
50758 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
50759 s,@WINDRES@,$WINDRES,;t t
50760 s,@ac_pt_WINDRES@,$ac_pt_WINDRES,;t t
50761 s,@BUILD_CC@,$BUILD_CC,;t t
50762 s,@BUILD_CPP@,$BUILD_CPP,;t t
50763 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
50764 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
50765 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
50766 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
50767 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
50768 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
50769 s,@RANLIB@,$RANLIB,;t t
50770 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
50771 s,@AR@,$AR,;t t
50772 s,@ac_ct_AR@,$ac_ct_AR,;t t
50773 s,@ARFLAGS@,$ARFLAGS,;t t
50774 s,@ECHO_LT@,$ECHO_LT,;t t
50775 s,@ECHO_LD@,$ECHO_LD,;t t
50776 s,@RULE_CC@,$RULE_CC,;t t
50777 s,@SHOW_CC@,$SHOW_CC,;t t
50778 s,@ECHO_CC@,$ECHO_CC,;t t
50779 s,@DONT_ECHO_CC@,$DONT_ECHO_CC,;t t
50780 s,@X_CFLAGS@,$X_CFLAGS,;t t
50781 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
50782 s,@X_LIBS@,$X_LIBS,;t t
50783 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
50784 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
50785 s,@FGREP@,$FGREP,;t t
50786 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
50787 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
50788 s,@LINK_PREFIX@,$LINK_PREFIX,;t t
50789 s,@MSGINIT@,$MSGINIT,;t t
50790 s,@LIBICONV@,$LIBICONV,;t t
50791 s,@USE_NLS@,$USE_NLS,;t t
50792 s,@MSGFMT@,$MSGFMT,;t t
50793 s,@GMSGFMT@,$GMSGFMT,;t t
50794 s,@XGETTEXT@,$XGETTEXT,;t t
50795 s,@CATALOGS@,$CATALOGS,;t t
50796 s,@CATOBJEXT@,$CATOBJEXT,;t t
50797 s,@GMOFILES@,$GMOFILES,;t t
50798 s,@POFILES@,$POFILES,;t t
50799 s,@DATADIRNAME@,$DATADIRNAME,;t t
50800 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
50801 s,@GENCAT@,$GENCAT,;t t
50802 s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
50803 s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
50804 s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
50805 s,@NLS_DATADIR@,$NLS_DATADIR,;t t
50806 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
50807 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
50808 s,@REQUIRE_PKG@,$REQUIRE_PKG,;t t
50809 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
50810 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
50811 s,@LYNX_LSS_FILE@,$LYNX_LSS_FILE,;t t
50812 s,@INSTALL_LSS@,$INSTALL_LSS,;t t
50813 s,@LYNX_CFG_FILE@,$LYNX_CFG_FILE,;t t
50814 s,@LYNX_CFG_PATH@,$LYNX_CFG_PATH,;t t
50815 s,@MIME_LIBDIR@,$MIME_LIBDIR,;t t
50816 s,@DEFAULT_LOCALE_CHARSET@,$DEFAULT_LOCALE_CHARSET,;t t
50817 s,@CHARSET_DEFS@,$CHARSET_DEFS,;t t
50818 s,@ALLOCA@,$ALLOCA,;t t
50819 s,@LIBOBJS@,$LIBOBJS,;t t
50820 s,@EXTRA_OBJS@,$EXTRA_OBJS,;t t
50821 s,@SETFONT@,$SETFONT,;t t
50822 s,@LYNXCFG_MAKE@,$LYNXCFG_MAKE,;t t
50823 s,@LYNXCFG_NO_MAKE@,$LYNXCFG_NO_MAKE,;t t
50824 s,@LYNXDOC_MAKE@,$LYNXDOC_MAKE,;t t
50825 s,@GROFF_PATH@,$GROFF_PATH,;t t
50826 s,@NROFF_PATH@,$NROFF_PATH,;t t
50827 s,@TBL_PATH@,$TBL_PATH,;t t
50828 s,@GROFF_NOTE@,$GROFF_NOTE,;t t
50829 s,@NROFF_NOTE@,$NROFF_NOTE,;t t
50830 s,@cf_man2html@,$cf_man2html,;t t
50831 s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
50832 s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
50833 s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
50834 s,@MAKE_WAIS@,$MAKE_WAIS,;t t
50835 s,@TELNET@,$TELNET,;t t
50836 s,@TN3270@,$TN3270,;t t
50837 s,@RLOGIN@,$RLOGIN,;t t
50838 s,@MV@,$MV,;t t
50839 s,@GZIP@,$GZIP,;t t
50840 s,@UNCOMPRESS@,$UNCOMPRESS,;t t
50841 s,@UNZIP@,$UNZIP,;t t
50842 s,@BZIP2@,$BZIP2,;t t
50843 s,@BROTLI@,$BROTLI,;t t
50844 s,@ZSTD@,$ZSTD,;t t
50845 s,@TAR@,$TAR,;t t
50846 s,@TAR_UP_OPTIONS@,$TAR_UP_OPTIONS,;t t
50847 s,@TAR_DOWN_OPTIONS@,$TAR_DOWN_OPTIONS,;t t
50848 s,@TAR_FILE_OPTIONS@,$TAR_FILE_OPTIONS,;t t
50849 s,@TAR_PIPE_OPTIONS@,$TAR_PIPE_OPTIONS,;t t
50850 s,@COMPRESS@,$COMPRESS,;t t
50851 s,@RM@,$RM,;t t
50852 s,@UUDECODE@,$UUDECODE,;t t
50853 s,@ZCAT@,$ZCAT,;t t
50854 s,@ZIP@,$ZIP,;t t
50855 s,@INSTALL@,$INSTALL,;t t
50856 s,@COMPRESS_PROG@,$COMPRESS_PROG,;t t
50857 s,@COMPRESS_EXT@,$COMPRESS_EXT,;t t
50858 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
50859 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
50860 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
50861 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
50862 s,@CONFIG_SHELL@,$CONFIG_SHELL,;t t
50863 s,@HOMEPAGE_URL@,$HOMEPAGE_URL,;t t
50864 s,@SRCDIR_CLEAN@,$SRCDIR_CLEAN,;t t
50865 CEOF
50866
50867 EOF
50868
50869 cat >>"$CONFIG_STATUS" <<\EOF
50870 # Split the substitutions into bite-sized pieces for seds with
50871 # small command number limits, like on Digital OSF/1 and HP-UX.
50872 ac_max_sed_lines=48
50873 ac_sed_frag=1 # Number of current file.
50874 ac_beg=1 # First line for current file.
50875 ac_end=$ac_max_sed_lines # Line after last line for current file.
50876 ac_more_lines=:
50877 ac_sed_cmds=
50878 while "$ac_more_lines"; do
50879 if test "$ac_beg" -gt 1; then
50880 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
50881 else
50882 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
50883 fi
50884 if test ! -s "$tmp"/subs.frag; then
50885 ac_more_lines=false
50886 else
50887 # The purpose of the label and of the branching condition is to
50888 # speed up the sed processing (if there are no `@' at all, there
50889 # is no need to browse any of the substitutions).
50890 # These are the two extra sed commands mentioned above.
50891 (echo ':t
50892 /@[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
50893 # It is possible to make a multiline substitution using escaped newlines.
50894 # Ensure that we do not split the substitution between script fragments.
50895 ac_BEG=$ac_end
50896 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
50897 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
50898 if test -s "$tmp"/subs.next; then
50899 grep '^s,@[^@,][^@,]*@,.*$' "$tmp"/subs.next | grep -v '^s,@.*;t t$' >"$tmp"/subs.edit
50900 if test ! -s "$tmp"/subs.edit; then
50901 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
50902 if test ! -s "$tmp"/subs.edit; then
50903 if test "$ac_beg" -gt 1; then
50904 ac_end=`expr "$ac_end" - 1`
50905 continue
50906 fi
50907 fi
50908 fi
50909 fi
50910
50911 if test -z "$ac_sed_cmds"; then
50912 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
50913 else
50914 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
50915 fi
50916 ac_sed_frag=`expr "$ac_sed_frag" + 1`
50917 ac_beg=$ac_end
50918 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
50919 fi
50920 done
50921 if test -z "$ac_sed_cmds"; then
50922 ac_sed_cmds="cat"
50923 fi
50924 fi # test -n "$CONFIG_FILES"
50925
50926 EOF
50927 cat >>"$CONFIG_STATUS" <<\EOF
50928 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
50929 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
50930 case "$ac_file" in
50931 - | *:- | *:-:* ) # input from stdin
50932 cat >"$tmp"/stdin
50933 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
50934 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
50935 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
50936 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
50937 * ) ac_file_in=$ac_file.in ;;
50938 esac
50939
50940 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
50941 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50942 X"$ac_file" : 'X\(//\)[^/]' \| \
50943 X"$ac_file" : 'X\(//\)$' \| \
50944 X"$ac_file" : 'X\(/\)' \| \
50945 . : '\(.\)' 2>/dev/null ||
50946 echo X"$ac_file" |
50947 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
50948 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
50949 /^X\(\/\/\)$/{ s//\1/; q; }
50950 /^X\(\/\).*/{ s//\1/; q; }
50951 s/.*/./; q'`
50952 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
50953 { case "$ac_dir" in
50954 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
50955 *) as_incr_dir=.;;
50956 esac
50957 as_dummy="$ac_dir"
50958 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
50959 case $as_mkdir_dir in
50960 # Skip DOS drivespec
50961 ?:) as_incr_dir=$as_mkdir_dir ;;
50962 *)
50963 as_incr_dir=$as_incr_dir/$as_mkdir_dir
50964 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
50965 ;;
50966 esac
50967 done; }
50968
50969 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
50970 # A "../" for each directory in $ac_dir_suffix.
50971 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
50972 else
50973 ac_dir_suffix= ac_dots=
50974 fi
50975
50976 case "$srcdir" in
50977 .) ac_srcdir=.
50978 if test -z "$ac_dots"; then
50979 ac_top_srcdir=.
50980 else
50981 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
50982 fi ;;
50983 [\\/]* | ?:[\\/]* )
50984 ac_srcdir="$srcdir$ac_dir_suffix";
50985 ac_top_srcdir="$srcdir" ;;
50986 *) # Relative path.
50987 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
50988 ac_top_srcdir="$ac_dots$srcdir" ;;
50989 esac
50990
50991 case $INSTALL in
50992 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
50993 *) ac_INSTALL=$ac_dots$INSTALL ;;
50994 esac
50995
50996 if test x"$ac_file" != x-; then
50997 { echo "$as_me:50997: creating $ac_file" >&5
50998 echo "$as_me: creating $ac_file" >&6;}
50999 rm -f "$ac_file"
51000 fi
51001 # Let's still pretend it is `configure' which instantiates (i.e., don't
51002 # use $as_me), people would be surprised to read:
51003 # /* config.h. Generated automatically by config.status. */
51004 configure_input="Generated automatically from `echo $ac_file_in |
51005 sed 's,.*/,,'` by configure."
51006
51007 # First look for the input files in the build tree, otherwise in the
51008 # src tree.
51009 ac_file_inputs=`IFS=:
51010 for f in $ac_file_in; do
51011 case $f in
51012 -) echo "$tmp"/stdin ;;
51013 [\\/$]*)
51014 # Absolute (can't be DOS-style, as IFS=:)
51015 test -f "$f" || { { echo "$as_me:51015: error: cannot find input file: $f" >&5
51016 echo "$as_me: error: cannot find input file: $f" >&2;}
51017 { (exit 1); exit 1; }; }
51018 echo "$f";;
51019 *) # Relative
51020 if test -f "$f"; then
51021 # Build tree
51022 echo "$f"
51023 elif test -f "$srcdir/$f"; then
51024 # Source tree
51025 echo "$srcdir/$f"
51026 else
51027 # /dev/null tree
51028 { { echo "$as_me:51028: error: cannot find input file: $f" >&5
51029 echo "$as_me: error: cannot find input file: $f" >&2;}
51030 { (exit 1); exit 1; }; }
51031 fi;;
51032 esac
51033 done` || { (exit 1); exit 1; }
51034 EOF
51035 cat >>"$CONFIG_STATUS" <<\EOF
51036 ac_warn_datarootdir=no
51037 if test x"$ac_file" != x-; then
51038 for ac_item in $ac_file_inputs
51039 do
51040 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
51041 if test -n "$ac_seen"; then
51042 ac_used=`grep '@datarootdir@' "$ac_item"`
51043 if test -z "$ac_used"; then
51044 { echo "$as_me:51044: WARNING: datarootdir was used implicitly but not set:
51045 $ac_seen" >&5
51046 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
51047 $ac_seen" >&2;}
51048 ac_warn_datarootdir=yes
51049 fi
51050 fi
51051 ac_seen=`grep '${datarootdir}' "$ac_item"`
51052 if test -n "$ac_seen"; then
51053 { echo "$as_me:51053: WARNING: datarootdir was used explicitly but not set:
51054 $ac_seen" >&5
51055 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
51056 $ac_seen" >&2;}
51057 ac_warn_datarootdir=yes
51058 fi
51059 done
51060 fi
51061
51062 if test "x$ac_warn_datarootdir" = xyes; then
51063 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
51064 fi
51065
51066 EOF
51067 cat >>"$CONFIG_STATUS" <<EOF
51068 sed "$ac_vpsub
51069 $extrasub
51070 EOF
51071 cat >>"$CONFIG_STATUS" <<\EOF
51072 :t
51073 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51074 s,@configure_input@,$configure_input,;t t
51075 s,@srcdir@,$ac_srcdir,;t t
51076 s,@top_srcdir@,$ac_top_srcdir,;t t
51077 s,@INSTALL@,$ac_INSTALL,;t t
51078 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
51079 rm -f "$tmp"/stdin
51080 EOF
51081 test -n "${FGREP}" || FGREP="grep -F"
51082 test -n "${EGREP}" || EGREP="grep -E"
51083 cat >>"$CONFIG_STATUS" <<EOF
51084 test -n "\${FGREP}" || FGREP="$FGREP"
51085 test -n "\${EGREP}" || EGREP="$EGREP"
51086 EOF
51087 cat >>"$CONFIG_STATUS" <<\EOF
51088 if test x"$ac_file" != x-; then
51089 cp "$tmp/out" "$ac_file"
51090
51091 for ac_name in prefix exec_prefix datarootdir
51092 do
51093 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
51094 if test -n "$ac_seen"; then
51095 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
51096 if test -z "$ac_init"; then
51097 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
51098 { echo "$as_me:51098: WARNING: Variable $ac_name is used but was not set:
51099 $ac_seen" >&5
51100 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
51101 $ac_seen" >&2;}
51102 fi
51103 fi
51104 done
51105 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
51106 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
51107 if test -s "$tmp"/out; then
51108 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
51109 { echo "$as_me:51109: WARNING: Some variables may not be substituted:
51110 $ac_seen" >&5
51111 echo "$as_me: WARNING: Some variables may not be substituted:
51112 $ac_seen" >&2;}
51113 fi
51114 else
51115 cat "$tmp"/out
51116 fi
51117 rm -f "$tmp"/out
51118
51119 done
51120 EOF
51121 cat >>"$CONFIG_STATUS" <<\EOF
51122
51123 #
51124 # CONFIG_HEADER section.
51125 #
51126
51127 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
51128 # NAME is the cpp macro being defined and VALUE is the value it is being given.
51129 #
51130 # ac_d sets the value in "#define NAME VALUE" lines.
51131 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
51132 ac_dB='[ ].*$,\1#\2'
51133 ac_dC=' '
51134 ac_dD=',;t'
51135 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
51136 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
51137 ac_iB='\([ ]\),\1#\2define\3'
51138 ac_iC=' '
51139 ac_iD='\4,;t'
51140 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
51141 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
51142 ac_uB='$,\1#\2define\3'
51143 ac_uC=' '
51144 ac_uD=',;t'
51145
51146 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
51147 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
51148 case "$ac_file" in
51149 - | *:- | *:-:* ) # input from stdin
51150 cat >"$tmp"/stdin
51151 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
51152 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
51153 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
51154 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
51155 * ) ac_file_in=$ac_file.in ;;
51156 esac
51157
51158 test x"$ac_file" != x- && { echo "$as_me:51158: creating $ac_file" >&5
51159 echo "$as_me: creating $ac_file" >&6;}
51160
51161 # First look for the input files in the build tree, otherwise in the
51162 # src tree.
51163 ac_file_inputs=`IFS=:
51164 for f in $ac_file_in; do
51165 case $f in
51166 -) echo "$tmp"/stdin ;;
51167 [\\/$]*)
51168 # Absolute (can't be DOS-style, as IFS=:)
51169 test -f "$f" || { { echo "$as_me:51169: error: cannot find input file: $f" >&5
51170 echo "$as_me: error: cannot find input file: $f" >&2;}
51171 { (exit 1); exit 1; }; }
51172 echo $f;;
51173 *) # Relative
51174 if test -f "$f"; then
51175 # Build tree
51176 echo $f
51177 elif test -f "$srcdir/$f"; then
51178 # Source tree
51179 echo "$srcdir/$f"
51180 else
51181 # /dev/null tree
51182 { { echo "$as_me:51182: error: cannot find input file: $f" >&5
51183 echo "$as_me: error: cannot find input file: $f" >&2;}
51184 { (exit 1); exit 1; }; }
51185 fi;;
51186 esac
51187 done` || { (exit 1); exit 1; }
51188 # Remove the trailing spaces.
51189 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
51190
51191 EOF
51192
51193 # Transform confdefs.h into two sed scripts, `conftest.defines' and
51194 # `conftest.undefs', that substitutes the proper values into
51195 # config.h.in to produce config.h. The first handles `#define'
51196 # templates, and the second `#undef' templates.
51197 # And first: Protect against being on the right side of a sed subst in
51198 # config.status. Protect against being in an unquoted here document
51199 # in config.status.
51200 rm -f conftest.defines conftest.undefs
51201 # Using a here document instead of a string reduces the quoting nightmare.
51202 # Putting comments in sed scripts is not portable.
51203 #
51204 # `end' is used to avoid that the second main sed command (meant for
51205 # 0-ary CPP macros) applies to n-ary macro definitions.
51206 # See the Autoconf documentation for `clear'.
51207 cat >confdef2sed.sed <<\EOF
51208 s/[\\&,]/\\&/g
51209 s,[\\$`],\\&,g
51210 t clear
51211 : clear
51212 s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
51213 t end
51214 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
51215 : end
51216 EOF
51217 # If some macros were called several times there might be several times
51218 # the same #defines, which is useless. Nevertheless, we may not want to
51219 # sort them, since we want the *last* AC-DEFINE to be honored.
51220 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
51221 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
51222 sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
51223 rm -f confdef2sed.sed
51224
51225 # This sed command replaces #undef with comments. This is necessary, for
51226 # example, in the case of _POSIX_SOURCE, which is predefined and required
51227 # on some systems where configure will not decide to define it.
51228 cat >>conftest.undefs <<\EOF
51229 s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
51230 EOF
51231
51232 # Break up conftest.defines because some shells have a limit on the size
51233 # of here documents, and old seds have small limits too (100 cmds).
51234 echo ' # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
51235 echo ' test -n "${EGREP}" || EGREP="grep -E"' >>"$CONFIG_STATUS"
51236 echo ' if ${EGREP} "^[ ]*#[ ]*define" "$tmp"/in >/dev/null; then' >>"$CONFIG_STATUS"
51237 echo ' # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
51238 echo ' :' >>"$CONFIG_STATUS"
51239 rm -f conftest.tail
51240 while grep . conftest.defines >/dev/null
51241 do
51242 # Write a limited-size here document to "$tmp"/defines.sed.
51243 echo ' cat >"$tmp"/defines.sed <<CEOF' >>"$CONFIG_STATUS"
51244 # Speed up: don't consider the non `#define' lines.
51245 echo '/^[ ]*#[ ]*define/!b' >>"$CONFIG_STATUS"
51246 # Work around the forget-to-reset-the-flag bug.
51247 echo 't clr' >>"$CONFIG_STATUS"
51248 echo ': clr' >>"$CONFIG_STATUS"
51249 sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
51250 echo 'CEOF
51251 sed -f "$tmp"/defines.sed "$tmp"/in >"$tmp"/out
51252 rm -f "$tmp"/in
51253 mv "$tmp"/out "$tmp"/in
51254 ' >>"$CONFIG_STATUS"
51255 sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
51256 rm -f conftest.defines
51257 mv conftest.tail conftest.defines
51258 done
51259 rm -f conftest.defines
51260 echo ' fi # grep' >>"$CONFIG_STATUS"
51261 echo >>"$CONFIG_STATUS"
51262
51263 # Break up conftest.undefs because some shells have a limit on the size
51264 # of here documents, and old seds have small limits too (100 cmds).
51265 echo ' # Handle all the #undef templates' >>"$CONFIG_STATUS"
51266 rm -f conftest.tail
51267 while grep . conftest.undefs >/dev/null
51268 do
51269 # Write a limited-size here document to "$tmp"/undefs.sed.
51270 echo ' cat >"$tmp"/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
51271 # Speed up: don't consider the non `#undef'
51272 echo '/^[ ]*#[ ]*undef/!b' >>"$CONFIG_STATUS"
51273 # Work around the forget-to-reset-the-flag bug.
51274 echo 't clr' >>"$CONFIG_STATUS"
51275 echo ': clr' >>"$CONFIG_STATUS"
51276 sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
51277 echo 'CEOF
51278 sed -f "$tmp"/undefs.sed "$tmp"/in >"$tmp"/out
51279 rm -f "$tmp"/in
51280 mv "$tmp"/out "$tmp"/in
51281 ' >>"$CONFIG_STATUS"
51282 sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
51283 rm -f conftest.undefs
51284 mv conftest.tail conftest.undefs
51285 done
51286 rm -f conftest.undefs
51287
51288 cat >>"$CONFIG_STATUS" <<\EOF
51289 # Let's still pretend it is `configure' which instantiates (i.e., don't
51290 # use $as_me), people would be surprised to read:
51291 # /* config.h. Generated automatically by config.status. */
51292 if test x"$ac_file" = x-; then
51293 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
51294 else
51295 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
51296 fi
51297 cat "$tmp"/in >>"$tmp"/config.h
51298 rm -f "$tmp"/in
51299 if test x"$ac_file" != x-; then
51300 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
51301 { echo "$as_me:51301: $ac_file is unchanged" >&5
51302 echo "$as_me: $ac_file is unchanged" >&6;}
51303 else
51304 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51305 X"$ac_file" : 'X\(//\)[^/]' \| \
51306 X"$ac_file" : 'X\(//\)$' \| \
51307 X"$ac_file" : 'X\(/\)' \| \
51308 . : '\(.\)' 2>/dev/null ||
51309 echo X"$ac_file" |
51310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
51311 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
51312 /^X\(\/\/\)$/{ s//\1/; q; }
51313 /^X\(\/\).*/{ s//\1/; q; }
51314 s/.*/./; q'`
51315 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
51316 { case "$ac_dir" in
51317 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
51318 *) as_incr_dir=.;;
51319 esac
51320 as_dummy="$ac_dir"
51321 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
51322 case $as_mkdir_dir in
51323 # Skip DOS drivespec
51324 ?:) as_incr_dir=$as_mkdir_dir ;;
51325 *)
51326 as_incr_dir=$as_incr_dir/$as_mkdir_dir
51327 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
51328 ;;
51329 esac
51330 done; }
51331
51332 fi
51333 rm -f "$ac_file"
51334 mv "$tmp/config.h" "$ac_file"
51335 fi
51336 else
51337 cat "$tmp"/config.h
51338 rm -f "$tmp"/config.h
51339 fi
51340 done
51341 EOF
51342 cat >>"$CONFIG_STATUS" <<\EOF
51343 #
51344 # CONFIG_COMMANDS section.
51345 #
51346 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
51347 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
51348 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
51349
51350 case "$ac_dest" in
51351 config-NLS ) for ac_file in $CONFIG_FILES; do
51352
51353 # Support "outfile[:infile[:infile...]]"
51354 case "$ac_file" in
51355 (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
51356 esac
51357
51358 # PO directories have a Makefile.in generated from Makefile.inn.
51359 case "$ac_file" in
51360 (*/[Mm]akefile.in)
51361 # Adjust a relative srcdir.
51362 ac_dir="`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`"
51363 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
51364 ac_dots="`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`"
51365 ac_base="`basename $ac_file .in`"
51366 # In autoconf-2.13 it is called $ac_given_srcdir.
51367 # In autoconf-2.50 it is called $srcdir.
51368 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
51369
51370 case "$ac_given_srcdir" in
51371 (.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
51372 (/*) top_srcdir="$ac_given_srcdir" ;;
51373 (*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
51374 esac
51375
51376 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
51377 rm -f "$ac_dir/POTFILES"
51378 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
51379 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
51380 test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
51381 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
51382 fi
51383 ;;
51384 esac
51385 done ;;
51386 default )
51387 if test "$USE_NLS" = yes ; then
51388 if test "$use_our_messages" = yes ; then
51389 echo "creating po/makefile"
51390 rm -f po/temp$$
51391 sed -e 's%^.*LYMessages.c% ../LYMessages.c%' \
51392 -e '$s/\\//' po/POTFILES >po/temp$$
51393 sed -e "/POTFILES =/r po/temp$$" \
51394 po/makefile.in > po/makefile
51395 rm -f po/temp$$
51396 fi
51397 fi
51398 ;;
51399 esac
51400 done
51401 EOF
51402
51403 cat >>"$CONFIG_STATUS" <<\EOF
51404
51405 { (exit 0); exit 0; }
51406 EOF
51407 chmod +x "$CONFIG_STATUS"
51408 ac_clean_files=$ac_clean_files_save
51409
51410 # configure is writing to config.log, and then calls config.status.
51411 # config.status does its own redirection, appending to config.log.
51412 # Unfortunately, on DOS this fails, as config.log is still kept open
51413 # by configure, so config.status won't be able to write to it; its
51414 # output is simply discarded. So we exec the FD to /dev/null,
51415 # effectively closing config.log, so it can be properly (re)opened and
51416 # appended to by config.status. When coming back to configure, we
51417 # need to make the FD available again.
51418 if test "$no_create" != yes; then
51419 ac_cs_success=:
51420 exec 5>/dev/null
51421 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
51422 exec 5>>config.log
51423 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51424 # would make configure fail if this is the last instruction.
51425 "$ac_cs_success" || { (exit 1); exit 1; }
51426 fi
51427
51428 test -z "$cf_make_docs" && cf_make_docs=0
51429
51430 cf_output=makefile
51431 test -f "$cf_output" || cf_output=Makefile
51432
51433 if test "$cf_make_docs" = 0
51434 then
51435 cat >>$cf_output <<CF_EOF
51436 ################################################################################
51437 ## generated by CF_MAKE_DOCS
51438 .SUFFIXES : .html .man .man .ps .pdf .txt
51439
51440 ${NROFF_NOTE}.man.txt :
51441 ${NROFF_NOTE} \$(SHELL) -c "tbl \$*.man | nroff -man | col -bx" >\$@
51442
51443 ${GROFF_NOTE}.ps.pdf :
51444 ${GROFF_NOTE} ps2pdf \$*.ps
51445 ${GROFF_NOTE}
51446 ${GROFF_NOTE}.man.ps :
51447 ${GROFF_NOTE} \$(SHELL) -c "tbl \$*.man | groff -man" >\$@
51448 ${GROFF_NOTE}
51449 ${GROFF_NOTE}.man.txt :
51450 ${GROFF_NOTE} GROFF_NO_SGR=stupid \$(SHELL) -c "tbl \$*.man | nroff -rHY=0 -Tascii -man | col -bx" >\$@
51451
51452 ${MAN2HTML_NOTE}.man.html :
51453 ${MAN2HTML_NOTE} ./${MAN2HTML_TEMP} \$* man man >\$@
51454
51455 CF_EOF
51456 cf_make_docs=1
51457 fi
51458
51459 for cf_name in lynx
51460 do
51461 cat >>$cf_output <<CF_EOF
51462 ################################################################################
51463 ${NROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
51464 ${MAN2HTML_NOTE}docs docs-$cf_name :: $cf_name.html
51465 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.pdf
51466 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.ps
51467 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
51468
51469 clean \\
51470 docs-clean ::
51471 ${NROFF_NOTE} rm -f $cf_name.txt
51472 ${MAN2HTML_NOTE} rm -f $cf_name.html
51473 ${GROFF_NOTE} rm -f $cf_name.pdf
51474 ${GROFF_NOTE} rm -f $cf_name.ps
51475 ${GROFF_NOTE} rm -f $cf_name.txt
51476
51477 ${NROFF_NOTE}$cf_name.txt : $cf_name.man
51478 ${MAN2HTML_NOTE}$cf_name.html : $cf_name.man
51479 ${GROFF_NOTE}$cf_name.pdf : $cf_name.ps
51480 ${GROFF_NOTE}$cf_name.ps : $cf_name.man
51481 ${GROFF_NOTE}$cf_name.txt : $cf_name.man
51482 CF_EOF
51483 done
51484