Debian Codegraph @

configure

raw
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20250126.
4 #
5 # Copyright 2003-2022,2023 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26 emulate sh
27 NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29 set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36 as_expr="expr"
37 else
38 as_expr="false"
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
48 as_ln_s='cp -p'
49 else
50 as_ln_s='ln -s'
51 fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53 as_ln_s='ln'
54 else
55 as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63 as_unset="unset"
64 else
65 as_unset="false"
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS=" $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS=
101 MAKEFLAGS=
102 SHELL=${CONFIG_SHELL-/bin/sh}
103
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
108
109 ac_unique_file="luit.c"
110 # Factoring default headers for most tests.
111 ac_includes_default="\
112 #include <stdio.h>
113 #if HAVE_SYS_TYPES_H
114 # include <sys/types.h>
115 #endif
116 #if HAVE_SYS_STAT_H
117 # include <sys/stat.h>
118 #endif
119 #if STDC_HEADERS
120 # include <stdlib.h>
121 # include <stddef.h>
122 #else
123 # if HAVE_STDLIB_H
124 # include <stdlib.h>
125 # endif
126 #endif
127 #if HAVE_STRING_H
128 # if !STDC_HEADERS && HAVE_MEMORY_H
129 # include <memory.h>
130 # endif
131 # include <string.h>
132 #endif
133 #if HAVE_STRINGS_H
134 # include <strings.h>
135 #endif
136 #if HAVE_INTTYPES_H
137 # include <inttypes.h>
138 #else
139 # if HAVE_STDINT_H
140 # include <stdint.h>
141 # endif
142 #endif
143 #if HAVE_UNISTD_H
144 # include <unistd.h>
145 #endif"
146
147 # Initialize some variables set by options.
148 ac_init_help=
149 ac_init_version=false
150 # The variables have the same names as the options, with
151 # dashes changed to underlines.
152 cache_file=/dev/null
153 exec_prefix=NONE
154 no_create=
155 no_recursion=
156 prefix=NONE
157 program_prefix=NONE
158 program_suffix=NONE
159 program_transform_name=s,x,x,
160 silent=
161 site=
162 srcdir=
163 verbose=
164 x_includes=NONE
165 x_libraries=NONE
166
167 # Installation directory options.
168 # These are left unexpanded so users can "make install exec_prefix=/foo"
169 # and all the variables that are supposed to be based on exec_prefix
170 # by default will actually change.
171 # Use braces instead of parens because sh, perl, etc. also accept them.
172 bindir='${exec_prefix}/bin'
173 sbindir='${exec_prefix}/sbin'
174 libexecdir='${exec_prefix}/libexec'
175 datarootdir='${prefix}/share'
176 datadir='${datarootdir}'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 runstatedir='${localstatedir}/run'
181 libdir='${exec_prefix}/lib'
182 includedir='${prefix}/include'
183 oldincludedir='/usr/include'
184 infodir='${datarootdir}/info'
185 mandir='${datarootdir}/man'
186
187 # Identity of this package.
188 PACKAGE_NAME=
189 PACKAGE_TARNAME=
190 PACKAGE_VERSION=
191 PACKAGE_STRING=
192 PACKAGE_BUGREPORT=
193
194 ac_prev=
195 for ac_option
196 do
197 # If the previous option needs an argument, assign it.
198 if test -n "$ac_prev"; then
199 eval "$ac_prev=\$ac_option"
200 ac_prev=
201 continue
202 fi
203
204 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205
206 # Accept the important Cygnus configure options, so we can diagnose typos.
207
208 case "$ac_option" in
209
210 -bindir | --bindir | --bindi | --bind | --bin | --bi)
211 ac_prev=bindir ;;
212 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213 bindir=$ac_optarg ;;
214
215 -build | --build | --buil | --bui | --bu)
216 ac_prev=build_alias ;;
217 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218 build_alias=$ac_optarg ;;
219
220 -cache-file | --cache-file | --cache-fil | --cache-fi \
221 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222 ac_prev=cache_file ;;
223 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225 cache_file=$ac_optarg ;;
226
227 --config-cache | -C)
228 cache_file=config.cache ;;
229
230 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231 ac_prev=datadir ;;
232 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233 | --da=*)
234 datadir=$ac_optarg ;;
235
236 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237 | --dataroo | --dataro | --datar)
238 ac_prev=datarootdir ;;
239 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241 datarootdir=$ac_optarg ;;
242
243 -disable-* | --disable-*)
244 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245 # Reject names that are not valid shell variable names.
246 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248 { (exit 1); exit 1; }; }
249 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250 eval "enable_$ac_feature=no" ;;
251
252 -enable-* | --enable-*)
253 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254 # Reject names that are not valid shell variable names.
255 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257 { (exit 1); exit 1; }; }
258 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
259 case "$ac_option" in
260 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261 *) ac_optarg=yes ;;
262 esac
263 eval "enable_$ac_feature='$ac_optarg'" ;;
264
265 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267 | --exec | --exe | --ex)
268 ac_prev=exec_prefix ;;
269 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271 | --exec=* | --exe=* | --ex=*)
272 exec_prefix=$ac_optarg ;;
273
274 -gas | --gas | --ga | --g)
275 # Obsolete; use --with-gas.
276 with_gas=yes ;;
277
278 -help | --help | --hel | --he | -h)
279 ac_init_help=long ;;
280 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281 ac_init_help=recursive ;;
282 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283 ac_init_help=short ;;
284
285 -host | --host | --hos | --ho)
286 ac_prev=host_alias ;;
287 -host=* | --host=* | --hos=* | --ho=*)
288 host_alias=$ac_optarg ;;
289
290 -includedir | --includedir | --includedi | --included | --include \
291 | --includ | --inclu | --incl | --inc)
292 ac_prev=includedir ;;
293 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294 | --includ=* | --inclu=* | --incl=* | --inc=*)
295 includedir=$ac_optarg ;;
296
297 -infodir | --infodir | --infodi | --infod | --info | --inf)
298 ac_prev=infodir ;;
299 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300 infodir=$ac_optarg ;;
301
302 -libdir | --libdir | --libdi | --libd)
303 ac_prev=libdir ;;
304 -libdir=* | --libdir=* | --libdi=* | --libd=*)
305 libdir=$ac_optarg ;;
306
307 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308 | --libexe | --libex | --libe)
309 ac_prev=libexecdir ;;
310 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311 | --libexe=* | --libex=* | --libe=*)
312 libexecdir=$ac_optarg ;;
313
314 -localstatedir | --localstatedir | --localstatedi | --localstated \
315 | --localstate | --localstat | --localsta | --localst \
316 | --locals | --local | --loca | --loc | --lo)
317 ac_prev=localstatedir ;;
318 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321 localstatedir=$ac_optarg ;;
322
323 -runstatedir | --runstatedir | --runstatedi | --runstated \
324 | --runstate | --runstat | --runsta | --runst \
325 | --runs | --run | --ru)
326 ac_prev=runstatedir ;;
327 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329 | --runs=* | --run=* | --ru=*)
330 runstatedir=$ac_optarg ;;
331
332 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333 ac_prev=mandir ;;
334 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335 mandir=$ac_optarg ;;
336
337 -nfp | --nfp | --nf)
338 # Obsolete; use --without-fp.
339 with_fp=no ;;
340
341 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342 | --no-cr | --no-c)
343 no_create=yes ;;
344
345 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347 no_recursion=yes ;;
348
349 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351 | --oldin | --oldi | --old | --ol | --o)
352 ac_prev=oldincludedir ;;
353 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356 oldincludedir=$ac_optarg ;;
357
358 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359 ac_prev=prefix ;;
360 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361 prefix=$ac_optarg ;;
362
363 -program-prefix | --program-prefix | --program-prefi | --program-pref \
364 | --program-pre | --program-pr | --program-p)
365 ac_prev=program_prefix ;;
366 -program-prefix=* | --program-prefix=* | --program-prefi=* \
367 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368 program_prefix=$ac_optarg ;;
369
370 -program-suffix | --program-suffix | --program-suffi | --program-suff \
371 | --program-suf | --program-su | --program-s)
372 ac_prev=program_suffix ;;
373 -program-suffix=* | --program-suffix=* | --program-suffi=* \
374 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375 program_suffix=$ac_optarg ;;
376
377 -program-transform-name | --program-transform-name \
378 | --program-transform-nam | --program-transform-na \
379 | --program-transform-n | --program-transform- \
380 | --program-transform | --program-transfor \
381 | --program-transfo | --program-transf \
382 | --program-trans | --program-tran \
383 | --progr-tra | --program-tr | --program-t)
384 ac_prev=program_transform_name ;;
385 -program-transform-name=* | --program-transform-name=* \
386 | --program-transform-nam=* | --program-transform-na=* \
387 | --program-transform-n=* | --program-transform-=* \
388 | --program-transform=* | --program-transfor=* \
389 | --program-transfo=* | --program-transf=* \
390 | --program-trans=* | --program-tran=* \
391 | --progr-tra=* | --program-tr=* | --program-t=*)
392 program_transform_name=$ac_optarg ;;
393
394 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395 | -silent | --silent | --silen | --sile | --sil)
396 silent=yes ;;
397
398 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399 ac_prev=sbindir ;;
400 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401 | --sbi=* | --sb=*)
402 sbindir=$ac_optarg ;;
403
404 -sharedstatedir | --sharedstatedir | --sharedstatedi \
405 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406 | --sharedst | --shareds | --shared | --share | --shar \
407 | --sha | --sh)
408 ac_prev=sharedstatedir ;;
409 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412 | --sha=* | --sh=*)
413 sharedstatedir=$ac_optarg ;;
414
415 -site | --site | --sit)
416 ac_prev=site ;;
417 -site=* | --site=* | --sit=*)
418 site=$ac_optarg ;;
419
420 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421 ac_prev=srcdir ;;
422 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423 srcdir=$ac_optarg ;;
424
425 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426 | --syscon | --sysco | --sysc | --sys | --sy)
427 ac_prev=sysconfdir ;;
428 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430 sysconfdir=$ac_optarg ;;
431
432 -target | --target | --targe | --targ | --tar | --ta | --t)
433 ac_prev=target_alias ;;
434 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435 target_alias=$ac_optarg ;;
436
437 -v | -verbose | --verbose | --verbos | --verbo | --verb)
438 verbose=yes ;;
439
440 -version | --version | --versio | --versi | --vers | -V)
441 ac_init_version=: ;;
442
443 -with-* | --with-*)
444 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445 # Reject names that are not valid shell variable names.
446 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447 { echo "$as_me: error: invalid package name: $ac_package" >&2
448 { (exit 1); exit 1; }; }
449 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
450 case "$ac_option" in
451 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
452 *) ac_optarg=yes ;;
453 esac
454 eval "with_$ac_package='$ac_optarg'" ;;
455
456 -without-* | --without-*)
457 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458 # Reject names that are not valid shell variable names.
459 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460 { echo "$as_me: error: invalid package name: $ac_package" >&2
461 { (exit 1); exit 1; }; }
462 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463 eval "with_$ac_package=no" ;;
464
465 --x)
466 # Obsolete; use --with-x.
467 with_x=yes ;;
468
469 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470 | --x-incl | --x-inc | --x-in | --x-i)
471 ac_prev=x_includes ;;
472 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474 x_includes=$ac_optarg ;;
475
476 -x-libraries | --x-libraries | --x-librarie | --x-librari \
477 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478 ac_prev=x_libraries ;;
479 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481 x_libraries=$ac_optarg ;;
482
483 -*dir | -dvi* | -doc* | -html* | -local* | -pdf* | -ps* )
484 echo "$as_me: WARNING: unsupported option: $ac_option" >&2
485 ;;
486
487 -*) { echo "$as_me: error: unrecognized option: $ac_option
488 Try \`$0 --help' for more information." >&2
489 { (exit 1); exit 1; }; }
490 ;;
491
492 *=*)
493 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
494 # Reject names that are not valid shell variable names.
495 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
496 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
497 { (exit 1); exit 1; }; }
498 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
499 eval "$ac_envvar='$ac_optarg'"
500 export "$ac_envvar" ;;
501
502 *)
503 # FIXME: should be removed in autoconf 3.0.
504 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
505 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
506 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
507 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
508 ;;
509
510 esac
511 done
512
513 if test -n "$ac_prev"; then
514 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
515 { echo "$as_me: error: missing argument to $ac_option" >&2
516 { (exit 1); exit 1; }; }
517 fi
518
519 # Be sure to have absolute paths.
520 for ac_var in exec_prefix prefix
521 do
522 eval ac_val=$`echo "$ac_var"`
523 case "$ac_val" in
524 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
525 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
526 { (exit 1); exit 1; }; };;
527 esac
528 done
529
530 # Be sure to have absolute paths.
531 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
532 localstatedir libdir includedir oldincludedir infodir mandir
533 do
534 eval ac_val=$`echo "$ac_var"`
535 case "$ac_val" in
536 [\\/$]* | ?:[\\/]* ) ;;
537 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
538 { (exit 1); exit 1; }; };;
539 esac
540 done
541
542 # There might be people who depend on the old broken behavior: `$host'
543 # used to hold the argument of --host etc.
544 build=$build_alias
545 host=$host_alias
546 target=$target_alias
547
548 # FIXME: should be removed in autoconf 3.0.
549 if test "x$host_alias" != x; then
550 if test "x$build_alias" = x; then
551 cross_compiling=maybe
552 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
553 If a cross compiler is detected then cross compile mode will be used." >&2
554 elif test "x$build_alias" != "x$host_alias"; then
555 cross_compiling=yes
556 fi
557 fi
558
559 ac_tool_prefix=
560 test -n "$host_alias" && ac_tool_prefix=$host_alias-
561
562 test "$silent" = yes && exec 6>/dev/null
563
564 # Find the source files, if location was not specified.
565 if test -z "$srcdir"; then
566 ac_srcdir_defaulted=yes
567 # Try the directory containing this script, then its parent.
568 ac_prog=$0
569 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
570 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
571 srcdir=$ac_confdir
572 if test ! -r "$srcdir/$ac_unique_file"; then
573 srcdir=..
574 fi
575 else
576 ac_srcdir_defaulted=no
577 fi
578 if test ! -r "$srcdir/$ac_unique_file"; then
579 if test "$ac_srcdir_defaulted" = yes; then
580 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
581 { (exit 1); exit 1; }; }
582 else
583 { echo "$as_me: error: cannot find sources in $srcdir" >&2
584 { (exit 1); exit 1; }; }
585 fi
586 fi
587 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
588 ac_env_build_alias_set=${build_alias+set}
589 ac_env_build_alias_value=$build_alias
590 ac_cv_env_build_alias_set=${build_alias+set}
591 ac_cv_env_build_alias_value=$build_alias
592 ac_env_host_alias_set=${host_alias+set}
593 ac_env_host_alias_value=$host_alias
594 ac_cv_env_host_alias_set=${host_alias+set}
595 ac_cv_env_host_alias_value=$host_alias
596 ac_env_target_alias_set=${target_alias+set}
597 ac_env_target_alias_value=$target_alias
598 ac_cv_env_target_alias_set=${target_alias+set}
599 ac_cv_env_target_alias_value=$target_alias
600 ac_env_CC_set=${CC+set}
601 ac_env_CC_value=$CC
602 ac_cv_env_CC_set=${CC+set}
603 ac_cv_env_CC_value=$CC
604 ac_env_CFLAGS_set=${CFLAGS+set}
605 ac_env_CFLAGS_value=$CFLAGS
606 ac_cv_env_CFLAGS_set=${CFLAGS+set}
607 ac_cv_env_CFLAGS_value=$CFLAGS
608 ac_env_LDFLAGS_set=${LDFLAGS+set}
609 ac_env_LDFLAGS_value=$LDFLAGS
610 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
611 ac_cv_env_LDFLAGS_value=$LDFLAGS
612 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
613 ac_env_CPPFLAGS_value=$CPPFLAGS
614 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
615 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
616 ac_env_CPP_set=${CPP+set}
617 ac_env_CPP_value=$CPP
618 ac_cv_env_CPP_set=${CPP+set}
619 ac_cv_env_CPP_value=$CPP
620
621 #
622 # Report the --help message.
623 #
624 if test "$ac_init_help" = "long"; then
625 # Omit some internal or obsolete options to make the list less imposing.
626 # This message is too long to be a string in the A/UX 3.1 sh.
627 cat <<EOF
628 \`configure' configures this package to adapt to many kinds of systems.
629
630 Usage: $0 [OPTION]... [VAR=VALUE]...
631
632 To assign environment variables (e.g., CC, CFLAGS...), specify them as
633 VAR=VALUE. See below for descriptions of some of the useful variables.
634
635 Defaults for the options are specified in brackets.
636
637 Configuration:
638 -h, --help display this help and exit
639 --help=short display options specific to this package
640 --help=recursive display the short help of all the included packages
641 -V, --version display version information and exit
642 -q, --quiet, --silent do not print \`checking...' messages
643 --cache-file=FILE cache test results in FILE [disabled]
644 -C, --config-cache alias for \`--cache-file=config.cache'
645 -n, --no-create do not create output files
646 --srcdir=DIR find the sources in DIR [configure dir or \`..']
647
648 EOF
649
650 cat <<EOF
651 Installation directories:
652 --prefix=PREFIX install architecture-independent files in PREFIX
653 [$ac_default_prefix]
654 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
655 [PREFIX]
656
657 By default, \`make install' will install all the files in
658 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
659 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
660 for instance \`--prefix=\$HOME'.
661
662 For better control, use the options below.
663
664 Fine tuning of the installation directories:
665 --bindir=DIR user executables [EPREFIX/bin]
666 --sbindir=DIR system admin executables [EPREFIX/sbin]
667 --libexecdir=DIR program executables [EPREFIX/libexec]
668 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
669 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
670 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
671 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
672 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
673 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
674 --libdir=DIR object code libraries [EPREFIX/lib]
675 --includedir=DIR C header files [PREFIX/include]
676 --oldincludedir=DIR C header files for non-gcc [/usr/include]
677 --infodir=DIR info documentation [DATAROOTDIR/info]
678 --mandir=DIR man documentation [DATAROOTDIR/man]
679 EOF
680
681 cat <<\EOF
682
683 Program names:
684 --program-prefix=PREFIX prepend PREFIX to installed program names
685 --program-suffix=SUFFIX append SUFFIX to installed program names
686 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
687
688 System types:
689 --build=BUILD configure for building on BUILD [guessed]
690 --host=HOST build programs to run on HOST [BUILD]
691 --target=TARGET configure for building compilers for TARGET [HOST]
692 EOF
693 fi
694
695 if test -n "$ac_init_help"; then
696
697 cat <<\EOF
698
699 Optional Packages:
700 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
701 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
702
703 Optional Features:
704 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
705 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
706
707 --with-system-type=XXX test: override derived host system-type
708 --disable-echo do not display "compiling" commands
709 --enable-warnings test: turn on gcc compiler warnings
710 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
711 --enable-fontenc enable/disable use of fontenc
712 --disable-iconv enable/disable use of iconv
713 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
714 --with-fontenc-cflags -D/-I options for compiling with font encoding library
715 --with-fontenc-libs -L/-l options to link font encoding library
716 --with-libiconv-prefix=DIR
717 search for libiconv in DIR/include and DIR/lib
718 --with-encodings-dir[=XXX] file used for encodings directory (default: auto)
719 --with-locale-alias[=XXX] file used for locale aliases (default: auto)
720 --with-man2html[=XXX] use XXX rather than groff
721 --with-dmalloc test: use Gray Watson's dmalloc library
722 --with-dbmalloc test: use Conor Cahill's dbmalloc library
723 --with-valgrind test: use valgrind
724 --disable-leaks test: free permanent memory, analyze leaks
725 --enable-trace test: turn on debug-tracing
726 --disable-rpath-hack don't add rpath options for additional libraries
727
728 Some influential environment variables:
729 CC C compiler command
730 CFLAGS C compiler flags
731 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
732 nonstandard directory <lib dir>
733 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
734 headers in a nonstandard directory <include dir>
735 CPP C preprocessor
736
737 Use these variables to override the choices made by `configure' or to help
738 it to find libraries and programs with nonstandard names/locations.
739
740 EOF
741 fi
742
743 if test "$ac_init_help" = "recursive"; then
744 # If there are subdirs, report their specific --help.
745 ac_popdir=`pwd`
746 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
747 cd "$ac_subdir"
748 # A "../" for each directory in /$ac_subdir.
749 ac_dots=`echo "$ac_subdir" |
750 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
751
752 case "$srcdir" in
753 .) # No --srcdir option. We are building in place.
754 ac_sub_srcdir="$srcdir" ;;
755 [\\/]* | ?:[\\/]* ) # Absolute path.
756 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
757 *) # Relative path.
758 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
759 esac
760
761 # Check for guested configure; otherwise get Cygnus style configure.
762 if test -f "$ac_sub_srcdir/configure.gnu"; then
763 echo
764 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
765 elif test -f "$ac_sub_srcdir/configure"; then
766 echo
767 $SHELL "$ac_sub_srcdir/configure" --help=recursive
768 elif test -f "$ac_sub_srcdir/configure.ac" ||
769 test -f "$ac_sub_srcdir/configure.in"; then
770 echo
771 "$ac_configure" --help
772 else
773 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
774 fi
775 cd "$ac_popdir"
776 done
777 fi
778
779 test -n "$ac_init_help" && exit 0
780 if "$ac_init_version"; then
781 cat <<\EOF
782
783 Copyright 2003-2022,2023 Thomas E. Dickey
784 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
785 Free Software Foundation, Inc.
786 This configure script is free software; the Free Software Foundation
787 gives unlimited permission to copy, distribute and modify it.
788 EOF
789 exit 0
790 fi
791 exec 5>config.log
792 cat >&5 <<EOF
793 This file contains any messages produced by compilers while
794 running configure, to aid debugging if configure makes a mistake.
795
796 It was created by $as_me, which was
797 generated by GNU Autoconf 2.52.20250126. Invocation command line was
798
799 $ $0 $@
800
801 EOF
802 {
803 cat <<_ASUNAME
804 ## ---------- ##
805 ## Platform. ##
806 ## ---------- ##
807
808 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
809 uname -m = `(uname -m) 2>/dev/null || echo unknown`
810 uname -r = `(uname -r) 2>/dev/null || echo unknown`
811 uname -s = `(uname -s) 2>/dev/null || echo unknown`
812 uname -v = `(uname -v) 2>/dev/null || echo unknown`
813
814 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
815 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
816
817 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
818 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
819 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
820 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
821 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
822 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
823 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
824
825 PATH = $PATH
826
827 _ASUNAME
828 } >&5
829
830 cat >&5 <<EOF
831 ## ------------ ##
832 ## Core tests. ##
833 ## ------------ ##
834
835 EOF
836
837 # Keep a trace of the command line.
838 # Strip out --no-create and --no-recursion so they do not pile up.
839 # Also quote any args containing shell meta-characters.
840 ac_configure_args=
841 ac_sep=
842 for ac_arg
843 do
844 case "$ac_arg" in
845 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
846 | --no-cr | --no-c) ;;
847 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
848 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
849 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
850 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
851 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
852 ac_sep=" " ;;
853 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
854 ac_sep=" " ;;
855 esac
856 # Get rid of the leading space.
857 done
858
859 # When interrupted or exit'd, cleanup temporary files, and complete
860 # config.log. We remove comments because anyway the quotes in there
861 # would cause problems or look ugly.
862 trap 'exit_status=$?
863 # Save into config.log some information that might help in debugging.
864 echo >&5
865 echo "## ----------------- ##" >&5
866 echo "## Cache variables. ##" >&5
867 echo "## ----------------- ##" >&5
868 echo >&5
869 # The following way of writing the cache mishandles newlines in values,
870 {
871 (set) 2>&1 |
872 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
873 *ac_space=\ *)
874 sed -n \
875 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
876 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
877 ;;
878 *)
879 sed -n \
880 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
881 ;;
882 esac;
883 } >&5
884 sed "/^$/d" confdefs.h >conftest.log
885 if test -s conftest.log; then
886 echo >&5
887 echo "## ------------ ##" >&5
888 echo "## confdefs.h. ##" >&5
889 echo "## ------------ ##" >&5
890 echo >&5
891 cat conftest.log >&5
892 fi
893 (echo; echo) >&5
894 test "$ac_signal" != 0 &&
895 echo "$as_me: caught signal $ac_signal" >&5
896 echo "$as_me: exit $exit_status" >&5
897 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
898 exit $exit_status
899 ' 0
900 for ac_signal in 1 2 13 15; do
901 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
902 done
903 ac_signal=0
904
905 # confdefs.h avoids OS command line length limits that DEFS can exceed.
906 rm -rf conftest* confdefs.h
907 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
908 echo >confdefs.h
909
910 # Let the site file select an alternate cache file if it wants to.
911 # Prefer explicitly selected file to automatically selected ones.
912 if test -z "$CONFIG_SITE"; then
913 if test "x$prefix" != xNONE; then
914 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
915 else
916 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
917 fi
918 fi
919 for ac_site_file in $CONFIG_SITE; do
920 if test -r "$ac_site_file"; then
921 { echo "$as_me:921: loading site script $ac_site_file" >&5
922 echo "$as_me: loading site script $ac_site_file" >&6;}
923 cat "$ac_site_file" >&5
924 . "$ac_site_file"
925 fi
926 done
927
928 if test -r "$cache_file"; then
929 # Some versions of bash will fail to source /dev/null (special
930 # files actually), so we avoid doing that.
931 if test -f "$cache_file"; then
932 { echo "$as_me:932: loading cache $cache_file" >&5
933 echo "$as_me: loading cache $cache_file" >&6;}
934 case $cache_file in
935 [\\/]* | ?:[\\/]* ) . $cache_file;;
936 *) . ./$cache_file;;
937 esac
938 fi
939 else
940 { echo "$as_me:940: creating cache $cache_file" >&5
941 echo "$as_me: creating cache $cache_file" >&6;}
942 >$cache_file
943 fi
944
945 # Check that the precious variables saved in the cache have kept the same
946 # value.
947 ac_cache_corrupted=false
948 for ac_var in `(set) 2>&1 |
949 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
950 eval ac_old_set=\$ac_cv_env_${ac_var}_set
951 eval ac_new_set=\$ac_env_${ac_var}_set
952 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
953 eval ac_new_val="\$ac_env_${ac_var}_value"
954 case "$ac_old_set,$ac_new_set" in
955 set,)
956 { echo "$as_me:956: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
957 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
958 ac_cache_corrupted=: ;;
959 ,set)
960 { echo "$as_me:960: error: \`$ac_var' was not set in the previous run" >&5
961 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
962 ac_cache_corrupted=: ;;
963 ,);;
964 *)
965 if test "x$ac_old_val" != "x$ac_new_val"; then
966 { echo "$as_me:966: error: \`$ac_var' has changed since the previous run:" >&5
967 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
968 { echo "$as_me:968: former value: $ac_old_val" >&5
969 echo "$as_me: former value: $ac_old_val" >&2;}
970 { echo "$as_me:970: current value: $ac_new_val" >&5
971 echo "$as_me: current value: $ac_new_val" >&2;}
972 ac_cache_corrupted=:
973 fi;;
974 esac
975 # Pass precious variables to config.status. It doesn't matter if
976 # we pass some twice (in addition to the command line arguments).
977 if test "$ac_new_set" = set; then
978 case "$ac_new_val" in
979 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
980 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
981 ac_configure_args="$ac_configure_args '$ac_arg'"
982 ;;
983 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
984 ;;
985 esac
986 fi
987 done
988 if "$ac_cache_corrupted"; then
989 { echo "$as_me:989: error: changes in the environment can compromise the build" >&5
990 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
991 { { echo "$as_me:991: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
992 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
993 { (exit 1); exit 1; }; }
994 fi
995
996 ac_ext=c
997 ac_cpp='$CPP $CPPFLAGS'
998 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
999 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1000 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1001 ac_main_return="return"
1002
1003 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1004 *c*,-n*) ECHO_N=
1005 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1006 ECHO_T=' '
1007 ;;
1008 *c*,* ) ECHO_N=-n
1009 ECHO_C=
1010 ECHO_T=
1011 ;;
1012 *) ECHO_N=
1013 ECHO_C='\c'
1014 ECHO_T=
1015 ;;
1016 esac
1017 echo "#! $SHELL" >conftest.sh
1018 echo "exit 0" >>conftest.sh
1019 chmod +x conftest.sh
1020 if { (echo "$as_me:1020: PATH=\".;.\"; conftest.sh") >&5
1021 (PATH=".;."; conftest.sh) 2>&5
1022 ac_status=$?
1023 echo "$as_me:1023: \$? = $ac_status" >&5
1024 (exit "$ac_status"); }; then
1025 ac_path_separator=';'
1026 else
1027 ac_path_separator=:
1028 fi
1029 PATH_SEPARATOR="$ac_path_separator"
1030 rm -f conftest.sh
1031
1032 ac_config_headers="$ac_config_headers config.h:config_h.in"
1033
1034 ac_aux_dir=
1035 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1036 if test -f "$ac_dir/install-sh"; then
1037 ac_aux_dir=$ac_dir
1038 ac_install_sh="$ac_aux_dir/install-sh -c"
1039 break
1040 elif test -f "$ac_dir/install.sh"; then
1041 ac_aux_dir=$ac_dir
1042 ac_install_sh="$ac_aux_dir/install.sh -c"
1043 break
1044 elif test -f "$ac_dir/shtool"; then
1045 ac_aux_dir=$ac_dir
1046 ac_install_sh="$ac_aux_dir/shtool install -c"
1047 break
1048 fi
1049 done
1050 if test -z "$ac_aux_dir"; then
1051 { { echo "$as_me:1051: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1052 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1053 { (exit 1); exit 1; }; }
1054 fi
1055 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1056 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1057 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1058
1059 # Make sure we can run config.sub.
1060 $ac_config_sub sun4 >/dev/null 2>&1 ||
1061 { { echo "$as_me:1061: error: cannot run $ac_config_sub" >&5
1062 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1063 { (exit 1); exit 1; }; }
1064
1065 echo "$as_me:1065: checking build system type" >&5
1066 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1067 if test "${ac_cv_build+set}" = set; then
1068 echo $ECHO_N "(cached) $ECHO_C" >&6
1069 else
1070 ac_cv_build_alias=$build_alias
1071 test -z "$ac_cv_build_alias" &&
1072 ac_cv_build_alias=`$ac_config_guess`
1073 test -z "$ac_cv_build_alias" &&
1074 { { echo "$as_me:1074: error: cannot guess build type; you must specify one" >&5
1075 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1076 { (exit 1); exit 1; }; }
1077 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1078 { { echo "$as_me:1078: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1079 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1080 { (exit 1); exit 1; }; }
1081
1082 fi
1083 echo "$as_me:1083: result: $ac_cv_build" >&5
1084 echo "${ECHO_T}$ac_cv_build" >&6
1085 build=$ac_cv_build
1086 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1087 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1088 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1089
1090 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1091 echo "$as_me:1091: checking host system type" >&5
1092 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1093 if test "${ac_cv_host+set}" = set; then
1094 echo $ECHO_N "(cached) $ECHO_C" >&6
1095 else
1096 ac_cv_host_alias=$host_alias
1097 test -z "$ac_cv_host_alias" &&
1098 ac_cv_host_alias=$ac_cv_build_alias
1099 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1100 { { echo "$as_me:1100: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1101 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1102 { (exit 1); exit 1; }; }
1103
1104 fi
1105 echo "$as_me:1105: result: $ac_cv_host" >&5
1106 echo "${ECHO_T}$ac_cv_host" >&6
1107 host=$ac_cv_host
1108 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1109 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1110 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1111
1112 system_name="$host_os"
1113 else
1114 system_name="`(uname -s -r) 2>/dev/null`"
1115 if test -z "$system_name" ; then
1116 system_name="`(hostname) 2>/dev/null`"
1117 fi
1118 fi
1119 test -n "$system_name" &&
1120 cat >>confdefs.h <<EOF
1121 #define SYSTEM_NAME "$system_name"
1122 EOF
1123
1124 if test "${cf_cv_system_name+set}" = set; then
1125 echo $ECHO_N "(cached) $ECHO_C" >&6
1126 else
1127 cf_cv_system_name="$system_name"
1128 fi
1129
1130 test -z "$system_name" && system_name="$cf_cv_system_name"
1131 test -n "$cf_cv_system_name" && echo "$as_me:1131: result: Configuring for $cf_cv_system_name" >&5
1132 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1133
1134 if test ".$system_name" != ".$cf_cv_system_name" ; then
1135 echo "$as_me:1135: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1136 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1137 { { echo "$as_me:1137: error: \"Please remove config.cache and try again.\"" >&5
1138 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1139 { (exit 1); exit 1; }; }
1140 fi
1141
1142 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1143 echo "$as_me:1143: checking target system type" >&5
1144 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1145 if test "${ac_cv_target+set}" = set; then
1146 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 else
1148 ac_cv_target_alias=$target_alias
1149 test "x$ac_cv_target_alias" = "x" &&
1150 ac_cv_target_alias=$ac_cv_host_alias
1151 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1152 { { echo "$as_me:1152: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1153 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1154 { (exit 1); exit 1; }; }
1155
1156 fi
1157 echo "$as_me:1157: result: $ac_cv_target" >&5
1158 echo "${ECHO_T}$ac_cv_target" >&6
1159 target=$ac_cv_target
1160 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1161 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1162 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163
1164 # The aliases save the names the user supplied, while $host etc.
1165 # will get canonicalized.
1166 test -n "$target_alias" &&
1167 test "$program_prefix$program_suffix$program_transform_name" = \
1168 NONENONEs,x,x, &&
1169 program_prefix=${target_alias}-
1170 system_name="$host_os"
1171 else
1172 system_name="`(uname -s -r) 2>/dev/null`"
1173 if test -z "$system_name" ; then
1174 system_name="`(hostname) 2>/dev/null`"
1175 fi
1176 fi
1177 test -n "$system_name" &&
1178 cat >>confdefs.h <<EOF
1179 #define SYSTEM_NAME "$system_name"
1180 EOF
1181
1182 if test "${cf_cv_system_name+set}" = set; then
1183 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 else
1185 cf_cv_system_name="$system_name"
1186 fi
1187
1188 test -z "$system_name" && system_name="$cf_cv_system_name"
1189 test -n "$cf_cv_system_name" && echo "$as_me:1189: result: Configuring for $cf_cv_system_name" >&5
1190 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191
1192 if test ".$system_name" != ".$cf_cv_system_name" ; then
1193 echo "$as_me:1193: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1194 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1195 { { echo "$as_me:1195: error: \"Please remove config.cache and try again.\"" >&5
1196 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1197 { (exit 1); exit 1; }; }
1198 fi
1199
1200 # Check whether --with-system-type or --without-system-type was given.
1201 if test "${with_system_type+set}" = set; then
1202 withval="$with_system_type"
1203 { echo "$as_me:1203: WARNING: overriding system type to $withval" >&5
1204 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1205 cf_cv_system_name=$withval
1206 host_os=$withval
1207
1208 fi;
1209
1210 case "$cf_cv_system_name" in
1211 (cygwin*|msys*|mingw32*|mingw64|os2*)
1212 GLOB_FULLPATH_POSIX='/*'
1213 GLOB_FULLPATH_OTHER='[a-zA-Z]:[\\/]*'
1214 ;;
1215 (*)
1216 GLOB_FULLPATH_POSIX='/*'
1217 GLOB_FULLPATH_OTHER=$GLOB_FULLPATH_POSIX
1218 ;;
1219 esac
1220
1221 test "$program_prefix" != NONE &&
1222 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1223 # Use a double $ so make ignores it.
1224 test "$program_suffix" != NONE &&
1225 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1226 # Double any \ or $. echo might interpret backslashes.
1227 # By default was `s,x,x', remove it if useless.
1228 cat <<\_ACEOF >conftest.sed
1229 s/[\\$]/&&/g;s/;s,x,x,$//
1230 _ACEOF
1231 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1232 rm conftest.sed
1233
1234 ac_ext=c
1235 ac_cpp='$CPP $CPPFLAGS'
1236 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1237 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1238 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1239 ac_main_return="return"
1240 if test -n "$ac_tool_prefix"; then
1241 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1242 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1243 echo "$as_me:1243: checking for $ac_word" >&5
1244 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1245 if test "${ac_cv_prog_CC+set}" = set; then
1246 echo $ECHO_N "(cached) $ECHO_C" >&6
1247 else
1248 if test -n "$CC"; then
1249 ac_cv_prog_CC="$CC" # Let the user override the test.
1250 else
1251 ac_save_IFS=$IFS; IFS=$ac_path_separator
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
1254 IFS=$ac_save_IFS
1255 test -z "$ac_dir" && ac_dir=.
1256 $as_executable_p "$ac_dir/$ac_word" || continue
1257 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1258 echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259 break
1260 done
1261
1262 fi
1263 fi
1264 CC=$ac_cv_prog_CC
1265 if test -n "$CC"; then
1266 echo "$as_me:1266: result: $CC" >&5
1267 echo "${ECHO_T}$CC" >&6
1268 else
1269 echo "$as_me:1269: result: no" >&5
1270 echo "${ECHO_T}no" >&6
1271 fi
1272
1273 fi
1274 if test -z "$ac_cv_prog_CC"; then
1275 ac_ct_CC=$CC
1276 # Extract the first word of "gcc", so it can be a program name with args.
1277 set dummy gcc; ac_word=$2
1278 echo "$as_me:1278: checking for $ac_word" >&5
1279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1280 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1281 echo $ECHO_N "(cached) $ECHO_C" >&6
1282 else
1283 if test -n "$ac_ct_CC"; then
1284 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1285 else
1286 ac_save_IFS=$IFS; IFS=$ac_path_separator
1287 ac_dummy="$PATH"
1288 for ac_dir in $ac_dummy; do
1289 IFS=$ac_save_IFS
1290 test -z "$ac_dir" && ac_dir=.
1291 $as_executable_p "$ac_dir/$ac_word" || continue
1292 ac_cv_prog_ac_ct_CC="gcc"
1293 echo "$as_me:1293: found $ac_dir/$ac_word" >&5
1294 break
1295 done
1296
1297 fi
1298 fi
1299 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1300 if test -n "$ac_ct_CC"; then
1301 echo "$as_me:1301: result: $ac_ct_CC" >&5
1302 echo "${ECHO_T}$ac_ct_CC" >&6
1303 else
1304 echo "$as_me:1304: result: no" >&5
1305 echo "${ECHO_T}no" >&6
1306 fi
1307
1308 CC=$ac_ct_CC
1309 else
1310 CC="$ac_cv_prog_CC"
1311 fi
1312
1313 if test -z "$CC"; then
1314 if test -n "$ac_tool_prefix"; then
1315 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1316 set dummy ${ac_tool_prefix}cc; ac_word=$2
1317 echo "$as_me:1317: checking for $ac_word" >&5
1318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1319 if test "${ac_cv_prog_CC+set}" = set; then
1320 echo $ECHO_N "(cached) $ECHO_C" >&6
1321 else
1322 if test -n "$CC"; then
1323 ac_cv_prog_CC="$CC" # Let the user override the test.
1324 else
1325 ac_save_IFS=$IFS; IFS=$ac_path_separator
1326 ac_dummy="$PATH"
1327 for ac_dir in $ac_dummy; do
1328 IFS=$ac_save_IFS
1329 test -z "$ac_dir" && ac_dir=.
1330 $as_executable_p "$ac_dir/$ac_word" || continue
1331 ac_cv_prog_CC="${ac_tool_prefix}cc"
1332 echo "$as_me:1332: found $ac_dir/$ac_word" >&5
1333 break
1334 done
1335
1336 fi
1337 fi
1338 CC=$ac_cv_prog_CC
1339 if test -n "$CC"; then
1340 echo "$as_me:1340: result: $CC" >&5
1341 echo "${ECHO_T}$CC" >&6
1342 else
1343 echo "$as_me:1343: result: no" >&5
1344 echo "${ECHO_T}no" >&6
1345 fi
1346
1347 fi
1348 if test -z "$ac_cv_prog_CC"; then
1349 ac_ct_CC=$CC
1350 # Extract the first word of "cc", so it can be a program name with args.
1351 set dummy cc; ac_word=$2
1352 echo "$as_me:1352: checking for $ac_word" >&5
1353 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1354 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1355 echo $ECHO_N "(cached) $ECHO_C" >&6
1356 else
1357 if test -n "$ac_ct_CC"; then
1358 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1359 else
1360 ac_save_IFS=$IFS; IFS=$ac_path_separator
1361 ac_dummy="$PATH"
1362 for ac_dir in $ac_dummy; do
1363 IFS=$ac_save_IFS
1364 test -z "$ac_dir" && ac_dir=.
1365 $as_executable_p "$ac_dir/$ac_word" || continue
1366 ac_cv_prog_ac_ct_CC="cc"
1367 echo "$as_me:1367: found $ac_dir/$ac_word" >&5
1368 break
1369 done
1370
1371 fi
1372 fi
1373 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1374 if test -n "$ac_ct_CC"; then
1375 echo "$as_me:1375: result: $ac_ct_CC" >&5
1376 echo "${ECHO_T}$ac_ct_CC" >&6
1377 else
1378 echo "$as_me:1378: result: no" >&5
1379 echo "${ECHO_T}no" >&6
1380 fi
1381
1382 CC=$ac_ct_CC
1383 else
1384 CC="$ac_cv_prog_CC"
1385 fi
1386
1387 fi
1388 if test -z "$CC"; then
1389 # Extract the first word of "cc", so it can be a program name with args.
1390 set dummy cc; ac_word=$2
1391 echo "$as_me:1391: checking for $ac_word" >&5
1392 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1393 if test "${ac_cv_prog_CC+set}" = set; then
1394 echo $ECHO_N "(cached) $ECHO_C" >&6
1395 else
1396 if test -n "$CC"; then
1397 ac_cv_prog_CC="$CC" # Let the user override the test.
1398 else
1399 ac_prog_rejected=no
1400 ac_save_IFS=$IFS; IFS=$ac_path_separator
1401 ac_dummy="$PATH"
1402 for ac_dir in $ac_dummy; do
1403 IFS=$ac_save_IFS
1404 test -z "$ac_dir" && ac_dir=.
1405 $as_executable_p "$ac_dir/$ac_word" || continue
1406 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1407 ac_prog_rejected=yes
1408 continue
1409 fi
1410 ac_cv_prog_CC="cc"
1411 echo "$as_me:1411: found $ac_dir/$ac_word" >&5
1412 break
1413 done
1414
1415 if test "$ac_prog_rejected" = yes; then
1416 # We found a bogon in the path, so make sure we never use it.
1417 set dummy $ac_cv_prog_CC
1418 shift
1419 if test $# != 0; then
1420 # We chose a different compiler from the bogus one.
1421 # However, it has the same basename, so the bogon will be chosen
1422 # first if we set CC to just the basename; use the full file name.
1423 shift
1424 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1425 shift
1426 ac_cv_prog_CC="$@"
1427 fi
1428 fi
1429 fi
1430 fi
1431 CC=$ac_cv_prog_CC
1432 if test -n "$CC"; then
1433 echo "$as_me:1433: result: $CC" >&5
1434 echo "${ECHO_T}$CC" >&6
1435 else
1436 echo "$as_me:1436: result: no" >&5
1437 echo "${ECHO_T}no" >&6
1438 fi
1439
1440 fi
1441 if test -z "$CC"; then
1442 if test -n "$ac_tool_prefix"; then
1443 for ac_prog in cl
1444 do
1445 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1446 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1447 echo "$as_me:1447: checking for $ac_word" >&5
1448 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1449 if test "${ac_cv_prog_CC+set}" = set; then
1450 echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452 if test -n "$CC"; then
1453 ac_cv_prog_CC="$CC" # Let the user override the test.
1454 else
1455 ac_save_IFS=$IFS; IFS=$ac_path_separator
1456 ac_dummy="$PATH"
1457 for ac_dir in $ac_dummy; do
1458 IFS=$ac_save_IFS
1459 test -z "$ac_dir" && ac_dir=.
1460 $as_executable_p "$ac_dir/$ac_word" || continue
1461 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1462 echo "$as_me:1462: found $ac_dir/$ac_word" >&5
1463 break
1464 done
1465
1466 fi
1467 fi
1468 CC=$ac_cv_prog_CC
1469 if test -n "$CC"; then
1470 echo "$as_me:1470: result: $CC" >&5
1471 echo "${ECHO_T}$CC" >&6
1472 else
1473 echo "$as_me:1473: result: no" >&5
1474 echo "${ECHO_T}no" >&6
1475 fi
1476
1477 test -n "$CC" && break
1478 done
1479 fi
1480 if test -z "$CC"; then
1481 ac_ct_CC=$CC
1482 for ac_prog in cl
1483 do
1484 # Extract the first word of "$ac_prog", so it can be a program name with args.
1485 set dummy $ac_prog; ac_word=$2
1486 echo "$as_me:1486: checking for $ac_word" >&5
1487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1489 echo $ECHO_N "(cached) $ECHO_C" >&6
1490 else
1491 if test -n "$ac_ct_CC"; then
1492 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1493 else
1494 ac_save_IFS=$IFS; IFS=$ac_path_separator
1495 ac_dummy="$PATH"
1496 for ac_dir in $ac_dummy; do
1497 IFS=$ac_save_IFS
1498 test -z "$ac_dir" && ac_dir=.
1499 $as_executable_p "$ac_dir/$ac_word" || continue
1500 ac_cv_prog_ac_ct_CC="$ac_prog"
1501 echo "$as_me:1501: found $ac_dir/$ac_word" >&5
1502 break
1503 done
1504
1505 fi
1506 fi
1507 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1508 if test -n "$ac_ct_CC"; then
1509 echo "$as_me:1509: result: $ac_ct_CC" >&5
1510 echo "${ECHO_T}$ac_ct_CC" >&6
1511 else
1512 echo "$as_me:1512: result: no" >&5
1513 echo "${ECHO_T}no" >&6
1514 fi
1515
1516 test -n "$ac_ct_CC" && break
1517 done
1518
1519 CC=$ac_ct_CC
1520 fi
1521
1522 fi
1523
1524 test -z "$CC" && { { echo "$as_me:1524: error: no acceptable cc found in \$PATH" >&5
1525 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1526 { (exit 1); exit 1; }; }
1527
1528 # Provide some information about the compiler.
1529 echo "$as_me:1529:" \
1530 "checking for C compiler version" >&5
1531 ac_compiler=`set X $ac_compile; echo "$2"`
1532 { (eval echo "$as_me:1532: \"$ac_compiler --version </dev/null >&5\"") >&5
1533 (eval $ac_compiler --version </dev/null >&5) 2>&5
1534 ac_status=$?
1535 echo "$as_me:1535: \$? = $ac_status" >&5
1536 (exit "$ac_status"); }
1537 { (eval echo "$as_me:1537: \"$ac_compiler -v </dev/null >&5\"") >&5
1538 (eval $ac_compiler -v </dev/null >&5) 2>&5
1539 ac_status=$?
1540 echo "$as_me:1540: \$? = $ac_status" >&5
1541 (exit "$ac_status"); }
1542 { (eval echo "$as_me:1542: \"$ac_compiler -V </dev/null >&5\"") >&5
1543 (eval $ac_compiler -V </dev/null >&5) 2>&5
1544 ac_status=$?
1545 echo "$as_me:1545: \$? = $ac_status" >&5
1546 (exit "$ac_status"); }
1547
1548 cat >"conftest.$ac_ext" <<_ACEOF
1549 #line 1549 "configure"
1550 #include "confdefs.h"
1551
1552 int
1553 main (void)
1554 {
1555
1556 ;
1557 return 0;
1558 }
1559 _ACEOF
1560 ac_clean_files_save=$ac_clean_files
1561 ac_clean_files="$ac_clean_files a.out a.exe"
1562 # Try to create an executable without -o first, disregard a.out.
1563 # It will help us diagnose broken compilers, and finding out an intuition
1564 # of exeext.
1565 echo "$as_me:1565: checking for C compiler default output" >&5
1566 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1567 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1568 if { (eval echo "$as_me:1568: \"$ac_link_default\"") >&5
1569 (eval $ac_link_default) 2>&5
1570 ac_status=$?
1571 echo "$as_me:1571: \$? = $ac_status" >&5
1572 (exit "$ac_status"); }; then
1573 # Find the output, starting from the most likely. This scheme is
1574 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1575 # resort.
1576 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1577 ls a.out conftest 2>/dev/null;
1578 ls a.* conftest.* 2>/dev/null`; do
1579 case $ac_file in
1580 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1581 a.out ) # We found the default executable, but exeext='' is most
1582 # certainly right.
1583 break;;
1584 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1585 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1586 export ac_cv_exeext
1587 break;;
1588 * ) break;;
1589 esac
1590 done
1591 else
1592 echo "$as_me: failed program was:" >&5
1593 cat "conftest.$ac_ext" >&5
1594 { { echo "$as_me:1594: error: C compiler cannot create executables" >&5
1595 echo "$as_me: error: C compiler cannot create executables" >&2;}
1596 { (exit 77); exit 77; }; }
1597 fi
1598
1599 ac_exeext=$ac_cv_exeext
1600 echo "$as_me:1600: result: $ac_file" >&5
1601 echo "${ECHO_T}$ac_file" >&6
1602
1603 # Check the compiler produces executables we can run. If not, either
1604 # the compiler is broken, or we cross compile.
1605 echo "$as_me:1605: checking whether the C compiler works" >&5
1606 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1607 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1608 # If not cross compiling, check that we can run a simple program.
1609 if test "$cross_compiling" != yes; then
1610 if { ac_try='./$ac_file'
1611 { (eval echo "$as_me:1611: \"$ac_try\"") >&5
1612 (eval $ac_try) 2>&5
1613 ac_status=$?
1614 echo "$as_me:1614: \$? = $ac_status" >&5
1615 (exit "$ac_status"); }; }; then
1616 cross_compiling=no
1617 else
1618 if test "$cross_compiling" = maybe; then
1619 cross_compiling=yes
1620 else
1621 { { echo "$as_me:1621: error: cannot run C compiled programs.
1622 If you meant to cross compile, use \`--host'." >&5
1623 echo "$as_me: error: cannot run C compiled programs.
1624 If you meant to cross compile, use \`--host'." >&2;}
1625 { (exit 1); exit 1; }; }
1626 fi
1627 fi
1628 fi
1629 echo "$as_me:1629: result: yes" >&5
1630 echo "${ECHO_T}yes" >&6
1631
1632 rm -f a.out a.exe "conftest$ac_cv_exeext"
1633 ac_clean_files=$ac_clean_files_save
1634 # Check the compiler produces executables we can run. If not, either
1635 # the compiler is broken, or we cross compile.
1636 echo "$as_me:1636: checking whether we are cross compiling" >&5
1637 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1638 echo "$as_me:1638: result: $cross_compiling" >&5
1639 echo "${ECHO_T}$cross_compiling" >&6
1640
1641 echo "$as_me:1641: checking for executable suffix" >&5
1642 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1643 if { (eval echo "$as_me:1643: \"$ac_link\"") >&5
1644 (eval $ac_link) 2>&5
1645 ac_status=$?
1646 echo "$as_me:1646: \$? = $ac_status" >&5
1647 (exit "$ac_status"); }; then
1648 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1649 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1650 # work properly (i.e., refer to `conftest.exe'), while it won't with
1651 # `rm'.
1652 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1653 case $ac_file in
1654 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1655 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1656 export ac_cv_exeext
1657 break;;
1658 * ) break;;
1659 esac
1660 done
1661 else
1662 { { echo "$as_me:1662: error: cannot compute EXEEXT: cannot compile and link" >&5
1663 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1664 { (exit 1); exit 1; }; }
1665 fi
1666
1667 rm -f "conftest$ac_cv_exeext"
1668 echo "$as_me:1668: result: $ac_cv_exeext" >&5
1669 echo "${ECHO_T}$ac_cv_exeext" >&6
1670
1671 rm -f "conftest.$ac_ext"
1672 EXEEXT=$ac_cv_exeext
1673 ac_exeext=$EXEEXT
1674 echo "$as_me:1674: checking for object suffix" >&5
1675 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1676 if test "${ac_cv_objext+set}" = set; then
1677 echo $ECHO_N "(cached) $ECHO_C" >&6
1678 else
1679 cat >"conftest.$ac_ext" <<_ACEOF
1680 #line 1680 "configure"
1681 #include "confdefs.h"
1682
1683 int
1684 main (void)
1685 {
1686
1687 ;
1688 return 0;
1689 }
1690 _ACEOF
1691 rm -f conftest.o conftest.obj
1692 if { (eval echo "$as_me:1692: \"$ac_compile\"") >&5
1693 (eval $ac_compile) 2>&5
1694 ac_status=$?
1695 echo "$as_me:1695: \$? = $ac_status" >&5
1696 (exit "$ac_status"); }; then
1697 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1698 case $ac_file in
1699 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1700 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1701 break;;
1702 esac
1703 done
1704 else
1705 echo "$as_me: failed program was:" >&5
1706 cat "conftest.$ac_ext" >&5
1707 { { echo "$as_me:1707: error: cannot compute OBJEXT: cannot compile" >&5
1708 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1709 { (exit 1); exit 1; }; }
1710 fi
1711
1712 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1713 fi
1714 echo "$as_me:1714: result: $ac_cv_objext" >&5
1715 echo "${ECHO_T}$ac_cv_objext" >&6
1716 OBJEXT=$ac_cv_objext
1717 ac_objext=$OBJEXT
1718 echo "$as_me:1718: checking whether we are using the GNU C compiler" >&5
1719 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1720 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1721 echo $ECHO_N "(cached) $ECHO_C" >&6
1722 else
1723 cat >"conftest.$ac_ext" <<_ACEOF
1724 #line 1724 "configure"
1725 #include "confdefs.h"
1726
1727 int
1728 main (void)
1729 {
1730 #ifndef __GNUC__
1731 choke me
1732 #endif
1733
1734 ;
1735 return 0;
1736 }
1737 _ACEOF
1738 rm -f "conftest.$ac_objext"
1739 if { (eval echo "$as_me:1739: \"$ac_compile\"") >&5
1740 (eval $ac_compile) 2>&5
1741 ac_status=$?
1742 echo "$as_me:1742: \$? = $ac_status" >&5
1743 (exit "$ac_status"); } &&
1744 { ac_try='test -s "conftest.$ac_objext"'
1745 { (eval echo "$as_me:1745: \"$ac_try\"") >&5
1746 (eval $ac_try) 2>&5
1747 ac_status=$?
1748 echo "$as_me:1748: \$? = $ac_status" >&5
1749 (exit "$ac_status"); }; }; then
1750 ac_compiler_gnu=yes
1751 else
1752 echo "$as_me: failed program was:" >&5
1753 cat "conftest.$ac_ext" >&5
1754 ac_compiler_gnu=no
1755 fi
1756 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1757 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1758
1759 fi
1760 echo "$as_me:1760: result: $ac_cv_c_compiler_gnu" >&5
1761 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1762 GCC=`test $ac_compiler_gnu = yes && echo yes`
1763 ac_test_CFLAGS=${CFLAGS+set}
1764 ac_save_CFLAGS=$CFLAGS
1765 CFLAGS="-g"
1766 echo "$as_me:1766: checking whether $CC accepts -g" >&5
1767 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1768 if test "${ac_cv_prog_cc_g+set}" = set; then
1769 echo $ECHO_N "(cached) $ECHO_C" >&6
1770 else
1771 cat >"conftest.$ac_ext" <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1774
1775 int
1776 main (void)
1777 {
1778
1779 ;
1780 return 0;
1781 }
1782 _ACEOF
1783 rm -f "conftest.$ac_objext"
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785 (eval $ac_compile) 2>&5
1786 ac_status=$?
1787 echo "$as_me:1787: \$? = $ac_status" >&5
1788 (exit "$ac_status"); } &&
1789 { ac_try='test -s "conftest.$ac_objext"'
1790 { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1791 (eval $ac_try) 2>&5
1792 ac_status=$?
1793 echo "$as_me:1793: \$? = $ac_status" >&5
1794 (exit "$ac_status"); }; }; then
1795 ac_cv_prog_cc_g=yes
1796 else
1797 echo "$as_me: failed program was:" >&5
1798 cat "conftest.$ac_ext" >&5
1799 ac_cv_prog_cc_g=no
1800 fi
1801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1802 fi
1803 echo "$as_me:1803: result: $ac_cv_prog_cc_g" >&5
1804 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1805 if test "$ac_test_CFLAGS" = set; then
1806 CFLAGS=$ac_save_CFLAGS
1807 elif test $ac_cv_prog_cc_g = yes; then
1808 if test "$GCC" = yes; then
1809 CFLAGS="-g -O2"
1810 else
1811 CFLAGS="-g"
1812 fi
1813 else
1814 if test "$GCC" = yes; then
1815 CFLAGS="-O2"
1816 else
1817 CFLAGS=
1818 fi
1819 fi
1820 # Some people use a C++ compiler to compile C. Since we use `exit',
1821 # in C++ we need to declare it. In case someone uses the same compiler
1822 # for both compiling C and C++ we need to have the C++ compiler decide
1823 # the declaration of exit, since it's the most demanding environment.
1824 cat >"conftest.$ac_ext" <<_ACEOF
1825 #ifndef __cplusplus
1826 choke me
1827 #endif
1828 _ACEOF
1829 rm -f "conftest.$ac_objext"
1830 if { (eval echo "$as_me:1830: \"$ac_compile\"") >&5
1831 (eval $ac_compile) 2>&5
1832 ac_status=$?
1833 echo "$as_me:1833: \$? = $ac_status" >&5
1834 (exit "$ac_status"); } &&
1835 { ac_try='test -s "conftest.$ac_objext"'
1836 { (eval echo "$as_me:1836: \"$ac_try\"") >&5
1837 (eval $ac_try) 2>&5
1838 ac_status=$?
1839 echo "$as_me:1839: \$? = $ac_status" >&5
1840 (exit "$ac_status"); }; }; then
1841 for ac_declaration in \
1842 ''\
1843 '#include <stdlib.h>' \
1844 'extern "C" void std::exit (int) throw (); using std::exit;' \
1845 'extern "C" void std::exit (int); using std::exit;' \
1846 'extern "C" void exit (int) throw ();' \
1847 'extern "C" void exit (int);' \
1848 'void exit (int);'
1849 do
1850 cat >"conftest.$ac_ext" <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853 #include <stdlib.h>
1854 $ac_declaration
1855 int
1856 main (void)
1857 {
1858 exit (42);
1859 ;
1860 return 0;
1861 }
1862 _ACEOF
1863 rm -f "conftest.$ac_objext"
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865 (eval $ac_compile) 2>&5
1866 ac_status=$?
1867 echo "$as_me:1867: \$? = $ac_status" >&5
1868 (exit "$ac_status"); } &&
1869 { ac_try='test -s "conftest.$ac_objext"'
1870 { (eval echo "$as_me:1870: \"$ac_try\"") >&5
1871 (eval $ac_try) 2>&5
1872 ac_status=$?
1873 echo "$as_me:1873: \$? = $ac_status" >&5
1874 (exit "$ac_status"); }; }; then
1875 :
1876 else
1877 echo "$as_me: failed program was:" >&5
1878 cat "conftest.$ac_ext" >&5
1879 continue
1880 fi
1881 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1882 cat >"conftest.$ac_ext" <<_ACEOF
1883 #line 1883 "configure"
1884 #include "confdefs.h"
1885 $ac_declaration
1886 int
1887 main (void)
1888 {
1889 exit (42);
1890 ;
1891 return 0;
1892 }
1893 _ACEOF
1894 rm -f "conftest.$ac_objext"
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896 (eval $ac_compile) 2>&5
1897 ac_status=$?
1898 echo "$as_me:1898: \$? = $ac_status" >&5
1899 (exit "$ac_status"); } &&
1900 { ac_try='test -s "conftest.$ac_objext"'
1901 { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902 (eval $ac_try) 2>&5
1903 ac_status=$?
1904 echo "$as_me:1904: \$? = $ac_status" >&5
1905 (exit "$ac_status"); }; }; then
1906 break
1907 else
1908 echo "$as_me: failed program was:" >&5
1909 cat "conftest.$ac_ext" >&5
1910 fi
1911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1912 done
1913 rm -rf conftest*
1914 if test -n "$ac_declaration"; then
1915 echo '#ifdef __cplusplus' >>confdefs.h
1916 echo "$ac_declaration" >>confdefs.h
1917 echo '#endif' >>confdefs.h
1918 fi
1919
1920 else
1921 echo "$as_me: failed program was:" >&5
1922 cat "conftest.$ac_ext" >&5
1923 fi
1924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1925 ac_ext=c
1926 ac_cpp='$CPP $CPPFLAGS'
1927 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1928 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1930 ac_main_return="return"
1931
1932 GCC_VERSION=none
1933 if test "$GCC" = yes ; then
1934 echo "$as_me:1934: checking version of $CC" >&5
1935 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1936 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1937 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1938 echo "$as_me:1938: result: $GCC_VERSION" >&5
1939 echo "${ECHO_T}$GCC_VERSION" >&6
1940 fi
1941
1942 INTEL_COMPILER=no
1943
1944 if test "$GCC" = yes ; then
1945 case "$host_os" in
1946 (linux*|gnu*)
1947 echo "$as_me:1947: checking if this is really Intel C compiler" >&5
1948 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1949 cf_save_CFLAGS="$CFLAGS"
1950 CFLAGS="$CFLAGS -no-gcc"
1951 cat >"conftest.$ac_ext" <<_ACEOF
1952 #line 1952 "configure"
1953 #include "confdefs.h"
1954
1955 int
1956 main (void)
1957 {
1958
1959 #ifdef __INTEL_COMPILER
1960 #else
1961 #error __INTEL_COMPILER is not defined
1962 #endif
1963
1964 ;
1965 return 0;
1966 }
1967 _ACEOF
1968 rm -f "conftest.$ac_objext"
1969 if { (eval echo "$as_me:1969: \"$ac_compile\"") >&5
1970 (eval $ac_compile) 2>&5
1971 ac_status=$?
1972 echo "$as_me:1972: \$? = $ac_status" >&5
1973 (exit "$ac_status"); } &&
1974 { ac_try='test -s "conftest.$ac_objext"'
1975 { (eval echo "$as_me:1975: \"$ac_try\"") >&5
1976 (eval $ac_try) 2>&5
1977 ac_status=$?
1978 echo "$as_me:1978: \$? = $ac_status" >&5
1979 (exit "$ac_status"); }; }; then
1980 INTEL_COMPILER=yes
1981 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1982
1983 else
1984 echo "$as_me: failed program was:" >&5
1985 cat "conftest.$ac_ext" >&5
1986 fi
1987 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1988 CFLAGS="$cf_save_CFLAGS"
1989 echo "$as_me:1989: result: $INTEL_COMPILER" >&5
1990 echo "${ECHO_T}$INTEL_COMPILER" >&6
1991 ;;
1992 esac
1993 fi
1994
1995 CLANG_COMPILER=no
1996
1997 if test "$GCC" = yes ; then
1998 echo "$as_me:1998: checking if this is really Clang C compiler" >&5
1999 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2000 cf_save_CFLAGS="$CFLAGS"
2001 cat >"conftest.$ac_ext" <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2004
2005 int
2006 main (void)
2007 {
2008
2009 #ifdef __clang__
2010 #else
2011 #error __clang__ is not defined
2012 #endif
2013
2014 ;
2015 return 0;
2016 }
2017 _ACEOF
2018 rm -f "conftest.$ac_objext"
2019 if { (eval echo "$as_me:2019: \"$ac_compile\"") >&5
2020 (eval $ac_compile) 2>&5
2021 ac_status=$?
2022 echo "$as_me:2022: \$? = $ac_status" >&5
2023 (exit "$ac_status"); } &&
2024 { ac_try='test -s "conftest.$ac_objext"'
2025 { (eval echo "$as_me:2025: \"$ac_try\"") >&5
2026 (eval $ac_try) 2>&5
2027 ac_status=$?
2028 echo "$as_me:2028: \$? = $ac_status" >&5
2029 (exit "$ac_status"); }; }; then
2030 CLANG_COMPILER=yes
2031
2032 else
2033 echo "$as_me: failed program was:" >&5
2034 cat "conftest.$ac_ext" >&5
2035 fi
2036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2037 CFLAGS="$cf_save_CFLAGS"
2038 echo "$as_me:2038: result: $CLANG_COMPILER" >&5
2039 echo "${ECHO_T}$CLANG_COMPILER" >&6
2040 fi
2041
2042 CLANG_VERSION=none
2043
2044 if test "x$CLANG_COMPILER" = "xyes" ; then
2045 case "$CC" in
2046 (c[1-9][0-9]|*/c[1-9][0-9])
2047 { echo "$as_me:2047: WARNING: replacing broken compiler alias $CC" >&5
2048 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2049 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2050 CC=clang
2051 ;;
2052 esac
2053
2054 echo "$as_me:2054: checking version of $CC" >&5
2055 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2056 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.].*//'`"
2057 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2058 echo "$as_me:2058: result: $CLANG_VERSION" >&5
2059 echo "${ECHO_T}$CLANG_VERSION" >&6
2060
2061 for cf_clang_opt in \
2062 -Qunused-arguments \
2063 -Wno-error=implicit-function-declaration
2064 do
2065 echo "$as_me:2065: checking if option $cf_clang_opt works" >&5
2066 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2067 cf_save_CFLAGS="$CFLAGS"
2068 CFLAGS="$CFLAGS $cf_clang_opt"
2069 cat >"conftest.$ac_ext" <<_ACEOF
2070 #line 2070 "configure"
2071 #include "confdefs.h"
2072
2073 #include <stdio.h>
2074 int
2075 main (void)
2076 {
2077
2078 printf("hello!\\n");
2079 ;
2080 return 0;
2081 }
2082 _ACEOF
2083 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2084 if { (eval echo "$as_me:2084: \"$ac_link\"") >&5
2085 (eval $ac_link) 2>&5
2086 ac_status=$?
2087 echo "$as_me:2087: \$? = $ac_status" >&5
2088 (exit "$ac_status"); } &&
2089 { ac_try='test -s "conftest$ac_exeext"'
2090 { (eval echo "$as_me:2090: \"$ac_try\"") >&5
2091 (eval $ac_try) 2>&5
2092 ac_status=$?
2093 echo "$as_me:2093: \$? = $ac_status" >&5
2094 (exit "$ac_status"); }; }; then
2095
2096 cf_clang_optok=yes
2097 else
2098 echo "$as_me: failed program was:" >&5
2099 cat "conftest.$ac_ext" >&5
2100
2101 cf_clang_optok=no
2102 fi
2103 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2104 echo "$as_me:2104: result: $cf_clang_optok" >&5
2105 echo "${ECHO_T}$cf_clang_optok" >&6
2106 CFLAGS="$cf_save_CFLAGS"
2107 if test "$cf_clang_optok" = yes; then
2108 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2109
2110 echo "${as_me:-configure}:2110: testing adding option $cf_clang_opt ..." 1>&5
2111
2112 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2113 CFLAGS="${CFLAGS}$cf_clang_opt"
2114
2115 fi
2116 done
2117 fi
2118
2119 echo "$as_me:2119: checking for $CC option to accept ANSI C" >&5
2120 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2121 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2122 echo $ECHO_N "(cached) $ECHO_C" >&6
2123 else
2124 ac_cv_prog_cc_stdc=no
2125 ac_save_CC=$CC
2126 cat >"conftest.$ac_ext" <<_ACEOF
2127 #line 2127 "configure"
2128 #include "confdefs.h"
2129 #include <stdarg.h>
2130 #include <stdio.h>
2131 #include <sys/types.h>
2132 #include <sys/stat.h>
2133 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2134 struct buf { int x; };
2135 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2136 static char *e (char **p, int i)
2137 {
2138 return p[i];
2139 }
2140 static char *f (char * (*g) (char **, int), char **p, ...)
2141 {
2142 char *s;
2143 va_list v;
2144 va_start (v,p);
2145 s = g (p, va_arg (v,int));
2146 va_end (v);
2147 return s;
2148 }
2149 int test (int i, double x);
2150 struct s1 {int (*f) (int a);};
2151 struct s2 {int (*f) (double a);};
2152 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2153 int argc;
2154 char **argv;
2155 int
2156 main (void)
2157 {
2158 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2159 ;
2160 return 0;
2161 }
2162 _ACEOF
2163 # Don't try gcc -ansi; that turns off useful extensions and
2164 # breaks some systems' header files.
2165 # AIX -qlanglvl=ansi
2166 # Ultrix and OSF/1 -std1
2167 # HP-UX 10.20 and later -Ae
2168 # HP-UX older versions -Aa -D_HPUX_SOURCE
2169 # SVR4 -Xc -D__EXTENSIONS__
2170 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2171 do
2172 CC="$ac_save_CC $ac_arg"
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 ac_cv_prog_cc_stdc=$ac_arg
2186 break
2187 else
2188 echo "$as_me: failed program was:" >&5
2189 cat "conftest.$ac_ext" >&5
2190 fi
2191 rm -f "conftest.$ac_objext"
2192 done
2193 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2194 CC=$ac_save_CC
2195
2196 fi
2197
2198 case "x$ac_cv_prog_cc_stdc" in
2199 x|xno)
2200 echo "$as_me:2200: result: none needed" >&5
2201 echo "${ECHO_T}none needed" >&6 ;;
2202 *)
2203 echo "$as_me:2203: result: $ac_cv_prog_cc_stdc" >&5
2204 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2205 CC="$CC $ac_cv_prog_cc_stdc" ;;
2206 esac
2207
2208 # This should have been defined by AC_PROG_CC
2209 : "${CC:=cc}"
2210
2211 echo "$as_me:2211: checking \$CFLAGS variable" >&5
2212 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2213 case "x$CFLAGS" in
2214 (*-[IUD]*)
2215 echo "$as_me:2215: result: broken" >&5
2216 echo "${ECHO_T}broken" >&6
2217 { echo "$as_me:2217: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2218 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2219 cf_flags="$CFLAGS"
2220 CFLAGS=
2221 for cf_arg in $cf_flags
2222 do
2223
2224 cf_fix_cppflags=no
2225 cf_new_cflags=
2226 cf_new_cppflags=
2227 cf_new_extra_cppflags=
2228
2229 for cf_add_cflags in $cf_arg
2230 do
2231 case "$cf_fix_cppflags" in
2232 (no)
2233 case "$cf_add_cflags" in
2234 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2235 case "$cf_add_cflags" in
2236 (-D*)
2237 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2238
2239 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2240 && test -z "${cf_tst_cflags}" \
2241 && cf_fix_cppflags=yes
2242
2243 if test "$cf_fix_cppflags" = yes ; then
2244
2245 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2246 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2247
2248 continue
2249 elif test "${cf_tst_cflags}" = "\"'" ; then
2250
2251 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2252 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2253
2254 continue
2255 fi
2256 ;;
2257 esac
2258 case "$CPPFLAGS" in
2259 (*$cf_add_cflags)
2260 ;;
2261 (*)
2262 case "$cf_add_cflags" in
2263 (-D*)
2264 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2265
2266 CPPFLAGS=`echo "$CPPFLAGS" | \
2267 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2268 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2269
2270 ;;
2271 esac
2272
2273 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2274 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2275
2276 ;;
2277 esac
2278 ;;
2279 (*)
2280
2281 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2282 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2283
2284 ;;
2285 esac
2286 ;;
2287 (yes)
2288
2289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2291
2292 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2293
2294 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2295 && test -z "${cf_tst_cflags}" \
2296 && cf_fix_cppflags=no
2297 ;;
2298 esac
2299 done
2300
2301 if test -n "$cf_new_cflags" ; then
2302
2303 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2304 CFLAGS="${CFLAGS}$cf_new_cflags"
2305
2306 fi
2307
2308 if test -n "$cf_new_cppflags" ; then
2309
2310 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2311 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2312
2313 fi
2314
2315 if test -n "$cf_new_extra_cppflags" ; then
2316
2317 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2318 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2319
2320 fi
2321
2322 done
2323 ;;
2324 (*)
2325 echo "$as_me:2325: result: ok" >&5
2326 echo "${ECHO_T}ok" >&6
2327 ;;
2328 esac
2329
2330 echo "$as_me:2330: checking \$CC variable" >&5
2331 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2332 case "$CC" in
2333 (*[\ \ ]-*)
2334 echo "$as_me:2334: result: broken" >&5
2335 echo "${ECHO_T}broken" >&6
2336 { echo "$as_me:2336: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2337 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2338 # humor him...
2339 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2340 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2341 CC="$cf_prog"
2342 for cf_arg in $cf_flags
2343 do
2344 case "x$cf_arg" in
2345 (x-[IUDfgOW]*)
2346
2347 cf_fix_cppflags=no
2348 cf_new_cflags=
2349 cf_new_cppflags=
2350 cf_new_extra_cppflags=
2351
2352 for cf_add_cflags in $cf_arg
2353 do
2354 case "$cf_fix_cppflags" in
2355 (no)
2356 case "$cf_add_cflags" in
2357 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2358 case "$cf_add_cflags" in
2359 (-D*)
2360 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2361
2362 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2363 && test -z "${cf_tst_cflags}" \
2364 && cf_fix_cppflags=yes
2365
2366 if test "$cf_fix_cppflags" = yes ; then
2367
2368 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2369 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2370
2371 continue
2372 elif test "${cf_tst_cflags}" = "\"'" ; then
2373
2374 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2375 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2376
2377 continue
2378 fi
2379 ;;
2380 esac
2381 case "$CPPFLAGS" in
2382 (*$cf_add_cflags)
2383 ;;
2384 (*)
2385 case "$cf_add_cflags" in
2386 (-D*)
2387 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2388
2389 CPPFLAGS=`echo "$CPPFLAGS" | \
2390 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2391 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2392
2393 ;;
2394 esac
2395
2396 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2397 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2398
2399 ;;
2400 esac
2401 ;;
2402 (*)
2403
2404 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2405 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2406
2407 ;;
2408 esac
2409 ;;
2410 (yes)
2411
2412 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2413 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2414
2415 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2416
2417 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2418 && test -z "${cf_tst_cflags}" \
2419 && cf_fix_cppflags=no
2420 ;;
2421 esac
2422 done
2423
2424 if test -n "$cf_new_cflags" ; then
2425
2426 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2427 CFLAGS="${CFLAGS}$cf_new_cflags"
2428
2429 fi
2430
2431 if test -n "$cf_new_cppflags" ; then
2432
2433 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2434 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2435
2436 fi
2437
2438 if test -n "$cf_new_extra_cppflags" ; then
2439
2440 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2441 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2442
2443 fi
2444
2445 ;;
2446 (*)
2447 CC="$CC $cf_arg"
2448 ;;
2449 esac
2450 done
2451 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2452
2453 echo "${as_me:-configure}:2453: testing resulting CC: '$CC' ..." 1>&5
2454
2455 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2456
2457 echo "${as_me:-configure}:2457: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2458
2459 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2460
2461 echo "${as_me:-configure}:2461: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2462
2463 ;;
2464 (*)
2465 echo "$as_me:2465: result: ok" >&5
2466 echo "${ECHO_T}ok" >&6
2467 ;;
2468 esac
2469
2470 for ac_prog in ggrep grep
2471 do
2472 # Extract the first word of "$ac_prog", so it can be a program name with args.
2473 set dummy $ac_prog; ac_word=$2
2474 echo "$as_me:2474: checking for $ac_word" >&5
2475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2476 if test "${ac_cv_prog_GREP+set}" = set; then
2477 echo $ECHO_N "(cached) $ECHO_C" >&6
2478 else
2479 if test -n "$GREP"; then
2480 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2481 else
2482 ac_save_IFS=$IFS; IFS=$ac_path_separator
2483 ac_dummy="$PATH"
2484 for ac_dir in $ac_dummy; do
2485 IFS=$ac_save_IFS
2486 test -z "$ac_dir" && ac_dir=.
2487 $as_executable_p "$ac_dir/$ac_word" || continue
2488 ac_cv_prog_GREP="$ac_prog"
2489 echo "$as_me:2489: found $ac_dir/$ac_word" >&5
2490 break
2491 done
2492
2493 fi
2494 fi
2495 GREP=$ac_cv_prog_GREP
2496 if test -n "$GREP"; then
2497 echo "$as_me:2497: result: $GREP" >&5
2498 echo "${ECHO_T}$GREP" >&6
2499 else
2500 echo "$as_me:2500: result: no" >&5
2501 echo "${ECHO_T}no" >&6
2502 fi
2503
2504 test -n "$GREP" && break
2505 done
2506 test -n "$GREP" || GREP=": "
2507
2508 echo "$as_me:2508: checking for egrep" >&5
2509 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2510 if test "${ac_cv_path_EGREP+set}" = set; then
2511 echo $ECHO_N "(cached) $ECHO_C" >&6
2512 else
2513 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2514 then ac_cv_path_EGREP="$GREP -E"
2515 else
2516 for ac_prog in gegrep egrep
2517 do
2518 # Extract the first word of "$ac_prog", so it can be a program name with args.
2519 set dummy $ac_prog; ac_word=$2
2520 echo "$as_me:2520: checking for $ac_word" >&5
2521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2522 if test "${ac_cv_path_EGREP+set}" = set; then
2523 echo $ECHO_N "(cached) $ECHO_C" >&6
2524 else
2525 case $EGREP in
2526 [\\/]* | ?:[\\/]*)
2527 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2528 ;;
2529 *)
2530 ac_save_IFS=$IFS; IFS=$ac_path_separator
2531 ac_dummy="$PATH"
2532 for ac_dir in $ac_dummy; do
2533 IFS=$ac_save_IFS
2534 test -z "$ac_dir" && ac_dir=.
2535 if $as_executable_p "$ac_dir/$ac_word"; then
2536 ac_cv_path_EGREP="$ac_dir/$ac_word"
2537 echo "$as_me:2537: found $ac_dir/$ac_word" >&5
2538 break
2539 fi
2540 done
2541
2542 ;;
2543 esac
2544 fi
2545 EGREP=$ac_cv_path_EGREP
2546
2547 if test -n "$EGREP"; then
2548 echo "$as_me:2548: result: $EGREP" >&5
2549 echo "${ECHO_T}$EGREP" >&6
2550 else
2551 echo "$as_me:2551: result: no" >&5
2552 echo "${ECHO_T}no" >&6
2553 fi
2554
2555 test -n "$EGREP" && break
2556 done
2557 test -n "$EGREP" || EGREP=": "
2558
2559 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2559: error: cannot find workable egrep" >&5
2560 echo "$as_me: error: cannot find workable egrep" >&2;}
2561 { (exit 1); exit 1; }; }
2562 fi
2563 fi
2564 echo "$as_me:2564: result: $ac_cv_path_EGREP" >&5
2565 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2566 EGREP="$ac_cv_path_EGREP"
2567
2568 ac_ext=c
2569 ac_cpp='$CPP $CPPFLAGS'
2570 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2571 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2573 ac_main_return="return"
2574 echo "$as_me:2574: checking how to run the C preprocessor" >&5
2575 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2576 # On Suns, sometimes $CPP names a directory.
2577 if test -n "$CPP" && test -d "$CPP"; then
2578 CPP=
2579 fi
2580 if test -z "$CPP"; then
2581 if test "${ac_cv_prog_CPP+set}" = set; then
2582 echo $ECHO_N "(cached) $ECHO_C" >&6
2583 else
2584 # Double quotes because CPP needs to be expanded
2585 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2586 do
2587 ac_preproc_ok=false
2588 for ac_c_preproc_warn_flag in '' yes
2589 do
2590 # Use a header file that comes with gcc, so configuring glibc
2591 # with a fresh cross-compiler works.
2592 # On the NeXT, cc -E runs the code through the compiler's parser,
2593 # not just through cpp. "Syntax error" is here to catch this case.
2594 cat >"conftest.$ac_ext" <<_ACEOF
2595 #line 2595 "configure"
2596 #include "confdefs.h"
2597 #include <assert.h>
2598 Syntax error
2599 _ACEOF
2600 if { (eval echo "$as_me:2600: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2601 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2602 ac_status=$?
2603 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2604 rm -f conftest.er1
2605 cat conftest.err >&5
2606 echo "$as_me:2606: \$? = $ac_status" >&5
2607 (exit "$ac_status"); } >/dev/null; then
2608 if test -s conftest.err; then
2609 ac_cpp_err=$ac_c_preproc_warn_flag
2610 else
2611 ac_cpp_err=
2612 fi
2613 else
2614 ac_cpp_err=yes
2615 fi
2616 if test -z "$ac_cpp_err"; then
2617 :
2618 else
2619 echo "$as_me: failed program was:" >&5
2620 cat "conftest.$ac_ext" >&5
2621 # Broken: fails on valid input.
2622 continue
2623 fi
2624 rm -f conftest.err "conftest.$ac_ext"
2625
2626 # OK, works on sane cases. Now check whether non-existent headers
2627 # can be detected and how.
2628 cat >"conftest.$ac_ext" <<_ACEOF
2629 #line 2629 "configure"
2630 #include "confdefs.h"
2631 #include <ac_nonexistent.h>
2632 _ACEOF
2633 if { (eval echo "$as_me:2633: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2634 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2635 ac_status=$?
2636 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2637 rm -f conftest.er1
2638 cat conftest.err >&5
2639 echo "$as_me:2639: \$? = $ac_status" >&5
2640 (exit "$ac_status"); } >/dev/null; then
2641 if test -s conftest.err; then
2642 ac_cpp_err=$ac_c_preproc_warn_flag
2643 else
2644 ac_cpp_err=
2645 fi
2646 else
2647 ac_cpp_err=yes
2648 fi
2649 if test -z "$ac_cpp_err"; then
2650 # Broken: success on invalid input.
2651 continue
2652 else
2653 echo "$as_me: failed program was:" >&5
2654 cat "conftest.$ac_ext" >&5
2655 # Passes both tests.
2656 ac_preproc_ok=:
2657 break
2658 fi
2659 rm -f conftest.err "conftest.$ac_ext"
2660
2661 done
2662 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2663 rm -f conftest.err "conftest.$ac_ext"
2664 if $ac_preproc_ok; then
2665 break
2666 fi
2667
2668 done
2669 ac_cv_prog_CPP=$CPP
2670
2671 fi
2672 CPP=$ac_cv_prog_CPP
2673 else
2674 ac_cv_prog_CPP=$CPP
2675 fi
2676 echo "$as_me:2676: result: $CPP" >&5
2677 echo "${ECHO_T}$CPP" >&6
2678 ac_preproc_ok=false
2679 for ac_c_preproc_warn_flag in '' yes
2680 do
2681 # Use a header file that comes with gcc, so configuring glibc
2682 # with a fresh cross-compiler works.
2683 # On the NeXT, cc -E runs the code through the compiler's parser,
2684 # not just through cpp. "Syntax error" is here to catch this case.
2685 cat >"conftest.$ac_ext" <<_ACEOF
2686 #line 2686 "configure"
2687 #include "confdefs.h"
2688 #include <assert.h>
2689 Syntax error
2690 _ACEOF
2691 if { (eval echo "$as_me:2691: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2692 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2693 ac_status=$?
2694 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2695 rm -f conftest.er1
2696 cat conftest.err >&5
2697 echo "$as_me:2697: \$? = $ac_status" >&5
2698 (exit "$ac_status"); } >/dev/null; then
2699 if test -s conftest.err; then
2700 ac_cpp_err=$ac_c_preproc_warn_flag
2701 else
2702 ac_cpp_err=
2703 fi
2704 else
2705 ac_cpp_err=yes
2706 fi
2707 if test -z "$ac_cpp_err"; then
2708 :
2709 else
2710 echo "$as_me: failed program was:" >&5
2711 cat "conftest.$ac_ext" >&5
2712 # Broken: fails on valid input.
2713 continue
2714 fi
2715 rm -f conftest.err "conftest.$ac_ext"
2716
2717 # OK, works on sane cases. Now check whether non-existent headers
2718 # can be detected and how.
2719 cat >"conftest.$ac_ext" <<_ACEOF
2720 #line 2720 "configure"
2721 #include "confdefs.h"
2722 #include <ac_nonexistent.h>
2723 _ACEOF
2724 if { (eval echo "$as_me:2724: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2725 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2726 ac_status=$?
2727 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2728 rm -f conftest.er1
2729 cat conftest.err >&5
2730 echo "$as_me:2730: \$? = $ac_status" >&5
2731 (exit "$ac_status"); } >/dev/null; then
2732 if test -s conftest.err; then
2733 ac_cpp_err=$ac_c_preproc_warn_flag
2734 else
2735 ac_cpp_err=
2736 fi
2737 else
2738 ac_cpp_err=yes
2739 fi
2740 if test -z "$ac_cpp_err"; then
2741 # Broken: success on invalid input.
2742 continue
2743 else
2744 echo "$as_me: failed program was:" >&5
2745 cat "conftest.$ac_ext" >&5
2746 # Passes both tests.
2747 ac_preproc_ok=:
2748 break
2749 fi
2750 rm -f conftest.err "conftest.$ac_ext"
2751
2752 done
2753 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2754 rm -f conftest.err "conftest.$ac_ext"
2755 if $ac_preproc_ok; then
2756 :
2757 else
2758 { { echo "$as_me:2758: error: C preprocessor \"$CPP\" fails sanity check" >&5
2759 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2760 { (exit 1); exit 1; }; }
2761 fi
2762
2763 ac_ext=c
2764 ac_cpp='$CPP $CPPFLAGS'
2765 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2766 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2767 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2768 ac_main_return="return"
2769
2770 # Find a good install program. We prefer a C program (faster),
2771 # so one script is as good as another. But avoid the broken or
2772 # incompatible versions:
2773 # SysV /etc/install, /usr/sbin/install
2774 # SunOS /usr/etc/install
2775 # IRIX /sbin/install
2776 # AIX /bin/install
2777 # AmigaOS /C/install, which installs bootblocks on floppy discs
2778 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2779 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2780 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2781 # ./install, which can be erroneously created by make from ./install.sh.
2782 echo "$as_me:2782: checking for a BSD compatible install" >&5
2783 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2784 if test -z "$INSTALL"; then
2785 if test "${ac_cv_path_install+set}" = set; then
2786 echo $ECHO_N "(cached) $ECHO_C" >&6
2787 else
2788 ac_save_IFS=$IFS; IFS=$ac_path_separator
2789 for ac_dir in $PATH; do
2790 IFS=$ac_save_IFS
2791 # Account for people who put trailing slashes in PATH elements.
2792 case $ac_dir/ in
2793 / | ./ | .// | /cC/* \
2794 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2795 | /usr/ucb/* ) ;;
2796 *)
2797 # OSF1 and SCO ODT 3.0 have their own names for install.
2798 # Don't use installbsd from OSF since it installs stuff as root
2799 # by default.
2800 for ac_prog in ginstall scoinst install; do
2801 if $as_executable_p "$ac_dir/$ac_prog"; then
2802 if test $ac_prog = install &&
2803 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2804 # AIX install. It has an incompatible calling convention.
2805 :
2806 elif test $ac_prog = install &&
2807 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2808 # program-specific install script used by HP pwplus--don't use.
2809 :
2810 else
2811 ac_cv_path_install="$ac_dir/$ac_prog -c"
2812 break 2
2813 fi
2814 fi
2815 done
2816 ;;
2817 esac
2818 done
2819
2820 fi
2821 if test "${ac_cv_path_install+set}" = set; then
2822 INSTALL=$ac_cv_path_install
2823 else
2824 # As a last resort, use the slow shell script. We don't cache a
2825 # path for INSTALL within a source directory, because that will
2826 # break other packages using the cache if that directory is
2827 # removed, or if the path is relative.
2828 INSTALL=$ac_install_sh
2829 fi
2830 fi
2831 echo "$as_me:2831: result: $INSTALL" >&5
2832 echo "${ECHO_T}$INSTALL" >&6
2833
2834 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2835 # It thinks the first close brace ends the variable substitution.
2836 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2837
2838 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2839
2840 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2841
2842 for ac_prog in lint cppcheck splint
2843 do
2844 # Extract the first word of "$ac_prog", so it can be a program name with args.
2845 set dummy $ac_prog; ac_word=$2
2846 echo "$as_me:2846: checking for $ac_word" >&5
2847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2848 if test "${ac_cv_prog_LINT+set}" = set; then
2849 echo $ECHO_N "(cached) $ECHO_C" >&6
2850 else
2851 if test -n "$LINT"; then
2852 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2853 else
2854 ac_save_IFS=$IFS; IFS=$ac_path_separator
2855 ac_dummy="$PATH"
2856 for ac_dir in $ac_dummy; do
2857 IFS=$ac_save_IFS
2858 test -z "$ac_dir" && ac_dir=.
2859 $as_executable_p "$ac_dir/$ac_word" || continue
2860 ac_cv_prog_LINT="$ac_prog"
2861 echo "$as_me:2861: found $ac_dir/$ac_word" >&5
2862 break
2863 done
2864
2865 fi
2866 fi
2867 LINT=$ac_cv_prog_LINT
2868 if test -n "$LINT"; then
2869 echo "$as_me:2869: result: $LINT" >&5
2870 echo "${ECHO_T}$LINT" >&6
2871 else
2872 echo "$as_me:2872: result: no" >&5
2873 echo "${ECHO_T}no" >&6
2874 fi
2875
2876 test -n "$LINT" && break
2877 done
2878
2879 case "x$LINT" in
2880 (xlint|x*/lint) # NetBSD 10
2881 test -z "$LINT_OPTS" && LINT_OPTS="-chapbrxzgFS -v -Ac11"
2882 ;;
2883 (xcppcheck|x*/cppcheck)
2884 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all -D__CPPCHECK__"
2885 ;;
2886 esac
2887
2888 echo "$as_me:2888: checking if filesystem supports mixed-case filenames" >&5
2889 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2890 if test "${cf_cv_mixedcase+set}" = set; then
2891 echo $ECHO_N "(cached) $ECHO_C" >&6
2892 else
2893
2894 if test "$cross_compiling" = yes ; then
2895 case "$target_alias" in
2896 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
2897 cf_cv_mixedcase=no
2898 ;;
2899 (*)
2900 cf_cv_mixedcase=yes
2901 ;;
2902 esac
2903 else
2904 rm -f conftest CONFTEST
2905 echo test >conftest
2906 if test -f CONFTEST ; then
2907 cf_cv_mixedcase=no
2908 else
2909 cf_cv_mixedcase=yes
2910 fi
2911 rm -f conftest CONFTEST
2912 fi
2913
2914 fi
2915 echo "$as_me:2915: result: $cf_cv_mixedcase" >&5
2916 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2917 test "$cf_cv_mixedcase" = yes &&
2918 cat >>confdefs.h <<\EOF
2919 #define MIXEDCASE_FILENAMES 1
2920 EOF
2921
2922 for ac_prog in exctags ctags
2923 do
2924 # Extract the first word of "$ac_prog", so it can be a program name with args.
2925 set dummy $ac_prog; ac_word=$2
2926 echo "$as_me:2926: checking for $ac_word" >&5
2927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2928 if test "${ac_cv_prog_CTAGS+set}" = set; then
2929 echo $ECHO_N "(cached) $ECHO_C" >&6
2930 else
2931 if test -n "$CTAGS"; then
2932 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2933 else
2934 ac_save_IFS=$IFS; IFS=$ac_path_separator
2935 ac_dummy="$PATH"
2936 for ac_dir in $ac_dummy; do
2937 IFS=$ac_save_IFS
2938 test -z "$ac_dir" && ac_dir=.
2939 $as_executable_p "$ac_dir/$ac_word" || continue
2940 ac_cv_prog_CTAGS="$ac_prog"
2941 echo "$as_me:2941: found $ac_dir/$ac_word" >&5
2942 break
2943 done
2944
2945 fi
2946 fi
2947 CTAGS=$ac_cv_prog_CTAGS
2948 if test -n "$CTAGS"; then
2949 echo "$as_me:2949: result: $CTAGS" >&5
2950 echo "${ECHO_T}$CTAGS" >&6
2951 else
2952 echo "$as_me:2952: result: no" >&5
2953 echo "${ECHO_T}no" >&6
2954 fi
2955
2956 test -n "$CTAGS" && break
2957 done
2958
2959 for ac_prog in exetags etags
2960 do
2961 # Extract the first word of "$ac_prog", so it can be a program name with args.
2962 set dummy $ac_prog; ac_word=$2
2963 echo "$as_me:2963: checking for $ac_word" >&5
2964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2965 if test "${ac_cv_prog_ETAGS+set}" = set; then
2966 echo $ECHO_N "(cached) $ECHO_C" >&6
2967 else
2968 if test -n "$ETAGS"; then
2969 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2970 else
2971 ac_save_IFS=$IFS; IFS=$ac_path_separator
2972 ac_dummy="$PATH"
2973 for ac_dir in $ac_dummy; do
2974 IFS=$ac_save_IFS
2975 test -z "$ac_dir" && ac_dir=.
2976 $as_executable_p "$ac_dir/$ac_word" || continue
2977 ac_cv_prog_ETAGS="$ac_prog"
2978 echo "$as_me:2978: found $ac_dir/$ac_word" >&5
2979 break
2980 done
2981
2982 fi
2983 fi
2984 ETAGS=$ac_cv_prog_ETAGS
2985 if test -n "$ETAGS"; then
2986 echo "$as_me:2986: result: $ETAGS" >&5
2987 echo "${ECHO_T}$ETAGS" >&6
2988 else
2989 echo "$as_me:2989: result: no" >&5
2990 echo "${ECHO_T}no" >&6
2991 fi
2992
2993 test -n "$ETAGS" && break
2994 done
2995
2996 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2997 set dummy ${CTAGS:-ctags}; ac_word=$2
2998 echo "$as_me:2998: checking for $ac_word" >&5
2999 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3000 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3001 echo $ECHO_N "(cached) $ECHO_C" >&6
3002 else
3003 if test -n "$MAKE_LOWER_TAGS"; then
3004 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3005 else
3006 ac_save_IFS=$IFS; IFS=$ac_path_separator
3007 ac_dummy="$PATH"
3008 for ac_dir in $ac_dummy; do
3009 IFS=$ac_save_IFS
3010 test -z "$ac_dir" && ac_dir=.
3011 $as_executable_p "$ac_dir/$ac_word" || continue
3012 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3013 echo "$as_me:3013: found $ac_dir/$ac_word" >&5
3014 break
3015 done
3016
3017 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3018 fi
3019 fi
3020 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3021 if test -n "$MAKE_LOWER_TAGS"; then
3022 echo "$as_me:3022: result: $MAKE_LOWER_TAGS" >&5
3023 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3024 else
3025 echo "$as_me:3025: result: no" >&5
3026 echo "${ECHO_T}no" >&6
3027 fi
3028
3029 if test "$cf_cv_mixedcase" = yes ; then
3030 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3031 set dummy ${ETAGS:-etags}; ac_word=$2
3032 echo "$as_me:3032: checking for $ac_word" >&5
3033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3034 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3035 echo $ECHO_N "(cached) $ECHO_C" >&6
3036 else
3037 if test -n "$MAKE_UPPER_TAGS"; then
3038 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3039 else
3040 ac_save_IFS=$IFS; IFS=$ac_path_separator
3041 ac_dummy="$PATH"
3042 for ac_dir in $ac_dummy; do
3043 IFS=$ac_save_IFS
3044 test -z "$ac_dir" && ac_dir=.
3045 $as_executable_p "$ac_dir/$ac_word" || continue
3046 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3047 echo "$as_me:3047: found $ac_dir/$ac_word" >&5
3048 break
3049 done
3050
3051 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3052 fi
3053 fi
3054 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3055 if test -n "$MAKE_UPPER_TAGS"; then
3056 echo "$as_me:3056: result: $MAKE_UPPER_TAGS" >&5
3057 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3058 else
3059 echo "$as_me:3059: result: no" >&5
3060 echo "${ECHO_T}no" >&6
3061 fi
3062
3063 else
3064 MAKE_UPPER_TAGS=no
3065 fi
3066
3067 if test "$MAKE_UPPER_TAGS" = yes ; then
3068 MAKE_UPPER_TAGS=
3069 else
3070 MAKE_UPPER_TAGS="#"
3071 fi
3072
3073 if test "$MAKE_LOWER_TAGS" = yes ; then
3074 MAKE_LOWER_TAGS=
3075 else
3076 MAKE_LOWER_TAGS="#"
3077 fi
3078
3079 echo "$as_me:3079: checking for an ANSI C-conforming const" >&5
3080 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3081 if test "${ac_cv_c_const+set}" = set; then
3082 echo $ECHO_N "(cached) $ECHO_C" >&6
3083 else
3084 cat >"conftest.$ac_ext" <<_ACEOF
3085 #line 3085 "configure"
3086 #include "confdefs.h"
3087
3088 int
3089 main (void)
3090 {
3091 /* FIXME: Include the comments suggested by Paul. */
3092 #ifndef __cplusplus
3093 /* Ultrix mips cc rejects this. */
3094 typedef int charset[2];
3095 const charset x;
3096 /* SunOS 4.1.1 cc rejects this. */
3097 char const *const *ccp;
3098 char **p;
3099 /* NEC SVR4.0.2 mips cc rejects this. */
3100 struct point {int x, y;};
3101 static struct point const zero = {0,0};
3102 /* AIX XL C 1.02.0.0 rejects this.
3103 It does not let you subtract one const X* pointer from another in
3104 an arm of an if-expression whose if-part is not a constant
3105 expression */
3106 const char *g = "string";
3107 ccp = &g + (g ? g-g : 0);
3108 /* HPUX 7.0 cc rejects these. */
3109 ++ccp;
3110 p = (char**) ccp;
3111 ccp = (char const *const *) p;
3112 { /* SCO 3.2v4 cc rejects this. */
3113 char *t;
3114 char const *s = 0 ? (char *) 0 : (char const *) 0;
3115
3116 *t++ = 0;
3117 (void)s; (void)x; (void)zero;
3118 }
3119 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3120 int x[] = {25, 17};
3121 const int *foo = &x[0];
3122 ++foo;
3123 (void)foo;
3124 }
3125 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3126 typedef const int *iptr;
3127 iptr p = 0;
3128 ++p;
3129 (void)p;
3130 }
3131 { /* AIX XL C 1.02.0.0 rejects this saying
3132 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3133 struct s { int j; const int *ap[3]; };
3134 struct s *b; b->j = 5;
3135 }
3136 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3137 const int foo = 10;
3138 (void)foo;
3139 }
3140 #endif
3141
3142 ;
3143 return 0;
3144 }
3145 _ACEOF
3146 rm -f "conftest.$ac_objext"
3147 if { (eval echo "$as_me:3147: \"$ac_compile\"") >&5
3148 (eval $ac_compile) 2>&5
3149 ac_status=$?
3150 echo "$as_me:3150: \$? = $ac_status" >&5
3151 (exit "$ac_status"); } &&
3152 { ac_try='test -s "conftest.$ac_objext"'
3153 { (eval echo "$as_me:3153: \"$ac_try\"") >&5
3154 (eval $ac_try) 2>&5
3155 ac_status=$?
3156 echo "$as_me:3156: \$? = $ac_status" >&5
3157 (exit "$ac_status"); }; }; then
3158 ac_cv_c_const=yes
3159 else
3160 echo "$as_me: failed program was:" >&5
3161 cat "conftest.$ac_ext" >&5
3162 ac_cv_c_const=no
3163 fi
3164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3165 fi
3166 echo "$as_me:3166: result: $ac_cv_c_const" >&5
3167 echo "${ECHO_T}$ac_cv_c_const" >&6
3168 if test $ac_cv_c_const = no; then
3169
3170 cat >>confdefs.h <<\EOF
3171 #define const
3172 EOF
3173
3174 fi
3175
3176 echo "$as_me:3176: checking if the POSIX test-macros are already defined" >&5
3177 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3178 if test "${cf_cv_posix_visible+set}" = set; then
3179 echo $ECHO_N "(cached) $ECHO_C" >&6
3180 else
3181
3182 cat >"conftest.$ac_ext" <<_ACEOF
3183 #line 3183 "configure"
3184 #include "confdefs.h"
3185 #include <stdio.h>
3186 int
3187 main (void)
3188 {
3189
3190 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3191 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3192 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3193 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3194 #error conflicting symbols found
3195 #endif
3196
3197 ;
3198 return 0;
3199 }
3200 _ACEOF
3201 rm -f "conftest.$ac_objext"
3202 if { (eval echo "$as_me:3202: \"$ac_compile\"") >&5
3203 (eval $ac_compile) 2>&5
3204 ac_status=$?
3205 echo "$as_me:3205: \$? = $ac_status" >&5
3206 (exit "$ac_status"); } &&
3207 { ac_try='test -s "conftest.$ac_objext"'
3208 { (eval echo "$as_me:3208: \"$ac_try\"") >&5
3209 (eval $ac_try) 2>&5
3210 ac_status=$?
3211 echo "$as_me:3211: \$? = $ac_status" >&5
3212 (exit "$ac_status"); }; }; then
3213 cf_cv_posix_visible=no
3214 else
3215 echo "$as_me: failed program was:" >&5
3216 cat "conftest.$ac_ext" >&5
3217 cf_cv_posix_visible=yes
3218 fi
3219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3220
3221 fi
3222 echo "$as_me:3222: result: $cf_cv_posix_visible" >&5
3223 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3224
3225 if test "$cf_cv_posix_visible" = no; then
3226
3227 cf_XOPEN_SOURCE=600
3228 cf_POSIX_C_SOURCE=199506L
3229 cf_xopen_source=
3230
3231 case "$host_os" in
3232 (aix[4-7]*)
3233 cf_xopen_source="-D_ALL_SOURCE"
3234 ;;
3235 (darwin[0-8].*)
3236 cf_xopen_source="-D_APPLE_C_SOURCE"
3237 ;;
3238 (darwin*)
3239 cf_xopen_source="-D_DARWIN_C_SOURCE"
3240 cf_XOPEN_SOURCE=
3241 ;;
3242 (freebsd*|dragonfly*|midnightbsd*)
3243 # 5.x headers associate
3244 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3245 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3246 cf_POSIX_C_SOURCE=200112L
3247 cf_XOPEN_SOURCE=600
3248 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3249 ;;
3250 (hpux11*)
3251 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3252 ;;
3253 (hpux*)
3254 cf_xopen_source="-D_HPUX_SOURCE"
3255 ;;
3256 (irix[56].*)
3257 cf_xopen_source="-D_SGI_SOURCE"
3258 cf_XOPEN_SOURCE=
3259 ;;
3260 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnuabielfv*|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
3261
3262 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3263
3264 echo "$as_me:3264: checking if this is the GNU C library" >&5
3265 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3266 if test "${cf_cv_gnu_library+set}" = set; then
3267 echo $ECHO_N "(cached) $ECHO_C" >&6
3268 else
3269
3270 cat >"conftest.$ac_ext" <<_ACEOF
3271 #line 3271 "configure"
3272 #include "confdefs.h"
3273 #include <sys/types.h>
3274 int
3275 main (void)
3276 {
3277
3278 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3279 return 0;
3280 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3281 return 0;
3282 #else
3283 # error not GNU C library
3284 #endif
3285 ;
3286 return 0;
3287 }
3288 _ACEOF
3289 rm -f "conftest.$ac_objext"
3290 if { (eval echo "$as_me:3290: \"$ac_compile\"") >&5
3291 (eval $ac_compile) 2>&5
3292 ac_status=$?
3293 echo "$as_me:3293: \$? = $ac_status" >&5
3294 (exit "$ac_status"); } &&
3295 { ac_try='test -s "conftest.$ac_objext"'
3296 { (eval echo "$as_me:3296: \"$ac_try\"") >&5
3297 (eval $ac_try) 2>&5
3298 ac_status=$?
3299 echo "$as_me:3299: \$? = $ac_status" >&5
3300 (exit "$ac_status"); }; }; then
3301 cf_cv_gnu_library=yes
3302 else
3303 echo "$as_me: failed program was:" >&5
3304 cat "conftest.$ac_ext" >&5
3305 cf_cv_gnu_library=no
3306 fi
3307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3308
3309 fi
3310 echo "$as_me:3310: result: $cf_cv_gnu_library" >&5
3311 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3312
3313 if test x$cf_cv_gnu_library = xyes; then
3314
3315 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3316 # was changed to help a little. newlib incorporated the change about 4
3317 # years later.
3318 echo "$as_me:3318: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3319 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3320 if test "${cf_cv_gnu_library_219+set}" = set; then
3321 echo $ECHO_N "(cached) $ECHO_C" >&6
3322 else
3323
3324 cf_save="$CPPFLAGS"
3325
3326 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3327 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3328
3329 cat >"conftest.$ac_ext" <<_ACEOF
3330 #line 3330 "configure"
3331 #include "confdefs.h"
3332 #include <sys/types.h>
3333 int
3334 main (void)
3335 {
3336
3337 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3338 return 0;
3339 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3340 return 0;
3341 #else
3342 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3343 #endif
3344 ;
3345 return 0;
3346 }
3347 _ACEOF
3348 rm -f "conftest.$ac_objext"
3349 if { (eval echo "$as_me:3349: \"$ac_compile\"") >&5
3350 (eval $ac_compile) 2>&5
3351 ac_status=$?
3352 echo "$as_me:3352: \$? = $ac_status" >&5
3353 (exit "$ac_status"); } &&
3354 { ac_try='test -s "conftest.$ac_objext"'
3355 { (eval echo "$as_me:3355: \"$ac_try\"") >&5
3356 (eval $ac_try) 2>&5
3357 ac_status=$?
3358 echo "$as_me:3358: \$? = $ac_status" >&5
3359 (exit "$ac_status"); }; }; then
3360 cf_cv_gnu_library_219=yes
3361 else
3362 echo "$as_me: failed program was:" >&5
3363 cat "conftest.$ac_ext" >&5
3364 cf_cv_gnu_library_219=no
3365 fi
3366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3367 CPPFLAGS="$cf_save"
3368
3369 fi
3370 echo "$as_me:3370: result: $cf_cv_gnu_library_219" >&5
3371 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3372
3373 if test "x$cf_cv_gnu_library_219" = xyes; then
3374 cf_save="$CPPFLAGS"
3375 echo "$as_me:3375: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3376 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3377 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3378 echo $ECHO_N "(cached) $ECHO_C" >&6
3379 else
3380
3381 cf_fix_cppflags=no
3382 cf_new_cflags=
3383 cf_new_cppflags=
3384 cf_new_extra_cppflags=
3385
3386 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3387 do
3388 case "$cf_fix_cppflags" in
3389 (no)
3390 case "$cf_add_cflags" in
3391 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3392 case "$cf_add_cflags" in
3393 (-D*)
3394 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3395
3396 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3397 && test -z "${cf_tst_cflags}" \
3398 && cf_fix_cppflags=yes
3399
3400 if test "$cf_fix_cppflags" = yes ; then
3401
3402 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3403 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3404
3405 continue
3406 elif test "${cf_tst_cflags}" = "\"'" ; then
3407
3408 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3409 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3410
3411 continue
3412 fi
3413 ;;
3414 esac
3415 case "$CPPFLAGS" in
3416 (*$cf_add_cflags)
3417 ;;
3418 (*)
3419 case "$cf_add_cflags" in
3420 (-D*)
3421 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3422
3423 CPPFLAGS=`echo "$CPPFLAGS" | \
3424 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3425 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3426
3427 ;;
3428 esac
3429
3430 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3431 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3432
3433 ;;
3434 esac
3435 ;;
3436 (*)
3437
3438 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3439 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3440
3441 ;;
3442 esac
3443 ;;
3444 (yes)
3445
3446 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3447 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3448
3449 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3450
3451 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3452 && test -z "${cf_tst_cflags}" \
3453 && cf_fix_cppflags=no
3454 ;;
3455 esac
3456 done
3457
3458 if test -n "$cf_new_cflags" ; then
3459
3460 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3461 CFLAGS="${CFLAGS}$cf_new_cflags"
3462
3463 fi
3464
3465 if test -n "$cf_new_cppflags" ; then
3466
3467 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3468 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3469
3470 fi
3471
3472 if test -n "$cf_new_extra_cppflags" ; then
3473
3474 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3475 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3476
3477 fi
3478
3479 cat >"conftest.$ac_ext" <<_ACEOF
3480 #line 3480 "configure"
3481 #include "confdefs.h"
3482
3483 #include <limits.h>
3484 #include <sys/types.h>
3485
3486 int
3487 main (void)
3488 {
3489
3490 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3491 return 0;
3492 #else
3493 # error GNU C library is too old
3494 #endif
3495 ;
3496 return 0;
3497 }
3498 _ACEOF
3499 rm -f "conftest.$ac_objext"
3500 if { (eval echo "$as_me:3500: \"$ac_compile\"") >&5
3501 (eval $ac_compile) 2>&5
3502 ac_status=$?
3503 echo "$as_me:3503: \$? = $ac_status" >&5
3504 (exit "$ac_status"); } &&
3505 { ac_try='test -s "conftest.$ac_objext"'
3506 { (eval echo "$as_me:3506: \"$ac_try\"") >&5
3507 (eval $ac_try) 2>&5
3508 ac_status=$?
3509 echo "$as_me:3509: \$? = $ac_status" >&5
3510 (exit "$ac_status"); }; }; then
3511 cf_cv_gnu_dftsrc_219=yes
3512 else
3513 echo "$as_me: failed program was:" >&5
3514 cat "conftest.$ac_ext" >&5
3515 cf_cv_gnu_dftsrc_219=no
3516 fi
3517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3518
3519 fi
3520 echo "$as_me:3520: result: $cf_cv_gnu_dftsrc_219" >&5
3521 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3522 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3523 else
3524 cf_cv_gnu_dftsrc_219=maybe
3525 fi
3526
3527 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3528
3529 echo "$as_me:3529: checking if we must define _GNU_SOURCE" >&5
3530 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3531 if test "${cf_cv_gnu_source+set}" = set; then
3532 echo $ECHO_N "(cached) $ECHO_C" >&6
3533 else
3534
3535 cat >"conftest.$ac_ext" <<_ACEOF
3536 #line 3536 "configure"
3537 #include "confdefs.h"
3538 #include <sys/types.h>
3539 int
3540 main (void)
3541 {
3542
3543 #ifndef _XOPEN_SOURCE
3544 #error expected _XOPEN_SOURCE to be defined
3545 #endif
3546 ;
3547 return 0;
3548 }
3549 _ACEOF
3550 rm -f "conftest.$ac_objext"
3551 if { (eval echo "$as_me:3551: \"$ac_compile\"") >&5
3552 (eval $ac_compile) 2>&5
3553 ac_status=$?
3554 echo "$as_me:3554: \$? = $ac_status" >&5
3555 (exit "$ac_status"); } &&
3556 { ac_try='test -s "conftest.$ac_objext"'
3557 { (eval echo "$as_me:3557: \"$ac_try\"") >&5
3558 (eval $ac_try) 2>&5
3559 ac_status=$?
3560 echo "$as_me:3560: \$? = $ac_status" >&5
3561 (exit "$ac_status"); }; }; then
3562 cf_cv_gnu_source=no
3563 else
3564 echo "$as_me: failed program was:" >&5
3565 cat "conftest.$ac_ext" >&5
3566 cf_save="$CPPFLAGS"
3567
3568 cf_fix_cppflags=no
3569 cf_new_cflags=
3570 cf_new_cppflags=
3571 cf_new_extra_cppflags=
3572
3573 for cf_add_cflags in -D_GNU_SOURCE
3574 do
3575 case "$cf_fix_cppflags" in
3576 (no)
3577 case "$cf_add_cflags" in
3578 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3579 case "$cf_add_cflags" in
3580 (-D*)
3581 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3582
3583 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3584 && test -z "${cf_tst_cflags}" \
3585 && cf_fix_cppflags=yes
3586
3587 if test "$cf_fix_cppflags" = yes ; then
3588
3589 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3590 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3591
3592 continue
3593 elif test "${cf_tst_cflags}" = "\"'" ; then
3594
3595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3597
3598 continue
3599 fi
3600 ;;
3601 esac
3602 case "$CPPFLAGS" in
3603 (*$cf_add_cflags)
3604 ;;
3605 (*)
3606 case "$cf_add_cflags" in
3607 (-D*)
3608 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3609
3610 CPPFLAGS=`echo "$CPPFLAGS" | \
3611 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3612 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3613
3614 ;;
3615 esac
3616
3617 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3618 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3619
3620 ;;
3621 esac
3622 ;;
3623 (*)
3624
3625 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3626 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3627
3628 ;;
3629 esac
3630 ;;
3631 (yes)
3632
3633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3635
3636 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3637
3638 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3639 && test -z "${cf_tst_cflags}" \
3640 && cf_fix_cppflags=no
3641 ;;
3642 esac
3643 done
3644
3645 if test -n "$cf_new_cflags" ; then
3646
3647 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3648 CFLAGS="${CFLAGS}$cf_new_cflags"
3649
3650 fi
3651
3652 if test -n "$cf_new_cppflags" ; then
3653
3654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3655 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3656
3657 fi
3658
3659 if test -n "$cf_new_extra_cppflags" ; then
3660
3661 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3662 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3663
3664 fi
3665
3666 cat >"conftest.$ac_ext" <<_ACEOF
3667 #line 3667 "configure"
3668 #include "confdefs.h"
3669 #include <sys/types.h>
3670 int
3671 main (void)
3672 {
3673
3674 #ifdef _XOPEN_SOURCE
3675 #error expected _XOPEN_SOURCE to be undefined
3676 #endif
3677 ;
3678 return 0;
3679 }
3680 _ACEOF
3681 rm -f "conftest.$ac_objext"
3682 if { (eval echo "$as_me:3682: \"$ac_compile\"") >&5
3683 (eval $ac_compile) 2>&5
3684 ac_status=$?
3685 echo "$as_me:3685: \$? = $ac_status" >&5
3686 (exit "$ac_status"); } &&
3687 { ac_try='test -s "conftest.$ac_objext"'
3688 { (eval echo "$as_me:3688: \"$ac_try\"") >&5
3689 (eval $ac_try) 2>&5
3690 ac_status=$?
3691 echo "$as_me:3691: \$? = $ac_status" >&5
3692 (exit "$ac_status"); }; }; then
3693 cf_cv_gnu_source=no
3694 else
3695 echo "$as_me: failed program was:" >&5
3696 cat "conftest.$ac_ext" >&5
3697 cf_cv_gnu_source=yes
3698 fi
3699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3700 CPPFLAGS="$cf_save"
3701
3702 fi
3703 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3704
3705 fi
3706 echo "$as_me:3706: result: $cf_cv_gnu_source" >&5
3707 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3708
3709 if test "$cf_cv_gnu_source" = yes
3710 then
3711 echo "$as_me:3711: checking if we should also define _DEFAULT_SOURCE" >&5
3712 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3713 if test "${cf_cv_default_source+set}" = set; then
3714 echo $ECHO_N "(cached) $ECHO_C" >&6
3715 else
3716
3717 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3718 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3719
3720 cat >"conftest.$ac_ext" <<_ACEOF
3721 #line 3721 "configure"
3722 #include "confdefs.h"
3723 #include <sys/types.h>
3724 int
3725 main (void)
3726 {
3727
3728 #ifdef _DEFAULT_SOURCE
3729 #error expected _DEFAULT_SOURCE to be undefined
3730 #endif
3731 ;
3732 return 0;
3733 }
3734 _ACEOF
3735 rm -f "conftest.$ac_objext"
3736 if { (eval echo "$as_me:3736: \"$ac_compile\"") >&5
3737 (eval $ac_compile) 2>&5
3738 ac_status=$?
3739 echo "$as_me:3739: \$? = $ac_status" >&5
3740 (exit "$ac_status"); } &&
3741 { ac_try='test -s "conftest.$ac_objext"'
3742 { (eval echo "$as_me:3742: \"$ac_try\"") >&5
3743 (eval $ac_try) 2>&5
3744 ac_status=$?
3745 echo "$as_me:3745: \$? = $ac_status" >&5
3746 (exit "$ac_status"); }; }; then
3747 cf_cv_default_source=no
3748 else
3749 echo "$as_me: failed program was:" >&5
3750 cat "conftest.$ac_ext" >&5
3751 cf_cv_default_source=yes
3752 fi
3753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3754
3755 fi
3756 echo "$as_me:3756: result: $cf_cv_default_source" >&5
3757 echo "${ECHO_T}$cf_cv_default_source" >&6
3758 if test "$cf_cv_default_source" = yes
3759 then
3760
3761 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3762 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3763
3764 fi
3765 fi
3766 fi
3767
3768 fi
3769
3770 ;;
3771 linux*musl)
3772 cf_xopen_source="-D_BSD_SOURCE"
3773 ;;
3774 (minix*)
3775 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3776 ;;
3777 (mirbsd*)
3778 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3779 cf_XOPEN_SOURCE=
3780
3781 if test "$cf_cv_posix_visible" = no; then
3782
3783 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3784
3785 cf_save_CFLAGS="$CFLAGS"
3786 cf_save_CPPFLAGS="$CPPFLAGS"
3787
3788 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3789 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3790 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3791
3792 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3793 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3794 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3795
3796 echo "$as_me:3796: checking if we should define _POSIX_C_SOURCE" >&5
3797 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3798 if test "${cf_cv_posix_c_source+set}" = set; then
3799 echo $ECHO_N "(cached) $ECHO_C" >&6
3800 else
3801
3802 echo "${as_me:-configure}:3802: testing if the symbol is already defined go no further ..." 1>&5
3803
3804 cat >"conftest.$ac_ext" <<_ACEOF
3805 #line 3805 "configure"
3806 #include "confdefs.h"
3807 #include <sys/types.h>
3808 int
3809 main (void)
3810 {
3811
3812 #ifndef _POSIX_C_SOURCE
3813 #error _POSIX_C_SOURCE is not defined
3814 #endif
3815 ;
3816 return 0;
3817 }
3818 _ACEOF
3819 rm -f "conftest.$ac_objext"
3820 if { (eval echo "$as_me:3820: \"$ac_compile\"") >&5
3821 (eval $ac_compile) 2>&5
3822 ac_status=$?
3823 echo "$as_me:3823: \$? = $ac_status" >&5
3824 (exit "$ac_status"); } &&
3825 { ac_try='test -s "conftest.$ac_objext"'
3826 { (eval echo "$as_me:3826: \"$ac_try\"") >&5
3827 (eval $ac_try) 2>&5
3828 ac_status=$?
3829 echo "$as_me:3829: \$? = $ac_status" >&5
3830 (exit "$ac_status"); }; }; then
3831 cf_cv_posix_c_source=no
3832 else
3833 echo "$as_me: failed program was:" >&5
3834 cat "conftest.$ac_ext" >&5
3835 cf_want_posix_source=no
3836 case .$cf_POSIX_C_SOURCE in
3837 (.[12]??*)
3838 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3839 ;;
3840 (.2)
3841 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3842 cf_want_posix_source=yes
3843 ;;
3844 (.*)
3845 cf_want_posix_source=yes
3846 ;;
3847 esac
3848 if test "$cf_want_posix_source" = yes ; then
3849 cat >"conftest.$ac_ext" <<_ACEOF
3850 #line 3850 "configure"
3851 #include "confdefs.h"
3852 #include <sys/types.h>
3853 int
3854 main (void)
3855 {
3856
3857 #ifdef _POSIX_SOURCE
3858 #error _POSIX_SOURCE is defined
3859 #endif
3860 ;
3861 return 0;
3862 }
3863 _ACEOF
3864 rm -f "conftest.$ac_objext"
3865 if { (eval echo "$as_me:3865: \"$ac_compile\"") >&5
3866 (eval $ac_compile) 2>&5
3867 ac_status=$?
3868 echo "$as_me:3868: \$? = $ac_status" >&5
3869 (exit "$ac_status"); } &&
3870 { ac_try='test -s "conftest.$ac_objext"'
3871 { (eval echo "$as_me:3871: \"$ac_try\"") >&5
3872 (eval $ac_try) 2>&5
3873 ac_status=$?
3874 echo "$as_me:3874: \$? = $ac_status" >&5
3875 (exit "$ac_status"); }; }; then
3876 :
3877 else
3878 echo "$as_me: failed program was:" >&5
3879 cat "conftest.$ac_ext" >&5
3880 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3881 fi
3882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3883 fi
3884
3885 echo "${as_me:-configure}:3885: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3886
3887 CFLAGS="$cf_trim_CFLAGS"
3888 CPPFLAGS="$cf_trim_CPPFLAGS"
3889
3890 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3891 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3892
3893 echo "${as_me:-configure}:3893: testing if the second compile does not leave our definition intact error ..." 1>&5
3894
3895 cat >"conftest.$ac_ext" <<_ACEOF
3896 #line 3896 "configure"
3897 #include "confdefs.h"
3898 #include <sys/types.h>
3899 int
3900 main (void)
3901 {
3902
3903 #ifndef _POSIX_C_SOURCE
3904 #error _POSIX_C_SOURCE is not defined
3905 #endif
3906 ;
3907 return 0;
3908 }
3909 _ACEOF
3910 rm -f "conftest.$ac_objext"
3911 if { (eval echo "$as_me:3911: \"$ac_compile\"") >&5
3912 (eval $ac_compile) 2>&5
3913 ac_status=$?
3914 echo "$as_me:3914: \$? = $ac_status" >&5
3915 (exit "$ac_status"); } &&
3916 { ac_try='test -s "conftest.$ac_objext"'
3917 { (eval echo "$as_me:3917: \"$ac_try\"") >&5
3918 (eval $ac_try) 2>&5
3919 ac_status=$?
3920 echo "$as_me:3920: \$? = $ac_status" >&5
3921 (exit "$ac_status"); }; }; then
3922 :
3923 else
3924 echo "$as_me: failed program was:" >&5
3925 cat "conftest.$ac_ext" >&5
3926 cf_cv_posix_c_source=no
3927 fi
3928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3929 CFLAGS="$cf_save_CFLAGS"
3930 CPPFLAGS="$cf_save_CPPFLAGS"
3931
3932 fi
3933 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3934
3935 fi
3936 echo "$as_me:3936: result: $cf_cv_posix_c_source" >&5
3937 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3938
3939 if test "$cf_cv_posix_c_source" != no ; then
3940 CFLAGS="$cf_trim_CFLAGS"
3941 CPPFLAGS="$cf_trim_CPPFLAGS"
3942
3943 cf_fix_cppflags=no
3944 cf_new_cflags=
3945 cf_new_cppflags=
3946 cf_new_extra_cppflags=
3947
3948 for cf_add_cflags in $cf_cv_posix_c_source
3949 do
3950 case "$cf_fix_cppflags" in
3951 (no)
3952 case "$cf_add_cflags" in
3953 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3954 case "$cf_add_cflags" in
3955 (-D*)
3956 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3957
3958 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3959 && test -z "${cf_tst_cflags}" \
3960 && cf_fix_cppflags=yes
3961
3962 if test "$cf_fix_cppflags" = yes ; then
3963
3964 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3965 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3966
3967 continue
3968 elif test "${cf_tst_cflags}" = "\"'" ; then
3969
3970 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3971 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3972
3973 continue
3974 fi
3975 ;;
3976 esac
3977 case "$CPPFLAGS" in
3978 (*$cf_add_cflags)
3979 ;;
3980 (*)
3981 case "$cf_add_cflags" in
3982 (-D*)
3983 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3984
3985 CPPFLAGS=`echo "$CPPFLAGS" | \
3986 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3987 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3988
3989 ;;
3990 esac
3991
3992 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3993 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3994
3995 ;;
3996 esac
3997 ;;
3998 (*)
3999
4000 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4001 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4002
4003 ;;
4004 esac
4005 ;;
4006 (yes)
4007
4008 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4009 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4010
4011 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4012
4013 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4014 && test -z "${cf_tst_cflags}" \
4015 && cf_fix_cppflags=no
4016 ;;
4017 esac
4018 done
4019
4020 if test -n "$cf_new_cflags" ; then
4021
4022 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4023 CFLAGS="${CFLAGS}$cf_new_cflags"
4024
4025 fi
4026
4027 if test -n "$cf_new_cppflags" ; then
4028
4029 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4030 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4031
4032 fi
4033
4034 if test -n "$cf_new_extra_cppflags" ; then
4035
4036 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4037 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4038
4039 fi
4040
4041 fi
4042
4043 fi # cf_cv_posix_visible
4044
4045 ;;
4046 (netbsd*)
4047 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4048 ;;
4049 (openbsd[6-9]*)
4050 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4051 # see https://www.mail-archive.com/[email protected]/msg13200.html
4052 # Abusing the conformance level is a workaround.
4053 { echo "$as_me:4053: WARNING: this system does not provide usable locale support" >&5
4054 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4055 cf_xopen_source="-D_BSD_SOURCE"
4056 cf_XOPEN_SOURCE=700
4057 ;;
4058 (openbsd[4-5]*)
4059 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4060 cf_xopen_source="-D_BSD_SOURCE"
4061 cf_XOPEN_SOURCE=600
4062 ;;
4063 (openbsd*)
4064 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4065 ;;
4066 (osf[45]*)
4067 cf_xopen_source="-D_OSF_SOURCE"
4068 ;;
4069 (nto-qnx*)
4070 cf_xopen_source="-D_QNX_SOURCE"
4071 ;;
4072 (sco*)
4073 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4074 ;;
4075 (solaris2.*)
4076 cf_xopen_source="-D__EXTENSIONS__"
4077 cf_cv_xopen_source=broken
4078 ;;
4079 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4080 cf_XOPEN_SOURCE=
4081 cf_POSIX_C_SOURCE=
4082 ;;
4083 (*)
4084
4085 echo "$as_me:4085: checking if we should define _XOPEN_SOURCE" >&5
4086 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4087 if test "${cf_cv_xopen_source+set}" = set; then
4088 echo $ECHO_N "(cached) $ECHO_C" >&6
4089 else
4090
4091 cat >"conftest.$ac_ext" <<_ACEOF
4092 #line 4092 "configure"
4093 #include "confdefs.h"
4094
4095 $ac_includes_default
4096
4097 int
4098 main (void)
4099 {
4100
4101 #ifndef _XOPEN_SOURCE
4102 #error _XOPEN_SOURCE is not defined
4103 #endif
4104
4105 ;
4106 return 0;
4107 }
4108 _ACEOF
4109 rm -f "conftest.$ac_objext"
4110 if { (eval echo "$as_me:4110: \"$ac_compile\"") >&5
4111 (eval $ac_compile) 2>&5
4112 ac_status=$?
4113 echo "$as_me:4113: \$? = $ac_status" >&5
4114 (exit "$ac_status"); } &&
4115 { ac_try='test -s "conftest.$ac_objext"'
4116 { (eval echo "$as_me:4116: \"$ac_try\"") >&5
4117 (eval $ac_try) 2>&5
4118 ac_status=$?
4119 echo "$as_me:4119: \$? = $ac_status" >&5
4120 (exit "$ac_status"); }; }; then
4121 cf_cv_xopen_source=no
4122 else
4123 echo "$as_me: failed program was:" >&5
4124 cat "conftest.$ac_ext" >&5
4125 cf_save="$CPPFLAGS"
4126
4127 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4128 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4129
4130 cat >"conftest.$ac_ext" <<_ACEOF
4131 #line 4131 "configure"
4132 #include "confdefs.h"
4133
4134 $ac_includes_default
4135
4136 int
4137 main (void)
4138 {
4139
4140 #ifndef _XOPEN_SOURCE
4141 #error _XOPEN_SOURCE is not defined
4142 #endif
4143
4144 ;
4145 return 0;
4146 }
4147 _ACEOF
4148 rm -f "conftest.$ac_objext"
4149 if { (eval echo "$as_me:4149: \"$ac_compile\"") >&5
4150 (eval $ac_compile) 2>&5
4151 ac_status=$?
4152 echo "$as_me:4152: \$? = $ac_status" >&5
4153 (exit "$ac_status"); } &&
4154 { ac_try='test -s "conftest.$ac_objext"'
4155 { (eval echo "$as_me:4155: \"$ac_try\"") >&5
4156 (eval $ac_try) 2>&5
4157 ac_status=$?
4158 echo "$as_me:4158: \$? = $ac_status" >&5
4159 (exit "$ac_status"); }; }; then
4160 cf_cv_xopen_source=no
4161 else
4162 echo "$as_me: failed program was:" >&5
4163 cat "conftest.$ac_ext" >&5
4164 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4165 fi
4166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4167 CPPFLAGS="$cf_save"
4168
4169 fi
4170 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4171
4172 fi
4173 echo "$as_me:4173: result: $cf_cv_xopen_source" >&5
4174 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4175
4176 if test "$cf_cv_xopen_source" != no ; then
4177
4178 CFLAGS=`echo "$CFLAGS" | \
4179 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4180 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4181
4182 CPPFLAGS=`echo "$CPPFLAGS" | \
4183 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4184 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4185
4186 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4187
4188 for cf_add_cflags in $cf_temp_xopen_source
4189 do
4190 case "x$cf_add_cflags" in
4191 (x-[DU]*)
4192
4193 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4194 while true
4195 do
4196 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'`
4197 test "$CFLAGS" != "$cf_old_cflag" || break
4198
4199 CFLAGS="$cf_old_cflag"
4200 done
4201
4202 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4203 while true
4204 do
4205 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'`
4206 test "$CPPFLAGS" != "$cf_old_cflag" || break
4207
4208 CPPFLAGS="$cf_old_cflag"
4209 done
4210
4211 ;;
4212 esac
4213
4214 cf_fix_cppflags=no
4215 cf_new_cflags=
4216 cf_new_cppflags=
4217 cf_new_extra_cppflags=
4218
4219 for cf_add_cflags in $cf_add_cflags
4220 do
4221 case "$cf_fix_cppflags" in
4222 (no)
4223 case "$cf_add_cflags" in
4224 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4225 case "$cf_add_cflags" in
4226 (-D*)
4227 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4228
4229 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4230 && test -z "${cf_tst_cflags}" \
4231 && cf_fix_cppflags=yes
4232
4233 if test "$cf_fix_cppflags" = yes ; then
4234
4235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4237
4238 continue
4239 elif test "${cf_tst_cflags}" = "\"'" ; then
4240
4241 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4242 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4243
4244 continue
4245 fi
4246 ;;
4247 esac
4248 case "$CPPFLAGS" in
4249 (*$cf_add_cflags)
4250 ;;
4251 (*)
4252 case "$cf_add_cflags" in
4253 (-D*)
4254 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4255
4256 CPPFLAGS=`echo "$CPPFLAGS" | \
4257 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4258 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4259
4260 ;;
4261 esac
4262
4263 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4264 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4265
4266 ;;
4267 esac
4268 ;;
4269 (*)
4270
4271 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4272 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4273
4274 ;;
4275 esac
4276 ;;
4277 (yes)
4278
4279 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4280 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4281
4282 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4283
4284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4285 && test -z "${cf_tst_cflags}" \
4286 && cf_fix_cppflags=no
4287 ;;
4288 esac
4289 done
4290
4291 if test -n "$cf_new_cflags" ; then
4292
4293 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4294 CFLAGS="${CFLAGS}$cf_new_cflags"
4295
4296 fi
4297
4298 if test -n "$cf_new_cppflags" ; then
4299
4300 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4301 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4302
4303 fi
4304
4305 if test -n "$cf_new_extra_cppflags" ; then
4306
4307 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4308 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4309
4310 fi
4311
4312 done
4313
4314 fi
4315
4316 cf_save_xopen_cppflags="$CPPFLAGS"
4317
4318 if test "$cf_cv_posix_visible" = no; then
4319
4320 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4321
4322 cf_save_CFLAGS="$CFLAGS"
4323 cf_save_CPPFLAGS="$CPPFLAGS"
4324
4325 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4326 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4327 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4328
4329 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4330 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4331 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4332
4333 echo "$as_me:4333: checking if we should define _POSIX_C_SOURCE" >&5
4334 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4335 if test "${cf_cv_posix_c_source+set}" = set; then
4336 echo $ECHO_N "(cached) $ECHO_C" >&6
4337 else
4338
4339 echo "${as_me:-configure}:4339: testing if the symbol is already defined go no further ..." 1>&5
4340
4341 cat >"conftest.$ac_ext" <<_ACEOF
4342 #line 4342 "configure"
4343 #include "confdefs.h"
4344 #include <sys/types.h>
4345 int
4346 main (void)
4347 {
4348
4349 #ifndef _POSIX_C_SOURCE
4350 #error _POSIX_C_SOURCE is not defined
4351 #endif
4352 ;
4353 return 0;
4354 }
4355 _ACEOF
4356 rm -f "conftest.$ac_objext"
4357 if { (eval echo "$as_me:4357: \"$ac_compile\"") >&5
4358 (eval $ac_compile) 2>&5
4359 ac_status=$?
4360 echo "$as_me:4360: \$? = $ac_status" >&5
4361 (exit "$ac_status"); } &&
4362 { ac_try='test -s "conftest.$ac_objext"'
4363 { (eval echo "$as_me:4363: \"$ac_try\"") >&5
4364 (eval $ac_try) 2>&5
4365 ac_status=$?
4366 echo "$as_me:4366: \$? = $ac_status" >&5
4367 (exit "$ac_status"); }; }; then
4368 cf_cv_posix_c_source=no
4369 else
4370 echo "$as_me: failed program was:" >&5
4371 cat "conftest.$ac_ext" >&5
4372 cf_want_posix_source=no
4373 case .$cf_POSIX_C_SOURCE in
4374 (.[12]??*)
4375 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4376 ;;
4377 (.2)
4378 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4379 cf_want_posix_source=yes
4380 ;;
4381 (.*)
4382 cf_want_posix_source=yes
4383 ;;
4384 esac
4385 if test "$cf_want_posix_source" = yes ; then
4386 cat >"conftest.$ac_ext" <<_ACEOF
4387 #line 4387 "configure"
4388 #include "confdefs.h"
4389 #include <sys/types.h>
4390 int
4391 main (void)
4392 {
4393
4394 #ifdef _POSIX_SOURCE
4395 #error _POSIX_SOURCE is defined
4396 #endif
4397 ;
4398 return 0;
4399 }
4400 _ACEOF
4401 rm -f "conftest.$ac_objext"
4402 if { (eval echo "$as_me:4402: \"$ac_compile\"") >&5
4403 (eval $ac_compile) 2>&5
4404 ac_status=$?
4405 echo "$as_me:4405: \$? = $ac_status" >&5
4406 (exit "$ac_status"); } &&
4407 { ac_try='test -s "conftest.$ac_objext"'
4408 { (eval echo "$as_me:4408: \"$ac_try\"") >&5
4409 (eval $ac_try) 2>&5
4410 ac_status=$?
4411 echo "$as_me:4411: \$? = $ac_status" >&5
4412 (exit "$ac_status"); }; }; then
4413 :
4414 else
4415 echo "$as_me: failed program was:" >&5
4416 cat "conftest.$ac_ext" >&5
4417 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4418 fi
4419 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4420 fi
4421
4422 echo "${as_me:-configure}:4422: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4423
4424 CFLAGS="$cf_trim_CFLAGS"
4425 CPPFLAGS="$cf_trim_CPPFLAGS"
4426
4427 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4428 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4429
4430 echo "${as_me:-configure}:4430: testing if the second compile does not leave our definition intact error ..." 1>&5
4431
4432 cat >"conftest.$ac_ext" <<_ACEOF
4433 #line 4433 "configure"
4434 #include "confdefs.h"
4435 #include <sys/types.h>
4436 int
4437 main (void)
4438 {
4439
4440 #ifndef _POSIX_C_SOURCE
4441 #error _POSIX_C_SOURCE is not defined
4442 #endif
4443 ;
4444 return 0;
4445 }
4446 _ACEOF
4447 rm -f "conftest.$ac_objext"
4448 if { (eval echo "$as_me:4448: \"$ac_compile\"") >&5
4449 (eval $ac_compile) 2>&5
4450 ac_status=$?
4451 echo "$as_me:4451: \$? = $ac_status" >&5
4452 (exit "$ac_status"); } &&
4453 { ac_try='test -s "conftest.$ac_objext"'
4454 { (eval echo "$as_me:4454: \"$ac_try\"") >&5
4455 (eval $ac_try) 2>&5
4456 ac_status=$?
4457 echo "$as_me:4457: \$? = $ac_status" >&5
4458 (exit "$ac_status"); }; }; then
4459 :
4460 else
4461 echo "$as_me: failed program was:" >&5
4462 cat "conftest.$ac_ext" >&5
4463 cf_cv_posix_c_source=no
4464 fi
4465 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4466 CFLAGS="$cf_save_CFLAGS"
4467 CPPFLAGS="$cf_save_CPPFLAGS"
4468
4469 fi
4470 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4471
4472 fi
4473 echo "$as_me:4473: result: $cf_cv_posix_c_source" >&5
4474 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4475
4476 if test "$cf_cv_posix_c_source" != no ; then
4477 CFLAGS="$cf_trim_CFLAGS"
4478 CPPFLAGS="$cf_trim_CPPFLAGS"
4479
4480 cf_fix_cppflags=no
4481 cf_new_cflags=
4482 cf_new_cppflags=
4483 cf_new_extra_cppflags=
4484
4485 for cf_add_cflags in $cf_cv_posix_c_source
4486 do
4487 case "$cf_fix_cppflags" in
4488 (no)
4489 case "$cf_add_cflags" in
4490 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4491 case "$cf_add_cflags" in
4492 (-D*)
4493 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4494
4495 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4496 && test -z "${cf_tst_cflags}" \
4497 && cf_fix_cppflags=yes
4498
4499 if test "$cf_fix_cppflags" = yes ; then
4500
4501 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4502 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4503
4504 continue
4505 elif test "${cf_tst_cflags}" = "\"'" ; then
4506
4507 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4508 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4509
4510 continue
4511 fi
4512 ;;
4513 esac
4514 case "$CPPFLAGS" in
4515 (*$cf_add_cflags)
4516 ;;
4517 (*)
4518 case "$cf_add_cflags" in
4519 (-D*)
4520 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4521
4522 CPPFLAGS=`echo "$CPPFLAGS" | \
4523 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4524 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4525
4526 ;;
4527 esac
4528
4529 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4530 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4531
4532 ;;
4533 esac
4534 ;;
4535 (*)
4536
4537 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4538 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4539
4540 ;;
4541 esac
4542 ;;
4543 (yes)
4544
4545 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4546 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4547
4548 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4549
4550 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4551 && test -z "${cf_tst_cflags}" \
4552 && cf_fix_cppflags=no
4553 ;;
4554 esac
4555 done
4556
4557 if test -n "$cf_new_cflags" ; then
4558
4559 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4560 CFLAGS="${CFLAGS}$cf_new_cflags"
4561
4562 fi
4563
4564 if test -n "$cf_new_cppflags" ; then
4565
4566 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4567 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4568
4569 fi
4570
4571 if test -n "$cf_new_extra_cppflags" ; then
4572
4573 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4574 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4575
4576 fi
4577
4578 fi
4579
4580 fi # cf_cv_posix_visible
4581
4582 # Some of these niche implementations use copy/paste, double-check...
4583 if test "$cf_cv_xopen_source" = no ; then
4584 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
4585
4586 echo "${as_me:-configure}:4586: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
4587
4588 cat >"conftest.$ac_ext" <<_ACEOF
4589 #line 4589 "configure"
4590 #include "confdefs.h"
4591
4592 $ac_includes_default
4593
4594 int
4595 main (void)
4596 {
4597
4598 #ifndef _XOPEN_SOURCE
4599 #error _XOPEN_SOURCE is not defined
4600 #endif
4601
4602 ;
4603 return 0;
4604 }
4605 _ACEOF
4606 rm -f "conftest.$ac_objext"
4607 if { (eval echo "$as_me:4607: \"$ac_compile\"") >&5
4608 (eval $ac_compile) 2>&5
4609 ac_status=$?
4610 echo "$as_me:4610: \$? = $ac_status" >&5
4611 (exit "$ac_status"); } &&
4612 { ac_try='test -s "conftest.$ac_objext"'
4613 { (eval echo "$as_me:4613: \"$ac_try\"") >&5
4614 (eval $ac_try) 2>&5
4615 ac_status=$?
4616 echo "$as_me:4616: \$? = $ac_status" >&5
4617 (exit "$ac_status"); }; }; then
4618 :
4619 else
4620 echo "$as_me: failed program was:" >&5
4621 cat "conftest.$ac_ext" >&5
4622
4623 { echo "$as_me:4623: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
4624 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
4625 CPPFLAGS="$cf_save_xopen_cppflags"
4626 fi
4627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4628 fi
4629 ;;
4630 esac
4631
4632 if test -n "$cf_xopen_source" ; then
4633
4634 for cf_add_cflags in $cf_xopen_source
4635 do
4636 case "x$cf_add_cflags" in
4637 (x-[DU]*)
4638
4639 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4640 while true
4641 do
4642 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'`
4643 test "$CFLAGS" != "$cf_old_cflag" || break
4644 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
4645
4646 echo "${as_me:-configure}:4646: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
4647
4648 CFLAGS="$cf_old_cflag"
4649 done
4650
4651 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4652 while true
4653 do
4654 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'`
4655 test "$CPPFLAGS" != "$cf_old_cflag" || break
4656 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
4657
4658 echo "${as_me:-configure}:4658: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
4659
4660 CPPFLAGS="$cf_old_cflag"
4661 done
4662
4663 ;;
4664 esac
4665
4666 cf_fix_cppflags=no
4667 cf_new_cflags=
4668 cf_new_cppflags=
4669 cf_new_extra_cppflags=
4670
4671 for cf_add_cflags in $cf_add_cflags
4672 do
4673 case "$cf_fix_cppflags" in
4674 (no)
4675 case "$cf_add_cflags" in
4676 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4677 case "$cf_add_cflags" in
4678 (-D*)
4679 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4680
4681 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4682 && test -z "${cf_tst_cflags}" \
4683 && cf_fix_cppflags=yes
4684
4685 if test "$cf_fix_cppflags" = yes ; then
4686
4687 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4688 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4689
4690 continue
4691 elif test "${cf_tst_cflags}" = "\"'" ; then
4692
4693 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4694 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4695
4696 continue
4697 fi
4698 ;;
4699 esac
4700 case "$CPPFLAGS" in
4701 (*$cf_add_cflags)
4702 ;;
4703 (*)
4704 case "$cf_add_cflags" in
4705 (-D*)
4706 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4707
4708 CPPFLAGS=`echo "$CPPFLAGS" | \
4709 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4710 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4711
4712 ;;
4713 esac
4714
4715 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4716 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4717
4718 ;;
4719 esac
4720 ;;
4721 (*)
4722
4723 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4724 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4725
4726 ;;
4727 esac
4728 ;;
4729 (yes)
4730
4731 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4732 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4733
4734 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4735
4736 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4737 && test -z "${cf_tst_cflags}" \
4738 && cf_fix_cppflags=no
4739 ;;
4740 esac
4741 done
4742
4743 if test -n "$cf_new_cflags" ; then
4744 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4745
4746 echo "${as_me:-configure}:4746: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4747
4748 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4749 CFLAGS="${CFLAGS}$cf_new_cflags"
4750
4751 fi
4752
4753 if test -n "$cf_new_cppflags" ; then
4754 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4755
4756 echo "${as_me:-configure}:4756: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4757
4758 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4759 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4760
4761 fi
4762
4763 if test -n "$cf_new_extra_cppflags" ; then
4764 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4765
4766 echo "${as_me:-configure}:4766: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4767
4768 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4769 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4770
4771 fi
4772
4773 done
4774
4775 fi
4776
4777 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4778 echo "$as_me:4778: checking if _XOPEN_SOURCE really is set" >&5
4779 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4780 cat >"conftest.$ac_ext" <<_ACEOF
4781 #line 4781 "configure"
4782 #include "confdefs.h"
4783 #include <stdlib.h>
4784 int
4785 main (void)
4786 {
4787
4788 #ifndef _XOPEN_SOURCE
4789 #error _XOPEN_SOURCE is not defined
4790 #endif
4791 ;
4792 return 0;
4793 }
4794 _ACEOF
4795 rm -f "conftest.$ac_objext"
4796 if { (eval echo "$as_me:4796: \"$ac_compile\"") >&5
4797 (eval $ac_compile) 2>&5
4798 ac_status=$?
4799 echo "$as_me:4799: \$? = $ac_status" >&5
4800 (exit "$ac_status"); } &&
4801 { ac_try='test -s "conftest.$ac_objext"'
4802 { (eval echo "$as_me:4802: \"$ac_try\"") >&5
4803 (eval $ac_try) 2>&5
4804 ac_status=$?
4805 echo "$as_me:4805: \$? = $ac_status" >&5
4806 (exit "$ac_status"); }; }; then
4807 cf_XOPEN_SOURCE_set=yes
4808 else
4809 echo "$as_me: failed program was:" >&5
4810 cat "conftest.$ac_ext" >&5
4811 cf_XOPEN_SOURCE_set=no
4812 fi
4813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4814 echo "$as_me:4814: result: $cf_XOPEN_SOURCE_set" >&5
4815 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4816 if test "$cf_XOPEN_SOURCE_set" = yes
4817 then
4818 cat >"conftest.$ac_ext" <<_ACEOF
4819 #line 4819 "configure"
4820 #include "confdefs.h"
4821 #include <stdlib.h>
4822 int
4823 main (void)
4824 {
4825
4826 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4827 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4828 #endif
4829 ;
4830 return 0;
4831 }
4832 _ACEOF
4833 rm -f "conftest.$ac_objext"
4834 if { (eval echo "$as_me:4834: \"$ac_compile\"") >&5
4835 (eval $ac_compile) 2>&5
4836 ac_status=$?
4837 echo "$as_me:4837: \$? = $ac_status" >&5
4838 (exit "$ac_status"); } &&
4839 { ac_try='test -s "conftest.$ac_objext"'
4840 { (eval echo "$as_me:4840: \"$ac_try\"") >&5
4841 (eval $ac_try) 2>&5
4842 ac_status=$?
4843 echo "$as_me:4843: \$? = $ac_status" >&5
4844 (exit "$ac_status"); }; }; then
4845 cf_XOPEN_SOURCE_set_ok=yes
4846 else
4847 echo "$as_me: failed program was:" >&5
4848 cat "conftest.$ac_ext" >&5
4849 cf_XOPEN_SOURCE_set_ok=no
4850 fi
4851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4852 if test "$cf_XOPEN_SOURCE_set_ok" = no
4853 then
4854 { echo "$as_me:4854: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4855 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4856 fi
4857 else
4858
4859 echo "$as_me:4859: checking if we should define _XOPEN_SOURCE" >&5
4860 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4861 if test "${cf_cv_xopen_source+set}" = set; then
4862 echo $ECHO_N "(cached) $ECHO_C" >&6
4863 else
4864
4865 cat >"conftest.$ac_ext" <<_ACEOF
4866 #line 4866 "configure"
4867 #include "confdefs.h"
4868
4869 $ac_includes_default
4870
4871 int
4872 main (void)
4873 {
4874
4875 #ifndef _XOPEN_SOURCE
4876 #error _XOPEN_SOURCE is not defined
4877 #endif
4878
4879 ;
4880 return 0;
4881 }
4882 _ACEOF
4883 rm -f "conftest.$ac_objext"
4884 if { (eval echo "$as_me:4884: \"$ac_compile\"") >&5
4885 (eval $ac_compile) 2>&5
4886 ac_status=$?
4887 echo "$as_me:4887: \$? = $ac_status" >&5
4888 (exit "$ac_status"); } &&
4889 { ac_try='test -s "conftest.$ac_objext"'
4890 { (eval echo "$as_me:4890: \"$ac_try\"") >&5
4891 (eval $ac_try) 2>&5
4892 ac_status=$?
4893 echo "$as_me:4893: \$? = $ac_status" >&5
4894 (exit "$ac_status"); }; }; then
4895 cf_cv_xopen_source=no
4896 else
4897 echo "$as_me: failed program was:" >&5
4898 cat "conftest.$ac_ext" >&5
4899 cf_save="$CPPFLAGS"
4900
4901 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4902 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4903
4904 cat >"conftest.$ac_ext" <<_ACEOF
4905 #line 4905 "configure"
4906 #include "confdefs.h"
4907
4908 $ac_includes_default
4909
4910 int
4911 main (void)
4912 {
4913
4914 #ifndef _XOPEN_SOURCE
4915 #error _XOPEN_SOURCE is not defined
4916 #endif
4917
4918 ;
4919 return 0;
4920 }
4921 _ACEOF
4922 rm -f "conftest.$ac_objext"
4923 if { (eval echo "$as_me:4923: \"$ac_compile\"") >&5
4924 (eval $ac_compile) 2>&5
4925 ac_status=$?
4926 echo "$as_me:4926: \$? = $ac_status" >&5
4927 (exit "$ac_status"); } &&
4928 { ac_try='test -s "conftest.$ac_objext"'
4929 { (eval echo "$as_me:4929: \"$ac_try\"") >&5
4930 (eval $ac_try) 2>&5
4931 ac_status=$?
4932 echo "$as_me:4932: \$? = $ac_status" >&5
4933 (exit "$ac_status"); }; }; then
4934 cf_cv_xopen_source=no
4935 else
4936 echo "$as_me: failed program was:" >&5
4937 cat "conftest.$ac_ext" >&5
4938 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4939 fi
4940 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4941 CPPFLAGS="$cf_save"
4942
4943 fi
4944 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4945
4946 fi
4947 echo "$as_me:4947: result: $cf_cv_xopen_source" >&5
4948 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4949
4950 if test "$cf_cv_xopen_source" != no ; then
4951
4952 CFLAGS=`echo "$CFLAGS" | \
4953 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4954 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4955
4956 CPPFLAGS=`echo "$CPPFLAGS" | \
4957 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4958 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4959
4960 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4961
4962 for cf_add_cflags in $cf_temp_xopen_source
4963 do
4964 case "x$cf_add_cflags" in
4965 (x-[DU]*)
4966
4967 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4968 while true
4969 do
4970 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'`
4971 test "$CFLAGS" != "$cf_old_cflag" || break
4972
4973 CFLAGS="$cf_old_cflag"
4974 done
4975
4976 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4977 while true
4978 do
4979 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'`
4980 test "$CPPFLAGS" != "$cf_old_cflag" || break
4981
4982 CPPFLAGS="$cf_old_cflag"
4983 done
4984
4985 ;;
4986 esac
4987
4988 cf_fix_cppflags=no
4989 cf_new_cflags=
4990 cf_new_cppflags=
4991 cf_new_extra_cppflags=
4992
4993 for cf_add_cflags in $cf_add_cflags
4994 do
4995 case "$cf_fix_cppflags" in
4996 (no)
4997 case "$cf_add_cflags" in
4998 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4999 case "$cf_add_cflags" in
5000 (-D*)
5001 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5002
5003 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5004 && test -z "${cf_tst_cflags}" \
5005 && cf_fix_cppflags=yes
5006
5007 if test "$cf_fix_cppflags" = yes ; then
5008
5009 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5010 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5011
5012 continue
5013 elif test "${cf_tst_cflags}" = "\"'" ; then
5014
5015 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5016 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5017
5018 continue
5019 fi
5020 ;;
5021 esac
5022 case "$CPPFLAGS" in
5023 (*$cf_add_cflags)
5024 ;;
5025 (*)
5026 case "$cf_add_cflags" in
5027 (-D*)
5028 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5029
5030 CPPFLAGS=`echo "$CPPFLAGS" | \
5031 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5032 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5033
5034 ;;
5035 esac
5036
5037 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5038 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5039
5040 ;;
5041 esac
5042 ;;
5043 (*)
5044
5045 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5046 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5047
5048 ;;
5049 esac
5050 ;;
5051 (yes)
5052
5053 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5054 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5055
5056 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5057
5058 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5059 && test -z "${cf_tst_cflags}" \
5060 && cf_fix_cppflags=no
5061 ;;
5062 esac
5063 done
5064
5065 if test -n "$cf_new_cflags" ; then
5066
5067 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5068 CFLAGS="${CFLAGS}$cf_new_cflags"
5069
5070 fi
5071
5072 if test -n "$cf_new_cppflags" ; then
5073
5074 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5075 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5076
5077 fi
5078
5079 if test -n "$cf_new_extra_cppflags" ; then
5080
5081 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5082 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5083
5084 fi
5085
5086 done
5087
5088 fi
5089
5090 fi
5091 fi
5092 fi # cf_cv_posix_visible
5093
5094 echo "$as_me:5094: checking for ANSI C header files" >&5
5095 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5096 if test "${ac_cv_header_stdc+set}" = set; then
5097 echo $ECHO_N "(cached) $ECHO_C" >&6
5098 else
5099 cat >"conftest.$ac_ext" <<_ACEOF
5100 #line 5100 "configure"
5101 #include "confdefs.h"
5102 #include <stdlib.h>
5103 #include <stdarg.h>
5104 #include <string.h>
5105 #include <float.h>
5106
5107 _ACEOF
5108 if { (eval echo "$as_me:5108: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5109 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5110 ac_status=$?
5111 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5112 rm -f conftest.er1
5113 cat conftest.err >&5
5114 echo "$as_me:5114: \$? = $ac_status" >&5
5115 (exit "$ac_status"); } >/dev/null; then
5116 if test -s conftest.err; then
5117 ac_cpp_err=$ac_c_preproc_warn_flag
5118 else
5119 ac_cpp_err=
5120 fi
5121 else
5122 ac_cpp_err=yes
5123 fi
5124 if test -z "$ac_cpp_err"; then
5125 ac_cv_header_stdc=yes
5126 else
5127 echo "$as_me: failed program was:" >&5
5128 cat "conftest.$ac_ext" >&5
5129 ac_cv_header_stdc=no
5130 fi
5131 rm -f conftest.err "conftest.$ac_ext"
5132
5133 if test $ac_cv_header_stdc = yes; then
5134 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5135 cat >"conftest.$ac_ext" <<_ACEOF
5136 #line 5136 "configure"
5137 #include "confdefs.h"
5138 #include <string.h>
5139
5140 _ACEOF
5141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5142 $EGREP "memchr" >/dev/null 2>&1; then
5143 :
5144 else
5145 ac_cv_header_stdc=no
5146 fi
5147 rm -rf conftest*
5148
5149 fi
5150
5151 if test $ac_cv_header_stdc = yes; then
5152 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5153 cat >"conftest.$ac_ext" <<_ACEOF
5154 #line 5154 "configure"
5155 #include "confdefs.h"
5156 #include <stdlib.h>
5157
5158 _ACEOF
5159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5160 $EGREP "free" >/dev/null 2>&1; then
5161 :
5162 else
5163 ac_cv_header_stdc=no
5164 fi
5165 rm -rf conftest*
5166
5167 fi
5168
5169 if test $ac_cv_header_stdc = yes; then
5170 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5171 if test "$cross_compiling" = yes; then
5172 :
5173 else
5174 cat >"conftest.$ac_ext" <<_ACEOF
5175 #line 5175 "configure"
5176 #include "confdefs.h"
5177 #include <ctype.h>
5178 #if ((' ' & 0x0FF) == 0x020)
5179 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5180 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5181 #else
5182 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5183 || ('j' <= (c) && (c) <= 'r') \
5184 || ('s' <= (c) && (c) <= 'z'))
5185 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5186 #endif
5187
5188 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5189 int
5190 main (void)
5191 {
5192 int i;
5193 for (i = 0; i < 256; i++)
5194 if (XOR (islower (i), ISLOWER (i))
5195 || toupper (i) != TOUPPER (i))
5196 $ac_main_return(2);
5197 $ac_main_return (0);
5198 }
5199 _ACEOF
5200 rm -f "conftest$ac_exeext"
5201 if { (eval echo "$as_me:5201: \"$ac_link\"") >&5
5202 (eval $ac_link) 2>&5
5203 ac_status=$?
5204 echo "$as_me:5204: \$? = $ac_status" >&5
5205 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5206 { (eval echo "$as_me:5206: \"$ac_try\"") >&5
5207 (eval $ac_try) 2>&5
5208 ac_status=$?
5209 echo "$as_me:5209: \$? = $ac_status" >&5
5210 (exit "$ac_status"); }; }; then
5211 :
5212 else
5213 echo "$as_me: program exited with status $ac_status" >&5
5214 echo "$as_me: failed program was:" >&5
5215 cat "conftest.$ac_ext" >&5
5216 ac_cv_header_stdc=no
5217 fi
5218 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5219 fi
5220 fi
5221 fi
5222 echo "$as_me:5222: result: $ac_cv_header_stdc" >&5
5223 echo "${ECHO_T}$ac_cv_header_stdc" >&6
5224 if test $ac_cv_header_stdc = yes; then
5225
5226 cat >>confdefs.h <<\EOF
5227 #define STDC_HEADERS 1
5228 EOF
5229
5230 fi
5231
5232 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5233
5234 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5235 inttypes.h stdint.h unistd.h
5236 do
5237 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5238 echo "$as_me:5238: checking for $ac_header" >&5
5239 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5240 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5241 echo $ECHO_N "(cached) $ECHO_C" >&6
5242 else
5243 cat >"conftest.$ac_ext" <<_ACEOF
5244 #line 5244 "configure"
5245 #include "confdefs.h"
5246 $ac_includes_default
5247 #include <$ac_header>
5248 _ACEOF
5249 rm -f "conftest.$ac_objext"
5250 if { (eval echo "$as_me:5250: \"$ac_compile\"") >&5
5251 (eval $ac_compile) 2>&5
5252 ac_status=$?
5253 echo "$as_me:5253: \$? = $ac_status" >&5
5254 (exit "$ac_status"); } &&
5255 { ac_try='test -s "conftest.$ac_objext"'
5256 { (eval echo "$as_me:5256: \"$ac_try\"") >&5
5257 (eval $ac_try) 2>&5
5258 ac_status=$?
5259 echo "$as_me:5259: \$? = $ac_status" >&5
5260 (exit "$ac_status"); }; }; then
5261 eval "$as_ac_Header=yes"
5262 else
5263 echo "$as_me: failed program was:" >&5
5264 cat "conftest.$ac_ext" >&5
5265 eval "$as_ac_Header=no"
5266 fi
5267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5268 fi
5269 echo "$as_me:5269: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5270 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5271 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5272 cat >>confdefs.h <<EOF
5273 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5274 EOF
5275
5276 fi
5277 done
5278
5279 echo "$as_me:5279: checking whether exit is declared" >&5
5280 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
5281 if test "${ac_cv_have_decl_exit+set}" = set; then
5282 echo $ECHO_N "(cached) $ECHO_C" >&6
5283 else
5284 cat >"conftest.$ac_ext" <<_ACEOF
5285 #line 5285 "configure"
5286 #include "confdefs.h"
5287 $ac_includes_default
5288 int
5289 main (void)
5290 {
5291 #ifndef exit
5292 (void) exit;
5293 #endif
5294
5295 ;
5296 return 0;
5297 }
5298 _ACEOF
5299 rm -f "conftest.$ac_objext"
5300 if { (eval echo "$as_me:5300: \"$ac_compile\"") >&5
5301 (eval $ac_compile) 2>&5
5302 ac_status=$?
5303 echo "$as_me:5303: \$? = $ac_status" >&5
5304 (exit "$ac_status"); } &&
5305 { ac_try='test -s "conftest.$ac_objext"'
5306 { (eval echo "$as_me:5306: \"$ac_try\"") >&5
5307 (eval $ac_try) 2>&5
5308 ac_status=$?
5309 echo "$as_me:5309: \$? = $ac_status" >&5
5310 (exit "$ac_status"); }; }; then
5311 ac_cv_have_decl_exit=yes
5312 else
5313 echo "$as_me: failed program was:" >&5
5314 cat "conftest.$ac_ext" >&5
5315 ac_cv_have_decl_exit=no
5316 fi
5317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5318 fi
5319 echo "$as_me:5319: result: $ac_cv_have_decl_exit" >&5
5320 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
5321
5322 echo "$as_me:5322: checking if SIGWINCH is defined" >&5
5323 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5324 if test "${cf_cv_define_sigwinch+set}" = set; then
5325 echo $ECHO_N "(cached) $ECHO_C" >&6
5326 else
5327
5328 cat >"conftest.$ac_ext" <<_ACEOF
5329 #line 5329 "configure"
5330 #include "confdefs.h"
5331
5332 #include <sys/types.h>
5333 #include <sys/signal.h>
5334
5335 int
5336 main (void)
5337 {
5338 int x = SIGWINCH; (void)x
5339 ;
5340 return 0;
5341 }
5342 _ACEOF
5343 rm -f "conftest.$ac_objext"
5344 if { (eval echo "$as_me:5344: \"$ac_compile\"") >&5
5345 (eval $ac_compile) 2>&5
5346 ac_status=$?
5347 echo "$as_me:5347: \$? = $ac_status" >&5
5348 (exit "$ac_status"); } &&
5349 { ac_try='test -s "conftest.$ac_objext"'
5350 { (eval echo "$as_me:5350: \"$ac_try\"") >&5
5351 (eval $ac_try) 2>&5
5352 ac_status=$?
5353 echo "$as_me:5353: \$? = $ac_status" >&5
5354 (exit "$ac_status"); }; }; then
5355 cf_cv_define_sigwinch=yes
5356 else
5357 echo "$as_me: failed program was:" >&5
5358 cat "conftest.$ac_ext" >&5
5359 cat >"conftest.$ac_ext" <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5362
5363 #undef _XOPEN_SOURCE
5364 #undef _POSIX_SOURCE
5365 #undef _POSIX_C_SOURCE
5366 #include <sys/types.h>
5367 #include <sys/signal.h>
5368
5369 int
5370 main (void)
5371 {
5372 int x = SIGWINCH; (void)x
5373 ;
5374 return 0;
5375 }
5376 _ACEOF
5377 rm -f "conftest.$ac_objext"
5378 if { (eval echo "$as_me:5378: \"$ac_compile\"") >&5
5379 (eval $ac_compile) 2>&5
5380 ac_status=$?
5381 echo "$as_me:5381: \$? = $ac_status" >&5
5382 (exit "$ac_status"); } &&
5383 { ac_try='test -s "conftest.$ac_objext"'
5384 { (eval echo "$as_me:5384: \"$ac_try\"") >&5
5385 (eval $ac_try) 2>&5
5386 ac_status=$?
5387 echo "$as_me:5387: \$? = $ac_status" >&5
5388 (exit "$ac_status"); }; }; then
5389 cf_cv_define_sigwinch=maybe
5390 else
5391 echo "$as_me: failed program was:" >&5
5392 cat "conftest.$ac_ext" >&5
5393 cf_cv_define_sigwinch=no
5394 fi
5395 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5396
5397 fi
5398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5399
5400 fi
5401 echo "$as_me:5401: result: $cf_cv_define_sigwinch" >&5
5402 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5403
5404 if test "$cf_cv_define_sigwinch" = maybe ; then
5405 echo "$as_me:5405: checking for actual SIGWINCH definition" >&5
5406 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5407 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5408 echo $ECHO_N "(cached) $ECHO_C" >&6
5409 else
5410
5411 cf_cv_fixup_sigwinch=unknown
5412 cf_sigwinch=32
5413 while test "$cf_sigwinch" != 1
5414 do
5415 cat >"conftest.$ac_ext" <<_ACEOF
5416 #line 5416 "configure"
5417 #include "confdefs.h"
5418
5419 #undef _XOPEN_SOURCE
5420 #undef _POSIX_SOURCE
5421 #undef _POSIX_C_SOURCE
5422 #include <sys/types.h>
5423 #include <sys/signal.h>
5424
5425 int
5426 main (void)
5427 {
5428
5429 #if SIGWINCH != $cf_sigwinch
5430 #error SIGWINCH is not $cf_sigwinch
5431 #endif
5432 int x = SIGWINCH; (void)x
5433 ;
5434 return 0;
5435 }
5436 _ACEOF
5437 rm -f "conftest.$ac_objext"
5438 if { (eval echo "$as_me:5438: \"$ac_compile\"") >&5
5439 (eval $ac_compile) 2>&5
5440 ac_status=$?
5441 echo "$as_me:5441: \$? = $ac_status" >&5
5442 (exit "$ac_status"); } &&
5443 { ac_try='test -s "conftest.$ac_objext"'
5444 { (eval echo "$as_me:5444: \"$ac_try\"") >&5
5445 (eval $ac_try) 2>&5
5446 ac_status=$?
5447 echo "$as_me:5447: \$? = $ac_status" >&5
5448 (exit "$ac_status"); }; }; then
5449 cf_cv_fixup_sigwinch=$cf_sigwinch
5450 break
5451 else
5452 echo "$as_me: failed program was:" >&5
5453 cat "conftest.$ac_ext" >&5
5454 fi
5455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5456
5457 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5458 done
5459
5460 fi
5461 echo "$as_me:5461: result: $cf_cv_fixup_sigwinch" >&5
5462 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5463
5464 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5465 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5466 fi
5467 fi
5468
5469 echo "$as_me:5469: checking for elf_begin in -lelf" >&5
5470 echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
5471 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
5472 echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474 ac_check_lib_save_LIBS=$LIBS
5475 LIBS="-lelf $LIBS"
5476 cat >"conftest.$ac_ext" <<_ACEOF
5477 #line 5477 "configure"
5478 #include "confdefs.h"
5479
5480 /* Override any gcc2 internal prototype to avoid an error. */
5481 #ifdef __cplusplus
5482 extern "C"
5483 #endif
5484 /* We use char because int might match the return type of a gcc2
5485 builtin and then its argument prototype would still apply. */
5486 char elf_begin (void);
5487 int
5488 main (void)
5489 {
5490 elf_begin ();
5491 ;
5492 return 0;
5493 }
5494 _ACEOF
5495 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5496 if { (eval echo "$as_me:5496: \"$ac_link\"") >&5
5497 (eval $ac_link) 2>&5
5498 ac_status=$?
5499 echo "$as_me:5499: \$? = $ac_status" >&5
5500 (exit "$ac_status"); } &&
5501 { ac_try='test -s "conftest$ac_exeext"'
5502 { (eval echo "$as_me:5502: \"$ac_try\"") >&5
5503 (eval $ac_try) 2>&5
5504 ac_status=$?
5505 echo "$as_me:5505: \$? = $ac_status" >&5
5506 (exit "$ac_status"); }; }; then
5507 ac_cv_lib_elf_elf_begin=yes
5508 else
5509 echo "$as_me: failed program was:" >&5
5510 cat "conftest.$ac_ext" >&5
5511 ac_cv_lib_elf_elf_begin=no
5512 fi
5513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5514 LIBS=$ac_check_lib_save_LIBS
5515 fi
5516 echo "$as_me:5516: result: $ac_cv_lib_elf_elf_begin" >&5
5517 echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
5518 if test "$ac_cv_lib_elf_elf_begin" = yes; then
5519
5520 echo "$as_me:5520: checking if this is an SVR4 system" >&5
5521 echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
5522 if test "${cf_cv_svr4+set}" = set; then
5523 echo $ECHO_N "(cached) $ECHO_C" >&6
5524 else
5525
5526 cat >"conftest.$ac_ext" <<_ACEOF
5527 #line 5527 "configure"
5528 #include "confdefs.h"
5529
5530 #if defined(__CYGWIN__)
5531 #error Cygwin is not SVr4
5532 #endif
5533 #include <elf.h>
5534 #include <sys/termio.h>
5535
5536 int
5537 main (void)
5538 {
5539
5540 static struct termio d_tio;
5541 d_tio.c_cc[VINTR] = 0;
5542 d_tio.c_cc[VQUIT] = 0;
5543 d_tio.c_cc[VERASE] = 0;
5544 d_tio.c_cc[VKILL] = 0;
5545 d_tio.c_cc[VEOF] = 0;
5546 d_tio.c_cc[VEOL] = 0;
5547 d_tio.c_cc[VMIN] = 0;
5548 d_tio.c_cc[VTIME] = 0;
5549 d_tio.c_cc[VLNEXT] = 0;
5550
5551 ;
5552 return 0;
5553 }
5554 _ACEOF
5555 rm -f "conftest.$ac_objext"
5556 if { (eval echo "$as_me:5556: \"$ac_compile\"") >&5
5557 (eval $ac_compile) 2>&5
5558 ac_status=$?
5559 echo "$as_me:5559: \$? = $ac_status" >&5
5560 (exit "$ac_status"); } &&
5561 { ac_try='test -s "conftest.$ac_objext"'
5562 { (eval echo "$as_me:5562: \"$ac_try\"") >&5
5563 (eval $ac_try) 2>&5
5564 ac_status=$?
5565 echo "$as_me:5565: \$? = $ac_status" >&5
5566 (exit "$ac_status"); }; }; then
5567 cf_cv_svr4=yes
5568 else
5569 echo "$as_me: failed program was:" >&5
5570 cat "conftest.$ac_ext" >&5
5571 cf_cv_svr4=no
5572 fi
5573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5574
5575 fi
5576 echo "$as_me:5576: result: $cf_cv_svr4" >&5
5577 echo "${ECHO_T}$cf_cv_svr4" >&6
5578
5579 fi
5580
5581 test "$cf_cv_svr4" = yes &&
5582 cat >>confdefs.h <<\EOF
5583 #define SVR4 1
5584 EOF
5585
5586 echo "$as_me:5586: checking if external sys_nerr is declared" >&5
5587 echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
5588 if test "${cf_cv_dcl_sys_nerr+set}" = set; then
5589 echo $ECHO_N "(cached) $ECHO_C" >&6
5590 else
5591
5592 cat >"conftest.$ac_ext" <<_ACEOF
5593 #line 5593 "configure"
5594 #include "confdefs.h"
5595
5596 $ac_includes_default
5597 #include <errno.h>
5598 int
5599 main (void)
5600 {
5601 int x = (int) sys_nerr; (void)x
5602 ;
5603 return 0;
5604 }
5605 _ACEOF
5606 rm -f "conftest.$ac_objext"
5607 if { (eval echo "$as_me:5607: \"$ac_compile\"") >&5
5608 (eval $ac_compile) 2>&5
5609 ac_status=$?
5610 echo "$as_me:5610: \$? = $ac_status" >&5
5611 (exit "$ac_status"); } &&
5612 { ac_try='test -s "conftest.$ac_objext"'
5613 { (eval echo "$as_me:5613: \"$ac_try\"") >&5
5614 (eval $ac_try) 2>&5
5615 ac_status=$?
5616 echo "$as_me:5616: \$? = $ac_status" >&5
5617 (exit "$ac_status"); }; }; then
5618 cf_cv_dcl_sys_nerr=yes
5619 else
5620 echo "$as_me: failed program was:" >&5
5621 cat "conftest.$ac_ext" >&5
5622 cf_cv_dcl_sys_nerr=no
5623 fi
5624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5625
5626 fi
5627 echo "$as_me:5627: result: $cf_cv_dcl_sys_nerr" >&5
5628 echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
5629
5630 if test "$cf_cv_dcl_sys_nerr" = no ; then
5631
5632 cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5633
5634 cat >>confdefs.h <<EOF
5635 #define $cf_result 1
5636 EOF
5637
5638 fi
5639
5640 # It's possible (for near-UNIX clones) that the data doesn't exist
5641
5642 echo "$as_me:5642: checking if external sys_nerr exists" >&5
5643 echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
5644 if test "${cf_cv_have_sys_nerr+set}" = set; then
5645 echo $ECHO_N "(cached) $ECHO_C" >&6
5646 else
5647
5648 cat >"conftest.$ac_ext" <<_ACEOF
5649 #line 5649 "configure"
5650 #include "confdefs.h"
5651
5652 #undef sys_nerr
5653 extern int sys_nerr;
5654
5655 int
5656 main (void)
5657 {
5658 sys_nerr = 2
5659 ;
5660 return 0;
5661 }
5662 _ACEOF
5663 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5664 if { (eval echo "$as_me:5664: \"$ac_link\"") >&5
5665 (eval $ac_link) 2>&5
5666 ac_status=$?
5667 echo "$as_me:5667: \$? = $ac_status" >&5
5668 (exit "$ac_status"); } &&
5669 { ac_try='test -s "conftest$ac_exeext"'
5670 { (eval echo "$as_me:5670: \"$ac_try\"") >&5
5671 (eval $ac_try) 2>&5
5672 ac_status=$?
5673 echo "$as_me:5673: \$? = $ac_status" >&5
5674 (exit "$ac_status"); }; }; then
5675 cf_cv_have_sys_nerr=yes
5676 else
5677 echo "$as_me: failed program was:" >&5
5678 cat "conftest.$ac_ext" >&5
5679 cf_cv_have_sys_nerr=no
5680 fi
5681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5682
5683 fi
5684 echo "$as_me:5684: result: $cf_cv_have_sys_nerr" >&5
5685 echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
5686
5687 if test "$cf_cv_have_sys_nerr" = yes ; then
5688
5689 cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5690
5691 cat >>confdefs.h <<EOF
5692 #define $cf_result 1
5693 EOF
5694
5695 fi
5696
5697 echo "$as_me:5697: checking if external sys_errlist is declared" >&5
5698 echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
5699 if test "${cf_cv_dcl_sys_errlist+set}" = set; then
5700 echo $ECHO_N "(cached) $ECHO_C" >&6
5701 else
5702
5703 cat >"conftest.$ac_ext" <<_ACEOF
5704 #line 5704 "configure"
5705 #include "confdefs.h"
5706
5707 $ac_includes_default
5708 #include <errno.h>
5709 int
5710 main (void)
5711 {
5712 int x = (int) sys_errlist; (void)x
5713 ;
5714 return 0;
5715 }
5716 _ACEOF
5717 rm -f "conftest.$ac_objext"
5718 if { (eval echo "$as_me:5718: \"$ac_compile\"") >&5
5719 (eval $ac_compile) 2>&5
5720 ac_status=$?
5721 echo "$as_me:5721: \$? = $ac_status" >&5
5722 (exit "$ac_status"); } &&
5723 { ac_try='test -s "conftest.$ac_objext"'
5724 { (eval echo "$as_me:5724: \"$ac_try\"") >&5
5725 (eval $ac_try) 2>&5
5726 ac_status=$?
5727 echo "$as_me:5727: \$? = $ac_status" >&5
5728 (exit "$ac_status"); }; }; then
5729 cf_cv_dcl_sys_errlist=yes
5730 else
5731 echo "$as_me: failed program was:" >&5
5732 cat "conftest.$ac_ext" >&5
5733 cf_cv_dcl_sys_errlist=no
5734 fi
5735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5736
5737 fi
5738 echo "$as_me:5738: result: $cf_cv_dcl_sys_errlist" >&5
5739 echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
5740
5741 if test "$cf_cv_dcl_sys_errlist" = no ; then
5742
5743 cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5744
5745 cat >>confdefs.h <<EOF
5746 #define $cf_result 1
5747 EOF
5748
5749 fi
5750
5751 # It's possible (for near-UNIX clones) that the data doesn't exist
5752
5753 echo "$as_me:5753: checking if external sys_errlist exists" >&5
5754 echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
5755 if test "${cf_cv_have_sys_errlist+set}" = set; then
5756 echo $ECHO_N "(cached) $ECHO_C" >&6
5757 else
5758
5759 cat >"conftest.$ac_ext" <<_ACEOF
5760 #line 5760 "configure"
5761 #include "confdefs.h"
5762
5763 #undef sys_errlist
5764 extern int sys_errlist;
5765
5766 int
5767 main (void)
5768 {
5769 sys_errlist = 2
5770 ;
5771 return 0;
5772 }
5773 _ACEOF
5774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5775 if { (eval echo "$as_me:5775: \"$ac_link\"") >&5
5776 (eval $ac_link) 2>&5
5777 ac_status=$?
5778 echo "$as_me:5778: \$? = $ac_status" >&5
5779 (exit "$ac_status"); } &&
5780 { ac_try='test -s "conftest$ac_exeext"'
5781 { (eval echo "$as_me:5781: \"$ac_try\"") >&5
5782 (eval $ac_try) 2>&5
5783 ac_status=$?
5784 echo "$as_me:5784: \$? = $ac_status" >&5
5785 (exit "$ac_status"); }; }; then
5786 cf_cv_have_sys_errlist=yes
5787 else
5788 echo "$as_me: failed program was:" >&5
5789 cat "conftest.$ac_ext" >&5
5790 cf_cv_have_sys_errlist=no
5791 fi
5792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5793
5794 fi
5795 echo "$as_me:5795: result: $cf_cv_have_sys_errlist" >&5
5796 echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
5797
5798 if test "$cf_cv_have_sys_errlist" = yes ; then
5799
5800 cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5801
5802 cat >>confdefs.h <<EOF
5803 #define $cf_result 1
5804 EOF
5805
5806 fi
5807
5808 for ac_header in \
5809 termios.h \
5810 stdlib.h \
5811 X11/Intrinsic.h \
5812
5813 do
5814 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5815 echo "$as_me:5815: checking for $ac_header" >&5
5816 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5817 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5818 echo $ECHO_N "(cached) $ECHO_C" >&6
5819 else
5820 cat >"conftest.$ac_ext" <<_ACEOF
5821 #line 5821 "configure"
5822 #include "confdefs.h"
5823 #include <$ac_header>
5824 _ACEOF
5825 if { (eval echo "$as_me:5825: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5826 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5827 ac_status=$?
5828 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5829 rm -f conftest.er1
5830 cat conftest.err >&5
5831 echo "$as_me:5831: \$? = $ac_status" >&5
5832 (exit "$ac_status"); } >/dev/null; then
5833 if test -s conftest.err; then
5834 ac_cpp_err=$ac_c_preproc_warn_flag
5835 else
5836 ac_cpp_err=
5837 fi
5838 else
5839 ac_cpp_err=yes
5840 fi
5841 if test -z "$ac_cpp_err"; then
5842 eval "$as_ac_Header=yes"
5843 else
5844 echo "$as_me: failed program was:" >&5
5845 cat "conftest.$ac_ext" >&5
5846 eval "$as_ac_Header=no"
5847 fi
5848 rm -f conftest.err "conftest.$ac_ext"
5849 fi
5850 echo "$as_me:5850: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5851 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5852 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5853 cat >>confdefs.h <<EOF
5854 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5855 EOF
5856
5857 fi
5858 done
5859
5860 echo "$as_me:5860: checking if we should define SYSV" >&5
5861 echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
5862 if test "${cf_cv_sysv+set}" = set; then
5863 echo $ECHO_N "(cached) $ECHO_C" >&6
5864 else
5865
5866 cat >"conftest.$ac_ext" <<_ACEOF
5867 #line 5867 "configure"
5868 #include "confdefs.h"
5869
5870 #undef SYSV
5871 #define SYSV 1 /* get Xos.h to declare sys_errlist[] */
5872 #ifdef HAVE_STDLIB_H
5873 #include <stdlib.h> /* look for wchar_t */
5874 #endif
5875 #ifdef HAVE_X11_INTRINSIC_H
5876 #include <X11/Intrinsic.h> /* Intrinsic.h has other traps... */
5877 #endif
5878 #ifdef HAVE_TERMIOS_H /* needed for HPUX 10.20 */
5879 #include <termios.h>
5880 #define STRUCT_TERMIOS struct termios
5881 #else
5882 #define STRUCT_TERMIOS struct termio
5883 #endif
5884 #include <curses.h>
5885 #include <term.h> /* eliminate most BSD hacks */
5886 #include <errno.h> /* declare sys_errlist on older systems */
5887 #include <sys/termio.h> /* eliminate most of the remaining ones */
5888
5889 int
5890 main (void)
5891 {
5892
5893 static STRUCT_TERMIOS d_tio;
5894 d_tio.c_cc[VINTR] = 0;
5895 d_tio.c_cc[VQUIT] = 0;
5896 d_tio.c_cc[VERASE] = 0;
5897 d_tio.c_cc[VKILL] = 0;
5898 d_tio.c_cc[VEOF] = 0;
5899 d_tio.c_cc[VEOL] = 0;
5900 d_tio.c_cc[VMIN] = 0;
5901 d_tio.c_cc[VTIME] = 0;
5902 #if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
5903 sys_errlist[0] = ""; /* Cygwin mis-declares this */
5904 #endif
5905
5906 ;
5907 return 0;
5908 }
5909 _ACEOF
5910 rm -f "conftest.$ac_objext"
5911 if { (eval echo "$as_me:5911: \"$ac_compile\"") >&5
5912 (eval $ac_compile) 2>&5
5913 ac_status=$?
5914 echo "$as_me:5914: \$? = $ac_status" >&5
5915 (exit "$ac_status"); } &&
5916 { ac_try='test -s "conftest.$ac_objext"'
5917 { (eval echo "$as_me:5917: \"$ac_try\"") >&5
5918 (eval $ac_try) 2>&5
5919 ac_status=$?
5920 echo "$as_me:5920: \$? = $ac_status" >&5
5921 (exit "$ac_status"); }; }; then
5922 cf_cv_sysv=yes
5923 else
5924 echo "$as_me: failed program was:" >&5
5925 cat "conftest.$ac_ext" >&5
5926 cf_cv_sysv=no
5927 fi
5928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5929
5930 fi
5931 echo "$as_me:5931: result: $cf_cv_sysv" >&5
5932 echo "${ECHO_T}$cf_cv_sysv" >&6
5933 test "$cf_cv_sysv" = yes &&
5934 cat >>confdefs.h <<\EOF
5935 #define SYSV 1
5936 EOF
5937
5938 echo "$as_me:5938: checking for uid_t in sys/types.h" >&5
5939 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5940 if test "${ac_cv_type_uid_t+set}" = set; then
5941 echo $ECHO_N "(cached) $ECHO_C" >&6
5942 else
5943 cat >"conftest.$ac_ext" <<_ACEOF
5944 #line 5944 "configure"
5945 #include "confdefs.h"
5946 #include <sys/types.h>
5947
5948 _ACEOF
5949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5950 $EGREP "uid_t" >/dev/null 2>&1; then
5951 ac_cv_type_uid_t=yes
5952 else
5953 ac_cv_type_uid_t=no
5954 fi
5955 rm -rf conftest*
5956
5957 fi
5958 echo "$as_me:5958: result: $ac_cv_type_uid_t" >&5
5959 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5960 if test $ac_cv_type_uid_t = no; then
5961
5962 cat >>confdefs.h <<\EOF
5963 #define uid_t int
5964 EOF
5965
5966 cat >>confdefs.h <<\EOF
5967 #define gid_t int
5968 EOF
5969
5970 fi
5971
5972 echo "$as_me:5972: checking if you want to see long compiling messages" >&5
5973 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5974
5975 # Check whether --enable-echo or --disable-echo was given.
5976 if test "${enable_echo+set}" = set; then
5977 enableval="$enable_echo"
5978 test "$enableval" != no && enableval=yes
5979 if test "$enableval" != "yes" ; then
5980
5981 ECHO_LT='--silent'
5982 ECHO_LD='@echo linking $@;'
5983 RULE_CC='@echo compiling $<'
5984 SHOW_CC='@echo compiling $@'
5985 ECHO_CC='@'
5986
5987 else
5988
5989 ECHO_LT=''
5990 ECHO_LD=''
5991 RULE_CC=''
5992 SHOW_CC=''
5993 ECHO_CC=''
5994
5995 fi
5996 else
5997 enableval=yes
5998
5999 ECHO_LT=''
6000 ECHO_LD=''
6001 RULE_CC=''
6002 SHOW_CC=''
6003 ECHO_CC=''
6004
6005 fi;
6006 echo "$as_me:6006: result: $enableval" >&5
6007 echo "${ECHO_T}$enableval" >&6
6008
6009 echo "$as_me:6009: checking for fgrep" >&5
6010 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
6011 if test "${ac_cv_path_FGREP+set}" = set; then
6012 echo $ECHO_N "(cached) $ECHO_C" >&6
6013 else
6014 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6015 then ac_cv_path_FGREP="$GREP -F"
6016 else
6017 for ac_prog in gfgrep fgrep
6018 do
6019 # Extract the first word of "$ac_prog", so it can be a program name with args.
6020 set dummy $ac_prog; ac_word=$2
6021 echo "$as_me:6021: checking for $ac_word" >&5
6022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6023 if test "${ac_cv_path_FGREP+set}" = set; then
6024 echo $ECHO_N "(cached) $ECHO_C" >&6
6025 else
6026 case $FGREP in
6027 [\\/]* | ?:[\\/]*)
6028 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
6029 ;;
6030 *)
6031 ac_save_IFS=$IFS; IFS=$ac_path_separator
6032 ac_dummy="$PATH"
6033 for ac_dir in $ac_dummy; do
6034 IFS=$ac_save_IFS
6035 test -z "$ac_dir" && ac_dir=.
6036 if $as_executable_p "$ac_dir/$ac_word"; then
6037 ac_cv_path_FGREP="$ac_dir/$ac_word"
6038 echo "$as_me:6038: found $ac_dir/$ac_word" >&5
6039 break
6040 fi
6041 done
6042
6043 ;;
6044 esac
6045 fi
6046 FGREP=$ac_cv_path_FGREP
6047
6048 if test -n "$FGREP"; then
6049 echo "$as_me:6049: result: $FGREP" >&5
6050 echo "${ECHO_T}$FGREP" >&6
6051 else
6052 echo "$as_me:6052: result: no" >&5
6053 echo "${ECHO_T}no" >&6
6054 fi
6055
6056 test -n "$FGREP" && break
6057 done
6058 test -n "$FGREP" || FGREP=": "
6059
6060 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:6060: error: cannot find workable fgrep" >&5
6061 echo "$as_me: error: cannot find workable fgrep" >&2;}
6062 { (exit 1); exit 1; }; }
6063 fi
6064 fi
6065 echo "$as_me:6065: result: $ac_cv_path_FGREP" >&5
6066 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
6067 FGREP="$ac_cv_path_FGREP"
6068
6069 echo "$as_me:6069: checking if you want to use C11 _Noreturn feature" >&5
6070 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
6071
6072 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
6073 if test "${enable_stdnoreturn+set}" = set; then
6074 enableval="$enable_stdnoreturn"
6075 test "$enableval" != yes && enableval=no
6076 if test "$enableval" != "no" ; then
6077 enable_stdnoreturn=yes
6078 else
6079 enable_stdnoreturn=no
6080 fi
6081 else
6082 enableval=no
6083 enable_stdnoreturn=no
6084
6085 fi;
6086 echo "$as_me:6086: result: $enable_stdnoreturn" >&5
6087 echo "${ECHO_T}$enable_stdnoreturn" >&6
6088
6089 if test $enable_stdnoreturn = yes; then
6090 echo "$as_me:6090: checking for C11 _Noreturn feature" >&5
6091 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
6092 if test "${cf_cv_c11_noreturn+set}" = set; then
6093 echo $ECHO_N "(cached) $ECHO_C" >&6
6094 else
6095 cat >"conftest.$ac_ext" <<_ACEOF
6096 #line 6096 "configure"
6097 #include "confdefs.h"
6098
6099 $ac_includes_default
6100 #include <stdnoreturn.h>
6101 static _Noreturn void giveup(void) { exit(0); }
6102
6103 int
6104 main (void)
6105 {
6106 if (feof(stdin)) giveup()
6107 ;
6108 return 0;
6109 }
6110 _ACEOF
6111 rm -f "conftest.$ac_objext"
6112 if { (eval echo "$as_me:6112: \"$ac_compile\"") >&5
6113 (eval $ac_compile) 2>&5
6114 ac_status=$?
6115 echo "$as_me:6115: \$? = $ac_status" >&5
6116 (exit "$ac_status"); } &&
6117 { ac_try='test -s "conftest.$ac_objext"'
6118 { (eval echo "$as_me:6118: \"$ac_try\"") >&5
6119 (eval $ac_try) 2>&5
6120 ac_status=$?
6121 echo "$as_me:6121: \$? = $ac_status" >&5
6122 (exit "$ac_status"); }; }; then
6123 cf_cv_c11_noreturn=yes
6124 else
6125 echo "$as_me: failed program was:" >&5
6126 cat "conftest.$ac_ext" >&5
6127 cf_cv_c11_noreturn=no
6128 fi
6129 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6130
6131 fi
6132 echo "$as_me:6132: result: $cf_cv_c11_noreturn" >&5
6133 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
6134 else
6135 cf_cv_c11_noreturn=no,
6136 fi
6137
6138 if test "$cf_cv_c11_noreturn" = yes; then
6139
6140 cat >>confdefs.h <<\EOF
6141 #define HAVE_STDNORETURN_H 1
6142 EOF
6143
6144 cat >>confdefs.h <<EOF
6145 #define STDC_NORETURN _Noreturn
6146 EOF
6147
6148 HAVE_STDNORETURN_H=1
6149 else
6150 HAVE_STDNORETURN_H=0
6151 fi
6152
6153 if test "$GCC" = yes || test "$GXX" = yes
6154 then
6155
6156 if test "$GCC" = yes || test "$GXX" = yes
6157 then
6158 case $CFLAGS in
6159 (*-Werror=*)
6160 cf_temp_flags=
6161 for cf_temp_scan in $CFLAGS
6162 do
6163 case "x$cf_temp_scan" in
6164 (x-Werror=format*)
6165
6166 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6167 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
6168
6169 ;;
6170 (x-Werror=*)
6171
6172 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
6173 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
6174
6175 ;;
6176 (*)
6177
6178 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6179 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
6180
6181 ;;
6182 esac
6183 done
6184 if test "x$CFLAGS" != "x$cf_temp_flags"
6185 then
6186 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
6187
6188 echo "${as_me:-configure}:6188: testing repairing CFLAGS: $CFLAGS ..." 1>&5
6189
6190 CFLAGS="$cf_temp_flags"
6191 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
6192
6193 echo "${as_me:-configure}:6193: testing ... fixed $CFLAGS ..." 1>&5
6194
6195 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
6196
6197 echo "${as_me:-configure}:6197: testing ... extra $EXTRA_CFLAGS ..." 1>&5
6198
6199 fi
6200 ;;
6201 esac
6202 fi
6203
6204 if test "$GCC" = yes || test "$GXX" = yes
6205 then
6206 case $CPPFLAGS in
6207 (*-Werror=*)
6208 cf_temp_flags=
6209 for cf_temp_scan in $CPPFLAGS
6210 do
6211 case "x$cf_temp_scan" in
6212 (x-Werror=format*)
6213
6214 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6215 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
6216
6217 ;;
6218 (x-Werror=*)
6219
6220 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
6221 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
6222
6223 ;;
6224 (*)
6225
6226 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6227 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
6228
6229 ;;
6230 esac
6231 done
6232 if test "x$CPPFLAGS" != "x$cf_temp_flags"
6233 then
6234 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
6235
6236 echo "${as_me:-configure}:6236: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
6237
6238 CPPFLAGS="$cf_temp_flags"
6239 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
6240
6241 echo "${as_me:-configure}:6241: testing ... fixed $CPPFLAGS ..." 1>&5
6242
6243 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
6244
6245 echo "${as_me:-configure}:6245: testing ... extra $EXTRA_CFLAGS ..." 1>&5
6246
6247 fi
6248 ;;
6249 esac
6250 fi
6251
6252 if test "$GCC" = yes || test "$GXX" = yes
6253 then
6254 case $LDFLAGS in
6255 (*-Werror=*)
6256 cf_temp_flags=
6257 for cf_temp_scan in $LDFLAGS
6258 do
6259 case "x$cf_temp_scan" in
6260 (x-Werror=format*)
6261
6262 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6263 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
6264
6265 ;;
6266 (x-Werror=*)
6267
6268 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
6269 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
6270
6271 ;;
6272 (*)
6273
6274 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
6275 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
6276
6277 ;;
6278 esac
6279 done
6280 if test "x$LDFLAGS" != "x$cf_temp_flags"
6281 then
6282 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
6283
6284 echo "${as_me:-configure}:6284: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
6285
6286 LDFLAGS="$cf_temp_flags"
6287 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
6288
6289 echo "${as_me:-configure}:6289: testing ... fixed $LDFLAGS ..." 1>&5
6290
6291 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
6292
6293 echo "${as_me:-configure}:6293: testing ... extra $EXTRA_CFLAGS ..." 1>&5
6294
6295 fi
6296 ;;
6297 esac
6298 fi
6299
6300 echo "$as_me:6300: checking if you want to turn on gcc warnings" >&5
6301 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
6302
6303 # Check whether --enable-warnings or --disable-warnings was given.
6304 if test "${enable_warnings+set}" = set; then
6305 enableval="$enable_warnings"
6306 test "$enableval" != yes && enableval=no
6307 if test "$enableval" != "no" ; then
6308 enable_warnings=yes
6309 else
6310 enable_warnings=no
6311 fi
6312 else
6313 enableval=no
6314 enable_warnings=no
6315
6316 fi;
6317 echo "$as_me:6317: result: $enable_warnings" >&5
6318 echo "${ECHO_T}$enable_warnings" >&6
6319 if test "$enable_warnings" = "yes"
6320 then
6321
6322 if test "$GCC" = yes || test "$GXX" = yes
6323 then
6324 cat > conftest.i <<EOF
6325 #ifndef GCC_PRINTF
6326 #define GCC_PRINTF 0
6327 #endif
6328 #ifndef GCC_SCANF
6329 #define GCC_SCANF 0
6330 #endif
6331 #ifndef GCC_NORETURN
6332 #define GCC_NORETURN /* nothing */
6333 #endif
6334 #ifndef GCC_UNUSED
6335 #define GCC_UNUSED /* nothing */
6336 #endif
6337 EOF
6338 if test "$GCC" = yes
6339 then
6340 { echo "$as_me:6340: checking for $CC __attribute__ directives..." >&5
6341 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
6342 cat > "conftest.$ac_ext" <<EOF
6343 #line 6343 "${as_me:-configure}"
6344 #include <stdio.h>
6345 #include "confdefs.h"
6346 #include "conftest.h"
6347 #include "conftest.i"
6348 #if GCC_PRINTF
6349 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
6350 #else
6351 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
6352 #endif
6353 #if GCC_SCANF
6354 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
6355 #else
6356 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
6357 #endif
6358 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
6359 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
6360 extern GCC_NORETURN void foo(void);
6361 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
6362 EOF
6363 cf_printf_attribute=no
6364 cf_scanf_attribute=no
6365 for cf_attribute in scanf printf unused noreturn
6366 do
6367
6368 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6369
6370 cf_directive="__attribute__(($cf_attribute))"
6371 echo "checking for $CC $cf_directive" 1>&5
6372
6373 case "$cf_attribute" in
6374 (printf)
6375 cf_printf_attribute=yes
6376 cat >conftest.h <<EOF
6377 #define GCC_$cf_ATTRIBUTE 1
6378 EOF
6379 ;;
6380 (scanf)
6381 cf_scanf_attribute=yes
6382 cat >conftest.h <<EOF
6383 #define GCC_$cf_ATTRIBUTE 1
6384 EOF
6385 ;;
6386 (*)
6387 cat >conftest.h <<EOF
6388 #define GCC_$cf_ATTRIBUTE $cf_directive
6389 EOF
6390 ;;
6391 esac
6392
6393 if { (eval echo "$as_me:6393: \"$ac_compile\"") >&5
6394 (eval $ac_compile) 2>&5
6395 ac_status=$?
6396 echo "$as_me:6396: \$? = $ac_status" >&5
6397 (exit "$ac_status"); }; then
6398 test -n "$verbose" && echo "$as_me:6398: result: ... $cf_attribute" >&5
6399 echo "${ECHO_T}... $cf_attribute" >&6
6400 cat conftest.h >>confdefs.h
6401 case "$cf_attribute" in
6402 (noreturn)
6403
6404 cat >>confdefs.h <<EOF
6405 #define GCC_NORETURN $cf_directive
6406 EOF
6407
6408 ;;
6409 (printf)
6410 cf_value='/* nothing */'
6411 if test "$cf_printf_attribute" != no ; then
6412 cf_value='__attribute__((format(printf,fmt,var)))'
6413
6414 cat >>confdefs.h <<\EOF
6415 #define GCC_PRINTF 1
6416 EOF
6417
6418 fi
6419
6420 cat >>confdefs.h <<EOF
6421 #define GCC_PRINTFLIKE(fmt,var) $cf_value
6422 EOF
6423
6424 ;;
6425 (scanf)
6426 cf_value='/* nothing */'
6427 if test "$cf_scanf_attribute" != no ; then
6428 cf_value='__attribute__((format(scanf,fmt,var)))'
6429
6430 cat >>confdefs.h <<\EOF
6431 #define GCC_SCANF 1
6432 EOF
6433
6434 fi
6435
6436 cat >>confdefs.h <<EOF
6437 #define GCC_SCANFLIKE(fmt,var) $cf_value
6438 EOF
6439
6440 ;;
6441 (unused)
6442
6443 cat >>confdefs.h <<EOF
6444 #define GCC_UNUSED $cf_directive
6445 EOF
6446
6447 ;;
6448 esac
6449 fi
6450 done
6451 else
6452 ${FGREP-fgrep} define conftest.i >>confdefs.h
6453 fi
6454 rm -rf ./conftest*
6455 fi
6456
6457 if test "x$have_x" = xyes; then echo "skipping X-const check"; fi
6458 cat > "conftest.$ac_ext" <<EOF
6459 #line 6459 "${as_me:-configure}"
6460 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
6461 EOF
6462 if test "$INTEL_COMPILER" = yes
6463 then
6464 # The "-wdXXX" options suppress warnings:
6465 # remark #1419: external declaration in primary source file
6466 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
6467 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
6468 # remark #193: zero used for undefined preprocessing identifier
6469 # remark #593: variable "curs_sb_left_arrow" was set but never used
6470 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
6471 # remark #869: parameter "tw" was never referenced
6472 # remark #981: operands are evaluated in unspecified order
6473 # warning #279: controlling expression is constant
6474
6475 { echo "$as_me:6475: checking for $CC warning options..." >&5
6476 echo "$as_me: checking for $CC warning options..." >&6;}
6477 cf_save_CFLAGS="$CFLAGS"
6478 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
6479 for cf_opt in \
6480 wd1419 \
6481 wd1683 \
6482 wd1684 \
6483 wd193 \
6484 wd593 \
6485 wd279 \
6486 wd810 \
6487 wd869 \
6488 wd981
6489 do
6490 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
6491 if { (eval echo "$as_me:6491: \"$ac_compile\"") >&5
6492 (eval $ac_compile) 2>&5
6493 ac_status=$?
6494 echo "$as_me:6494: \$? = $ac_status" >&5
6495 (exit "$ac_status"); }; then
6496 test -n "$verbose" && echo "$as_me:6496: result: ... -$cf_opt" >&5
6497 echo "${ECHO_T}... -$cf_opt" >&6
6498 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
6499 fi
6500 done
6501 CFLAGS="$cf_save_CFLAGS"
6502 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
6503 then
6504 { echo "$as_me:6504: checking for $CC warning options..." >&5
6505 echo "$as_me: checking for $CC warning options..." >&6;}
6506 cf_save_CFLAGS="$CFLAGS"
6507 cf_warn_CONST=""
6508 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
6509 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
6510 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
6511 for cf_opt in W Wall \
6512 Wbad-function-cast \
6513 Wcast-align \
6514 Wcast-qual \
6515 Wdeclaration-after-statement \
6516 Wextra \
6517 Winline \
6518 Wmissing-declarations \
6519 Wmissing-prototypes \
6520 Wnested-externs \
6521 Wpointer-arith \
6522 Wshadow \
6523 Wstrict-prototypes \
6524 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wwrite-strings Wconversion
6525 do
6526 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
6527 if { (eval echo "$as_me:6527: \"$ac_compile\"") >&5
6528 (eval $ac_compile) 2>&5
6529 ac_status=$?
6530 echo "$as_me:6530: \$? = $ac_status" >&5
6531 (exit "$ac_status"); }; then
6532 test -n "$verbose" && echo "$as_me:6532: result: ... -$cf_opt" >&5
6533 echo "${ECHO_T}... -$cf_opt" >&6
6534 case "$cf_opt" in
6535 (Winline)
6536 case "$GCC_VERSION" in
6537 ([34].*)
6538 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
6539
6540 echo "${as_me:-configure}:6540: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
6541
6542 continue;;
6543 esac
6544 ;;
6545 (Wpointer-arith)
6546 case "$GCC_VERSION" in
6547 ([12].*)
6548 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
6549
6550 echo "${as_me:-configure}:6550: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
6551
6552 continue;;
6553 esac
6554 ;;
6555 esac
6556 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
6557 fi
6558 done
6559 CFLAGS="$cf_save_CFLAGS"
6560 fi
6561 rm -rf ./conftest*
6562
6563 fi
6564
6565 fi
6566
6567 for ac_header in \
6568 poll.h \
6569 pty.h \
6570 stropts.h \
6571 sys/ioctl.h \
6572 sys/param.h \
6573 sys/poll.h \
6574 sys/select.h \
6575 sys/time.h \
6576 termios.h \
6577
6578 do
6579 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6580 echo "$as_me:6580: checking for $ac_header" >&5
6581 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6582 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6583 echo $ECHO_N "(cached) $ECHO_C" >&6
6584 else
6585 cat >"conftest.$ac_ext" <<_ACEOF
6586 #line 6586 "configure"
6587 #include "confdefs.h"
6588 #include <$ac_header>
6589 _ACEOF
6590 if { (eval echo "$as_me:6590: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6591 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6592 ac_status=$?
6593 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6594 rm -f conftest.er1
6595 cat conftest.err >&5
6596 echo "$as_me:6596: \$? = $ac_status" >&5
6597 (exit "$ac_status"); } >/dev/null; then
6598 if test -s conftest.err; then
6599 ac_cpp_err=$ac_c_preproc_warn_flag
6600 else
6601 ac_cpp_err=
6602 fi
6603 else
6604 ac_cpp_err=yes
6605 fi
6606 if test -z "$ac_cpp_err"; then
6607 eval "$as_ac_Header=yes"
6608 else
6609 echo "$as_me: failed program was:" >&5
6610 cat "conftest.$ac_ext" >&5
6611 eval "$as_ac_Header=no"
6612 fi
6613 rm -f conftest.err "conftest.$ac_ext"
6614 fi
6615 echo "$as_me:6615: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6616 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6617 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6618 cat >>confdefs.h <<EOF
6619 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6620 EOF
6621
6622 fi
6623 done
6624
6625 for ac_func in \
6626 poll \
6627 putenv \
6628 select \
6629 strdup \
6630 strcasecmp \
6631
6632 do
6633 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6634 echo "$as_me:6634: checking for $ac_func" >&5
6635 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6636 if eval "test \"\${$as_ac_var+set}\" = set"; then
6637 echo $ECHO_N "(cached) $ECHO_C" >&6
6638 else
6639 cat >"conftest.$ac_ext" <<_ACEOF
6640 #line 6640 "configure"
6641 #include "confdefs.h"
6642 #define $ac_func autoconf_temporary
6643 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6644 #undef $ac_func
6645
6646 #ifdef __cplusplus
6647 extern "C"
6648 #endif
6649
6650 /* We use char because int might match the return type of a gcc2
6651 builtin and then its argument prototype would still apply. */
6652 char $ac_func (void);
6653
6654 int
6655 main (void)
6656 {
6657
6658 /* The GNU C library defines stubs for functions which it implements
6659 to always fail with ENOSYS. Some functions are actually named
6660 something starting with __ and the normal name is an alias. */
6661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6662 #error found stub for $ac_func
6663 #endif
6664
6665 return $ac_func ();
6666 ;
6667 return 0;
6668 }
6669 _ACEOF
6670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6671 if { (eval echo "$as_me:6671: \"$ac_link\"") >&5
6672 (eval $ac_link) 2>&5
6673 ac_status=$?
6674 echo "$as_me:6674: \$? = $ac_status" >&5
6675 (exit "$ac_status"); } &&
6676 { ac_try='test -s "conftest$ac_exeext"'
6677 { (eval echo "$as_me:6677: \"$ac_try\"") >&5
6678 (eval $ac_try) 2>&5
6679 ac_status=$?
6680 echo "$as_me:6680: \$? = $ac_status" >&5
6681 (exit "$ac_status"); }; }; then
6682 eval "$as_ac_var=yes"
6683 else
6684 echo "$as_me: failed program was:" >&5
6685 cat "conftest.$ac_ext" >&5
6686 eval "$as_ac_var=no"
6687 fi
6688 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6689 fi
6690 echo "$as_me:6690: result: `eval echo '${'"$as_ac_var"'}'`" >&5
6691 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
6692 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
6693 cat >>confdefs.h <<EOF
6694 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6695 EOF
6696
6697 fi
6698 done
6699
6700 echo "$as_me:6700: checking for getgroups/setgroups" >&5
6701 echo $ECHO_N "checking for getgroups/setgroups... $ECHO_C" >&6
6702 if test "${cf_cv_func_setgroups+set}" = set; then
6703 echo $ECHO_N "(cached) $ECHO_C" >&6
6704 else
6705
6706 cat >"conftest.$ac_ext" <<_ACEOF
6707 #line 6707 "configure"
6708 #include "confdefs.h"
6709
6710 $ac_includes_default
6711 #include <grp.h>
6712
6713 int
6714 main (void)
6715 {
6716
6717 gid_t my_list[10];
6718 if (getgroups(0, my_list)) setgroups(0, NULL);
6719
6720 ;
6721 return 0;
6722 }
6723 _ACEOF
6724 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6725 if { (eval echo "$as_me:6725: \"$ac_link\"") >&5
6726 (eval $ac_link) 2>&5
6727 ac_status=$?
6728 echo "$as_me:6728: \$? = $ac_status" >&5
6729 (exit "$ac_status"); } &&
6730 { ac_try='test -s "conftest$ac_exeext"'
6731 { (eval echo "$as_me:6731: \"$ac_try\"") >&5
6732 (eval $ac_try) 2>&5
6733 ac_status=$?
6734 echo "$as_me:6734: \$? = $ac_status" >&5
6735 (exit "$ac_status"); }; }; then
6736 cf_cv_func_setgroups=yes
6737 else
6738 echo "$as_me: failed program was:" >&5
6739 cat "conftest.$ac_ext" >&5
6740 cf_cv_func_setgroups=no
6741 fi
6742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6743
6744 fi
6745 echo "$as_me:6745: result: $cf_cv_func_setgroups" >&5
6746 echo "${ECHO_T}$cf_cv_func_setgroups" >&6
6747 test "$cf_cv_func_setgroups" = yes &&
6748 cat >>confdefs.h <<\EOF
6749 #define HAVE_SETGROUPS 1
6750 EOF
6751
6752 echo "$as_me:6752: checking for nfds_t" >&5
6753 echo $ECHO_N "checking for nfds_t... $ECHO_C" >&6
6754 if test "${ac_cv_type_nfds_t+set}" = set; then
6755 echo $ECHO_N "(cached) $ECHO_C" >&6
6756 else
6757 cat >"conftest.$ac_ext" <<_ACEOF
6758 #line 6758 "configure"
6759 #include "confdefs.h"
6760
6761 #include <sys/types.h>
6762 #ifdef HAVE_SYS_POLL_H
6763 #include <sys/poll.h>
6764 #endif
6765
6766 int
6767 main (void)
6768 {
6769 if ((nfds_t *) 0)
6770 return 0;
6771 if (sizeof (nfds_t))
6772 return 0;
6773 ;
6774 return 0;
6775 }
6776 _ACEOF
6777 rm -f "conftest.$ac_objext"
6778 if { (eval echo "$as_me:6778: \"$ac_compile\"") >&5
6779 (eval $ac_compile) 2>&5
6780 ac_status=$?
6781 echo "$as_me:6781: \$? = $ac_status" >&5
6782 (exit "$ac_status"); } &&
6783 { ac_try='test -s "conftest.$ac_objext"'
6784 { (eval echo "$as_me:6784: \"$ac_try\"") >&5
6785 (eval $ac_try) 2>&5
6786 ac_status=$?
6787 echo "$as_me:6787: \$? = $ac_status" >&5
6788 (exit "$ac_status"); }; }; then
6789 ac_cv_type_nfds_t=yes
6790 else
6791 echo "$as_me: failed program was:" >&5
6792 cat "conftest.$ac_ext" >&5
6793 ac_cv_type_nfds_t=no
6794 fi
6795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6796 fi
6797 echo "$as_me:6797: result: $ac_cv_type_nfds_t" >&5
6798 echo "${ECHO_T}$ac_cv_type_nfds_t" >&6
6799 if test "$ac_cv_type_nfds_t" = yes; then
6800 ac_cv_type_nfds_t=yes
6801 else
6802 ac_cv_type_nfds_t=no
6803 fi
6804
6805 if test "$ac_cv_type_nfds_t" = no; then
6806
6807 cat >>confdefs.h <<\EOF
6808 #define nfds_t unsigned long
6809 EOF
6810
6811 fi
6812
6813 echo "$as_me:6813: checking if sys/time.h works with sys/select.h" >&5
6814 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
6815 if test "${cf_cv_sys_time_select+set}" = set; then
6816 echo $ECHO_N "(cached) $ECHO_C" >&6
6817 else
6818
6819 cat >"conftest.$ac_ext" <<_ACEOF
6820 #line 6820 "configure"
6821 #include "confdefs.h"
6822
6823 #include <sys/types.h>
6824 #ifdef HAVE_SYS_TIME_H
6825 #include <sys/time.h>
6826 #endif
6827 #ifdef HAVE_SYS_SELECT_H
6828 #include <sys/select.h>
6829 #endif
6830
6831 int
6832 main (void)
6833 {
6834
6835 ;
6836 return 0;
6837 }
6838 _ACEOF
6839 rm -f "conftest.$ac_objext"
6840 if { (eval echo "$as_me:6840: \"$ac_compile\"") >&5
6841 (eval $ac_compile) 2>&5
6842 ac_status=$?
6843 echo "$as_me:6843: \$? = $ac_status" >&5
6844 (exit "$ac_status"); } &&
6845 { ac_try='test -s "conftest.$ac_objext"'
6846 { (eval echo "$as_me:6846: \"$ac_try\"") >&5
6847 (eval $ac_try) 2>&5
6848 ac_status=$?
6849 echo "$as_me:6849: \$? = $ac_status" >&5
6850 (exit "$ac_status"); }; }; then
6851 cf_cv_sys_time_select=yes
6852 else
6853 echo "$as_me: failed program was:" >&5
6854 cat "conftest.$ac_ext" >&5
6855 cf_cv_sys_time_select=no
6856 fi
6857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6858
6859 fi
6860
6861 echo "$as_me:6861: result: $cf_cv_sys_time_select" >&5
6862 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
6863 test "$cf_cv_sys_time_select" = yes &&
6864 cat >>confdefs.h <<\EOF
6865 #define HAVE_SYS_TIME_SELECT 1
6866 EOF
6867
6868 # workaround for divergence of xterm/luit in the [CF_FUNC_GRANTPT] macro...
6869
6870 for ac_func in grantpt
6871 do
6872 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6873 echo "$as_me:6873: checking for $ac_func" >&5
6874 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6875 if eval "test \"\${$as_ac_var+set}\" = set"; then
6876 echo $ECHO_N "(cached) $ECHO_C" >&6
6877 else
6878 cat >"conftest.$ac_ext" <<_ACEOF
6879 #line 6879 "configure"
6880 #include "confdefs.h"
6881 #define $ac_func autoconf_temporary
6882 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6883 #undef $ac_func
6884
6885 #ifdef __cplusplus
6886 extern "C"
6887 #endif
6888
6889 /* We use char because int might match the return type of a gcc2
6890 builtin and then its argument prototype would still apply. */
6891 char $ac_func (void);
6892
6893 int
6894 main (void)
6895 {
6896
6897 /* The GNU C library defines stubs for functions which it implements
6898 to always fail with ENOSYS. Some functions are actually named
6899 something starting with __ and the normal name is an alias. */
6900 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6901 #error found stub for $ac_func
6902 #endif
6903
6904 return $ac_func ();
6905 ;
6906 return 0;
6907 }
6908 _ACEOF
6909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6910 if { (eval echo "$as_me:6910: \"$ac_link\"") >&5
6911 (eval $ac_link) 2>&5
6912 ac_status=$?
6913 echo "$as_me:6913: \$? = $ac_status" >&5
6914 (exit "$ac_status"); } &&
6915 { ac_try='test -s "conftest$ac_exeext"'
6916 { (eval echo "$as_me:6916: \"$ac_try\"") >&5
6917 (eval $ac_try) 2>&5
6918 ac_status=$?
6919 echo "$as_me:6919: \$? = $ac_status" >&5
6920 (exit "$ac_status"); }; }; then
6921 eval "$as_ac_var=yes"
6922 else
6923 echo "$as_me: failed program was:" >&5
6924 cat "conftest.$ac_ext" >&5
6925 eval "$as_ac_var=no"
6926 fi
6927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6928 fi
6929 echo "$as_me:6929: result: `eval echo '${'"$as_ac_var"'}'`" >&5
6930 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
6931 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
6932 cat >>confdefs.h <<EOF
6933 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6934 EOF
6935
6936 fi
6937 done
6938
6939 disable_openpty=$ac_cv_func_grantpt
6940
6941 for ac_header in \
6942 stropts.h \
6943
6944 do
6945 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6946 echo "$as_me:6946: checking for $ac_header" >&5
6947 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6949 echo $ECHO_N "(cached) $ECHO_C" >&6
6950 else
6951 cat >"conftest.$ac_ext" <<_ACEOF
6952 #line 6952 "configure"
6953 #include "confdefs.h"
6954 #include <$ac_header>
6955 _ACEOF
6956 if { (eval echo "$as_me:6956: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6957 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6958 ac_status=$?
6959 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6960 rm -f conftest.er1
6961 cat conftest.err >&5
6962 echo "$as_me:6962: \$? = $ac_status" >&5
6963 (exit "$ac_status"); } >/dev/null; then
6964 if test -s conftest.err; then
6965 ac_cpp_err=$ac_c_preproc_warn_flag
6966 else
6967 ac_cpp_err=
6968 fi
6969 else
6970 ac_cpp_err=yes
6971 fi
6972 if test -z "$ac_cpp_err"; then
6973 eval "$as_ac_Header=yes"
6974 else
6975 echo "$as_me: failed program was:" >&5
6976 cat "conftest.$ac_ext" >&5
6977 eval "$as_ac_Header=no"
6978 fi
6979 rm -f conftest.err "conftest.$ac_ext"
6980 fi
6981 echo "$as_me:6981: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6982 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6983 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6984 cat >>confdefs.h <<EOF
6985 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6986 EOF
6987
6988 fi
6989 done
6990
6991 cf_func_grantpt="grantpt ptsname"
6992 cf_prefer_openpt=no
6993 case $host_os in
6994 (darwin[0-9].*)
6995 ;;
6996 (openbsd[0-9].*)
6997 # The POSIX entrypoints exist, but have never worked.
6998 ;;
6999 (linux*)
7000 cf_func_grantpt="$cf_func_grantpt posix_openpt"
7001 cf_prefer_openpt=yes
7002 ;;
7003 (*)
7004 cf_func_grantpt="$cf_func_grantpt posix_openpt"
7005 ;;
7006 esac
7007
7008 for ac_func in $cf_func_grantpt
7009 do
7010 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7011 echo "$as_me:7011: checking for $ac_func" >&5
7012 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7013 if eval "test \"\${$as_ac_var+set}\" = set"; then
7014 echo $ECHO_N "(cached) $ECHO_C" >&6
7015 else
7016 cat >"conftest.$ac_ext" <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7019 #define $ac_func autoconf_temporary
7020 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7021 #undef $ac_func
7022
7023 #ifdef __cplusplus
7024 extern "C"
7025 #endif
7026
7027 /* We use char because int might match the return type of a gcc2
7028 builtin and then its argument prototype would still apply. */
7029 char $ac_func (void);
7030
7031 int
7032 main (void)
7033 {
7034
7035 /* The GNU C library defines stubs for functions which it implements
7036 to always fail with ENOSYS. Some functions are actually named
7037 something starting with __ and the normal name is an alias. */
7038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7039 #error found stub for $ac_func
7040 #endif
7041
7042 return $ac_func ();
7043 ;
7044 return 0;
7045 }
7046 _ACEOF
7047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7048 if { (eval echo "$as_me:7048: \"$ac_link\"") >&5
7049 (eval $ac_link) 2>&5
7050 ac_status=$?
7051 echo "$as_me:7051: \$? = $ac_status" >&5
7052 (exit "$ac_status"); } &&
7053 { ac_try='test -s "conftest$ac_exeext"'
7054 { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055 (eval $ac_try) 2>&5
7056 ac_status=$?
7057 echo "$as_me:7057: \$? = $ac_status" >&5
7058 (exit "$ac_status"); }; }; then
7059 eval "$as_ac_var=yes"
7060 else
7061 echo "$as_me: failed program was:" >&5
7062 cat "conftest.$ac_ext" >&5
7063 eval "$as_ac_var=no"
7064 fi
7065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066 fi
7067 echo "$as_me:7067: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7068 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7069 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7070 cat >>confdefs.h <<EOF
7071 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7072 EOF
7073
7074 fi
7075 done
7076
7077 cf_grantpt_opts=
7078 if test "x$ac_cv_func_grantpt" = "xyes" ; then
7079 echo "$as_me:7079: checking if grantpt really works" >&5
7080 echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
7081 cat >"conftest.$ac_ext" <<_ACEOF
7082 #line 7082 "configure"
7083 #include "confdefs.h"
7084
7085 #include <stdlib.h>
7086 #include <stdio.h>
7087 #include <termios.h>
7088 #include <unistd.h>
7089 #include <signal.h>
7090 #include <fcntl.h>
7091 #include <errno.h>
7092
7093 #ifndef HAVE_POSIX_OPENPT
7094 #undef posix_openpt
7095 #define posix_openpt(mode) open("/dev/ptmx", mode)
7096 #endif
7097
7098 #ifdef HAVE_STROPTS_H
7099 #include <stropts.h>
7100 #endif
7101
7102 static void failed(int code)
7103 {
7104 perror("conftest");
7105 exit(code);
7106 }
7107
7108 static void my_timeout(int sig)
7109 {
7110 (void)sig;
7111 exit(99);
7112 }
7113
7114 int
7115 main (void)
7116 {
7117
7118 int code = 0;
7119 int pty;
7120 int tty;
7121 char *slave;
7122 struct termios tio;
7123
7124 (void)tio;
7125 signal(SIGALRM, my_timeout);
7126
7127 if (alarm(2) == 9)
7128 failed(9);
7129 else if ((pty = posix_openpt(O_RDWR)) < 0)
7130 failed(1);
7131 else if (grantpt(pty) < 0)
7132 failed(2);
7133 else if (unlockpt(pty) < 0)
7134 failed(3);
7135 else if ((slave = ptsname(pty)) == 0)
7136 failed(4);
7137 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
7138 else if (!isatty(pty))
7139 failed(4);
7140 #endif
7141 #if CONFTEST >= 4
7142 else if (tcgetattr(pty, &tio) < 0)
7143 failed(20);
7144 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
7145 failed(21);
7146 #endif
7147 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
7148 * Linux does treat it that way.
7149 */
7150 else if ((tty = open(slave, O_RDWR)) < 0)
7151 failed(5);
7152 #ifdef CONFTEST
7153 #ifdef I_PUSH
7154 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
7155 else if (ioctl(tty, I_PUSH, "ptem") < 0)
7156 failed(10);
7157 #endif
7158 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
7159 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
7160 failed(11);
7161 #endif
7162 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
7163 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
7164 failed(12);
7165 #endif
7166 #endif /* I_PUSH */
7167 #if CONFTEST >= 5
7168 else if (tcgetattr(tty, &tio) < 0)
7169 failed(30);
7170 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
7171 failed(31);
7172 #endif
7173 #endif /* CONFTEST */
7174 (void) tty;
7175 ${cf_cv_main_return:-return}(code);
7176
7177 ;
7178 return 0;
7179 }
7180 _ACEOF
7181 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7182 if { (eval echo "$as_me:7182: \"$ac_link\"") >&5
7183 (eval $ac_link) 2>&5
7184 ac_status=$?
7185 echo "$as_me:7185: \$? = $ac_status" >&5
7186 (exit "$ac_status"); } &&
7187 { ac_try='test -s "conftest$ac_exeext"'
7188 { (eval echo "$as_me:7188: \"$ac_try\"") >&5
7189 (eval $ac_try) 2>&5
7190 ac_status=$?
7191 echo "$as_me:7191: \$? = $ac_status" >&5
7192 (exit "$ac_status"); }; }; then
7193
7194 if test "$cross_compiling" = yes; then
7195 ac_cv_func_grantpt=maybe
7196 else
7197 cat >"conftest.$ac_ext" <<_ACEOF
7198 #line 7198 "configure"
7199 #include "confdefs.h"
7200
7201 #include <stdlib.h>
7202 #include <stdio.h>
7203 #include <termios.h>
7204 #include <unistd.h>
7205 #include <signal.h>
7206 #include <fcntl.h>
7207 #include <errno.h>
7208
7209 #ifndef HAVE_POSIX_OPENPT
7210 #undef posix_openpt
7211 #define posix_openpt(mode) open("/dev/ptmx", mode)
7212 #endif
7213
7214 #ifdef HAVE_STROPTS_H
7215 #include <stropts.h>
7216 #endif
7217
7218 static void failed(int code)
7219 {
7220 perror("conftest");
7221 exit(code);
7222 }
7223
7224 static void my_timeout(int sig)
7225 {
7226 (void)sig;
7227 exit(99);
7228 }
7229
7230 int main(void)
7231 {
7232
7233 int code = 0;
7234 int pty;
7235 int tty;
7236 char *slave;
7237 struct termios tio;
7238
7239 (void)tio;
7240 signal(SIGALRM, my_timeout);
7241
7242 if (alarm(2) == 9)
7243 failed(9);
7244 else if ((pty = posix_openpt(O_RDWR)) < 0)
7245 failed(1);
7246 else if (grantpt(pty) < 0)
7247 failed(2);
7248 else if (unlockpt(pty) < 0)
7249 failed(3);
7250 else if ((slave = ptsname(pty)) == 0)
7251 failed(4);
7252 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
7253 else if (!isatty(pty))
7254 failed(4);
7255 #endif
7256 #if CONFTEST >= 4
7257 else if (tcgetattr(pty, &tio) < 0)
7258 failed(20);
7259 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
7260 failed(21);
7261 #endif
7262 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
7263 * Linux does treat it that way.
7264 */
7265 else if ((tty = open(slave, O_RDWR)) < 0)
7266 failed(5);
7267 #ifdef CONFTEST
7268 #ifdef I_PUSH
7269 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
7270 else if (ioctl(tty, I_PUSH, "ptem") < 0)
7271 failed(10);
7272 #endif
7273 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
7274 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
7275 failed(11);
7276 #endif
7277 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
7278 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
7279 failed(12);
7280 #endif
7281 #endif /* I_PUSH */
7282 #if CONFTEST >= 5
7283 else if (tcgetattr(tty, &tio) < 0)
7284 failed(30);
7285 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
7286 failed(31);
7287 #endif
7288 #endif /* CONFTEST */
7289 (void) tty;
7290 ${cf_cv_main_return:-return}(code);
7291
7292 }
7293
7294 _ACEOF
7295 rm -f "conftest$ac_exeext"
7296 if { (eval echo "$as_me:7296: \"$ac_link\"") >&5
7297 (eval $ac_link) 2>&5
7298 ac_status=$?
7299 echo "$as_me:7299: \$? = $ac_status" >&5
7300 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7301 { (eval echo "$as_me:7301: \"$ac_try\"") >&5
7302 (eval $ac_try) 2>&5
7303 ac_status=$?
7304 echo "$as_me:7304: \$? = $ac_status" >&5
7305 (exit "$ac_status"); }; }; then
7306 :
7307 else
7308 echo "$as_me: program exited with status $ac_status" >&5
7309 echo "$as_me: failed program was:" >&5
7310 cat "conftest.$ac_ext" >&5
7311 ac_cv_func_grantpt=no
7312
7313 fi
7314 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7315 fi
7316
7317 else
7318 echo "$as_me: failed program was:" >&5
7319 cat "conftest.$ac_ext" >&5
7320 ac_cv_func_grantpt=no
7321 fi
7322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7323 echo "$as_me:7323: result: $ac_cv_func_grantpt" >&5
7324 echo "${ECHO_T}$ac_cv_func_grantpt" >&6
7325
7326 if test "x$ac_cv_func_grantpt" != "xno" ; then
7327
7328 if test "x$ac_cv_func_grantpt" = "xyes" ; then
7329 echo "$as_me:7329: checking for pty features" >&5
7330 echo $ECHO_N "checking for pty features... $ECHO_C" >&6
7331 if test "x$ac_cv_header_stropts_h" = xyes
7332 then
7333 cf_pty_this=0
7334 else
7335 cf_pty_this=3
7336 fi
7337
7338 cf_pty_defines=
7339 while test $cf_pty_this != 6
7340 do
7341
7342 cf_pty_feature=
7343 cf_pty_next="`expr $cf_pty_this + 1`"
7344
7345 echo "${as_me:-configure}:7345: testing pty feature test $cf_pty_next:5 ..." 1>&5
7346
7347 if test "$cross_compiling" = yes; then
7348 { { echo "$as_me:7348: error: cannot run test program while cross compiling" >&5
7349 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
7350 { (exit 1); exit 1; }; }
7351 else
7352 cat >"conftest.$ac_ext" <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7355 #define CONFTEST $cf_pty_this
7356 $cf_pty_defines
7357
7358 #include <stdlib.h>
7359 #include <stdio.h>
7360 #include <termios.h>
7361 #include <unistd.h>
7362 #include <signal.h>
7363 #include <fcntl.h>
7364 #include <errno.h>
7365
7366 #ifndef HAVE_POSIX_OPENPT
7367 #undef posix_openpt
7368 #define posix_openpt(mode) open("/dev/ptmx", mode)
7369 #endif
7370
7371 #ifdef HAVE_STROPTS_H
7372 #include <stropts.h>
7373 #endif
7374
7375 static void failed(int code)
7376 {
7377 perror("conftest");
7378 exit(code);
7379 }
7380
7381 static void my_timeout(int sig)
7382 {
7383 (void)sig;
7384 exit(99);
7385 }
7386
7387 int main(void)
7388 {
7389
7390 int code = 0;
7391 int pty;
7392 int tty;
7393 char *slave;
7394 struct termios tio;
7395
7396 (void)tio;
7397 signal(SIGALRM, my_timeout);
7398
7399 if (alarm(2) == 9)
7400 failed(9);
7401 else if ((pty = posix_openpt(O_RDWR)) < 0)
7402 failed(1);
7403 else if (grantpt(pty) < 0)
7404 failed(2);
7405 else if (unlockpt(pty) < 0)
7406 failed(3);
7407 else if ((slave = ptsname(pty)) == 0)
7408 failed(4);
7409 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
7410 else if (!isatty(pty))
7411 failed(4);
7412 #endif
7413 #if CONFTEST >= 4
7414 else if (tcgetattr(pty, &tio) < 0)
7415 failed(20);
7416 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
7417 failed(21);
7418 #endif
7419 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
7420 * Linux does treat it that way.
7421 */
7422 else if ((tty = open(slave, O_RDWR)) < 0)
7423 failed(5);
7424 #ifdef CONFTEST
7425 #ifdef I_PUSH
7426 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
7427 else if (ioctl(tty, I_PUSH, "ptem") < 0)
7428 failed(10);
7429 #endif
7430 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
7431 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
7432 failed(11);
7433 #endif
7434 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
7435 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
7436 failed(12);
7437 #endif
7438 #endif /* I_PUSH */
7439 #if CONFTEST >= 5
7440 else if (tcgetattr(tty, &tio) < 0)
7441 failed(30);
7442 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
7443 failed(31);
7444 #endif
7445 #endif /* CONFTEST */
7446 (void) tty;
7447 ${cf_cv_main_return:-return}(code);
7448
7449 }
7450
7451 _ACEOF
7452 rm -f "conftest$ac_exeext"
7453 if { (eval echo "$as_me:7453: \"$ac_link\"") >&5
7454 (eval $ac_link) 2>&5
7455 ac_status=$?
7456 echo "$as_me:7456: \$? = $ac_status" >&5
7457 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7458 { (eval echo "$as_me:7458: \"$ac_try\"") >&5
7459 (eval $ac_try) 2>&5
7460 ac_status=$?
7461 echo "$as_me:7461: \$? = $ac_status" >&5
7462 (exit "$ac_status"); }; }; then
7463
7464 case $cf_pty_next in
7465 (1) # - streams
7466 cf_pty_feature=ptem
7467 ;;
7468 (2) # - streams
7469 cf_pty_feature=ldterm
7470 ;;
7471 (3) # - streams
7472 cf_pty_feature=ttcompat
7473 ;;
7474 (4)
7475 cf_pty_feature=pty_isatty
7476 ;;
7477 (5)
7478 cf_pty_feature=pty_tcsetattr
7479 ;;
7480 (6)
7481 cf_pty_feature=tty_tcsetattr
7482 ;;
7483 esac
7484
7485 else
7486 echo "$as_me: program exited with status $ac_status" >&5
7487 echo "$as_me: failed program was:" >&5
7488 cat "conftest.$ac_ext" >&5
7489
7490 case $cf_pty_next in
7491 (1|2|3)
7492
7493 echo "${as_me:-configure}:7493: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
7494
7495 cf_pty_next=3
7496 ;;
7497 esac
7498
7499 fi
7500 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7501 fi
7502 if test -n "$cf_pty_feature"
7503 then
7504 cf_pty_defines="$cf_pty_defines
7505 #define CONFTEST_$cf_pty_feature 1
7506 "
7507 cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
7508 fi
7509
7510 cf_pty_this=$cf_pty_next
7511 done
7512 echo "$as_me:7512: result: $cf_grantpt_opts" >&5
7513 echo "${ECHO_T}$cf_grantpt_opts" >&6
7514 cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
7515 fi
7516 fi
7517 fi
7518
7519 if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
7520 test -n "$verbose" && echo " prefer posix_openpt over openpty" 1>&6
7521
7522 echo "${as_me:-configure}:7522: testing prefer posix_openpt over openpty ..." 1>&5
7523
7524 elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
7525 echo "$as_me:7525: checking for openpty in -lutil" >&5
7526 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
7527 if test "${ac_cv_lib_util_openpty+set}" = set; then
7528 echo $ECHO_N "(cached) $ECHO_C" >&6
7529 else
7530 ac_check_lib_save_LIBS=$LIBS
7531 LIBS="-lutil $LIBS"
7532 cat >"conftest.$ac_ext" <<_ACEOF
7533 #line 7533 "configure"
7534 #include "confdefs.h"
7535
7536 /* Override any gcc2 internal prototype to avoid an error. */
7537 #ifdef __cplusplus
7538 extern "C"
7539 #endif
7540 /* We use char because int might match the return type of a gcc2
7541 builtin and then its argument prototype would still apply. */
7542 char openpty (void);
7543 int
7544 main (void)
7545 {
7546 openpty ();
7547 ;
7548 return 0;
7549 }
7550 _ACEOF
7551 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7552 if { (eval echo "$as_me:7552: \"$ac_link\"") >&5
7553 (eval $ac_link) 2>&5
7554 ac_status=$?
7555 echo "$as_me:7555: \$? = $ac_status" >&5
7556 (exit "$ac_status"); } &&
7557 { ac_try='test -s "conftest$ac_exeext"'
7558 { (eval echo "$as_me:7558: \"$ac_try\"") >&5
7559 (eval $ac_try) 2>&5
7560 ac_status=$?
7561 echo "$as_me:7561: \$? = $ac_status" >&5
7562 (exit "$ac_status"); }; }; then
7563 ac_cv_lib_util_openpty=yes
7564 else
7565 echo "$as_me: failed program was:" >&5
7566 cat "conftest.$ac_ext" >&5
7567 ac_cv_lib_util_openpty=no
7568 fi
7569 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7570 LIBS=$ac_check_lib_save_LIBS
7571 fi
7572 echo "$as_me:7572: result: $ac_cv_lib_util_openpty" >&5
7573 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
7574 if test "$ac_cv_lib_util_openpty" = yes; then
7575 cf_have_openpty=yes
7576 else
7577 cf_have_openpty=no
7578 fi
7579
7580 if test "$cf_have_openpty" = yes ; then
7581 ac_cv_func_grantpt=no
7582 LIBS="-lutil $LIBS"
7583
7584 cat >>confdefs.h <<\EOF
7585 #define HAVE_OPENPTY 1
7586 EOF
7587
7588 for ac_header in \
7589 util.h \
7590 libutil.h \
7591 pty.h \
7592
7593 do
7594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7595 echo "$as_me:7595: checking for $ac_header" >&5
7596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7598 echo $ECHO_N "(cached) $ECHO_C" >&6
7599 else
7600 cat >"conftest.$ac_ext" <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603 #include <$ac_header>
7604 _ACEOF
7605 if { (eval echo "$as_me:7605: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7606 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7607 ac_status=$?
7608 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7609 rm -f conftest.er1
7610 cat conftest.err >&5
7611 echo "$as_me:7611: \$? = $ac_status" >&5
7612 (exit "$ac_status"); } >/dev/null; then
7613 if test -s conftest.err; then
7614 ac_cpp_err=$ac_c_preproc_warn_flag
7615 else
7616 ac_cpp_err=
7617 fi
7618 else
7619 ac_cpp_err=yes
7620 fi
7621 if test -z "$ac_cpp_err"; then
7622 eval "$as_ac_Header=yes"
7623 else
7624 echo "$as_me: failed program was:" >&5
7625 cat "conftest.$ac_ext" >&5
7626 eval "$as_ac_Header=no"
7627 fi
7628 rm -f conftest.err "conftest.$ac_ext"
7629 fi
7630 echo "$as_me:7630: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7631 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7632 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7633 cat >>confdefs.h <<EOF
7634 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7635 EOF
7636
7637 fi
7638 done
7639
7640 fi
7641 fi
7642
7643 if test "x$ac_cv_func_grantpt" != xno
7644 then
7645 test -n "$verbose" && echo " will rely upon grantpt" 1>&6
7646
7647 echo "${as_me:-configure}:7647: testing will rely upon grantpt ..." 1>&5
7648
7649 cat >>confdefs.h <<\EOF
7650 #define HAVE_WORKING_GRANTPT 1
7651 EOF
7652
7653 for cf_feature in $cf_grantpt_opts
7654 do
7655 cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
7656
7657 cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7658
7659 cat >>confdefs.h <<EOF
7660 #define HAVE_GRANTPT_$cf_FEATURE 1
7661 EOF
7662
7663 done
7664 elif test "x$cf_have_openpty" = xno
7665 then
7666 test -n "$verbose" && echo " will rely upon BSD-pseudoterminals" 1>&6
7667
7668 echo "${as_me:-configure}:7668: testing will rely upon BSD-pseudoterminals ..." 1>&5
7669
7670 else
7671 test -n "$verbose" && echo " will rely upon openpty" 1>&6
7672
7673 echo "${as_me:-configure}:7673: testing will rely upon openpty ..." 1>&5
7674
7675 fi
7676
7677 tty >/dev/null 2>&1 || {
7678 for ac_func in posix_openpt
7679 do
7680 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7681 echo "$as_me:7681: checking for $ac_func" >&5
7682 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7683 if eval "test \"\${$as_ac_var+set}\" = set"; then
7684 echo $ECHO_N "(cached) $ECHO_C" >&6
7685 else
7686 cat >"conftest.$ac_ext" <<_ACEOF
7687 #line 7687 "configure"
7688 #include "confdefs.h"
7689 #define $ac_func autoconf_temporary
7690 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7691 #undef $ac_func
7692
7693 #ifdef __cplusplus
7694 extern "C"
7695 #endif
7696
7697 /* We use char because int might match the return type of a gcc2
7698 builtin and then its argument prototype would still apply. */
7699 char $ac_func (void);
7700
7701 int
7702 main (void)
7703 {
7704
7705 /* The GNU C library defines stubs for functions which it implements
7706 to always fail with ENOSYS. Some functions are actually named
7707 something starting with __ and the normal name is an alias. */
7708 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7709 #error found stub for $ac_func
7710 #endif
7711
7712 return $ac_func ();
7713 ;
7714 return 0;
7715 }
7716 _ACEOF
7717 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7718 if { (eval echo "$as_me:7718: \"$ac_link\"") >&5
7719 (eval $ac_link) 2>&5
7720 ac_status=$?
7721 echo "$as_me:7721: \$? = $ac_status" >&5
7722 (exit "$ac_status"); } &&
7723 { ac_try='test -s "conftest$ac_exeext"'
7724 { (eval echo "$as_me:7724: \"$ac_try\"") >&5
7725 (eval $ac_try) 2>&5
7726 ac_status=$?
7727 echo "$as_me:7727: \$? = $ac_status" >&5
7728 (exit "$ac_status"); }; }; then
7729 eval "$as_ac_var=yes"
7730 else
7731 echo "$as_me: failed program was:" >&5
7732 cat "conftest.$ac_ext" >&5
7733 eval "$as_ac_var=no"
7734 fi
7735 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7736 fi
7737 echo "$as_me:7737: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7738 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7739 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7740 cat >>confdefs.h <<EOF
7741 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7742 EOF
7743
7744 fi
7745 done
7746 }
7747 echo "$as_me:7747: checking if poll really works" >&5
7748 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
7749 if test "${cf_cv_working_poll+set}" = set; then
7750 echo $ECHO_N "(cached) $ECHO_C" >&6
7751 else
7752
7753 if test "$cross_compiling" = yes; then
7754 cf_cv_working_poll=unknown
7755 else
7756 cat >"conftest.$ac_ext" <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759
7760 $ac_includes_default
7761
7762 #include <fcntl.h>
7763
7764 #ifdef HAVE_POLL_H
7765 #include <poll.h>
7766 #else
7767 #include <sys/poll.h>
7768 #endif
7769
7770 int main(void) {
7771 struct pollfd myfds;
7772 int ret;
7773
7774 /* check for Darwin bug with respect to "devices" */
7775 myfds.fd = open("/dev/null", 1); /* O_WRONLY */
7776 if (myfds.fd < 0)
7777 myfds.fd = 0;
7778 myfds.events = POLLIN;
7779 myfds.revents = 0;
7780
7781 ret = poll(&myfds, 1, 100);
7782
7783 if (ret < 0 || (myfds.revents & POLLNVAL)) {
7784 ret = -1;
7785 } else {
7786 int fd = 0;
7787 if (!isatty(fd)) {
7788 fd = open("/dev/tty", 2); /* O_RDWR */
7789 }
7790 #ifdef HAVE_POSIX_OPENPT
7791 if (fd < 0) {
7792 fd = posix_openpt(O_RDWR);
7793 }
7794 #endif
7795
7796 if (fd >= 0) {
7797 /* also check with standard input */
7798 myfds.fd = fd;
7799 myfds.events = POLLIN;
7800 myfds.revents = 0;
7801 ret = poll(&myfds, 1, 100);
7802 } else {
7803 ret = -1;
7804 }
7805 }
7806 ${cf_cv_main_return:-return}(ret < 0);
7807 }
7808 _ACEOF
7809 rm -f "conftest$ac_exeext"
7810 if { (eval echo "$as_me:7810: \"$ac_link\"") >&5
7811 (eval $ac_link) 2>&5
7812 ac_status=$?
7813 echo "$as_me:7813: \$? = $ac_status" >&5
7814 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7815 { (eval echo "$as_me:7815: \"$ac_try\"") >&5
7816 (eval $ac_try) 2>&5
7817 ac_status=$?
7818 echo "$as_me:7818: \$? = $ac_status" >&5
7819 (exit "$ac_status"); }; }; then
7820 cf_cv_working_poll=yes
7821 else
7822 echo "$as_me: program exited with status $ac_status" >&5
7823 echo "$as_me: failed program was:" >&5
7824 cat "conftest.$ac_ext" >&5
7825 cf_cv_working_poll=no
7826 fi
7827 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7828 fi
7829 fi
7830 echo "$as_me:7830: result: $cf_cv_working_poll" >&5
7831 echo "${ECHO_T}$cf_cv_working_poll" >&6
7832 test "$cf_cv_working_poll" = "yes" &&
7833 cat >>confdefs.h <<\EOF
7834 #define HAVE_WORKING_POLL 1
7835 EOF
7836
7837 echo "$as_me:7837: checking if you want to use fontenc" >&5
7838 echo $ECHO_N "checking if you want to use fontenc... $ECHO_C" >&6
7839
7840 # Check whether --enable-fontenc or --disable-fontenc was given.
7841 if test "${enable_fontenc+set}" = set; then
7842 enableval="$enable_fontenc"
7843 test "$enableval" != yes && enableval=no
7844 if test "$enableval" != "no" ; then
7845 with_fontenc=yes
7846 else
7847 with_fontenc=maybe
7848 fi
7849 else
7850 enableval=no
7851 with_fontenc=maybe
7852
7853 fi;
7854 echo "$as_me:7854: result: $with_fontenc" >&5
7855 echo "${ECHO_T}$with_fontenc" >&6
7856
7857 echo "$as_me:7857: checking if you want to use iconv" >&5
7858 echo $ECHO_N "checking if you want to use iconv... $ECHO_C" >&6
7859
7860 # Check whether --enable-iconv or --disable-iconv was given.
7861 if test "${enable_iconv+set}" = set; then
7862 enableval="$enable_iconv"
7863 test "$enableval" != no && enableval=yes
7864 if test "$enableval" != "yes" ; then
7865 with_iconv=no
7866 else
7867 with_iconv=maybe
7868 fi
7869 else
7870 enableval=yes
7871 with_iconv=maybe
7872
7873 fi;
7874 echo "$as_me:7874: result: $with_iconv" >&5
7875 echo "${ECHO_T}$with_iconv" >&6
7876
7877 case $with_iconv in
7878 yes)
7879 case $with_fontenc in
7880 yes)
7881 with_fontenc=no
7882 { echo "$as_me:7882: WARNING: overriding deprecated fontenc" >&5
7883 echo "$as_me: WARNING: overriding deprecated fontenc" >&2;}
7884 ;;
7885 maybe|no)
7886 with_fontenc=no
7887 { echo "$as_me:7887: using iconv" >&5
7888 echo "$as_me: using iconv" >&6;}
7889 ;;
7890 esac
7891 ;;
7892 no)
7893 case $with_fontenc in
7894 yes)
7895 ;;
7896 no)
7897 { { echo "$as_me:7897: error: you must choose between iconv and fontenc" >&5
7898 echo "$as_me: error: you must choose between iconv and fontenc" >&2;}
7899 { (exit 1); exit 1; }; }
7900 ;;
7901 maybe)
7902 with_fontenc=yes
7903 { echo "$as_me:7903: using fontenc" >&5
7904 echo "$as_me: using fontenc" >&6;}
7905 ;;
7906 esac
7907 ;;
7908 maybe)
7909 case $with_fontenc in
7910 yes)
7911 with_iconv=no
7912 { echo "$as_me:7912: using fontenc" >&5
7913 echo "$as_me: using fontenc" >&6;}
7914 ;;
7915 no|maybe)
7916 with_iconv=yes
7917 with_fontenc=no
7918 { echo "$as_me:7918: using iconv" >&5
7919 echo "$as_me: using iconv" >&6;}
7920 ;;
7921 esac
7922 ;;
7923 esac
7924
7925 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7926 # will be set on completion of the AC_TRY_LINK below.
7927 cf_cv_header_path_z=
7928 cf_cv_library_path_z=
7929
7930 echo "${as_me:-configure}:7930: testing Starting FIND_LINKAGE(z,zlib) ..." 1>&5
7931
7932 cf_save_LIBS="$LIBS"
7933
7934 cat >"conftest.$ac_ext" <<_ACEOF
7935 #line 7935 "configure"
7936 #include "confdefs.h"
7937
7938 #include <zlib.h>
7939
7940 int
7941 main (void)
7942 {
7943
7944 gzopen("name","mode")
7945
7946 ;
7947 return 0;
7948 }
7949 _ACEOF
7950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7951 if { (eval echo "$as_me:7951: \"$ac_link\"") >&5
7952 (eval $ac_link) 2>&5
7953 ac_status=$?
7954 echo "$as_me:7954: \$? = $ac_status" >&5
7955 (exit "$ac_status"); } &&
7956 { ac_try='test -s "conftest$ac_exeext"'
7957 { (eval echo "$as_me:7957: \"$ac_try\"") >&5
7958 (eval $ac_try) 2>&5
7959 ac_status=$?
7960 echo "$as_me:7960: \$? = $ac_status" >&5
7961 (exit "$ac_status"); }; }; then
7962
7963 cf_cv_find_linkage_z=yes
7964 cf_cv_header_path_z=/usr/include
7965 cf_cv_library_path_z=/usr/lib
7966
7967 else
7968 echo "$as_me: failed program was:" >&5
7969 cat "conftest.$ac_ext" >&5
7970
7971 LIBS="-lz $cf_save_LIBS"
7972
7973 cat >"conftest.$ac_ext" <<_ACEOF
7974 #line 7974 "configure"
7975 #include "confdefs.h"
7976
7977 #include <zlib.h>
7978
7979 int
7980 main (void)
7981 {
7982
7983 gzopen("name","mode")
7984
7985 ;
7986 return 0;
7987 }
7988 _ACEOF
7989 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7990 if { (eval echo "$as_me:7990: \"$ac_link\"") >&5
7991 (eval $ac_link) 2>&5
7992 ac_status=$?
7993 echo "$as_me:7993: \$? = $ac_status" >&5
7994 (exit "$ac_status"); } &&
7995 { ac_try='test -s "conftest$ac_exeext"'
7996 { (eval echo "$as_me:7996: \"$ac_try\"") >&5
7997 (eval $ac_try) 2>&5
7998 ac_status=$?
7999 echo "$as_me:7999: \$? = $ac_status" >&5
8000 (exit "$ac_status"); }; }; then
8001
8002 cf_cv_find_linkage_z=yes
8003 cf_cv_header_path_z=/usr/include
8004 cf_cv_library_path_z=/usr/lib
8005 cf_cv_library_file_z="-lz"
8006
8007 else
8008 echo "$as_me: failed program was:" >&5
8009 cat "conftest.$ac_ext" >&5
8010
8011 cf_cv_find_linkage_z=no
8012 LIBS="$cf_save_LIBS"
8013
8014 test -n "$verbose" && echo " find linkage for z library" 1>&6
8015
8016 echo "${as_me:-configure}:8016: testing find linkage for z library ..." 1>&5
8017
8018 echo "${as_me:-configure}:8018: testing Searching for headers in FIND_LINKAGE(z,zlib) ..." 1>&5
8019
8020 cf_save_CPPFLAGS="$CPPFLAGS"
8021 cf_test_CPPFLAGS="$CPPFLAGS"
8022
8023 cf_search=
8024
8025 # collect the current set of include-directories from compiler flags
8026 cf_header_path_list=""
8027 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8028 for cf_header_path in $CPPFLAGS $CFLAGS
8029 do
8030 case "$cf_header_path" in
8031 (-I*)
8032 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8033
8034 test "x$cf_header_path" != "xNONE" && \
8035 test -d "$cf_header_path" && \
8036 {
8037 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8038 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8039 test -d "$cf_header_path/include/zlib" && cf_search="$cf_search $cf_header_path/include/zlib"
8040 test -d "$cf_header_path/include/zlib/include" && cf_search="$cf_search $cf_header_path/include/zlib/include"
8041 test -d "$cf_header_path/zlib/include" && cf_search="$cf_search $cf_header_path/zlib/include"
8042 test -d "$cf_header_path/zlib/include/zlib" && cf_search="$cf_search $cf_header_path/zlib/include/zlib"
8043 }
8044
8045 cf_header_path_list="$cf_header_path_list $cf_search"
8046 ;;
8047 esac
8048 done
8049 fi
8050
8051 # add the variations for the package we are looking for
8052
8053 cf_search=
8054
8055 test "x$prefix" != "xNONE" && \
8056 test -d "$prefix" && \
8057 {
8058 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8059 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8060 test -d "$prefix/include/zlib" && cf_search="$cf_search $prefix/include/zlib"
8061 test -d "$prefix/include/zlib/include" && cf_search="$cf_search $prefix/include/zlib/include"
8062 test -d "$prefix/zlib/include" && cf_search="$cf_search $prefix/zlib/include"
8063 test -d "$prefix/zlib/include/zlib" && cf_search="$cf_search $prefix/zlib/include/zlib"
8064 }
8065
8066 for cf_subdir_prefix in \
8067 /usr \
8068 /usr/local \
8069 /usr/pkg \
8070 /opt \
8071 /opt/local \
8072 $HOME
8073 do
8074
8075 test "x$cf_subdir_prefix" != "x$prefix" && \
8076 test -d "$cf_subdir_prefix" && \
8077 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8078 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8079 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8080 test -d "$cf_subdir_prefix/include/zlib" && cf_search="$cf_search $cf_subdir_prefix/include/zlib"
8081 test -d "$cf_subdir_prefix/include/zlib/include" && cf_search="$cf_search $cf_subdir_prefix/include/zlib/include"
8082 test -d "$cf_subdir_prefix/zlib/include" && cf_search="$cf_search $cf_subdir_prefix/zlib/include"
8083 test -d "$cf_subdir_prefix/zlib/include/zlib" && cf_search="$cf_search $cf_subdir_prefix/zlib/include/zlib"
8084 }
8085
8086 done
8087
8088 test "$includedir" != NONE && \
8089 test "$includedir" != "/usr/include" && \
8090 test -d "$includedir" && {
8091 test -d "$includedir" && cf_search="$cf_search $includedir"
8092 test -d "$includedir/zlib" && cf_search="$cf_search $includedir/zlib"
8093 }
8094
8095 test "$oldincludedir" != NONE && \
8096 test "$oldincludedir" != "/usr/include" && \
8097 test -d "$oldincludedir" && {
8098 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8099 test -d "$oldincludedir/zlib" && cf_search="$cf_search $oldincludedir/zlib"
8100 }
8101
8102 cf_search="$cf_search $cf_header_path_list"
8103
8104 for cf_cv_header_path_z in $cf_search
8105 do
8106 if test -d "$cf_cv_header_path_z" ; then
8107 test -n "$verbose" && echo " ... testing $cf_cv_header_path_z" 1>&6
8108
8109 echo "${as_me:-configure}:8109: testing ... testing $cf_cv_header_path_z ..." 1>&5
8110
8111 CPPFLAGS="$cf_save_CPPFLAGS"
8112
8113 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8114 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_z"
8115
8116 cat >"conftest.$ac_ext" <<_ACEOF
8117 #line 8117 "configure"
8118 #include "confdefs.h"
8119
8120 #include <zlib.h>
8121
8122 int
8123 main (void)
8124 {
8125
8126 gzopen("name","mode")
8127
8128 ;
8129 return 0;
8130 }
8131 _ACEOF
8132 rm -f "conftest.$ac_objext"
8133 if { (eval echo "$as_me:8133: \"$ac_compile\"") >&5
8134 (eval $ac_compile) 2>&5
8135 ac_status=$?
8136 echo "$as_me:8136: \$? = $ac_status" >&5
8137 (exit "$ac_status"); } &&
8138 { ac_try='test -s "conftest.$ac_objext"'
8139 { (eval echo "$as_me:8139: \"$ac_try\"") >&5
8140 (eval $ac_try) 2>&5
8141 ac_status=$?
8142 echo "$as_me:8142: \$? = $ac_status" >&5
8143 (exit "$ac_status"); }; }; then
8144
8145 test -n "$verbose" && echo " ... found z headers in $cf_cv_header_path_z" 1>&6
8146
8147 echo "${as_me:-configure}:8147: testing ... found z headers in $cf_cv_header_path_z ..." 1>&5
8148
8149 cf_cv_find_linkage_z=maybe
8150 cf_test_CPPFLAGS="$CPPFLAGS"
8151 break
8152 else
8153 echo "$as_me: failed program was:" >&5
8154 cat "conftest.$ac_ext" >&5
8155
8156 CPPFLAGS="$cf_save_CPPFLAGS"
8157
8158 fi
8159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8160 fi
8161 done
8162
8163 if test "$cf_cv_find_linkage_z" = maybe ; then
8164
8165 echo "${as_me:-configure}:8165: testing Searching for z library in FIND_LINKAGE(z,zlib) ..." 1>&5
8166
8167 cf_save_LIBS="$LIBS"
8168 cf_save_LDFLAGS="$LDFLAGS"
8169
8170 CPPFLAGS="$cf_test_CPPFLAGS"
8171 LIBS="-lz $cf_save_LIBS"
8172 cat >"conftest.$ac_ext" <<_ACEOF
8173 #line 8173 "configure"
8174 #include "confdefs.h"
8175
8176 #include <zlib.h>
8177
8178 int
8179 main (void)
8180 {
8181
8182 gzopen("name","mode")
8183
8184 ;
8185 return 0;
8186 }
8187 _ACEOF
8188 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8189 if { (eval echo "$as_me:8189: \"$ac_link\"") >&5
8190 (eval $ac_link) 2>&5
8191 ac_status=$?
8192 echo "$as_me:8192: \$? = $ac_status" >&5
8193 (exit "$ac_status"); } &&
8194 { ac_try='test -s "conftest$ac_exeext"'
8195 { (eval echo "$as_me:8195: \"$ac_try\"") >&5
8196 (eval $ac_try) 2>&5
8197 ac_status=$?
8198 echo "$as_me:8198: \$? = $ac_status" >&5
8199 (exit "$ac_status"); }; }; then
8200
8201 test -n "$verbose" && echo " ... found z library in system" 1>&6
8202
8203 echo "${as_me:-configure}:8203: testing ... found z library in system ..." 1>&5
8204
8205 cf_cv_find_linkage_z=yes
8206 else
8207 echo "$as_me: failed program was:" >&5
8208 cat "conftest.$ac_ext" >&5
8209 fi
8210 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8211 CPPFLAGS="$cf_save_CPPFLAGS"
8212 LIBS="$cf_save_LIBS"
8213
8214 if test "$cf_cv_find_linkage_z" != yes ; then
8215
8216 cf_search=
8217 cf_library_path_list=""
8218 if test -n "${LDFLAGS}${LIBS}" ; then
8219 for cf_library_path in $LDFLAGS $LIBS
8220 do
8221 case "$cf_library_path" in
8222 (-L*)
8223 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8224
8225 test "x$cf_library_path" != "xNONE" && \
8226 test -d "$cf_library_path" && \
8227 {
8228 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8229 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8230 test -d "$cf_library_path/lib/z" && cf_search="$cf_search $cf_library_path/lib/z"
8231 test -d "$cf_library_path/lib/z/lib" && cf_search="$cf_search $cf_library_path/lib/z/lib"
8232 test -d "$cf_library_path/z/lib" && cf_search="$cf_search $cf_library_path/z/lib"
8233 test -d "$cf_library_path/z/lib/z" && cf_search="$cf_search $cf_library_path/z/lib/z"
8234 }
8235
8236 cf_library_path_list="$cf_library_path_list $cf_search"
8237 ;;
8238 esac
8239 done
8240 fi
8241
8242 cf_search=
8243
8244 test "x$prefix" != "xNONE" && \
8245 test -d "$prefix" && \
8246 {
8247 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8248 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
8249 test -d "$prefix/lib/z" && cf_search="$cf_search $prefix/lib/z"
8250 test -d "$prefix/lib/z/lib" && cf_search="$cf_search $prefix/lib/z/lib"
8251 test -d "$prefix/z/lib" && cf_search="$cf_search $prefix/z/lib"
8252 test -d "$prefix/z/lib/z" && cf_search="$cf_search $prefix/z/lib/z"
8253 }
8254
8255 for cf_subdir_prefix in \
8256 /usr \
8257 /usr/local \
8258 /usr/pkg \
8259 /opt \
8260 /opt/local \
8261 $HOME
8262 do
8263
8264 test "x$cf_subdir_prefix" != "x$prefix" && \
8265 test -d "$cf_subdir_prefix" && \
8266 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8267 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8268 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
8269 test -d "$cf_subdir_prefix/lib/z" && cf_search="$cf_search $cf_subdir_prefix/lib/z"
8270 test -d "$cf_subdir_prefix/lib/z/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/z/lib"
8271 test -d "$cf_subdir_prefix/z/lib" && cf_search="$cf_search $cf_subdir_prefix/z/lib"
8272 test -d "$cf_subdir_prefix/z/lib/z" && cf_search="$cf_search $cf_subdir_prefix/z/lib/z"
8273 }
8274
8275 done
8276
8277 cf_search="$cf_library_path_list $cf_search"
8278
8279 for cf_cv_library_path_z in $cf_search
8280 do
8281 if test -d "$cf_cv_library_path_z" ; then
8282 test -n "$verbose" && echo " ... testing $cf_cv_library_path_z" 1>&6
8283
8284 echo "${as_me:-configure}:8284: testing ... testing $cf_cv_library_path_z ..." 1>&5
8285
8286 CPPFLAGS="$cf_test_CPPFLAGS"
8287 LIBS="-lz $cf_save_LIBS"
8288 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_z"
8289 cat >"conftest.$ac_ext" <<_ACEOF
8290 #line 8290 "configure"
8291 #include "confdefs.h"
8292
8293 #include <zlib.h>
8294
8295 int
8296 main (void)
8297 {
8298
8299 gzopen("name","mode")
8300
8301 ;
8302 return 0;
8303 }
8304 _ACEOF
8305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8306 if { (eval echo "$as_me:8306: \"$ac_link\"") >&5
8307 (eval $ac_link) 2>&5
8308 ac_status=$?
8309 echo "$as_me:8309: \$? = $ac_status" >&5
8310 (exit "$ac_status"); } &&
8311 { ac_try='test -s "conftest$ac_exeext"'
8312 { (eval echo "$as_me:8312: \"$ac_try\"") >&5
8313 (eval $ac_try) 2>&5
8314 ac_status=$?
8315 echo "$as_me:8315: \$? = $ac_status" >&5
8316 (exit "$ac_status"); }; }; then
8317
8318 test -n "$verbose" && echo " ... found z library in $cf_cv_library_path_z" 1>&6
8319
8320 echo "${as_me:-configure}:8320: testing ... found z library in $cf_cv_library_path_z ..." 1>&5
8321
8322 cf_cv_find_linkage_z=yes
8323 cf_cv_library_file_z="-lz"
8324 break
8325 else
8326 echo "$as_me: failed program was:" >&5
8327 cat "conftest.$ac_ext" >&5
8328
8329 CPPFLAGS="$cf_save_CPPFLAGS"
8330 LIBS="$cf_save_LIBS"
8331 LDFLAGS="$cf_save_LDFLAGS"
8332
8333 fi
8334 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8335 fi
8336 done
8337 CPPFLAGS="$cf_save_CPPFLAGS"
8338 LDFLAGS="$cf_save_LDFLAGS"
8339 fi
8340
8341 else
8342 cf_cv_find_linkage_z=no
8343 fi
8344
8345 fi
8346 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8347
8348 fi
8349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8350
8351 LIBS="$cf_save_LIBS"
8352
8353 if test "$cf_cv_find_linkage_z" = yes ; then
8354
8355 if test -n "$cf_cv_header_path_z" ; then
8356 for cf_add_incdir in $cf_cv_header_path_z
8357 do
8358 while test "$cf_add_incdir" != /usr/include
8359 do
8360 if test -d "$cf_add_incdir"
8361 then
8362 cf_have_incdir=no
8363 if test -n "$CFLAGS$CPPFLAGS" ; then
8364 # a loop is needed to ensure we can add subdirs of existing dirs
8365 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8366 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8367 cf_have_incdir=yes; break
8368 fi
8369 done
8370 fi
8371
8372 if test "$cf_have_incdir" = no ; then
8373 if test "$cf_add_incdir" = /usr/local/include ; then
8374 if test "$GCC" = yes
8375 then
8376 cf_save_CPPFLAGS=$CPPFLAGS
8377
8378 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8379 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8380
8381 cat >"conftest.$ac_ext" <<_ACEOF
8382 #line 8382 "configure"
8383 #include "confdefs.h"
8384 #include <stdio.h>
8385 int
8386 main (void)
8387 {
8388 printf("Hello")
8389 ;
8390 return 0;
8391 }
8392 _ACEOF
8393 rm -f "conftest.$ac_objext"
8394 if { (eval echo "$as_me:8394: \"$ac_compile\"") >&5
8395 (eval $ac_compile) 2>&5
8396 ac_status=$?
8397 echo "$as_me:8397: \$? = $ac_status" >&5
8398 (exit "$ac_status"); } &&
8399 { ac_try='test -s "conftest.$ac_objext"'
8400 { (eval echo "$as_me:8400: \"$ac_try\"") >&5
8401 (eval $ac_try) 2>&5
8402 ac_status=$?
8403 echo "$as_me:8403: \$? = $ac_status" >&5
8404 (exit "$ac_status"); }; }; then
8405 :
8406 else
8407 echo "$as_me: failed program was:" >&5
8408 cat "conftest.$ac_ext" >&5
8409 cf_have_incdir=yes
8410 fi
8411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8412 CPPFLAGS=$cf_save_CPPFLAGS
8413 fi
8414 fi
8415 fi
8416
8417 if test "$cf_have_incdir" = no ; then
8418 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8419
8420 echo "${as_me:-configure}:8420: testing adding $cf_add_incdir to include-path ..." 1>&5
8421
8422 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8423
8424 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8425 test "$cf_top_incdir" = "$cf_add_incdir" && break
8426 cf_add_incdir="$cf_top_incdir"
8427 else
8428 break
8429 fi
8430 else
8431 break
8432 fi
8433 done
8434 done
8435 fi
8436
8437 if test -n "$cf_cv_library_path_z" ; then
8438 for cf_add_libdir in $cf_cv_library_path_z
8439 do
8440 if test "$cf_add_libdir" = /usr/lib ; then
8441 :
8442 elif test -d "$cf_add_libdir"
8443 then
8444 cf_have_libdir=no
8445 if test -n "$LDFLAGS$LIBS" ; then
8446 # a loop is needed to ensure we can add subdirs of existing dirs
8447 for cf_test_libdir in $LDFLAGS $LIBS ; do
8448 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8449 cf_have_libdir=yes; break
8450 fi
8451 done
8452 fi
8453 if test "$cf_have_libdir" = no ; then
8454 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8455
8456 echo "${as_me:-configure}:8456: testing adding $cf_add_libdir to library-path ..." 1>&5
8457
8458 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8459 fi
8460 fi
8461 done
8462 fi
8463
8464 cf_add_libs="$LIBS"
8465 # reverse order
8466 cf_add_0lib=
8467 for cf_add_1lib in -lz; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8468 # filter duplicates
8469 for cf_add_1lib in $cf_add_0lib; do
8470 for cf_add_2lib in $cf_add_libs; do
8471 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8472 cf_add_1lib=
8473 break
8474 fi
8475 done
8476 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8477 done
8478 LIBS="$cf_add_libs"
8479
8480 else
8481 { echo "$as_me:8481: WARNING: Cannot find z library" >&5
8482 echo "$as_me: WARNING: Cannot find z library" >&2;}
8483 fi
8484
8485 for ac_func in \
8486 zError \
8487
8488 do
8489 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8490 echo "$as_me:8490: checking for $ac_func" >&5
8491 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8492 if eval "test \"\${$as_ac_var+set}\" = set"; then
8493 echo $ECHO_N "(cached) $ECHO_C" >&6
8494 else
8495 cat >"conftest.$ac_ext" <<_ACEOF
8496 #line 8496 "configure"
8497 #include "confdefs.h"
8498 #define $ac_func autoconf_temporary
8499 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8500 #undef $ac_func
8501
8502 #ifdef __cplusplus
8503 extern "C"
8504 #endif
8505
8506 /* We use char because int might match the return type of a gcc2
8507 builtin and then its argument prototype would still apply. */
8508 char $ac_func (void);
8509
8510 int
8511 main (void)
8512 {
8513
8514 /* The GNU C library defines stubs for functions which it implements
8515 to always fail with ENOSYS. Some functions are actually named
8516 something starting with __ and the normal name is an alias. */
8517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8518 #error found stub for $ac_func
8519 #endif
8520
8521 return $ac_func ();
8522 ;
8523 return 0;
8524 }
8525 _ACEOF
8526 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8527 if { (eval echo "$as_me:8527: \"$ac_link\"") >&5
8528 (eval $ac_link) 2>&5
8529 ac_status=$?
8530 echo "$as_me:8530: \$? = $ac_status" >&5
8531 (exit "$ac_status"); } &&
8532 { ac_try='test -s "conftest$ac_exeext"'
8533 { (eval echo "$as_me:8533: \"$ac_try\"") >&5
8534 (eval $ac_try) 2>&5
8535 ac_status=$?
8536 echo "$as_me:8536: \$? = $ac_status" >&5
8537 (exit "$ac_status"); }; }; then
8538 eval "$as_ac_var=yes"
8539 else
8540 echo "$as_me: failed program was:" >&5
8541 cat "conftest.$ac_ext" >&5
8542 eval "$as_ac_var=no"
8543 fi
8544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8545 fi
8546 echo "$as_me:8546: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8547 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8548 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8549 cat >>confdefs.h <<EOF
8550 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8551 EOF
8552
8553 fi
8554 done
8555
8556 if test "x$ac_cv_func_zError" = xyes
8557 then
8558
8559 cat >>confdefs.h <<\EOF
8560 #define USE_ZLIB 1
8561 EOF
8562
8563 fi
8564
8565 if test "$with_fontenc" = yes
8566 then
8567
8568 echo "$as_me:8568: checking if you want to use pkg-config" >&5
8569 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
8570
8571 # Check whether --with-pkg-config or --without-pkg-config was given.
8572 if test "${with_pkg_config+set}" = set; then
8573 withval="$with_pkg_config"
8574 cf_pkg_config=$withval
8575 else
8576 cf_pkg_config=yes
8577 fi;
8578 echo "$as_me:8578: result: $cf_pkg_config" >&5
8579 echo "${ECHO_T}$cf_pkg_config" >&6
8580
8581 case "$cf_pkg_config" in
8582 (no)
8583 PKG_CONFIG=none
8584 ;;
8585 (yes)
8586
8587 if test -n "$ac_tool_prefix"; then
8588 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8589 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8590 echo "$as_me:8590: checking for $ac_word" >&5
8591 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8592 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8593 echo $ECHO_N "(cached) $ECHO_C" >&6
8594 else
8595 case $PKG_CONFIG in
8596 [\\/]* | ?:[\\/]*)
8597 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8598 ;;
8599 *)
8600 ac_save_IFS=$IFS; IFS=$ac_path_separator
8601 ac_dummy="$PATH"
8602 for ac_dir in $ac_dummy; do
8603 IFS=$ac_save_IFS
8604 test -z "$ac_dir" && ac_dir=.
8605 if $as_executable_p "$ac_dir/$ac_word"; then
8606 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
8607 echo "$as_me:8607: found $ac_dir/$ac_word" >&5
8608 break
8609 fi
8610 done
8611
8612 ;;
8613 esac
8614 fi
8615 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8616
8617 if test -n "$PKG_CONFIG"; then
8618 echo "$as_me:8618: result: $PKG_CONFIG" >&5
8619 echo "${ECHO_T}$PKG_CONFIG" >&6
8620 else
8621 echo "$as_me:8621: result: no" >&5
8622 echo "${ECHO_T}no" >&6
8623 fi
8624
8625 fi
8626 if test -z "$ac_cv_path_PKG_CONFIG"; then
8627 ac_pt_PKG_CONFIG=$PKG_CONFIG
8628 # Extract the first word of "pkg-config", so it can be a program name with args.
8629 set dummy pkg-config; ac_word=$2
8630 echo "$as_me:8630: checking for $ac_word" >&5
8631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8632 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
8633 echo $ECHO_N "(cached) $ECHO_C" >&6
8634 else
8635 case $ac_pt_PKG_CONFIG in
8636 [\\/]* | ?:[\\/]*)
8637 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8638 ;;
8639 *)
8640 ac_save_IFS=$IFS; IFS=$ac_path_separator
8641 ac_dummy="$PATH"
8642 for ac_dir in $ac_dummy; do
8643 IFS=$ac_save_IFS
8644 test -z "$ac_dir" && ac_dir=.
8645 if $as_executable_p "$ac_dir/$ac_word"; then
8646 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
8647 echo "$as_me:8647: found $ac_dir/$ac_word" >&5
8648 break
8649 fi
8650 done
8651
8652 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
8653 ;;
8654 esac
8655 fi
8656 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8657
8658 if test -n "$ac_pt_PKG_CONFIG"; then
8659 echo "$as_me:8659: result: $ac_pt_PKG_CONFIG" >&5
8660 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
8661 else
8662 echo "$as_me:8662: result: no" >&5
8663 echo "${ECHO_T}no" >&6
8664 fi
8665
8666 PKG_CONFIG=$ac_pt_PKG_CONFIG
8667 else
8668 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8669 fi
8670
8671 ;;
8672 (*)
8673 PKG_CONFIG=$withval
8674 ;;
8675 esac
8676
8677 test -z "$PKG_CONFIG" && PKG_CONFIG=none
8678 if test "$PKG_CONFIG" != none ; then
8679
8680 if test "x$prefix" != xNONE; then
8681 cf_path_syntax="$prefix"
8682 else
8683 cf_path_syntax="$ac_default_prefix"
8684 fi
8685
8686 case "x$PKG_CONFIG" in
8687 (x\$\(*\)*|x\'*\'*)
8688 ;;
8689 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
8690 ;;
8691 (x\$\{*prefix\}*|x\$\{*dir\}*)
8692 eval PKG_CONFIG="$PKG_CONFIG"
8693 case "x$PKG_CONFIG" in
8694 (xNONE/*)
8695 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
8696 ;;
8697 esac
8698 ;;
8699 (xno|xNONE/*)
8700 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
8701 ;;
8702 (*)
8703 { { echo "$as_me:8703: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
8704 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
8705 { (exit 1); exit 1; }; }
8706 ;;
8707 esac
8708
8709 elif test "x$cf_pkg_config" != xno ; then
8710 { echo "$as_me:8710: WARNING: pkg-config is not installed" >&5
8711 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
8712 fi
8713
8714 cf_extra_fontenc_incs=
8715 cf_extra_fontenc_libs="-lfontenc -lX11"
8716 FONTENC_CONFIG=
8717 FONTENC_PARAMS=
8718
8719 if test "$PKG_CONFIG" != none; then
8720 if "$PKG_CONFIG" --exists fontenc; then
8721 FONTENC_CONFIG=$PKG_CONFIG
8722 FONTENC_PARAMS="fontenc x11"
8723 cf_extra_fontenc_libs=
8724 fi
8725 fi
8726
8727 echo "$as_me:8727: checking for optional font-encoding cflags" >&5
8728 echo $ECHO_N "checking for optional font-encoding cflags... $ECHO_C" >&6
8729
8730 # Check whether --with-fontenc-cflags or --without-fontenc-cflags was given.
8731 if test "${with_fontenc_cflags+set}" = set; then
8732 withval="$with_fontenc_cflags"
8733 cf_x_fontenc_incs="$withval"
8734 else
8735 cf_x_fontenc_incs=auto
8736 fi;
8737 test "$cf_x_fontenc_incs" = yes && cf_x_fontenc_incs=auto
8738 echo "$as_me:8738: result: $cf_x_fontenc_incs" >&5
8739 echo "${ECHO_T}$cf_x_fontenc_incs" >&6
8740
8741 echo "$as_me:8741: checking for optional font-encoding libraries" >&5
8742 echo $ECHO_N "checking for optional font-encoding libraries... $ECHO_C" >&6
8743
8744 # Check whether --with-fontenc-libs or --without-fontenc-libs was given.
8745 if test "${with_fontenc_libs+set}" = set; then
8746 withval="$with_fontenc_libs"
8747 cf_x_fontenc_libs="$withval"
8748 else
8749 cf_x_fontenc_libs=auto
8750 fi;
8751 test "$cf_x_fontenc_libs" = yes && cf_x_fontenc_libs=auto
8752 echo "$as_me:8752: result: $cf_x_fontenc_libs" >&5
8753 echo "${ECHO_T}$cf_x_fontenc_libs" >&6
8754
8755 if test "$cf_x_fontenc_incs" = auto ; then
8756 echo "$as_me:8756: checking for X font-encoding headers" >&5
8757 echo $ECHO_N "checking for X font-encoding headers... $ECHO_C" >&6
8758 if test "${cf_cv_x_fontenc_incs+set}" = set; then
8759 echo $ECHO_N "(cached) $ECHO_C" >&6
8760 else
8761
8762 if test -n "$FONTENC_CONFIG" ; then
8763 cf_cv_x_fontenc_incs="`$FONTENC_CONFIG $FONTENC_PARAMS --cflags 2>/dev/null`"
8764 else
8765 cf_cv_x_fontenc_incs=$cf_extra_fontenc_incs
8766 fi
8767
8768 fi
8769 echo "$as_me:8769: result: $cf_cv_x_fontenc_incs" >&5
8770 echo "${ECHO_T}$cf_cv_x_fontenc_incs" >&6
8771 else
8772 cf_cv_x_fontenc_incs=$cf_x_fontenc_incs
8773 fi
8774
8775 if test "$cf_x_fontenc_libs" = auto ; then
8776 echo "$as_me:8776: checking for X font-encoding libraries" >&5
8777 echo $ECHO_N "checking for X font-encoding libraries... $ECHO_C" >&6
8778 if test "${cf_cv_x_fontenc_libs+set}" = set; then
8779 echo $ECHO_N "(cached) $ECHO_C" >&6
8780 else
8781
8782 if test -n "$FONTENC_CONFIG" ; then
8783 cf_cv_x_fontenc_libs="`$FONTENC_CONFIG $FONTENC_PARAMS --libs 2>/dev/null`"
8784 else
8785 cf_cv_x_fontenc_libs=$cf_extra_fontenc_libs
8786 fi
8787
8788 fi
8789 echo "$as_me:8789: result: $cf_cv_x_fontenc_libs" >&5
8790 echo "${ECHO_T}$cf_cv_x_fontenc_libs" >&6
8791 else
8792 cf_cv_x_fontenc_libs=$cf_x_fontenc_libs
8793 fi
8794
8795 cf_save_LIBS="$LIBS"
8796 cf_save_INCS="$CPPFLAGS"
8797
8798 LIBS="$cf_cv_x_fontenc_libs $LIBS $X_LIBS"
8799 CPPFLAGS="$CPPFLAGS $X_CFLAGS $cf_cv_x_fontenc_incs"
8800
8801 echo "$as_me:8801: checking if we can link with font encoding library" >&5
8802 echo $ECHO_N "checking if we can link with font encoding library... $ECHO_C" >&6
8803 cat >"conftest.$ac_ext" <<_ACEOF
8804 #line 8804 "configure"
8805 #include "confdefs.h"
8806
8807 $ac_includes_default
8808 #include <X11/Xlib.h>
8809 #include <X11/fonts/fontenc.h>
8810 int
8811 main (void)
8812 {
8813
8814 FontMapPtr mapping = FontEncMapFind(0, FONT_ENCODING_UNICODE, -1, -1, NULL);
8815
8816 ;
8817 return 0;
8818 }
8819 _ACEOF
8820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8821 if { (eval echo "$as_me:8821: \"$ac_link\"") >&5
8822 (eval $ac_link) 2>&5
8823 ac_status=$?
8824 echo "$as_me:8824: \$? = $ac_status" >&5
8825 (exit "$ac_status"); } &&
8826 { ac_try='test -s "conftest$ac_exeext"'
8827 { (eval echo "$as_me:8827: \"$ac_try\"") >&5
8828 (eval $ac_try) 2>&5
8829 ac_status=$?
8830 echo "$as_me:8830: \$? = $ac_status" >&5
8831 (exit "$ac_status"); }; }; then
8832 cf_have_fontenc_libs=yes
8833 else
8834 echo "$as_me: failed program was:" >&5
8835 cat "conftest.$ac_ext" >&5
8836 cf_have_fontenc_libs=no
8837 fi
8838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8839 echo "$as_me:8839: result: $cf_have_fontenc_libs" >&5
8840 echo "${ECHO_T}$cf_have_fontenc_libs" >&6
8841
8842 LIBS="$cf_save_LIBS"
8843 CPPFLAGS="$cf_save_INCS"
8844
8845 if test $cf_have_fontenc_libs = yes ; then
8846 LIBS="$cf_cv_x_fontenc_libs $LIBS $X_LIBS"
8847
8848 cf_fix_cppflags=no
8849 cf_new_cflags=
8850 cf_new_cppflags=
8851 cf_new_extra_cppflags=
8852
8853 for cf_add_cflags in $cf_cv_x_fontenc_incs
8854 do
8855 case "$cf_fix_cppflags" in
8856 (no)
8857 case "$cf_add_cflags" in
8858 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8859 case "$cf_add_cflags" in
8860 (-D*)
8861 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8862
8863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8864 && test -z "${cf_tst_cflags}" \
8865 && cf_fix_cppflags=yes
8866
8867 if test "$cf_fix_cppflags" = yes ; then
8868
8869 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8870 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8871
8872 continue
8873 elif test "${cf_tst_cflags}" = "\"'" ; then
8874
8875 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8876 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8877
8878 continue
8879 fi
8880 ;;
8881 esac
8882 case "$CPPFLAGS" in
8883 (*$cf_add_cflags)
8884 ;;
8885 (*)
8886 case "$cf_add_cflags" in
8887 (-D*)
8888 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8889
8890 CPPFLAGS=`echo "$CPPFLAGS" | \
8891 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8892 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8893
8894 ;;
8895 esac
8896
8897 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8898 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8899
8900 ;;
8901 esac
8902 ;;
8903 (*)
8904
8905 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8906 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8907
8908 ;;
8909 esac
8910 ;;
8911 (yes)
8912
8913 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8914 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8915
8916 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8917
8918 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8919 && test -z "${cf_tst_cflags}" \
8920 && cf_fix_cppflags=no
8921 ;;
8922 esac
8923 done
8924
8925 if test -n "$cf_new_cflags" ; then
8926
8927 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8928 CFLAGS="${CFLAGS}$cf_new_cflags"
8929
8930 fi
8931
8932 if test -n "$cf_new_cppflags" ; then
8933
8934 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8935 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8936
8937 fi
8938
8939 if test -n "$cf_new_extra_cppflags" ; then
8940
8941 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8942 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8943
8944 fi
8945
8946 else
8947 { echo "$as_me:8947: WARNING: No libraries found for font-encoding" >&5
8948 echo "$as_me: WARNING: No libraries found for font-encoding" >&2;}
8949 fi
8950
8951 if test $cf_have_fontenc_libs = yes ; then
8952
8953 cat >>confdefs.h <<\EOF
8954 #define USE_FONTENC 1
8955 EOF
8956
8957 else
8958 { { echo "$as_me:8958: error: cannot link with fontenc" >&5
8959 echo "$as_me: error: cannot link with fontenc" >&2;}
8960 { (exit 1); exit 1; }; }
8961 fi
8962 fi
8963
8964 echo "$as_me:8964: checking for nl_langinfo and CODESET" >&5
8965 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8966 if test "${am_cv_langinfo_codeset+set}" = set; then
8967 echo $ECHO_N "(cached) $ECHO_C" >&6
8968 else
8969 cat >"conftest.$ac_ext" <<_ACEOF
8970 #line 8970 "configure"
8971 #include "confdefs.h"
8972
8973 $ac_includes_default
8974 #include <langinfo.h>
8975 int
8976 main (void)
8977 {
8978 char* cs = nl_langinfo(CODESET); (void)cs
8979 ;
8980 return 0;
8981 }
8982 _ACEOF
8983 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8984 if { (eval echo "$as_me:8984: \"$ac_link\"") >&5
8985 (eval $ac_link) 2>&5
8986 ac_status=$?
8987 echo "$as_me:8987: \$? = $ac_status" >&5
8988 (exit "$ac_status"); } &&
8989 { ac_try='test -s "conftest$ac_exeext"'
8990 { (eval echo "$as_me:8990: \"$ac_try\"") >&5
8991 (eval $ac_try) 2>&5
8992 ac_status=$?
8993 echo "$as_me:8993: \$? = $ac_status" >&5
8994 (exit "$ac_status"); }; }; then
8995 am_cv_langinfo_codeset=yes
8996 else
8997 echo "$as_me: failed program was:" >&5
8998 cat "conftest.$ac_ext" >&5
8999 am_cv_langinfo_codeset=no
9000 fi
9001 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9002
9003 fi
9004 echo "$as_me:9004: result: $am_cv_langinfo_codeset" >&5
9005 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9006 if test "$am_cv_langinfo_codeset" = yes; then
9007
9008 cat >>confdefs.h <<\EOF
9009 #define HAVE_LANGINFO_CODESET 1
9010 EOF
9011
9012 fi
9013
9014 # Since iconv is widely available, fallback to using it if fontenc is neither
9015 # requested nor available.
9016 if test "$with_iconv" = yes
9017 then
9018
9019 echo "$as_me:9019: checking for PATH separator" >&5
9020 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
9021 case "$cf_cv_system_name" in
9022 (os2*) PATH_SEPARATOR=';' ;;
9023 (*) ${PATH_SEPARATOR:=':'} ;;
9024 esac
9025
9026 echo "$as_me:9026: result: $PATH_SEPARATOR" >&5
9027 echo "${ECHO_T}$PATH_SEPARATOR" >&6
9028
9029 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
9030 if test "${with_libiconv_prefix+set}" = set; then
9031 withval="$with_libiconv_prefix"
9032
9033 case "x$withval" in
9034 (xno|xyes|x)
9035 ;;
9036 (*)
9037
9038 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
9039 if test -d "$cf_searchpath/include" ; then
9040
9041 if test -n "$cf_searchpath/include" ; then
9042 for cf_add_incdir in $cf_searchpath/include
9043 do
9044 while test "$cf_add_incdir" != /usr/include
9045 do
9046 if test -d "$cf_add_incdir"
9047 then
9048 cf_have_incdir=no
9049 if test -n "$CFLAGS$CPPFLAGS" ; then
9050 # a loop is needed to ensure we can add subdirs of existing dirs
9051 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9052 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9053 cf_have_incdir=yes; break
9054 fi
9055 done
9056 fi
9057
9058 if test "$cf_have_incdir" = no ; then
9059 if test "$cf_add_incdir" = /usr/local/include ; then
9060 if test "$GCC" = yes
9061 then
9062 cf_save_CPPFLAGS=$CPPFLAGS
9063
9064 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9065 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9066
9067 cat >"conftest.$ac_ext" <<_ACEOF
9068 #line 9068 "configure"
9069 #include "confdefs.h"
9070 #include <stdio.h>
9071 int
9072 main (void)
9073 {
9074 printf("Hello")
9075 ;
9076 return 0;
9077 }
9078 _ACEOF
9079 rm -f "conftest.$ac_objext"
9080 if { (eval echo "$as_me:9080: \"$ac_compile\"") >&5
9081 (eval $ac_compile) 2>&5
9082 ac_status=$?
9083 echo "$as_me:9083: \$? = $ac_status" >&5
9084 (exit "$ac_status"); } &&
9085 { ac_try='test -s "conftest.$ac_objext"'
9086 { (eval echo "$as_me:9086: \"$ac_try\"") >&5
9087 (eval $ac_try) 2>&5
9088 ac_status=$?
9089 echo "$as_me:9089: \$? = $ac_status" >&5
9090 (exit "$ac_status"); }; }; then
9091 :
9092 else
9093 echo "$as_me: failed program was:" >&5
9094 cat "conftest.$ac_ext" >&5
9095 cf_have_incdir=yes
9096 fi
9097 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9098 CPPFLAGS=$cf_save_CPPFLAGS
9099 fi
9100 fi
9101 fi
9102
9103 if test "$cf_have_incdir" = no ; then
9104 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9105
9106 echo "${as_me:-configure}:9106: testing adding $cf_add_incdir to include-path ..." 1>&5
9107
9108 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9109
9110 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9111 test "$cf_top_incdir" = "$cf_add_incdir" && break
9112 cf_add_incdir="$cf_top_incdir"
9113 else
9114 break
9115 fi
9116 else
9117 break
9118 fi
9119 done
9120 done
9121 fi
9122
9123 elif test -d "$cf_searchpath/../include" ; then
9124
9125 if test -n "$cf_searchpath/../include" ; then
9126 for cf_add_incdir in $cf_searchpath/../include
9127 do
9128 while test "$cf_add_incdir" != /usr/include
9129 do
9130 if test -d "$cf_add_incdir"
9131 then
9132 cf_have_incdir=no
9133 if test -n "$CFLAGS$CPPFLAGS" ; then
9134 # a loop is needed to ensure we can add subdirs of existing dirs
9135 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9136 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9137 cf_have_incdir=yes; break
9138 fi
9139 done
9140 fi
9141
9142 if test "$cf_have_incdir" = no ; then
9143 if test "$cf_add_incdir" = /usr/local/include ; then
9144 if test "$GCC" = yes
9145 then
9146 cf_save_CPPFLAGS=$CPPFLAGS
9147
9148 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9149 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9150
9151 cat >"conftest.$ac_ext" <<_ACEOF
9152 #line 9152 "configure"
9153 #include "confdefs.h"
9154 #include <stdio.h>
9155 int
9156 main (void)
9157 {
9158 printf("Hello")
9159 ;
9160 return 0;
9161 }
9162 _ACEOF
9163 rm -f "conftest.$ac_objext"
9164 if { (eval echo "$as_me:9164: \"$ac_compile\"") >&5
9165 (eval $ac_compile) 2>&5
9166 ac_status=$?
9167 echo "$as_me:9167: \$? = $ac_status" >&5
9168 (exit "$ac_status"); } &&
9169 { ac_try='test -s "conftest.$ac_objext"'
9170 { (eval echo "$as_me:9170: \"$ac_try\"") >&5
9171 (eval $ac_try) 2>&5
9172 ac_status=$?
9173 echo "$as_me:9173: \$? = $ac_status" >&5
9174 (exit "$ac_status"); }; }; then
9175 :
9176 else
9177 echo "$as_me: failed program was:" >&5
9178 cat "conftest.$ac_ext" >&5
9179 cf_have_incdir=yes
9180 fi
9181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9182 CPPFLAGS=$cf_save_CPPFLAGS
9183 fi
9184 fi
9185 fi
9186
9187 if test "$cf_have_incdir" = no ; then
9188 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9189
9190 echo "${as_me:-configure}:9190: testing adding $cf_add_incdir to include-path ..." 1>&5
9191
9192 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9193
9194 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9195 test "$cf_top_incdir" = "$cf_add_incdir" && break
9196 cf_add_incdir="$cf_top_incdir"
9197 else
9198 break
9199 fi
9200 else
9201 break
9202 fi
9203 done
9204 done
9205 fi
9206
9207 else
9208 { { echo "$as_me:9208: error: cannot find libiconv under $withval" >&5
9209 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9210 { (exit 1); exit 1; }; }
9211 fi
9212 if test -d "$cf_searchpath/lib" ; then
9213
9214 if test -n "$cf_searchpath/lib" ; then
9215 for cf_add_libdir in $cf_searchpath/lib
9216 do
9217 if test "$cf_add_libdir" = /usr/lib ; then
9218 :
9219 elif test -d "$cf_add_libdir"
9220 then
9221 cf_have_libdir=no
9222 if test -n "$LDFLAGS$LIBS" ; then
9223 # a loop is needed to ensure we can add subdirs of existing dirs
9224 for cf_test_libdir in $LDFLAGS $LIBS ; do
9225 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9226 cf_have_libdir=yes; break
9227 fi
9228 done
9229 fi
9230 if test "$cf_have_libdir" = no ; then
9231 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9232
9233 echo "${as_me:-configure}:9233: testing adding $cf_add_libdir to library-path ..." 1>&5
9234
9235 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9236 fi
9237 fi
9238 done
9239 fi
9240
9241 elif test -d "$cf_searchpath" ; then
9242
9243 if test -n "$cf_searchpath" ; then
9244 for cf_add_libdir in $cf_searchpath
9245 do
9246 if test "$cf_add_libdir" = /usr/lib ; then
9247 :
9248 elif test -d "$cf_add_libdir"
9249 then
9250 cf_have_libdir=no
9251 if test -n "$LDFLAGS$LIBS" ; then
9252 # a loop is needed to ensure we can add subdirs of existing dirs
9253 for cf_test_libdir in $LDFLAGS $LIBS ; do
9254 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9255 cf_have_libdir=yes; break
9256 fi
9257 done
9258 fi
9259 if test "$cf_have_libdir" = no ; then
9260 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9261
9262 echo "${as_me:-configure}:9262: testing adding $cf_add_libdir to library-path ..." 1>&5
9263
9264 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9265 fi
9266 fi
9267 done
9268 fi
9269
9270 else
9271 { { echo "$as_me:9271: error: cannot find libiconv under $withval" >&5
9272 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9273 { (exit 1); exit 1; }; }
9274 fi
9275 done
9276
9277 test -n "$verbose" && echo " setting path value for libiconv to $withval" 1>&6
9278
9279 echo "${as_me:-configure}:9279: testing setting path value for libiconv to $withval ..." 1>&5
9280
9281 ;;
9282 esac
9283
9284 fi;
9285
9286 echo "$as_me:9286: checking for iconv" >&5
9287 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
9288 if test "${am_cv_func_iconv+set}" = set; then
9289 echo $ECHO_N "(cached) $ECHO_C" >&6
9290 else
9291
9292 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9293 # will be set on completion of the AC_TRY_LINK below.
9294 cf_cv_header_path_iconv=
9295 cf_cv_library_path_iconv=
9296
9297 echo "${as_me:-configure}:9297: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
9298
9299 cf_save_LIBS="$LIBS"
9300
9301 cat >"conftest.$ac_ext" <<_ACEOF
9302 #line 9302 "configure"
9303 #include "confdefs.h"
9304
9305 #include <stdlib.h>
9306 #include <iconv.h>
9307
9308 int
9309 main (void)
9310 {
9311
9312 iconv_t cd = iconv_open("","");
9313 iconv(cd,NULL,NULL,NULL,NULL);
9314 iconv_close(cd);
9315
9316 ;
9317 return 0;
9318 }
9319 _ACEOF
9320 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9321 if { (eval echo "$as_me:9321: \"$ac_link\"") >&5
9322 (eval $ac_link) 2>&5
9323 ac_status=$?
9324 echo "$as_me:9324: \$? = $ac_status" >&5
9325 (exit "$ac_status"); } &&
9326 { ac_try='test -s "conftest$ac_exeext"'
9327 { (eval echo "$as_me:9327: \"$ac_try\"") >&5
9328 (eval $ac_try) 2>&5
9329 ac_status=$?
9330 echo "$as_me:9330: \$? = $ac_status" >&5
9331 (exit "$ac_status"); }; }; then
9332
9333 cf_cv_find_linkage_iconv=yes
9334 cf_cv_header_path_iconv=/usr/include
9335 cf_cv_library_path_iconv=/usr/lib
9336
9337 else
9338 echo "$as_me: failed program was:" >&5
9339 cat "conftest.$ac_ext" >&5
9340
9341 LIBS="-liconv $cf_save_LIBS"
9342
9343 cat >"conftest.$ac_ext" <<_ACEOF
9344 #line 9344 "configure"
9345 #include "confdefs.h"
9346
9347 #include <stdlib.h>
9348 #include <iconv.h>
9349
9350 int
9351 main (void)
9352 {
9353
9354 iconv_t cd = iconv_open("","");
9355 iconv(cd,NULL,NULL,NULL,NULL);
9356 iconv_close(cd);
9357
9358 ;
9359 return 0;
9360 }
9361 _ACEOF
9362 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9363 if { (eval echo "$as_me:9363: \"$ac_link\"") >&5
9364 (eval $ac_link) 2>&5
9365 ac_status=$?
9366 echo "$as_me:9366: \$? = $ac_status" >&5
9367 (exit "$ac_status"); } &&
9368 { ac_try='test -s "conftest$ac_exeext"'
9369 { (eval echo "$as_me:9369: \"$ac_try\"") >&5
9370 (eval $ac_try) 2>&5
9371 ac_status=$?
9372 echo "$as_me:9372: \$? = $ac_status" >&5
9373 (exit "$ac_status"); }; }; then
9374
9375 cf_cv_find_linkage_iconv=yes
9376 cf_cv_header_path_iconv=/usr/include
9377 cf_cv_library_path_iconv=/usr/lib
9378 cf_cv_library_file_iconv="-liconv"
9379
9380 else
9381 echo "$as_me: failed program was:" >&5
9382 cat "conftest.$ac_ext" >&5
9383
9384 cf_cv_find_linkage_iconv=no
9385 LIBS="$cf_save_LIBS"
9386
9387 test -n "$verbose" && echo " find linkage for iconv library" 1>&6
9388
9389 echo "${as_me:-configure}:9389: testing find linkage for iconv library ..." 1>&5
9390
9391 echo "${as_me:-configure}:9391: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
9392
9393 cf_save_CPPFLAGS="$CPPFLAGS"
9394 cf_test_CPPFLAGS="$CPPFLAGS"
9395
9396 cf_search=
9397
9398 # collect the current set of include-directories from compiler flags
9399 cf_header_path_list=""
9400 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9401 for cf_header_path in $CPPFLAGS $CFLAGS
9402 do
9403 case "$cf_header_path" in
9404 (-I*)
9405 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9406
9407 test "x$cf_header_path" != "xNONE" && \
9408 test -d "$cf_header_path" && \
9409 {
9410 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9411 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9412 test -d "$cf_header_path/include/iconv" && cf_search="$cf_search $cf_header_path/include/iconv"
9413 test -d "$cf_header_path/include/iconv/include" && cf_search="$cf_search $cf_header_path/include/iconv/include"
9414 test -d "$cf_header_path/iconv/include" && cf_search="$cf_search $cf_header_path/iconv/include"
9415 test -d "$cf_header_path/iconv/include/iconv" && cf_search="$cf_search $cf_header_path/iconv/include/iconv"
9416 }
9417
9418 cf_header_path_list="$cf_header_path_list $cf_search"
9419 ;;
9420 esac
9421 done
9422 fi
9423
9424 # add the variations for the package we are looking for
9425
9426 cf_search=
9427
9428 test "x$prefix" != "xNONE" && \
9429 test -d "$prefix" && \
9430 {
9431 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9432 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9433 test -d "$prefix/include/iconv" && cf_search="$cf_search $prefix/include/iconv"
9434 test -d "$prefix/include/iconv/include" && cf_search="$cf_search $prefix/include/iconv/include"
9435 test -d "$prefix/iconv/include" && cf_search="$cf_search $prefix/iconv/include"
9436 test -d "$prefix/iconv/include/iconv" && cf_search="$cf_search $prefix/iconv/include/iconv"
9437 }
9438
9439 for cf_subdir_prefix in \
9440 /usr \
9441 /usr/local \
9442 /usr/pkg \
9443 /opt \
9444 /opt/local \
9445 $HOME
9446 do
9447
9448 test "x$cf_subdir_prefix" != "x$prefix" && \
9449 test -d "$cf_subdir_prefix" && \
9450 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9451 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9452 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9453 test -d "$cf_subdir_prefix/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/include/iconv"
9454 test -d "$cf_subdir_prefix/include/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
9455 test -d "$cf_subdir_prefix/iconv/include" && cf_search="$cf_search $cf_subdir_prefix/iconv/include"
9456 test -d "$cf_subdir_prefix/iconv/include/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
9457 }
9458
9459 done
9460
9461 test "$includedir" != NONE && \
9462 test "$includedir" != "/usr/include" && \
9463 test -d "$includedir" && {
9464 test -d "$includedir" && cf_search="$cf_search $includedir"
9465 test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
9466 }
9467
9468 test "$oldincludedir" != NONE && \
9469 test "$oldincludedir" != "/usr/include" && \
9470 test -d "$oldincludedir" && {
9471 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9472 test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
9473 }
9474
9475 cf_search="$cf_search $cf_header_path_list"
9476
9477 for cf_cv_header_path_iconv in $cf_search
9478 do
9479 if test -d "$cf_cv_header_path_iconv" ; then
9480 test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
9481
9482 echo "${as_me:-configure}:9482: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
9483
9484 CPPFLAGS="$cf_save_CPPFLAGS"
9485
9486 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9487 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
9488
9489 cat >"conftest.$ac_ext" <<_ACEOF
9490 #line 9490 "configure"
9491 #include "confdefs.h"
9492
9493 #include <stdlib.h>
9494 #include <iconv.h>
9495
9496 int
9497 main (void)
9498 {
9499
9500 iconv_t cd = iconv_open("","");
9501 iconv(cd,NULL,NULL,NULL,NULL);
9502 iconv_close(cd);
9503
9504 ;
9505 return 0;
9506 }
9507 _ACEOF
9508 rm -f "conftest.$ac_objext"
9509 if { (eval echo "$as_me:9509: \"$ac_compile\"") >&5
9510 (eval $ac_compile) 2>&5
9511 ac_status=$?
9512 echo "$as_me:9512: \$? = $ac_status" >&5
9513 (exit "$ac_status"); } &&
9514 { ac_try='test -s "conftest.$ac_objext"'
9515 { (eval echo "$as_me:9515: \"$ac_try\"") >&5
9516 (eval $ac_try) 2>&5
9517 ac_status=$?
9518 echo "$as_me:9518: \$? = $ac_status" >&5
9519 (exit "$ac_status"); }; }; then
9520
9521 test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
9522
9523 echo "${as_me:-configure}:9523: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
9524
9525 cf_cv_find_linkage_iconv=maybe
9526 cf_test_CPPFLAGS="$CPPFLAGS"
9527 break
9528 else
9529 echo "$as_me: failed program was:" >&5
9530 cat "conftest.$ac_ext" >&5
9531
9532 CPPFLAGS="$cf_save_CPPFLAGS"
9533
9534 fi
9535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9536 fi
9537 done
9538
9539 if test "$cf_cv_find_linkage_iconv" = maybe ; then
9540
9541 echo "${as_me:-configure}:9541: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
9542
9543 cf_save_LIBS="$LIBS"
9544 cf_save_LDFLAGS="$LDFLAGS"
9545
9546 if test "$cf_cv_find_linkage_iconv" != yes ; then
9547
9548 cf_search=
9549 cf_library_path_list=""
9550 if test -n "${LDFLAGS}${LIBS}" ; then
9551 for cf_library_path in $LDFLAGS $LIBS
9552 do
9553 case "$cf_library_path" in
9554 (-L*)
9555 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9556
9557 test "x$cf_library_path" != "xNONE" && \
9558 test -d "$cf_library_path" && \
9559 {
9560 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9561 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9562 test -d "$cf_library_path/lib/iconv" && cf_search="$cf_search $cf_library_path/lib/iconv"
9563 test -d "$cf_library_path/lib/iconv/lib" && cf_search="$cf_search $cf_library_path/lib/iconv/lib"
9564 test -d "$cf_library_path/iconv/lib" && cf_search="$cf_search $cf_library_path/iconv/lib"
9565 test -d "$cf_library_path/iconv/lib/iconv" && cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
9566 }
9567
9568 cf_library_path_list="$cf_library_path_list $cf_search"
9569 ;;
9570 esac
9571 done
9572 fi
9573
9574 cf_search=
9575
9576 test "x$prefix" != "xNONE" && \
9577 test -d "$prefix" && \
9578 {
9579 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9580 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9581 test -d "$prefix/lib/iconv" && cf_search="$cf_search $prefix/lib/iconv"
9582 test -d "$prefix/lib/iconv/lib" && cf_search="$cf_search $prefix/lib/iconv/lib"
9583 test -d "$prefix/iconv/lib" && cf_search="$cf_search $prefix/iconv/lib"
9584 test -d "$prefix/iconv/lib/iconv" && cf_search="$cf_search $prefix/iconv/lib/iconv"
9585 }
9586
9587 for cf_subdir_prefix in \
9588 /usr \
9589 /usr/local \
9590 /usr/pkg \
9591 /opt \
9592 /opt/local \
9593 $HOME
9594 do
9595
9596 test "x$cf_subdir_prefix" != "x$prefix" && \
9597 test -d "$cf_subdir_prefix" && \
9598 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9599 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9600 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9601 test -d "$cf_subdir_prefix/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
9602 test -d "$cf_subdir_prefix/lib/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
9603 test -d "$cf_subdir_prefix/iconv/lib" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
9604 test -d "$cf_subdir_prefix/iconv/lib/iconv" && cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
9605 }
9606
9607 done
9608
9609 cf_search="$cf_library_path_list $cf_search"
9610
9611 for cf_cv_library_path_iconv in $cf_search
9612 do
9613 if test -d "$cf_cv_library_path_iconv" ; then
9614 test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
9615
9616 echo "${as_me:-configure}:9616: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
9617
9618 CPPFLAGS="$cf_test_CPPFLAGS"
9619 LIBS="-liconv $cf_save_LIBS"
9620 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
9621 cat >"conftest.$ac_ext" <<_ACEOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9624
9625 #include <stdlib.h>
9626 #include <iconv.h>
9627
9628 int
9629 main (void)
9630 {
9631
9632 iconv_t cd = iconv_open("","");
9633 iconv(cd,NULL,NULL,NULL,NULL);
9634 iconv_close(cd);
9635
9636 ;
9637 return 0;
9638 }
9639 _ACEOF
9640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9641 if { (eval echo "$as_me:9641: \"$ac_link\"") >&5
9642 (eval $ac_link) 2>&5
9643 ac_status=$?
9644 echo "$as_me:9644: \$? = $ac_status" >&5
9645 (exit "$ac_status"); } &&
9646 { ac_try='test -s "conftest$ac_exeext"'
9647 { (eval echo "$as_me:9647: \"$ac_try\"") >&5
9648 (eval $ac_try) 2>&5
9649 ac_status=$?
9650 echo "$as_me:9650: \$? = $ac_status" >&5
9651 (exit "$ac_status"); }; }; then
9652
9653 test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
9654
9655 echo "${as_me:-configure}:9655: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
9656
9657 cf_cv_find_linkage_iconv=yes
9658 cf_cv_library_file_iconv="-liconv"
9659 break
9660 else
9661 echo "$as_me: failed program was:" >&5
9662 cat "conftest.$ac_ext" >&5
9663
9664 CPPFLAGS="$cf_save_CPPFLAGS"
9665 LIBS="$cf_save_LIBS"
9666 LDFLAGS="$cf_save_LDFLAGS"
9667
9668 fi
9669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9670 fi
9671 done
9672 CPPFLAGS="$cf_save_CPPFLAGS"
9673 LDFLAGS="$cf_save_LDFLAGS"
9674 fi
9675
9676 else
9677 cf_cv_find_linkage_iconv=no
9678 fi
9679
9680 fi
9681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9682
9683 fi
9684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9685
9686 LIBS="$cf_save_LIBS"
9687
9688 if test "$cf_cv_find_linkage_iconv" = yes ; then
9689 am_cv_func_iconv=yes
9690 else
9691 am_cv_func_iconv="no, consider installing GNU libiconv"
9692 fi
9693
9694 fi
9695 echo "$as_me:9695: result: $am_cv_func_iconv" >&5
9696 echo "${ECHO_T}$am_cv_func_iconv" >&6
9697
9698 if test "$am_cv_func_iconv" = yes; then
9699
9700 cat >>confdefs.h <<\EOF
9701 #define HAVE_ICONV 1
9702 EOF
9703
9704 echo "$as_me:9704: checking if the declaration of iconv() needs const." >&5
9705 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
9706 if test "${am_cv_proto_iconv_const+set}" = set; then
9707 echo $ECHO_N "(cached) $ECHO_C" >&6
9708 else
9709
9710 cat >"conftest.$ac_ext" <<_ACEOF
9711 #line 9711 "configure"
9712 #include "confdefs.h"
9713
9714 #include <stdlib.h>
9715 #include <iconv.h>
9716
9717 extern
9718 #ifdef __cplusplus
9719 "C"
9720 #endif
9721 #if defined(__STDC__) || defined(__cplusplus)
9722 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9723 #else
9724 size_t iconv();
9725 #endif
9726
9727 int
9728 main (void)
9729 {
9730
9731 ;
9732 return 0;
9733 }
9734 _ACEOF
9735 rm -f "conftest.$ac_objext"
9736 if { (eval echo "$as_me:9736: \"$ac_compile\"") >&5
9737 (eval $ac_compile) 2>&5
9738 ac_status=$?
9739 echo "$as_me:9739: \$? = $ac_status" >&5
9740 (exit "$ac_status"); } &&
9741 { ac_try='test -s "conftest.$ac_objext"'
9742 { (eval echo "$as_me:9742: \"$ac_try\"") >&5
9743 (eval $ac_try) 2>&5
9744 ac_status=$?
9745 echo "$as_me:9745: \$? = $ac_status" >&5
9746 (exit "$ac_status"); }; }; then
9747 am_cv_proto_iconv_const=no
9748 else
9749 echo "$as_me: failed program was:" >&5
9750 cat "conftest.$ac_ext" >&5
9751 am_cv_proto_iconv_const=yes
9752 fi
9753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9754 fi
9755 echo "$as_me:9755: result: $am_cv_proto_iconv_const" >&5
9756 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
9757
9758 if test "$am_cv_proto_iconv_const" = yes ; then
9759 am_cv_proto_iconv_arg1="const"
9760 else
9761 am_cv_proto_iconv_arg1="/* nothing */"
9762 fi
9763
9764 cat >>confdefs.h <<EOF
9765 #define ICONV_CONST $am_cv_proto_iconv_arg1
9766 EOF
9767
9768 fi
9769
9770 LIBICONV=
9771 if test "$cf_cv_find_linkage_iconv" = yes; then
9772
9773 if test -n "$cf_cv_header_path_iconv" ; then
9774 for cf_add_incdir in $cf_cv_header_path_iconv
9775 do
9776 while test "$cf_add_incdir" != /usr/include
9777 do
9778 if test -d "$cf_add_incdir"
9779 then
9780 cf_have_incdir=no
9781 if test -n "$CFLAGS$CPPFLAGS" ; then
9782 # a loop is needed to ensure we can add subdirs of existing dirs
9783 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9784 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9785 cf_have_incdir=yes; break
9786 fi
9787 done
9788 fi
9789
9790 if test "$cf_have_incdir" = no ; then
9791 if test "$cf_add_incdir" = /usr/local/include ; then
9792 if test "$GCC" = yes
9793 then
9794 cf_save_CPPFLAGS=$CPPFLAGS
9795
9796 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9797 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9798
9799 cat >"conftest.$ac_ext" <<_ACEOF
9800 #line 9800 "configure"
9801 #include "confdefs.h"
9802 #include <stdio.h>
9803 int
9804 main (void)
9805 {
9806 printf("Hello")
9807 ;
9808 return 0;
9809 }
9810 _ACEOF
9811 rm -f "conftest.$ac_objext"
9812 if { (eval echo "$as_me:9812: \"$ac_compile\"") >&5
9813 (eval $ac_compile) 2>&5
9814 ac_status=$?
9815 echo "$as_me:9815: \$? = $ac_status" >&5
9816 (exit "$ac_status"); } &&
9817 { ac_try='test -s "conftest.$ac_objext"'
9818 { (eval echo "$as_me:9818: \"$ac_try\"") >&5
9819 (eval $ac_try) 2>&5
9820 ac_status=$?
9821 echo "$as_me:9821: \$? = $ac_status" >&5
9822 (exit "$ac_status"); }; }; then
9823 :
9824 else
9825 echo "$as_me: failed program was:" >&5
9826 cat "conftest.$ac_ext" >&5
9827 cf_have_incdir=yes
9828 fi
9829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9830 CPPFLAGS=$cf_save_CPPFLAGS
9831 fi
9832 fi
9833 fi
9834
9835 if test "$cf_have_incdir" = no ; then
9836 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9837
9838 echo "${as_me:-configure}:9838: testing adding $cf_add_incdir to include-path ..." 1>&5
9839
9840 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9841
9842 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9843 test "$cf_top_incdir" = "$cf_add_incdir" && break
9844 cf_add_incdir="$cf_top_incdir"
9845 else
9846 break
9847 fi
9848 else
9849 break
9850 fi
9851 done
9852 done
9853 fi
9854
9855 if test -n "$cf_cv_library_file_iconv" ; then
9856 LIBICONV="-liconv"
9857
9858 if test -n "$cf_cv_library_path_iconv" ; then
9859 for cf_add_libdir in $cf_cv_library_path_iconv
9860 do
9861 if test "$cf_add_libdir" = /usr/lib ; then
9862 :
9863 elif test -d "$cf_add_libdir"
9864 then
9865 cf_have_libdir=no
9866 if test -n "$LDFLAGS$LIBS" ; then
9867 # a loop is needed to ensure we can add subdirs of existing dirs
9868 for cf_test_libdir in $LDFLAGS $LIBS ; do
9869 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9870 cf_have_libdir=yes; break
9871 fi
9872 done
9873 fi
9874 if test "$cf_have_libdir" = no ; then
9875 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
9876
9877 echo "${as_me:-configure}:9877: testing adding $cf_add_libdir to library-path ..." 1>&5
9878
9879 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9880 fi
9881 fi
9882 done
9883 fi
9884
9885 fi
9886 fi
9887
9888 cat >>confdefs.h <<\EOF
9889 #define USE_ICONV 1
9890 EOF
9891
9892 cf_add_libs="$LIBS"
9893 # reverse order
9894 cf_add_0lib=
9895 for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9896 # filter duplicates
9897 for cf_add_1lib in $cf_add_0lib; do
9898 for cf_add_2lib in $cf_add_libs; do
9899 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9900 cf_add_1lib=
9901 break
9902 fi
9903 done
9904 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9905 done
9906 LIBS="$cf_add_libs"
9907
9908 EXTRASRCS="$EXTRASRCS luitconv.c builtin.c"
9909 EXTRAOBJS="$EXTRAOBJS luitconv\$o builtin\$o"
9910 fi
9911
9912 echo "$as_me:9912: checking for location of encodings.dir file" >&5
9913 echo $ECHO_N "checking for location of encodings.dir file... $ECHO_C" >&6
9914
9915 # Check whether --with-encodings-dir or --without-encodings-dir was given.
9916 if test "${with_encodings_dir+set}" = set; then
9917 withval="$with_encodings_dir"
9918 ENCODINGS_DIR_FILE=$withval
9919 else
9920 ENCODINGS_DIR_FILE=auto
9921 fi;
9922
9923 test -n "$verbose" && echo " " 1>&6
9924
9925 echo "${as_me:-configure}:9925: testing ..." 1>&5
9926
9927 case "x$ENCODINGS_DIR_FILE" in
9928 (xauto|xyes|xno)
9929 ENCODINGS_DIR_FILE=unknown
9930 for cf_leaf in lib share
9931 do
9932 for cf_path in \
9933 /usr/X11R7/$cf_leaf/X11/fonts \
9934 /usr/X11R6/$cf_leaf/X11/fonts \
9935 /usr/local/$cf_leaf/X11/fonts \
9936 /opt/local/$cf_leaf/fonts/X11 \
9937 /opt/X11/$cf_leaf/X11/fonts \
9938 /usr/$cf_leaf/fonts/X11 \
9939 /usr/$cf_leaf/X11/fonts
9940 do
9941 test -d "$cf_path" || continue
9942 cf_encodings_dir=$cf_path/encodings/encodings.dir
9943 test -n "$verbose" && echo " ...testing $cf_encodings_dir" 1>&6
9944
9945 echo "${as_me:-configure}:9945: testing ...testing $cf_encodings_dir ..." 1>&5
9946
9947 if test -f $cf_encodings_dir ; then
9948 ENCODINGS_DIR_FILE=$cf_encodings_dir
9949 break
9950 fi
9951 done
9952 done
9953 ;;
9954 (*)
9955 if test ! -f "$ENCODINGS_DIR_FILE" ; then
9956 { echo "$as_me:9956: WARNING: Encodings file not found: $ENCODINGS_DIR_FILE" >&5
9957 echo "$as_me: WARNING: Encodings file not found: $ENCODINGS_DIR_FILE" >&2;}
9958 ENCODINGS_DIR_FILE=/usr/share/fonts/X11
9959 fi
9960 ;;
9961 esac
9962 echo "$as_me:9962: result: $ENCODINGS_DIR_FILE" >&5
9963 echo "${ECHO_T}$ENCODINGS_DIR_FILE" >&6
9964 test $ENCODINGS_DIR_FILE = unknown && ENCODINGS_DIR_FILE=
9965
9966 cat >>confdefs.h <<EOF
9967 #define ENCODINGS_DIR_FILE "$ENCODINGS_DIR_FILE"
9968 EOF
9969
9970 echo "$as_me:9970: checking for location of locale alias file" >&5
9971 echo $ECHO_N "checking for location of locale alias file... $ECHO_C" >&6
9972
9973 # Check whether --with-locale-alias or --without-locale-alias was given.
9974 if test "${with_locale_alias+set}" = set; then
9975 withval="$with_locale_alias"
9976 LOCALE_ALIAS_FILE=$withval
9977 else
9978 LOCALE_ALIAS_FILE=auto
9979 fi;
9980
9981 test -n "$verbose" && echo " " 1>&6
9982
9983 echo "${as_me:-configure}:9983: testing ..." 1>&5
9984
9985 case "x$LOCALE_ALIAS_FILE" in
9986 (xauto|xyes|xno)
9987 LOCALE_ALIAS_FILE=unknown
9988 for cf_leaf in lib share
9989 do
9990 for cf_path in \
9991 /usr/openwin/$cf_leaf/locale \
9992 /usr/$cf_leaf/X11/locale \
9993 /usr/X11R7/$cf_leaf/X11/locale \
9994 /usr/X11R6/$cf_leaf/X11/locale \
9995 /opt/local/$cf_leaf/X11/locale \
9996 /opt/X11/$cf_leaf/X11/locale \
9997 /usr/X11/$cf_leaf/X11/locale
9998 do
9999 test -d $cf_path || continue
10000 cf_alias_file=$cf_path/locale.alias
10001 test -n "$verbose" && echo " testing $cf_alias_file" 1>&6
10002
10003 echo "${as_me:-configure}:10003: testing testing $cf_alias_file ..." 1>&5
10004
10005 if test -f $cf_alias_file ; then
10006 LOCALE_ALIAS_FILE=$cf_alias_file
10007 break
10008 fi
10009 done
10010 test "$LOCALE_ALIAS_FILE" = unknown || break
10011 done
10012 ;;
10013 (*)
10014 if test ! -f "$LOCALE_ALIAS_FILE" ; then
10015 { echo "$as_me:10015: WARNING: Alias file not found: $LOCALE_ALIAS_FILE" >&5
10016 echo "$as_me: WARNING: Alias file not found: $LOCALE_ALIAS_FILE" >&2;}
10017 fi
10018 ;;
10019 esac
10020 echo "$as_me:10020: result: $LOCALE_ALIAS_FILE" >&5
10021 echo "${ECHO_T}$LOCALE_ALIAS_FILE" >&6
10022
10023 # Extract the first word of "groff", so it can be a program name with args.
10024 set dummy groff; ac_word=$2
10025 echo "$as_me:10025: checking for $ac_word" >&5
10026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10027 if test "${ac_cv_path_GROFF_PATH+set}" = set; then
10028 echo $ECHO_N "(cached) $ECHO_C" >&6
10029 else
10030 case $GROFF_PATH in
10031 [\\/]* | ?:[\\/]*)
10032 ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
10033 ;;
10034 *)
10035 ac_save_IFS=$IFS; IFS=$ac_path_separator
10036 ac_dummy="$PATH"
10037 for ac_dir in $ac_dummy; do
10038 IFS=$ac_save_IFS
10039 test -z "$ac_dir" && ac_dir=.
10040 if $as_executable_p "$ac_dir/$ac_word"; then
10041 ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
10042 echo "$as_me:10042: found $ac_dir/$ac_word" >&5
10043 break
10044 fi
10045 done
10046
10047 test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
10048 ;;
10049 esac
10050 fi
10051 GROFF_PATH=$ac_cv_path_GROFF_PATH
10052
10053 if test -n "$GROFF_PATH"; then
10054 echo "$as_me:10054: result: $GROFF_PATH" >&5
10055 echo "${ECHO_T}$GROFF_PATH" >&6
10056 else
10057 echo "$as_me:10057: result: no" >&5
10058 echo "${ECHO_T}no" >&6
10059 fi
10060
10061 for ac_prog in nroff mandoc
10062 do
10063 # Extract the first word of "$ac_prog", so it can be a program name with args.
10064 set dummy $ac_prog; ac_word=$2
10065 echo "$as_me:10065: checking for $ac_word" >&5
10066 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10067 if test "${ac_cv_path_NROFF_PATH+set}" = set; then
10068 echo $ECHO_N "(cached) $ECHO_C" >&6
10069 else
10070 case $NROFF_PATH in
10071 [\\/]* | ?:[\\/]*)
10072 ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
10073 ;;
10074 *)
10075 ac_save_IFS=$IFS; IFS=$ac_path_separator
10076 ac_dummy="$PATH"
10077 for ac_dir in $ac_dummy; do
10078 IFS=$ac_save_IFS
10079 test -z "$ac_dir" && ac_dir=.
10080 if $as_executable_p "$ac_dir/$ac_word"; then
10081 ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
10082 echo "$as_me:10082: found $ac_dir/$ac_word" >&5
10083 break
10084 fi
10085 done
10086
10087 ;;
10088 esac
10089 fi
10090 NROFF_PATH=$ac_cv_path_NROFF_PATH
10091
10092 if test -n "$NROFF_PATH"; then
10093 echo "$as_me:10093: result: $NROFF_PATH" >&5
10094 echo "${ECHO_T}$NROFF_PATH" >&6
10095 else
10096 echo "$as_me:10096: result: no" >&5
10097 echo "${ECHO_T}no" >&6
10098 fi
10099
10100 test -n "$NROFF_PATH" && break
10101 done
10102 test -n "$NROFF_PATH" || NROFF_PATH="no"
10103
10104 # Extract the first word of "tbl", so it can be a program name with args.
10105 set dummy tbl; ac_word=$2
10106 echo "$as_me:10106: checking for $ac_word" >&5
10107 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10108 if test "${ac_cv_path_TBL_PATH+set}" = set; then
10109 echo $ECHO_N "(cached) $ECHO_C" >&6
10110 else
10111 case $TBL_PATH in
10112 [\\/]* | ?:[\\/]*)
10113 ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
10114 ;;
10115 *)
10116 ac_save_IFS=$IFS; IFS=$ac_path_separator
10117 ac_dummy="$PATH"
10118 for ac_dir in $ac_dummy; do
10119 IFS=$ac_save_IFS
10120 test -z "$ac_dir" && ac_dir=.
10121 if $as_executable_p "$ac_dir/$ac_word"; then
10122 ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
10123 echo "$as_me:10123: found $ac_dir/$ac_word" >&5
10124 break
10125 fi
10126 done
10127
10128 test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
10129 ;;
10130 esac
10131 fi
10132 TBL_PATH=$ac_cv_path_TBL_PATH
10133
10134 if test -n "$TBL_PATH"; then
10135 echo "$as_me:10135: result: $TBL_PATH" >&5
10136 echo "${ECHO_T}$TBL_PATH" >&6
10137 else
10138 echo "$as_me:10138: result: no" >&5
10139 echo "${ECHO_T}no" >&6
10140 fi
10141
10142 if test "x$GROFF_PATH" = xno
10143 then
10144 NROFF_NOTE=
10145 GROFF_NOTE="#"
10146 else
10147 NROFF_NOTE="#"
10148 GROFF_NOTE=
10149 fi
10150
10151 case "x${with_man2html}" in
10152 (xno)
10153 cf_man2html=no
10154 ;;
10155 (x|xyes)
10156 # Extract the first word of "man2html", so it can be a program name with args.
10157 set dummy man2html; ac_word=$2
10158 echo "$as_me:10158: checking for $ac_word" >&5
10159 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10160 if test "${ac_cv_path_cf_man2html+set}" = set; then
10161 echo $ECHO_N "(cached) $ECHO_C" >&6
10162 else
10163 case $cf_man2html in
10164 [\\/]* | ?:[\\/]*)
10165 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
10166 ;;
10167 *)
10168 ac_save_IFS=$IFS; IFS=$ac_path_separator
10169 ac_dummy="$PATH"
10170 for ac_dir in $ac_dummy; do
10171 IFS=$ac_save_IFS
10172 test -z "$ac_dir" && ac_dir=.
10173 if $as_executable_p "$ac_dir/$ac_word"; then
10174 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
10175 echo "$as_me:10175: found $ac_dir/$ac_word" >&5
10176 break
10177 fi
10178 done
10179
10180 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
10181 ;;
10182 esac
10183 fi
10184 cf_man2html=$ac_cv_path_cf_man2html
10185
10186 if test -n "$cf_man2html"; then
10187 echo "$as_me:10187: result: $cf_man2html" >&5
10188 echo "${ECHO_T}$cf_man2html" >&6
10189 else
10190 echo "$as_me:10190: result: no" >&5
10191 echo "${ECHO_T}no" >&6
10192 fi
10193
10194 case "x$cf_man2html" in
10195 (x/*)
10196 echo "$as_me:10196: checking for the modified Earl Hood script" >&5
10197 echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
10198 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
10199 then
10200 cf_man2html_ok=yes
10201 else
10202 cf_man2html=no
10203 cf_man2html_ok=no
10204 fi
10205 echo "$as_me:10205: result: $cf_man2html_ok" >&5
10206 echo "${ECHO_T}$cf_man2html_ok" >&6
10207 ;;
10208 (*)
10209 cf_man2html=no
10210 ;;
10211 esac
10212 esac
10213
10214 echo "$as_me:10214: checking for program to convert manpage to html" >&5
10215 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
10216
10217 # Check whether --with-man2html or --without-man2html was given.
10218 if test "${with_man2html+set}" = set; then
10219 withval="$with_man2html"
10220 cf_man2html=$withval
10221 else
10222 cf_man2html=$cf_man2html
10223 fi;
10224
10225 cf_with_groff=no
10226
10227 case $cf_man2html in
10228 (yes)
10229 echo "$as_me:10229: result: man2html" >&5
10230 echo "${ECHO_T}man2html" >&6
10231 # Extract the first word of "man2html", so it can be a program name with args.
10232 set dummy man2html; ac_word=$2
10233 echo "$as_me:10233: checking for $ac_word" >&5
10234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10235 if test "${ac_cv_path_cf_man2html+set}" = set; then
10236 echo $ECHO_N "(cached) $ECHO_C" >&6
10237 else
10238 case $cf_man2html in
10239 [\\/]* | ?:[\\/]*)
10240 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
10241 ;;
10242 *)
10243 ac_save_IFS=$IFS; IFS=$ac_path_separator
10244 ac_dummy="$PATH"
10245 for ac_dir in $ac_dummy; do
10246 IFS=$ac_save_IFS
10247 test -z "$ac_dir" && ac_dir=.
10248 if $as_executable_p "$ac_dir/$ac_word"; then
10249 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
10250 echo "$as_me:10250: found $ac_dir/$ac_word" >&5
10251 break
10252 fi
10253 done
10254
10255 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
10256 ;;
10257 esac
10258 fi
10259 cf_man2html=$ac_cv_path_cf_man2html
10260
10261 if test -n "$cf_man2html"; then
10262 echo "$as_me:10262: result: $cf_man2html" >&5
10263 echo "${ECHO_T}$cf_man2html" >&6
10264 else
10265 echo "$as_me:10265: result: no" >&5
10266 echo "${ECHO_T}no" >&6
10267 fi
10268
10269 ;;
10270 (no|groff|*/groff*)
10271 cf_with_groff=yes
10272 cf_man2html=$GROFF_PATH
10273 echo "$as_me:10273: result: $cf_man2html" >&5
10274 echo "${ECHO_T}$cf_man2html" >&6
10275 ;;
10276 (*)
10277 echo "$as_me:10277: result: $cf_man2html" >&5
10278 echo "${ECHO_T}$cf_man2html" >&6
10279 ;;
10280 esac
10281
10282 MAN2HTML_TEMP="man2html.tmp"
10283 cat >$MAN2HTML_TEMP <<CF_EOF
10284 #!$SHELL
10285 # Temporary script generated by CF_WITH_MAN2HTML
10286 # Convert inputs to html, sending result to standard output.
10287 #
10288 # Parameters:
10289 # \${1} = rootname of file to convert
10290 # \${2} = suffix of file to convert, e.g., "1"
10291 # \${3} = macros to use, e.g., "man"
10292 #
10293 ROOT=\$1
10294 TYPE=\$2
10295 MACS=\$3
10296
10297 unset LANG
10298 unset LC_ALL
10299 unset LC_CTYPE
10300 unset LANGUAGE
10301 GROFF_NO_SGR=stupid
10302 export GROFF_NO_SGR
10303
10304 CF_EOF
10305
10306 NROFF_OPTS=
10307 if test "x$cf_with_groff" = xyes
10308 then
10309 MAN2HTML_NOTE="$GROFF_NOTE"
10310 MAN2HTML_PATH="$GROFF_PATH"
10311 cat >>$MAN2HTML_TEMP <<CF_EOF
10312 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
10313 CF_EOF
10314 else
10315 # disable hyphenation if this is groff
10316 if test "x$GROFF_PATH" != xno
10317 then
10318 echo "$as_me:10318: checking if nroff is really groff" >&5
10319 echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
10320 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
10321 test -n "$cf_check_groff" && cf_check_groff=yes
10322 test -n "$cf_check_groff" || cf_check_groff=no
10323 echo "$as_me:10323: result: $cf_check_groff" >&5
10324 echo "${ECHO_T}$cf_check_groff" >&6
10325 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
10326 fi
10327 MAN2HTML_NOTE=""
10328
10329 if test "x$prefix" != xNONE; then
10330 cf_path_syntax="$prefix"
10331 else
10332 cf_path_syntax="$ac_default_prefix"
10333 fi
10334
10335 case "x$cf_man2html" in
10336 (x\$\(*\)*|x\'*\'*)
10337 ;;
10338 (x.|x$GLOB_FULLPATH_POSIX|x$GLOB_FULLPATH_OTHER)
10339 ;;
10340 (x\$\{*prefix\}*|x\$\{*dir\}*)
10341 eval cf_man2html="$cf_man2html"
10342 case "x$cf_man2html" in
10343 (xNONE/*)
10344 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
10345 ;;
10346 esac
10347 ;;
10348 (xno|xNONE/*)
10349 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
10350 ;;
10351 (*)
10352 { { echo "$as_me:10352: error: expected a pathname, not \"$cf_man2html\"" >&5
10353 echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
10354 { (exit 1); exit 1; }; }
10355 ;;
10356 esac
10357
10358 MAN2HTML_PATH="$cf_man2html"
10359 echo "$as_me:10359: checking for $cf_man2html top/bottom margins" >&5
10360 echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
10361
10362 # for this example, expect 3 lines of content, the remainder is head/foot
10363 cat >conftest.in <<CF_EOF
10364 .TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
10365 .SH SECTION
10366 MARKER
10367 CF_EOF
10368
10369 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
10370
10371 cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
10372 cf_man2html_top=`expr "$cf_man2html_1st" - 2`
10373 cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
10374 cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
10375 cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
10376
10377 echo "$as_me:10377: result: $cf_man2html_top_bot" >&5
10378 echo "${ECHO_T}$cf_man2html_top_bot" >&6
10379
10380 echo "$as_me:10380: checking for pagesize to use" >&5
10381 echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
10382 for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
10383 do
10384 cat >>conftest.in <<CF_EOF
10385 .nf
10386 0
10387 1
10388 2
10389 3
10390 4
10391 5
10392 6
10393 7
10394 8
10395 9
10396 CF_EOF
10397 done
10398
10399 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
10400 cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
10401 test -z "$cf_man2html_page" && cf_man2html_page=99999
10402 test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
10403
10404 rm -rf conftest*
10405 echo "$as_me:10405: result: $cf_man2html_page" >&5
10406 echo "${ECHO_T}$cf_man2html_page" >&6
10407
10408 cat >>$MAN2HTML_TEMP <<CF_EOF
10409 : \${MAN2HTML_PATH=$MAN2HTML_PATH}
10410 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
10411 case \${TYPE} in
10412 (ms)
10413 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
10414 ;;
10415 (*)
10416 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
10417 ;;
10418 esac
10419 CF_EOF
10420 fi
10421
10422 chmod 700 $MAN2HTML_TEMP
10423
10424 echo "$as_me:10424: checking if you want to use dmalloc for testing" >&5
10425 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10426
10427 # Check whether --with-dmalloc or --without-dmalloc was given.
10428 if test "${with_dmalloc+set}" = set; then
10429 withval="$with_dmalloc"
10430 case "x$withval" in
10431 (x|xno) ;;
10432 (*)
10433 : "${with_cflags:=-g}"
10434 : "${enable_leaks:=no}"
10435 with_dmalloc=yes
10436
10437 cat >>confdefs.h <<EOF
10438 #define USE_DMALLOC 1
10439 EOF
10440
10441 ;;
10442 esac
10443 else
10444 with_dmalloc=
10445 fi;
10446 echo "$as_me:10446: result: ${with_dmalloc:-no}" >&5
10447 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10448
10449 case ".$with_cflags" in
10450 (.*-g*)
10451 case .$CFLAGS in
10452 (.*-g*)
10453 ;;
10454 (*)
10455
10456 cf_fix_cppflags=no
10457 cf_new_cflags=
10458 cf_new_cppflags=
10459 cf_new_extra_cppflags=
10460
10461 for cf_add_cflags in -g
10462 do
10463 case "$cf_fix_cppflags" in
10464 (no)
10465 case "$cf_add_cflags" in
10466 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10467 case "$cf_add_cflags" in
10468 (-D*)
10469 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10470
10471 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10472 && test -z "${cf_tst_cflags}" \
10473 && cf_fix_cppflags=yes
10474
10475 if test "$cf_fix_cppflags" = yes ; then
10476
10477 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10478 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10479
10480 continue
10481 elif test "${cf_tst_cflags}" = "\"'" ; then
10482
10483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10485
10486 continue
10487 fi
10488 ;;
10489 esac
10490 case "$CPPFLAGS" in
10491 (*$cf_add_cflags)
10492 ;;
10493 (*)
10494 case "$cf_add_cflags" in
10495 (-D*)
10496 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10497
10498 CPPFLAGS=`echo "$CPPFLAGS" | \
10499 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10500 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10501
10502 ;;
10503 esac
10504
10505 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10506 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10507
10508 ;;
10509 esac
10510 ;;
10511 (*)
10512
10513 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10514 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10515
10516 ;;
10517 esac
10518 ;;
10519 (yes)
10520
10521 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10522 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10523
10524 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10525
10526 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10527 && test -z "${cf_tst_cflags}" \
10528 && cf_fix_cppflags=no
10529 ;;
10530 esac
10531 done
10532
10533 if test -n "$cf_new_cflags" ; then
10534
10535 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10536 CFLAGS="${CFLAGS}$cf_new_cflags"
10537
10538 fi
10539
10540 if test -n "$cf_new_cppflags" ; then
10541
10542 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10543 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10544
10545 fi
10546
10547 if test -n "$cf_new_extra_cppflags" ; then
10548
10549 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10550 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10551
10552 fi
10553
10554 ;;
10555 esac
10556 ;;
10557 esac
10558
10559 if test "$with_dmalloc" = yes ; then
10560 echo "$as_me:10560: checking for dmalloc.h" >&5
10561 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10562 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10563 echo $ECHO_N "(cached) $ECHO_C" >&6
10564 else
10565 cat >"conftest.$ac_ext" <<_ACEOF
10566 #line 10566 "configure"
10567 #include "confdefs.h"
10568 #include <dmalloc.h>
10569 _ACEOF
10570 if { (eval echo "$as_me:10570: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10571 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10572 ac_status=$?
10573 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10574 rm -f conftest.er1
10575 cat conftest.err >&5
10576 echo "$as_me:10576: \$? = $ac_status" >&5
10577 (exit "$ac_status"); } >/dev/null; then
10578 if test -s conftest.err; then
10579 ac_cpp_err=$ac_c_preproc_warn_flag
10580 else
10581 ac_cpp_err=
10582 fi
10583 else
10584 ac_cpp_err=yes
10585 fi
10586 if test -z "$ac_cpp_err"; then
10587 ac_cv_header_dmalloc_h=yes
10588 else
10589 echo "$as_me: failed program was:" >&5
10590 cat "conftest.$ac_ext" >&5
10591 ac_cv_header_dmalloc_h=no
10592 fi
10593 rm -f conftest.err "conftest.$ac_ext"
10594 fi
10595 echo "$as_me:10595: result: $ac_cv_header_dmalloc_h" >&5
10596 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10597 if test "$ac_cv_header_dmalloc_h" = yes; then
10598
10599 echo "$as_me:10599: checking for dmalloc_debug in -ldmalloc" >&5
10600 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10601 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10602 echo $ECHO_N "(cached) $ECHO_C" >&6
10603 else
10604 ac_check_lib_save_LIBS=$LIBS
10605 LIBS="-ldmalloc $LIBS"
10606 cat >"conftest.$ac_ext" <<_ACEOF
10607 #line 10607 "configure"
10608 #include "confdefs.h"
10609
10610 /* Override any gcc2 internal prototype to avoid an error. */
10611 #ifdef __cplusplus
10612 extern "C"
10613 #endif
10614 /* We use char because int might match the return type of a gcc2
10615 builtin and then its argument prototype would still apply. */
10616 char dmalloc_debug (void);
10617 int
10618 main (void)
10619 {
10620 dmalloc_debug ();
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 ac_cv_lib_dmalloc_dmalloc_debug=yes
10638 else
10639 echo "$as_me: failed program was:" >&5
10640 cat "conftest.$ac_ext" >&5
10641 ac_cv_lib_dmalloc_dmalloc_debug=no
10642 fi
10643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10644 LIBS=$ac_check_lib_save_LIBS
10645 fi
10646 echo "$as_me:10646: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10647 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10648 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
10649 cat >>confdefs.h <<EOF
10650 #define HAVE_LIBDMALLOC 1
10651 EOF
10652
10653 LIBS="-ldmalloc $LIBS"
10654
10655 fi
10656
10657 fi
10658
10659 fi
10660
10661 echo "$as_me:10661: checking if you want to use dbmalloc for testing" >&5
10662 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10663
10664 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10665 if test "${with_dbmalloc+set}" = set; then
10666 withval="$with_dbmalloc"
10667 case "x$withval" in
10668 (x|xno) ;;
10669 (*)
10670 : "${with_cflags:=-g}"
10671 : "${enable_leaks:=no}"
10672 with_dbmalloc=yes
10673
10674 cat >>confdefs.h <<EOF
10675 #define USE_DBMALLOC 1
10676 EOF
10677
10678 ;;
10679 esac
10680 else
10681 with_dbmalloc=
10682 fi;
10683 echo "$as_me:10683: result: ${with_dbmalloc:-no}" >&5
10684 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10685
10686 case ".$with_cflags" in
10687 (.*-g*)
10688 case .$CFLAGS in
10689 (.*-g*)
10690 ;;
10691 (*)
10692
10693 cf_fix_cppflags=no
10694 cf_new_cflags=
10695 cf_new_cppflags=
10696 cf_new_extra_cppflags=
10697
10698 for cf_add_cflags in -g
10699 do
10700 case "$cf_fix_cppflags" in
10701 (no)
10702 case "$cf_add_cflags" in
10703 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10704 case "$cf_add_cflags" in
10705 (-D*)
10706 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10707
10708 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10709 && test -z "${cf_tst_cflags}" \
10710 && cf_fix_cppflags=yes
10711
10712 if test "$cf_fix_cppflags" = yes ; then
10713
10714 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10715 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10716
10717 continue
10718 elif test "${cf_tst_cflags}" = "\"'" ; then
10719
10720 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10721 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10722
10723 continue
10724 fi
10725 ;;
10726 esac
10727 case "$CPPFLAGS" in
10728 (*$cf_add_cflags)
10729 ;;
10730 (*)
10731 case "$cf_add_cflags" in
10732 (-D*)
10733 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10734
10735 CPPFLAGS=`echo "$CPPFLAGS" | \
10736 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10737 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10738
10739 ;;
10740 esac
10741
10742 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10743 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10744
10745 ;;
10746 esac
10747 ;;
10748 (*)
10749
10750 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10751 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10752
10753 ;;
10754 esac
10755 ;;
10756 (yes)
10757
10758 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10759 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10760
10761 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10762
10763 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10764 && test -z "${cf_tst_cflags}" \
10765 && cf_fix_cppflags=no
10766 ;;
10767 esac
10768 done
10769
10770 if test -n "$cf_new_cflags" ; then
10771
10772 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10773 CFLAGS="${CFLAGS}$cf_new_cflags"
10774
10775 fi
10776
10777 if test -n "$cf_new_cppflags" ; then
10778
10779 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10780 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10781
10782 fi
10783
10784 if test -n "$cf_new_extra_cppflags" ; then
10785
10786 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10787 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10788
10789 fi
10790
10791 ;;
10792 esac
10793 ;;
10794 esac
10795
10796 if test "$with_dbmalloc" = yes ; then
10797 echo "$as_me:10797: checking for dbmalloc.h" >&5
10798 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
10799 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
10800 echo $ECHO_N "(cached) $ECHO_C" >&6
10801 else
10802 cat >"conftest.$ac_ext" <<_ACEOF
10803 #line 10803 "configure"
10804 #include "confdefs.h"
10805 #include <dbmalloc.h>
10806 _ACEOF
10807 if { (eval echo "$as_me:10807: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10808 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10809 ac_status=$?
10810 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10811 rm -f conftest.er1
10812 cat conftest.err >&5
10813 echo "$as_me:10813: \$? = $ac_status" >&5
10814 (exit "$ac_status"); } >/dev/null; then
10815 if test -s conftest.err; then
10816 ac_cpp_err=$ac_c_preproc_warn_flag
10817 else
10818 ac_cpp_err=
10819 fi
10820 else
10821 ac_cpp_err=yes
10822 fi
10823 if test -z "$ac_cpp_err"; then
10824 ac_cv_header_dbmalloc_h=yes
10825 else
10826 echo "$as_me: failed program was:" >&5
10827 cat "conftest.$ac_ext" >&5
10828 ac_cv_header_dbmalloc_h=no
10829 fi
10830 rm -f conftest.err "conftest.$ac_ext"
10831 fi
10832 echo "$as_me:10832: result: $ac_cv_header_dbmalloc_h" >&5
10833 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10834 if test "$ac_cv_header_dbmalloc_h" = yes; then
10835
10836 echo "$as_me:10836: checking for debug_malloc in -ldbmalloc" >&5
10837 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10838 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10839 echo $ECHO_N "(cached) $ECHO_C" >&6
10840 else
10841 ac_check_lib_save_LIBS=$LIBS
10842 LIBS="-ldbmalloc $LIBS"
10843 cat >"conftest.$ac_ext" <<_ACEOF
10844 #line 10844 "configure"
10845 #include "confdefs.h"
10846
10847 /* Override any gcc2 internal prototype to avoid an error. */
10848 #ifdef __cplusplus
10849 extern "C"
10850 #endif
10851 /* We use char because int might match the return type of a gcc2
10852 builtin and then its argument prototype would still apply. */
10853 char debug_malloc (void);
10854 int
10855 main (void)
10856 {
10857 debug_malloc ();
10858 ;
10859 return 0;
10860 }
10861 _ACEOF
10862 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10863 if { (eval echo "$as_me:10863: \"$ac_link\"") >&5
10864 (eval $ac_link) 2>&5
10865 ac_status=$?
10866 echo "$as_me:10866: \$? = $ac_status" >&5
10867 (exit "$ac_status"); } &&
10868 { ac_try='test -s "conftest$ac_exeext"'
10869 { (eval echo "$as_me:10869: \"$ac_try\"") >&5
10870 (eval $ac_try) 2>&5
10871 ac_status=$?
10872 echo "$as_me:10872: \$? = $ac_status" >&5
10873 (exit "$ac_status"); }; }; then
10874 ac_cv_lib_dbmalloc_debug_malloc=yes
10875 else
10876 echo "$as_me: failed program was:" >&5
10877 cat "conftest.$ac_ext" >&5
10878 ac_cv_lib_dbmalloc_debug_malloc=no
10879 fi
10880 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10881 LIBS=$ac_check_lib_save_LIBS
10882 fi
10883 echo "$as_me:10883: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10884 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10885 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
10886 cat >>confdefs.h <<EOF
10887 #define HAVE_LIBDBMALLOC 1
10888 EOF
10889
10890 LIBS="-ldbmalloc $LIBS"
10891
10892 fi
10893
10894 fi
10895
10896 fi
10897
10898 echo "$as_me:10898: checking if you want to use valgrind for testing" >&5
10899 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10900
10901 # Check whether --with-valgrind or --without-valgrind was given.
10902 if test "${with_valgrind+set}" = set; then
10903 withval="$with_valgrind"
10904 case "x$withval" in
10905 (x|xno) ;;
10906 (*)
10907 : "${with_cflags:=-g}"
10908 : "${enable_leaks:=no}"
10909 with_valgrind=yes
10910
10911 cat >>confdefs.h <<EOF
10912 #define USE_VALGRIND 1
10913 EOF
10914
10915 ;;
10916 esac
10917 else
10918 with_valgrind=
10919 fi;
10920 echo "$as_me:10920: result: ${with_valgrind:-no}" >&5
10921 echo "${ECHO_T}${with_valgrind:-no}" >&6
10922
10923 case ".$with_cflags" in
10924 (.*-g*)
10925 case .$CFLAGS in
10926 (.*-g*)
10927 ;;
10928 (*)
10929
10930 cf_fix_cppflags=no
10931 cf_new_cflags=
10932 cf_new_cppflags=
10933 cf_new_extra_cppflags=
10934
10935 for cf_add_cflags in -g
10936 do
10937 case "$cf_fix_cppflags" in
10938 (no)
10939 case "$cf_add_cflags" in
10940 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10941 case "$cf_add_cflags" in
10942 (-D*)
10943 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10944
10945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10946 && test -z "${cf_tst_cflags}" \
10947 && cf_fix_cppflags=yes
10948
10949 if test "$cf_fix_cppflags" = yes ; then
10950
10951 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10952 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10953
10954 continue
10955 elif test "${cf_tst_cflags}" = "\"'" ; then
10956
10957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10959
10960 continue
10961 fi
10962 ;;
10963 esac
10964 case "$CPPFLAGS" in
10965 (*$cf_add_cflags)
10966 ;;
10967 (*)
10968 case "$cf_add_cflags" in
10969 (-D*)
10970 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10971
10972 CPPFLAGS=`echo "$CPPFLAGS" | \
10973 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10974 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10975
10976 ;;
10977 esac
10978
10979 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10980 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10981
10982 ;;
10983 esac
10984 ;;
10985 (*)
10986
10987 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10988 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10989
10990 ;;
10991 esac
10992 ;;
10993 (yes)
10994
10995 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10996 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10997
10998 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10999
11000 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11001 && test -z "${cf_tst_cflags}" \
11002 && cf_fix_cppflags=no
11003 ;;
11004 esac
11005 done
11006
11007 if test -n "$cf_new_cflags" ; then
11008
11009 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11010 CFLAGS="${CFLAGS}$cf_new_cflags"
11011
11012 fi
11013
11014 if test -n "$cf_new_cppflags" ; then
11015
11016 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11017 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11018
11019 fi
11020
11021 if test -n "$cf_new_extra_cppflags" ; then
11022
11023 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11024 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11025
11026 fi
11027
11028 ;;
11029 esac
11030 ;;
11031 esac
11032
11033 echo "$as_me:11033: checking if you want to perform memory-leak testing" >&5
11034 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11035
11036 # Check whether --enable-leaks or --disable-leaks was given.
11037 if test "${enable_leaks+set}" = set; then
11038 enableval="$enable_leaks"
11039 enable_leaks=$enableval
11040 else
11041 enable_leaks=yes
11042 fi;
11043 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
11044 echo "$as_me:11044: result: $with_no_leaks" >&5
11045 echo "${ECHO_T}$with_no_leaks" >&6
11046
11047 if test "$enable_leaks" = no ; then
11048
11049 cat >>confdefs.h <<\EOF
11050 #define NO_LEAKS 1
11051 EOF
11052
11053 cat >>confdefs.h <<\EOF
11054 #define YY_NO_LEAKS 1
11055 EOF
11056
11057 fi
11058
11059 echo "$as_me:11059: checking if you want to enable debugging trace" >&5
11060 echo $ECHO_N "checking if you want to enable debugging trace... $ECHO_C" >&6
11061
11062 # Check whether --enable-trace or --disable-trace was given.
11063 if test "${enable_trace+set}" = set; then
11064 enableval="$enable_trace"
11065 test "$enableval" != yes && enableval=no
11066 if test "$enableval" != "no" ; then
11067 with_trace=yes
11068 else
11069 with_trace=no
11070 fi
11071 else
11072 enableval=no
11073 with_trace=no
11074
11075 fi;
11076 echo "$as_me:11076: result: $with_trace" >&5
11077 echo "${ECHO_T}$with_trace" >&6
11078 if test "$with_trace" = "yes"
11079 then
11080
11081 cat >>confdefs.h <<\EOF
11082 #define OPT_TRACE 1
11083 EOF
11084
11085 fi
11086
11087 if test "$with_trace" != no
11088 then
11089 EXTRASRCS="$EXTRASRCS trace.c"
11090 EXTRAOBJS="$EXTRAOBJS trace\$o"
11091 fi
11092
11093 LD_RPATH_OPT=
11094 if test "x$cf_cv_enable_rpath" != xno
11095 then
11096 echo "$as_me:11096: checking for an rpath option" >&5
11097 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11098 case "$cf_cv_system_name" in
11099 (irix*)
11100 if test "$GCC" = yes; then
11101 LD_RPATH_OPT="-Wl,-rpath,"
11102 else
11103 LD_RPATH_OPT="-rpath "
11104 fi
11105 ;;
11106 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11107 LD_RPATH_OPT="-Wl,-rpath,"
11108 ;;
11109 (openbsd[2-9].*|mirbsd*)
11110 LD_RPATH_OPT="-Wl,-rpath,"
11111 ;;
11112 (dragonfly*)
11113 LD_RPATH_OPT="-rpath "
11114 ;;
11115 (netbsd*)
11116 LD_RPATH_OPT="-Wl,-rpath,"
11117 ;;
11118 (osf*|mls+*)
11119 LD_RPATH_OPT="-rpath "
11120 ;;
11121 (solaris2*)
11122 LD_RPATH_OPT="-R"
11123 ;;
11124 (*)
11125 ;;
11126 esac
11127 echo "$as_me:11127: result: $LD_RPATH_OPT" >&5
11128 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11129
11130 case "x$LD_RPATH_OPT" in
11131 (x-R*)
11132 echo "$as_me:11132: checking if we need a space after rpath option" >&5
11133 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11134 cf_save_LIBS="$LIBS"
11135
11136 cf_add_libs="$LIBS"
11137 # reverse order
11138 cf_add_0lib=
11139 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11140 # filter duplicates
11141 for cf_add_1lib in $cf_add_0lib; do
11142 for cf_add_2lib in $cf_add_libs; do
11143 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11144 cf_add_1lib=
11145 break
11146 fi
11147 done
11148 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11149 done
11150 LIBS="$cf_add_libs"
11151
11152 cat >"conftest.$ac_ext" <<_ACEOF
11153 #line 11153 "configure"
11154 #include "confdefs.h"
11155
11156 int
11157 main (void)
11158 {
11159
11160 ;
11161 return 0;
11162 }
11163 _ACEOF
11164 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11165 if { (eval echo "$as_me:11165: \"$ac_link\"") >&5
11166 (eval $ac_link) 2>&5
11167 ac_status=$?
11168 echo "$as_me:11168: \$? = $ac_status" >&5
11169 (exit "$ac_status"); } &&
11170 { ac_try='test -s "conftest$ac_exeext"'
11171 { (eval echo "$as_me:11171: \"$ac_try\"") >&5
11172 (eval $ac_try) 2>&5
11173 ac_status=$?
11174 echo "$as_me:11174: \$? = $ac_status" >&5
11175 (exit "$ac_status"); }; }; then
11176 cf_rpath_space=no
11177 else
11178 echo "$as_me: failed program was:" >&5
11179 cat "conftest.$ac_ext" >&5
11180 cf_rpath_space=yes
11181 fi
11182 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11183 LIBS="$cf_save_LIBS"
11184 echo "$as_me:11184: result: $cf_rpath_space" >&5
11185 echo "${ECHO_T}$cf_rpath_space" >&6
11186 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11187 ;;
11188 esac
11189 fi
11190
11191 echo "$as_me:11191: checking if rpath-hack should be disabled" >&5
11192 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
11193
11194 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
11195 if test "${enable_rpath_hack+set}" = set; then
11196 enableval="$enable_rpath_hack"
11197 test "$enableval" != no && enableval=yes
11198 if test "$enableval" != "yes" ; then
11199 enable_rpath_hack=no
11200 else
11201 enable_rpath_hack=yes
11202 fi
11203 else
11204 enableval=yes
11205 enable_rpath_hack=yes
11206
11207 fi;
11208 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
11209 echo "$as_me:11209: result: $cf_disable_rpath_hack" >&5
11210 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
11211
11212 if test "$enable_rpath_hack" = yes ; then
11213
11214 echo "$as_me:11214: checking for updated LDFLAGS" >&5
11215 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
11216 if test -n "$LD_RPATH_OPT" ; then
11217 echo "$as_me:11217: result: maybe" >&5
11218 echo "${ECHO_T}maybe" >&6
11219
11220 for ac_prog in ldd
11221 do
11222 # Extract the first word of "$ac_prog", so it can be a program name with args.
11223 set dummy $ac_prog; ac_word=$2
11224 echo "$as_me:11224: checking for $ac_word" >&5
11225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11226 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
11227 echo $ECHO_N "(cached) $ECHO_C" >&6
11228 else
11229 if test -n "$cf_ldd_prog"; then
11230 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
11231 else
11232 ac_save_IFS=$IFS; IFS=$ac_path_separator
11233 ac_dummy="$PATH"
11234 for ac_dir in $ac_dummy; do
11235 IFS=$ac_save_IFS
11236 test -z "$ac_dir" && ac_dir=.
11237 $as_executable_p "$ac_dir/$ac_word" || continue
11238 ac_cv_prog_cf_ldd_prog="$ac_prog"
11239 echo "$as_me:11239: found $ac_dir/$ac_word" >&5
11240 break
11241 done
11242
11243 fi
11244 fi
11245 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
11246 if test -n "$cf_ldd_prog"; then
11247 echo "$as_me:11247: result: $cf_ldd_prog" >&5
11248 echo "${ECHO_T}$cf_ldd_prog" >&6
11249 else
11250 echo "$as_me:11250: result: no" >&5
11251 echo "${ECHO_T}no" >&6
11252 fi
11253
11254 test -n "$cf_ldd_prog" && break
11255 done
11256 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
11257
11258 cf_rpath_list="/usr/lib /lib"
11259 if test "$cf_ldd_prog" != no
11260 then
11261 cf_rpath_oops=
11262
11263 cat >"conftest.$ac_ext" <<_ACEOF
11264 #line 11264 "configure"
11265 #include "confdefs.h"
11266 #include <stdio.h>
11267 int
11268 main (void)
11269 {
11270 printf("Hello");
11271 ;
11272 return 0;
11273 }
11274 _ACEOF
11275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11276 if { (eval echo "$as_me:11276: \"$ac_link\"") >&5
11277 (eval $ac_link) 2>&5
11278 ac_status=$?
11279 echo "$as_me:11279: \$? = $ac_status" >&5
11280 (exit "$ac_status"); } &&
11281 { ac_try='test -s "conftest$ac_exeext"'
11282 { (eval echo "$as_me:11282: \"$ac_try\"") >&5
11283 (eval $ac_try) 2>&5
11284 ac_status=$?
11285 echo "$as_me:11285: \$? = $ac_status" >&5
11286 (exit "$ac_status"); }; }; then
11287 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
11288 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
11289 else
11290 echo "$as_me: failed program was:" >&5
11291 cat "conftest.$ac_ext" >&5
11292 fi
11293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11294
11295 # If we passed the link-test, but get a "not found" on a given library,
11296 # this could be due to inept reconfiguration of gcc to make it only
11297 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
11298 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
11299 # /usr/local libraries.
11300 if test -n "$cf_rpath_oops"
11301 then
11302 for cf_rpath_src in $cf_rpath_oops
11303 do
11304 for cf_rpath_dir in \
11305 /usr/local \
11306 /usr/pkg \
11307 /opt/sfw
11308 do
11309 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
11310 then
11311 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
11312
11313 echo "${as_me:-configure}:11313: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
11314
11315 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
11316 break
11317 fi
11318 done
11319 done
11320 fi
11321 fi
11322
11323 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
11324
11325 echo "${as_me:-configure}:11325: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
11326
11327 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
11328
11329 echo "${as_me:-configure}:11329: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
11330
11331 cf_rpath_dst=
11332 for cf_rpath_src in $LDFLAGS
11333 do
11334 case "$cf_rpath_src" in
11335 (-L*)
11336
11337 # check if this refers to a directory which we will ignore
11338 cf_rpath_skip=no
11339 if test -n "$cf_rpath_list"
11340 then
11341 for cf_rpath_item in $cf_rpath_list
11342 do
11343 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
11344 then
11345 cf_rpath_skip=yes
11346 break
11347 fi
11348 done
11349 fi
11350
11351 if test "$cf_rpath_skip" = no
11352 then
11353 # transform the option
11354 if test "$LD_RPATH_OPT" = "-R " ; then
11355 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
11356 else
11357 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
11358 fi
11359
11360 # if we have not already added this, add it now
11361 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
11362 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
11363 then
11364 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
11365
11366 echo "${as_me:-configure}:11366: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
11367
11368 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
11369 fi
11370 fi
11371 ;;
11372 esac
11373 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
11374 done
11375 LDFLAGS=$cf_rpath_dst
11376
11377 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
11378
11379 echo "${as_me:-configure}:11379: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
11380
11381 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
11382
11383 echo "${as_me:-configure}:11383: testing ...checking LIBS $LIBS ..." 1>&5
11384
11385 cf_rpath_dst=
11386 for cf_rpath_src in $LIBS
11387 do
11388 case "$cf_rpath_src" in
11389 (-L*)
11390
11391 # check if this refers to a directory which we will ignore
11392 cf_rpath_skip=no
11393 if test -n "$cf_rpath_list"
11394 then
11395 for cf_rpath_item in $cf_rpath_list
11396 do
11397 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
11398 then
11399 cf_rpath_skip=yes
11400 break
11401 fi
11402 done
11403 fi
11404
11405 if test "$cf_rpath_skip" = no
11406 then
11407 # transform the option
11408 if test "$LD_RPATH_OPT" = "-R " ; then
11409 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
11410 else
11411 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
11412 fi
11413
11414 # if we have not already added this, add it now
11415 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
11416 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
11417 then
11418 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
11419
11420 echo "${as_me:-configure}:11420: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
11421
11422 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
11423 fi
11424 fi
11425 ;;
11426 esac
11427 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
11428 done
11429 LIBS=$cf_rpath_dst
11430
11431 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
11432
11433 echo "${as_me:-configure}:11433: testing ...checked LIBS $LIBS ..." 1>&5
11434
11435 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
11436
11437 echo "${as_me:-configure}:11437: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
11438
11439 else
11440 echo "$as_me:11440: result: no" >&5
11441 echo "${ECHO_T}no" >&6
11442 fi
11443
11444 fi
11445
11446 ac_config_files="$ac_config_files Makefile"
11447 ac_config_commands="$ac_config_commands default"
11448 cat >confcache <<\_ACEOF
11449 # This file is a shell script that caches the results of configure
11450 # tests run on this system so they can be shared between configure
11451 # scripts and configure runs, see configure's option --config-cache.
11452 # It is not useful on other systems. If it contains results you don't
11453 # want to keep, you may remove or edit it.
11454 #
11455 # config.status only pays attention to the cache file if you give it
11456 # the --recheck option to rerun configure.
11457 #
11458 # `ac_cv_env_foo' variables (set or unset) will be overridden when
11459 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11460 # following values.
11461
11462 _ACEOF
11463
11464 # The following way of writing the cache mishandles newlines in values,
11465 # but we know of no workaround that is simple, portable, and efficient.
11466 # So, don't put newlines in cache variables' values.
11467 # Ultrix sh set writes to stderr and can't be redirected directly,
11468 # and sets the high bit in the cache file unless we assign to the vars.
11469 {
11470 (set) 2>&1 |
11471 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11472 *ac_space=\ *)
11473 # `set' does not quote correctly, so add quotes (double-quote
11474 # substitution turns \\\\ into \\, and sed turns \\ into \).
11475 sed -n \
11476 "s/'/'\\\\''/g;
11477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11478 ;;
11479 *)
11480 # `set' quotes correctly as required by POSIX, so do not add quotes.
11481 sed -n \
11482 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11483 ;;
11484 esac;
11485 } |
11486 sed '
11487 t clear
11488 : clear
11489 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11490 t end
11491 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11492 : end' >>confcache
11493 if cmp -s $cache_file confcache; then :; else
11494 if test -w $cache_file; then
11495 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11496 cat confcache >$cache_file
11497 else
11498 echo "not updating unwritable cache $cache_file"
11499 fi
11500 fi
11501 rm -f confcache
11502
11503 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11504 # Let make expand exec_prefix.
11505 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11506
11507 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11508 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11509 # trailing colons and then remove the whole line if VPATH becomes empty
11510 # (actually we leave an empty line to preserve line numbers).
11511 if test "x$srcdir" = x.; then
11512 ac_vpsub='/^[ ]*VPATH[ ]*=/{
11513 s/:*\$(srcdir):*/:/;
11514 s/:*\${srcdir}:*/:/;
11515 s/:*@srcdir@:*/:/;
11516 s/^\([^=]*=[ ]*\):*/\1/;
11517 s/:*$//;
11518 s/^[^=]*=[ ]*$//;
11519 }'
11520 fi
11521
11522 DEFS=-DHAVE_CONFIG_H
11523
11524 : "${CONFIG_STATUS=./config.status}"
11525 ac_clean_files_save=$ac_clean_files
11526 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11527 { echo "$as_me:11527: creating $CONFIG_STATUS" >&5
11528 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11529 cat >"$CONFIG_STATUS" <<_ACEOF
11530 #! $SHELL
11531 # Generated automatically by configure.
11532 # Run this file to recreate the current configuration.
11533 # Compiler output produced by configure, useful for debugging
11534 # configure, is in config.log if it exists.
11535
11536 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
11537
11538 debug=false
11539 SHELL=\${CONFIG_SHELL-$SHELL}
11540 ac_cs_invocation="\$0 \$@"
11541
11542 CLICOLOR_FORCE= GREP_OPTIONS=
11543 unset CLICOLOR_FORCE GREP_OPTIONS
11544 _ACEOF
11545
11546 cat >>"$CONFIG_STATUS" <<\_ACEOF
11547 # Be Bourne compatible
11548 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11549 emulate sh
11550 NULLCMD=:
11551 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11552 set -o posix
11553 fi
11554
11555 # Name of the executable.
11556 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11557
11558 if expr a : '\(a\)' >/dev/null 2>&1; then
11559 as_expr="expr"
11560 else
11561 as_expr="false"
11562 fi
11563
11564 rm -f conf$$ conf$$.exe conf$$.file
11565 echo >conf$$.file
11566 if ln -s conf$$.file conf$$ 2>/dev/null; then
11567 # We could just check for DJGPP; but this test a) works b) is more generic
11568 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11569 if test -f conf$$.exe; then
11570 # Don't use ln at all; we don't have any links
11571 as_ln_s='cp -p'
11572 else
11573 as_ln_s='ln -s'
11574 fi
11575 elif ln conf$$.file conf$$ 2>/dev/null; then
11576 as_ln_s='ln'
11577 else
11578 as_ln_s='cp -p'
11579 fi
11580 rm -f conf$$ conf$$.exe conf$$.file
11581
11582 as_executable_p="test -f"
11583
11584 # Support unset when possible.
11585 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11586 as_unset="unset"
11587 else
11588 as_unset="false"
11589 fi
11590
11591 # NLS nuisances.
11592 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11593 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11594 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11595 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11596 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11597 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11598 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11599 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11600
11601 # IFS
11602 # We need space, tab and new line, in precisely that order.
11603 as_nl='
11604 '
11605 IFS=" $as_nl"
11606
11607 # CDPATH.
11608 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11609
11610 exec 6>&1
11611
11612 _ACEOF
11613
11614 # Files that config.status was made for.
11615 if test -n "$ac_config_files"; then
11616 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
11617 fi
11618
11619 if test -n "$ac_config_headers"; then
11620 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
11621 fi
11622
11623 if test -n "$ac_config_links"; then
11624 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
11625 fi
11626
11627 if test -n "$ac_config_commands"; then
11628 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
11629 fi
11630
11631 cat >>"$CONFIG_STATUS" <<\EOF
11632
11633 ac_cs_usage="\
11634 \`$as_me' instantiates files from templates according to the
11635 current configuration.
11636
11637 Usage: $0 [OPTIONS] [FILE]...
11638
11639 -h, --help print this help, then exit
11640 -V, --version print version number, then exit
11641 -d, --debug don't remove temporary files
11642 --recheck update $as_me by reconfiguring in the same conditions
11643 --file=FILE[:TEMPLATE]
11644 instantiate the configuration file FILE
11645 --header=FILE[:TEMPLATE]
11646 instantiate the configuration header FILE
11647
11648 Configuration files:
11649 $config_files
11650
11651 Configuration headers:
11652 $config_headers
11653
11654 Configuration commands:
11655 $config_commands
11656
11657 Report bugs to <[email protected]>."
11658 EOF
11659
11660 cat >>"$CONFIG_STATUS" <<EOF
11661 ac_cs_version="\\
11662 config.status
11663 configured by $0, generated by GNU Autoconf 2.52.20250126,
11664 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11665
11666 Copyright 2003-2022,2023 Thomas E. Dickey
11667 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11668 Free Software Foundation, Inc.
11669 This config.status script is free software; the Free Software Foundation
11670 gives unlimited permission to copy, distribute and modify it."
11671 srcdir="$srcdir"
11672 INSTALL="$INSTALL"
11673 EOF
11674
11675 cat >>"$CONFIG_STATUS" <<\EOF
11676 # If no file are specified by the user, then we need to provide default
11677 # value. By we need to know if files were specified by the user.
11678 ac_need_defaults=:
11679 while test $# != 0
11680 do
11681 case $1 in
11682 --*=*)
11683 ac_option=`expr "x$1" : 'x\([^=]*\)='`
11684 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11685 shift
11686 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11687 shift
11688 ;;
11689 -*);;
11690 *) # This is not an option, so the user has probably given explicit
11691 # arguments.
11692 ac_need_defaults=false;;
11693 esac
11694
11695 case $1 in
11696 # Handling of the options.
11697 EOF
11698 cat >>"$CONFIG_STATUS" <<EOF
11699 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11700 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11701 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11702 EOF
11703 cat >>"$CONFIG_STATUS" <<\EOF
11704 --version | --vers* | -V )
11705 echo "$ac_cs_version"; exit 0 ;;
11706 --he | --h)
11707 # Conflict between --help and --header
11708 { { echo "$as_me:11708: error: ambiguous option: $1
11709 Try \`$0 --help' for more information." >&5
11710 echo "$as_me: error: ambiguous option: $1
11711 Try \`$0 --help' for more information." >&2;}
11712 { (exit 1); exit 1; }; };;
11713 --help | --hel | -h )
11714 echo "$ac_cs_usage"; exit 0 ;;
11715 --debug | --d* | -d )
11716 debug=: ;;
11717 --file | --fil | --fi | --f )
11718 shift
11719 CONFIG_FILES="$CONFIG_FILES $1"
11720 ac_need_defaults=false;;
11721 --header | --heade | --head | --hea )
11722 shift
11723 CONFIG_HEADERS="$CONFIG_HEADERS $1"
11724 ac_need_defaults=false;;
11725
11726 # This is an error.
11727 -*) { { echo "$as_me:11727: error: unrecognized option: $1
11728 Try \`$0 --help' for more information." >&5
11729 echo "$as_me: error: unrecognized option: $1
11730 Try \`$0 --help' for more information." >&2;}
11731 { (exit 1); exit 1; }; } ;;
11732
11733 *) ac_config_targets="$ac_config_targets $1" ;;
11734
11735 esac
11736 shift
11737 done
11738
11739 exec 5>>config.log
11740 cat >&5 << _ACEOF
11741
11742 ## ----------------------- ##
11743 ## Running config.status. ##
11744 ## ----------------------- ##
11745
11746 This file was extended by $as_me 2.52.20250126, executed with
11747 CONFIG_FILES = $CONFIG_FILES
11748 CONFIG_HEADERS = $CONFIG_HEADERS
11749 CONFIG_LINKS = $CONFIG_LINKS
11750 CONFIG_COMMANDS = $CONFIG_COMMANDS
11751 > "$ac_cs_invocation"
11752 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11753
11754 _ACEOF
11755 EOF
11756
11757 cat >>"$CONFIG_STATUS" <<\EOF
11758 for ac_config_target in $ac_config_targets
11759 do
11760 case "$ac_config_target" in
11761 # Handling of arguments.
11762 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11763 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11764 "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config_h.in" ;;
11765 *) { { echo "$as_me:11765: error: invalid argument: $ac_config_target" >&5
11766 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11767 { (exit 1); exit 1; }; };;
11768 esac
11769 done
11770
11771 # If the user did not use the arguments to specify the items to instantiate,
11772 # then the envvar interface is used. Set only those that are not.
11773 # We use the long form for the default assignment because of an extremely
11774 # bizarre bug on SunOS 4.1.3.
11775 if "$ac_need_defaults"; then
11776 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11777 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11778 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11779 fi
11780
11781 # Create a temporary directory, and hook for its removal unless debugging.
11782 $debug ||
11783 {
11784 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11785 trap '{ (exit 1); exit 1; }' 1 2 13 15
11786 }
11787
11788 # Create a (secure) tmp directory for tmp files.
11789 : "${TMPDIR=/tmp}"
11790 {
11791 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11792 test -n "$tmp" && test -d "$tmp"
11793 } ||
11794 {
11795 tmp=$TMPDIR/cs$$-$RANDOM
11796 (umask 077 && mkdir "$tmp")
11797 } ||
11798 {
11799 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11800 { (exit 1); exit 1; }
11801 }
11802
11803 EOF
11804
11805 cat >>"$CONFIG_STATUS" <<EOF
11806
11807 #
11808 # CONFIG_FILES section.
11809 #
11810
11811 # No need to generate the scripts if there are no CONFIG_FILES.
11812 # This happens for instance when ./config.status config.h
11813 if test -n "\$CONFIG_FILES"; then
11814 # Protect against being on the right side of a sed subst in config.status.
11815 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11816 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
11817 s,@X_CFLAGS@,$X_CFLAGS,;t t
11818 s,@X_LIBS@,$X_LIBS,;t t
11819 s,@SHELL@,$SHELL,;t t
11820 s,@exec_prefix@,$exec_prefix,;t t
11821 s,@prefix@,$prefix,;t t
11822 s,@program_transform_name@,$program_transform_name,;t t
11823 s,@bindir@,$bindir,;t t
11824 s,@sbindir@,$sbindir,;t t
11825 s,@libexecdir@,$libexecdir,;t t
11826 s,@datarootdir@,$datarootdir,;t t
11827 s,@datadir@,$datadir,;t t
11828 s,@sysconfdir@,$sysconfdir,;t t
11829 s,@sharedstatedir@,$sharedstatedir,;t t
11830 s,@localstatedir@,$localstatedir,;t t
11831 s,@runstatedir@,$runstatedir,;t t
11832 s,@libdir@,$libdir,;t t
11833 s,@includedir@,$includedir,;t t
11834 s,@oldincludedir@,$oldincludedir,;t t
11835 s,@infodir@,$infodir,;t t
11836 s,@mandir@,$mandir,;t t
11837 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11838 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11839 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11840 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11841 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11842 s,@build_alias@,$build_alias,;t t
11843 s,@host_alias@,$host_alias,;t t
11844 s,@target_alias@,$target_alias,;t t
11845 s,@ECHO_C@,$ECHO_C,;t t
11846 s,@ECHO_N@,$ECHO_N,;t t
11847 s,@ECHO_T@,$ECHO_T,;t t
11848 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11849 s,@DEFS@,$DEFS,;t t
11850 s,@LIBS@,$LIBS,;t t
11851 s,@build@,$build,;t t
11852 s,@build_cpu@,$build_cpu,;t t
11853 s,@build_vendor@,$build_vendor,;t t
11854 s,@build_os@,$build_os,;t t
11855 s,@host@,$host,;t t
11856 s,@host_cpu@,$host_cpu,;t t
11857 s,@host_vendor@,$host_vendor,;t t
11858 s,@host_os@,$host_os,;t t
11859 s,@target@,$target,;t t
11860 s,@target_cpu@,$target_cpu,;t t
11861 s,@target_vendor@,$target_vendor,;t t
11862 s,@target_os@,$target_os,;t t
11863 s,@GLOB_FULLPATH_POSIX@,$GLOB_FULLPATH_POSIX,;t t
11864 s,@GLOB_FULLPATH_OTHER@,$GLOB_FULLPATH_OTHER,;t t
11865 s,@CC@,$CC,;t t
11866 s,@CFLAGS@,$CFLAGS,;t t
11867 s,@LDFLAGS@,$LDFLAGS,;t t
11868 s,@CPPFLAGS@,$CPPFLAGS,;t t
11869 s,@ac_ct_CC@,$ac_ct_CC,;t t
11870 s,@EXEEXT@,$EXEEXT,;t t
11871 s,@OBJEXT@,$OBJEXT,;t t
11872 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
11873 s,@CPP@,$CPP,;t t
11874 s,@GREP@,$GREP,;t t
11875 s,@EGREP@,$EGREP,;t t
11876 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11877 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11878 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11879 s,@LINT@,$LINT,;t t
11880 s,@LINT_OPTS@,$LINT_OPTS,;t t
11881 s,@LINT_LIBS@,$LINT_LIBS,;t t
11882 s,@CTAGS@,$CTAGS,;t t
11883 s,@ETAGS@,$ETAGS,;t t
11884 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
11885 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
11886 s,@ECHO_LT@,$ECHO_LT,;t t
11887 s,@ECHO_LD@,$ECHO_LD,;t t
11888 s,@RULE_CC@,$RULE_CC,;t t
11889 s,@SHOW_CC@,$SHOW_CC,;t t
11890 s,@ECHO_CC@,$ECHO_CC,;t t
11891 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
11892 s,@FGREP@,$FGREP,;t t
11893 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
11894 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
11895 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
11896 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
11897 s,@LIBICONV@,$LIBICONV,;t t
11898 s,@ENCODINGS_DIR_FILE@,$ENCODINGS_DIR_FILE,;t t
11899 s,@LOCALE_ALIAS_FILE@,$LOCALE_ALIAS_FILE,;t t
11900 s,@GROFF_PATH@,$GROFF_PATH,;t t
11901 s,@NROFF_PATH@,$NROFF_PATH,;t t
11902 s,@TBL_PATH@,$TBL_PATH,;t t
11903 s,@GROFF_NOTE@,$GROFF_NOTE,;t t
11904 s,@NROFF_NOTE@,$NROFF_NOTE,;t t
11905 s,@cf_man2html@,$cf_man2html,;t t
11906 s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
11907 s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
11908 s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
11909 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
11910 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
11911 s,@EXTRASRCS@,$EXTRASRCS,;t t
11912 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
11913 CEOF
11914
11915 EOF
11916
11917 cat >>"$CONFIG_STATUS" <<\EOF
11918 # Split the substitutions into bite-sized pieces for seds with
11919 # small command number limits, like on Digital OSF/1 and HP-UX.
11920 ac_max_sed_lines=48
11921 ac_sed_frag=1 # Number of current file.
11922 ac_beg=1 # First line for current file.
11923 ac_end=$ac_max_sed_lines # Line after last line for current file.
11924 ac_more_lines=:
11925 ac_sed_cmds=
11926 while "$ac_more_lines"; do
11927 if test "$ac_beg" -gt 1; then
11928 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
11929 else
11930 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
11931 fi
11932 if test ! -s "$tmp"/subs.frag; then
11933 ac_more_lines=false
11934 else
11935 # The purpose of the label and of the branching condition is to
11936 # speed up the sed processing (if there are no `@' at all, there
11937 # is no need to browse any of the substitutions).
11938 # These are the two extra sed commands mentioned above.
11939 (echo ':t
11940 /@[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
11941 # It is possible to make a multiline substitution using escaped newlines.
11942 # Ensure that we do not split the substitution between script fragments.
11943 ac_BEG=$ac_end
11944 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
11945 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
11946 if test -s "$tmp"/subs.next; then
11947 grep '^s,@[^@,][^@,]*@,.*$' "$tmp"/subs.next | grep -v '^s,@.*;t t$' >"$tmp"/subs.edit
11948 if test ! -s "$tmp"/subs.edit; then
11949 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
11950 if test ! -s "$tmp"/subs.edit; then
11951 if test "$ac_beg" -gt 1; then
11952 ac_end=`expr "$ac_end" - 1`
11953 continue
11954 fi
11955 fi
11956 fi
11957 fi
11958
11959 if test -z "$ac_sed_cmds"; then
11960 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
11961 else
11962 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
11963 fi
11964 ac_sed_frag=`expr "$ac_sed_frag" + 1`
11965 ac_beg=$ac_end
11966 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
11967 fi
11968 done
11969 if test -z "$ac_sed_cmds"; then
11970 ac_sed_cmds="cat"
11971 fi
11972 fi # test -n "$CONFIG_FILES"
11973
11974 EOF
11975 cat >>"$CONFIG_STATUS" <<\EOF
11976 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
11977 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11978 case "$ac_file" in
11979 - | *:- | *:-:* ) # input from stdin
11980 cat >"$tmp"/stdin
11981 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11982 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11983 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11984 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11985 * ) ac_file_in=$ac_file.in ;;
11986 esac
11987
11988 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11989 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11990 X"$ac_file" : 'X\(//\)[^/]' \| \
11991 X"$ac_file" : 'X\(//\)$' \| \
11992 X"$ac_file" : 'X\(/\)' \| \
11993 . : '\(.\)' 2>/dev/null ||
11994 echo X"$ac_file" |
11995 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11996 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11997 /^X\(\/\/\)$/{ s//\1/; q; }
11998 /^X\(\/\).*/{ s//\1/; q; }
11999 s/.*/./; q'`
12000 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12001 { case "$ac_dir" in
12002 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12003 *) as_incr_dir=.;;
12004 esac
12005 as_dummy="$ac_dir"
12006 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12007 case $as_mkdir_dir in
12008 # Skip DOS drivespec
12009 ?:) as_incr_dir=$as_mkdir_dir ;;
12010 *)
12011 as_incr_dir=$as_incr_dir/$as_mkdir_dir
12012 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12013 ;;
12014 esac
12015 done; }
12016
12017 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
12018 # A "../" for each directory in $ac_dir_suffix.
12019 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12020 else
12021 ac_dir_suffix= ac_dots=
12022 fi
12023
12024 case "$srcdir" in
12025 .) ac_srcdir=.
12026 if test -z "$ac_dots"; then
12027 ac_top_srcdir=.
12028 else
12029 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
12030 fi ;;
12031 [\\/]* | ?:[\\/]* )
12032 ac_srcdir="$srcdir$ac_dir_suffix";
12033 ac_top_srcdir="$srcdir" ;;
12034 *) # Relative path.
12035 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
12036 ac_top_srcdir="$ac_dots$srcdir" ;;
12037 esac
12038
12039 case $INSTALL in
12040 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12041 *) ac_INSTALL=$ac_dots$INSTALL ;;
12042 esac
12043
12044 if test x"$ac_file" != x-; then
12045 { echo "$as_me:12045: creating $ac_file" >&5
12046 echo "$as_me: creating $ac_file" >&6;}
12047 rm -f "$ac_file"
12048 fi
12049 # Let's still pretend it is `configure' which instantiates (i.e., don't
12050 # use $as_me), people would be surprised to read:
12051 # /* config.h. Generated automatically by config.status. */
12052 configure_input="Generated automatically from `echo $ac_file_in |
12053 sed 's,.*/,,'` by configure."
12054
12055 # First look for the input files in the build tree, otherwise in the
12056 # src tree.
12057 ac_file_inputs=`IFS=:
12058 for f in $ac_file_in; do
12059 case $f in
12060 -) echo "$tmp"/stdin ;;
12061 [\\/$]*)
12062 # Absolute (can't be DOS-style, as IFS=:)
12063 test -f "$f" || { { echo "$as_me:12063: error: cannot find input file: $f" >&5
12064 echo "$as_me: error: cannot find input file: $f" >&2;}
12065 { (exit 1); exit 1; }; }
12066 echo "$f";;
12067 *) # Relative
12068 if test -f "$f"; then
12069 # Build tree
12070 echo "$f"
12071 elif test -f "$srcdir/$f"; then
12072 # Source tree
12073 echo "$srcdir/$f"
12074 else
12075 # /dev/null tree
12076 { { echo "$as_me:12076: error: cannot find input file: $f" >&5
12077 echo "$as_me: error: cannot find input file: $f" >&2;}
12078 { (exit 1); exit 1; }; }
12079 fi;;
12080 esac
12081 done` || { (exit 1); exit 1; }
12082 EOF
12083 cat >>"$CONFIG_STATUS" <<\EOF
12084 ac_warn_datarootdir=no
12085 if test x"$ac_file" != x-; then
12086 for ac_item in $ac_file_inputs
12087 do
12088 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
12089 if test -n "$ac_seen"; then
12090 ac_used=`grep '@datarootdir@' "$ac_item"`
12091 if test -z "$ac_used"; then
12092 { echo "$as_me:12092: WARNING: datarootdir was used implicitly but not set:
12093 $ac_seen" >&5
12094 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
12095 $ac_seen" >&2;}
12096 ac_warn_datarootdir=yes
12097 fi
12098 fi
12099 ac_seen=`grep '${datarootdir}' "$ac_item"`
12100 if test -n "$ac_seen"; then
12101 { echo "$as_me:12101: WARNING: datarootdir was used explicitly but not set:
12102 $ac_seen" >&5
12103 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
12104 $ac_seen" >&2;}
12105 ac_warn_datarootdir=yes
12106 fi
12107 done
12108 fi
12109
12110 if test "x$ac_warn_datarootdir" = xyes; then
12111 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
12112 fi
12113
12114 EOF
12115 cat >>"$CONFIG_STATUS" <<EOF
12116 sed "$ac_vpsub
12117 $extrasub
12118 EOF
12119 cat >>"$CONFIG_STATUS" <<\EOF
12120 :t
12121 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12122 s,@configure_input@,$configure_input,;t t
12123 s,@srcdir@,$ac_srcdir,;t t
12124 s,@top_srcdir@,$ac_top_srcdir,;t t
12125 s,@INSTALL@,$ac_INSTALL,;t t
12126 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
12127 rm -f "$tmp"/stdin
12128 EOF
12129 test -n "${FGREP}" || FGREP="grep -F"
12130 test -n "${EGREP}" || EGREP="grep -E"
12131 cat >>"$CONFIG_STATUS" <<EOF
12132 test -n "\${FGREP}" || FGREP="$FGREP"
12133 test -n "\${EGREP}" || EGREP="$EGREP"
12134 EOF
12135 cat >>"$CONFIG_STATUS" <<\EOF
12136 if test x"$ac_file" != x-; then
12137 cp "$tmp/out" "$ac_file"
12138
12139 for ac_name in prefix exec_prefix datarootdir
12140 do
12141 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
12142 if test -n "$ac_seen"; then
12143 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
12144 if test -z "$ac_init"; then
12145 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
12146 { echo "$as_me:12146: WARNING: Variable $ac_name is used but was not set:
12147 $ac_seen" >&5
12148 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
12149 $ac_seen" >&2;}
12150 fi
12151 fi
12152 done
12153 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
12154 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
12155 if test -s "$tmp"/out; then
12156 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
12157 { echo "$as_me:12157: WARNING: Some variables may not be substituted:
12158 $ac_seen" >&5
12159 echo "$as_me: WARNING: Some variables may not be substituted:
12160 $ac_seen" >&2;}
12161 fi
12162 else
12163 cat "$tmp"/out
12164 fi
12165 rm -f "$tmp"/out
12166
12167 done
12168 EOF
12169 cat >>"$CONFIG_STATUS" <<\EOF
12170
12171 #
12172 # CONFIG_HEADER section.
12173 #
12174
12175 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12176 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12177 #
12178 # ac_d sets the value in "#define NAME VALUE" lines.
12179 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
12180 ac_dB='[ ].*$,\1#\2'
12181 ac_dC=' '
12182 ac_dD=',;t'
12183 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12184 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
12185 ac_iB='\([ ]\),\1#\2define\3'
12186 ac_iC=' '
12187 ac_iD='\4,;t'
12188 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12189 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
12190 ac_uB='$,\1#\2define\3'
12191 ac_uC=' '
12192 ac_uD=',;t'
12193
12194 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12195 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12196 case "$ac_file" in
12197 - | *:- | *:-:* ) # input from stdin
12198 cat >"$tmp"/stdin
12199 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12200 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12201 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12202 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12203 * ) ac_file_in=$ac_file.in ;;
12204 esac
12205
12206 test x"$ac_file" != x- && { echo "$as_me:12206: creating $ac_file" >&5
12207 echo "$as_me: creating $ac_file" >&6;}
12208
12209 # First look for the input files in the build tree, otherwise in the
12210 # src tree.
12211 ac_file_inputs=`IFS=:
12212 for f in $ac_file_in; do
12213 case $f in
12214 -) echo "$tmp"/stdin ;;
12215 [\\/$]*)
12216 # Absolute (can't be DOS-style, as IFS=:)
12217 test -f "$f" || { { echo "$as_me:12217: error: cannot find input file: $f" >&5
12218 echo "$as_me: error: cannot find input file: $f" >&2;}
12219 { (exit 1); exit 1; }; }
12220 echo $f;;
12221 *) # Relative
12222 if test -f "$f"; then
12223 # Build tree
12224 echo $f
12225 elif test -f "$srcdir/$f"; then
12226 # Source tree
12227 echo "$srcdir/$f"
12228 else
12229 # /dev/null tree
12230 { { echo "$as_me:12230: error: cannot find input file: $f" >&5
12231 echo "$as_me: error: cannot find input file: $f" >&2;}
12232 { (exit 1); exit 1; }; }
12233 fi;;
12234 esac
12235 done` || { (exit 1); exit 1; }
12236 # Remove the trailing spaces.
12237 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
12238
12239 EOF
12240
12241 # Transform confdefs.h into a list of #define's. We won't use it as a sed
12242 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
12243 # be either 'cat' or 'sort'.
12244 cat confdefs.h | uniq >conftest.vals
12245
12246 # Break up conftest.vals because some shells have a limit on
12247 # the size of here documents, and old seds have small limits too.
12248
12249 rm -f conftest.tail
12250 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
12251 while grep . conftest.vals >/dev/null
12252 do
12253 # Write chunks of a limited-size here document to conftest.frag.
12254 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
12255 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
12256 echo 'CEOF' >> "$CONFIG_STATUS"
12257 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
12258 rm -f conftest.vals
12259 mv conftest.tail conftest.vals
12260 done
12261 rm -f conftest.vals
12262
12263 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12264 # marker @DEFS@.
12265 echo ' cat >> conftest.edit <<CEOF
12266 /@DEFS@/r conftest.frag
12267 /@DEFS@/d
12268 CEOF
12269 sed -f conftest.edit "$tmp"/in > "$tmp"/out
12270 rm -f "$tmp"/in
12271 mv "$tmp"/out "$tmp"/in
12272 rm -f conftest.edit conftest.frag
12273 ' >> "$CONFIG_STATUS"
12274
12275 cat >>"$CONFIG_STATUS" <<\EOF
12276 # Let's still pretend it is `configure' which instantiates (i.e., don't
12277 # use $as_me), people would be surprised to read:
12278 # /* config.h. Generated automatically by config.status. */
12279 if test x"$ac_file" = x-; then
12280 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
12281 else
12282 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
12283 fi
12284 cat "$tmp"/in >>"$tmp"/config.h
12285 rm -f "$tmp"/in
12286 if test x"$ac_file" != x-; then
12287 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
12288 { echo "$as_me:12288: $ac_file is unchanged" >&5
12289 echo "$as_me: $ac_file is unchanged" >&6;}
12290 else
12291 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12292 X"$ac_file" : 'X\(//\)[^/]' \| \
12293 X"$ac_file" : 'X\(//\)$' \| \
12294 X"$ac_file" : 'X\(/\)' \| \
12295 . : '\(.\)' 2>/dev/null ||
12296 echo X"$ac_file" |
12297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12298 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12299 /^X\(\/\/\)$/{ s//\1/; q; }
12300 /^X\(\/\).*/{ s//\1/; q; }
12301 s/.*/./; q'`
12302 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12303 { case "$ac_dir" in
12304 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12305 *) as_incr_dir=.;;
12306 esac
12307 as_dummy="$ac_dir"
12308 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12309 case $as_mkdir_dir in
12310 # Skip DOS drivespec
12311 ?:) as_incr_dir=$as_mkdir_dir ;;
12312 *)
12313 as_incr_dir=$as_incr_dir/$as_mkdir_dir
12314 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12315 ;;
12316 esac
12317 done; }
12318
12319 fi
12320 rm -f "$ac_file"
12321 mv "$tmp/config.h" "$ac_file"
12322 fi
12323 else
12324 cat "$tmp"/config.h
12325 rm -f "$tmp"/config.h
12326 fi
12327 done
12328 EOF
12329
12330 cat >>"$CONFIG_STATUS" <<\EOF
12331
12332 { (exit 0); exit 0; }
12333 EOF
12334 chmod +x "$CONFIG_STATUS"
12335 ac_clean_files=$ac_clean_files_save
12336
12337 # configure is writing to config.log, and then calls config.status.
12338 # config.status does its own redirection, appending to config.log.
12339 # Unfortunately, on DOS this fails, as config.log is still kept open
12340 # by configure, so config.status won't be able to write to it; its
12341 # output is simply discarded. So we exec the FD to /dev/null,
12342 # effectively closing config.log, so it can be properly (re)opened and
12343 # appended to by config.status. When coming back to configure, we
12344 # need to make the FD available again.
12345 if test "$no_create" != yes; then
12346 ac_cs_success=:
12347 exec 5>/dev/null
12348 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
12349 exec 5>>config.log
12350 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12351 # would make configure fail if this is the last instruction.
12352 "$ac_cs_success" || { (exit 1); exit 1; }
12353 fi
12354
12355 test -z "$cf_make_docs" && cf_make_docs=0
12356
12357 cf_output=makefile
12358 test -f "$cf_output" || cf_output=Makefile
12359
12360 if test "$cf_make_docs" = 0
12361 then
12362 cat >>$cf_output <<CF_EOF
12363 ################################################################################
12364 ## generated by CF_MAKE_DOCS
12365 .SUFFIXES : .html .\$(manext) .man .ps .pdf .txt
12366
12367 ${NROFF_NOTE}.\$(manext).txt :
12368 ${NROFF_NOTE} \$(SHELL) -c "tbl \$*.\$(manext) | nroff -man | col -bx" >\$@
12369
12370 ${GROFF_NOTE}.ps.pdf :
12371 ${GROFF_NOTE} ps2pdf \$*.ps
12372 ${GROFF_NOTE}
12373 ${GROFF_NOTE}.\$(manext).ps :
12374 ${GROFF_NOTE} \$(SHELL) -c "tbl \$*.\$(manext) | groff -man" >\$@
12375 ${GROFF_NOTE}
12376 ${GROFF_NOTE}.\$(manext).txt :
12377 ${GROFF_NOTE} GROFF_NO_SGR=stupid \$(SHELL) -c "tbl \$*.\$(manext) | nroff -rHY=0 -Tascii -man | col -bx" >\$@
12378
12379 ${MAN2HTML_NOTE}.\$(manext).html :
12380 ${MAN2HTML_NOTE} ./${MAN2HTML_TEMP} \$* \$(manext) man >\$@
12381
12382 CF_EOF
12383 cf_make_docs=1
12384 fi
12385
12386 for cf_name in luit
12387 do
12388 cat >>$cf_output <<CF_EOF
12389 ################################################################################
12390 ${NROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
12391 ${MAN2HTML_NOTE}docs docs-$cf_name :: $cf_name.html
12392 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.pdf
12393 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.ps
12394 ${GROFF_NOTE}docs docs-$cf_name :: $cf_name.txt
12395
12396 clean \\
12397 docs-clean ::
12398 ${NROFF_NOTE} rm -f $cf_name.txt
12399 ${MAN2HTML_NOTE} rm -f $cf_name.html
12400 ${GROFF_NOTE} rm -f $cf_name.pdf
12401 ${GROFF_NOTE} rm -f $cf_name.ps
12402 ${GROFF_NOTE} rm -f $cf_name.txt
12403
12404 ${NROFF_NOTE}$cf_name.txt : $cf_name.\$(manext)
12405 ${MAN2HTML_NOTE}$cf_name.html : $cf_name.\$(manext)
12406 ${GROFF_NOTE}$cf_name.pdf : $cf_name.ps
12407 ${GROFF_NOTE}$cf_name.ps : $cf_name.\$(manext)
12408 ${GROFF_NOTE}$cf_name.txt : $cf_name.\$(manext)
12409 CF_EOF
12410 done
12411