configure revision 1.1.1.20 1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20231210.
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="charproc.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 -*) { echo "$as_me: error: unrecognized option: $ac_option
484 Try \`$0 --help' for more information." >&2
485 { (exit 1); exit 1; }; }
486 ;;
487
488 *=*)
489 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
490 # Reject names that are not valid shell variable names.
491 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
492 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
493 { (exit 1); exit 1; }; }
494 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
495 eval "$ac_envvar='$ac_optarg'"
496 export "$ac_envvar" ;;
497
498 *)
499 # FIXME: should be removed in autoconf 3.0.
500 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
501 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
502 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
504 ;;
505
506 esac
507 done
508
509 if test -n "$ac_prev"; then
510 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
511 { echo "$as_me: error: missing argument to $ac_option" >&2
512 { (exit 1); exit 1; }; }
513 fi
514
515 # Be sure to have absolute paths.
516 for ac_var in exec_prefix prefix
517 do
518 eval ac_val=$`echo "$ac_var"`
519 case "$ac_val" in
520 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
521 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522 { (exit 1); exit 1; }; };;
523 esac
524 done
525
526 # Be sure to have absolute paths.
527 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
528 localstatedir libdir includedir oldincludedir infodir mandir
529 do
530 eval ac_val=$`echo "$ac_var"`
531 case "$ac_val" in
532 [\\/$]* | ?:[\\/]* ) ;;
533 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
534 { (exit 1); exit 1; }; };;
535 esac
536 done
537
538 # There might be people who depend on the old broken behavior: `$host'
539 # used to hold the argument of --host etc.
540 build=$build_alias
541 host=$host_alias
542 target=$target_alias
543
544 # FIXME: should be removed in autoconf 3.0.
545 if test "x$host_alias" != x; then
546 if test "x$build_alias" = x; then
547 cross_compiling=maybe
548 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
549 If a cross compiler is detected then cross compile mode will be used." >&2
550 elif test "x$build_alias" != "x$host_alias"; then
551 cross_compiling=yes
552 fi
553 fi
554
555 ac_tool_prefix=
556 test -n "$host_alias" && ac_tool_prefix=$host_alias-
557
558 test "$silent" = yes && exec 6>/dev/null
559
560 # Find the source files, if location was not specified.
561 if test -z "$srcdir"; then
562 ac_srcdir_defaulted=yes
563 # Try the directory containing this script, then its parent.
564 ac_prog=$0
565 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
566 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567 srcdir=$ac_confdir
568 if test ! -r "$srcdir/$ac_unique_file"; then
569 srcdir=..
570 fi
571 else
572 ac_srcdir_defaulted=no
573 fi
574 if test ! -r "$srcdir/$ac_unique_file"; then
575 if test "$ac_srcdir_defaulted" = yes; then
576 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
577 { (exit 1); exit 1; }; }
578 else
579 { echo "$as_me: error: cannot find sources in $srcdir" >&2
580 { (exit 1); exit 1; }; }
581 fi
582 fi
583 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
584 ac_env_build_alias_set=${build_alias+set}
585 ac_env_build_alias_value=$build_alias
586 ac_cv_env_build_alias_set=${build_alias+set}
587 ac_cv_env_build_alias_value=$build_alias
588 ac_env_host_alias_set=${host_alias+set}
589 ac_env_host_alias_value=$host_alias
590 ac_cv_env_host_alias_set=${host_alias+set}
591 ac_cv_env_host_alias_value=$host_alias
592 ac_env_target_alias_set=${target_alias+set}
593 ac_env_target_alias_value=$target_alias
594 ac_cv_env_target_alias_set=${target_alias+set}
595 ac_cv_env_target_alias_value=$target_alias
596 ac_env_CC_set=${CC+set}
597 ac_env_CC_value=$CC
598 ac_cv_env_CC_set=${CC+set}
599 ac_cv_env_CC_value=$CC
600 ac_env_CFLAGS_set=${CFLAGS+set}
601 ac_env_CFLAGS_value=$CFLAGS
602 ac_cv_env_CFLAGS_set=${CFLAGS+set}
603 ac_cv_env_CFLAGS_value=$CFLAGS
604 ac_env_LDFLAGS_set=${LDFLAGS+set}
605 ac_env_LDFLAGS_value=$LDFLAGS
606 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
607 ac_cv_env_LDFLAGS_value=$LDFLAGS
608 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
609 ac_env_CPPFLAGS_value=$CPPFLAGS
610 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
611 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
612 ac_env_CPP_set=${CPP+set}
613 ac_env_CPP_value=$CPP
614 ac_cv_env_CPP_set=${CPP+set}
615 ac_cv_env_CPP_value=$CPP
616
617 #
618 # Report the --help message.
619 #
620 if test "$ac_init_help" = "long"; then
621 # Omit some internal or obsolete options to make the list less imposing.
622 # This message is too long to be a string in the A/UX 3.1 sh.
623 cat <<EOF
624 \`configure' configures this package to adapt to many kinds of systems.
625
626 Usage: $0 [OPTION]... [VAR=VALUE]...
627
628 To assign environment variables (e.g., CC, CFLAGS...), specify them as
629 VAR=VALUE. See below for descriptions of some of the useful variables.
630
631 Defaults for the options are specified in brackets.
632
633 Configuration:
634 -h, --help display this help and exit
635 --help=short display options specific to this package
636 --help=recursive display the short help of all the included packages
637 -V, --version display version information and exit
638 -q, --quiet, --silent do not print \`checking...' messages
639 --cache-file=FILE cache test results in FILE [disabled]
640 -C, --config-cache alias for \`--cache-file=config.cache'
641 -n, --no-create do not create output files
642 --srcdir=DIR find the sources in DIR [configure dir or \`..']
643
644 EOF
645
646 cat <<EOF
647 Installation directories:
648 --prefix=PREFIX install architecture-independent files in PREFIX
649 [$ac_default_prefix]
650 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
651 [PREFIX]
652
653 By default, \`make install' will install all the files in
654 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
655 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
656 for instance \`--prefix=\$HOME'.
657
658 For better control, use the options below.
659
660 Fine tuning of the installation directories:
661 --bindir=DIR user executables [EPREFIX/bin]
662 --sbindir=DIR system admin executables [EPREFIX/sbin]
663 --libexecdir=DIR program executables [EPREFIX/libexec]
664 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
665 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
666 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
667 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
668 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
669 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
670 --libdir=DIR object code libraries [EPREFIX/lib]
671 --includedir=DIR C header files [PREFIX/include]
672 --oldincludedir=DIR C header files for non-gcc [/usr/include]
673 --infodir=DIR info documentation [DATAROOTDIR/info]
674 --mandir=DIR man documentation [DATAROOTDIR/man]
675 EOF
676
677 cat <<\EOF
678
679 Program names:
680 --program-prefix=PREFIX prepend PREFIX to installed program names
681 --program-suffix=SUFFIX append SUFFIX to installed program names
682 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
683
684 X features:
685 --x-includes=DIR X include files are in DIR
686 --x-libraries=DIR X library files are in DIR
687
688 System types:
689 --build=BUILD configure for building on BUILD [guessed]
690 --host=HOST build programs to run on HOST [BUILD]
691 EOF
692 fi
693
694 if test -n "$ac_init_help"; then
695
696 cat <<\EOF
697
698 Optional Features:
699 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
700 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
701
702 Optional Packages:
703 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
704 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
705
706 Compile/Install Options:
707 --disable-full-tgetent disable check for full tgetent function
708 --with-app-class=XXX override X applications class (default XTerm)
709 --with-app-defaults=DIR directory in which to install resource files (EPREFIX/lib/X11/app-defaults)
710 --with-icon-name[=XXX] override icon name (default: mini.xterm)
711 --with-icon-symlink[=XXX] make symbolic link for icon name (default: xterm)
712 --with-pixmapdir=DIR directory in which to install pixmaps (DATADIR/pixmaps)
713 --with-icondir=DIR directory in which to install icons for desktop
714 --with-icon-theme[=XXX] install icons into desktop theme (hicolor)
715 --disable-desktop disable install of xterm desktop files
716 --with-desktop-category=XXX one or more desktop categories or auto
717 --with-reference=XXX program to use as permissions-reference
718 --with-xterm-symlink[=XXX] make symbolic link to installed xterm
719 --disable-openpty disable openpty, prefer other interfaces
720 --disable-setuid disable setuid in xterm, do not install setuid/setgid
721 --disable-setgid disable setgid in xterm, do not install setuid/setgid
722 --with-setuid[=XXX] use the given setuid user
723 --with-utmp-setgid[=XXX] use setgid to match utmp/utmpx file
724 --with-utempter use utempter library for access to utmp
725 --with-utmp-path=XXX use XXX rather than auto for utmp path
726 --with-wtmp-path=XXX use XXX rather than auto for wtmp path
727 --with-tty-group[=XXX] use XXX for the tty-group
728 --with-x use the X Window System
729 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
730 --with-xpm[=DIR] use Xpm library for colored icon, may specify path
731 --without-xinerama do not use Xinerama extension for multiscreen support
732 --with-Xaw3d link with Xaw 3d library
733 --with-Xaw3dxft link with Xaw 3d xft library
734 --with-neXtaw link with neXT Athena library
735 --with-XawPlus link with Athena-Plus library
736 --disable-xcursor disable cursorTheme resource
737 --enable-narrowproto enable narrow prototypes for X libraries
738 --disable-imake disable use of imake for definitions
739 --with-man2html[=XXX] use XXX rather than groff
740 Terminal Configuration:
741 --with-terminal-id=V set default decTerminalID (default: vt420)
742 --with-terminal-type=T set default $TERM (default: xterm)
743 --enable-backarrow-key set default backarrowKey resource (default: true)
744 --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
745 --enable-delete-is-del set default deleteIsDEL resource (default: maybe)
746 --enable-pty-erase set default ptyInitialErase resource (default: maybe)
747 --enable-alt-sends-esc set default altSendsEscape resource (default: no)
748 --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
749 --with-own-terminfo[=P] set default $TERMINFO (default: from environment)
750 --enable-env-terminfo setenv $TERMINFO if --with-own-terminfo gives value
751 Optional Features:
752 --disable-active-icon disable X11R6.3 active-icon feature
753 --disable-ansi-color disable ANSI color
754 --disable-16-color disable 16-color support
755 --disable-256-color disable 256-color support
756 --disable-direct-color disable direct-color support
757 --disable-88-color disable 88-color support
758 --disable-blink-cursor disable support for blinking cursor
759 --enable-broken-osc allow broken Linux OSC-strings
760 --disable-broken-st disallow broken string-terminators
761 --enable-builtin-xpms compile-in icon data
762 --disable-c1-print disallow -k8 option for printable 128-159
763 --disable-bold-color disable PC-style mapping of bold colors
764 --disable-color-class disable separate color class resources
765 --disable-color-mode disable default colorMode resource
766 --disable-highlighting disable support for color highlighting
767 --disable-doublechars disable support for double-size chars
768 --disable-boxchars disable fallback-support for box chars
769 --disable-exec-selection disable "exec-formatted" and "exec-selection" actions
770 --enable-exec-xterm enable "spawn-new-terminal" action
771 --enable-double-buffer enable double-buffering in default resources
772 --disable-freetype disable freetype library-support
773 --with-freetype-config configure script to use for FreeType
774 --with-freetype-cflags -D/-I options for compiling with FreeType
775 --with-freetype-libs -L/-l options to link FreeType
776 --enable-hp-fkeys enable support for HP-style function keys
777 --enable-sco-fkeys enable support for SCO-style function keys
778 --disable-sun-fkeys disable support for Sun-style function keys
779 --disable-fifo-lines disable FIFO-storage for saved-lines
780 --disable-i18n disable internationalization
781 --disable-initial-erase disable setup for stty erase
782 --disable-input-method disable input-method
783 --enable-load-vt-fonts enable load-vt-fonts() action
784 --enable-logging enable logging
785 --enable-logfile-exec enable exec'd logfile filter
786 --disable-maximize disable actions for iconify/deiconify/maximize/restore
787 --disable-num-lock disable NumLock keypad support
788 --disable-paste64 disable get/set base64 selection data
789 --disable-pty-handshake disable pty-handshake support
790 --disable-readline-mouse disable support for mouse in readline applications
791 --disable-regex disable regular-expression selections
792 --with-pcre2 use PCRE2 for regular-expressions
793 --with-pcre use PCRE for regular-expressions
794 --disable-rightbar disable right-scrollbar support
795 --disable-samename disable check for redundant name-change
796 --disable-selection-ops disable selection-action operations
797 --disable-session-mgt disable support for session management
798 --enable-status-line enable support for status-line
799 --disable-tcap-fkeys disable termcap function-keys support
800 --disable-tcap-query disable compiled-in termcap-query support
801 --disable-tek4014 disable tek4014 emulation
802 --enable-toolbar compile-in toolbar for pulldown menus
803 --disable-vt52 disable VT52 emulation
804 --disable-wide-attrs disable wide-attribute support
805 --disable-wide-chars disable wide-character support
806 --enable-16bit-chars enable 16-bit character support
807 --enable-mini-luit enable mini-luit (built-in Latin9 support)
808 --disable-luit enable luit filter (Unicode translation)
809 --enable-dabbrev enable dynamic-abbreviation support
810 --enable-dec-locator enable DECterm Locator support
811 --disable-screen-dumps disable XHTML and SVG screen dumps
812 --enable-regis-graphics enable ReGIS graphics support
813 --disable-sixel-graphics disable sixel graphics support
814 --disable-print-graphics disable screen dump to sixel support
815 --disable-rectangles disable VT420 rectangle support
816 --disable-ziconbeep disable -ziconbeep option
817 Testing/development Options:
818 --enable-trace test: set to enable debugging traces
819 --with-dmalloc test: use Gray Watson's dmalloc library
820 --with-dbmalloc test: use Conor Cahill's dbmalloc library
821 --with-valgrind test: use valgrind
822 --disable-leaks test: free permanent memory, analyze leaks
823 --disable-echo do not display "compiling" commands
824 --enable-xmc-glitch test: enable xmc magic-cookie emulation
825 --enable-warnings test: turn on gcc compiler warnings
826 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
827 --disable-rpath-hack don't add rpath options for additional libraries
828
829 Some influential environment variables:
830 CC C compiler command
831 CFLAGS C compiler flags
832 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
833 nonstandard directory <lib dir>
834 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
835 headers in a nonstandard directory <include dir>
836 CPP C preprocessor
837
838 Use these variables to override the choices made by `configure' or to help
839 it to find libraries and programs with nonstandard names/locations.
840
841 EOF
842 fi
843
844 if test "$ac_init_help" = "recursive"; then
845 # If there are subdirs, report their specific --help.
846 ac_popdir=`pwd`
847 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
848 cd "$ac_subdir"
849 # A "../" for each directory in /$ac_subdir.
850 ac_dots=`echo "$ac_subdir" |
851 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
852
853 case "$srcdir" in
854 .) # No --srcdir option. We are building in place.
855 ac_sub_srcdir="$srcdir" ;;
856 [\\/]* | ?:[\\/]* ) # Absolute path.
857 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
858 *) # Relative path.
859 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
860 esac
861
862 # Check for guested configure; otherwise get Cygnus style configure.
863 if test -f "$ac_sub_srcdir/configure.gnu"; then
864 echo
865 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
866 elif test -f "$ac_sub_srcdir/configure"; then
867 echo
868 $SHELL "$ac_sub_srcdir/configure" --help=recursive
869 elif test -f "$ac_sub_srcdir/configure.ac" ||
870 test -f "$ac_sub_srcdir/configure.in"; then
871 echo
872 "$ac_configure" --help
873 else
874 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
875 fi
876 cd "$ac_popdir"
877 done
878 fi
879
880 test -n "$ac_init_help" && exit 0
881 if "$ac_init_version"; then
882 cat <<\EOF
883
884 Copyright 2003-2022,2023 Thomas E. Dickey
885 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
886 Free Software Foundation, Inc.
887 This configure script is free software; the Free Software Foundation
888 gives unlimited permission to copy, distribute and modify it.
889 EOF
890 exit 0
891 fi
892 exec 5>config.log
893 cat >&5 <<EOF
894 This file contains any messages produced by compilers while
895 running configure, to aid debugging if configure makes a mistake.
896
897 It was created by $as_me, which was
898 generated by GNU Autoconf 2.52.20231210. Invocation command line was
899
900 $ $0 $@
901
902 EOF
903 {
904 cat <<_ASUNAME
905 ## ---------- ##
906 ## Platform. ##
907 ## ---------- ##
908
909 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
910 uname -m = `(uname -m) 2>/dev/null || echo unknown`
911 uname -r = `(uname -r) 2>/dev/null || echo unknown`
912 uname -s = `(uname -s) 2>/dev/null || echo unknown`
913 uname -v = `(uname -v) 2>/dev/null || echo unknown`
914
915 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
916 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
917
918 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
919 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
920 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
921 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
922 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
923 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
924 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
925
926 PATH = $PATH
927
928 _ASUNAME
929 } >&5
930
931 cat >&5 <<EOF
932 ## ------------ ##
933 ## Core tests. ##
934 ## ------------ ##
935
936 EOF
937
938 # Keep a trace of the command line.
939 # Strip out --no-create and --no-recursion so they do not pile up.
940 # Also quote any args containing shell meta-characters.
941 ac_configure_args=
942 ac_sep=
943 for ac_arg
944 do
945 case "$ac_arg" in
946 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
947 | --no-cr | --no-c) ;;
948 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
949 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
950 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
951 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
952 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
953 ac_sep=" " ;;
954 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
955 ac_sep=" " ;;
956 esac
957 # Get rid of the leading space.
958 done
959
960 # When interrupted or exit'd, cleanup temporary files, and complete
961 # config.log. We remove comments because anyway the quotes in there
962 # would cause problems or look ugly.
963 trap 'exit_status=$?
964 # Save into config.log some information that might help in debugging.
965 echo >&5
966 echo "## ----------------- ##" >&5
967 echo "## Cache variables. ##" >&5
968 echo "## ----------------- ##" >&5
969 echo >&5
970 # The following way of writing the cache mishandles newlines in values,
971 {
972 (set) 2>&1 |
973 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
974 *ac_space=\ *)
975 sed -n \
976 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
977 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
978 ;;
979 *)
980 sed -n \
981 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
982 ;;
983 esac;
984 } >&5
985 sed "/^$/d" confdefs.h >conftest.log
986 if test -s conftest.log; then
987 echo >&5
988 echo "## ------------ ##" >&5
989 echo "## confdefs.h. ##" >&5
990 echo "## ------------ ##" >&5
991 echo >&5
992 cat conftest.log >&5
993 fi
994 (echo; echo) >&5
995 test "$ac_signal" != 0 &&
996 echo "$as_me: caught signal $ac_signal" >&5
997 echo "$as_me: exit $exit_status" >&5
998 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
999 exit $exit_status
1000 ' 0
1001 for ac_signal in 1 2 13 15; do
1002 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1003 done
1004 ac_signal=0
1005
1006 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1007 rm -rf conftest* confdefs.h
1008 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1009 echo >confdefs.h
1010
1011 # Let the site file select an alternate cache file if it wants to.
1012 # Prefer explicitly selected file to automatically selected ones.
1013 if test -z "$CONFIG_SITE"; then
1014 if test "x$prefix" != xNONE; then
1015 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1016 else
1017 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1018 fi
1019 fi
1020 for ac_site_file in $CONFIG_SITE; do
1021 if test -r "$ac_site_file"; then
1022 { echo "$as_me:1022: loading site script $ac_site_file" >&5
1023 echo "$as_me: loading site script $ac_site_file" >&6;}
1024 cat "$ac_site_file" >&5
1025 . "$ac_site_file"
1026 fi
1027 done
1028
1029 if test -r "$cache_file"; then
1030 # Some versions of bash will fail to source /dev/null (special
1031 # files actually), so we avoid doing that.
1032 if test -f "$cache_file"; then
1033 { echo "$as_me:1033: loading cache $cache_file" >&5
1034 echo "$as_me: loading cache $cache_file" >&6;}
1035 case $cache_file in
1036 [\\/]* | ?:[\\/]* ) . $cache_file;;
1037 *) . ./$cache_file;;
1038 esac
1039 fi
1040 else
1041 { echo "$as_me:1041: creating cache $cache_file" >&5
1042 echo "$as_me: creating cache $cache_file" >&6;}
1043 >$cache_file
1044 fi
1045
1046 # Check that the precious variables saved in the cache have kept the same
1047 # value.
1048 ac_cache_corrupted=false
1049 for ac_var in `(set) 2>&1 |
1050 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1051 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1052 eval ac_new_set=\$ac_env_${ac_var}_set
1053 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1054 eval ac_new_val="\$ac_env_${ac_var}_value"
1055 case "$ac_old_set,$ac_new_set" in
1056 set,)
1057 { echo "$as_me:1057: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1058 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1059 ac_cache_corrupted=: ;;
1060 ,set)
1061 { echo "$as_me:1061: error: \`$ac_var' was not set in the previous run" >&5
1062 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1063 ac_cache_corrupted=: ;;
1064 ,);;
1065 *)
1066 if test "x$ac_old_val" != "x$ac_new_val"; then
1067 { echo "$as_me:1067: error: \`$ac_var' has changed since the previous run:" >&5
1068 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1069 { echo "$as_me:1069: former value: $ac_old_val" >&5
1070 echo "$as_me: former value: $ac_old_val" >&2;}
1071 { echo "$as_me:1071: current value: $ac_new_val" >&5
1072 echo "$as_me: current value: $ac_new_val" >&2;}
1073 ac_cache_corrupted=:
1074 fi;;
1075 esac
1076 # Pass precious variables to config.status. It doesn't matter if
1077 # we pass some twice (in addition to the command line arguments).
1078 if test "$ac_new_set" = set; then
1079 case "$ac_new_val" in
1080 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1081 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1082 ac_configure_args="$ac_configure_args '$ac_arg'"
1083 ;;
1084 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1085 ;;
1086 esac
1087 fi
1088 done
1089 if "$ac_cache_corrupted"; then
1090 { echo "$as_me:1090: error: changes in the environment can compromise the build" >&5
1091 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1092 { { echo "$as_me:1092: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1093 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1094 { (exit 1); exit 1; }; }
1095 fi
1096
1097 ac_ext=c
1098 ac_cpp='$CPP $CPPFLAGS'
1099 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1100 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1102 ac_main_return="return"
1103
1104 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1105 *c*,-n*) ECHO_N=
1106 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1107 ECHO_T=' '
1108 ;;
1109 *c*,* ) ECHO_N=-n
1110 ECHO_C=
1111 ECHO_T=
1112 ;;
1113 *) ECHO_N=
1114 ECHO_C='\c'
1115 ECHO_T=
1116 ;;
1117 esac
1118 echo "#! $SHELL" >conftest.sh
1119 echo "exit 0" >>conftest.sh
1120 chmod +x conftest.sh
1121 if { (echo "$as_me:1121: PATH=\".;.\"; conftest.sh") >&5
1122 (PATH=".;."; conftest.sh) 2>&5
1123 ac_status=$?
1124 echo "$as_me:1124: \$? = $ac_status" >&5
1125 (exit "$ac_status"); }; then
1126 ac_path_separator=';'
1127 else
1128 ac_path_separator=:
1129 fi
1130 PATH_SEPARATOR="$ac_path_separator"
1131 rm -f conftest.sh
1132
1133 ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1134
1135 ac_aux_dir=
1136 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1137 if test -f "$ac_dir/install-sh"; then
1138 ac_aux_dir=$ac_dir
1139 ac_install_sh="$ac_aux_dir/install-sh -c"
1140 break
1141 elif test -f "$ac_dir/install.sh"; then
1142 ac_aux_dir=$ac_dir
1143 ac_install_sh="$ac_aux_dir/install.sh -c"
1144 break
1145 elif test -f "$ac_dir/shtool"; then
1146 ac_aux_dir=$ac_dir
1147 ac_install_sh="$ac_aux_dir/shtool install -c"
1148 break
1149 fi
1150 done
1151 if test -z "$ac_aux_dir"; then
1152 { { echo "$as_me:1152: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1153 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1154 { (exit 1); exit 1; }; }
1155 fi
1156 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1157 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1158 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1159
1160 # Make sure we can run config.sub.
1161 $ac_config_sub sun4 >/dev/null 2>&1 ||
1162 { { echo "$as_me:1162: error: cannot run $ac_config_sub" >&5
1163 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1164 { (exit 1); exit 1; }; }
1165
1166 echo "$as_me:1166: checking build system type" >&5
1167 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1168 if test "${ac_cv_build+set}" = set; then
1169 echo $ECHO_N "(cached) $ECHO_C" >&6
1170 else
1171 ac_cv_build_alias=$build_alias
1172 test -z "$ac_cv_build_alias" &&
1173 ac_cv_build_alias=`$ac_config_guess`
1174 test -z "$ac_cv_build_alias" &&
1175 { { echo "$as_me:1175: error: cannot guess build type; you must specify one" >&5
1176 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1177 { (exit 1); exit 1; }; }
1178 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1179 { { echo "$as_me:1179: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1180 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1181 { (exit 1); exit 1; }; }
1182
1183 fi
1184 echo "$as_me:1184: result: $ac_cv_build" >&5
1185 echo "${ECHO_T}$ac_cv_build" >&6
1186 build=$ac_cv_build
1187 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1188 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1189 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1190
1191 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1192 echo "$as_me:1192: checking host system type" >&5
1193 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1194 if test "${ac_cv_host+set}" = set; then
1195 echo $ECHO_N "(cached) $ECHO_C" >&6
1196 else
1197 ac_cv_host_alias=$host_alias
1198 test -z "$ac_cv_host_alias" &&
1199 ac_cv_host_alias=$ac_cv_build_alias
1200 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1201 { { echo "$as_me:1201: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1202 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1203 { (exit 1); exit 1; }; }
1204
1205 fi
1206 echo "$as_me:1206: result: $ac_cv_host" >&5
1207 echo "${ECHO_T}$ac_cv_host" >&6
1208 host=$ac_cv_host
1209 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1210 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1211 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1212
1213 system_name="$host_os"
1214 else
1215 system_name="`(uname -s -r) 2>/dev/null`"
1216 if test -z "$system_name" ; then
1217 system_name="`(hostname) 2>/dev/null`"
1218 fi
1219 fi
1220 test -n "$system_name" &&
1221 cat >>confdefs.h <<EOF
1222 #define SYSTEM_NAME "$system_name"
1223 EOF
1224
1225 if test "${cf_cv_system_name+set}" = set; then
1226 echo $ECHO_N "(cached) $ECHO_C" >&6
1227 else
1228 cf_cv_system_name="$system_name"
1229 fi
1230
1231 test -z "$system_name" && system_name="$cf_cv_system_name"
1232 test -n "$cf_cv_system_name" && echo "$as_me:1232: result: Configuring for $cf_cv_system_name" >&5
1233 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1234
1235 if test ".$system_name" != ".$cf_cv_system_name" ; then
1236 echo "$as_me:1236: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1237 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1238 { { echo "$as_me:1238: error: \"Please remove config.cache and try again.\"" >&5
1239 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1240 { (exit 1); exit 1; }; }
1241 fi
1242
1243 ### checks for alternative programs
1244
1245 case "$host_os" in
1246 (openedition) : "${CFLAGS=\"-O2 -Wc,dll -Wl,EDIT=NO\"}"
1247 : "${CPPFLAGS=\"-D_ALL_SOURCE\"}"
1248 : "${LIBS=\"/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x\"}"
1249 : "${CC=c89}";;
1250 (darwin*)
1251 : "${LDFLAGS}=\"${LDFLAGS} -Wl,-bind_at_load\"";;
1252 esac
1253
1254 ac_ext=c
1255 ac_cpp='$CPP $CPPFLAGS'
1256 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1257 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1259 ac_main_return="return"
1260 if test -n "$ac_tool_prefix"; then
1261 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1262 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_prog_CC+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1267 else
1268 if test -n "$CC"; then
1269 ac_cv_prog_CC="$CC" # Let the user override the test.
1270 else
1271 ac_save_IFS=$IFS; IFS=$ac_path_separator
1272 ac_dummy="$PATH"
1273 for ac_dir in $ac_dummy; do
1274 IFS=$ac_save_IFS
1275 test -z "$ac_dir" && ac_dir=.
1276 $as_executable_p "$ac_dir/$ac_word" || continue
1277 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1278 echo "$as_me:1278: found $ac_dir/$ac_word" >&5
1279 break
1280 done
1281
1282 fi
1283 fi
1284 CC=$ac_cv_prog_CC
1285 if test -n "$CC"; then
1286 echo "$as_me:1286: result: $CC" >&5
1287 echo "${ECHO_T}$CC" >&6
1288 else
1289 echo "$as_me:1289: result: no" >&5
1290 echo "${ECHO_T}no" >&6
1291 fi
1292
1293 fi
1294 if test -z "$ac_cv_prog_CC"; then
1295 ac_ct_CC=$CC
1296 # Extract the first word of "gcc", so it can be a program name with args.
1297 set dummy gcc; ac_word=$2
1298 echo "$as_me:1298: checking for $ac_word" >&5
1299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1300 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1301 echo $ECHO_N "(cached) $ECHO_C" >&6
1302 else
1303 if test -n "$ac_ct_CC"; then
1304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1305 else
1306 ac_save_IFS=$IFS; IFS=$ac_path_separator
1307 ac_dummy="$PATH"
1308 for ac_dir in $ac_dummy; do
1309 IFS=$ac_save_IFS
1310 test -z "$ac_dir" && ac_dir=.
1311 $as_executable_p "$ac_dir/$ac_word" || continue
1312 ac_cv_prog_ac_ct_CC="gcc"
1313 echo "$as_me:1313: found $ac_dir/$ac_word" >&5
1314 break
1315 done
1316
1317 fi
1318 fi
1319 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1320 if test -n "$ac_ct_CC"; then
1321 echo "$as_me:1321: result: $ac_ct_CC" >&5
1322 echo "${ECHO_T}$ac_ct_CC" >&6
1323 else
1324 echo "$as_me:1324: result: no" >&5
1325 echo "${ECHO_T}no" >&6
1326 fi
1327
1328 CC=$ac_ct_CC
1329 else
1330 CC="$ac_cv_prog_CC"
1331 fi
1332
1333 if test -z "$CC"; then
1334 if test -n "$ac_tool_prefix"; then
1335 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1336 set dummy ${ac_tool_prefix}cc; ac_word=$2
1337 echo "$as_me:1337: checking for $ac_word" >&5
1338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1339 if test "${ac_cv_prog_CC+set}" = set; then
1340 echo $ECHO_N "(cached) $ECHO_C" >&6
1341 else
1342 if test -n "$CC"; then
1343 ac_cv_prog_CC="$CC" # Let the user override the test.
1344 else
1345 ac_save_IFS=$IFS; IFS=$ac_path_separator
1346 ac_dummy="$PATH"
1347 for ac_dir in $ac_dummy; do
1348 IFS=$ac_save_IFS
1349 test -z "$ac_dir" && ac_dir=.
1350 $as_executable_p "$ac_dir/$ac_word" || continue
1351 ac_cv_prog_CC="${ac_tool_prefix}cc"
1352 echo "$as_me:1352: found $ac_dir/$ac_word" >&5
1353 break
1354 done
1355
1356 fi
1357 fi
1358 CC=$ac_cv_prog_CC
1359 if test -n "$CC"; then
1360 echo "$as_me:1360: result: $CC" >&5
1361 echo "${ECHO_T}$CC" >&6
1362 else
1363 echo "$as_me:1363: result: no" >&5
1364 echo "${ECHO_T}no" >&6
1365 fi
1366
1367 fi
1368 if test -z "$ac_cv_prog_CC"; then
1369 ac_ct_CC=$CC
1370 # Extract the first word of "cc", so it can be a program name with args.
1371 set dummy cc; ac_word=$2
1372 echo "$as_me:1372: checking for $ac_word" >&5
1373 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1374 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1375 echo $ECHO_N "(cached) $ECHO_C" >&6
1376 else
1377 if test -n "$ac_ct_CC"; then
1378 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1379 else
1380 ac_save_IFS=$IFS; IFS=$ac_path_separator
1381 ac_dummy="$PATH"
1382 for ac_dir in $ac_dummy; do
1383 IFS=$ac_save_IFS
1384 test -z "$ac_dir" && ac_dir=.
1385 $as_executable_p "$ac_dir/$ac_word" || continue
1386 ac_cv_prog_ac_ct_CC="cc"
1387 echo "$as_me:1387: found $ac_dir/$ac_word" >&5
1388 break
1389 done
1390
1391 fi
1392 fi
1393 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1394 if test -n "$ac_ct_CC"; then
1395 echo "$as_me:1395: result: $ac_ct_CC" >&5
1396 echo "${ECHO_T}$ac_ct_CC" >&6
1397 else
1398 echo "$as_me:1398: result: no" >&5
1399 echo "${ECHO_T}no" >&6
1400 fi
1401
1402 CC=$ac_ct_CC
1403 else
1404 CC="$ac_cv_prog_CC"
1405 fi
1406
1407 fi
1408 if test -z "$CC"; then
1409 # Extract the first word of "cc", so it can be a program name with args.
1410 set dummy cc; ac_word=$2
1411 echo "$as_me:1411: checking for $ac_word" >&5
1412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1413 if test "${ac_cv_prog_CC+set}" = set; then
1414 echo $ECHO_N "(cached) $ECHO_C" >&6
1415 else
1416 if test -n "$CC"; then
1417 ac_cv_prog_CC="$CC" # Let the user override the test.
1418 else
1419 ac_prog_rejected=no
1420 ac_save_IFS=$IFS; IFS=$ac_path_separator
1421 ac_dummy="$PATH"
1422 for ac_dir in $ac_dummy; do
1423 IFS=$ac_save_IFS
1424 test -z "$ac_dir" && ac_dir=.
1425 $as_executable_p "$ac_dir/$ac_word" || continue
1426 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1427 ac_prog_rejected=yes
1428 continue
1429 fi
1430 ac_cv_prog_CC="cc"
1431 echo "$as_me:1431: found $ac_dir/$ac_word" >&5
1432 break
1433 done
1434
1435 if test "$ac_prog_rejected" = yes; then
1436 # We found a bogon in the path, so make sure we never use it.
1437 set dummy $ac_cv_prog_CC
1438 shift
1439 if test $# != 0; then
1440 # We chose a different compiler from the bogus one.
1441 # However, it has the same basename, so the bogon will be chosen
1442 # first if we set CC to just the basename; use the full file name.
1443 shift
1444 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1445 shift
1446 ac_cv_prog_CC="$@"
1447 fi
1448 fi
1449 fi
1450 fi
1451 CC=$ac_cv_prog_CC
1452 if test -n "$CC"; then
1453 echo "$as_me:1453: result: $CC" >&5
1454 echo "${ECHO_T}$CC" >&6
1455 else
1456 echo "$as_me:1456: result: no" >&5
1457 echo "${ECHO_T}no" >&6
1458 fi
1459
1460 fi
1461 if test -z "$CC"; then
1462 if test -n "$ac_tool_prefix"; then
1463 for ac_prog in cl
1464 do
1465 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1466 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1467 echo "$as_me:1467: checking for $ac_word" >&5
1468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1469 if test "${ac_cv_prog_CC+set}" = set; then
1470 echo $ECHO_N "(cached) $ECHO_C" >&6
1471 else
1472 if test -n "$CC"; then
1473 ac_cv_prog_CC="$CC" # Let the user override the test.
1474 else
1475 ac_save_IFS=$IFS; IFS=$ac_path_separator
1476 ac_dummy="$PATH"
1477 for ac_dir in $ac_dummy; do
1478 IFS=$ac_save_IFS
1479 test -z "$ac_dir" && ac_dir=.
1480 $as_executable_p "$ac_dir/$ac_word" || continue
1481 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1482 echo "$as_me:1482: found $ac_dir/$ac_word" >&5
1483 break
1484 done
1485
1486 fi
1487 fi
1488 CC=$ac_cv_prog_CC
1489 if test -n "$CC"; then
1490 echo "$as_me:1490: result: $CC" >&5
1491 echo "${ECHO_T}$CC" >&6
1492 else
1493 echo "$as_me:1493: result: no" >&5
1494 echo "${ECHO_T}no" >&6
1495 fi
1496
1497 test -n "$CC" && break
1498 done
1499 fi
1500 if test -z "$CC"; then
1501 ac_ct_CC=$CC
1502 for ac_prog in cl
1503 do
1504 # Extract the first word of "$ac_prog", so it can be a program name with args.
1505 set dummy $ac_prog; ac_word=$2
1506 echo "$as_me:1506: checking for $ac_word" >&5
1507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1508 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1509 echo $ECHO_N "(cached) $ECHO_C" >&6
1510 else
1511 if test -n "$ac_ct_CC"; then
1512 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1513 else
1514 ac_save_IFS=$IFS; IFS=$ac_path_separator
1515 ac_dummy="$PATH"
1516 for ac_dir in $ac_dummy; do
1517 IFS=$ac_save_IFS
1518 test -z "$ac_dir" && ac_dir=.
1519 $as_executable_p "$ac_dir/$ac_word" || continue
1520 ac_cv_prog_ac_ct_CC="$ac_prog"
1521 echo "$as_me:1521: found $ac_dir/$ac_word" >&5
1522 break
1523 done
1524
1525 fi
1526 fi
1527 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1528 if test -n "$ac_ct_CC"; then
1529 echo "$as_me:1529: result: $ac_ct_CC" >&5
1530 echo "${ECHO_T}$ac_ct_CC" >&6
1531 else
1532 echo "$as_me:1532: result: no" >&5
1533 echo "${ECHO_T}no" >&6
1534 fi
1535
1536 test -n "$ac_ct_CC" && break
1537 done
1538
1539 CC=$ac_ct_CC
1540 fi
1541
1542 fi
1543
1544 test -z "$CC" && { { echo "$as_me:1544: error: no acceptable cc found in \$PATH" >&5
1545 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1546 { (exit 1); exit 1; }; }
1547
1548 # Provide some information about the compiler.
1549 echo "$as_me:1549:" \
1550 "checking for C compiler version" >&5
1551 ac_compiler=`set X $ac_compile; echo "$2"`
1552 { (eval echo "$as_me:1552: \"$ac_compiler --version </dev/null >&5\"") >&5
1553 (eval $ac_compiler --version </dev/null >&5) 2>&5
1554 ac_status=$?
1555 echo "$as_me:1555: \$? = $ac_status" >&5
1556 (exit "$ac_status"); }
1557 { (eval echo "$as_me:1557: \"$ac_compiler -v </dev/null >&5\"") >&5
1558 (eval $ac_compiler -v </dev/null >&5) 2>&5
1559 ac_status=$?
1560 echo "$as_me:1560: \$? = $ac_status" >&5
1561 (exit "$ac_status"); }
1562 { (eval echo "$as_me:1562: \"$ac_compiler -V </dev/null >&5\"") >&5
1563 (eval $ac_compiler -V </dev/null >&5) 2>&5
1564 ac_status=$?
1565 echo "$as_me:1565: \$? = $ac_status" >&5
1566 (exit "$ac_status"); }
1567
1568 cat >"conftest.$ac_ext" <<_ACEOF
1569 #line 1569 "configure"
1570 #include "confdefs.h"
1571
1572 int
1573 main (void)
1574 {
1575
1576 ;
1577 return 0;
1578 }
1579 _ACEOF
1580 ac_clean_files_save=$ac_clean_files
1581 ac_clean_files="$ac_clean_files a.out a.exe"
1582 # Try to create an executable without -o first, disregard a.out.
1583 # It will help us diagnose broken compilers, and finding out an intuition
1584 # of exeext.
1585 echo "$as_me:1585: checking for C compiler default output" >&5
1586 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1587 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1588 if { (eval echo "$as_me:1588: \"$ac_link_default\"") >&5
1589 (eval $ac_link_default) 2>&5
1590 ac_status=$?
1591 echo "$as_me:1591: \$? = $ac_status" >&5
1592 (exit "$ac_status"); }; then
1593 # Find the output, starting from the most likely. This scheme is
1594 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1595 # resort.
1596 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1597 ls a.out conftest 2>/dev/null;
1598 ls a.* conftest.* 2>/dev/null`; do
1599 case $ac_file in
1600 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1601 a.out ) # We found the default executable, but exeext='' is most
1602 # certainly right.
1603 break;;
1604 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1605 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1606 export ac_cv_exeext
1607 break;;
1608 * ) break;;
1609 esac
1610 done
1611 else
1612 echo "$as_me: failed program was:" >&5
1613 cat "conftest.$ac_ext" >&5
1614 { { echo "$as_me:1614: error: C compiler cannot create executables" >&5
1615 echo "$as_me: error: C compiler cannot create executables" >&2;}
1616 { (exit 77); exit 77; }; }
1617 fi
1618
1619 ac_exeext=$ac_cv_exeext
1620 echo "$as_me:1620: result: $ac_file" >&5
1621 echo "${ECHO_T}$ac_file" >&6
1622
1623 # Check the compiler produces executables we can run. If not, either
1624 # the compiler is broken, or we cross compile.
1625 echo "$as_me:1625: checking whether the C compiler works" >&5
1626 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1627 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1628 # If not cross compiling, check that we can run a simple program.
1629 if test "$cross_compiling" != yes; then
1630 if { ac_try='./$ac_file'
1631 { (eval echo "$as_me:1631: \"$ac_try\"") >&5
1632 (eval $ac_try) 2>&5
1633 ac_status=$?
1634 echo "$as_me:1634: \$? = $ac_status" >&5
1635 (exit "$ac_status"); }; }; then
1636 cross_compiling=no
1637 else
1638 if test "$cross_compiling" = maybe; then
1639 cross_compiling=yes
1640 else
1641 { { echo "$as_me:1641: error: cannot run C compiled programs.
1642 If you meant to cross compile, use \`--host'." >&5
1643 echo "$as_me: error: cannot run C compiled programs.
1644 If you meant to cross compile, use \`--host'." >&2;}
1645 { (exit 1); exit 1; }; }
1646 fi
1647 fi
1648 fi
1649 echo "$as_me:1649: result: yes" >&5
1650 echo "${ECHO_T}yes" >&6
1651
1652 rm -f a.out a.exe "conftest$ac_cv_exeext"
1653 ac_clean_files=$ac_clean_files_save
1654 # Check the compiler produces executables we can run. If not, either
1655 # the compiler is broken, or we cross compile.
1656 echo "$as_me:1656: checking whether we are cross compiling" >&5
1657 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1658 echo "$as_me:1658: result: $cross_compiling" >&5
1659 echo "${ECHO_T}$cross_compiling" >&6
1660
1661 echo "$as_me:1661: checking for executable suffix" >&5
1662 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1663 if { (eval echo "$as_me:1663: \"$ac_link\"") >&5
1664 (eval $ac_link) 2>&5
1665 ac_status=$?
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; then
1668 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1669 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1670 # work properly (i.e., refer to `conftest.exe'), while it won't with
1671 # `rm'.
1672 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1673 case $ac_file in
1674 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1675 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1676 export ac_cv_exeext
1677 break;;
1678 * ) break;;
1679 esac
1680 done
1681 else
1682 { { echo "$as_me:1682: error: cannot compute EXEEXT: cannot compile and link" >&5
1683 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1684 { (exit 1); exit 1; }; }
1685 fi
1686
1687 rm -f "conftest$ac_cv_exeext"
1688 echo "$as_me:1688: result: $ac_cv_exeext" >&5
1689 echo "${ECHO_T}$ac_cv_exeext" >&6
1690
1691 rm -f "conftest.$ac_ext"
1692 EXEEXT=$ac_cv_exeext
1693 ac_exeext=$EXEEXT
1694 echo "$as_me:1694: checking for object suffix" >&5
1695 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1696 if test "${ac_cv_objext+set}" = set; then
1697 echo $ECHO_N "(cached) $ECHO_C" >&6
1698 else
1699 cat >"conftest.$ac_ext" <<_ACEOF
1700 #line 1700 "configure"
1701 #include "confdefs.h"
1702
1703 int
1704 main (void)
1705 {
1706
1707 ;
1708 return 0;
1709 }
1710 _ACEOF
1711 rm -f conftest.o conftest.obj
1712 if { (eval echo "$as_me:1712: \"$ac_compile\"") >&5
1713 (eval $ac_compile) 2>&5
1714 ac_status=$?
1715 echo "$as_me:1715: \$? = $ac_status" >&5
1716 (exit "$ac_status"); }; then
1717 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1718 case $ac_file in
1719 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1720 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1721 break;;
1722 esac
1723 done
1724 else
1725 echo "$as_me: failed program was:" >&5
1726 cat "conftest.$ac_ext" >&5
1727 { { echo "$as_me:1727: error: cannot compute OBJEXT: cannot compile" >&5
1728 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1729 { (exit 1); exit 1; }; }
1730 fi
1731
1732 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1733 fi
1734 echo "$as_me:1734: result: $ac_cv_objext" >&5
1735 echo "${ECHO_T}$ac_cv_objext" >&6
1736 OBJEXT=$ac_cv_objext
1737 ac_objext=$OBJEXT
1738 echo "$as_me:1738: checking whether we are using the GNU C compiler" >&5
1739 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1740 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1741 echo $ECHO_N "(cached) $ECHO_C" >&6
1742 else
1743 cat >"conftest.$ac_ext" <<_ACEOF
1744 #line 1744 "configure"
1745 #include "confdefs.h"
1746
1747 int
1748 main (void)
1749 {
1750 #ifndef __GNUC__
1751 choke me
1752 #endif
1753
1754 ;
1755 return 0;
1756 }
1757 _ACEOF
1758 rm -f "conftest.$ac_objext"
1759 if { (eval echo "$as_me:1759: \"$ac_compile\"") >&5
1760 (eval $ac_compile) 2>&5
1761 ac_status=$?
1762 echo "$as_me:1762: \$? = $ac_status" >&5
1763 (exit "$ac_status"); } &&
1764 { ac_try='test -s "conftest.$ac_objext"'
1765 { (eval echo "$as_me:1765: \"$ac_try\"") >&5
1766 (eval $ac_try) 2>&5
1767 ac_status=$?
1768 echo "$as_me:1768: \$? = $ac_status" >&5
1769 (exit "$ac_status"); }; }; then
1770 ac_compiler_gnu=yes
1771 else
1772 echo "$as_me: failed program was:" >&5
1773 cat "conftest.$ac_ext" >&5
1774 ac_compiler_gnu=no
1775 fi
1776 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1777 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1778
1779 fi
1780 echo "$as_me:1780: result: $ac_cv_c_compiler_gnu" >&5
1781 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1782 GCC=`test $ac_compiler_gnu = yes && echo yes`
1783 ac_test_CFLAGS=${CFLAGS+set}
1784 ac_save_CFLAGS=$CFLAGS
1785 CFLAGS="-g"
1786 echo "$as_me:1786: checking whether $CC accepts -g" >&5
1787 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1788 if test "${ac_cv_prog_cc_g+set}" = set; then
1789 echo $ECHO_N "(cached) $ECHO_C" >&6
1790 else
1791 cat >"conftest.$ac_ext" <<_ACEOF
1792 #line 1792 "configure"
1793 #include "confdefs.h"
1794
1795 int
1796 main (void)
1797 {
1798
1799 ;
1800 return 0;
1801 }
1802 _ACEOF
1803 rm -f "conftest.$ac_objext"
1804 if { (eval echo "$as_me:1804: \"$ac_compile\"") >&5
1805 (eval $ac_compile) 2>&5
1806 ac_status=$?
1807 echo "$as_me:1807: \$? = $ac_status" >&5
1808 (exit "$ac_status"); } &&
1809 { ac_try='test -s "conftest.$ac_objext"'
1810 { (eval echo "$as_me:1810: \"$ac_try\"") >&5
1811 (eval $ac_try) 2>&5
1812 ac_status=$?
1813 echo "$as_me:1813: \$? = $ac_status" >&5
1814 (exit "$ac_status"); }; }; then
1815 ac_cv_prog_cc_g=yes
1816 else
1817 echo "$as_me: failed program was:" >&5
1818 cat "conftest.$ac_ext" >&5
1819 ac_cv_prog_cc_g=no
1820 fi
1821 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1822 fi
1823 echo "$as_me:1823: result: $ac_cv_prog_cc_g" >&5
1824 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1825 if test "$ac_test_CFLAGS" = set; then
1826 CFLAGS=$ac_save_CFLAGS
1827 elif test $ac_cv_prog_cc_g = yes; then
1828 if test "$GCC" = yes; then
1829 CFLAGS="-g -O2"
1830 else
1831 CFLAGS="-g"
1832 fi
1833 else
1834 if test "$GCC" = yes; then
1835 CFLAGS="-O2"
1836 else
1837 CFLAGS=
1838 fi
1839 fi
1840 # Some people use a C++ compiler to compile C. Since we use `exit',
1841 # in C++ we need to declare it. In case someone uses the same compiler
1842 # for both compiling C and C++ we need to have the C++ compiler decide
1843 # the declaration of exit, since it's the most demanding environment.
1844 cat >"conftest.$ac_ext" <<_ACEOF
1845 #ifndef __cplusplus
1846 choke me
1847 #endif
1848 _ACEOF
1849 rm -f "conftest.$ac_objext"
1850 if { (eval echo "$as_me:1850: \"$ac_compile\"") >&5
1851 (eval $ac_compile) 2>&5
1852 ac_status=$?
1853 echo "$as_me:1853: \$? = $ac_status" >&5
1854 (exit "$ac_status"); } &&
1855 { ac_try='test -s "conftest.$ac_objext"'
1856 { (eval echo "$as_me:1856: \"$ac_try\"") >&5
1857 (eval $ac_try) 2>&5
1858 ac_status=$?
1859 echo "$as_me:1859: \$? = $ac_status" >&5
1860 (exit "$ac_status"); }; }; then
1861 for ac_declaration in \
1862 ''\
1863 '#include <stdlib.h>' \
1864 'extern "C" void std::exit (int) throw (); using std::exit;' \
1865 'extern "C" void std::exit (int); using std::exit;' \
1866 'extern "C" void exit (int) throw ();' \
1867 'extern "C" void exit (int);' \
1868 'void exit (int);'
1869 do
1870 cat >"conftest.$ac_ext" <<_ACEOF
1871 #line 1871 "configure"
1872 #include "confdefs.h"
1873 #include <stdlib.h>
1874 $ac_declaration
1875 int
1876 main (void)
1877 {
1878 exit (42);
1879 ;
1880 return 0;
1881 }
1882 _ACEOF
1883 rm -f "conftest.$ac_objext"
1884 if { (eval echo "$as_me:1884: \"$ac_compile\"") >&5
1885 (eval $ac_compile) 2>&5
1886 ac_status=$?
1887 echo "$as_me:1887: \$? = $ac_status" >&5
1888 (exit "$ac_status"); } &&
1889 { ac_try='test -s "conftest.$ac_objext"'
1890 { (eval echo "$as_me:1890: \"$ac_try\"") >&5
1891 (eval $ac_try) 2>&5
1892 ac_status=$?
1893 echo "$as_me:1893: \$? = $ac_status" >&5
1894 (exit "$ac_status"); }; }; then
1895 :
1896 else
1897 echo "$as_me: failed program was:" >&5
1898 cat "conftest.$ac_ext" >&5
1899 continue
1900 fi
1901 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1902 cat >"conftest.$ac_ext" <<_ACEOF
1903 #line 1903 "configure"
1904 #include "confdefs.h"
1905 $ac_declaration
1906 int
1907 main (void)
1908 {
1909 exit (42);
1910 ;
1911 return 0;
1912 }
1913 _ACEOF
1914 rm -f "conftest.$ac_objext"
1915 if { (eval echo "$as_me:1915: \"$ac_compile\"") >&5
1916 (eval $ac_compile) 2>&5
1917 ac_status=$?
1918 echo "$as_me:1918: \$? = $ac_status" >&5
1919 (exit "$ac_status"); } &&
1920 { ac_try='test -s "conftest.$ac_objext"'
1921 { (eval echo "$as_me:1921: \"$ac_try\"") >&5
1922 (eval $ac_try) 2>&5
1923 ac_status=$?
1924 echo "$as_me:1924: \$? = $ac_status" >&5
1925 (exit "$ac_status"); }; }; then
1926 break
1927 else
1928 echo "$as_me: failed program was:" >&5
1929 cat "conftest.$ac_ext" >&5
1930 fi
1931 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1932 done
1933 rm -rf conftest*
1934 if test -n "$ac_declaration"; then
1935 echo '#ifdef __cplusplus' >>confdefs.h
1936 echo "$ac_declaration" >>confdefs.h
1937 echo '#endif' >>confdefs.h
1938 fi
1939
1940 else
1941 echo "$as_me: failed program was:" >&5
1942 cat "conftest.$ac_ext" >&5
1943 fi
1944 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1945 ac_ext=c
1946 ac_cpp='$CPP $CPPFLAGS'
1947 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1948 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1949 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1950 ac_main_return="return"
1951
1952 GCC_VERSION=none
1953 if test "$GCC" = yes ; then
1954 echo "$as_me:1954: checking version of $CC" >&5
1955 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1956 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1957 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1958 echo "$as_me:1958: result: $GCC_VERSION" >&5
1959 echo "${ECHO_T}$GCC_VERSION" >&6
1960 fi
1961
1962 INTEL_COMPILER=no
1963
1964 if test "$GCC" = yes ; then
1965 case "$host_os" in
1966 (linux*|gnu*)
1967 echo "$as_me:1967: checking if this is really Intel C compiler" >&5
1968 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1969 cf_save_CFLAGS="$CFLAGS"
1970 CFLAGS="$CFLAGS -no-gcc"
1971 cat >"conftest.$ac_ext" <<_ACEOF
1972 #line 1972 "configure"
1973 #include "confdefs.h"
1974
1975 int
1976 main (void)
1977 {
1978
1979 #ifdef __INTEL_COMPILER
1980 #else
1981 #error __INTEL_COMPILER is not defined
1982 #endif
1983
1984 ;
1985 return 0;
1986 }
1987 _ACEOF
1988 rm -f "conftest.$ac_objext"
1989 if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
1990 (eval $ac_compile) 2>&5
1991 ac_status=$?
1992 echo "$as_me:1992: \$? = $ac_status" >&5
1993 (exit "$ac_status"); } &&
1994 { ac_try='test -s "conftest.$ac_objext"'
1995 { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996 (eval $ac_try) 2>&5
1997 ac_status=$?
1998 echo "$as_me:1998: \$? = $ac_status" >&5
1999 (exit "$ac_status"); }; }; then
2000 INTEL_COMPILER=yes
2001 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2002
2003 else
2004 echo "$as_me: failed program was:" >&5
2005 cat "conftest.$ac_ext" >&5
2006 fi
2007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2008 CFLAGS="$cf_save_CFLAGS"
2009 echo "$as_me:2009: result: $INTEL_COMPILER" >&5
2010 echo "${ECHO_T}$INTEL_COMPILER" >&6
2011 ;;
2012 esac
2013 fi
2014
2015 CLANG_COMPILER=no
2016
2017 if test "$GCC" = yes ; then
2018 echo "$as_me:2018: checking if this is really Clang C compiler" >&5
2019 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2020 cf_save_CFLAGS="$CFLAGS"
2021 cat >"conftest.$ac_ext" <<_ACEOF
2022 #line 2022 "configure"
2023 #include "confdefs.h"
2024
2025 int
2026 main (void)
2027 {
2028
2029 #ifdef __clang__
2030 #else
2031 #error __clang__ is not defined
2032 #endif
2033
2034 ;
2035 return 0;
2036 }
2037 _ACEOF
2038 rm -f "conftest.$ac_objext"
2039 if { (eval echo "$as_me:2039: \"$ac_compile\"") >&5
2040 (eval $ac_compile) 2>&5
2041 ac_status=$?
2042 echo "$as_me:2042: \$? = $ac_status" >&5
2043 (exit "$ac_status"); } &&
2044 { ac_try='test -s "conftest.$ac_objext"'
2045 { (eval echo "$as_me:2045: \"$ac_try\"") >&5
2046 (eval $ac_try) 2>&5
2047 ac_status=$?
2048 echo "$as_me:2048: \$? = $ac_status" >&5
2049 (exit "$ac_status"); }; }; then
2050 CLANG_COMPILER=yes
2051
2052 else
2053 echo "$as_me: failed program was:" >&5
2054 cat "conftest.$ac_ext" >&5
2055 fi
2056 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2057 CFLAGS="$cf_save_CFLAGS"
2058 echo "$as_me:2058: result: $CLANG_COMPILER" >&5
2059 echo "${ECHO_T}$CLANG_COMPILER" >&6
2060 fi
2061
2062 CLANG_VERSION=none
2063
2064 if test "x$CLANG_COMPILER" = "xyes" ; then
2065 case "$CC" in
2066 (c[1-9][0-9]|*/c[1-9][0-9])
2067 { echo "$as_me:2067: WARNING: replacing broken compiler alias $CC" >&5
2068 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2069 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2070 CC=clang
2071 ;;
2072 esac
2073
2074 echo "$as_me:2074: checking version of $CC" >&5
2075 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2076 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.].*//'`"
2077 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2078 echo "$as_me:2078: result: $CLANG_VERSION" >&5
2079 echo "${ECHO_T}$CLANG_VERSION" >&6
2080
2081 for cf_clang_opt in \
2082 -Qunused-arguments \
2083 -Wno-error=implicit-function-declaration
2084 do
2085 echo "$as_me:2085: checking if option $cf_clang_opt works" >&5
2086 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2087 cf_save_CFLAGS="$CFLAGS"
2088 CFLAGS="$CFLAGS $cf_clang_opt"
2089 cat >"conftest.$ac_ext" <<_ACEOF
2090 #line 2090 "configure"
2091 #include "confdefs.h"
2092
2093 #include <stdio.h>
2094 int
2095 main (void)
2096 {
2097
2098 printf("hello!\\n");
2099 ;
2100 return 0;
2101 }
2102 _ACEOF
2103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2104 if { (eval echo "$as_me:2104: \"$ac_link\"") >&5
2105 (eval $ac_link) 2>&5
2106 ac_status=$?
2107 echo "$as_me:2107: \$? = $ac_status" >&5
2108 (exit "$ac_status"); } &&
2109 { ac_try='test -s "conftest$ac_exeext"'
2110 { (eval echo "$as_me:2110: \"$ac_try\"") >&5
2111 (eval $ac_try) 2>&5
2112 ac_status=$?
2113 echo "$as_me:2113: \$? = $ac_status" >&5
2114 (exit "$ac_status"); }; }; then
2115
2116 cf_clang_optok=yes
2117 else
2118 echo "$as_me: failed program was:" >&5
2119 cat "conftest.$ac_ext" >&5
2120
2121 cf_clang_optok=no
2122 fi
2123 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2124 echo "$as_me:2124: result: $cf_clang_optok" >&5
2125 echo "${ECHO_T}$cf_clang_optok" >&6
2126 CFLAGS="$cf_save_CFLAGS"
2127 if test "$cf_clang_optok" = yes; then
2128 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2129
2130 echo "${as_me:-configure}:2130: testing adding option $cf_clang_opt ..." 1>&5
2131
2132 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2133 CFLAGS="${CFLAGS}$cf_clang_opt"
2134
2135 fi
2136 done
2137 fi
2138
2139 echo "$as_me:2139: checking for $CC option to accept ANSI C" >&5
2140 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2141 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
2143 else
2144 ac_cv_prog_cc_stdc=no
2145 ac_save_CC=$CC
2146 cat >"conftest.$ac_ext" <<_ACEOF
2147 #line 2147 "configure"
2148 #include "confdefs.h"
2149 #include <stdarg.h>
2150 #include <stdio.h>
2151 #include <sys/types.h>
2152 #include <sys/stat.h>
2153 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2154 struct buf { int x; };
2155 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2156 static char *e (char **p, int i)
2157 {
2158 return p[i];
2159 }
2160 static char *f (char * (*g) (char **, int), char **p, ...)
2161 {
2162 char *s;
2163 va_list v;
2164 va_start (v,p);
2165 s = g (p, va_arg (v,int));
2166 va_end (v);
2167 return s;
2168 }
2169 int test (int i, double x);
2170 struct s1 {int (*f) (int a);};
2171 struct s2 {int (*f) (double a);};
2172 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2173 int argc;
2174 char **argv;
2175 int
2176 main (void)
2177 {
2178 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2179 ;
2180 return 0;
2181 }
2182 _ACEOF
2183 # Don't try gcc -ansi; that turns off useful extensions and
2184 # breaks some systems' header files.
2185 # AIX -qlanglvl=ansi
2186 # Ultrix and OSF/1 -std1
2187 # HP-UX 10.20 and later -Ae
2188 # HP-UX older versions -Aa -D_HPUX_SOURCE
2189 # SVR4 -Xc -D__EXTENSIONS__
2190 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2191 do
2192 CC="$ac_save_CC $ac_arg"
2193 rm -f "conftest.$ac_objext"
2194 if { (eval echo "$as_me:2194: \"$ac_compile\"") >&5
2195 (eval $ac_compile) 2>&5
2196 ac_status=$?
2197 echo "$as_me:2197: \$? = $ac_status" >&5
2198 (exit "$ac_status"); } &&
2199 { ac_try='test -s "conftest.$ac_objext"'
2200 { (eval echo "$as_me:2200: \"$ac_try\"") >&5
2201 (eval $ac_try) 2>&5
2202 ac_status=$?
2203 echo "$as_me:2203: \$? = $ac_status" >&5
2204 (exit "$ac_status"); }; }; then
2205 ac_cv_prog_cc_stdc=$ac_arg
2206 break
2207 else
2208 echo "$as_me: failed program was:" >&5
2209 cat "conftest.$ac_ext" >&5
2210 fi
2211 rm -f "conftest.$ac_objext"
2212 done
2213 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2214 CC=$ac_save_CC
2215
2216 fi
2217
2218 case "x$ac_cv_prog_cc_stdc" in
2219 x|xno)
2220 echo "$as_me:2220: result: none needed" >&5
2221 echo "${ECHO_T}none needed" >&6 ;;
2222 *)
2223 echo "$as_me:2223: result: $ac_cv_prog_cc_stdc" >&5
2224 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2225 CC="$CC $ac_cv_prog_cc_stdc" ;;
2226 esac
2227
2228 # This should have been defined by AC_PROG_CC
2229 : "${CC:=cc}"
2230
2231 echo "$as_me:2231: checking \$CFLAGS variable" >&5
2232 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2233 case "x$CFLAGS" in
2234 (*-[IUD]*)
2235 echo "$as_me:2235: result: broken" >&5
2236 echo "${ECHO_T}broken" >&6
2237 { echo "$as_me:2237: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2238 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2239 cf_flags="$CFLAGS"
2240 CFLAGS=
2241 for cf_arg in $cf_flags
2242 do
2243
2244 cf_fix_cppflags=no
2245 cf_new_cflags=
2246 cf_new_cppflags=
2247 cf_new_extra_cppflags=
2248
2249 for cf_add_cflags in $cf_arg
2250 do
2251 case "$cf_fix_cppflags" in
2252 (no)
2253 case "$cf_add_cflags" in
2254 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2255 case "$cf_add_cflags" in
2256 (-D*)
2257 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2258
2259 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2260 && test -z "${cf_tst_cflags}" \
2261 && cf_fix_cppflags=yes
2262
2263 if test "$cf_fix_cppflags" = yes ; then
2264
2265 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2266 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2267
2268 continue
2269 elif test "${cf_tst_cflags}" = "\"'" ; then
2270
2271 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2272 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2273
2274 continue
2275 fi
2276 ;;
2277 esac
2278 case "$CPPFLAGS" in
2279 (*$cf_add_cflags)
2280 ;;
2281 (*)
2282 case "$cf_add_cflags" in
2283 (-D*)
2284 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2285
2286 CPPFLAGS=`echo "$CPPFLAGS" | \
2287 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2288 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2289
2290 ;;
2291 esac
2292
2293 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2294 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2295
2296 ;;
2297 esac
2298 ;;
2299 (*)
2300
2301 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2302 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2303
2304 ;;
2305 esac
2306 ;;
2307 (yes)
2308
2309 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2310 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2311
2312 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2313
2314 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2315 && test -z "${cf_tst_cflags}" \
2316 && cf_fix_cppflags=no
2317 ;;
2318 esac
2319 done
2320
2321 if test -n "$cf_new_cflags" ; then
2322
2323 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2324 CFLAGS="${CFLAGS}$cf_new_cflags"
2325
2326 fi
2327
2328 if test -n "$cf_new_cppflags" ; then
2329
2330 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2331 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2332
2333 fi
2334
2335 if test -n "$cf_new_extra_cppflags" ; then
2336
2337 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2338 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2339
2340 fi
2341
2342 done
2343 ;;
2344 (*)
2345 echo "$as_me:2345: result: ok" >&5
2346 echo "${ECHO_T}ok" >&6
2347 ;;
2348 esac
2349
2350 echo "$as_me:2350: checking \$CC variable" >&5
2351 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2352 case "$CC" in
2353 (*[\ \ ]-*)
2354 echo "$as_me:2354: result: broken" >&5
2355 echo "${ECHO_T}broken" >&6
2356 { echo "$as_me:2356: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2357 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2358 # humor him...
2359 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2360 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2361 CC="$cf_prog"
2362 for cf_arg in $cf_flags
2363 do
2364 case "x$cf_arg" in
2365 (x-[IUDfgOW]*)
2366
2367 cf_fix_cppflags=no
2368 cf_new_cflags=
2369 cf_new_cppflags=
2370 cf_new_extra_cppflags=
2371
2372 for cf_add_cflags in $cf_arg
2373 do
2374 case "$cf_fix_cppflags" in
2375 (no)
2376 case "$cf_add_cflags" in
2377 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2378 case "$cf_add_cflags" in
2379 (-D*)
2380 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2381
2382 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2383 && test -z "${cf_tst_cflags}" \
2384 && cf_fix_cppflags=yes
2385
2386 if test "$cf_fix_cppflags" = yes ; then
2387
2388 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2389 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2390
2391 continue
2392 elif test "${cf_tst_cflags}" = "\"'" ; then
2393
2394 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2395 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2396
2397 continue
2398 fi
2399 ;;
2400 esac
2401 case "$CPPFLAGS" in
2402 (*$cf_add_cflags)
2403 ;;
2404 (*)
2405 case "$cf_add_cflags" in
2406 (-D*)
2407 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2408
2409 CPPFLAGS=`echo "$CPPFLAGS" | \
2410 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2411 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2412
2413 ;;
2414 esac
2415
2416 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2417 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2418
2419 ;;
2420 esac
2421 ;;
2422 (*)
2423
2424 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2425 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2426
2427 ;;
2428 esac
2429 ;;
2430 (yes)
2431
2432 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2433 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2434
2435 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2436
2437 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2438 && test -z "${cf_tst_cflags}" \
2439 && cf_fix_cppflags=no
2440 ;;
2441 esac
2442 done
2443
2444 if test -n "$cf_new_cflags" ; then
2445
2446 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2447 CFLAGS="${CFLAGS}$cf_new_cflags"
2448
2449 fi
2450
2451 if test -n "$cf_new_cppflags" ; then
2452
2453 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2454 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2455
2456 fi
2457
2458 if test -n "$cf_new_extra_cppflags" ; then
2459
2460 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2461 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2462
2463 fi
2464
2465 ;;
2466 (*)
2467 CC="$CC $cf_arg"
2468 ;;
2469 esac
2470 done
2471 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2472
2473 echo "${as_me:-configure}:2473: testing resulting CC: '$CC' ..." 1>&5
2474
2475 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2476
2477 echo "${as_me:-configure}:2477: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2478
2479 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2480
2481 echo "${as_me:-configure}:2481: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2482
2483 ;;
2484 (*)
2485 echo "$as_me:2485: result: ok" >&5
2486 echo "${ECHO_T}ok" >&6
2487 ;;
2488 esac
2489
2490 for ac_prog in ggrep grep
2491 do
2492 # Extract the first word of "$ac_prog", so it can be a program name with args.
2493 set dummy $ac_prog; ac_word=$2
2494 echo "$as_me:2494: checking for $ac_word" >&5
2495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2496 if test "${ac_cv_prog_GREP+set}" = set; then
2497 echo $ECHO_N "(cached) $ECHO_C" >&6
2498 else
2499 if test -n "$GREP"; then
2500 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2501 else
2502 ac_save_IFS=$IFS; IFS=$ac_path_separator
2503 ac_dummy="$PATH"
2504 for ac_dir in $ac_dummy; do
2505 IFS=$ac_save_IFS
2506 test -z "$ac_dir" && ac_dir=.
2507 $as_executable_p "$ac_dir/$ac_word" || continue
2508 ac_cv_prog_GREP="$ac_prog"
2509 echo "$as_me:2509: found $ac_dir/$ac_word" >&5
2510 break
2511 done
2512
2513 fi
2514 fi
2515 GREP=$ac_cv_prog_GREP
2516 if test -n "$GREP"; then
2517 echo "$as_me:2517: result: $GREP" >&5
2518 echo "${ECHO_T}$GREP" >&6
2519 else
2520 echo "$as_me:2520: result: no" >&5
2521 echo "${ECHO_T}no" >&6
2522 fi
2523
2524 test -n "$GREP" && break
2525 done
2526 test -n "$GREP" || GREP=": "
2527
2528 echo "$as_me:2528: checking for egrep" >&5
2529 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2530 if test "${ac_cv_path_EGREP+set}" = set; then
2531 echo $ECHO_N "(cached) $ECHO_C" >&6
2532 else
2533 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2534 then ac_cv_path_EGREP="$GREP -E"
2535 else
2536 for ac_prog in gegrep egrep
2537 do
2538 # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_path_EGREP+set}" = set; then
2543 echo $ECHO_N "(cached) $ECHO_C" >&6
2544 else
2545 case $EGREP in
2546 [\\/]* | ?:[\\/]*)
2547 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2548 ;;
2549 *)
2550 ac_save_IFS=$IFS; IFS=$ac_path_separator
2551 ac_dummy="$PATH"
2552 for ac_dir in $ac_dummy; do
2553 IFS=$ac_save_IFS
2554 test -z "$ac_dir" && ac_dir=.
2555 if $as_executable_p "$ac_dir/$ac_word"; then
2556 ac_cv_path_EGREP="$ac_dir/$ac_word"
2557 echo "$as_me:2557: found $ac_dir/$ac_word" >&5
2558 break
2559 fi
2560 done
2561
2562 ;;
2563 esac
2564 fi
2565 EGREP=$ac_cv_path_EGREP
2566
2567 if test -n "$EGREP"; then
2568 echo "$as_me:2568: result: $EGREP" >&5
2569 echo "${ECHO_T}$EGREP" >&6
2570 else
2571 echo "$as_me:2571: result: no" >&5
2572 echo "${ECHO_T}no" >&6
2573 fi
2574
2575 test -n "$EGREP" && break
2576 done
2577 test -n "$EGREP" || EGREP=": "
2578
2579 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2579: error: cannot find workable egrep" >&5
2580 echo "$as_me: error: cannot find workable egrep" >&2;}
2581 { (exit 1); exit 1; }; }
2582 fi
2583 fi
2584 echo "$as_me:2584: result: $ac_cv_path_EGREP" >&5
2585 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2586 EGREP="$ac_cv_path_EGREP"
2587
2588 ac_ext=c
2589 ac_cpp='$CPP $CPPFLAGS'
2590 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2591 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2592 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2593 ac_main_return="return"
2594 echo "$as_me:2594: checking how to run the C preprocessor" >&5
2595 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2596 # On Suns, sometimes $CPP names a directory.
2597 if test -n "$CPP" && test -d "$CPP"; then
2598 CPP=
2599 fi
2600 if test -z "$CPP"; then
2601 if test "${ac_cv_prog_CPP+set}" = set; then
2602 echo $ECHO_N "(cached) $ECHO_C" >&6
2603 else
2604 # Double quotes because CPP needs to be expanded
2605 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2606 do
2607 ac_preproc_ok=false
2608 for ac_c_preproc_warn_flag in '' yes
2609 do
2610 # Use a header file that comes with gcc, so configuring glibc
2611 # with a fresh cross-compiler works.
2612 # On the NeXT, cc -E runs the code through the compiler's parser,
2613 # not just through cpp. "Syntax error" is here to catch this case.
2614 cat >"conftest.$ac_ext" <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2617 #include <assert.h>
2618 Syntax error
2619 _ACEOF
2620 if { (eval echo "$as_me:2620: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2621 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2622 ac_status=$?
2623 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2624 rm -f conftest.er1
2625 cat conftest.err >&5
2626 echo "$as_me:2626: \$? = $ac_status" >&5
2627 (exit "$ac_status"); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2630 else
2631 ac_cpp_err=
2632 fi
2633 else
2634 ac_cpp_err=yes
2635 fi
2636 if test -z "$ac_cpp_err"; then
2637 :
2638 else
2639 echo "$as_me: failed program was:" >&5
2640 cat "conftest.$ac_ext" >&5
2641 # Broken: fails on valid input.
2642 continue
2643 fi
2644 rm -f conftest.err "conftest.$ac_ext"
2645
2646 # OK, works on sane cases. Now check whether non-existent headers
2647 # can be detected and how.
2648 cat >"conftest.$ac_ext" <<_ACEOF
2649 #line 2649 "configure"
2650 #include "confdefs.h"
2651 #include <ac_nonexistent.h>
2652 _ACEOF
2653 if { (eval echo "$as_me:2653: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2654 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2655 ac_status=$?
2656 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2657 rm -f conftest.er1
2658 cat conftest.err >&5
2659 echo "$as_me:2659: \$? = $ac_status" >&5
2660 (exit "$ac_status"); } >/dev/null; then
2661 if test -s conftest.err; then
2662 ac_cpp_err=$ac_c_preproc_warn_flag
2663 else
2664 ac_cpp_err=
2665 fi
2666 else
2667 ac_cpp_err=yes
2668 fi
2669 if test -z "$ac_cpp_err"; then
2670 # Broken: success on invalid input.
2671 continue
2672 else
2673 echo "$as_me: failed program was:" >&5
2674 cat "conftest.$ac_ext" >&5
2675 # Passes both tests.
2676 ac_preproc_ok=:
2677 break
2678 fi
2679 rm -f conftest.err "conftest.$ac_ext"
2680
2681 done
2682 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2683 rm -f conftest.err "conftest.$ac_ext"
2684 if $ac_preproc_ok; then
2685 break
2686 fi
2687
2688 done
2689 ac_cv_prog_CPP=$CPP
2690
2691 fi
2692 CPP=$ac_cv_prog_CPP
2693 else
2694 ac_cv_prog_CPP=$CPP
2695 fi
2696 echo "$as_me:2696: result: $CPP" >&5
2697 echo "${ECHO_T}$CPP" >&6
2698 ac_preproc_ok=false
2699 for ac_c_preproc_warn_flag in '' yes
2700 do
2701 # Use a header file that comes with gcc, so configuring glibc
2702 # with a fresh cross-compiler works.
2703 # On the NeXT, cc -E runs the code through the compiler's parser,
2704 # not just through cpp. "Syntax error" is here to catch this case.
2705 cat >"conftest.$ac_ext" <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <assert.h>
2709 Syntax error
2710 _ACEOF
2711 if { (eval echo "$as_me:2711: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2712 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2713 ac_status=$?
2714 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2715 rm -f conftest.er1
2716 cat conftest.err >&5
2717 echo "$as_me:2717: \$? = $ac_status" >&5
2718 (exit "$ac_status"); } >/dev/null; then
2719 if test -s conftest.err; then
2720 ac_cpp_err=$ac_c_preproc_warn_flag
2721 else
2722 ac_cpp_err=
2723 fi
2724 else
2725 ac_cpp_err=yes
2726 fi
2727 if test -z "$ac_cpp_err"; then
2728 :
2729 else
2730 echo "$as_me: failed program was:" >&5
2731 cat "conftest.$ac_ext" >&5
2732 # Broken: fails on valid input.
2733 continue
2734 fi
2735 rm -f conftest.err "conftest.$ac_ext"
2736
2737 # OK, works on sane cases. Now check whether non-existent headers
2738 # can be detected and how.
2739 cat >"conftest.$ac_ext" <<_ACEOF
2740 #line 2740 "configure"
2741 #include "confdefs.h"
2742 #include <ac_nonexistent.h>
2743 _ACEOF
2744 if { (eval echo "$as_me:2744: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2745 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2746 ac_status=$?
2747 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2748 rm -f conftest.er1
2749 cat conftest.err >&5
2750 echo "$as_me:2750: \$? = $ac_status" >&5
2751 (exit "$ac_status"); } >/dev/null; then
2752 if test -s conftest.err; then
2753 ac_cpp_err=$ac_c_preproc_warn_flag
2754 else
2755 ac_cpp_err=
2756 fi
2757 else
2758 ac_cpp_err=yes
2759 fi
2760 if test -z "$ac_cpp_err"; then
2761 # Broken: success on invalid input.
2762 continue
2763 else
2764 echo "$as_me: failed program was:" >&5
2765 cat "conftest.$ac_ext" >&5
2766 # Passes both tests.
2767 ac_preproc_ok=:
2768 break
2769 fi
2770 rm -f conftest.err "conftest.$ac_ext"
2771
2772 done
2773 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2774 rm -f conftest.err "conftest.$ac_ext"
2775 if $ac_preproc_ok; then
2776 :
2777 else
2778 { { echo "$as_me:2778: error: C preprocessor \"$CPP\" fails sanity check" >&5
2779 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2780 { (exit 1); exit 1; }; }
2781 fi
2782
2783 ac_ext=c
2784 ac_cpp='$CPP $CPPFLAGS'
2785 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2786 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2788 ac_main_return="return"
2789
2790 for ac_prog in mawk gawk nawk awk
2791 do
2792 # Extract the first word of "$ac_prog", so it can be a program name with args.
2793 set dummy $ac_prog; ac_word=$2
2794 echo "$as_me:2794: checking for $ac_word" >&5
2795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2796 if test "${ac_cv_prog_AWK+set}" = set; then
2797 echo $ECHO_N "(cached) $ECHO_C" >&6
2798 else
2799 if test -n "$AWK"; then
2800 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2801 else
2802 ac_save_IFS=$IFS; IFS=$ac_path_separator
2803 ac_dummy="$PATH"
2804 for ac_dir in $ac_dummy; do
2805 IFS=$ac_save_IFS
2806 test -z "$ac_dir" && ac_dir=.
2807 $as_executable_p "$ac_dir/$ac_word" || continue
2808 ac_cv_prog_AWK="$ac_prog"
2809 echo "$as_me:2809: found $ac_dir/$ac_word" >&5
2810 break
2811 done
2812
2813 fi
2814 fi
2815 AWK=$ac_cv_prog_AWK
2816 if test -n "$AWK"; then
2817 echo "$as_me:2817: result: $AWK" >&5
2818 echo "${ECHO_T}$AWK" >&6
2819 else
2820 echo "$as_me:2820: result: no" >&5
2821 echo "${ECHO_T}no" >&6
2822 fi
2823
2824 test -n "$AWK" && break
2825 done
2826
2827 # Find a good install program. We prefer a C program (faster),
2828 # so one script is as good as another. But avoid the broken or
2829 # incompatible versions:
2830 # SysV /etc/install, /usr/sbin/install
2831 # SunOS /usr/etc/install
2832 # IRIX /sbin/install
2833 # AIX /bin/install
2834 # AmigaOS /C/install, which installs bootblocks on floppy discs
2835 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2836 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2837 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2838 # ./install, which can be erroneously created by make from ./install.sh.
2839 echo "$as_me:2839: checking for a BSD compatible install" >&5
2840 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2841 if test -z "$INSTALL"; then
2842 if test "${ac_cv_path_install+set}" = set; then
2843 echo $ECHO_N "(cached) $ECHO_C" >&6
2844 else
2845 ac_save_IFS=$IFS; IFS=$ac_path_separator
2846 for ac_dir in $PATH; do
2847 IFS=$ac_save_IFS
2848 # Account for people who put trailing slashes in PATH elements.
2849 case $ac_dir/ in
2850 / | ./ | .// | /cC/* \
2851 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2852 | /usr/ucb/* ) ;;
2853 *)
2854 # OSF1 and SCO ODT 3.0 have their own names for install.
2855 # Don't use installbsd from OSF since it installs stuff as root
2856 # by default.
2857 for ac_prog in ginstall scoinst install; do
2858 if $as_executable_p "$ac_dir/$ac_prog"; then
2859 if test $ac_prog = install &&
2860 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2861 # AIX install. It has an incompatible calling convention.
2862 :
2863 elif test $ac_prog = install &&
2864 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2865 # program-specific install script used by HP pwplus--don't use.
2866 :
2867 else
2868 ac_cv_path_install="$ac_dir/$ac_prog -c"
2869 break 2
2870 fi
2871 fi
2872 done
2873 ;;
2874 esac
2875 done
2876
2877 fi
2878 if test "${ac_cv_path_install+set}" = set; then
2879 INSTALL=$ac_cv_path_install
2880 else
2881 # As a last resort, use the slow shell script. We don't cache a
2882 # path for INSTALL within a source directory, because that will
2883 # break other packages using the cache if that directory is
2884 # removed, or if the path is relative.
2885 INSTALL=$ac_install_sh
2886 fi
2887 fi
2888 echo "$as_me:2888: result: $INSTALL" >&5
2889 echo "${ECHO_T}$INSTALL" >&6
2890
2891 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2892 # It thinks the first close brace ends the variable substitution.
2893 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2894
2895 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2896
2897 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2898
2899 echo "$as_me:2899: checking whether ln -s works" >&5
2900 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2901 LN_S=$as_ln_s
2902 if test "$LN_S" = "ln -s"; then
2903 echo "$as_me:2903: result: yes" >&5
2904 echo "${ECHO_T}yes" >&6
2905 else
2906 echo "$as_me:2906: result: no, using $LN_S" >&5
2907 echo "${ECHO_T}no, using $LN_S" >&6
2908 fi
2909
2910 test "$program_prefix" != NONE &&
2911 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2912 # Use a double $ so make ignores it.
2913 test "$program_suffix" != NONE &&
2914 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2915 # Double any \ or $. echo might interpret backslashes.
2916 # By default was `s,x,x', remove it if useless.
2917 cat <<\_ACEOF >conftest.sed
2918 s/[\\$]/&&/g;s/;s,x,x,$//
2919 _ACEOF
2920 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2921 rm conftest.sed
2922
2923 for ac_prog in lint cppcheck splint
2924 do
2925 # Extract the first word of "$ac_prog", so it can be a program name with args.
2926 set dummy $ac_prog; ac_word=$2
2927 echo "$as_me:2927: checking for $ac_word" >&5
2928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2929 if test "${ac_cv_prog_LINT+set}" = set; then
2930 echo $ECHO_N "(cached) $ECHO_C" >&6
2931 else
2932 if test -n "$LINT"; then
2933 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2934 else
2935 ac_save_IFS=$IFS; IFS=$ac_path_separator
2936 ac_dummy="$PATH"
2937 for ac_dir in $ac_dummy; do
2938 IFS=$ac_save_IFS
2939 test -z "$ac_dir" && ac_dir=.
2940 $as_executable_p "$ac_dir/$ac_word" || continue
2941 ac_cv_prog_LINT="$ac_prog"
2942 echo "$as_me:2942: found $ac_dir/$ac_word" >&5
2943 break
2944 done
2945
2946 fi
2947 fi
2948 LINT=$ac_cv_prog_LINT
2949 if test -n "$LINT"; then
2950 echo "$as_me:2950: result: $LINT" >&5
2951 echo "${ECHO_T}$LINT" >&6
2952 else
2953 echo "$as_me:2953: result: no" >&5
2954 echo "${ECHO_T}no" >&6
2955 fi
2956
2957 test -n "$LINT" && break
2958 done
2959
2960 case "x$LINT" in
2961 (xcppcheck|x*/cppcheck)
2962 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2963 ;;
2964 esac
2965
2966 ### checks for compiler characteristics
2967
2968 echo "$as_me:2968: checking if the POSIX test-macros are already defined" >&5
2969 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
2970 if test "${cf_cv_posix_visible+set}" = set; then
2971 echo $ECHO_N "(cached) $ECHO_C" >&6
2972 else
2973
2974 cat >"conftest.$ac_ext" <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2977 #include <stdio.h>
2978 int
2979 main (void)
2980 {
2981
2982 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
2983 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
2984 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
2985 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
2986 #error conflicting symbols found
2987 #endif
2988
2989 ;
2990 return 0;
2991 }
2992 _ACEOF
2993 rm -f "conftest.$ac_objext"
2994 if { (eval echo "$as_me:2994: \"$ac_compile\"") >&5
2995 (eval $ac_compile) 2>&5
2996 ac_status=$?
2997 echo "$as_me:2997: \$? = $ac_status" >&5
2998 (exit "$ac_status"); } &&
2999 { ac_try='test -s "conftest.$ac_objext"'
3000 { (eval echo "$as_me:3000: \"$ac_try\"") >&5
3001 (eval $ac_try) 2>&5
3002 ac_status=$?
3003 echo "$as_me:3003: \$? = $ac_status" >&5
3004 (exit "$ac_status"); }; }; then
3005 cf_cv_posix_visible=no
3006 else
3007 echo "$as_me: failed program was:" >&5
3008 cat "conftest.$ac_ext" >&5
3009 cf_cv_posix_visible=yes
3010 fi
3011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3012
3013 fi
3014 echo "$as_me:3014: result: $cf_cv_posix_visible" >&5
3015 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3016
3017 if test "$cf_cv_posix_visible" = no; then
3018
3019 cf_XOPEN_SOURCE=700
3020 cf_POSIX_C_SOURCE=199506L
3021 cf_xopen_source=
3022
3023 case "$host_os" in
3024 (aix[4-7]*)
3025 cf_xopen_source="-D_ALL_SOURCE"
3026 ;;
3027 (darwin[0-8].*)
3028 cf_xopen_source="-D_APPLE_C_SOURCE"
3029 ;;
3030 (darwin*)
3031 cf_xopen_source="-D_DARWIN_C_SOURCE"
3032 cf_XOPEN_SOURCE=
3033 ;;
3034 (freebsd*|dragonfly*|midnightbsd*)
3035 # 5.x headers associate
3036 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3037 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3038 cf_POSIX_C_SOURCE=200112L
3039 cf_XOPEN_SOURCE=600
3040 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3041 ;;
3042 (hpux11*)
3043 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3044 ;;
3045 (hpux*)
3046 cf_xopen_source="-D_HPUX_SOURCE"
3047 ;;
3048 (irix[56].*)
3049 cf_xopen_source="-D_SGI_SOURCE"
3050 cf_XOPEN_SOURCE=
3051 ;;
3052 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
3053
3054 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3055
3056 echo "$as_me:3056: checking if this is the GNU C library" >&5
3057 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3058 if test "${cf_cv_gnu_library+set}" = set; then
3059 echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061
3062 cat >"conftest.$ac_ext" <<_ACEOF
3063 #line 3063 "configure"
3064 #include "confdefs.h"
3065 #include <sys/types.h>
3066 int
3067 main (void)
3068 {
3069
3070 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3071 return 0;
3072 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3073 return 0;
3074 #else
3075 # error not GNU C library
3076 #endif
3077 ;
3078 return 0;
3079 }
3080 _ACEOF
3081 rm -f "conftest.$ac_objext"
3082 if { (eval echo "$as_me:3082: \"$ac_compile\"") >&5
3083 (eval $ac_compile) 2>&5
3084 ac_status=$?
3085 echo "$as_me:3085: \$? = $ac_status" >&5
3086 (exit "$ac_status"); } &&
3087 { ac_try='test -s "conftest.$ac_objext"'
3088 { (eval echo "$as_me:3088: \"$ac_try\"") >&5
3089 (eval $ac_try) 2>&5
3090 ac_status=$?
3091 echo "$as_me:3091: \$? = $ac_status" >&5
3092 (exit "$ac_status"); }; }; then
3093 cf_cv_gnu_library=yes
3094 else
3095 echo "$as_me: failed program was:" >&5
3096 cat "conftest.$ac_ext" >&5
3097 cf_cv_gnu_library=no
3098 fi
3099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3100
3101 fi
3102 echo "$as_me:3102: result: $cf_cv_gnu_library" >&5
3103 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3104
3105 if test x$cf_cv_gnu_library = xyes; then
3106
3107 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3108 # was changed to help a little. newlib incorporated the change about 4
3109 # years later.
3110 echo "$as_me:3110: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3111 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3112 if test "${cf_cv_gnu_library_219+set}" = set; then
3113 echo $ECHO_N "(cached) $ECHO_C" >&6
3114 else
3115
3116 cf_save="$CPPFLAGS"
3117
3118 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3119 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3120
3121 cat >"conftest.$ac_ext" <<_ACEOF
3122 #line 3122 "configure"
3123 #include "confdefs.h"
3124 #include <sys/types.h>
3125 int
3126 main (void)
3127 {
3128
3129 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3130 return 0;
3131 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3132 return 0;
3133 #else
3134 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3135 #endif
3136 ;
3137 return 0;
3138 }
3139 _ACEOF
3140 rm -f "conftest.$ac_objext"
3141 if { (eval echo "$as_me:3141: \"$ac_compile\"") >&5
3142 (eval $ac_compile) 2>&5
3143 ac_status=$?
3144 echo "$as_me:3144: \$? = $ac_status" >&5
3145 (exit "$ac_status"); } &&
3146 { ac_try='test -s "conftest.$ac_objext"'
3147 { (eval echo "$as_me:3147: \"$ac_try\"") >&5
3148 (eval $ac_try) 2>&5
3149 ac_status=$?
3150 echo "$as_me:3150: \$? = $ac_status" >&5
3151 (exit "$ac_status"); }; }; then
3152 cf_cv_gnu_library_219=yes
3153 else
3154 echo "$as_me: failed program was:" >&5
3155 cat "conftest.$ac_ext" >&5
3156 cf_cv_gnu_library_219=no
3157 fi
3158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3159 CPPFLAGS="$cf_save"
3160
3161 fi
3162 echo "$as_me:3162: result: $cf_cv_gnu_library_219" >&5
3163 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3164
3165 if test "x$cf_cv_gnu_library_219" = xyes; then
3166 cf_save="$CPPFLAGS"
3167 echo "$as_me:3167: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3168 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3169 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3170 echo $ECHO_N "(cached) $ECHO_C" >&6
3171 else
3172
3173 cf_fix_cppflags=no
3174 cf_new_cflags=
3175 cf_new_cppflags=
3176 cf_new_extra_cppflags=
3177
3178 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3179 do
3180 case "$cf_fix_cppflags" in
3181 (no)
3182 case "$cf_add_cflags" in
3183 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3184 case "$cf_add_cflags" in
3185 (-D*)
3186 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3187
3188 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3189 && test -z "${cf_tst_cflags}" \
3190 && cf_fix_cppflags=yes
3191
3192 if test "$cf_fix_cppflags" = yes ; then
3193
3194 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3195 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3196
3197 continue
3198 elif test "${cf_tst_cflags}" = "\"'" ; then
3199
3200 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3201 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3202
3203 continue
3204 fi
3205 ;;
3206 esac
3207 case "$CPPFLAGS" in
3208 (*$cf_add_cflags)
3209 ;;
3210 (*)
3211 case "$cf_add_cflags" in
3212 (-D*)
3213 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3214
3215 CPPFLAGS=`echo "$CPPFLAGS" | \
3216 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3217 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3218
3219 ;;
3220 esac
3221
3222 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3223 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3224
3225 ;;
3226 esac
3227 ;;
3228 (*)
3229
3230 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3231 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3232
3233 ;;
3234 esac
3235 ;;
3236 (yes)
3237
3238 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3239 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3240
3241 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3242
3243 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3244 && test -z "${cf_tst_cflags}" \
3245 && cf_fix_cppflags=no
3246 ;;
3247 esac
3248 done
3249
3250 if test -n "$cf_new_cflags" ; then
3251
3252 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3253 CFLAGS="${CFLAGS}$cf_new_cflags"
3254
3255 fi
3256
3257 if test -n "$cf_new_cppflags" ; then
3258
3259 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3260 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3261
3262 fi
3263
3264 if test -n "$cf_new_extra_cppflags" ; then
3265
3266 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3267 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3268
3269 fi
3270
3271 cat >"conftest.$ac_ext" <<_ACEOF
3272 #line 3272 "configure"
3273 #include "confdefs.h"
3274
3275 #include <limits.h>
3276 #include <sys/types.h>
3277
3278 int
3279 main (void)
3280 {
3281
3282 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3283 return 0;
3284 #else
3285 # error GNU C library is too old
3286 #endif
3287 ;
3288 return 0;
3289 }
3290 _ACEOF
3291 rm -f "conftest.$ac_objext"
3292 if { (eval echo "$as_me:3292: \"$ac_compile\"") >&5
3293 (eval $ac_compile) 2>&5
3294 ac_status=$?
3295 echo "$as_me:3295: \$? = $ac_status" >&5
3296 (exit "$ac_status"); } &&
3297 { ac_try='test -s "conftest.$ac_objext"'
3298 { (eval echo "$as_me:3298: \"$ac_try\"") >&5
3299 (eval $ac_try) 2>&5
3300 ac_status=$?
3301 echo "$as_me:3301: \$? = $ac_status" >&5
3302 (exit "$ac_status"); }; }; then
3303 cf_cv_gnu_dftsrc_219=yes
3304 else
3305 echo "$as_me: failed program was:" >&5
3306 cat "conftest.$ac_ext" >&5
3307 cf_cv_gnu_dftsrc_219=no
3308 fi
3309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3310
3311 fi
3312 echo "$as_me:3312: result: $cf_cv_gnu_dftsrc_219" >&5
3313 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3314 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3315 else
3316 cf_cv_gnu_dftsrc_219=maybe
3317 fi
3318
3319 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3320
3321 echo "$as_me:3321: checking if we must define _GNU_SOURCE" >&5
3322 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3323 if test "${cf_cv_gnu_source+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326
3327 cat >"conftest.$ac_ext" <<_ACEOF
3328 #line 3328 "configure"
3329 #include "confdefs.h"
3330 #include <sys/types.h>
3331 int
3332 main (void)
3333 {
3334
3335 #ifndef _XOPEN_SOURCE
3336 #error expected _XOPEN_SOURCE to be defined
3337 #endif
3338 ;
3339 return 0;
3340 }
3341 _ACEOF
3342 rm -f "conftest.$ac_objext"
3343 if { (eval echo "$as_me:3343: \"$ac_compile\"") >&5
3344 (eval $ac_compile) 2>&5
3345 ac_status=$?
3346 echo "$as_me:3346: \$? = $ac_status" >&5
3347 (exit "$ac_status"); } &&
3348 { ac_try='test -s "conftest.$ac_objext"'
3349 { (eval echo "$as_me:3349: \"$ac_try\"") >&5
3350 (eval $ac_try) 2>&5
3351 ac_status=$?
3352 echo "$as_me:3352: \$? = $ac_status" >&5
3353 (exit "$ac_status"); }; }; then
3354 cf_cv_gnu_source=no
3355 else
3356 echo "$as_me: failed program was:" >&5
3357 cat "conftest.$ac_ext" >&5
3358 cf_save="$CPPFLAGS"
3359
3360 cf_fix_cppflags=no
3361 cf_new_cflags=
3362 cf_new_cppflags=
3363 cf_new_extra_cppflags=
3364
3365 for cf_add_cflags in -D_GNU_SOURCE
3366 do
3367 case "$cf_fix_cppflags" in
3368 (no)
3369 case "$cf_add_cflags" in
3370 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3371 case "$cf_add_cflags" in
3372 (-D*)
3373 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3374
3375 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3376 && test -z "${cf_tst_cflags}" \
3377 && cf_fix_cppflags=yes
3378
3379 if test "$cf_fix_cppflags" = yes ; then
3380
3381 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3382 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3383
3384 continue
3385 elif test "${cf_tst_cflags}" = "\"'" ; then
3386
3387 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3388 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3389
3390 continue
3391 fi
3392 ;;
3393 esac
3394 case "$CPPFLAGS" in
3395 (*$cf_add_cflags)
3396 ;;
3397 (*)
3398 case "$cf_add_cflags" in
3399 (-D*)
3400 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3401
3402 CPPFLAGS=`echo "$CPPFLAGS" | \
3403 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3404 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3405
3406 ;;
3407 esac
3408
3409 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3410 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3411
3412 ;;
3413 esac
3414 ;;
3415 (*)
3416
3417 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3418 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3419
3420 ;;
3421 esac
3422 ;;
3423 (yes)
3424
3425 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3426 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3427
3428 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3429
3430 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3431 && test -z "${cf_tst_cflags}" \
3432 && cf_fix_cppflags=no
3433 ;;
3434 esac
3435 done
3436
3437 if test -n "$cf_new_cflags" ; then
3438
3439 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3440 CFLAGS="${CFLAGS}$cf_new_cflags"
3441
3442 fi
3443
3444 if test -n "$cf_new_cppflags" ; then
3445
3446 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3447 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3448
3449 fi
3450
3451 if test -n "$cf_new_extra_cppflags" ; then
3452
3453 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3454 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3455
3456 fi
3457
3458 cat >"conftest.$ac_ext" <<_ACEOF
3459 #line 3459 "configure"
3460 #include "confdefs.h"
3461 #include <sys/types.h>
3462 int
3463 main (void)
3464 {
3465
3466 #ifdef _XOPEN_SOURCE
3467 #error expected _XOPEN_SOURCE to be undefined
3468 #endif
3469 ;
3470 return 0;
3471 }
3472 _ACEOF
3473 rm -f "conftest.$ac_objext"
3474 if { (eval echo "$as_me:3474: \"$ac_compile\"") >&5
3475 (eval $ac_compile) 2>&5
3476 ac_status=$?
3477 echo "$as_me:3477: \$? = $ac_status" >&5
3478 (exit "$ac_status"); } &&
3479 { ac_try='test -s "conftest.$ac_objext"'
3480 { (eval echo "$as_me:3480: \"$ac_try\"") >&5
3481 (eval $ac_try) 2>&5
3482 ac_status=$?
3483 echo "$as_me:3483: \$? = $ac_status" >&5
3484 (exit "$ac_status"); }; }; then
3485 cf_cv_gnu_source=no
3486 else
3487 echo "$as_me: failed program was:" >&5
3488 cat "conftest.$ac_ext" >&5
3489 cf_cv_gnu_source=yes
3490 fi
3491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3492 CPPFLAGS="$cf_save"
3493
3494 fi
3495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3496
3497 fi
3498 echo "$as_me:3498: result: $cf_cv_gnu_source" >&5
3499 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3500
3501 if test "$cf_cv_gnu_source" = yes
3502 then
3503 echo "$as_me:3503: checking if we should also define _DEFAULT_SOURCE" >&5
3504 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3505 if test "${cf_cv_default_source+set}" = set; then
3506 echo $ECHO_N "(cached) $ECHO_C" >&6
3507 else
3508
3509 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3510 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3511
3512 cat >"conftest.$ac_ext" <<_ACEOF
3513 #line 3513 "configure"
3514 #include "confdefs.h"
3515 #include <sys/types.h>
3516 int
3517 main (void)
3518 {
3519
3520 #ifdef _DEFAULT_SOURCE
3521 #error expected _DEFAULT_SOURCE to be undefined
3522 #endif
3523 ;
3524 return 0;
3525 }
3526 _ACEOF
3527 rm -f "conftest.$ac_objext"
3528 if { (eval echo "$as_me:3528: \"$ac_compile\"") >&5
3529 (eval $ac_compile) 2>&5
3530 ac_status=$?
3531 echo "$as_me:3531: \$? = $ac_status" >&5
3532 (exit "$ac_status"); } &&
3533 { ac_try='test -s "conftest.$ac_objext"'
3534 { (eval echo "$as_me:3534: \"$ac_try\"") >&5
3535 (eval $ac_try) 2>&5
3536 ac_status=$?
3537 echo "$as_me:3537: \$? = $ac_status" >&5
3538 (exit "$ac_status"); }; }; then
3539 cf_cv_default_source=no
3540 else
3541 echo "$as_me: failed program was:" >&5
3542 cat "conftest.$ac_ext" >&5
3543 cf_cv_default_source=yes
3544 fi
3545 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3546
3547 fi
3548 echo "$as_me:3548: result: $cf_cv_default_source" >&5
3549 echo "${ECHO_T}$cf_cv_default_source" >&6
3550 if test "$cf_cv_default_source" = yes
3551 then
3552
3553 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3554 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3555
3556 fi
3557 fi
3558 fi
3559
3560 fi
3561
3562 ;;
3563 (minix*)
3564 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3565 ;;
3566 (mirbsd*)
3567 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3568 cf_XOPEN_SOURCE=
3569
3570 if test "$cf_cv_posix_visible" = no; then
3571
3572 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3573
3574 cf_save_CFLAGS="$CFLAGS"
3575 cf_save_CPPFLAGS="$CPPFLAGS"
3576
3577 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3578 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3579 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3580
3581 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3582 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3583 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3584
3585 echo "$as_me:3585: checking if we should define _POSIX_C_SOURCE" >&5
3586 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3587 if test "${cf_cv_posix_c_source+set}" = set; then
3588 echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590
3591 echo "${as_me:-configure}:3591: testing if the symbol is already defined go no further ..." 1>&5
3592
3593 cat >"conftest.$ac_ext" <<_ACEOF
3594 #line 3594 "configure"
3595 #include "confdefs.h"
3596 #include <sys/types.h>
3597 int
3598 main (void)
3599 {
3600
3601 #ifndef _POSIX_C_SOURCE
3602 #error _POSIX_C_SOURCE is not defined
3603 #endif
3604 ;
3605 return 0;
3606 }
3607 _ACEOF
3608 rm -f "conftest.$ac_objext"
3609 if { (eval echo "$as_me:3609: \"$ac_compile\"") >&5
3610 (eval $ac_compile) 2>&5
3611 ac_status=$?
3612 echo "$as_me:3612: \$? = $ac_status" >&5
3613 (exit "$ac_status"); } &&
3614 { ac_try='test -s "conftest.$ac_objext"'
3615 { (eval echo "$as_me:3615: \"$ac_try\"") >&5
3616 (eval $ac_try) 2>&5
3617 ac_status=$?
3618 echo "$as_me:3618: \$? = $ac_status" >&5
3619 (exit "$ac_status"); }; }; then
3620 cf_cv_posix_c_source=no
3621 else
3622 echo "$as_me: failed program was:" >&5
3623 cat "conftest.$ac_ext" >&5
3624 cf_want_posix_source=no
3625 case .$cf_POSIX_C_SOURCE in
3626 (.[12]??*)
3627 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3628 ;;
3629 (.2)
3630 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3631 cf_want_posix_source=yes
3632 ;;
3633 (.*)
3634 cf_want_posix_source=yes
3635 ;;
3636 esac
3637 if test "$cf_want_posix_source" = yes ; then
3638 cat >"conftest.$ac_ext" <<_ACEOF
3639 #line 3639 "configure"
3640 #include "confdefs.h"
3641 #include <sys/types.h>
3642 int
3643 main (void)
3644 {
3645
3646 #ifdef _POSIX_SOURCE
3647 #error _POSIX_SOURCE is defined
3648 #endif
3649 ;
3650 return 0;
3651 }
3652 _ACEOF
3653 rm -f "conftest.$ac_objext"
3654 if { (eval echo "$as_me:3654: \"$ac_compile\"") >&5
3655 (eval $ac_compile) 2>&5
3656 ac_status=$?
3657 echo "$as_me:3657: \$? = $ac_status" >&5
3658 (exit "$ac_status"); } &&
3659 { ac_try='test -s "conftest.$ac_objext"'
3660 { (eval echo "$as_me:3660: \"$ac_try\"") >&5
3661 (eval $ac_try) 2>&5
3662 ac_status=$?
3663 echo "$as_me:3663: \$? = $ac_status" >&5
3664 (exit "$ac_status"); }; }; then
3665 :
3666 else
3667 echo "$as_me: failed program was:" >&5
3668 cat "conftest.$ac_ext" >&5
3669 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3670 fi
3671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3672 fi
3673
3674 echo "${as_me:-configure}:3674: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3675
3676 CFLAGS="$cf_trim_CFLAGS"
3677 CPPFLAGS="$cf_trim_CPPFLAGS"
3678
3679 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3680 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3681
3682 echo "${as_me:-configure}:3682: testing if the second compile does not leave our definition intact error ..." 1>&5
3683
3684 cat >"conftest.$ac_ext" <<_ACEOF
3685 #line 3685 "configure"
3686 #include "confdefs.h"
3687 #include <sys/types.h>
3688 int
3689 main (void)
3690 {
3691
3692 #ifndef _POSIX_C_SOURCE
3693 #error _POSIX_C_SOURCE is not defined
3694 #endif
3695 ;
3696 return 0;
3697 }
3698 _ACEOF
3699 rm -f "conftest.$ac_objext"
3700 if { (eval echo "$as_me:3700: \"$ac_compile\"") >&5
3701 (eval $ac_compile) 2>&5
3702 ac_status=$?
3703 echo "$as_me:3703: \$? = $ac_status" >&5
3704 (exit "$ac_status"); } &&
3705 { ac_try='test -s "conftest.$ac_objext"'
3706 { (eval echo "$as_me:3706: \"$ac_try\"") >&5
3707 (eval $ac_try) 2>&5
3708 ac_status=$?
3709 echo "$as_me:3709: \$? = $ac_status" >&5
3710 (exit "$ac_status"); }; }; then
3711 :
3712 else
3713 echo "$as_me: failed program was:" >&5
3714 cat "conftest.$ac_ext" >&5
3715 cf_cv_posix_c_source=no
3716 fi
3717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3718 CFLAGS="$cf_save_CFLAGS"
3719 CPPFLAGS="$cf_save_CPPFLAGS"
3720
3721 fi
3722 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3723
3724 fi
3725 echo "$as_me:3725: result: $cf_cv_posix_c_source" >&5
3726 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3727
3728 if test "$cf_cv_posix_c_source" != no ; then
3729 CFLAGS="$cf_trim_CFLAGS"
3730 CPPFLAGS="$cf_trim_CPPFLAGS"
3731
3732 cf_fix_cppflags=no
3733 cf_new_cflags=
3734 cf_new_cppflags=
3735 cf_new_extra_cppflags=
3736
3737 for cf_add_cflags in $cf_cv_posix_c_source
3738 do
3739 case "$cf_fix_cppflags" in
3740 (no)
3741 case "$cf_add_cflags" in
3742 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3743 case "$cf_add_cflags" in
3744 (-D*)
3745 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3746
3747 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3748 && test -z "${cf_tst_cflags}" \
3749 && cf_fix_cppflags=yes
3750
3751 if test "$cf_fix_cppflags" = yes ; then
3752
3753 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3754 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3755
3756 continue
3757 elif test "${cf_tst_cflags}" = "\"'" ; then
3758
3759 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3760 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3761
3762 continue
3763 fi
3764 ;;
3765 esac
3766 case "$CPPFLAGS" in
3767 (*$cf_add_cflags)
3768 ;;
3769 (*)
3770 case "$cf_add_cflags" in
3771 (-D*)
3772 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3773
3774 CPPFLAGS=`echo "$CPPFLAGS" | \
3775 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3776 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3777
3778 ;;
3779 esac
3780
3781 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3782 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3783
3784 ;;
3785 esac
3786 ;;
3787 (*)
3788
3789 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3790 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3791
3792 ;;
3793 esac
3794 ;;
3795 (yes)
3796
3797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3799
3800 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3801
3802 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3803 && test -z "${cf_tst_cflags}" \
3804 && cf_fix_cppflags=no
3805 ;;
3806 esac
3807 done
3808
3809 if test -n "$cf_new_cflags" ; then
3810
3811 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3812 CFLAGS="${CFLAGS}$cf_new_cflags"
3813
3814 fi
3815
3816 if test -n "$cf_new_cppflags" ; then
3817
3818 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3819 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3820
3821 fi
3822
3823 if test -n "$cf_new_extra_cppflags" ; then
3824
3825 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3826 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3827
3828 fi
3829
3830 fi
3831
3832 fi # cf_cv_posix_visible
3833
3834 ;;
3835 (netbsd*)
3836 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3837 ;;
3838 (openbsd[6-9]*)
3839 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
3840 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
3841 # Abusing the conformance level is a workaround.
3842 { echo "$as_me:3842: WARNING: this system does not provide usable locale support" >&5
3843 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
3844 cf_xopen_source="-D_BSD_SOURCE"
3845 cf_XOPEN_SOURCE=700
3846 ;;
3847 (openbsd[4-5]*)
3848 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3849 cf_xopen_source="-D_BSD_SOURCE"
3850 cf_XOPEN_SOURCE=600
3851 ;;
3852 (openbsd*)
3853 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3854 ;;
3855 (osf[45]*)
3856 cf_xopen_source="-D_OSF_SOURCE"
3857 ;;
3858 (nto-qnx*)
3859 cf_xopen_source="-D_QNX_SOURCE"
3860 ;;
3861 (sco*)
3862 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3863 ;;
3864 (solaris2.*)
3865 cf_xopen_source="-D__EXTENSIONS__"
3866 cf_cv_xopen_source=broken
3867 ;;
3868 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3869 cf_XOPEN_SOURCE=
3870 cf_POSIX_C_SOURCE=
3871 ;;
3872 (*)
3873
3874 echo "$as_me:3874: checking if we should define _XOPEN_SOURCE" >&5
3875 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3876 if test "${cf_cv_xopen_source+set}" = set; then
3877 echo $ECHO_N "(cached) $ECHO_C" >&6
3878 else
3879
3880 cat >"conftest.$ac_ext" <<_ACEOF
3881 #line 3881 "configure"
3882 #include "confdefs.h"
3883
3884 $ac_includes_default
3885
3886 int
3887 main (void)
3888 {
3889
3890 #ifndef _XOPEN_SOURCE
3891 #error _XOPEN_SOURCE is not defined
3892 #endif
3893
3894 ;
3895 return 0;
3896 }
3897 _ACEOF
3898 rm -f "conftest.$ac_objext"
3899 if { (eval echo "$as_me:3899: \"$ac_compile\"") >&5
3900 (eval $ac_compile) 2>&5
3901 ac_status=$?
3902 echo "$as_me:3902: \$? = $ac_status" >&5
3903 (exit "$ac_status"); } &&
3904 { ac_try='test -s "conftest.$ac_objext"'
3905 { (eval echo "$as_me:3905: \"$ac_try\"") >&5
3906 (eval $ac_try) 2>&5
3907 ac_status=$?
3908 echo "$as_me:3908: \$? = $ac_status" >&5
3909 (exit "$ac_status"); }; }; then
3910 cf_cv_xopen_source=no
3911 else
3912 echo "$as_me: failed program was:" >&5
3913 cat "conftest.$ac_ext" >&5
3914 cf_save="$CPPFLAGS"
3915
3916 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3917 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3918
3919 cat >"conftest.$ac_ext" <<_ACEOF
3920 #line 3920 "configure"
3921 #include "confdefs.h"
3922
3923 $ac_includes_default
3924
3925 int
3926 main (void)
3927 {
3928
3929 #ifndef _XOPEN_SOURCE
3930 #error _XOPEN_SOURCE is not defined
3931 #endif
3932
3933 ;
3934 return 0;
3935 }
3936 _ACEOF
3937 rm -f "conftest.$ac_objext"
3938 if { (eval echo "$as_me:3938: \"$ac_compile\"") >&5
3939 (eval $ac_compile) 2>&5
3940 ac_status=$?
3941 echo "$as_me:3941: \$? = $ac_status" >&5
3942 (exit "$ac_status"); } &&
3943 { ac_try='test -s "conftest.$ac_objext"'
3944 { (eval echo "$as_me:3944: \"$ac_try\"") >&5
3945 (eval $ac_try) 2>&5
3946 ac_status=$?
3947 echo "$as_me:3947: \$? = $ac_status" >&5
3948 (exit "$ac_status"); }; }; then
3949 cf_cv_xopen_source=no
3950 else
3951 echo "$as_me: failed program was:" >&5
3952 cat "conftest.$ac_ext" >&5
3953 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3954 fi
3955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3956 CPPFLAGS="$cf_save"
3957
3958 fi
3959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3960
3961 fi
3962 echo "$as_me:3962: result: $cf_cv_xopen_source" >&5
3963 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3964
3965 if test "$cf_cv_xopen_source" != no ; then
3966
3967 CFLAGS=`echo "$CFLAGS" | \
3968 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3969 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3970
3971 CPPFLAGS=`echo "$CPPFLAGS" | \
3972 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3973 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3974
3975 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3976
3977 for cf_add_cflags in $cf_temp_xopen_source
3978 do
3979 case "x$cf_add_cflags" in
3980 (x-[DU]*)
3981
3982 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3983 while true
3984 do
3985 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'`
3986 test "$CFLAGS" != "$cf_old_cflag" || break
3987
3988 CFLAGS="$cf_old_cflag"
3989 done
3990
3991 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3992 while true
3993 do
3994 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'`
3995 test "$CPPFLAGS" != "$cf_old_cflag" || break
3996
3997 CPPFLAGS="$cf_old_cflag"
3998 done
3999
4000 ;;
4001 esac
4002
4003 cf_fix_cppflags=no
4004 cf_new_cflags=
4005 cf_new_cppflags=
4006 cf_new_extra_cppflags=
4007
4008 for cf_add_cflags in $cf_add_cflags
4009 do
4010 case "$cf_fix_cppflags" in
4011 (no)
4012 case "$cf_add_cflags" in
4013 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4014 case "$cf_add_cflags" in
4015 (-D*)
4016 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4017
4018 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4019 && test -z "${cf_tst_cflags}" \
4020 && cf_fix_cppflags=yes
4021
4022 if test "$cf_fix_cppflags" = yes ; then
4023
4024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4026
4027 continue
4028 elif test "${cf_tst_cflags}" = "\"'" ; then
4029
4030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4032
4033 continue
4034 fi
4035 ;;
4036 esac
4037 case "$CPPFLAGS" in
4038 (*$cf_add_cflags)
4039 ;;
4040 (*)
4041 case "$cf_add_cflags" in
4042 (-D*)
4043 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4044
4045 CPPFLAGS=`echo "$CPPFLAGS" | \
4046 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4047 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4048
4049 ;;
4050 esac
4051
4052 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4053 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4054
4055 ;;
4056 esac
4057 ;;
4058 (*)
4059
4060 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4061 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4062
4063 ;;
4064 esac
4065 ;;
4066 (yes)
4067
4068 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4069 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4070
4071 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4072
4073 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4074 && test -z "${cf_tst_cflags}" \
4075 && cf_fix_cppflags=no
4076 ;;
4077 esac
4078 done
4079
4080 if test -n "$cf_new_cflags" ; then
4081
4082 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4083 CFLAGS="${CFLAGS}$cf_new_cflags"
4084
4085 fi
4086
4087 if test -n "$cf_new_cppflags" ; then
4088
4089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4090 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4091
4092 fi
4093
4094 if test -n "$cf_new_extra_cppflags" ; then
4095
4096 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4097 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4098
4099 fi
4100
4101 done
4102
4103 fi
4104
4105 cf_save_xopen_cppflags="$CPPFLAGS"
4106
4107 if test "$cf_cv_posix_visible" = no; then
4108
4109 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4110
4111 cf_save_CFLAGS="$CFLAGS"
4112 cf_save_CPPFLAGS="$CPPFLAGS"
4113
4114 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4115 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4116 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4117
4118 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4119 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4120 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4121
4122 echo "$as_me:4122: checking if we should define _POSIX_C_SOURCE" >&5
4123 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4124 if test "${cf_cv_posix_c_source+set}" = set; then
4125 echo $ECHO_N "(cached) $ECHO_C" >&6
4126 else
4127
4128 echo "${as_me:-configure}:4128: testing if the symbol is already defined go no further ..." 1>&5
4129
4130 cat >"conftest.$ac_ext" <<_ACEOF
4131 #line 4131 "configure"
4132 #include "confdefs.h"
4133 #include <sys/types.h>
4134 int
4135 main (void)
4136 {
4137
4138 #ifndef _POSIX_C_SOURCE
4139 #error _POSIX_C_SOURCE is not defined
4140 #endif
4141 ;
4142 return 0;
4143 }
4144 _ACEOF
4145 rm -f "conftest.$ac_objext"
4146 if { (eval echo "$as_me:4146: \"$ac_compile\"") >&5
4147 (eval $ac_compile) 2>&5
4148 ac_status=$?
4149 echo "$as_me:4149: \$? = $ac_status" >&5
4150 (exit "$ac_status"); } &&
4151 { ac_try='test -s "conftest.$ac_objext"'
4152 { (eval echo "$as_me:4152: \"$ac_try\"") >&5
4153 (eval $ac_try) 2>&5
4154 ac_status=$?
4155 echo "$as_me:4155: \$? = $ac_status" >&5
4156 (exit "$ac_status"); }; }; then
4157 cf_cv_posix_c_source=no
4158 else
4159 echo "$as_me: failed program was:" >&5
4160 cat "conftest.$ac_ext" >&5
4161 cf_want_posix_source=no
4162 case .$cf_POSIX_C_SOURCE in
4163 (.[12]??*)
4164 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4165 ;;
4166 (.2)
4167 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4168 cf_want_posix_source=yes
4169 ;;
4170 (.*)
4171 cf_want_posix_source=yes
4172 ;;
4173 esac
4174 if test "$cf_want_posix_source" = yes ; then
4175 cat >"conftest.$ac_ext" <<_ACEOF
4176 #line 4176 "configure"
4177 #include "confdefs.h"
4178 #include <sys/types.h>
4179 int
4180 main (void)
4181 {
4182
4183 #ifdef _POSIX_SOURCE
4184 #error _POSIX_SOURCE is defined
4185 #endif
4186 ;
4187 return 0;
4188 }
4189 _ACEOF
4190 rm -f "conftest.$ac_objext"
4191 if { (eval echo "$as_me:4191: \"$ac_compile\"") >&5
4192 (eval $ac_compile) 2>&5
4193 ac_status=$?
4194 echo "$as_me:4194: \$? = $ac_status" >&5
4195 (exit "$ac_status"); } &&
4196 { ac_try='test -s "conftest.$ac_objext"'
4197 { (eval echo "$as_me:4197: \"$ac_try\"") >&5
4198 (eval $ac_try) 2>&5
4199 ac_status=$?
4200 echo "$as_me:4200: \$? = $ac_status" >&5
4201 (exit "$ac_status"); }; }; then
4202 :
4203 else
4204 echo "$as_me: failed program was:" >&5
4205 cat "conftest.$ac_ext" >&5
4206 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4207 fi
4208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4209 fi
4210
4211 echo "${as_me:-configure}:4211: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4212
4213 CFLAGS="$cf_trim_CFLAGS"
4214 CPPFLAGS="$cf_trim_CPPFLAGS"
4215
4216 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4217 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4218
4219 echo "${as_me:-configure}:4219: testing if the second compile does not leave our definition intact error ..." 1>&5
4220
4221 cat >"conftest.$ac_ext" <<_ACEOF
4222 #line 4222 "configure"
4223 #include "confdefs.h"
4224 #include <sys/types.h>
4225 int
4226 main (void)
4227 {
4228
4229 #ifndef _POSIX_C_SOURCE
4230 #error _POSIX_C_SOURCE is not defined
4231 #endif
4232 ;
4233 return 0;
4234 }
4235 _ACEOF
4236 rm -f "conftest.$ac_objext"
4237 if { (eval echo "$as_me:4237: \"$ac_compile\"") >&5
4238 (eval $ac_compile) 2>&5
4239 ac_status=$?
4240 echo "$as_me:4240: \$? = $ac_status" >&5
4241 (exit "$ac_status"); } &&
4242 { ac_try='test -s "conftest.$ac_objext"'
4243 { (eval echo "$as_me:4243: \"$ac_try\"") >&5
4244 (eval $ac_try) 2>&5
4245 ac_status=$?
4246 echo "$as_me:4246: \$? = $ac_status" >&5
4247 (exit "$ac_status"); }; }; then
4248 :
4249 else
4250 echo "$as_me: failed program was:" >&5
4251 cat "conftest.$ac_ext" >&5
4252 cf_cv_posix_c_source=no
4253 fi
4254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4255 CFLAGS="$cf_save_CFLAGS"
4256 CPPFLAGS="$cf_save_CPPFLAGS"
4257
4258 fi
4259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4260
4261 fi
4262 echo "$as_me:4262: result: $cf_cv_posix_c_source" >&5
4263 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4264
4265 if test "$cf_cv_posix_c_source" != no ; then
4266 CFLAGS="$cf_trim_CFLAGS"
4267 CPPFLAGS="$cf_trim_CPPFLAGS"
4268
4269 cf_fix_cppflags=no
4270 cf_new_cflags=
4271 cf_new_cppflags=
4272 cf_new_extra_cppflags=
4273
4274 for cf_add_cflags in $cf_cv_posix_c_source
4275 do
4276 case "$cf_fix_cppflags" in
4277 (no)
4278 case "$cf_add_cflags" in
4279 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4280 case "$cf_add_cflags" in
4281 (-D*)
4282 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4283
4284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4285 && test -z "${cf_tst_cflags}" \
4286 && cf_fix_cppflags=yes
4287
4288 if test "$cf_fix_cppflags" = yes ; then
4289
4290 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4291 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4292
4293 continue
4294 elif test "${cf_tst_cflags}" = "\"'" ; then
4295
4296 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4297 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4298
4299 continue
4300 fi
4301 ;;
4302 esac
4303 case "$CPPFLAGS" in
4304 (*$cf_add_cflags)
4305 ;;
4306 (*)
4307 case "$cf_add_cflags" in
4308 (-D*)
4309 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4310
4311 CPPFLAGS=`echo "$CPPFLAGS" | \
4312 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4313 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4314
4315 ;;
4316 esac
4317
4318 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4319 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4320
4321 ;;
4322 esac
4323 ;;
4324 (*)
4325
4326 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4327 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4328
4329 ;;
4330 esac
4331 ;;
4332 (yes)
4333
4334 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4335 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4336
4337 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4338
4339 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4340 && test -z "${cf_tst_cflags}" \
4341 && cf_fix_cppflags=no
4342 ;;
4343 esac
4344 done
4345
4346 if test -n "$cf_new_cflags" ; then
4347
4348 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4349 CFLAGS="${CFLAGS}$cf_new_cflags"
4350
4351 fi
4352
4353 if test -n "$cf_new_cppflags" ; then
4354
4355 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4356 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4357
4358 fi
4359
4360 if test -n "$cf_new_extra_cppflags" ; then
4361
4362 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4363 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4364
4365 fi
4366
4367 fi
4368
4369 fi # cf_cv_posix_visible
4370
4371 # Some of these niche implementations use copy/paste, double-check...
4372 if test "$cf_cv_xopen_source" = no ; then
4373 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
4374
4375 echo "${as_me:-configure}:4375: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
4376
4377 cat >"conftest.$ac_ext" <<_ACEOF
4378 #line 4378 "configure"
4379 #include "confdefs.h"
4380
4381 $ac_includes_default
4382
4383 int
4384 main (void)
4385 {
4386
4387 #ifndef _XOPEN_SOURCE
4388 #error _XOPEN_SOURCE is not defined
4389 #endif
4390
4391 ;
4392 return 0;
4393 }
4394 _ACEOF
4395 rm -f "conftest.$ac_objext"
4396 if { (eval echo "$as_me:4396: \"$ac_compile\"") >&5
4397 (eval $ac_compile) 2>&5
4398 ac_status=$?
4399 echo "$as_me:4399: \$? = $ac_status" >&5
4400 (exit "$ac_status"); } &&
4401 { ac_try='test -s "conftest.$ac_objext"'
4402 { (eval echo "$as_me:4402: \"$ac_try\"") >&5
4403 (eval $ac_try) 2>&5
4404 ac_status=$?
4405 echo "$as_me:4405: \$? = $ac_status" >&5
4406 (exit "$ac_status"); }; }; then
4407 :
4408 else
4409 echo "$as_me: failed program was:" >&5
4410 cat "conftest.$ac_ext" >&5
4411
4412 { echo "$as_me:4412: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
4413 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
4414 CPPFLAGS="$cf_save_xopen_cppflags"
4415 fi
4416 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4417 fi
4418 ;;
4419 esac
4420
4421 if test -n "$cf_xopen_source" ; then
4422
4423 for cf_add_cflags in $cf_xopen_source
4424 do
4425 case "x$cf_add_cflags" in
4426 (x-[DU]*)
4427
4428 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4429 while true
4430 do
4431 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'`
4432 test "$CFLAGS" != "$cf_old_cflag" || break
4433 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
4434
4435 echo "${as_me:-configure}:4435: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
4436
4437 CFLAGS="$cf_old_cflag"
4438 done
4439
4440 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4441 while true
4442 do
4443 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'`
4444 test "$CPPFLAGS" != "$cf_old_cflag" || break
4445 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
4446
4447 echo "${as_me:-configure}:4447: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
4448
4449 CPPFLAGS="$cf_old_cflag"
4450 done
4451
4452 ;;
4453 esac
4454
4455 cf_fix_cppflags=no
4456 cf_new_cflags=
4457 cf_new_cppflags=
4458 cf_new_extra_cppflags=
4459
4460 for cf_add_cflags in $cf_add_cflags
4461 do
4462 case "$cf_fix_cppflags" in
4463 (no)
4464 case "$cf_add_cflags" in
4465 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4466 case "$cf_add_cflags" in
4467 (-D*)
4468 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4469
4470 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4471 && test -z "${cf_tst_cflags}" \
4472 && cf_fix_cppflags=yes
4473
4474 if test "$cf_fix_cppflags" = yes ; then
4475
4476 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4477 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4478
4479 continue
4480 elif test "${cf_tst_cflags}" = "\"'" ; then
4481
4482 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4483 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4484
4485 continue
4486 fi
4487 ;;
4488 esac
4489 case "$CPPFLAGS" in
4490 (*$cf_add_cflags)
4491 ;;
4492 (*)
4493 case "$cf_add_cflags" in
4494 (-D*)
4495 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4496
4497 CPPFLAGS=`echo "$CPPFLAGS" | \
4498 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4499 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4500
4501 ;;
4502 esac
4503
4504 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4505 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4506
4507 ;;
4508 esac
4509 ;;
4510 (*)
4511
4512 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4513 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4514
4515 ;;
4516 esac
4517 ;;
4518 (yes)
4519
4520 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4521 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4522
4523 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4524
4525 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4526 && test -z "${cf_tst_cflags}" \
4527 && cf_fix_cppflags=no
4528 ;;
4529 esac
4530 done
4531
4532 if test -n "$cf_new_cflags" ; then
4533 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
4534
4535 echo "${as_me:-configure}:4535: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4536
4537 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4538 CFLAGS="${CFLAGS}$cf_new_cflags"
4539
4540 fi
4541
4542 if test -n "$cf_new_cppflags" ; then
4543 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4544
4545 echo "${as_me:-configure}:4545: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4546
4547 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4548 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4549
4550 fi
4551
4552 if test -n "$cf_new_extra_cppflags" ; then
4553 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4554
4555 echo "${as_me:-configure}:4555: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4556
4557 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4558 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4559
4560 fi
4561
4562 done
4563
4564 fi
4565
4566 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4567 echo "$as_me:4567: checking if _XOPEN_SOURCE really is set" >&5
4568 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4569 cat >"conftest.$ac_ext" <<_ACEOF
4570 #line 4570 "configure"
4571 #include "confdefs.h"
4572 #include <stdlib.h>
4573 int
4574 main (void)
4575 {
4576
4577 #ifndef _XOPEN_SOURCE
4578 #error _XOPEN_SOURCE is not defined
4579 #endif
4580 ;
4581 return 0;
4582 }
4583 _ACEOF
4584 rm -f "conftest.$ac_objext"
4585 if { (eval echo "$as_me:4585: \"$ac_compile\"") >&5
4586 (eval $ac_compile) 2>&5
4587 ac_status=$?
4588 echo "$as_me:4588: \$? = $ac_status" >&5
4589 (exit "$ac_status"); } &&
4590 { ac_try='test -s "conftest.$ac_objext"'
4591 { (eval echo "$as_me:4591: \"$ac_try\"") >&5
4592 (eval $ac_try) 2>&5
4593 ac_status=$?
4594 echo "$as_me:4594: \$? = $ac_status" >&5
4595 (exit "$ac_status"); }; }; then
4596 cf_XOPEN_SOURCE_set=yes
4597 else
4598 echo "$as_me: failed program was:" >&5
4599 cat "conftest.$ac_ext" >&5
4600 cf_XOPEN_SOURCE_set=no
4601 fi
4602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4603 echo "$as_me:4603: result: $cf_XOPEN_SOURCE_set" >&5
4604 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4605 if test "$cf_XOPEN_SOURCE_set" = yes
4606 then
4607 cat >"conftest.$ac_ext" <<_ACEOF
4608 #line 4608 "configure"
4609 #include "confdefs.h"
4610 #include <stdlib.h>
4611 int
4612 main (void)
4613 {
4614
4615 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4616 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4617 #endif
4618 ;
4619 return 0;
4620 }
4621 _ACEOF
4622 rm -f "conftest.$ac_objext"
4623 if { (eval echo "$as_me:4623: \"$ac_compile\"") >&5
4624 (eval $ac_compile) 2>&5
4625 ac_status=$?
4626 echo "$as_me:4626: \$? = $ac_status" >&5
4627 (exit "$ac_status"); } &&
4628 { ac_try='test -s "conftest.$ac_objext"'
4629 { (eval echo "$as_me:4629: \"$ac_try\"") >&5
4630 (eval $ac_try) 2>&5
4631 ac_status=$?
4632 echo "$as_me:4632: \$? = $ac_status" >&5
4633 (exit "$ac_status"); }; }; then
4634 cf_XOPEN_SOURCE_set_ok=yes
4635 else
4636 echo "$as_me: failed program was:" >&5
4637 cat "conftest.$ac_ext" >&5
4638 cf_XOPEN_SOURCE_set_ok=no
4639 fi
4640 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4641 if test "$cf_XOPEN_SOURCE_set_ok" = no
4642 then
4643 { echo "$as_me:4643: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4644 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4645 fi
4646 else
4647
4648 echo "$as_me:4648: checking if we should define _XOPEN_SOURCE" >&5
4649 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4650 if test "${cf_cv_xopen_source+set}" = set; then
4651 echo $ECHO_N "(cached) $ECHO_C" >&6
4652 else
4653
4654 cat >"conftest.$ac_ext" <<_ACEOF
4655 #line 4655 "configure"
4656 #include "confdefs.h"
4657
4658 $ac_includes_default
4659
4660 int
4661 main (void)
4662 {
4663
4664 #ifndef _XOPEN_SOURCE
4665 #error _XOPEN_SOURCE is not defined
4666 #endif
4667
4668 ;
4669 return 0;
4670 }
4671 _ACEOF
4672 rm -f "conftest.$ac_objext"
4673 if { (eval echo "$as_me:4673: \"$ac_compile\"") >&5
4674 (eval $ac_compile) 2>&5
4675 ac_status=$?
4676 echo "$as_me:4676: \$? = $ac_status" >&5
4677 (exit "$ac_status"); } &&
4678 { ac_try='test -s "conftest.$ac_objext"'
4679 { (eval echo "$as_me:4679: \"$ac_try\"") >&5
4680 (eval $ac_try) 2>&5
4681 ac_status=$?
4682 echo "$as_me:4682: \$? = $ac_status" >&5
4683 (exit "$ac_status"); }; }; then
4684 cf_cv_xopen_source=no
4685 else
4686 echo "$as_me: failed program was:" >&5
4687 cat "conftest.$ac_ext" >&5
4688 cf_save="$CPPFLAGS"
4689
4690 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4691 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4692
4693 cat >"conftest.$ac_ext" <<_ACEOF
4694 #line 4694 "configure"
4695 #include "confdefs.h"
4696
4697 $ac_includes_default
4698
4699 int
4700 main (void)
4701 {
4702
4703 #ifndef _XOPEN_SOURCE
4704 #error _XOPEN_SOURCE is not defined
4705 #endif
4706
4707 ;
4708 return 0;
4709 }
4710 _ACEOF
4711 rm -f "conftest.$ac_objext"
4712 if { (eval echo "$as_me:4712: \"$ac_compile\"") >&5
4713 (eval $ac_compile) 2>&5
4714 ac_status=$?
4715 echo "$as_me:4715: \$? = $ac_status" >&5
4716 (exit "$ac_status"); } &&
4717 { ac_try='test -s "conftest.$ac_objext"'
4718 { (eval echo "$as_me:4718: \"$ac_try\"") >&5
4719 (eval $ac_try) 2>&5
4720 ac_status=$?
4721 echo "$as_me:4721: \$? = $ac_status" >&5
4722 (exit "$ac_status"); }; }; then
4723 cf_cv_xopen_source=no
4724 else
4725 echo "$as_me: failed program was:" >&5
4726 cat "conftest.$ac_ext" >&5
4727 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4728 fi
4729 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4730 CPPFLAGS="$cf_save"
4731
4732 fi
4733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4734
4735 fi
4736 echo "$as_me:4736: result: $cf_cv_xopen_source" >&5
4737 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4738
4739 if test "$cf_cv_xopen_source" != no ; then
4740
4741 CFLAGS=`echo "$CFLAGS" | \
4742 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4743 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4744
4745 CPPFLAGS=`echo "$CPPFLAGS" | \
4746 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4747 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4748
4749 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4750
4751 for cf_add_cflags in $cf_temp_xopen_source
4752 do
4753 case "x$cf_add_cflags" in
4754 (x-[DU]*)
4755
4756 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4757 while true
4758 do
4759 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'`
4760 test "$CFLAGS" != "$cf_old_cflag" || break
4761
4762 CFLAGS="$cf_old_cflag"
4763 done
4764
4765 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4766 while true
4767 do
4768 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'`
4769 test "$CPPFLAGS" != "$cf_old_cflag" || break
4770
4771 CPPFLAGS="$cf_old_cflag"
4772 done
4773
4774 ;;
4775 esac
4776
4777 cf_fix_cppflags=no
4778 cf_new_cflags=
4779 cf_new_cppflags=
4780 cf_new_extra_cppflags=
4781
4782 for cf_add_cflags in $cf_add_cflags
4783 do
4784 case "$cf_fix_cppflags" in
4785 (no)
4786 case "$cf_add_cflags" in
4787 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4788 case "$cf_add_cflags" in
4789 (-D*)
4790 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4791
4792 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4793 && test -z "${cf_tst_cflags}" \
4794 && cf_fix_cppflags=yes
4795
4796 if test "$cf_fix_cppflags" = yes ; then
4797
4798 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4799 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4800
4801 continue
4802 elif test "${cf_tst_cflags}" = "\"'" ; then
4803
4804 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4805 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4806
4807 continue
4808 fi
4809 ;;
4810 esac
4811 case "$CPPFLAGS" in
4812 (*$cf_add_cflags)
4813 ;;
4814 (*)
4815 case "$cf_add_cflags" in
4816 (-D*)
4817 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4818
4819 CPPFLAGS=`echo "$CPPFLAGS" | \
4820 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4821 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4822
4823 ;;
4824 esac
4825
4826 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4827 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4828
4829 ;;
4830 esac
4831 ;;
4832 (*)
4833
4834 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4835 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4836
4837 ;;
4838 esac
4839 ;;
4840 (yes)
4841
4842 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4843 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4844
4845 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4846
4847 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4848 && test -z "${cf_tst_cflags}" \
4849 && cf_fix_cppflags=no
4850 ;;
4851 esac
4852 done
4853
4854 if test -n "$cf_new_cflags" ; then
4855
4856 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4857 CFLAGS="${CFLAGS}$cf_new_cflags"
4858
4859 fi
4860
4861 if test -n "$cf_new_cppflags" ; then
4862
4863 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4864 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4865
4866 fi
4867
4868 if test -n "$cf_new_extra_cppflags" ; then
4869
4870 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4871 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4872
4873 fi
4874
4875 done
4876
4877 fi
4878
4879 fi
4880 fi
4881 fi # cf_cv_posix_visible
4882
4883 echo "$as_me:4883: checking if SIGWINCH is defined" >&5
4884 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4885 if test "${cf_cv_define_sigwinch+set}" = set; then
4886 echo $ECHO_N "(cached) $ECHO_C" >&6
4887 else
4888
4889 cat >"conftest.$ac_ext" <<_ACEOF
4890 #line 4890 "configure"
4891 #include "confdefs.h"
4892
4893 #include <sys/types.h>
4894 #include <sys/signal.h>
4895
4896 int
4897 main (void)
4898 {
4899 int x = SIGWINCH; (void)x
4900 ;
4901 return 0;
4902 }
4903 _ACEOF
4904 rm -f "conftest.$ac_objext"
4905 if { (eval echo "$as_me:4905: \"$ac_compile\"") >&5
4906 (eval $ac_compile) 2>&5
4907 ac_status=$?
4908 echo "$as_me:4908: \$? = $ac_status" >&5
4909 (exit "$ac_status"); } &&
4910 { ac_try='test -s "conftest.$ac_objext"'
4911 { (eval echo "$as_me:4911: \"$ac_try\"") >&5
4912 (eval $ac_try) 2>&5
4913 ac_status=$?
4914 echo "$as_me:4914: \$? = $ac_status" >&5
4915 (exit "$ac_status"); }; }; then
4916 cf_cv_define_sigwinch=yes
4917 else
4918 echo "$as_me: failed program was:" >&5
4919 cat "conftest.$ac_ext" >&5
4920 cat >"conftest.$ac_ext" <<_ACEOF
4921 #line 4921 "configure"
4922 #include "confdefs.h"
4923
4924 #undef _XOPEN_SOURCE
4925 #undef _POSIX_SOURCE
4926 #undef _POSIX_C_SOURCE
4927 #include <sys/types.h>
4928 #include <sys/signal.h>
4929
4930 int
4931 main (void)
4932 {
4933 int x = SIGWINCH; (void)x
4934 ;
4935 return 0;
4936 }
4937 _ACEOF
4938 rm -f "conftest.$ac_objext"
4939 if { (eval echo "$as_me:4939: \"$ac_compile\"") >&5
4940 (eval $ac_compile) 2>&5
4941 ac_status=$?
4942 echo "$as_me:4942: \$? = $ac_status" >&5
4943 (exit "$ac_status"); } &&
4944 { ac_try='test -s "conftest.$ac_objext"'
4945 { (eval echo "$as_me:4945: \"$ac_try\"") >&5
4946 (eval $ac_try) 2>&5
4947 ac_status=$?
4948 echo "$as_me:4948: \$? = $ac_status" >&5
4949 (exit "$ac_status"); }; }; then
4950 cf_cv_define_sigwinch=maybe
4951 else
4952 echo "$as_me: failed program was:" >&5
4953 cat "conftest.$ac_ext" >&5
4954 cf_cv_define_sigwinch=no
4955 fi
4956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4957
4958 fi
4959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4960
4961 fi
4962 echo "$as_me:4962: result: $cf_cv_define_sigwinch" >&5
4963 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4964
4965 if test "$cf_cv_define_sigwinch" = maybe ; then
4966 echo "$as_me:4966: checking for actual SIGWINCH definition" >&5
4967 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4968 if test "${cf_cv_fixup_sigwinch+set}" = set; then
4969 echo $ECHO_N "(cached) $ECHO_C" >&6
4970 else
4971
4972 cf_cv_fixup_sigwinch=unknown
4973 cf_sigwinch=32
4974 while test "$cf_sigwinch" != 1
4975 do
4976 cat >"conftest.$ac_ext" <<_ACEOF
4977 #line 4977 "configure"
4978 #include "confdefs.h"
4979
4980 #undef _XOPEN_SOURCE
4981 #undef _POSIX_SOURCE
4982 #undef _POSIX_C_SOURCE
4983 #include <sys/types.h>
4984 #include <sys/signal.h>
4985
4986 int
4987 main (void)
4988 {
4989
4990 #if SIGWINCH != $cf_sigwinch
4991 #error SIGWINCH is not $cf_sigwinch
4992 #endif
4993 int x = SIGWINCH; (void)x
4994 ;
4995 return 0;
4996 }
4997 _ACEOF
4998 rm -f "conftest.$ac_objext"
4999 if { (eval echo "$as_me:4999: \"$ac_compile\"") >&5
5000 (eval $ac_compile) 2>&5
5001 ac_status=$?
5002 echo "$as_me:5002: \$? = $ac_status" >&5
5003 (exit "$ac_status"); } &&
5004 { ac_try='test -s "conftest.$ac_objext"'
5005 { (eval echo "$as_me:5005: \"$ac_try\"") >&5
5006 (eval $ac_try) 2>&5
5007 ac_status=$?
5008 echo "$as_me:5008: \$? = $ac_status" >&5
5009 (exit "$ac_status"); }; }; then
5010 cf_cv_fixup_sigwinch=$cf_sigwinch
5011 break
5012 else
5013 echo "$as_me: failed program was:" >&5
5014 cat "conftest.$ac_ext" >&5
5015 fi
5016 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5017
5018 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5019 done
5020
5021 fi
5022 echo "$as_me:5022: result: $cf_cv_fixup_sigwinch" >&5
5023 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5024
5025 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5026 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5027 fi
5028 fi
5029
5030 ### checks for header files
5031
5032 echo "$as_me:5032: checking for ANSI C header files" >&5
5033 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5034 if test "${ac_cv_header_stdc+set}" = set; then
5035 echo $ECHO_N "(cached) $ECHO_C" >&6
5036 else
5037 cat >"conftest.$ac_ext" <<_ACEOF
5038 #line 5038 "configure"
5039 #include "confdefs.h"
5040 #include <stdlib.h>
5041 #include <stdarg.h>
5042 #include <string.h>
5043 #include <float.h>
5044
5045 _ACEOF
5046 if { (eval echo "$as_me:5046: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5047 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5048 ac_status=$?
5049 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5050 rm -f conftest.er1
5051 cat conftest.err >&5
5052 echo "$as_me:5052: \$? = $ac_status" >&5
5053 (exit "$ac_status"); } >/dev/null; then
5054 if test -s conftest.err; then
5055 ac_cpp_err=$ac_c_preproc_warn_flag
5056 else
5057 ac_cpp_err=
5058 fi
5059 else
5060 ac_cpp_err=yes
5061 fi
5062 if test -z "$ac_cpp_err"; then
5063 ac_cv_header_stdc=yes
5064 else
5065 echo "$as_me: failed program was:" >&5
5066 cat "conftest.$ac_ext" >&5
5067 ac_cv_header_stdc=no
5068 fi
5069 rm -f conftest.err "conftest.$ac_ext"
5070
5071 if test $ac_cv_header_stdc = yes; then
5072 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5073 cat >"conftest.$ac_ext" <<_ACEOF
5074 #line 5074 "configure"
5075 #include "confdefs.h"
5076 #include <string.h>
5077
5078 _ACEOF
5079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5080 $EGREP "memchr" >/dev/null 2>&1; then
5081 :
5082 else
5083 ac_cv_header_stdc=no
5084 fi
5085 rm -rf conftest*
5086
5087 fi
5088
5089 if test $ac_cv_header_stdc = yes; then
5090 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5091 cat >"conftest.$ac_ext" <<_ACEOF
5092 #line 5092 "configure"
5093 #include "confdefs.h"
5094 #include <stdlib.h>
5095
5096 _ACEOF
5097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5098 $EGREP "free" >/dev/null 2>&1; then
5099 :
5100 else
5101 ac_cv_header_stdc=no
5102 fi
5103 rm -rf conftest*
5104
5105 fi
5106
5107 if test $ac_cv_header_stdc = yes; then
5108 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5109 if test "$cross_compiling" = yes; then
5110 :
5111 else
5112 cat >"conftest.$ac_ext" <<_ACEOF
5113 #line 5113 "configure"
5114 #include "confdefs.h"
5115 #include <ctype.h>
5116 #if ((' ' & 0x0FF) == 0x020)
5117 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5118 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5119 #else
5120 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5121 || ('j' <= (c) && (c) <= 'r') \
5122 || ('s' <= (c) && (c) <= 'z'))
5123 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5124 #endif
5125
5126 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5127 int
5128 main (void)
5129 {
5130 int i;
5131 for (i = 0; i < 256; i++)
5132 if (XOR (islower (i), ISLOWER (i))
5133 || toupper (i) != TOUPPER (i))
5134 $ac_main_return(2);
5135 $ac_main_return (0);
5136 }
5137 _ACEOF
5138 rm -f "conftest$ac_exeext"
5139 if { (eval echo "$as_me:5139: \"$ac_link\"") >&5
5140 (eval $ac_link) 2>&5
5141 ac_status=$?
5142 echo "$as_me:5142: \$? = $ac_status" >&5
5143 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5144 { (eval echo "$as_me:5144: \"$ac_try\"") >&5
5145 (eval $ac_try) 2>&5
5146 ac_status=$?
5147 echo "$as_me:5147: \$? = $ac_status" >&5
5148 (exit "$ac_status"); }; }; then
5149 :
5150 else
5151 echo "$as_me: program exited with status $ac_status" >&5
5152 echo "$as_me: failed program was:" >&5
5153 cat "conftest.$ac_ext" >&5
5154 ac_cv_header_stdc=no
5155 fi
5156 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5157 fi
5158 fi
5159 fi
5160 echo "$as_me:5160: result: $ac_cv_header_stdc" >&5
5161 echo "${ECHO_T}$ac_cv_header_stdc" >&6
5162 if test $ac_cv_header_stdc = yes; then
5163
5164 cat >>confdefs.h <<\EOF
5165 #define STDC_HEADERS 1
5166 EOF
5167
5168 fi
5169
5170 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5171
5172 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5173 inttypes.h stdint.h unistd.h
5174 do
5175 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5176 echo "$as_me:5176: checking for $ac_header" >&5
5177 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5178 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5179 echo $ECHO_N "(cached) $ECHO_C" >&6
5180 else
5181 cat >"conftest.$ac_ext" <<_ACEOF
5182 #line 5182 "configure"
5183 #include "confdefs.h"
5184 $ac_includes_default
5185 #include <$ac_header>
5186 _ACEOF
5187 rm -f "conftest.$ac_objext"
5188 if { (eval echo "$as_me:5188: \"$ac_compile\"") >&5
5189 (eval $ac_compile) 2>&5
5190 ac_status=$?
5191 echo "$as_me:5191: \$? = $ac_status" >&5
5192 (exit "$ac_status"); } &&
5193 { ac_try='test -s "conftest.$ac_objext"'
5194 { (eval echo "$as_me:5194: \"$ac_try\"") >&5
5195 (eval $ac_try) 2>&5
5196 ac_status=$?
5197 echo "$as_me:5197: \$? = $ac_status" >&5
5198 (exit "$ac_status"); }; }; then
5199 eval "$as_ac_Header=yes"
5200 else
5201 echo "$as_me: failed program was:" >&5
5202 cat "conftest.$ac_ext" >&5
5203 eval "$as_ac_Header=no"
5204 fi
5205 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5206 fi
5207 echo "$as_me:5207: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5208 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5209 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5210 cat >>confdefs.h <<EOF
5211 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5212 EOF
5213
5214 fi
5215 done
5216
5217 echo "$as_me:5217: checking whether exit is declared" >&5
5218 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
5219 if test "${ac_cv_have_decl_exit+set}" = set; then
5220 echo $ECHO_N "(cached) $ECHO_C" >&6
5221 else
5222 cat >"conftest.$ac_ext" <<_ACEOF
5223 #line 5223 "configure"
5224 #include "confdefs.h"
5225 $ac_includes_default
5226 int
5227 main (void)
5228 {
5229 #ifndef exit
5230 (void) exit;
5231 #endif
5232
5233 ;
5234 return 0;
5235 }
5236 _ACEOF
5237 rm -f "conftest.$ac_objext"
5238 if { (eval echo "$as_me:5238: \"$ac_compile\"") >&5
5239 (eval $ac_compile) 2>&5
5240 ac_status=$?
5241 echo "$as_me:5241: \$? = $ac_status" >&5
5242 (exit "$ac_status"); } &&
5243 { ac_try='test -s "conftest.$ac_objext"'
5244 { (eval echo "$as_me:5244: \"$ac_try\"") >&5
5245 (eval $ac_try) 2>&5
5246 ac_status=$?
5247 echo "$as_me:5247: \$? = $ac_status" >&5
5248 (exit "$ac_status"); }; }; then
5249 ac_cv_have_decl_exit=yes
5250 else
5251 echo "$as_me: failed program was:" >&5
5252 cat "conftest.$ac_ext" >&5
5253 ac_cv_have_decl_exit=no
5254 fi
5255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5256 fi
5257 echo "$as_me:5257: result: $ac_cv_have_decl_exit" >&5
5258 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
5259
5260 for ac_header in \
5261 ncurses/curses.h \
5262 ncurses/term.h \
5263 sys/ptem.h \
5264 sys/ttydefaults.h \
5265 term.h \
5266 termios.h \
5267 wchar.h \
5268
5269 do
5270 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5271 echo "$as_me:5271: checking for $ac_header" >&5
5272 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5273 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5274 echo $ECHO_N "(cached) $ECHO_C" >&6
5275 else
5276 cat >"conftest.$ac_ext" <<_ACEOF
5277 #line 5277 "configure"
5278 #include "confdefs.h"
5279 #include <$ac_header>
5280 _ACEOF
5281 if { (eval echo "$as_me:5281: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5282 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5283 ac_status=$?
5284 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5285 rm -f conftest.er1
5286 cat conftest.err >&5
5287 echo "$as_me:5287: \$? = $ac_status" >&5
5288 (exit "$ac_status"); } >/dev/null; then
5289 if test -s conftest.err; then
5290 ac_cpp_err=$ac_c_preproc_warn_flag
5291 else
5292 ac_cpp_err=
5293 fi
5294 else
5295 ac_cpp_err=yes
5296 fi
5297 if test -z "$ac_cpp_err"; then
5298 eval "$as_ac_Header=yes"
5299 else
5300 echo "$as_me: failed program was:" >&5
5301 cat "conftest.$ac_ext" >&5
5302 eval "$as_ac_Header=no"
5303 fi
5304 rm -f conftest.err "conftest.$ac_ext"
5305 fi
5306 echo "$as_me:5306: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5307 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5308 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5309 cat >>confdefs.h <<EOF
5310 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5311 EOF
5312
5313 fi
5314 done
5315
5316 echo "$as_me:5316: checking whether time.h and sys/time.h may both be included" >&5
5317 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5318 if test "${ac_cv_header_time+set}" = set; then
5319 echo $ECHO_N "(cached) $ECHO_C" >&6
5320 else
5321 cat >"conftest.$ac_ext" <<_ACEOF
5322 #line 5322 "configure"
5323 #include "confdefs.h"
5324 #include <sys/types.h>
5325 #include <sys/time.h>
5326 #include <time.h>
5327
5328 int
5329 main (void)
5330 {
5331 if ((struct tm *) 0)
5332 return 0;
5333 ;
5334 return 0;
5335 }
5336 _ACEOF
5337 rm -f "conftest.$ac_objext"
5338 if { (eval echo "$as_me:5338: \"$ac_compile\"") >&5
5339 (eval $ac_compile) 2>&5
5340 ac_status=$?
5341 echo "$as_me:5341: \$? = $ac_status" >&5
5342 (exit "$ac_status"); } &&
5343 { ac_try='test -s "conftest.$ac_objext"'
5344 { (eval echo "$as_me:5344: \"$ac_try\"") >&5
5345 (eval $ac_try) 2>&5
5346 ac_status=$?
5347 echo "$as_me:5347: \$? = $ac_status" >&5
5348 (exit "$ac_status"); }; }; then
5349 ac_cv_header_time=yes
5350 else
5351 echo "$as_me: failed program was:" >&5
5352 cat "conftest.$ac_ext" >&5
5353 ac_cv_header_time=no
5354 fi
5355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5356 fi
5357 echo "$as_me:5357: result: $ac_cv_header_time" >&5
5358 echo "${ECHO_T}$ac_cv_header_time" >&6
5359 if test $ac_cv_header_time = yes; then
5360
5361 cat >>confdefs.h <<\EOF
5362 #define TIME_WITH_SYS_TIME 1
5363 EOF
5364
5365 fi
5366
5367 echo "$as_me:5367: checking for nl_langinfo and CODESET" >&5
5368 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5369 if test "${am_cv_langinfo_codeset+set}" = set; then
5370 echo $ECHO_N "(cached) $ECHO_C" >&6
5371 else
5372 cat >"conftest.$ac_ext" <<_ACEOF
5373 #line 5373 "configure"
5374 #include "confdefs.h"
5375
5376 $ac_includes_default
5377 #include <langinfo.h>
5378 int
5379 main (void)
5380 {
5381 char* cs = nl_langinfo(CODESET); (void)cs
5382 ;
5383 return 0;
5384 }
5385 _ACEOF
5386 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5387 if { (eval echo "$as_me:5387: \"$ac_link\"") >&5
5388 (eval $ac_link) 2>&5
5389 ac_status=$?
5390 echo "$as_me:5390: \$? = $ac_status" >&5
5391 (exit "$ac_status"); } &&
5392 { ac_try='test -s "conftest$ac_exeext"'
5393 { (eval echo "$as_me:5393: \"$ac_try\"") >&5
5394 (eval $ac_try) 2>&5
5395 ac_status=$?
5396 echo "$as_me:5396: \$? = $ac_status" >&5
5397 (exit "$ac_status"); }; }; then
5398 am_cv_langinfo_codeset=yes
5399 else
5400 echo "$as_me: failed program was:" >&5
5401 cat "conftest.$ac_ext" >&5
5402 am_cv_langinfo_codeset=no
5403 fi
5404 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5405
5406 fi
5407 echo "$as_me:5407: result: $am_cv_langinfo_codeset" >&5
5408 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5409 if test "$am_cv_langinfo_codeset" = yes; then
5410
5411 cat >>confdefs.h <<\EOF
5412 #define HAVE_LANGINFO_CODESET 1
5413 EOF
5414
5415 fi
5416
5417 ### checks for typedefs
5418
5419 echo "$as_me:5419: checking for signal global datatype" >&5
5420 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5421 if test "${cf_cv_sig_atomic_t+set}" = set; then
5422 echo $ECHO_N "(cached) $ECHO_C" >&6
5423 else
5424
5425 for cf_type in \
5426 "volatile sig_atomic_t" \
5427 "sig_atomic_t" \
5428 "int"
5429 do
5430 cat >"conftest.$ac_ext" <<_ACEOF
5431 #line 5431 "configure"
5432 #include "confdefs.h"
5433
5434 #include <sys/types.h>
5435 #include <signal.h>
5436 #include <stdio.h>
5437
5438 extern $cf_type x;
5439 $cf_type x;
5440 static void handler(int sig)
5441 {
5442 (void)sig;
5443 x = 5;
5444 }
5445 int
5446 main (void)
5447 {
5448 signal(SIGINT, handler);
5449 x = 1
5450 ;
5451 return 0;
5452 }
5453 _ACEOF
5454 rm -f "conftest.$ac_objext"
5455 if { (eval echo "$as_me:5455: \"$ac_compile\"") >&5
5456 (eval $ac_compile) 2>&5
5457 ac_status=$?
5458 echo "$as_me:5458: \$? = $ac_status" >&5
5459 (exit "$ac_status"); } &&
5460 { ac_try='test -s "conftest.$ac_objext"'
5461 { (eval echo "$as_me:5461: \"$ac_try\"") >&5
5462 (eval $ac_try) 2>&5
5463 ac_status=$?
5464 echo "$as_me:5464: \$? = $ac_status" >&5
5465 (exit "$ac_status"); }; }; then
5466 cf_cv_sig_atomic_t=$cf_type
5467 else
5468 echo "$as_me: failed program was:" >&5
5469 cat "conftest.$ac_ext" >&5
5470 cf_cv_sig_atomic_t=no
5471 fi
5472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5473 test "$cf_cv_sig_atomic_t" != no && break
5474 done
5475
5476 fi
5477
5478 echo "$as_me:5478: result: $cf_cv_sig_atomic_t" >&5
5479 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5480 test "$cf_cv_sig_atomic_t" != no &&
5481 cat >>confdefs.h <<EOF
5482 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5483 EOF
5484
5485 echo "$as_me:5485: checking for time_t" >&5
5486 echo $ECHO_N "checking for time_t... $ECHO_C" >&6
5487 if test "${ac_cv_type_time_t+set}" = set; then
5488 echo $ECHO_N "(cached) $ECHO_C" >&6
5489 else
5490 cat >"conftest.$ac_ext" <<_ACEOF
5491 #line 5491 "configure"
5492 #include "confdefs.h"
5493 $ac_includes_default
5494 int
5495 main (void)
5496 {
5497 if ((time_t *) 0)
5498 return 0;
5499 if (sizeof (time_t))
5500 return 0;
5501 ;
5502 return 0;
5503 }
5504 _ACEOF
5505 rm -f "conftest.$ac_objext"
5506 if { (eval echo "$as_me:5506: \"$ac_compile\"") >&5
5507 (eval $ac_compile) 2>&5
5508 ac_status=$?
5509 echo "$as_me:5509: \$? = $ac_status" >&5
5510 (exit "$ac_status"); } &&
5511 { ac_try='test -s "conftest.$ac_objext"'
5512 { (eval echo "$as_me:5512: \"$ac_try\"") >&5
5513 (eval $ac_try) 2>&5
5514 ac_status=$?
5515 echo "$as_me:5515: \$? = $ac_status" >&5
5516 (exit "$ac_status"); }; }; then
5517 ac_cv_type_time_t=yes
5518 else
5519 echo "$as_me: failed program was:" >&5
5520 cat "conftest.$ac_ext" >&5
5521 ac_cv_type_time_t=no
5522 fi
5523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5524 fi
5525 echo "$as_me:5525: result: $ac_cv_type_time_t" >&5
5526 echo "${ECHO_T}$ac_cv_type_time_t" >&6
5527 if test "$ac_cv_type_time_t" = yes; then
5528 :
5529 else
5530
5531 cat >>confdefs.h <<EOF
5532 #define time_t long
5533 EOF
5534
5535 fi
5536
5537 echo "$as_me:5537: checking for cc_t in <termios.h> or <termio.h>" >&5
5538 echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
5539 if test "${cf_cv_type_cc_t+set}" = set; then
5540 echo $ECHO_N "(cached) $ECHO_C" >&6
5541 else
5542
5543 cat >"conftest.$ac_ext" <<_ACEOF
5544 #line 5544 "configure"
5545 #include "confdefs.h"
5546
5547 #include <sys/types.h>
5548 #if defined(HAVE_TERMIOS_H)
5549 #include <termios.h>
5550 #else
5551 #include <termio.h>
5552 #include <sys/ioctl.h>
5553 #endif
5554
5555 int
5556 main (void)
5557 {
5558 cc_t x; (void)x
5559 ;
5560 return 0;
5561 }
5562 _ACEOF
5563 rm -f "conftest.$ac_objext"
5564 if { (eval echo "$as_me:5564: \"$ac_compile\"") >&5
5565 (eval $ac_compile) 2>&5
5566 ac_status=$?
5567 echo "$as_me:5567: \$? = $ac_status" >&5
5568 (exit "$ac_status"); } &&
5569 { ac_try='test -s "conftest.$ac_objext"'
5570 { (eval echo "$as_me:5570: \"$ac_try\"") >&5
5571 (eval $ac_try) 2>&5
5572 ac_status=$?
5573 echo "$as_me:5573: \$? = $ac_status" >&5
5574 (exit "$ac_status"); }; }; then
5575 cf_cv_type_cc_t=yes
5576 else
5577 echo "$as_me: failed program was:" >&5
5578 cat "conftest.$ac_ext" >&5
5579 cf_cv_type_cc_t=no
5580 fi
5581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5582
5583 fi
5584
5585 echo "$as_me:5585: result: $cf_cv_type_cc_t" >&5
5586 echo "${ECHO_T}$cf_cv_type_cc_t" >&6
5587 test $cf_cv_type_cc_t = no &&
5588 cat >>confdefs.h <<\EOF
5589 #define cc_t unsigned char
5590 EOF
5591
5592 echo "$as_me:5592: checking for nfds_t in <poll.h>" >&5
5593 echo $ECHO_N "checking for nfds_t in <poll.h>... $ECHO_C" >&6
5594 if test "${cf_cv_type_nfds_t+set}" = set; then
5595 echo $ECHO_N "(cached) $ECHO_C" >&6
5596 else
5597
5598 cat >"conftest.$ac_ext" <<_ACEOF
5599 #line 5599 "configure"
5600 #include "confdefs.h"
5601
5602 $ac_includes_default
5603 #include <poll.h>
5604
5605 int
5606 main (void)
5607 {
5608 nfds_t x; (void)x
5609 ;
5610 return 0;
5611 }
5612 _ACEOF
5613 rm -f "conftest.$ac_objext"
5614 if { (eval echo "$as_me:5614: \"$ac_compile\"") >&5
5615 (eval $ac_compile) 2>&5
5616 ac_status=$?
5617 echo "$as_me:5617: \$? = $ac_status" >&5
5618 (exit "$ac_status"); } &&
5619 { ac_try='test -s "conftest.$ac_objext"'
5620 { (eval echo "$as_me:5620: \"$ac_try\"") >&5
5621 (eval $ac_try) 2>&5
5622 ac_status=$?
5623 echo "$as_me:5623: \$? = $ac_status" >&5
5624 (exit "$ac_status"); }; }; then
5625 cf_cv_type_nfds_t=yes
5626 else
5627 echo "$as_me: failed program was:" >&5
5628 cat "conftest.$ac_ext" >&5
5629 cf_cv_type_nfds_t=no
5630 fi
5631 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5632
5633 fi
5634
5635 echo "$as_me:5635: result: $cf_cv_type_nfds_t" >&5
5636 echo "${ECHO_T}$cf_cv_type_nfds_t" >&6
5637 test $cf_cv_type_nfds_t = no &&
5638 cat >>confdefs.h <<\EOF
5639 #define nfds_t unsigned
5640 EOF
5641
5642 echo "$as_me:5642: checking for mode_t" >&5
5643 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5644 if test "${ac_cv_type_mode_t+set}" = set; then
5645 echo $ECHO_N "(cached) $ECHO_C" >&6
5646 else
5647 cat >"conftest.$ac_ext" <<_ACEOF
5648 #line 5648 "configure"
5649 #include "confdefs.h"
5650 $ac_includes_default
5651 int
5652 main (void)
5653 {
5654 if ((mode_t *) 0)
5655 return 0;
5656 if (sizeof (mode_t))
5657 return 0;
5658 ;
5659 return 0;
5660 }
5661 _ACEOF
5662 rm -f "conftest.$ac_objext"
5663 if { (eval echo "$as_me:5663: \"$ac_compile\"") >&5
5664 (eval $ac_compile) 2>&5
5665 ac_status=$?
5666 echo "$as_me:5666: \$? = $ac_status" >&5
5667 (exit "$ac_status"); } &&
5668 { ac_try='test -s "conftest.$ac_objext"'
5669 { (eval echo "$as_me:5669: \"$ac_try\"") >&5
5670 (eval $ac_try) 2>&5
5671 ac_status=$?
5672 echo "$as_me:5672: \$? = $ac_status" >&5
5673 (exit "$ac_status"); }; }; then
5674 ac_cv_type_mode_t=yes
5675 else
5676 echo "$as_me: failed program was:" >&5
5677 cat "conftest.$ac_ext" >&5
5678 ac_cv_type_mode_t=no
5679 fi
5680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5681 fi
5682 echo "$as_me:5682: result: $ac_cv_type_mode_t" >&5
5683 echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5684 if test "$ac_cv_type_mode_t" = yes; then
5685 :
5686 else
5687
5688 cat >>confdefs.h <<EOF
5689 #define mode_t int
5690 EOF
5691
5692 fi
5693
5694 echo "$as_me:5694: checking for pid_t" >&5
5695 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5696 if test "${ac_cv_type_pid_t+set}" = set; then
5697 echo $ECHO_N "(cached) $ECHO_C" >&6
5698 else
5699 cat >"conftest.$ac_ext" <<_ACEOF
5700 #line 5700 "configure"
5701 #include "confdefs.h"
5702 $ac_includes_default
5703 int
5704 main (void)
5705 {
5706 if ((pid_t *) 0)
5707 return 0;
5708 if (sizeof (pid_t))
5709 return 0;
5710 ;
5711 return 0;
5712 }
5713 _ACEOF
5714 rm -f "conftest.$ac_objext"
5715 if { (eval echo "$as_me:5715: \"$ac_compile\"") >&5
5716 (eval $ac_compile) 2>&5
5717 ac_status=$?
5718 echo "$as_me:5718: \$? = $ac_status" >&5
5719 (exit "$ac_status"); } &&
5720 { ac_try='test -s "conftest.$ac_objext"'
5721 { (eval echo "$as_me:5721: \"$ac_try\"") >&5
5722 (eval $ac_try) 2>&5
5723 ac_status=$?
5724 echo "$as_me:5724: \$? = $ac_status" >&5
5725 (exit "$ac_status"); }; }; then
5726 ac_cv_type_pid_t=yes
5727 else
5728 echo "$as_me: failed program was:" >&5
5729 cat "conftest.$ac_ext" >&5
5730 ac_cv_type_pid_t=no
5731 fi
5732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5733 fi
5734 echo "$as_me:5734: result: $ac_cv_type_pid_t" >&5
5735 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5736 if test "$ac_cv_type_pid_t" = yes; then
5737 :
5738 else
5739
5740 cat >>confdefs.h <<EOF
5741 #define pid_t int
5742 EOF
5743
5744 fi
5745
5746 echo "$as_me:5746: checking for uid_t in sys/types.h" >&5
5747 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5748 if test "${ac_cv_type_uid_t+set}" = set; then
5749 echo $ECHO_N "(cached) $ECHO_C" >&6
5750 else
5751 cat >"conftest.$ac_ext" <<_ACEOF
5752 #line 5752 "configure"
5753 #include "confdefs.h"
5754 #include <sys/types.h>
5755
5756 _ACEOF
5757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5758 $EGREP "uid_t" >/dev/null 2>&1; then
5759 ac_cv_type_uid_t=yes
5760 else
5761 ac_cv_type_uid_t=no
5762 fi
5763 rm -rf conftest*
5764
5765 fi
5766 echo "$as_me:5766: result: $ac_cv_type_uid_t" >&5
5767 echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5768 if test $ac_cv_type_uid_t = no; then
5769
5770 cat >>confdefs.h <<\EOF
5771 #define uid_t int
5772 EOF
5773
5774 cat >>confdefs.h <<\EOF
5775 #define gid_t int
5776 EOF
5777
5778 fi
5779
5780 echo "$as_me:5780: checking for off_t" >&5
5781 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5782 if test "${ac_cv_type_off_t+set}" = set; then
5783 echo $ECHO_N "(cached) $ECHO_C" >&6
5784 else
5785 cat >"conftest.$ac_ext" <<_ACEOF
5786 #line 5786 "configure"
5787 #include "confdefs.h"
5788 $ac_includes_default
5789 int
5790 main (void)
5791 {
5792 if ((off_t *) 0)
5793 return 0;
5794 if (sizeof (off_t))
5795 return 0;
5796 ;
5797 return 0;
5798 }
5799 _ACEOF
5800 rm -f "conftest.$ac_objext"
5801 if { (eval echo "$as_me:5801: \"$ac_compile\"") >&5
5802 (eval $ac_compile) 2>&5
5803 ac_status=$?
5804 echo "$as_me:5804: \$? = $ac_status" >&5
5805 (exit "$ac_status"); } &&
5806 { ac_try='test -s "conftest.$ac_objext"'
5807 { (eval echo "$as_me:5807: \"$ac_try\"") >&5
5808 (eval $ac_try) 2>&5
5809 ac_status=$?
5810 echo "$as_me:5810: \$? = $ac_status" >&5
5811 (exit "$ac_status"); }; }; then
5812 ac_cv_type_off_t=yes
5813 else
5814 echo "$as_me: failed program was:" >&5
5815 cat "conftest.$ac_ext" >&5
5816 ac_cv_type_off_t=no
5817 fi
5818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5819 fi
5820 echo "$as_me:5820: result: $ac_cv_type_off_t" >&5
5821 echo "${ECHO_T}$ac_cv_type_off_t" >&6
5822 if test "$ac_cv_type_off_t" = yes; then
5823 :
5824 else
5825
5826 cat >>confdefs.h <<EOF
5827 #define off_t long
5828 EOF
5829
5830 fi
5831
5832 ### checks for library functions
5833
5834 for ac_func in \
5835 gethostname \
5836 getusershell \
5837 endusershell \
5838 getlogin \
5839 initgroups \
5840 mkdtemp \
5841 putenv \
5842 unsetenv \
5843 sched_yield \
5844 setpgid \
5845 setsid \
5846 tcgetattr \
5847 waitpid \
5848 wcswidth \
5849 wcwidth
5850 do
5851 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5852 echo "$as_me:5852: checking for $ac_func" >&5
5853 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5854 if eval "test \"\${$as_ac_var+set}\" = set"; then
5855 echo $ECHO_N "(cached) $ECHO_C" >&6
5856 else
5857 cat >"conftest.$ac_ext" <<_ACEOF
5858 #line 5858 "configure"
5859 #include "confdefs.h"
5860 #define $ac_func autoconf_temporary
5861 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5862 #undef $ac_func
5863
5864 #ifdef __cplusplus
5865 extern "C"
5866 #endif
5867
5868 /* We use char because int might match the return type of a gcc2
5869 builtin and then its argument prototype would still apply. */
5870 char $ac_func (void);
5871
5872 int
5873 main (void)
5874 {
5875
5876 /* The GNU C library defines stubs for functions which it implements
5877 to always fail with ENOSYS. Some functions are actually named
5878 something starting with __ and the normal name is an alias. */
5879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5880 #error found stub for $ac_func
5881 #endif
5882
5883 return $ac_func ();
5884 ;
5885 return 0;
5886 }
5887 _ACEOF
5888 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5889 if { (eval echo "$as_me:5889: \"$ac_link\"") >&5
5890 (eval $ac_link) 2>&5
5891 ac_status=$?
5892 echo "$as_me:5892: \$? = $ac_status" >&5
5893 (exit "$ac_status"); } &&
5894 { ac_try='test -s "conftest$ac_exeext"'
5895 { (eval echo "$as_me:5895: \"$ac_try\"") >&5
5896 (eval $ac_try) 2>&5
5897 ac_status=$?
5898 echo "$as_me:5898: \$? = $ac_status" >&5
5899 (exit "$ac_status"); }; }; then
5900 eval "$as_ac_var=yes"
5901 else
5902 echo "$as_me: failed program was:" >&5
5903 cat "conftest.$ac_ext" >&5
5904 eval "$as_ac_var=no"
5905 fi
5906 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5907 fi
5908 echo "$as_me:5908: result: `eval echo '${'"$as_ac_var"'}'`" >&5
5909 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
5910 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
5911 cat >>confdefs.h <<EOF
5912 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5913 EOF
5914
5915 fi
5916 done
5917
5918 cf_save_libs="$LIBS"
5919 echo "$as_me:5919: checking for clock_gettime" >&5
5920 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
5921 if test "${ac_cv_func_clock_gettime+set}" = set; then
5922 echo $ECHO_N "(cached) $ECHO_C" >&6
5923 else
5924 cat >"conftest.$ac_ext" <<_ACEOF
5925 #line 5925 "configure"
5926 #include "confdefs.h"
5927 #define clock_gettime autoconf_temporary
5928 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5929 #undef clock_gettime
5930
5931 #ifdef __cplusplus
5932 extern "C"
5933 #endif
5934
5935 /* We use char because int might match the return type of a gcc2
5936 builtin and then its argument prototype would still apply. */
5937 char clock_gettime (void);
5938
5939 int
5940 main (void)
5941 {
5942
5943 /* The GNU C library defines stubs for functions which it implements
5944 to always fail with ENOSYS. Some functions are actually named
5945 something starting with __ and the normal name is an alias. */
5946 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
5947 #error found stub for clock_gettime
5948 #endif
5949
5950 return clock_gettime ();
5951 ;
5952 return 0;
5953 }
5954 _ACEOF
5955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5956 if { (eval echo "$as_me:5956: \"$ac_link\"") >&5
5957 (eval $ac_link) 2>&5
5958 ac_status=$?
5959 echo "$as_me:5959: \$? = $ac_status" >&5
5960 (exit "$ac_status"); } &&
5961 { ac_try='test -s "conftest$ac_exeext"'
5962 { (eval echo "$as_me:5962: \"$ac_try\"") >&5
5963 (eval $ac_try) 2>&5
5964 ac_status=$?
5965 echo "$as_me:5965: \$? = $ac_status" >&5
5966 (exit "$ac_status"); }; }; then
5967 ac_cv_func_clock_gettime=yes
5968 else
5969 echo "$as_me: failed program was:" >&5
5970 cat "conftest.$ac_ext" >&5
5971 ac_cv_func_clock_gettime=no
5972 fi
5973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5974 fi
5975 echo "$as_me:5975: result: $ac_cv_func_clock_gettime" >&5
5976 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
5977 if test "$ac_cv_func_clock_gettime" = yes; then
5978 cf_cv_test_clock_gettime=yes
5979 else
5980 echo "$as_me:5980: checking for clock_gettime in -lrt" >&5
5981 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
5982 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
5983 echo $ECHO_N "(cached) $ECHO_C" >&6
5984 else
5985 ac_check_lib_save_LIBS=$LIBS
5986 LIBS="-lrt $LIBS"
5987 cat >"conftest.$ac_ext" <<_ACEOF
5988 #line 5988 "configure"
5989 #include "confdefs.h"
5990
5991 /* Override any gcc2 internal prototype to avoid an error. */
5992 #ifdef __cplusplus
5993 extern "C"
5994 #endif
5995 /* We use char because int might match the return type of a gcc2
5996 builtin and then its argument prototype would still apply. */
5997 char clock_gettime (void);
5998 int
5999 main (void)
6000 {
6001 clock_gettime ();
6002 ;
6003 return 0;
6004 }
6005 _ACEOF
6006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6007 if { (eval echo "$as_me:6007: \"$ac_link\"") >&5
6008 (eval $ac_link) 2>&5
6009 ac_status=$?
6010 echo "$as_me:6010: \$? = $ac_status" >&5
6011 (exit "$ac_status"); } &&
6012 { ac_try='test -s "conftest$ac_exeext"'
6013 { (eval echo "$as_me:6013: \"$ac_try\"") >&5
6014 (eval $ac_try) 2>&5
6015 ac_status=$?
6016 echo "$as_me:6016: \$? = $ac_status" >&5
6017 (exit "$ac_status"); }; }; then
6018 ac_cv_lib_rt_clock_gettime=yes
6019 else
6020 echo "$as_me: failed program was:" >&5
6021 cat "conftest.$ac_ext" >&5
6022 ac_cv_lib_rt_clock_gettime=no
6023 fi
6024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6025 LIBS=$ac_check_lib_save_LIBS
6026 fi
6027 echo "$as_me:6027: result: $ac_cv_lib_rt_clock_gettime" >&5
6028 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
6029 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
6030 LIBS="-lrt $LIBS"
6031 cf_cv_test_clock_gettime=yes
6032 else
6033 cf_cv_test_clock_gettime=no
6034 fi
6035
6036 fi
6037
6038 if test "$cf_cv_test_clock_gettime" = yes ; then
6039 echo "$as_me:6039: checking if clock_gettime links" >&5
6040 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
6041 if test "${cf_cv_func_clock_gettime+set}" = set; then
6042 echo $ECHO_N "(cached) $ECHO_C" >&6
6043 else
6044
6045 cat >"conftest.$ac_ext" <<_ACEOF
6046 #line 6046 "configure"
6047 #include "confdefs.h"
6048
6049 $ac_includes_default
6050 #include <time.h>
6051
6052 int
6053 main (void)
6054 {
6055 struct timespec ts;
6056 int rc = clock_gettime(CLOCK_REALTIME, &ts)
6057 + clock_gettime(CLOCK_MONOTONIC, &ts);
6058 (void) rc; (void)ts
6059 ;
6060 return 0;
6061 }
6062 _ACEOF
6063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6064 if { (eval echo "$as_me:6064: \"$ac_link\"") >&5
6065 (eval $ac_link) 2>&5
6066 ac_status=$?
6067 echo "$as_me:6067: \$? = $ac_status" >&5
6068 (exit "$ac_status"); } &&
6069 { ac_try='test -s "conftest$ac_exeext"'
6070 { (eval echo "$as_me:6070: \"$ac_try\"") >&5
6071 (eval $ac_try) 2>&5
6072 ac_status=$?
6073 echo "$as_me:6073: \$? = $ac_status" >&5
6074 (exit "$ac_status"); }; }; then
6075 cf_cv_func_clock_gettime=yes
6076 else
6077 echo "$as_me: failed program was:" >&5
6078 cat "conftest.$ac_ext" >&5
6079 cf_cv_func_clock_gettime=no
6080 fi
6081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6082
6083 fi
6084 echo "$as_me:6084: result: $cf_cv_func_clock_gettime" >&5
6085 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
6086 else
6087 cf_cv_func_clock_gettime=no
6088 fi
6089
6090 if test "$cf_cv_func_clock_gettime" = yes
6091 then
6092
6093 cat >>confdefs.h <<\EOF
6094 #define HAVE_CLOCK_GETTIME 1
6095 EOF
6096
6097 else
6098 echo "$as_me:6098: checking for gettimeofday" >&5
6099 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
6100 if test "${ac_cv_func_gettimeofday+set}" = set; then
6101 echo $ECHO_N "(cached) $ECHO_C" >&6
6102 else
6103 cat >"conftest.$ac_ext" <<_ACEOF
6104 #line 6104 "configure"
6105 #include "confdefs.h"
6106 #define gettimeofday autoconf_temporary
6107 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6108 #undef gettimeofday
6109
6110 #ifdef __cplusplus
6111 extern "C"
6112 #endif
6113
6114 /* We use char because int might match the return type of a gcc2
6115 builtin and then its argument prototype would still apply. */
6116 char gettimeofday (void);
6117
6118 int
6119 main (void)
6120 {
6121
6122 /* The GNU C library defines stubs for functions which it implements
6123 to always fail with ENOSYS. Some functions are actually named
6124 something starting with __ and the normal name is an alias. */
6125 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
6126 #error found stub for gettimeofday
6127 #endif
6128
6129 return gettimeofday ();
6130 ;
6131 return 0;
6132 }
6133 _ACEOF
6134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6135 if { (eval echo "$as_me:6135: \"$ac_link\"") >&5
6136 (eval $ac_link) 2>&5
6137 ac_status=$?
6138 echo "$as_me:6138: \$? = $ac_status" >&5
6139 (exit "$ac_status"); } &&
6140 { ac_try='test -s "conftest$ac_exeext"'
6141 { (eval echo "$as_me:6141: \"$ac_try\"") >&5
6142 (eval $ac_try) 2>&5
6143 ac_status=$?
6144 echo "$as_me:6144: \$? = $ac_status" >&5
6145 (exit "$ac_status"); }; }; then
6146 ac_cv_func_gettimeofday=yes
6147 else
6148 echo "$as_me: failed program was:" >&5
6149 cat "conftest.$ac_ext" >&5
6150 ac_cv_func_gettimeofday=no
6151 fi
6152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6153 fi
6154 echo "$as_me:6154: result: $ac_cv_func_gettimeofday" >&5
6155 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
6156 if test "$ac_cv_func_gettimeofday" = yes; then
6157
6158 cat >>confdefs.h <<\EOF
6159 #define HAVE_GETTIMEOFDAY 1
6160 EOF
6161
6162 else
6163
6164 echo "$as_me:6164: checking for gettimeofday in -lbsd" >&5
6165 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
6166 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
6167 echo $ECHO_N "(cached) $ECHO_C" >&6
6168 else
6169 ac_check_lib_save_LIBS=$LIBS
6170 LIBS="-lbsd $LIBS"
6171 cat >"conftest.$ac_ext" <<_ACEOF
6172 #line 6172 "configure"
6173 #include "confdefs.h"
6174
6175 /* Override any gcc2 internal prototype to avoid an error. */
6176 #ifdef __cplusplus
6177 extern "C"
6178 #endif
6179 /* We use char because int might match the return type of a gcc2
6180 builtin and then its argument prototype would still apply. */
6181 char gettimeofday (void);
6182 int
6183 main (void)
6184 {
6185 gettimeofday ();
6186 ;
6187 return 0;
6188 }
6189 _ACEOF
6190 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6191 if { (eval echo "$as_me:6191: \"$ac_link\"") >&5
6192 (eval $ac_link) 2>&5
6193 ac_status=$?
6194 echo "$as_me:6194: \$? = $ac_status" >&5
6195 (exit "$ac_status"); } &&
6196 { ac_try='test -s "conftest$ac_exeext"'
6197 { (eval echo "$as_me:6197: \"$ac_try\"") >&5
6198 (eval $ac_try) 2>&5
6199 ac_status=$?
6200 echo "$as_me:6200: \$? = $ac_status" >&5
6201 (exit "$ac_status"); }; }; then
6202 ac_cv_lib_bsd_gettimeofday=yes
6203 else
6204 echo "$as_me: failed program was:" >&5
6205 cat "conftest.$ac_ext" >&5
6206 ac_cv_lib_bsd_gettimeofday=no
6207 fi
6208 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6209 LIBS=$ac_check_lib_save_LIBS
6210 fi
6211 echo "$as_me:6211: result: $ac_cv_lib_bsd_gettimeofday" >&5
6212 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
6213 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
6214
6215 cat >>confdefs.h <<\EOF
6216 #define HAVE_GETTIMEOFDAY 1
6217 EOF
6218
6219 cf_add_libs="$LIBS"
6220 # reverse order
6221 cf_add_0lib=
6222 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6223 # filter duplicates
6224 for cf_add_1lib in $cf_add_0lib; do
6225 for cf_add_2lib in $cf_add_libs; do
6226 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6227 cf_add_1lib=
6228 break
6229 fi
6230 done
6231 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6232 done
6233 LIBS="$cf_add_libs"
6234
6235 fi
6236
6237 fi
6238 fi
6239
6240 echo "$as_me:6240: checking for strftime function" >&5
6241 echo $ECHO_N "checking for strftime function... $ECHO_C" >&6
6242 if test "${cf_cv_func_strftime+set}" = set; then
6243 echo $ECHO_N "(cached) $ECHO_C" >&6
6244 else
6245
6246 cat >"conftest.$ac_ext" <<_ACEOF
6247 #line 6247 "configure"
6248 #include "confdefs.h"
6249
6250 $ac_includes_default
6251 #include <time.h>
6252
6253 int
6254 main (void)
6255 {
6256
6257 time_t now = time((time_t*)0);
6258 struct tm *tm = localtime(&now);
6259 char buffer[80];
6260 size_t result = strftime(buffer, sizeof(buffer), "%c", tm);
6261
6262 (void)result;
6263 (void)buffer;
6264
6265 ;
6266 return 0;
6267 }
6268 _ACEOF
6269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6270 if { (eval echo "$as_me:6270: \"$ac_link\"") >&5
6271 (eval $ac_link) 2>&5
6272 ac_status=$?
6273 echo "$as_me:6273: \$? = $ac_status" >&5
6274 (exit "$ac_status"); } &&
6275 { ac_try='test -s "conftest$ac_exeext"'
6276 { (eval echo "$as_me:6276: \"$ac_try\"") >&5
6277 (eval $ac_try) 2>&5
6278 ac_status=$?
6279 echo "$as_me:6279: \$? = $ac_status" >&5
6280 (exit "$ac_status"); }; }; then
6281 cf_cv_func_strftime=yes
6282 else
6283 echo "$as_me: failed program was:" >&5
6284 cat "conftest.$ac_ext" >&5
6285 cf_cv_func_strftime=no
6286 fi
6287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6288
6289 fi
6290 echo "$as_me:6290: result: $cf_cv_func_strftime" >&5
6291 echo "${ECHO_T}$cf_cv_func_strftime" >&6
6292
6293 test "$cf_cv_func_strftime" = yes &&
6294 cat >>confdefs.h <<\EOF
6295 #define HAVE_STRFTIME 1
6296 EOF
6297
6298 for ac_header in \
6299 unistd.h \
6300
6301 do
6302 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6303 echo "$as_me:6303: checking for $ac_header" >&5
6304 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6305 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6306 echo $ECHO_N "(cached) $ECHO_C" >&6
6307 else
6308 cat >"conftest.$ac_ext" <<_ACEOF
6309 #line 6309 "configure"
6310 #include "confdefs.h"
6311 #include <$ac_header>
6312 _ACEOF
6313 if { (eval echo "$as_me:6313: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6314 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6315 ac_status=$?
6316 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6317 rm -f conftest.er1
6318 cat conftest.err >&5
6319 echo "$as_me:6319: \$? = $ac_status" >&5
6320 (exit "$ac_status"); } >/dev/null; then
6321 if test -s conftest.err; then
6322 ac_cpp_err=$ac_c_preproc_warn_flag
6323 else
6324 ac_cpp_err=
6325 fi
6326 else
6327 ac_cpp_err=yes
6328 fi
6329 if test -z "$ac_cpp_err"; then
6330 eval "$as_ac_Header=yes"
6331 else
6332 echo "$as_me: failed program was:" >&5
6333 cat "conftest.$ac_ext" >&5
6334 eval "$as_ac_Header=no"
6335 fi
6336 rm -f conftest.err "conftest.$ac_ext"
6337 fi
6338 echo "$as_me:6338: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6339 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6340 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6341 cat >>confdefs.h <<EOF
6342 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6343 EOF
6344
6345 fi
6346 done
6347
6348 echo "$as_me:6348: checking for working mkstemp" >&5
6349 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
6350 if test "${cf_cv_func_mkstemp+set}" = set; then
6351 echo $ECHO_N "(cached) $ECHO_C" >&6
6352 else
6353
6354 rm -rf ./conftest*
6355 if test "$cross_compiling" = yes; then
6356 cf_cv_func_mkstemp=maybe
6357 else
6358 cat >"conftest.$ac_ext" <<_ACEOF
6359 #line 6359 "configure"
6360 #include "confdefs.h"
6361
6362 $ac_includes_default
6363
6364 int main(void)
6365 {
6366 static char tmpl[] = "conftestXXXXXX";
6367 char name[2][80];
6368 int n;
6369 int result = 0;
6370 int fd;
6371 struct stat sb;
6372
6373 umask(077);
6374 for (n = 0; n < 2; ++n) {
6375 strcpy(name[n], tmpl);
6376 if ((fd = mkstemp(name[n])) >= 0) {
6377 if (!strcmp(name[n], tmpl)
6378 || stat(name[n], &sb) != 0
6379 || (sb.st_mode & S_IFMT) != S_IFREG
6380 || (sb.st_mode & 077) != 0) {
6381 result = 1;
6382 }
6383 close(fd);
6384 }
6385 }
6386 if (result == 0
6387 && !strcmp(name[0], name[1]))
6388 result = 1;
6389 ${cf_cv_main_return:-return}(result);
6390 }
6391
6392 _ACEOF
6393 rm -f "conftest$ac_exeext"
6394 if { (eval echo "$as_me:6394: \"$ac_link\"") >&5
6395 (eval $ac_link) 2>&5
6396 ac_status=$?
6397 echo "$as_me:6397: \$? = $ac_status" >&5
6398 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6399 { (eval echo "$as_me:6399: \"$ac_try\"") >&5
6400 (eval $ac_try) 2>&5
6401 ac_status=$?
6402 echo "$as_me:6402: \$? = $ac_status" >&5
6403 (exit "$ac_status"); }; }; then
6404 cf_cv_func_mkstemp=yes
6405
6406 else
6407 echo "$as_me: program exited with status $ac_status" >&5
6408 echo "$as_me: failed program was:" >&5
6409 cat "conftest.$ac_ext" >&5
6410 cf_cv_func_mkstemp=no
6411
6412 fi
6413 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6414 fi
6415
6416 fi
6417 echo "$as_me:6417: result: $cf_cv_func_mkstemp" >&5
6418 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
6419 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
6420 echo "$as_me:6420: checking for mkstemp" >&5
6421 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
6422 if test "${ac_cv_func_mkstemp+set}" = set; then
6423 echo $ECHO_N "(cached) $ECHO_C" >&6
6424 else
6425 cat >"conftest.$ac_ext" <<_ACEOF
6426 #line 6426 "configure"
6427 #include "confdefs.h"
6428 #define mkstemp autoconf_temporary
6429 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6430 #undef mkstemp
6431
6432 #ifdef __cplusplus
6433 extern "C"
6434 #endif
6435
6436 /* We use char because int might match the return type of a gcc2
6437 builtin and then its argument prototype would still apply. */
6438 char mkstemp (void);
6439
6440 int
6441 main (void)
6442 {
6443
6444 /* The GNU C library defines stubs for functions which it implements
6445 to always fail with ENOSYS. Some functions are actually named
6446 something starting with __ and the normal name is an alias. */
6447 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
6448 #error found stub for mkstemp
6449 #endif
6450
6451 return mkstemp ();
6452 ;
6453 return 0;
6454 }
6455 _ACEOF
6456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6457 if { (eval echo "$as_me:6457: \"$ac_link\"") >&5
6458 (eval $ac_link) 2>&5
6459 ac_status=$?
6460 echo "$as_me:6460: \$? = $ac_status" >&5
6461 (exit "$ac_status"); } &&
6462 { ac_try='test -s "conftest$ac_exeext"'
6463 { (eval echo "$as_me:6463: \"$ac_try\"") >&5
6464 (eval $ac_try) 2>&5
6465 ac_status=$?
6466 echo "$as_me:6466: \$? = $ac_status" >&5
6467 (exit "$ac_status"); }; }; then
6468 ac_cv_func_mkstemp=yes
6469 else
6470 echo "$as_me: failed program was:" >&5
6471 cat "conftest.$ac_ext" >&5
6472 ac_cv_func_mkstemp=no
6473 fi
6474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6475 fi
6476 echo "$as_me:6476: result: $ac_cv_func_mkstemp" >&5
6477 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
6478
6479 fi
6480 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
6481
6482 cat >>confdefs.h <<\EOF
6483 #define HAVE_MKSTEMP 1
6484 EOF
6485
6486 fi
6487
6488 echo "$as_me:6488: checking if setitimer is available" >&5
6489 echo $ECHO_N "checking if setitimer is available... $ECHO_C" >&6
6490 if test "${cf_cv_func_setitimer+set}" = set; then
6491 echo $ECHO_N "(cached) $ECHO_C" >&6
6492 else
6493
6494 cat >"conftest.$ac_ext" <<_ACEOF
6495 #line 6495 "configure"
6496 #include "confdefs.h"
6497
6498 $ac_includes_default
6499 #include <sys/time.h>
6500
6501 int
6502 main (void)
6503 {
6504
6505 struct itimerval it;
6506 memset(&it, 0, sizeof(struct itimerval));
6507 it.it_value.tv_sec = 1;
6508 setitimer(ITIMER_REAL, &it, NULL);
6509
6510 ;
6511 return 0;
6512 }
6513 _ACEOF
6514 rm -f "conftest.$ac_objext"
6515 if { (eval echo "$as_me:6515: \"$ac_compile\"") >&5
6516 (eval $ac_compile) 2>&5
6517 ac_status=$?
6518 echo "$as_me:6518: \$? = $ac_status" >&5
6519 (exit "$ac_status"); } &&
6520 { ac_try='test -s "conftest.$ac_objext"'
6521 { (eval echo "$as_me:6521: \"$ac_try\"") >&5
6522 (eval $ac_try) 2>&5
6523 ac_status=$?
6524 echo "$as_me:6524: \$? = $ac_status" >&5
6525 (exit "$ac_status"); }; }; then
6526 cf_cv_func_setitimer=yes
6527 else
6528 echo "$as_me: failed program was:" >&5
6529 cat "conftest.$ac_ext" >&5
6530 cf_cv_func_setitimer=no
6531 fi
6532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6533
6534 fi
6535 echo "$as_me:6535: result: $cf_cv_func_setitimer" >&5
6536 echo "${ECHO_T}$cf_cv_func_setitimer" >&6
6537 test "$cf_cv_func_setitimer" != no &&
6538 cat >>confdefs.h <<\EOF
6539 #define HAVE_SETITIMER 1
6540 EOF
6541
6542 for ac_header in lastlog.h paths.h
6543 do
6544 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6545 echo "$as_me:6545: checking for $ac_header" >&5
6546 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6548 echo $ECHO_N "(cached) $ECHO_C" >&6
6549 else
6550 cat >"conftest.$ac_ext" <<_ACEOF
6551 #line 6551 "configure"
6552 #include "confdefs.h"
6553 #include <$ac_header>
6554 _ACEOF
6555 if { (eval echo "$as_me:6555: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6556 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6557 ac_status=$?
6558 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6559 rm -f conftest.er1
6560 cat conftest.err >&5
6561 echo "$as_me:6561: \$? = $ac_status" >&5
6562 (exit "$ac_status"); } >/dev/null; then
6563 if test -s conftest.err; then
6564 ac_cpp_err=$ac_c_preproc_warn_flag
6565 else
6566 ac_cpp_err=
6567 fi
6568 else
6569 ac_cpp_err=yes
6570 fi
6571 if test -z "$ac_cpp_err"; then
6572 eval "$as_ac_Header=yes"
6573 else
6574 echo "$as_me: failed program was:" >&5
6575 cat "conftest.$ac_ext" >&5
6576 eval "$as_ac_Header=no"
6577 fi
6578 rm -f conftest.err "conftest.$ac_ext"
6579 fi
6580 echo "$as_me:6580: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6581 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6582 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6583 cat >>confdefs.h <<EOF
6584 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6585 EOF
6586
6587 fi
6588 done
6589
6590 echo "$as_me:6590: checking for lastlog path" >&5
6591 echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
6592 if test "${cf_cv_path_lastlog+set}" = set; then
6593 echo $ECHO_N "(cached) $ECHO_C" >&6
6594 else
6595
6596 cat >"conftest.$ac_ext" <<_ACEOF
6597 #line 6597 "configure"
6598 #include "confdefs.h"
6599
6600 #include <sys/types.h>
6601 #ifdef HAVE_LASTLOG_H
6602 #include <lastlog.h>
6603 #else
6604 #ifdef HAVE_PATHS_H
6605 #include <paths.h>
6606 #endif
6607 #endif
6608 int
6609 main (void)
6610 {
6611 static char path[] = _PATH_LASTLOG; (void)path
6612 ;
6613 return 0;
6614 }
6615 _ACEOF
6616 rm -f "conftest.$ac_objext"
6617 if { (eval echo "$as_me:6617: \"$ac_compile\"") >&5
6618 (eval $ac_compile) 2>&5
6619 ac_status=$?
6620 echo "$as_me:6620: \$? = $ac_status" >&5
6621 (exit "$ac_status"); } &&
6622 { ac_try='test -s "conftest.$ac_objext"'
6623 { (eval echo "$as_me:6623: \"$ac_try\"") >&5
6624 (eval $ac_try) 2>&5
6625 ac_status=$?
6626 echo "$as_me:6626: \$? = $ac_status" >&5
6627 (exit "$ac_status"); }; }; then
6628 cf_cv_path_lastlog="_PATH_LASTLOG"
6629 else
6630 echo "$as_me: failed program was:" >&5
6631 cat "conftest.$ac_ext" >&5
6632 if test -f /usr/adm/lastlog ; then
6633 cf_cv_path_lastlog=/usr/adm/lastlog
6634 else
6635 cf_cv_path_lastlog=no
6636 fi
6637 fi
6638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6639
6640 fi
6641 echo "$as_me:6641: result: $cf_cv_path_lastlog" >&5
6642 echo "${ECHO_T}$cf_cv_path_lastlog" >&6
6643 test "$cf_cv_path_lastlog" != no &&
6644 cat >>confdefs.h <<\EOF
6645 #define USE_LASTLOG 1
6646 EOF
6647
6648 echo "$as_me:6648: checking for utmp implementation" >&5
6649 echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
6650 if test "${cf_cv_have_utmp+set}" = set; then
6651 echo $ECHO_N "(cached) $ECHO_C" >&6
6652 else
6653
6654 cf_cv_have_utmp=no
6655 for cf_header in utmpx utmp ; do
6656 cf_utmp_includes="
6657 #include <sys/types.h>
6658 #include <${cf_header}.h>
6659 #define getutent getutxent
6660 #ifdef USE_LASTLOG
6661 #include <lastlog.h> /* may conflict with utmpx.h on Linux */
6662 #endif
6663 "
6664 cat >"conftest.$ac_ext" <<_ACEOF
6665 #line 6665 "configure"
6666 #include "confdefs.h"
6667 $cf_utmp_includes
6668 int
6669 main (void)
6670 {
6671 struct $cf_header x;
6672 char *name = x.ut_name; /* utmp.h and compatible definitions */
6673 (void)x;
6674 (void)name;
6675
6676 ;
6677 return 0;
6678 }
6679 _ACEOF
6680 rm -f "conftest.$ac_objext"
6681 if { (eval echo "$as_me:6681: \"$ac_compile\"") >&5
6682 (eval $ac_compile) 2>&5
6683 ac_status=$?
6684 echo "$as_me:6684: \$? = $ac_status" >&5
6685 (exit "$ac_status"); } &&
6686 { ac_try='test -s "conftest.$ac_objext"'
6687 { (eval echo "$as_me:6687: \"$ac_try\"") >&5
6688 (eval $ac_try) 2>&5
6689 ac_status=$?
6690 echo "$as_me:6690: \$? = $ac_status" >&5
6691 (exit "$ac_status"); }; }; then
6692 cf_cv_have_utmp=$cf_header
6693 break
6694 else
6695 echo "$as_me: failed program was:" >&5
6696 cat "conftest.$ac_ext" >&5
6697
6698 cat >"conftest.$ac_ext" <<_ACEOF
6699 #line 6699 "configure"
6700 #include "confdefs.h"
6701 $cf_utmp_includes
6702 int
6703 main (void)
6704 {
6705 struct $cf_header x;
6706 char *name = x.ut_user; /* utmpx.h must declare this */
6707 (void)x;
6708 (void)name;
6709
6710 ;
6711 return 0;
6712 }
6713 _ACEOF
6714 rm -f "conftest.$ac_objext"
6715 if { (eval echo "$as_me:6715: \"$ac_compile\"") >&5
6716 (eval $ac_compile) 2>&5
6717 ac_status=$?
6718 echo "$as_me:6718: \$? = $ac_status" >&5
6719 (exit "$ac_status"); } &&
6720 { ac_try='test -s "conftest.$ac_objext"'
6721 { (eval echo "$as_me:6721: \"$ac_try\"") >&5
6722 (eval $ac_try) 2>&5
6723 ac_status=$?
6724 echo "$as_me:6724: \$? = $ac_status" >&5
6725 (exit "$ac_status"); }; }; then
6726 cf_cv_have_utmp=$cf_header
6727 break
6728
6729 else
6730 echo "$as_me: failed program was:" >&5
6731 cat "conftest.$ac_ext" >&5
6732 fi
6733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6734 fi
6735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6736 done
6737
6738 fi
6739 echo "$as_me:6739: result: $cf_cv_have_utmp" >&5
6740 echo "${ECHO_T}$cf_cv_have_utmp" >&6
6741
6742 if test "$cf_cv_have_utmp" != no ; then
6743
6744 cat >>confdefs.h <<\EOF
6745 #define HAVE_UTMP 1
6746 EOF
6747
6748 test "$cf_cv_have_utmp" = utmpx &&
6749 cat >>confdefs.h <<\EOF
6750 #define UTMPX_FOR_UTMP 1
6751 EOF
6752
6753 if test "$cf_cv_have_utmp" != no ; then
6754 echo "$as_me:6754: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
6755 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
6756 if test "${cf_cv_have_utmp_ut_host+set}" = set; then
6757 echo $ECHO_N "(cached) $ECHO_C" >&6
6758 else
6759
6760 cat >"conftest.$ac_ext" <<_ACEOF
6761 #line 6761 "configure"
6762 #include "confdefs.h"
6763
6764 #include <sys/types.h>
6765 #include <${cf_cv_have_utmp}.h>
6766 int
6767 main (void)
6768 {
6769 struct $cf_cv_have_utmp x;
6770 char *y = &x.ut_host[0];
6771 (void)x;
6772 (void)y
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 cf_cv_have_utmp_ut_host=yes
6790 else
6791 echo "$as_me: failed program was:" >&5
6792 cat "conftest.$ac_ext" >&5
6793 cf_cv_have_utmp_ut_host=no
6794 fi
6795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6796
6797 fi
6798
6799 echo "$as_me:6799: result: $cf_cv_have_utmp_ut_host" >&5
6800 echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
6801 test "$cf_cv_have_utmp_ut_host" != no &&
6802 cat >>confdefs.h <<\EOF
6803 #define HAVE_UTMP_UT_HOST 1
6804 EOF
6805
6806 fi
6807
6808 if test "$cf_cv_have_utmp" != no ; then
6809 echo "$as_me:6809: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
6810 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
6811 if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
6812 echo $ECHO_N "(cached) $ECHO_C" >&6
6813 else
6814
6815 cat >"conftest.$ac_ext" <<_ACEOF
6816 #line 6816 "configure"
6817 #include "confdefs.h"
6818
6819 #include <sys/types.h>
6820 #include <${cf_cv_have_utmp}.h>
6821 int
6822 main (void)
6823 {
6824 struct $cf_cv_have_utmp x;
6825 int y = x.ut_syslen;
6826 (void)x;
6827 (void)y
6828 ;
6829 return 0;
6830 }
6831 _ACEOF
6832 rm -f "conftest.$ac_objext"
6833 if { (eval echo "$as_me:6833: \"$ac_compile\"") >&5
6834 (eval $ac_compile) 2>&5
6835 ac_status=$?
6836 echo "$as_me:6836: \$? = $ac_status" >&5
6837 (exit "$ac_status"); } &&
6838 { ac_try='test -s "conftest.$ac_objext"'
6839 { (eval echo "$as_me:6839: \"$ac_try\"") >&5
6840 (eval $ac_try) 2>&5
6841 ac_status=$?
6842 echo "$as_me:6842: \$? = $ac_status" >&5
6843 (exit "$ac_status"); }; }; then
6844 cf_cv_have_utmp_ut_syslen=yes
6845 else
6846 echo "$as_me: failed program was:" >&5
6847 cat "conftest.$ac_ext" >&5
6848 cf_cv_have_utmp_ut_syslen=no
6849 fi
6850 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6851
6852 fi
6853
6854 echo "$as_me:6854: result: $cf_cv_have_utmp_ut_syslen" >&5
6855 echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
6856 test "$cf_cv_have_utmp_ut_syslen" != no &&
6857 cat >>confdefs.h <<\EOF
6858 #define HAVE_UTMP_UT_SYSLEN 1
6859 EOF
6860
6861 fi
6862
6863 if test "$cf_cv_have_utmp" != no ; then
6864 echo "$as_me:6864: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
6865 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
6866 if test "${cf_cv_have_utmp_ut_name+set}" = set; then
6867 echo $ECHO_N "(cached) $ECHO_C" >&6
6868 else
6869
6870 cf_cv_have_utmp_ut_name=no
6871 cf_utmp_includes="
6872 #include <sys/types.h>
6873 #include <${cf_cv_have_utmp}.h>
6874 #define getutent getutxent
6875 #ifdef USE_LASTLOG
6876 #include <lastlog.h> /* may conflict with utmpx.h on Linux */
6877 #endif
6878 "
6879 for cf_header in ut_name ut_user ; do
6880 cat >"conftest.$ac_ext" <<_ACEOF
6881 #line 6881 "configure"
6882 #include "confdefs.h"
6883 $cf_utmp_includes
6884 int
6885 main (void)
6886 {
6887 struct $cf_cv_have_utmp x;
6888 char *name = x.$cf_header;
6889 (void)x;
6890 (void)name;
6891
6892 ;
6893 return 0;
6894 }
6895 _ACEOF
6896 rm -f "conftest.$ac_objext"
6897 if { (eval echo "$as_me:6897: \"$ac_compile\"") >&5
6898 (eval $ac_compile) 2>&5
6899 ac_status=$?
6900 echo "$as_me:6900: \$? = $ac_status" >&5
6901 (exit "$ac_status"); } &&
6902 { ac_try='test -s "conftest.$ac_objext"'
6903 { (eval echo "$as_me:6903: \"$ac_try\"") >&5
6904 (eval $ac_try) 2>&5
6905 ac_status=$?
6906 echo "$as_me:6906: \$? = $ac_status" >&5
6907 (exit "$ac_status"); }; }; then
6908 cf_cv_have_utmp_ut_name=$cf_header
6909 break
6910 else
6911 echo "$as_me: failed program was:" >&5
6912 cat "conftest.$ac_ext" >&5
6913 fi
6914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6915 done
6916
6917 fi
6918 echo "$as_me:6918: result: $cf_cv_have_utmp_ut_name" >&5
6919 echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
6920
6921 case "$cf_cv_have_utmp_ut_name" in
6922 (no)
6923 { { echo "$as_me:6923: error: Cannot find declaration for ut.ut_name" >&5
6924 echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
6925 { (exit 1); exit 1; }; }
6926 ;;
6927 (ut_user)
6928
6929 cat >>confdefs.h <<\EOF
6930 #define ut_name ut_user
6931 EOF
6932
6933 ;;
6934 esac
6935 fi
6936
6937 if test "$cf_cv_have_utmp" != no ; then
6938 echo "$as_me:6938: checking for exit-status in $cf_cv_have_utmp" >&5
6939 echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
6940 if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
6941 echo $ECHO_N "(cached) $ECHO_C" >&6
6942 else
6943
6944 for cf_result in \
6945 ut_exit.__e_exit \
6946 ut_exit.e_exit \
6947 ut_exit.ut_e_exit \
6948 ut_exit.ut_exit
6949 do
6950 cat >"conftest.$ac_ext" <<_ACEOF
6951 #line 6951 "configure"
6952 #include "confdefs.h"
6953
6954 #include <sys/types.h>
6955 #include <${cf_cv_have_utmp}.h>
6956 int
6957 main (void)
6958 {
6959 struct $cf_cv_have_utmp x;
6960 long y = x.$cf_result = 0;
6961 (void)x;
6962 (void)y
6963 ;
6964 return 0;
6965 }
6966 _ACEOF
6967 rm -f "conftest.$ac_objext"
6968 if { (eval echo "$as_me:6968: \"$ac_compile\"") >&5
6969 (eval $ac_compile) 2>&5
6970 ac_status=$?
6971 echo "$as_me:6971: \$? = $ac_status" >&5
6972 (exit "$ac_status"); } &&
6973 { ac_try='test -s "conftest.$ac_objext"'
6974 { (eval echo "$as_me:6974: \"$ac_try\"") >&5
6975 (eval $ac_try) 2>&5
6976 ac_status=$?
6977 echo "$as_me:6977: \$? = $ac_status" >&5
6978 (exit "$ac_status"); }; }; then
6979 cf_cv_have_utmp_ut_xstatus=$cf_result
6980 break
6981 else
6982 echo "$as_me: failed program was:" >&5
6983 cat "conftest.$ac_ext" >&5
6984 cf_cv_have_utmp_ut_xstatus=no
6985 fi
6986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6987 done
6988
6989 fi
6990 echo "$as_me:6990: result: $cf_cv_have_utmp_ut_xstatus" >&5
6991 echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
6992 if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
6993
6994 cat >>confdefs.h <<\EOF
6995 #define HAVE_UTMP_UT_XSTATUS 1
6996 EOF
6997
6998 cat >>confdefs.h <<EOF
6999 #define ut_xstatus $cf_cv_have_utmp_ut_xstatus
7000 EOF
7001
7002 fi
7003 fi
7004
7005 if test "$cf_cv_have_utmp" != no ; then
7006 echo "$as_me:7006: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
7007 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
7008 if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
7009 echo $ECHO_N "(cached) $ECHO_C" >&6
7010 else
7011
7012 cat >"conftest.$ac_ext" <<_ACEOF
7013 #line 7013 "configure"
7014 #include "confdefs.h"
7015
7016 #include <sys/types.h>
7017 #include <${cf_cv_have_utmp}.h>
7018 int
7019 main (void)
7020 {
7021 struct $cf_cv_have_utmp x;
7022 long y = x.ut_xtime = 0;
7023 (void)x;
7024 (void)y
7025 ;
7026 return 0;
7027 }
7028 _ACEOF
7029 rm -f "conftest.$ac_objext"
7030 if { (eval echo "$as_me:7030: \"$ac_compile\"") >&5
7031 (eval $ac_compile) 2>&5
7032 ac_status=$?
7033 echo "$as_me:7033: \$? = $ac_status" >&5
7034 (exit "$ac_status"); } &&
7035 { ac_try='test -s "conftest.$ac_objext"'
7036 { (eval echo "$as_me:7036: \"$ac_try\"") >&5
7037 (eval $ac_try) 2>&5
7038 ac_status=$?
7039 echo "$as_me:7039: \$? = $ac_status" >&5
7040 (exit "$ac_status"); }; }; then
7041 cf_cv_have_utmp_ut_xtime=yes
7042 else
7043 echo "$as_me: failed program was:" >&5
7044 cat "conftest.$ac_ext" >&5
7045 cat >"conftest.$ac_ext" <<_ACEOF
7046 #line 7046 "configure"
7047 #include "confdefs.h"
7048
7049 #include <sys/types.h>
7050 #include <${cf_cv_have_utmp}.h>
7051 int
7052 main (void)
7053 {
7054 struct $cf_cv_have_utmp x;
7055 long y = x.ut_tv.tv_sec;
7056 (void)x;
7057 (void)y
7058 ;
7059 return 0;
7060 }
7061 _ACEOF
7062 rm -f "conftest.$ac_objext"
7063 if { (eval echo "$as_me:7063: \"$ac_compile\"") >&5
7064 (eval $ac_compile) 2>&5
7065 ac_status=$?
7066 echo "$as_me:7066: \$? = $ac_status" >&5
7067 (exit "$ac_status"); } &&
7068 { ac_try='test -s "conftest.$ac_objext"'
7069 { (eval echo "$as_me:7069: \"$ac_try\"") >&5
7070 (eval $ac_try) 2>&5
7071 ac_status=$?
7072 echo "$as_me:7072: \$? = $ac_status" >&5
7073 (exit "$ac_status"); }; }; then
7074 cf_cv_have_utmp_ut_xtime=define
7075 else
7076 echo "$as_me: failed program was:" >&5
7077 cat "conftest.$ac_ext" >&5
7078 cf_cv_have_utmp_ut_xtime=no
7079 fi
7080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7081
7082 fi
7083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7084
7085 fi
7086 echo "$as_me:7086: result: $cf_cv_have_utmp_ut_xtime" >&5
7087 echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
7088 if test "$cf_cv_have_utmp_ut_xtime" != no ; then
7089
7090 cat >>confdefs.h <<\EOF
7091 #define HAVE_UTMP_UT_XTIME 1
7092 EOF
7093
7094 if test "$cf_cv_have_utmp_ut_xtime" = define ; then
7095
7096 cat >>confdefs.h <<\EOF
7097 #define ut_xtime ut_tv.tv_sec
7098 EOF
7099
7100 fi
7101 fi
7102 fi
7103
7104 if test "$cf_cv_have_utmp" != no ; then
7105 echo "$as_me:7105: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
7106 echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
7107 if test "${cf_cv_have_utmp_ut_session+set}" = set; then
7108 echo $ECHO_N "(cached) $ECHO_C" >&6
7109 else
7110
7111 cat >"conftest.$ac_ext" <<_ACEOF
7112 #line 7112 "configure"
7113 #include "confdefs.h"
7114
7115 #include <sys/types.h>
7116 #include <${cf_cv_have_utmp}.h>
7117 int
7118 main (void)
7119 {
7120 static struct $cf_cv_have_utmp x;
7121 long y = x.ut_session;
7122 (void)x;
7123 (void)y
7124 ;
7125 return 0;
7126 }
7127 _ACEOF
7128 rm -f "conftest.$ac_objext"
7129 if { (eval echo "$as_me:7129: \"$ac_compile\"") >&5
7130 (eval $ac_compile) 2>&5
7131 ac_status=$?
7132 echo "$as_me:7132: \$? = $ac_status" >&5
7133 (exit "$ac_status"); } &&
7134 { ac_try='test -s "conftest.$ac_objext"'
7135 { (eval echo "$as_me:7135: \"$ac_try\"") >&5
7136 (eval $ac_try) 2>&5
7137 ac_status=$?
7138 echo "$as_me:7138: \$? = $ac_status" >&5
7139 (exit "$ac_status"); }; }; then
7140 cf_cv_have_utmp_ut_session=yes
7141 else
7142 echo "$as_me: failed program was:" >&5
7143 cat "conftest.$ac_ext" >&5
7144 cf_cv_have_utmp_ut_session=no
7145 fi
7146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7147
7148 fi
7149 echo "$as_me:7149: result: $cf_cv_have_utmp_ut_session" >&5
7150 echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
7151 if test "$cf_cv_have_utmp_ut_session" != no ; then
7152
7153 cat >>confdefs.h <<\EOF
7154 #define HAVE_UTMP_UT_SESSION 1
7155 EOF
7156
7157 fi
7158 fi
7159
7160 echo "$as_me:7160: checking if $cf_cv_have_utmp is SYSV flavor" >&5
7161 echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
7162 if test "${cf_cv_sysv_utmp+set}" = set; then
7163 echo $ECHO_N "(cached) $ECHO_C" >&6
7164 else
7165
7166 test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
7167 cat >"conftest.$ac_ext" <<_ACEOF
7168 #line 7168 "configure"
7169 #include "confdefs.h"
7170
7171 #include <sys/types.h>
7172 #include <${cf_cv_have_utmp}.h>
7173 int
7174 main (void)
7175 {
7176
7177 struct $cf_cv_have_utmp x;
7178 set${cf_prefix}ent ();
7179 get${cf_prefix}id(&x);
7180 put${cf_prefix}line(&x);
7181 end${cf_prefix}ent();
7182 ;
7183 return 0;
7184 }
7185 _ACEOF
7186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7187 if { (eval echo "$as_me:7187: \"$ac_link\"") >&5
7188 (eval $ac_link) 2>&5
7189 ac_status=$?
7190 echo "$as_me:7190: \$? = $ac_status" >&5
7191 (exit "$ac_status"); } &&
7192 { ac_try='test -s "conftest$ac_exeext"'
7193 { (eval echo "$as_me:7193: \"$ac_try\"") >&5
7194 (eval $ac_try) 2>&5
7195 ac_status=$?
7196 echo "$as_me:7196: \$? = $ac_status" >&5
7197 (exit "$ac_status"); }; }; then
7198 cf_cv_sysv_utmp=yes
7199 else
7200 echo "$as_me: failed program was:" >&5
7201 cat "conftest.$ac_ext" >&5
7202 cf_cv_sysv_utmp=no
7203 fi
7204 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7205
7206 fi
7207 echo "$as_me:7207: result: $cf_cv_sysv_utmp" >&5
7208 echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
7209 test "$cf_cv_sysv_utmp" = yes &&
7210 cat >>confdefs.h <<\EOF
7211 #define USE_SYSV_UTMP 1
7212 EOF
7213
7214 fi
7215
7216 for ac_header in lastlog.h
7217 do
7218 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7219 echo "$as_me:7219: checking for $ac_header" >&5
7220 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7221 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7222 echo $ECHO_N "(cached) $ECHO_C" >&6
7223 else
7224 cat >"conftest.$ac_ext" <<_ACEOF
7225 #line 7225 "configure"
7226 #include "confdefs.h"
7227 #include <$ac_header>
7228 _ACEOF
7229 if { (eval echo "$as_me:7229: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7230 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7231 ac_status=$?
7232 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7233 rm -f conftest.er1
7234 cat conftest.err >&5
7235 echo "$as_me:7235: \$? = $ac_status" >&5
7236 (exit "$ac_status"); } >/dev/null; then
7237 if test -s conftest.err; then
7238 ac_cpp_err=$ac_c_preproc_warn_flag
7239 else
7240 ac_cpp_err=
7241 fi
7242 else
7243 ac_cpp_err=yes
7244 fi
7245 if test -z "$ac_cpp_err"; then
7246 eval "$as_ac_Header=yes"
7247 else
7248 echo "$as_me: failed program was:" >&5
7249 cat "conftest.$ac_ext" >&5
7250 eval "$as_ac_Header=no"
7251 fi
7252 rm -f conftest.err "conftest.$ac_ext"
7253 fi
7254 echo "$as_me:7254: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7255 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7256 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7257 cat >>confdefs.h <<EOF
7258 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7259 EOF
7260
7261 fi
7262 done
7263
7264 echo "$as_me:7264: checking for struct lastlog" >&5
7265 echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
7266 if test "${cf_cv_struct_lastlog+set}" = set; then
7267 echo $ECHO_N "(cached) $ECHO_C" >&6
7268 else
7269
7270 if test "$cross_compiling" = yes; then
7271
7272 cf_cv_struct_lastlog=unknown
7273 else
7274 cat >"conftest.$ac_ext" <<_ACEOF
7275 #line 7275 "configure"
7276 #include "confdefs.h"
7277
7278 $ac_includes_default
7279
7280 #include <time.h>
7281 #include <lastlog.h>
7282
7283 int main(void)
7284 {
7285 struct lastlog data;
7286 return (sizeof(data.ll_time) != sizeof(time_t));
7287 }
7288 _ACEOF
7289 rm -f "conftest$ac_exeext"
7290 if { (eval echo "$as_me:7290: \"$ac_link\"") >&5
7291 (eval $ac_link) 2>&5
7292 ac_status=$?
7293 echo "$as_me:7293: \$? = $ac_status" >&5
7294 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7295 { (eval echo "$as_me:7295: \"$ac_try\"") >&5
7296 (eval $ac_try) 2>&5
7297 ac_status=$?
7298 echo "$as_me:7298: \$? = $ac_status" >&5
7299 (exit "$ac_status"); }; }; then
7300
7301 cf_cv_struct_lastlog=yes
7302 else
7303 echo "$as_me: program exited with status $ac_status" >&5
7304 echo "$as_me: failed program was:" >&5
7305 cat "conftest.$ac_ext" >&5
7306
7307 cf_cv_struct_lastlog=no
7308 fi
7309 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7310 fi
7311 fi
7312 echo "$as_me:7312: result: $cf_cv_struct_lastlog" >&5
7313 echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
7314
7315 test $cf_cv_struct_lastlog != no &&
7316 cat >>confdefs.h <<\EOF
7317 #define USE_STRUCT_LASTLOG 1
7318 EOF
7319
7320 for ac_header in \
7321 sys/param.h \
7322
7323 do
7324 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7325 echo "$as_me:7325: checking for $ac_header" >&5
7326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7328 echo $ECHO_N "(cached) $ECHO_C" >&6
7329 else
7330 cat >"conftest.$ac_ext" <<_ACEOF
7331 #line 7331 "configure"
7332 #include "confdefs.h"
7333 #include <$ac_header>
7334 _ACEOF
7335 if { (eval echo "$as_me:7335: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7336 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7337 ac_status=$?
7338 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7339 rm -f conftest.er1
7340 cat conftest.err >&5
7341 echo "$as_me:7341: \$? = $ac_status" >&5
7342 (exit "$ac_status"); } >/dev/null; then
7343 if test -s conftest.err; then
7344 ac_cpp_err=$ac_c_preproc_warn_flag
7345 else
7346 ac_cpp_err=
7347 fi
7348 else
7349 ac_cpp_err=yes
7350 fi
7351 if test -z "$ac_cpp_err"; then
7352 eval "$as_ac_Header=yes"
7353 else
7354 echo "$as_me: failed program was:" >&5
7355 cat "conftest.$ac_ext" >&5
7356 eval "$as_ac_Header=no"
7357 fi
7358 rm -f conftest.err "conftest.$ac_ext"
7359 fi
7360 echo "$as_me:7360: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7361 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7362 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7363 cat >>confdefs.h <<EOF
7364 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7365 EOF
7366
7367 fi
7368 done
7369
7370 echo "$as_me:7370: checking if POSIX saved-ids are supported" >&5
7371 echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
7372 if test "${cf_cv_posix_saved_ids+set}" = set; then
7373 echo $ECHO_N "(cached) $ECHO_C" >&6
7374 else
7375
7376 cat >"conftest.$ac_ext" <<_ACEOF
7377 #line 7377 "configure"
7378 #include "confdefs.h"
7379
7380 #include <unistd.h>
7381 #ifdef HAVE_SYS_PARAM_H
7382 #include <sys/param.h> /* this may define "BSD" */
7383 #endif
7384
7385 int
7386 main (void)
7387 {
7388
7389 #if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
7390 int (*my_seteuid)(uid_t) = seteuid;
7391 int x = my_seteuid(geteuid());
7392 (void)x;
7393 #elif defined(BSD) && (BSD >= 199103)
7394 /* The BSD's may implement the runtime check - and it fails.
7395 * However, saved-ids work almost like POSIX (close enough for most uses).
7396 */
7397 #else
7398 #error no saved-ids found
7399 #endif
7400
7401 ;
7402 return 0;
7403 }
7404 _ACEOF
7405 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7406 if { (eval echo "$as_me:7406: \"$ac_link\"") >&5
7407 (eval $ac_link) 2>&5
7408 ac_status=$?
7409 echo "$as_me:7409: \$? = $ac_status" >&5
7410 (exit "$ac_status"); } &&
7411 { ac_try='test -s "conftest$ac_exeext"'
7412 { (eval echo "$as_me:7412: \"$ac_try\"") >&5
7413 (eval $ac_try) 2>&5
7414 ac_status=$?
7415 echo "$as_me:7415: \$? = $ac_status" >&5
7416 (exit "$ac_status"); }; }; then
7417 cf_cv_posix_saved_ids=yes
7418
7419 else
7420 echo "$as_me: failed program was:" >&5
7421 cat "conftest.$ac_ext" >&5
7422
7423 if test "$cross_compiling" = yes; then
7424 cf_cv_posix_saved_ids=unknown
7425 else
7426 cat >"conftest.$ac_ext" <<_ACEOF
7427 #line 7427 "configure"
7428 #include "confdefs.h"
7429
7430 $ac_includes_default
7431
7432 int main(void)
7433 {
7434 void *p = (void *) seteuid;
7435 long code = sysconf(_SC_SAVED_IDS);
7436 (void)p;
7437 ${cf_cv_main_return:-return} ((code > 0) ? 0 : 1);
7438 }
7439 _ACEOF
7440 rm -f "conftest$ac_exeext"
7441 if { (eval echo "$as_me:7441: \"$ac_link\"") >&5
7442 (eval $ac_link) 2>&5
7443 ac_status=$?
7444 echo "$as_me:7444: \$? = $ac_status" >&5
7445 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7446 { (eval echo "$as_me:7446: \"$ac_try\"") >&5
7447 (eval $ac_try) 2>&5
7448 ac_status=$?
7449 echo "$as_me:7449: \$? = $ac_status" >&5
7450 (exit "$ac_status"); }; }; then
7451 cf_cv_posix_saved_ids=yes
7452 else
7453 echo "$as_me: program exited with status $ac_status" >&5
7454 echo "$as_me: failed program was:" >&5
7455 cat "conftest.$ac_ext" >&5
7456 cf_cv_posix_saved_ids=no
7457 fi
7458 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7459 fi
7460
7461 fi
7462 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7463
7464 fi
7465 echo "$as_me:7465: result: $cf_cv_posix_saved_ids" >&5
7466 echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
7467
7468 test "$cf_cv_posix_saved_ids" = yes &&
7469 cat >>confdefs.h <<\EOF
7470 #define HAVE_POSIX_SAVED_IDS 1
7471 EOF
7472
7473 # compute a reasonable value for $TERM to give tgetent(), since we may be
7474 # running in 'screen', which sets $TERMCAP to a specific entry that is not
7475 # necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
7476 # discard $TERMCAP.
7477 cf_TERMVAR=vt100
7478 if test -n "$TERMCAP"
7479 then
7480 cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
7481 case "$cf_TERMCAP" in
7482 (screen*.*)
7483 ;;
7484 (*)
7485 cf_TERMVAR="$cf_TERMCAP"
7486 ;;
7487 esac
7488 fi
7489 test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
7490
7491 # BSD termcap used no header file
7492 # SVr4 provided termcap prototypes as a legacy feature in term.h
7493 # GNU termcap provided termcap prototypes in termcap.h
7494 # ncurses provides termcap prototypes in both term.h and termcap.h
7495 #
7496 # The terminfo-based termcap interfaces do not provide a full tgetent (i.e., do
7497 # not return the text of the termcap entry in the buffer), but as a special
7498 # case, FreeBSD provides ncurses' termcap.h with a modified termcap reader that
7499 # returns the termcap text.
7500
7501 for ac_header in termcap.h
7502 do
7503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7504 echo "$as_me:7504: checking for $ac_header" >&5
7505 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7506 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7507 echo $ECHO_N "(cached) $ECHO_C" >&6
7508 else
7509 cat >"conftest.$ac_ext" <<_ACEOF
7510 #line 7510 "configure"
7511 #include "confdefs.h"
7512 #include <$ac_header>
7513 _ACEOF
7514 if { (eval echo "$as_me:7514: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7515 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7516 ac_status=$?
7517 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7518 rm -f conftest.er1
7519 cat conftest.err >&5
7520 echo "$as_me:7520: \$? = $ac_status" >&5
7521 (exit "$ac_status"); } >/dev/null; then
7522 if test -s conftest.err; then
7523 ac_cpp_err=$ac_c_preproc_warn_flag
7524 else
7525 ac_cpp_err=
7526 fi
7527 else
7528 ac_cpp_err=yes
7529 fi
7530 if test -z "$ac_cpp_err"; then
7531 eval "$as_ac_Header=yes"
7532 else
7533 echo "$as_me: failed program was:" >&5
7534 cat "conftest.$ac_ext" >&5
7535 eval "$as_ac_Header=no"
7536 fi
7537 rm -f conftest.err "conftest.$ac_ext"
7538 fi
7539 echo "$as_me:7539: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7540 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7541 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7542 cat >>confdefs.h <<EOF
7543 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7544 EOF
7545
7546 fi
7547 done
7548
7549 cf_termcap_h="\
7550 #ifdef HAVE_TERMCAP_H
7551 #include <termcap.h>
7552 #else
7553 extern int tgetent(char *, const char *);
7554 #endif"
7555
7556 echo "$as_me:7556: checking if we want full tgetent function" >&5
7557 echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
7558
7559 # Check whether --enable-full-tgetent or --disable-full-tgetent was given.
7560 if test "${enable_full_tgetent+set}" = set; then
7561 enableval="$enable_full_tgetent"
7562 test "$enableval" != no && enableval=yes
7563 if test "$enableval" != "yes" ; then
7564 cf_full_tgetent=no
7565 else
7566 cf_full_tgetent=yes
7567 fi
7568 else
7569 enableval=yes
7570 cf_full_tgetent=yes
7571
7572 fi;
7573 echo "$as_me:7573: result: $cf_full_tgetent" >&5
7574 echo "${ECHO_T}$cf_full_tgetent" >&6
7575
7576 if test "$cf_full_tgetent" = yes ; then
7577 cf_test_message="full tgetent"
7578 else
7579 cf_test_message="tgetent"
7580 fi
7581
7582 echo "$as_me:7582: checking for $cf_test_message function" >&5
7583 echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
7584 if test "${cf_cv_lib_tgetent+set}" = set; then
7585 echo $ECHO_N "(cached) $ECHO_C" >&6
7586 else
7587
7588 cf_save_LIBS="$LIBS"
7589 cf_cv_lib_tgetent=no
7590 cf_TERMLIB="termlib ncursesw ncurses curses"
7591 if test "$cf_full_tgetent" = yes ; then
7592 cf_TERMLIB="otermcap termcap $cf_TERMLIB"
7593 cf_TERMTST="buffer[0] == 0"
7594 else
7595 cf_TERMLIB="tinfow tinfo $cf_TERMLIB"
7596 cf_TERMTST="0"
7597 fi
7598 for cf_termlib in '' $cf_TERMLIB ; do
7599 LIBS="$cf_save_LIBS"
7600 test -n "$cf_termlib" && {
7601 cf_add_libs="$LIBS"
7602 # reverse order
7603 cf_add_0lib=
7604 for cf_add_1lib in -l$cf_termlib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7605 # filter duplicates
7606 for cf_add_1lib in $cf_add_0lib; do
7607 for cf_add_2lib in $cf_add_libs; do
7608 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7609 cf_add_1lib=
7610 break
7611 fi
7612 done
7613 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7614 done
7615 LIBS="$cf_add_libs"
7616 }
7617 if test "$cross_compiling" = yes; then
7618 echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
7619 else
7620 cat >"conftest.$ac_ext" <<_ACEOF
7621 #line 7621 "configure"
7622 #include "confdefs.h"
7623
7624 $cf_termcap_h
7625
7626 /* terminfo implementations ignore the buffer argument, making it useless for
7627 * the xterm application, which uses this information to make a new TERMCAP
7628 * environment variable.
7629 */
7630 int main(void)
7631 {
7632 char buffer[1024];
7633 buffer[0] = 0;
7634 tgetent(buffer, "$cf_TERMVAR");
7635 ${cf_cv_main_return:-return} ($cf_TERMTST); }
7636 _ACEOF
7637 rm -f "conftest$ac_exeext"
7638 if { (eval echo "$as_me:7638: \"$ac_link\"") >&5
7639 (eval $ac_link) 2>&5
7640 ac_status=$?
7641 echo "$as_me:7641: \$? = $ac_status" >&5
7642 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7643 { (eval echo "$as_me:7643: \"$ac_try\"") >&5
7644 (eval $ac_try) 2>&5
7645 ac_status=$?
7646 echo "$as_me:7646: \$? = $ac_status" >&5
7647 (exit "$ac_status"); }; }; then
7648 echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
7649 if test -n "$cf_termlib" ; then
7650 cf_cv_lib_tgetent="-l$cf_termlib"
7651 else
7652 cf_cv_lib_tgetent=yes
7653 fi
7654 break
7655 else
7656 echo "$as_me: program exited with status $ac_status" >&5
7657 echo "$as_me: failed program was:" >&5
7658 cat "conftest.$ac_ext" >&5
7659 echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
7660 fi
7661 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7662 fi
7663 done
7664 LIBS="$cf_save_LIBS"
7665
7666 fi
7667 echo "$as_me:7667: result: $cf_cv_lib_tgetent" >&5
7668 echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
7669
7670 # If we found a working tgetent(), set LIBS and check for termcap.h.
7671 # (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
7672 # not have side effects other than setting the cache variable, because
7673 # they are not executed when a cached value exists.)
7674 if test "x$cf_cv_lib_tgetent" != xno ; then
7675 test "x$cf_cv_lib_tgetent" != xyes && {
7676 cf_add_libs="$LIBS"
7677 # reverse order
7678 cf_add_0lib=
7679 for cf_add_1lib in $cf_cv_lib_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7680 # filter duplicates
7681 for cf_add_1lib in $cf_add_0lib; do
7682 for cf_add_2lib in $cf_add_libs; do
7683 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7684 cf_add_1lib=
7685 break
7686 fi
7687 done
7688 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7689 done
7690 LIBS="$cf_add_libs"
7691 }
7692
7693 cat >>confdefs.h <<\EOF
7694 #define USE_TERMCAP 1
7695 EOF
7696
7697 if test "$cf_full_tgetent" = no ; then
7698 cat >"conftest.$ac_ext" <<_ACEOF
7699 #line 7699 "configure"
7700 #include "confdefs.h"
7701
7702 #include <termcap.h>
7703 int
7704 main (void)
7705 {
7706
7707 #ifdef NCURSES_VERSION
7708 #error do not use ncurses termcap.h
7709 #endif
7710 ;
7711 return 0;
7712 }
7713 _ACEOF
7714 rm -f "conftest.$ac_objext"
7715 if { (eval echo "$as_me:7715: \"$ac_compile\"") >&5
7716 (eval $ac_compile) 2>&5
7717 ac_status=$?
7718 echo "$as_me:7718: \$? = $ac_status" >&5
7719 (exit "$ac_status"); } &&
7720 { ac_try='test -s "conftest.$ac_objext"'
7721 { (eval echo "$as_me:7721: \"$ac_try\"") >&5
7722 (eval $ac_try) 2>&5
7723 ac_status=$?
7724 echo "$as_me:7724: \$? = $ac_status" >&5
7725 (exit "$ac_status"); }; }; then
7726 cat >>confdefs.h <<\EOF
7727 #define HAVE_TERMCAP_H 1
7728 EOF
7729
7730 else
7731 echo "$as_me: failed program was:" >&5
7732 cat "conftest.$ac_ext" >&5
7733 fi
7734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7735 fi
7736 else
7737 # If we didn't find a tgetent() that supports the buffer
7738 # argument, look again to see whether we can find even
7739 # a crippled one. A crippled tgetent() is still useful to
7740 # validate values for the TERM environment variable given to
7741 # child processes.
7742 echo "$as_me:7742: checking for partial tgetent function" >&5
7743 echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
7744 if test "${cf_cv_lib_part_tgetent+set}" = set; then
7745 echo $ECHO_N "(cached) $ECHO_C" >&6
7746 else
7747
7748 cf_cv_lib_part_tgetent=no
7749 for cf_termlib in $cf_TERMLIB ; do
7750 LIBS="$cf_save_LIBS -l$cf_termlib"
7751 cat >"conftest.$ac_ext" <<_ACEOF
7752 #line 7752 "configure"
7753 #include "confdefs.h"
7754 $cf_termcap_h
7755 int
7756 main (void)
7757 {
7758 tgetent(0, "$cf_TERMVAR")
7759 ;
7760 return 0;
7761 }
7762 _ACEOF
7763 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7764 if { (eval echo "$as_me:7764: \"$ac_link\"") >&5
7765 (eval $ac_link) 2>&5
7766 ac_status=$?
7767 echo "$as_me:7767: \$? = $ac_status" >&5
7768 (exit "$ac_status"); } &&
7769 { ac_try='test -s "conftest$ac_exeext"'
7770 { (eval echo "$as_me:7770: \"$ac_try\"") >&5
7771 (eval $ac_try) 2>&5
7772 ac_status=$?
7773 echo "$as_me:7773: \$? = $ac_status" >&5
7774 (exit "$ac_status"); }; }; then
7775 echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
7776 cf_cv_lib_part_tgetent="-l$cf_termlib"
7777 break
7778 else
7779 echo "$as_me: failed program was:" >&5
7780 cat "conftest.$ac_ext" >&5
7781 fi
7782 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7783 done
7784 LIBS="$cf_save_LIBS"
7785
7786 fi
7787 echo "$as_me:7787: result: $cf_cv_lib_part_tgetent" >&5
7788 echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
7789
7790 if test "$cf_cv_lib_part_tgetent" != no ; then
7791
7792 cf_add_libs="$LIBS"
7793 # reverse order
7794 cf_add_0lib=
7795 for cf_add_1lib in $cf_cv_lib_part_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7796 # filter duplicates
7797 for cf_add_1lib in $cf_add_0lib; do
7798 for cf_add_2lib in $cf_add_libs; do
7799 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7800 cf_add_1lib=
7801 break
7802 fi
7803 done
7804 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7805 done
7806 LIBS="$cf_add_libs"
7807
7808 # If this is linking against ncurses, we'll trigger the
7809 # ifdef in resize.c that turns the termcap stuff back off.
7810
7811 cat >>confdefs.h <<\EOF
7812 #define USE_TERMINFO 1
7813 EOF
7814
7815 fi
7816 fi
7817
7818 echo "$as_me:7818: checking for X applications class" >&5
7819 echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
7820
7821 # Check whether --with-app-class or --without-app-class was given.
7822 if test "${with_app_class+set}" = set; then
7823 withval="$with_app_class"
7824 APP_CLASS=$withval
7825 else
7826 APP_CLASS=XTerm
7827 fi;
7828
7829 case x$APP_CLASS in
7830 (*[/@,%]*)
7831 { echo "$as_me:7831: WARNING: X applications class cannot contain punctuation" >&5
7832 echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
7833 APP_CLASS=XTerm
7834 ;;
7835 (x[A-Z]*)
7836 ;;
7837 (*)
7838 { echo "$as_me:7838: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
7839 echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
7840 APP_CLASS=XTerm
7841 ;;
7842 esac
7843
7844 echo "$as_me:7844: result: $APP_CLASS" >&5
7845 echo "${ECHO_T}$APP_CLASS" >&6
7846
7847 echo "$as_me:7847: checking for directory to install resource files" >&5
7848 echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
7849
7850 # Check whether --with-app-defaults or --without-app-defaults was given.
7851 if test "${with_app_defaults+set}" = set; then
7852 withval="$with_app_defaults"
7853 APPSDIR=$withval
7854 else
7855 APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7856 fi;
7857
7858 if test "x$APPSDIR" = xauto
7859 then
7860 APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7861 for cf_path in \
7862 /opt/local/share/X11/app-defaults \
7863 /opt/X11/share/X11/app-defaults \
7864 /usr/share/X11/app-defaults \
7865 /usr/X11/share/X11/app-defaults \
7866 /usr/X11/lib/X11/app-defaults \
7867 /usr/lib/X11/app-defaults \
7868 /etc/X11/app-defaults \
7869 /usr/pkg/lib/X11/app-defaults \
7870 /usr/X11R7/lib/X11/app-defaults \
7871 /usr/X11R6/lib/X11/app-defaults \
7872 /usr/X11R5/lib/X11/app-defaults \
7873 /usr/X11R4/lib/X11/app-defaults \
7874 /usr/local/lib/X11/app-defaults \
7875 /usr/local/share/X11/app-defaults \
7876 /usr/lib64/X11/app-defaults
7877 do
7878 if test -d "$cf_path" ; then
7879 APPSDIR="$cf_path"
7880 break
7881 fi
7882 done
7883 else
7884 cf_path=$APPSDIR
7885
7886 if test "x$prefix" != xNONE; then
7887 cf_path_syntax="$prefix"
7888 else
7889 cf_path_syntax="$ac_default_prefix"
7890 fi
7891
7892 case ".$cf_path" in
7893 (.\$\(*\)*|.\'*\'*)
7894 ;;
7895 (..|./*|.\\*)
7896 ;;
7897 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7898 ;;
7899 (.\$\{*prefix\}*|.\$\{*dir\}*)
7900 eval cf_path="$cf_path"
7901 case ".$cf_path" in
7902 (.NONE/*)
7903 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7904 ;;
7905 esac
7906 ;;
7907 (.no|.NONE/*)
7908 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7909 ;;
7910 (*)
7911 { { echo "$as_me:7911: error: expected a pathname, not \"$cf_path\"" >&5
7912 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7913 { (exit 1); exit 1; }; }
7914 ;;
7915 esac
7916
7917 fi
7918
7919 echo "$as_me:7919: result: $APPSDIR" >&5
7920 echo "${ECHO_T}$APPSDIR" >&6
7921
7922 no_appsdir=
7923 if test "$APPSDIR" = no
7924 then
7925 no_appsdir="#"
7926 else
7927 EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
7928 fi
7929
7930 echo "$as_me:7930: checking for the icon name" >&5
7931 echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
7932
7933 # Check whether --with-icon-name or --without-icon-name was given.
7934 if test "${with_icon_name+set}" = set; then
7935 withval="$with_icon_name"
7936 ICON_NAME="$withval"
7937 else
7938 ICON_NAME=mini.xterm
7939 fi;
7940 case "x$ICON_NAME" in
7941 (xyes|xno|x)
7942 ICON_NAME=mini.xterm
7943 ;;
7944 esac
7945
7946 echo "$as_me:7946: result: $ICON_NAME" >&5
7947 echo "${ECHO_T}$ICON_NAME" >&6
7948
7949 echo "$as_me:7949: checking for icon symlink to use" >&5
7950 echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
7951
7952 # Check whether --with-icon-symlink or --without-icon-symlink was given.
7953 if test "${with_icon_symlink+set}" = set; then
7954 withval="$with_icon_symlink"
7955 ICON_SYMLINK="$withval"
7956 else
7957 ICON_SYMLINK=NONE
7958 fi;
7959 case "x$ICON_SYMLINK" in
7960 (xyes)
7961 ICON_SYMLINK=xterm
7962 ;;
7963 (xno|x)
7964 ICON_SYMLINK=NONE
7965 ;;
7966 esac
7967
7968 echo "$as_me:7968: result: $ICON_SYMLINK" >&5
7969 echo "${ECHO_T}$ICON_SYMLINK" >&6
7970
7971 # Install all icons except for the overused "terminal".
7972 cf_cv_icon_list=
7973 for my_item in $srcdir/icons/*.svg
7974 do
7975 test -f "$my_item" || continue
7976 cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
7977 case $cf_icon_name in
7978 (*_48x48)
7979 continue
7980 ;;
7981 esac
7982 test -n "$verbose" && echo " adding $cf_icon_name to icon-list" 1>&6
7983
7984 echo "${as_me:-configure}:7984: testing adding $cf_icon_name to icon-list ..." 1>&5
7985
7986 cf_cv_icon_list="$cf_cv_icon_list $cf_icon_name"
7987 if test -f "${cf_icon_name}_48x48.png"
7988 then
7989 test -n "$verbose" && echo " adding ${cf_icon_name}_48x48 to icon-list" 1>&6
7990
7991 echo "${as_me:-configure}:7991: testing adding ${cf_icon_name}_48x48 to icon-list ..." 1>&5
7992
7993 cf_cv_icon_list="$cf_cv_icon_list ${cf_icon_name}_48x48"
7994 fi
7995 done
7996
7997 echo "$as_me:7997: checking for directory to install pixmaps" >&5
7998 echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
7999
8000 # Check whether --with-pixmapdir or --without-pixmapdir was given.
8001 if test "${with_pixmapdir+set}" = set; then
8002 withval="$with_pixmapdir"
8003 PIXMAPDIR=$withval
8004 else
8005 test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
8006 fi;
8007
8008 if test "x$PIXMAPDIR" = xauto
8009 then
8010 PIXMAPDIR='${datadir}/pixmaps'
8011 for cf_path in \
8012 /usr/share/pixmaps \
8013 /usr/X11R6/share/pixmaps
8014 do
8015 if test -d "$cf_path" ; then
8016 PIXMAPDIR="$cf_path"
8017 break
8018 fi
8019 done
8020 else
8021 cf_path=$PIXMAPDIR
8022
8023 if test "x$prefix" != xNONE; then
8024 cf_path_syntax="$prefix"
8025 else
8026 cf_path_syntax="$ac_default_prefix"
8027 fi
8028
8029 case ".$cf_path" in
8030 (.\$\(*\)*|.\'*\'*)
8031 ;;
8032 (..|./*|.\\*)
8033 ;;
8034 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8035 ;;
8036 (.\$\{*prefix\}*|.\$\{*dir\}*)
8037 eval cf_path="$cf_path"
8038 case ".$cf_path" in
8039 (.NONE/*)
8040 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
8041 ;;
8042 esac
8043 ;;
8044 (.no|.NONE/*)
8045 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
8046 ;;
8047 (*)
8048 { { echo "$as_me:8048: error: expected a pathname, not \"$cf_path\"" >&5
8049 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
8050 { (exit 1); exit 1; }; }
8051 ;;
8052 esac
8053
8054 fi
8055 echo "$as_me:8055: result: $PIXMAPDIR" >&5
8056 echo "${ECHO_T}$PIXMAPDIR" >&6
8057
8058 no_pixmapdir=
8059 if test "$PIXMAPDIR" = no
8060 then
8061 no_pixmapdir="#"
8062 else
8063 EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
8064 fi
8065
8066 echo "$as_me:8066: checking for directory to install icons" >&5
8067 echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
8068
8069 # Check whether --with-icondir or --without-icondir was given.
8070 if test "${with_icondir+set}" = set; then
8071 withval="$with_icondir"
8072 ICONDIR=$withval
8073 else
8074 test -z "$ICONDIR" && ICONDIR=no
8075 fi;
8076
8077 if test "x$ICONDIR" = xauto
8078 then
8079 ICONDIR='${datadir}/icons'
8080 for cf_path in \
8081 /usr/share/icons \
8082 /usr/X11R6/share/icons
8083 do
8084 if test -d "$cf_path" ; then
8085 ICONDIR="$cf_path"
8086 break
8087 fi
8088 done
8089 else
8090 cf_path=$ICONDIR
8091
8092 if test "x$prefix" != xNONE; then
8093 cf_path_syntax="$prefix"
8094 else
8095 cf_path_syntax="$ac_default_prefix"
8096 fi
8097
8098 case ".$cf_path" in
8099 (.\$\(*\)*|.\'*\'*)
8100 ;;
8101 (..|./*|.\\*)
8102 ;;
8103 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8104 ;;
8105 (.\$\{*prefix\}*|.\$\{*dir\}*)
8106 eval cf_path="$cf_path"
8107 case ".$cf_path" in
8108 (.NONE/*)
8109 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
8110 ;;
8111 esac
8112 ;;
8113 (.no|.NONE/*)
8114 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
8115 ;;
8116 (*)
8117 { { echo "$as_me:8117: error: expected a pathname, not \"$cf_path\"" >&5
8118 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
8119 { (exit 1); exit 1; }; }
8120 ;;
8121 esac
8122
8123 fi
8124 echo "$as_me:8124: result: $ICONDIR" >&5
8125 echo "${ECHO_T}$ICONDIR" >&6
8126
8127 no_icondir=
8128 if test "$ICONDIR" = no
8129 then
8130 no_icondir="#"
8131 else
8132 EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
8133 fi
8134
8135 echo "$as_me:8135: checking if icon theme should be used" >&5
8136 echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
8137
8138 # Check whether --with-icon-theme or --without-icon-theme was given.
8139 if test "${with_icon_theme+set}" = set; then
8140 withval="$with_icon_theme"
8141 ICON_THEME=$withval
8142 else
8143 ICON_THEME=no
8144 fi;
8145
8146 case "x$ICON_THEME" in
8147 (xno)
8148 ;;
8149 (x|xyes)
8150 ICON_THEME=hicolor
8151 ;;
8152 esac
8153 echo "$as_me:8153: result: $ICON_THEME" >&5
8154 echo "${ECHO_T}$ICON_THEME" >&6
8155
8156 if test "x$ICON_THEME" = xno
8157 then
8158 if test "x$ICONDIR" != xno
8159 then
8160 test -n "$verbose" && echo " ignoring icondir without theme" 1>&6
8161
8162 echo "${as_me:-configure}:8162: testing ignoring icondir without theme ..." 1>&5
8163
8164 no_icondir="#"
8165 fi
8166 else
8167 if test "x$ICONDIR" = xno
8168 then
8169 { { echo "$as_me:8169: error: icondir must be set for icon theme" >&5
8170 echo "$as_me: error: icondir must be set for icon theme" >&2;}
8171 { (exit 1); exit 1; }; }
8172 fi
8173 fi
8174
8175 : ${ICON_FORMAT:=".svg .png .xpm"}
8176
8177 ICON_LIST=
8178
8179 if test "x$ICON_THEME" != xno
8180 then
8181 cf_icon_list="$cf_cv_icon_list"
8182 else
8183 cf_icon_list="icons/${ICON_NAME}_48x48"
8184 fi
8185
8186 echo "$as_me:8186: checking for icon(s) to install" >&5
8187 echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
8188 for cf_name in $cf_icon_list
8189 do
8190 test -n "$verbose" && echo " using $ICON_FORMAT" 1>&6
8191
8192 echo "${as_me:-configure}:8192: testing using $ICON_FORMAT ..." 1>&5
8193
8194 for cf_suffix in $ICON_FORMAT
8195 do
8196 cf_icon="${cf_name}${cf_suffix}"
8197 cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
8198 if test ! -f "${cf_left}"
8199 then
8200 if test "x$srcdir" != "x."
8201 then
8202 cf_icon="${srcdir}/${cf_left}"
8203 cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
8204 if test ! -f "${cf_left}"
8205 then
8206 continue
8207 fi
8208 else
8209 continue
8210 fi
8211 fi
8212 if test "x$ICON_THEME" != xno
8213 then
8214 cf_base=`basename "$cf_left"`
8215 cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
8216 case "x${cf_base}" in
8217 (*:*)
8218 cf_next=$cf_base
8219 # user-defined mapping
8220 ;;
8221 (*.png)
8222 cf_size=`file "$cf_left"|sed -e 's/^[^:]*://' -e 's/^.*[^0-9]\([0-9][0-9]* x [0-9][0-9]*\)[^0-9].*$/\1/' -e 's/ //g'`
8223 if test -z "$cf_size"
8224 then
8225 { echo "$as_me:8225: WARNING: cannot determine size of $cf_left" >&5
8226 echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
8227 continue
8228 fi
8229 cf_next="$cf_size/apps/$cf_trim"
8230 ;;
8231 (*.svg)
8232 cf_next="scalable/apps/$cf_trim"
8233 ;;
8234 (*.xpm)
8235 test -n "$verbose" && echo " ignored XPM file in icon theme" 1>&6
8236
8237 echo "${as_me:-configure}:8237: testing ignored XPM file in icon theme ..." 1>&5
8238
8239 continue
8240 ;;
8241 (*_[0-9][0-9]*x[0-9][0-9]*.*)
8242 cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
8243 cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
8244 cf_next="$cf_size/apps/$cf_base"
8245 ;;
8246 esac
8247 test -n "$verbose" && echo " adding $cf_next" 1>&6
8248
8249 echo "${as_me:-configure}:8249: testing adding $cf_next ..." 1>&5
8250
8251 cf_icon="${cf_icon}:${cf_next}"
8252 fi
8253 test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
8254 ICON_LIST="$ICON_LIST${cf_icon}"
8255 if test -z "$ICON_NAME"
8256 then
8257 ICON_NAME=`basename "$cf_icon" | sed -e 's/[.:].*//'`
8258 fi
8259 done
8260 done
8261
8262 if test -n "$verbose"
8263 then
8264 echo "$as_me:8264: checking result" >&5
8265 echo $ECHO_N "checking result... $ECHO_C" >&6
8266 fi
8267 echo "$as_me:8267: result: $ICON_LIST" >&5
8268 echo "${ECHO_T}$ICON_LIST" >&6
8269
8270 if test -z "$ICON_LIST"
8271 then
8272 { { echo "$as_me:8272: error: no icons found" >&5
8273 echo "$as_me: error: no icons found" >&2;}
8274 { (exit 1); exit 1; }; }
8275 fi
8276
8277 echo "$as_me:8277: checking for icon name" >&5
8278 echo $ECHO_N "checking for icon name... $ECHO_C" >&6
8279 echo "$as_me:8279: result: $ICON_NAME" >&5
8280 echo "${ECHO_T}$ICON_NAME" >&6
8281
8282 # Comment-out the install-desktop rule if the desktop-utils are not found.
8283 echo "$as_me:8283: checking if you want to install desktop files" >&5
8284 echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
8285
8286 # Check whether --enable-desktop or --disable-desktop was given.
8287 if test "${enable_desktop+set}" = set; then
8288 enableval="$enable_desktop"
8289 test "$enableval" != no && enableval=yes
8290 if test "$enableval" != "yes" ; then
8291 enable_desktop=$enableval
8292 else
8293 enable_desktop=$enableval
8294 fi
8295 else
8296 enableval=yes
8297 enable_desktop=$enableval
8298
8299 fi;
8300 echo "$as_me:8300: result: $enable_desktop" >&5
8301 echo "${ECHO_T}$enable_desktop" >&6
8302
8303 desktop_utils=
8304 if test "$enable_desktop" = yes ; then
8305 # Extract the first word of "desktop-file-install", so it can be a program name with args.
8306 set dummy desktop-file-install; ac_word=$2
8307 echo "$as_me:8307: checking for $ac_word" >&5
8308 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8309 if test "${ac_cv_prog_desktop_utils+set}" = set; then
8310 echo $ECHO_N "(cached) $ECHO_C" >&6
8311 else
8312 if test -n "$desktop_utils"; then
8313 ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
8314 else
8315 ac_save_IFS=$IFS; IFS=$ac_path_separator
8316 ac_dummy="$PATH"
8317 for ac_dir in $ac_dummy; do
8318 IFS=$ac_save_IFS
8319 test -z "$ac_dir" && ac_dir=.
8320 $as_executable_p "$ac_dir/$ac_word" || continue
8321 ac_cv_prog_desktop_utils="yes"
8322 echo "$as_me:8322: found $ac_dir/$ac_word" >&5
8323 break
8324 done
8325
8326 test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
8327 fi
8328 fi
8329 desktop_utils=$ac_cv_prog_desktop_utils
8330 if test -n "$desktop_utils"; then
8331 echo "$as_me:8331: result: $desktop_utils" >&5
8332 echo "${ECHO_T}$desktop_utils" >&6
8333 else
8334 echo "$as_me:8334: result: no" >&5
8335 echo "${ECHO_T}no" >&6
8336 fi
8337
8338 fi
8339
8340 test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
8341
8342 if test -z "$desktop_utils"
8343 then
8344 echo "$as_me:8344: checking for requested desktop-category" >&5
8345 echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
8346
8347 # Check whether --with-desktop-category or --without-desktop-category was given.
8348 if test "${with_desktop_category+set}" = set; then
8349 withval="$with_desktop_category"
8350 cf_desktop_want=$withval
8351 else
8352 cf_desktop_want=auto
8353 fi;
8354 echo "$as_me:8354: result: $cf_desktop_want" >&5
8355 echo "${ECHO_T}$cf_desktop_want" >&6
8356
8357 if test "$cf_desktop_want" = auto
8358 then
8359 rm -rf conftest*
8360 cf_desktop_also=
8361 for cf_desktop_dir in \
8362 /usr/share/app-install \
8363 /usr/share/applications
8364 do
8365 if test -d $cf_desktop_dir
8366 then
8367 find $cf_desktop_dir -name '*.desktop' | \
8368 while true
8369 do
8370 read cf_desktop_path
8371 test -z "$cf_desktop_path" && break
8372 cf_desktop_name=`basename "$cf_desktop_path" .desktop`
8373 case $cf_desktop_name in
8374 (xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
8375 test -n "$verbose" && echo " inspect $cf_desktop_path" 1>&6
8376
8377 echo "${as_me:-configure}:8377: testing inspect $cf_desktop_path ..." 1>&5
8378
8379 ${EGREP-egrep} '^Categories=' "$cf_desktop_path" | \
8380 tr ';' '\n' | \
8381 sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
8382 ;;
8383 esac
8384 done
8385 fi
8386 done
8387 if test -s conftest.1
8388 then
8389 cf_desktop_last=
8390 sort conftest.1 | \
8391 while true
8392 do
8393 read cf_desktop_this
8394 test -z "$cf_desktop_this" && break
8395 if test -s conftest.2
8396 then
8397 grep -w "$cf_desktop_this" conftest.2 >/dev/null && continue
8398 elif test -s conftest.3
8399 then
8400 grep -w "$cf_desktop_this" conftest.3 >/dev/null && continue
8401 fi
8402 case "$cf_desktop_this" in
8403 (-*)
8404 ;;
8405 (Qt*|*Xfce*|*[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
8406 test -n "$verbose" && echo " ignored $cf_desktop_this" 1>&6
8407
8408 echo "${as_me:-configure}:8408: testing ignored $cf_desktop_this ..." 1>&5
8409
8410 echo "$cf_desktop_this" >> conftest.3
8411 ;;
8412 (System|TerminalEmulator|*)
8413 test -n "$verbose" && echo " applied $cf_desktop_this" 1>&6
8414
8415 echo "${as_me:-configure}:8415: testing applied $cf_desktop_this ..." 1>&5
8416
8417 test "x$cf_desktop_last" != "x$cf_desktop_this" && echo "$cf_desktop_this" >>conftest.2
8418 ;;
8419 esac
8420 cf_desktop_last=$cf_desktop_this
8421 done
8422 cf_desktop_want="`tr '\n' ';' < conftest.2`"
8423 fi
8424 if test -n "$cf_desktop_want"
8425 then
8426 if test "$cf_desktop_want" = auto
8427 then
8428 cf_desktop_want=
8429 else
8430 # do a sanity check on the semicolon-separated list, ignore on failure
8431 cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
8432 test -z "$cf_desktop_test" && cf_desktop_want=
8433 cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
8434 test -z "$cf_desktop_test" && cf_desktop_want=
8435 fi
8436 fi
8437 if test -z "$cf_desktop_want"
8438 then
8439 cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
8440 test -n "$verbose" && echo " no usable value found for desktop category" 1>&6
8441
8442 echo "${as_me:-configure}:8442: testing no usable value found for desktop category ..." 1>&5
8443
8444 fi
8445 fi
8446 DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
8447 test -n "$verbose" && echo " will use Categories=$DESKTOP_CATEGORY" 1>&6
8448
8449 echo "${as_me:-configure}:8449: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
8450
8451 fi
8452
8453 echo "$as_me:8453: checking for install-permissions reference" >&5
8454 echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
8455
8456 # Check whether --with-reference or --without-reference was given.
8457 if test "${with_reference+set}" = set; then
8458 withval="$with_reference"
8459 with_reference=$withval
8460 else
8461 with_reference=xterm
8462 fi;
8463 echo "$as_me:8463: result: $with_reference" >&5
8464 echo "${ECHO_T}$with_reference" >&6
8465
8466 with_full_paths=yes
8467
8468 echo "$as_me:8468: checking for PATH separator" >&5
8469 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
8470 case "$cf_cv_system_name" in
8471 (os2*) PATH_SEPARATOR=';' ;;
8472 (*) ${PATH_SEPARATOR:=':'} ;;
8473 esac
8474
8475 echo "$as_me:8475: result: $PATH_SEPARATOR" >&5
8476 echo "${ECHO_T}$PATH_SEPARATOR" >&6
8477
8478 test -z "$XTERM_PATH" && XTERM_PATH="$with_reference"
8479 for ac_prog in $XTERM_PATH $with_reference
8480 do
8481 # Extract the first word of "$ac_prog", so it can be a program name with args.
8482 set dummy $ac_prog; ac_word=$2
8483 echo "$as_me:8483: checking for $ac_word" >&5
8484 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8485 if test "${ac_cv_path_XTERM_PATH+set}" = set; then
8486 echo $ECHO_N "(cached) $ECHO_C" >&6
8487 else
8488 case $XTERM_PATH in
8489 [\\/]* | ?:[\\/]*)
8490 ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
8491 ;;
8492 *)
8493 ac_save_IFS=$IFS; IFS=$ac_path_separator
8494 ac_dummy="$PATH"
8495 for ac_dir in $ac_dummy; do
8496 IFS=$ac_save_IFS
8497 test -z "$ac_dir" && ac_dir=.
8498 if $as_executable_p "$ac_dir/$ac_word"; then
8499 ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
8500 echo "$as_me:8500: found $ac_dir/$ac_word" >&5
8501 break
8502 fi
8503 done
8504
8505 ;;
8506 esac
8507 fi
8508 XTERM_PATH=$ac_cv_path_XTERM_PATH
8509
8510 if test -n "$XTERM_PATH"; then
8511 echo "$as_me:8511: result: $XTERM_PATH" >&5
8512 echo "${ECHO_T}$XTERM_PATH" >&6
8513 else
8514 echo "$as_me:8514: result: no" >&5
8515 echo "${ECHO_T}no" >&6
8516 fi
8517
8518 test -n "$XTERM_PATH" && break
8519 done
8520 test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
8521
8522 cf_path_prog=""
8523 cf_path_args=""
8524 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8525 for cf_temp in $ac_cv_path_XTERM_PATH
8526 do
8527 if test -z "$cf_path_prog" ; then
8528 if test "$with_full_paths" = yes ; then
8529
8530 if test "x$prefix" != xNONE; then
8531 cf_path_syntax="$prefix"
8532 else
8533 cf_path_syntax="$ac_default_prefix"
8534 fi
8535
8536 case ".$cf_temp" in
8537 (.\$\(*\)*|.\'*\'*)
8538 ;;
8539 (..|./*|.\\*)
8540 ;;
8541 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8542 ;;
8543 (.\$\{*prefix\}*|.\$\{*dir\}*)
8544 eval cf_temp="$cf_temp"
8545 case ".$cf_temp" in
8546 (.NONE/*)
8547 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8548 ;;
8549 esac
8550 ;;
8551 (.no|.NONE/*)
8552 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8553 ;;
8554 (*)
8555 break
8556 ;;
8557 esac
8558
8559 cf_path_prog="$cf_temp"
8560 else
8561 cf_path_prog="`basename "$cf_temp"`"
8562 fi
8563 elif test -z "$cf_path_args" ; then
8564 cf_path_args="$cf_temp"
8565 else
8566 cf_path_args="$cf_path_args $cf_temp"
8567 fi
8568 done
8569 IFS="$cf_save_ifs"
8570
8571 if test -n "$cf_path_prog" ; then
8572
8573 echo "${as_me:-configure}:8573: testing defining path for ${cf_path_prog} ..." 1>&5
8574
8575 cat >>confdefs.h <<EOF
8576 #define XTERM_PATH_PATH "$cf_path_prog"
8577 EOF
8578
8579 test -n "$cf_path_args" &&
8580 cat >>confdefs.h <<EOF
8581 #define XTERM_PATH_ARGS "$cf_path_args"
8582 EOF
8583
8584 fi
8585
8586 # If any of --program-prefix, --program-suffix or --program-transform-name is
8587 # given, accept an option tell the makefile to create a symbolic link, e.g.,
8588 # to "xterm" on install.
8589 XTERM_SYMLINK=NONE
8590
8591 if test "$program_transform_name" != "'s,,,'" ; then
8592 cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
8593 cf_name=`echo xterm |sed -e "$cf_name"`
8594 echo "$as_me:8594: checking for symbolic link to create to $cf_name" >&5
8595 echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
8596
8597 # Check whether --with-xterm-symlink or --without-xterm-symlink was given.
8598 if test "${with_xterm_symlink+set}" = set; then
8599 withval="$with_xterm_symlink"
8600 with_symlink=$withval
8601 else
8602 with_symlink=xterm
8603 fi;
8604 echo "$as_me:8604: result: $with_symlink" >&5
8605 echo "${ECHO_T}$with_symlink" >&6
8606 test "$with_symlink" = yes && with_symlink=xterm
8607 test -n "$with_symlink" && \
8608 test "$with_symlink" != no && \
8609 test "$with_symlink" != "$cf_name" && \
8610 XTERM_SYMLINK="$with_symlink"
8611 fi
8612
8613 echo "$as_me:8613: checking if you want to disable openpty" >&5
8614 echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
8615
8616 # Check whether --enable-openpty or --disable-openpty was given.
8617 if test "${enable_openpty+set}" = set; then
8618 enableval="$enable_openpty"
8619 test "$enableval" != no && enableval=yes
8620 if test "$enableval" != "yes" ; then
8621 disable_openpty=yes
8622 else
8623 disable_openpty=no
8624 fi
8625 else
8626 enableval=yes
8627 disable_openpty=no
8628
8629 fi;
8630 echo "$as_me:8630: result: $disable_openpty" >&5
8631 echo "${ECHO_T}$disable_openpty" >&6
8632
8633 echo "$as_me:8633: checking if you want to disable setuid" >&5
8634 echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
8635
8636 # Check whether --enable-setuid or --disable-setuid was given.
8637 if test "${enable_setuid+set}" = set; then
8638 enableval="$enable_setuid"
8639 test "$enableval" != no && enableval=yes
8640 if test "$enableval" != "yes" ; then
8641 disable_setuid=yes
8642 else
8643 disable_setuid=no
8644 fi
8645 else
8646 enableval=yes
8647 disable_setuid=no
8648
8649 fi;
8650 echo "$as_me:8650: result: $disable_setuid" >&5
8651 echo "${ECHO_T}$disable_setuid" >&6
8652
8653 echo "$as_me:8653: checking if you want to disable setgid" >&5
8654 echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
8655
8656 # Check whether --enable-setgid or --disable-setgid was given.
8657 if test "${enable_setgid+set}" = set; then
8658 enableval="$enable_setgid"
8659 test "$enableval" != no && enableval=yes
8660 if test "$enableval" != "yes" ; then
8661 disable_setgid=yes
8662 else
8663 disable_setgid=no
8664 fi
8665 else
8666 enableval=yes
8667 disable_setgid=no
8668
8669 fi;
8670 echo "$as_me:8670: result: $disable_setgid" >&5
8671 echo "${ECHO_T}$disable_setgid" >&6
8672
8673 echo "$as_me:8673: checking if you want to run xterm setuid to a given user" >&5
8674 echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
8675
8676 # Check whether --with-setuid or --without-setuid was given.
8677 if test "${with_setuid+set}" = set; then
8678 withval="$with_setuid"
8679 use_given_setuid=$withval
8680 else
8681 use_given_setuid=no
8682 fi;
8683 echo "$as_me:8683: result: $use_given_setuid" >&5
8684 echo "${ECHO_T}$use_given_setuid" >&6
8685
8686 if test "$use_given_setuid" != no ; then
8687 if test "$use_given_setuid" = yes ; then
8688 cf_cv_given_setuid=root
8689 else
8690 cf_cv_given_setuid=$use_given_setuid
8691 fi
8692 # inherit SINSTALL_OPTS from environment to allow packager to customize it.
8693 SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
8694 fi
8695
8696 echo "$as_me:8696: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
8697 echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
8698
8699 # Check whether --with-utmp-setgid or --without-utmp-setgid was given.
8700 if test "${with_utmp_setgid+set}" = set; then
8701 withval="$with_utmp_setgid"
8702 use_utmp_setgid=$withval
8703 else
8704 use_utmp_setgid=no
8705 fi;
8706 echo "$as_me:8706: result: $use_utmp_setgid" >&5
8707 echo "${ECHO_T}$use_utmp_setgid" >&6
8708
8709 if test "$use_utmp_setgid" != no ; then
8710 if test "$use_utmp_setgid" = yes ; then
8711
8712 if test $cf_cv_have_utmp != no ; then
8713 echo "$as_me:8713: checking for utmp/utmpx group" >&5
8714 echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
8715 if test "${cf_cv_utmp_group+set}" = set; then
8716 echo $ECHO_N "(cached) $ECHO_C" >&6
8717 else
8718
8719 for cf_utmp_path in /var/adm /var/run
8720 do
8721 for cf_utmp_file in utmpx utmp
8722 do
8723 if test -f $cf_utmp_path/$cf_utmp_file
8724 then
8725 cf_cv_utmp_group=root
8726
8727 cf_option="-lL"
8728
8729 # Expect listing to have fields like this:
8730 #-r--r--r-- 1 user group 34293 Jul 18 16:29 pathname
8731 ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8732 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8733 if test -z "$cf_rest" ; then
8734 cf_option="${cf_option}g"
8735 ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8736 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8737 fi
8738 rm -f conftest
8739
8740 # If we have a pathname, and the date fields look right, assume we've
8741 # captured the group as well.
8742 if test -n "$cf_rest" ; then
8743 cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
8744 if test -z "$cf_test" ; then
8745 cf_cv_utmp_group=$cf_grp;
8746 fi
8747 fi
8748 break
8749 fi
8750 done
8751 test -n "$cf_cv_utmp_group" && break
8752 done
8753
8754 fi
8755 echo "$as_me:8755: result: $cf_cv_utmp_group" >&5
8756 echo "${ECHO_T}$cf_cv_utmp_group" >&6
8757 else
8758 { { echo "$as_me:8758: error: cannot find utmp group" >&5
8759 echo "$as_me: error: cannot find utmp group" >&2;}
8760 { (exit 1); exit 1; }; }
8761 fi
8762
8763 else
8764 cf_cv_utmp_group=$use_utmp_setgid
8765 fi
8766 if test "$cf_cv_posix_saved_ids" != yes ; then
8767 { { echo "$as_me:8767: error: Your system does not support POSIX saved-ids" >&5
8768 echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
8769 { (exit 1); exit 1; }; }
8770 fi
8771
8772 cat >>confdefs.h <<\EOF
8773 #define USE_UTMP_SETGID 1
8774 EOF
8775
8776 SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
8777 fi
8778
8779 echo "$as_me:8779: checking if you want to link with utempter" >&5
8780 echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
8781
8782 # Check whether --with-utempter or --without-utempter was given.
8783 if test "${with_utempter+set}" = set; then
8784 withval="$with_utempter"
8785 use_utempter=$withval
8786 else
8787 use_utempter=no
8788 fi;
8789 echo "$as_me:8789: result: $use_utempter" >&5
8790 echo "${ECHO_T}$use_utempter" >&6
8791
8792 if test "$use_utempter" = yes ; then
8793
8794 echo "$as_me:8794: checking if we can link with utempter library" >&5
8795 echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
8796 if test "${cf_cv_have_utempter+set}" = set; then
8797 echo $ECHO_N "(cached) $ECHO_C" >&6
8798 else
8799
8800 cf_save_LIBS="$LIBS"
8801
8802 cf_add_libs="$LIBS"
8803 # reverse order
8804 cf_add_0lib=
8805 for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8806 # filter duplicates
8807 for cf_add_1lib in $cf_add_0lib; do
8808 for cf_add_2lib in $cf_add_libs; do
8809 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8810 cf_add_1lib=
8811 break
8812 fi
8813 done
8814 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8815 done
8816 LIBS="$cf_add_libs"
8817
8818 cat >"conftest.$ac_ext" <<_ACEOF
8819 #line 8819 "configure"
8820 #include "confdefs.h"
8821
8822 #include <utempter.h>
8823
8824 int
8825 main (void)
8826 {
8827
8828 addToUtmp("/dev/tty", 0, 1);
8829 removeFromUtmp();
8830
8831 ;
8832 return 0;
8833 }
8834 _ACEOF
8835 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8836 if { (eval echo "$as_me:8836: \"$ac_link\"") >&5
8837 (eval $ac_link) 2>&5
8838 ac_status=$?
8839 echo "$as_me:8839: \$? = $ac_status" >&5
8840 (exit "$ac_status"); } &&
8841 { ac_try='test -s "conftest$ac_exeext"'
8842 { (eval echo "$as_me:8842: \"$ac_try\"") >&5
8843 (eval $ac_try) 2>&5
8844 ac_status=$?
8845 echo "$as_me:8845: \$? = $ac_status" >&5
8846 (exit "$ac_status"); }; }; then
8847
8848 cf_cv_have_utempter=yes
8849 else
8850 echo "$as_me: failed program was:" >&5
8851 cat "conftest.$ac_ext" >&5
8852
8853 cf_cv_have_utempter=no
8854 fi
8855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8856 LIBS="$cf_save_LIBS"
8857
8858 fi
8859 echo "$as_me:8859: result: $cf_cv_have_utempter" >&5
8860 echo "${ECHO_T}$cf_cv_have_utempter" >&6
8861 if test "$cf_cv_have_utempter" = yes ; then
8862
8863 cat >>confdefs.h <<\EOF
8864 #define USE_UTEMPTER 1
8865 EOF
8866
8867 cf_add_libs="$LIBS"
8868 # reverse order
8869 cf_add_0lib=
8870 for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8871 # filter duplicates
8872 for cf_add_1lib in $cf_add_0lib; do
8873 for cf_add_2lib in $cf_add_libs; do
8874 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8875 cf_add_1lib=
8876 break
8877 fi
8878 done
8879 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8880 done
8881 LIBS="$cf_add_libs"
8882
8883 fi
8884
8885 test "$cf_cv_have_utempter" != yes && use_utempter=no
8886 else
8887 use_utempter=no
8888 fi
8889
8890 # Some configurations permit (or require) either setuid or setgid mode.
8891 # Let the user decide.
8892 if test "$use_utempter" = yes ; then
8893 if test "${enable_setuid+set}" != set ; then
8894 disable_setuid=yes
8895 test -n "$verbose" && echo " No --disable-setuid option given, force to yes" 1>&6
8896
8897 echo "${as_me:-configure}:8897: testing No --disable-setuid option given, force to yes ..." 1>&5
8898
8899 fi
8900 fi
8901
8902 # We use these for the manpage:
8903
8904 # Check whether --with-utmp-path or --without-utmp-path was given.
8905 if test "${with_utmp_path+set}" = set; then
8906 withval="$with_utmp_path"
8907 cf_utmp_path=$withval
8908 else
8909 cf_utmp_path=auto
8910 fi;
8911 if test "$cf_utmp_path" = auto ; then
8912 for cf_utmp_path in /etc/utmp /var/adm/utmp /var/log/utmp /var/run/utmp
8913 do
8914 if test -f ${cf_utmp_path}x ; then
8915 cf_utmp_path=${cf_utmp_path}x
8916 break
8917 elif test -f $cf_utmp_path ; then
8918 break
8919 fi
8920 done
8921 else
8922
8923 if test "x$prefix" != xNONE; then
8924 cf_path_syntax="$prefix"
8925 else
8926 cf_path_syntax="$ac_default_prefix"
8927 fi
8928
8929 case ".$cf_utmp_path" in
8930 (.\$\(*\)*|.\'*\'*)
8931 ;;
8932 (..|./*|.\\*)
8933 ;;
8934 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8935 ;;
8936 (.\$\{*prefix\}*|.\$\{*dir\}*)
8937 eval cf_utmp_path="$cf_utmp_path"
8938 case ".$cf_utmp_path" in
8939 (.NONE/*)
8940 cf_utmp_path=`echo "$cf_utmp_path" | sed -e s%NONE%$cf_path_syntax%`
8941 ;;
8942 esac
8943 ;;
8944 (.no|.NONE/*)
8945 cf_utmp_path=`echo "$cf_utmp_path" | sed -e s%NONE%$cf_path_syntax%`
8946 ;;
8947 (*)
8948 { { echo "$as_me:8948: error: expected a pathname, not \"$cf_utmp_path\"" >&5
8949 echo "$as_me: error: expected a pathname, not \"$cf_utmp_path\"" >&2;}
8950 { (exit 1); exit 1; }; }
8951 ;;
8952 esac
8953
8954 fi
8955 UTMP_PATH=$cf_utmp_path
8956 UTMP_NAME=`echo "$cf_utmp_path" | sed -e 's,^.*/,,'`
8957
8958 # Check whether --with-wtmp-path or --without-wtmp-path was given.
8959 if test "${with_wtmp_path+set}" = set; then
8960 withval="$with_wtmp_path"
8961 cf_wtmp_path=$withval
8962 else
8963 cf_wtmp_path=auto
8964 fi;
8965 if test "$cf_wtmp_path" = auto ; then
8966 for cf_wtmp_path in /etc/wtmp /var/adm/wtmp /var/run/wtmp /var/log/wtmp
8967 do
8968 if test -f ${cf_wtmp_path}x ; then
8969 cf_wtmp_path=${cf_wtmp_path}x
8970 break
8971 elif test -f $cf_wtmp_path/wtmp ; then
8972 break
8973 fi
8974 done
8975 else
8976
8977 if test "x$prefix" != xNONE; then
8978 cf_path_syntax="$prefix"
8979 else
8980 cf_path_syntax="$ac_default_prefix"
8981 fi
8982
8983 case ".$cf_wtmp_path" in
8984 (.\$\(*\)*|.\'*\'*)
8985 ;;
8986 (..|./*|.\\*)
8987 ;;
8988 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8989 ;;
8990 (.\$\{*prefix\}*|.\$\{*dir\}*)
8991 eval cf_wtmp_path="$cf_wtmp_path"
8992 case ".$cf_wtmp_path" in
8993 (.NONE/*)
8994 cf_wtmp_path=`echo "$cf_wtmp_path" | sed -e s%NONE%$cf_path_syntax%`
8995 ;;
8996 esac
8997 ;;
8998 (.no|.NONE/*)
8999 cf_wtmp_path=`echo "$cf_wtmp_path" | sed -e s%NONE%$cf_path_syntax%`
9000 ;;
9001 (*)
9002 { { echo "$as_me:9002: error: expected a pathname, not \"$cf_wtmp_path\"" >&5
9003 echo "$as_me: error: expected a pathname, not \"$cf_wtmp_path\"" >&2;}
9004 { (exit 1); exit 1; }; }
9005 ;;
9006 esac
9007
9008 fi
9009 WTMP_PATH=$cf_wtmp_path
9010 WTMP_NAME=`echo "$cf_wtmp_path" | sed -e 's,^.*/,,'`
9011
9012 ### checks for external data
9013
9014 echo "$as_me:9014: checking if external errno is declared" >&5
9015 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
9016 if test "${cf_cv_dcl_errno+set}" = set; then
9017 echo $ECHO_N "(cached) $ECHO_C" >&6
9018 else
9019
9020 cat >"conftest.$ac_ext" <<_ACEOF
9021 #line 9021 "configure"
9022 #include "confdefs.h"
9023
9024 $ac_includes_default
9025 #include <errno.h>
9026 int
9027 main (void)
9028 {
9029 int x = (int) errno; (void)x
9030 ;
9031 return 0;
9032 }
9033 _ACEOF
9034 rm -f "conftest.$ac_objext"
9035 if { (eval echo "$as_me:9035: \"$ac_compile\"") >&5
9036 (eval $ac_compile) 2>&5
9037 ac_status=$?
9038 echo "$as_me:9038: \$? = $ac_status" >&5
9039 (exit "$ac_status"); } &&
9040 { ac_try='test -s "conftest.$ac_objext"'
9041 { (eval echo "$as_me:9041: \"$ac_try\"") >&5
9042 (eval $ac_try) 2>&5
9043 ac_status=$?
9044 echo "$as_me:9044: \$? = $ac_status" >&5
9045 (exit "$ac_status"); }; }; then
9046 cf_cv_dcl_errno=yes
9047 else
9048 echo "$as_me: failed program was:" >&5
9049 cat "conftest.$ac_ext" >&5
9050 cf_cv_dcl_errno=no
9051 fi
9052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9053
9054 fi
9055 echo "$as_me:9055: result: $cf_cv_dcl_errno" >&5
9056 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
9057
9058 if test "$cf_cv_dcl_errno" = no ; then
9059
9060 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9061
9062 cat >>confdefs.h <<EOF
9063 #define $cf_result 1
9064 EOF
9065
9066 fi
9067
9068 # It's possible (for near-UNIX clones) that the data doesn't exist
9069
9070 echo "$as_me:9070: checking if external errno exists" >&5
9071 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
9072 if test "${cf_cv_have_errno+set}" = set; then
9073 echo $ECHO_N "(cached) $ECHO_C" >&6
9074 else
9075
9076 cat >"conftest.$ac_ext" <<_ACEOF
9077 #line 9077 "configure"
9078 #include "confdefs.h"
9079
9080 #undef errno
9081 extern int errno;
9082
9083 int
9084 main (void)
9085 {
9086 errno = 2
9087 ;
9088 return 0;
9089 }
9090 _ACEOF
9091 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9092 if { (eval echo "$as_me:9092: \"$ac_link\"") >&5
9093 (eval $ac_link) 2>&5
9094 ac_status=$?
9095 echo "$as_me:9095: \$? = $ac_status" >&5
9096 (exit "$ac_status"); } &&
9097 { ac_try='test -s "conftest$ac_exeext"'
9098 { (eval echo "$as_me:9098: \"$ac_try\"") >&5
9099 (eval $ac_try) 2>&5
9100 ac_status=$?
9101 echo "$as_me:9101: \$? = $ac_status" >&5
9102 (exit "$ac_status"); }; }; then
9103 cf_cv_have_errno=yes
9104 else
9105 echo "$as_me: failed program was:" >&5
9106 cat "conftest.$ac_ext" >&5
9107 cf_cv_have_errno=no
9108 fi
9109 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9110
9111 fi
9112 echo "$as_me:9112: result: $cf_cv_have_errno" >&5
9113 echo "${ECHO_T}$cf_cv_have_errno" >&6
9114
9115 if test "$cf_cv_have_errno" = yes ; then
9116
9117 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9118
9119 cat >>confdefs.h <<EOF
9120 #define $cf_result 1
9121 EOF
9122
9123 fi
9124
9125 echo "$as_me:9125: checking for explicit tty group name" >&5
9126 echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
9127
9128 # Check whether --with-tty-group or --without-tty-group was given.
9129 if test "${with_tty_group+set}" = set; then
9130 withval="$with_tty_group"
9131 cf_tty_group=$withval
9132 else
9133 cf_tty_group=auto...
9134 fi;
9135 test -z "$cf_tty_group" && cf_tty_group=auto...
9136 test "$cf_tty_group" = yes && cf_tty_group=auto...
9137 echo "$as_me:9137: result: $cf_tty_group" >&5
9138 echo "${ECHO_T}$cf_tty_group" >&6
9139
9140 if test "$cf_tty_group" = "auto..." ; then
9141 echo "$as_me:9141: checking for tty group name" >&5
9142 echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
9143 if test "${cf_cv_tty_group_name+set}" = set; then
9144 echo $ECHO_N "(cached) $ECHO_C" >&6
9145 else
9146
9147 # If we are configuring as root, it is hard to get a clue about the tty group.
9148 # But we'll guess based on how our connection is set up - assuming it is done
9149 # properly.
9150
9151 cf_uid="`id | sed -e 's/^^=*=//' -e 's/(.*$//'`"
9152 # )vi
9153 if test "$cf_uid" != 0 ; then
9154 cf_cv_tty_group_name=
9155 cf_tty_name="`tty`"
9156 test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
9157 test -z "$cf_tty_name" && cf_tty_name=/dev/tty
9158 if test -c "$cf_tty_name"
9159 then
9160 cf_option="-lL"
9161
9162 # Expect listing to have fields like this:
9163 #-rwxrwxrwx 1 user group 34293 Jul 18 16:29 pathname
9164 ls $cf_option "$cf_tty_name" >conftest.out
9165 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
9166 if test -z "$cf_rest" ; then
9167 cf_option="${cf_option}g"
9168 ls "$cf_option" "$cf_tty_name" >conftest.out
9169 read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
9170 fi
9171 rm -f conftest.out
9172 cf_cv_tty_group_name=$cf_grp
9173 fi
9174 fi
9175
9176 # If we cannot deduce the tty group, fall back on hardcoded cases
9177
9178 if test -z "$cf_cv_tty_group_name"
9179 then
9180 case $host_os in
9181 (osf*)
9182 cf_cv_tty_group_name="terminal"
9183 ;;
9184 (*)
9185 cf_cv_tty_group_name="unknown"
9186 if ( ${EGREP-egrep} '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
9187 cf_cv_tty_group_name="tty"
9188 fi
9189 ;;
9190 esac
9191 fi
9192
9193 fi
9194 echo "$as_me:9194: result: $cf_cv_tty_group_name" >&5
9195 echo "${ECHO_T}$cf_cv_tty_group_name" >&6
9196 cf_tty_group="$cf_cv_tty_group_name"
9197 else
9198 # if configure option, always do this
9199
9200 cat >>confdefs.h <<\EOF
9201 #define USE_TTY_GROUP 1
9202 EOF
9203
9204 fi
9205
9206 cat >>confdefs.h <<EOF
9207 #define TTY_GROUP_NAME "$cf_tty_group"
9208 EOF
9209
9210 # This is only a double-check that the group-name we obtained above really
9211 # does apply to the device. We cannot perform this test if we are in batch
9212 # mode, or if we are cross-compiling.
9213
9214 echo "$as_me:9214: checking if we may use the $cf_tty_group group" >&5
9215 echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
9216 if test "${cf_cv_tty_group+set}" = set; then
9217 echo $ECHO_N "(cached) $ECHO_C" >&6
9218 else
9219
9220 cf_tty_name="`tty`"
9221 if test "$cf_tty_name" != "not a tty"
9222 then
9223 if test "$cross_compiling" = yes; then
9224 cf_cv_tty_group=unknown
9225 else
9226 cat >"conftest.$ac_ext" <<_ACEOF
9227 #line 9227 "configure"
9228 #include "confdefs.h"
9229
9230 $ac_includes_default
9231
9232 #include <grp.h>
9233
9234 int main(void)
9235 {
9236 static char default_tty[] = "/dev/tty";
9237 struct stat sb;
9238 struct group *ttygrp;
9239 int fd;
9240 char *name;
9241
9242 for (fd = 0; fd < 3; ++fd) {
9243 if ((name = ttyname(fd)) != 0)
9244 break;
9245 }
9246 if (name == 0)
9247 name = default_tty;
9248
9249 ttygrp = getgrnam(TTY_GROUP_NAME);
9250 endgrent();
9251
9252 if (ttygrp != 0
9253 && name != 0
9254 && stat(name, &sb) == 0
9255 && sb.st_gid != getgid()
9256 && sb.st_gid == ttygrp->gr_gid) {
9257 ${cf_cv_main_return:-return} (0);
9258 }
9259 ${cf_cv_main_return:-return} (1);
9260 }
9261
9262 _ACEOF
9263 rm -f "conftest$ac_exeext"
9264 if { (eval echo "$as_me:9264: \"$ac_link\"") >&5
9265 (eval $ac_link) 2>&5
9266 ac_status=$?
9267 echo "$as_me:9267: \$? = $ac_status" >&5
9268 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9269 { (eval echo "$as_me:9269: \"$ac_try\"") >&5
9270 (eval $ac_try) 2>&5
9271 ac_status=$?
9272 echo "$as_me:9272: \$? = $ac_status" >&5
9273 (exit "$ac_status"); }; }; then
9274 cf_cv_tty_group=yes
9275 else
9276 echo "$as_me: program exited with status $ac_status" >&5
9277 echo "$as_me: failed program was:" >&5
9278 cat "conftest.$ac_ext" >&5
9279 cf_cv_tty_group=no
9280 fi
9281 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9282 fi
9283 elif test "$cross_compiling" = yes; then
9284 cf_cv_tty_group=unknown
9285 else
9286 cf_cv_tty_group=yes
9287 fi
9288
9289 fi
9290 echo "$as_me:9290: result: $cf_cv_tty_group" >&5
9291 echo "${ECHO_T}$cf_cv_tty_group" >&6
9292
9293 if test $cf_cv_tty_group = no ; then
9294 { echo "$as_me:9294: WARNING: Cannot use $cf_tty_group group" >&5
9295 echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
9296 else
9297 cat >>confdefs.h <<\EOF
9298 #define USE_TTY_GROUP 1
9299 EOF
9300
9301 fi
9302
9303 ### checks for system services and user specified options
9304
9305 echo "$as_me:9305: checking for X" >&5
9306 echo $ECHO_N "checking for X... $ECHO_C" >&6
9307
9308 # Check whether --with-x or --without-x was given.
9309 if test "${with_x+set}" = set; then
9310 withval="$with_x"
9311
9312 fi;
9313 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9314 if test "x$with_x" = xno; then
9315 # The user explicitly disabled X.
9316 have_x=disabled
9317 else
9318 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9319 # Both variables are already set.
9320 have_x=yes
9321 else
9322 if test "${ac_cv_have_x+set}" = set; then
9323 echo $ECHO_N "(cached) $ECHO_C" >&6
9324 else
9325 # One or both of the vars are not set, and there is no cached value.
9326 ac_x_includes=no ac_x_libraries=no
9327 rm -fr conftest.dir
9328 if mkdir conftest.dir; then
9329 cd conftest.dir
9330 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9331 cat >Imakefile <<'EOF'
9332 acfindx:
9333 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9334 EOF
9335 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9336 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9337 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
9338 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9339 for ac_extension in a so sl dylib dll; do
9340 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9341 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9342 ac_im_usrlibdir=$ac_im_libdir; break
9343 fi
9344 done
9345 # Screen out bogus values from the imake configuration. They are
9346 # bogus both because they are the default anyway, and because
9347 # using them would break gcc on systems where it needs fixed includes.
9348 case $ac_im_incroot in
9349 /usr/include) ;;
9350 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9351 esac
9352 case $ac_im_usrlibdir in
9353 /usr/lib | /lib) ;;
9354 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9355 esac
9356 fi
9357 cd ..
9358 rm -fr conftest.dir
9359 fi
9360
9361 # Standard set of common directories for X headers.
9362 # Check X11 before X11Rn because it is often a symlink to the current release.
9363 ac_x_header_dirs='
9364 /usr/X11/include
9365 /usr/X11R7/include
9366 /usr/X11R6/include
9367 /usr/X11R5/include
9368 /usr/X11R4/include
9369
9370 /opt/local/include
9371 /opt/X11/include
9372
9373 /usr/include/X11
9374 /usr/include/X11R7
9375 /usr/include/X11R6
9376 /usr/include/X11R5
9377 /usr/include/X11R4
9378
9379 /usr/local/X11/include
9380 /usr/local/X11R7/include
9381 /usr/local/X11R6/include
9382 /usr/local/X11R5/include
9383 /usr/local/X11R4/include
9384
9385 /usr/local/include/X11
9386 /usr/local/include/X11R7
9387 /usr/local/include/X11R6
9388 /usr/local/include/X11R5
9389 /usr/local/include/X11R4
9390
9391 /usr/X386/include
9392 /usr/x386/include
9393 /usr/XFree86/include/X11
9394
9395 /usr/include
9396 /usr/local/include
9397 /usr/unsupported/include
9398 /usr/athena/include
9399 /usr/local/x11r5/include
9400 /usr/lpp/Xamples/include
9401
9402 /usr/openwin/include
9403 /usr/openwin/share/include'
9404
9405 if test "$ac_x_includes" = no; then
9406 # Guess where to find include files, by looking for Intrinsic.h.
9407 # First, try using that file with no special directory specified.
9408 cat >"conftest.$ac_ext" <<_ACEOF
9409 #line 9409 "configure"
9410 #include "confdefs.h"
9411 #include <X11/Intrinsic.h>
9412 _ACEOF
9413 if { (eval echo "$as_me:9413: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9414 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9415 ac_status=$?
9416 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9417 rm -f conftest.er1
9418 cat conftest.err >&5
9419 echo "$as_me:9419: \$? = $ac_status" >&5
9420 (exit "$ac_status"); } >/dev/null; then
9421 if test -s conftest.err; then
9422 ac_cpp_err=$ac_c_preproc_warn_flag
9423 else
9424 ac_cpp_err=
9425 fi
9426 else
9427 ac_cpp_err=yes
9428 fi
9429 if test -z "$ac_cpp_err"; then
9430 # We can compile using X headers with no special include directory.
9431 ac_x_includes=
9432 else
9433 echo "$as_me: failed program was:" >&5
9434 cat "conftest.$ac_ext" >&5
9435 for ac_dir in $ac_x_header_dirs; do
9436 if test -r "$ac_dir/X11/Intrinsic.h"; then
9437 ac_x_includes=$ac_dir
9438 break
9439 fi
9440 done
9441 fi
9442 rm -f conftest.err "conftest.$ac_ext"
9443 fi # $ac_x_includes = no
9444
9445 if test "$ac_x_libraries" = no; then
9446 # Check for the libraries.
9447 # See if we find them without any special options.
9448 # Don't add to $LIBS permanently.
9449 ac_save_LIBS=$LIBS
9450 LIBS="-lXt $LIBS"
9451 cat >"conftest.$ac_ext" <<_ACEOF
9452 #line 9452 "configure"
9453 #include "confdefs.h"
9454 #include <X11/Intrinsic.h>
9455 int
9456 main (void)
9457 {
9458 XtMalloc (0)
9459 ;
9460 return 0;
9461 }
9462 _ACEOF
9463 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9464 if { (eval echo "$as_me:9464: \"$ac_link\"") >&5
9465 (eval $ac_link) 2>&5
9466 ac_status=$?
9467 echo "$as_me:9467: \$? = $ac_status" >&5
9468 (exit "$ac_status"); } &&
9469 { ac_try='test -s "conftest$ac_exeext"'
9470 { (eval echo "$as_me:9470: \"$ac_try\"") >&5
9471 (eval $ac_try) 2>&5
9472 ac_status=$?
9473 echo "$as_me:9473: \$? = $ac_status" >&5
9474 (exit "$ac_status"); }; }; then
9475 LIBS=$ac_save_LIBS
9476 # We can link X programs with no special library path.
9477 ac_x_libraries=
9478 else
9479 echo "$as_me: failed program was:" >&5
9480 cat "conftest.$ac_ext" >&5
9481 LIBS=$ac_save_LIBS
9482 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9483 do
9484 # Don't even attempt the hair of trying to link an X program!
9485 for ac_extension in a so sl dylib dll; do
9486 if test -r "$ac_dir/libXt.$ac_extension"; then
9487 ac_x_libraries=$ac_dir
9488 break 2
9489 fi
9490 done
9491 done
9492 fi
9493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9494 fi # $ac_x_libraries = no
9495
9496 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9497 # Didn't find X anywhere. Cache the known absence of X.
9498 ac_cv_have_x="have_x=no"
9499 else
9500 # Record where we found X for the cache.
9501 ac_cv_have_x="have_x=yes \
9502 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9503 fi
9504 fi
9505
9506 fi
9507 eval "$ac_cv_have_x"
9508 fi # $with_x != no
9509
9510 if test "$have_x" != yes; then
9511 echo "$as_me:9511: result: $have_x" >&5
9512 echo "${ECHO_T}$have_x" >&6
9513 no_x=yes
9514 else
9515 # If each of the values was on the command line, it overrides each guess.
9516 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9517 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9518 # Update the cache value to reflect the command line values.
9519 ac_cv_have_x="have_x=yes \
9520 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9521 echo "$as_me:9521: result: libraries $x_libraries, headers $x_includes" >&5
9522 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9523 fi
9524
9525 if test "$no_x" = yes; then
9526 # Not all programs may use this symbol, but it does not hurt to define it.
9527
9528 cat >>confdefs.h <<\EOF
9529 #define X_DISPLAY_MISSING 1
9530 EOF
9531
9532 X_CFLAGS=
9533 X_PRE_LIBS=
9534 X_LIBS=
9535 X_EXTRA_LIBS=
9536 else
9537 if test -n "$x_includes"; then
9538 X_CFLAGS="$X_CFLAGS -I$x_includes"
9539 fi
9540
9541 # It would also be nice to do this for all -L options, not just this one.
9542 if test -n "$x_libraries"; then
9543 X_LIBS="$X_LIBS -L$x_libraries"
9544 # For Solaris; some versions of Sun CC require a space after -R and
9545 # others require no space. Words are not sufficient . . . .
9546 case `(uname -sr) 2>/dev/null` in
9547 "SunOS 5"*)
9548 echo "$as_me:9548: checking whether -R must be followed by a space" >&5
9549 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9550 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9551 cat >"conftest.$ac_ext" <<_ACEOF
9552 #line 9552 "configure"
9553 #include "confdefs.h"
9554
9555 int
9556 main (void)
9557 {
9558
9559 ;
9560 return 0;
9561 }
9562 _ACEOF
9563 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9564 if { (eval echo "$as_me:9564: \"$ac_link\"") >&5
9565 (eval $ac_link) 2>&5
9566 ac_status=$?
9567 echo "$as_me:9567: \$? = $ac_status" >&5
9568 (exit "$ac_status"); } &&
9569 { ac_try='test -s "conftest$ac_exeext"'
9570 { (eval echo "$as_me:9570: \"$ac_try\"") >&5
9571 (eval $ac_try) 2>&5
9572 ac_status=$?
9573 echo "$as_me:9573: \$? = $ac_status" >&5
9574 (exit "$ac_status"); }; }; then
9575 ac_R_nospace=yes
9576 else
9577 echo "$as_me: failed program was:" >&5
9578 cat "conftest.$ac_ext" >&5
9579 ac_R_nospace=no
9580 fi
9581 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9582 if test $ac_R_nospace = yes; then
9583 echo "$as_me:9583: result: no" >&5
9584 echo "${ECHO_T}no" >&6
9585 X_LIBS="$X_LIBS -R$x_libraries"
9586 else
9587 LIBS="$ac_xsave_LIBS -R $x_libraries"
9588 cat >"conftest.$ac_ext" <<_ACEOF
9589 #line 9589 "configure"
9590 #include "confdefs.h"
9591
9592 int
9593 main (void)
9594 {
9595
9596 ;
9597 return 0;
9598 }
9599 _ACEOF
9600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9601 if { (eval echo "$as_me:9601: \"$ac_link\"") >&5
9602 (eval $ac_link) 2>&5
9603 ac_status=$?
9604 echo "$as_me:9604: \$? = $ac_status" >&5
9605 (exit "$ac_status"); } &&
9606 { ac_try='test -s "conftest$ac_exeext"'
9607 { (eval echo "$as_me:9607: \"$ac_try\"") >&5
9608 (eval $ac_try) 2>&5
9609 ac_status=$?
9610 echo "$as_me:9610: \$? = $ac_status" >&5
9611 (exit "$ac_status"); }; }; then
9612 ac_R_space=yes
9613 else
9614 echo "$as_me: failed program was:" >&5
9615 cat "conftest.$ac_ext" >&5
9616 ac_R_space=no
9617 fi
9618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9619 if test $ac_R_space = yes; then
9620 echo "$as_me:9620: result: yes" >&5
9621 echo "${ECHO_T}yes" >&6
9622 X_LIBS="$X_LIBS -R $x_libraries"
9623 else
9624 echo "$as_me:9624: result: neither works" >&5
9625 echo "${ECHO_T}neither works" >&6
9626 fi
9627 fi
9628 LIBS=$ac_xsave_LIBS
9629 esac
9630 fi
9631
9632 # Check for system-dependent libraries X programs must link with.
9633 # Do this before checking for the system-independent R6 libraries
9634 # (-lICE), since we may need -lsocket or whatever for X linking.
9635
9636 if test "$ISC" = yes; then
9637 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9638 else
9639 # Martyn Johnson says this is needed for Ultrix, if the X
9640 # libraries were built with DECnet support. And Karl Berry says
9641 # the Alpha needs dnet_stub (dnet does not exist).
9642 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9643 cat >"conftest.$ac_ext" <<_ACEOF
9644 #line 9644 "configure"
9645 #include "confdefs.h"
9646
9647 /* Override any gcc2 internal prototype to avoid an error. */
9648 #ifdef __cplusplus
9649 extern "C"
9650 #endif
9651 /* We use char because int might match the return type of a gcc2
9652 builtin and then its argument prototype would still apply. */
9653 char XOpenDisplay (void);
9654 int
9655 main (void)
9656 {
9657 XOpenDisplay ();
9658 ;
9659 return 0;
9660 }
9661 _ACEOF
9662 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9663 if { (eval echo "$as_me:9663: \"$ac_link\"") >&5
9664 (eval $ac_link) 2>&5
9665 ac_status=$?
9666 echo "$as_me:9666: \$? = $ac_status" >&5
9667 (exit "$ac_status"); } &&
9668 { ac_try='test -s "conftest$ac_exeext"'
9669 { (eval echo "$as_me:9669: \"$ac_try\"") >&5
9670 (eval $ac_try) 2>&5
9671 ac_status=$?
9672 echo "$as_me:9672: \$? = $ac_status" >&5
9673 (exit "$ac_status"); }; }; then
9674 :
9675 else
9676 echo "$as_me: failed program was:" >&5
9677 cat "conftest.$ac_ext" >&5
9678 echo "$as_me:9678: checking for dnet_ntoa in -ldnet" >&5
9679 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9680 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9681 echo $ECHO_N "(cached) $ECHO_C" >&6
9682 else
9683 ac_check_lib_save_LIBS=$LIBS
9684 LIBS="-ldnet $LIBS"
9685 cat >"conftest.$ac_ext" <<_ACEOF
9686 #line 9686 "configure"
9687 #include "confdefs.h"
9688
9689 /* Override any gcc2 internal prototype to avoid an error. */
9690 #ifdef __cplusplus
9691 extern "C"
9692 #endif
9693 /* We use char because int might match the return type of a gcc2
9694 builtin and then its argument prototype would still apply. */
9695 char dnet_ntoa (void);
9696 int
9697 main (void)
9698 {
9699 dnet_ntoa ();
9700 ;
9701 return 0;
9702 }
9703 _ACEOF
9704 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9705 if { (eval echo "$as_me:9705: \"$ac_link\"") >&5
9706 (eval $ac_link) 2>&5
9707 ac_status=$?
9708 echo "$as_me:9708: \$? = $ac_status" >&5
9709 (exit "$ac_status"); } &&
9710 { ac_try='test -s "conftest$ac_exeext"'
9711 { (eval echo "$as_me:9711: \"$ac_try\"") >&5
9712 (eval $ac_try) 2>&5
9713 ac_status=$?
9714 echo "$as_me:9714: \$? = $ac_status" >&5
9715 (exit "$ac_status"); }; }; then
9716 ac_cv_lib_dnet_dnet_ntoa=yes
9717 else
9718 echo "$as_me: failed program was:" >&5
9719 cat "conftest.$ac_ext" >&5
9720 ac_cv_lib_dnet_dnet_ntoa=no
9721 fi
9722 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9723 LIBS=$ac_check_lib_save_LIBS
9724 fi
9725 echo "$as_me:9725: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9726 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9727 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
9728 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9729 fi
9730
9731 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9732 echo "$as_me:9732: checking for dnet_ntoa in -ldnet_stub" >&5
9733 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9734 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9735 echo $ECHO_N "(cached) $ECHO_C" >&6
9736 else
9737 ac_check_lib_save_LIBS=$LIBS
9738 LIBS="-ldnet_stub $LIBS"
9739 cat >"conftest.$ac_ext" <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9742
9743 /* Override any gcc2 internal prototype to avoid an error. */
9744 #ifdef __cplusplus
9745 extern "C"
9746 #endif
9747 /* We use char because int might match the return type of a gcc2
9748 builtin and then its argument prototype would still apply. */
9749 char dnet_ntoa (void);
9750 int
9751 main (void)
9752 {
9753 dnet_ntoa ();
9754 ;
9755 return 0;
9756 }
9757 _ACEOF
9758 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9759 if { (eval echo "$as_me:9759: \"$ac_link\"") >&5
9760 (eval $ac_link) 2>&5
9761 ac_status=$?
9762 echo "$as_me:9762: \$? = $ac_status" >&5
9763 (exit "$ac_status"); } &&
9764 { ac_try='test -s "conftest$ac_exeext"'
9765 { (eval echo "$as_me:9765: \"$ac_try\"") >&5
9766 (eval $ac_try) 2>&5
9767 ac_status=$?
9768 echo "$as_me:9768: \$? = $ac_status" >&5
9769 (exit "$ac_status"); }; }; then
9770 ac_cv_lib_dnet_stub_dnet_ntoa=yes
9771 else
9772 echo "$as_me: failed program was:" >&5
9773 cat "conftest.$ac_ext" >&5
9774 ac_cv_lib_dnet_stub_dnet_ntoa=no
9775 fi
9776 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9777 LIBS=$ac_check_lib_save_LIBS
9778 fi
9779 echo "$as_me:9779: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9780 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9781 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
9782 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9783 fi
9784
9785 fi
9786 fi
9787 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9788 LIBS="$ac_xsave_LIBS"
9789
9790 # msh (at] cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9791 # to get the SysV transport functions.
9792 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9793 # needs -lnsl.
9794 # The nsl library prevents programs from opening the X display
9795 # on Irix 5.2, according to T.E. Dickey.
9796 # The functions gethostbyname, getservbyname, and inet_addr are
9797 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9798 echo "$as_me:9798: checking for gethostbyname" >&5
9799 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9800 if test "${ac_cv_func_gethostbyname+set}" = set; then
9801 echo $ECHO_N "(cached) $ECHO_C" >&6
9802 else
9803 cat >"conftest.$ac_ext" <<_ACEOF
9804 #line 9804 "configure"
9805 #include "confdefs.h"
9806 #define gethostbyname autoconf_temporary
9807 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9808 #undef gethostbyname
9809
9810 #ifdef __cplusplus
9811 extern "C"
9812 #endif
9813
9814 /* We use char because int might match the return type of a gcc2
9815 builtin and then its argument prototype would still apply. */
9816 char gethostbyname (void);
9817
9818 int
9819 main (void)
9820 {
9821
9822 /* The GNU C library defines stubs for functions which it implements
9823 to always fail with ENOSYS. Some functions are actually named
9824 something starting with __ and the normal name is an alias. */
9825 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9826 #error found stub for gethostbyname
9827 #endif
9828
9829 return gethostbyname ();
9830 ;
9831 return 0;
9832 }
9833 _ACEOF
9834 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9835 if { (eval echo "$as_me:9835: \"$ac_link\"") >&5
9836 (eval $ac_link) 2>&5
9837 ac_status=$?
9838 echo "$as_me:9838: \$? = $ac_status" >&5
9839 (exit "$ac_status"); } &&
9840 { ac_try='test -s "conftest$ac_exeext"'
9841 { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9842 (eval $ac_try) 2>&5
9843 ac_status=$?
9844 echo "$as_me:9844: \$? = $ac_status" >&5
9845 (exit "$ac_status"); }; }; then
9846 ac_cv_func_gethostbyname=yes
9847 else
9848 echo "$as_me: failed program was:" >&5
9849 cat "conftest.$ac_ext" >&5
9850 ac_cv_func_gethostbyname=no
9851 fi
9852 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9853 fi
9854 echo "$as_me:9854: result: $ac_cv_func_gethostbyname" >&5
9855 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9856
9857 if test $ac_cv_func_gethostbyname = no; then
9858 echo "$as_me:9858: checking for gethostbyname in -lnsl" >&5
9859 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9860 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9861 echo $ECHO_N "(cached) $ECHO_C" >&6
9862 else
9863 ac_check_lib_save_LIBS=$LIBS
9864 LIBS="-lnsl $LIBS"
9865 cat >"conftest.$ac_ext" <<_ACEOF
9866 #line 9866 "configure"
9867 #include "confdefs.h"
9868
9869 /* Override any gcc2 internal prototype to avoid an error. */
9870 #ifdef __cplusplus
9871 extern "C"
9872 #endif
9873 /* We use char because int might match the return type of a gcc2
9874 builtin and then its argument prototype would still apply. */
9875 char gethostbyname (void);
9876 int
9877 main (void)
9878 {
9879 gethostbyname ();
9880 ;
9881 return 0;
9882 }
9883 _ACEOF
9884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9885 if { (eval echo "$as_me:9885: \"$ac_link\"") >&5
9886 (eval $ac_link) 2>&5
9887 ac_status=$?
9888 echo "$as_me:9888: \$? = $ac_status" >&5
9889 (exit "$ac_status"); } &&
9890 { ac_try='test -s "conftest$ac_exeext"'
9891 { (eval echo "$as_me:9891: \"$ac_try\"") >&5
9892 (eval $ac_try) 2>&5
9893 ac_status=$?
9894 echo "$as_me:9894: \$? = $ac_status" >&5
9895 (exit "$ac_status"); }; }; then
9896 ac_cv_lib_nsl_gethostbyname=yes
9897 else
9898 echo "$as_me: failed program was:" >&5
9899 cat "conftest.$ac_ext" >&5
9900 ac_cv_lib_nsl_gethostbyname=no
9901 fi
9902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9903 LIBS=$ac_check_lib_save_LIBS
9904 fi
9905 echo "$as_me:9905: result: $ac_cv_lib_nsl_gethostbyname" >&5
9906 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9907 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
9908 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9909 fi
9910
9911 if test $ac_cv_lib_nsl_gethostbyname = no; then
9912 echo "$as_me:9912: checking for gethostbyname in -lbsd" >&5
9913 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9914 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9915 echo $ECHO_N "(cached) $ECHO_C" >&6
9916 else
9917 ac_check_lib_save_LIBS=$LIBS
9918 LIBS="-lbsd $LIBS"
9919 cat >"conftest.$ac_ext" <<_ACEOF
9920 #line 9920 "configure"
9921 #include "confdefs.h"
9922
9923 /* Override any gcc2 internal prototype to avoid an error. */
9924 #ifdef __cplusplus
9925 extern "C"
9926 #endif
9927 /* We use char because int might match the return type of a gcc2
9928 builtin and then its argument prototype would still apply. */
9929 char gethostbyname (void);
9930 int
9931 main (void)
9932 {
9933 gethostbyname ();
9934 ;
9935 return 0;
9936 }
9937 _ACEOF
9938 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9939 if { (eval echo "$as_me:9939: \"$ac_link\"") >&5
9940 (eval $ac_link) 2>&5
9941 ac_status=$?
9942 echo "$as_me:9942: \$? = $ac_status" >&5
9943 (exit "$ac_status"); } &&
9944 { ac_try='test -s "conftest$ac_exeext"'
9945 { (eval echo "$as_me:9945: \"$ac_try\"") >&5
9946 (eval $ac_try) 2>&5
9947 ac_status=$?
9948 echo "$as_me:9948: \$? = $ac_status" >&5
9949 (exit "$ac_status"); }; }; then
9950 ac_cv_lib_bsd_gethostbyname=yes
9951 else
9952 echo "$as_me: failed program was:" >&5
9953 cat "conftest.$ac_ext" >&5
9954 ac_cv_lib_bsd_gethostbyname=no
9955 fi
9956 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9957 LIBS=$ac_check_lib_save_LIBS
9958 fi
9959 echo "$as_me:9959: result: $ac_cv_lib_bsd_gethostbyname" >&5
9960 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9961 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
9962 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9963 fi
9964
9965 fi
9966 fi
9967
9968 # lieder (at] skyler.mavd.honeywell.com says without -lsocket,
9969 # socket/setsockopt and other routines are undefined under SCO ODT
9970 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
9971 # on later versions), says Simon Leinen: it contains gethostby*
9972 # variants that don't use the nameserver (or something). -lsocket
9973 # must be given before -lnsl if both are needed. We assume that
9974 # if connect needs -lnsl, so does gethostbyname.
9975 echo "$as_me:9975: checking for connect" >&5
9976 echo $ECHO_N "checking for connect... $ECHO_C" >&6
9977 if test "${ac_cv_func_connect+set}" = set; then
9978 echo $ECHO_N "(cached) $ECHO_C" >&6
9979 else
9980 cat >"conftest.$ac_ext" <<_ACEOF
9981 #line 9981 "configure"
9982 #include "confdefs.h"
9983 #define connect autoconf_temporary
9984 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9985 #undef connect
9986
9987 #ifdef __cplusplus
9988 extern "C"
9989 #endif
9990
9991 /* We use char because int might match the return type of a gcc2
9992 builtin and then its argument prototype would still apply. */
9993 char connect (void);
9994
9995 int
9996 main (void)
9997 {
9998
9999 /* The GNU C library defines stubs for functions which it implements
10000 to always fail with ENOSYS. Some functions are actually named
10001 something starting with __ and the normal name is an alias. */
10002 #if defined (__stub_connect) || defined (__stub___connect)
10003 #error found stub for connect
10004 #endif
10005
10006 return connect ();
10007 ;
10008 return 0;
10009 }
10010 _ACEOF
10011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10012 if { (eval echo "$as_me:10012: \"$ac_link\"") >&5
10013 (eval $ac_link) 2>&5
10014 ac_status=$?
10015 echo "$as_me:10015: \$? = $ac_status" >&5
10016 (exit "$ac_status"); } &&
10017 { ac_try='test -s "conftest$ac_exeext"'
10018 { (eval echo "$as_me:10018: \"$ac_try\"") >&5
10019 (eval $ac_try) 2>&5
10020 ac_status=$?
10021 echo "$as_me:10021: \$? = $ac_status" >&5
10022 (exit "$ac_status"); }; }; then
10023 ac_cv_func_connect=yes
10024 else
10025 echo "$as_me: failed program was:" >&5
10026 cat "conftest.$ac_ext" >&5
10027 ac_cv_func_connect=no
10028 fi
10029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10030 fi
10031 echo "$as_me:10031: result: $ac_cv_func_connect" >&5
10032 echo "${ECHO_T}$ac_cv_func_connect" >&6
10033
10034 if test $ac_cv_func_connect = no; then
10035 echo "$as_me:10035: checking for connect in -lsocket" >&5
10036 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10037 if test "${ac_cv_lib_socket_connect+set}" = set; then
10038 echo $ECHO_N "(cached) $ECHO_C" >&6
10039 else
10040 ac_check_lib_save_LIBS=$LIBS
10041 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10042 cat >"conftest.$ac_ext" <<_ACEOF
10043 #line 10043 "configure"
10044 #include "confdefs.h"
10045
10046 /* Override any gcc2 internal prototype to avoid an error. */
10047 #ifdef __cplusplus
10048 extern "C"
10049 #endif
10050 /* We use char because int might match the return type of a gcc2
10051 builtin and then its argument prototype would still apply. */
10052 char connect (void);
10053 int
10054 main (void)
10055 {
10056 connect ();
10057 ;
10058 return 0;
10059 }
10060 _ACEOF
10061 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10062 if { (eval echo "$as_me:10062: \"$ac_link\"") >&5
10063 (eval $ac_link) 2>&5
10064 ac_status=$?
10065 echo "$as_me:10065: \$? = $ac_status" >&5
10066 (exit "$ac_status"); } &&
10067 { ac_try='test -s "conftest$ac_exeext"'
10068 { (eval echo "$as_me:10068: \"$ac_try\"") >&5
10069 (eval $ac_try) 2>&5
10070 ac_status=$?
10071 echo "$as_me:10071: \$? = $ac_status" >&5
10072 (exit "$ac_status"); }; }; then
10073 ac_cv_lib_socket_connect=yes
10074 else
10075 echo "$as_me: failed program was:" >&5
10076 cat "conftest.$ac_ext" >&5
10077 ac_cv_lib_socket_connect=no
10078 fi
10079 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10080 LIBS=$ac_check_lib_save_LIBS
10081 fi
10082 echo "$as_me:10082: result: $ac_cv_lib_socket_connect" >&5
10083 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10084 if test "$ac_cv_lib_socket_connect" = yes; then
10085 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10086 fi
10087
10088 fi
10089
10090 # Guillermo Gomez says -lposix is necessary on A/UX.
10091 echo "$as_me:10091: checking for remove" >&5
10092 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10093 if test "${ac_cv_func_remove+set}" = set; then
10094 echo $ECHO_N "(cached) $ECHO_C" >&6
10095 else
10096 cat >"conftest.$ac_ext" <<_ACEOF
10097 #line 10097 "configure"
10098 #include "confdefs.h"
10099 #define remove autoconf_temporary
10100 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10101 #undef remove
10102
10103 #ifdef __cplusplus
10104 extern "C"
10105 #endif
10106
10107 /* We use char because int might match the return type of a gcc2
10108 builtin and then its argument prototype would still apply. */
10109 char remove (void);
10110
10111 int
10112 main (void)
10113 {
10114
10115 /* The GNU C library defines stubs for functions which it implements
10116 to always fail with ENOSYS. Some functions are actually named
10117 something starting with __ and the normal name is an alias. */
10118 #if defined (__stub_remove) || defined (__stub___remove)
10119 #error found stub for remove
10120 #endif
10121
10122 return remove ();
10123 ;
10124 return 0;
10125 }
10126 _ACEOF
10127 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10128 if { (eval echo "$as_me:10128: \"$ac_link\"") >&5
10129 (eval $ac_link) 2>&5
10130 ac_status=$?
10131 echo "$as_me:10131: \$? = $ac_status" >&5
10132 (exit "$ac_status"); } &&
10133 { ac_try='test -s "conftest$ac_exeext"'
10134 { (eval echo "$as_me:10134: \"$ac_try\"") >&5
10135 (eval $ac_try) 2>&5
10136 ac_status=$?
10137 echo "$as_me:10137: \$? = $ac_status" >&5
10138 (exit "$ac_status"); }; }; then
10139 ac_cv_func_remove=yes
10140 else
10141 echo "$as_me: failed program was:" >&5
10142 cat "conftest.$ac_ext" >&5
10143 ac_cv_func_remove=no
10144 fi
10145 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10146 fi
10147 echo "$as_me:10147: result: $ac_cv_func_remove" >&5
10148 echo "${ECHO_T}$ac_cv_func_remove" >&6
10149
10150 if test $ac_cv_func_remove = no; then
10151 echo "$as_me:10151: checking for remove in -lposix" >&5
10152 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10153 if test "${ac_cv_lib_posix_remove+set}" = set; then
10154 echo $ECHO_N "(cached) $ECHO_C" >&6
10155 else
10156 ac_check_lib_save_LIBS=$LIBS
10157 LIBS="-lposix $LIBS"
10158 cat >"conftest.$ac_ext" <<_ACEOF
10159 #line 10159 "configure"
10160 #include "confdefs.h"
10161
10162 /* Override any gcc2 internal prototype to avoid an error. */
10163 #ifdef __cplusplus
10164 extern "C"
10165 #endif
10166 /* We use char because int might match the return type of a gcc2
10167 builtin and then its argument prototype would still apply. */
10168 char remove (void);
10169 int
10170 main (void)
10171 {
10172 remove ();
10173 ;
10174 return 0;
10175 }
10176 _ACEOF
10177 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10178 if { (eval echo "$as_me:10178: \"$ac_link\"") >&5
10179 (eval $ac_link) 2>&5
10180 ac_status=$?
10181 echo "$as_me:10181: \$? = $ac_status" >&5
10182 (exit "$ac_status"); } &&
10183 { ac_try='test -s "conftest$ac_exeext"'
10184 { (eval echo "$as_me:10184: \"$ac_try\"") >&5
10185 (eval $ac_try) 2>&5
10186 ac_status=$?
10187 echo "$as_me:10187: \$? = $ac_status" >&5
10188 (exit "$ac_status"); }; }; then
10189 ac_cv_lib_posix_remove=yes
10190 else
10191 echo "$as_me: failed program was:" >&5
10192 cat "conftest.$ac_ext" >&5
10193 ac_cv_lib_posix_remove=no
10194 fi
10195 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10196 LIBS=$ac_check_lib_save_LIBS
10197 fi
10198 echo "$as_me:10198: result: $ac_cv_lib_posix_remove" >&5
10199 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10200 if test "$ac_cv_lib_posix_remove" = yes; then
10201 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10202 fi
10203
10204 fi
10205
10206 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10207 echo "$as_me:10207: checking for shmat" >&5
10208 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10209 if test "${ac_cv_func_shmat+set}" = set; then
10210 echo $ECHO_N "(cached) $ECHO_C" >&6
10211 else
10212 cat >"conftest.$ac_ext" <<_ACEOF
10213 #line 10213 "configure"
10214 #include "confdefs.h"
10215 #define shmat autoconf_temporary
10216 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10217 #undef shmat
10218
10219 #ifdef __cplusplus
10220 extern "C"
10221 #endif
10222
10223 /* We use char because int might match the return type of a gcc2
10224 builtin and then its argument prototype would still apply. */
10225 char shmat (void);
10226
10227 int
10228 main (void)
10229 {
10230
10231 /* The GNU C library defines stubs for functions which it implements
10232 to always fail with ENOSYS. Some functions are actually named
10233 something starting with __ and the normal name is an alias. */
10234 #if defined (__stub_shmat) || defined (__stub___shmat)
10235 #error found stub for shmat
10236 #endif
10237
10238 return shmat ();
10239 ;
10240 return 0;
10241 }
10242 _ACEOF
10243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10244 if { (eval echo "$as_me:10244: \"$ac_link\"") >&5
10245 (eval $ac_link) 2>&5
10246 ac_status=$?
10247 echo "$as_me:10247: \$? = $ac_status" >&5
10248 (exit "$ac_status"); } &&
10249 { ac_try='test -s "conftest$ac_exeext"'
10250 { (eval echo "$as_me:10250: \"$ac_try\"") >&5
10251 (eval $ac_try) 2>&5
10252 ac_status=$?
10253 echo "$as_me:10253: \$? = $ac_status" >&5
10254 (exit "$ac_status"); }; }; then
10255 ac_cv_func_shmat=yes
10256 else
10257 echo "$as_me: failed program was:" >&5
10258 cat "conftest.$ac_ext" >&5
10259 ac_cv_func_shmat=no
10260 fi
10261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10262 fi
10263 echo "$as_me:10263: result: $ac_cv_func_shmat" >&5
10264 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10265
10266 if test $ac_cv_func_shmat = no; then
10267 echo "$as_me:10267: checking for shmat in -lipc" >&5
10268 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10269 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10270 echo $ECHO_N "(cached) $ECHO_C" >&6
10271 else
10272 ac_check_lib_save_LIBS=$LIBS
10273 LIBS="-lipc $LIBS"
10274 cat >"conftest.$ac_ext" <<_ACEOF
10275 #line 10275 "configure"
10276 #include "confdefs.h"
10277
10278 /* Override any gcc2 internal prototype to avoid an error. */
10279 #ifdef __cplusplus
10280 extern "C"
10281 #endif
10282 /* We use char because int might match the return type of a gcc2
10283 builtin and then its argument prototype would still apply. */
10284 char shmat (void);
10285 int
10286 main (void)
10287 {
10288 shmat ();
10289 ;
10290 return 0;
10291 }
10292 _ACEOF
10293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10294 if { (eval echo "$as_me:10294: \"$ac_link\"") >&5
10295 (eval $ac_link) 2>&5
10296 ac_status=$?
10297 echo "$as_me:10297: \$? = $ac_status" >&5
10298 (exit "$ac_status"); } &&
10299 { ac_try='test -s "conftest$ac_exeext"'
10300 { (eval echo "$as_me:10300: \"$ac_try\"") >&5
10301 (eval $ac_try) 2>&5
10302 ac_status=$?
10303 echo "$as_me:10303: \$? = $ac_status" >&5
10304 (exit "$ac_status"); }; }; then
10305 ac_cv_lib_ipc_shmat=yes
10306 else
10307 echo "$as_me: failed program was:" >&5
10308 cat "conftest.$ac_ext" >&5
10309 ac_cv_lib_ipc_shmat=no
10310 fi
10311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10312 LIBS=$ac_check_lib_save_LIBS
10313 fi
10314 echo "$as_me:10314: result: $ac_cv_lib_ipc_shmat" >&5
10315 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10316 if test "$ac_cv_lib_ipc_shmat" = yes; then
10317 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10318 fi
10319
10320 fi
10321 fi
10322
10323 # Check for libraries that X11R6 Xt/Xaw programs need.
10324 ac_save_LDFLAGS=$LDFLAGS
10325 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10326 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10327 # check for ICE first), but we must link in the order -lSM -lICE or
10328 # we get undefined symbols. So assume we have SM if we have ICE.
10329 # These have to be linked with before -lX11, unlike the other
10330 # libraries we check for below, so use a different variable.
10331 # John Interrante, Karl Berry
10332 echo "$as_me:10332: checking for IceConnectionNumber in -lICE" >&5
10333 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10334 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10335 echo $ECHO_N "(cached) $ECHO_C" >&6
10336 else
10337 ac_check_lib_save_LIBS=$LIBS
10338 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10339 cat >"conftest.$ac_ext" <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342
10343 /* Override any gcc2 internal prototype to avoid an error. */
10344 #ifdef __cplusplus
10345 extern "C"
10346 #endif
10347 /* We use char because int might match the return type of a gcc2
10348 builtin and then its argument prototype would still apply. */
10349 char IceConnectionNumber (void);
10350 int
10351 main (void)
10352 {
10353 IceConnectionNumber ();
10354 ;
10355 return 0;
10356 }
10357 _ACEOF
10358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10359 if { (eval echo "$as_me:10359: \"$ac_link\"") >&5
10360 (eval $ac_link) 2>&5
10361 ac_status=$?
10362 echo "$as_me:10362: \$? = $ac_status" >&5
10363 (exit "$ac_status"); } &&
10364 { ac_try='test -s "conftest$ac_exeext"'
10365 { (eval echo "$as_me:10365: \"$ac_try\"") >&5
10366 (eval $ac_try) 2>&5
10367 ac_status=$?
10368 echo "$as_me:10368: \$? = $ac_status" >&5
10369 (exit "$ac_status"); }; }; then
10370 ac_cv_lib_ICE_IceConnectionNumber=yes
10371 else
10372 echo "$as_me: failed program was:" >&5
10373 cat "conftest.$ac_ext" >&5
10374 ac_cv_lib_ICE_IceConnectionNumber=no
10375 fi
10376 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10377 LIBS=$ac_check_lib_save_LIBS
10378 fi
10379 echo "$as_me:10379: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10380 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10381 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
10382 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10383 fi
10384
10385 LDFLAGS=$ac_save_LDFLAGS
10386
10387 fi
10388
10389 echo "$as_me:10389: checking for sys/wait.h that is POSIX.1 compatible" >&5
10390 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
10391 if test "${ac_cv_header_sys_wait_h+set}" = set; then
10392 echo $ECHO_N "(cached) $ECHO_C" >&6
10393 else
10394 cat >"conftest.$ac_ext" <<_ACEOF
10395 #line 10395 "configure"
10396 #include "confdefs.h"
10397 #include <sys/types.h>
10398 #include <sys/wait.h>
10399 #ifndef WEXITSTATUS
10400 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
10401 #endif
10402 #ifndef WIFEXITED
10403 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
10404 #endif
10405
10406 int
10407 main (void)
10408 {
10409 int s;
10410 wait (&s);
10411 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
10412 ;
10413 return 0;
10414 }
10415 _ACEOF
10416 rm -f "conftest.$ac_objext"
10417 if { (eval echo "$as_me:10417: \"$ac_compile\"") >&5
10418 (eval $ac_compile) 2>&5
10419 ac_status=$?
10420 echo "$as_me:10420: \$? = $ac_status" >&5
10421 (exit "$ac_status"); } &&
10422 { ac_try='test -s "conftest.$ac_objext"'
10423 { (eval echo "$as_me:10423: \"$ac_try\"") >&5
10424 (eval $ac_try) 2>&5
10425 ac_status=$?
10426 echo "$as_me:10426: \$? = $ac_status" >&5
10427 (exit "$ac_status"); }; }; then
10428 ac_cv_header_sys_wait_h=yes
10429 else
10430 echo "$as_me: failed program was:" >&5
10431 cat "conftest.$ac_ext" >&5
10432 ac_cv_header_sys_wait_h=no
10433 fi
10434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10435 fi
10436 echo "$as_me:10436: result: $ac_cv_header_sys_wait_h" >&5
10437 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
10438 if test $ac_cv_header_sys_wait_h = yes; then
10439
10440 cat >>confdefs.h <<\EOF
10441 #define HAVE_SYS_WAIT_H 1
10442 EOF
10443
10444 fi
10445
10446 echo "$as_me:10446: checking for POSIX wait functions" >&5
10447 echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
10448 if test "${cf_cv_posix_wait+set}" = set; then
10449 echo $ECHO_N "(cached) $ECHO_C" >&6
10450 else
10451
10452 cat >"conftest.$ac_ext" <<_ACEOF
10453 #line 10453 "configure"
10454 #include "confdefs.h"
10455
10456 $ac_includes_default
10457
10458 #ifdef HAVE_SYS_WAIT_H
10459 #include <sys/wait.h>
10460 #endif
10461
10462 int
10463 main (void)
10464 {
10465
10466 int stat_loc;
10467 pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
10468 pid_t pid2 = wait(&stat_loc);
10469 (void)pid;
10470 (void)pid2;
10471
10472 ;
10473 return 0;
10474 }
10475 _ACEOF
10476 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10477 if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
10478 (eval $ac_link) 2>&5
10479 ac_status=$?
10480 echo "$as_me:10480: \$? = $ac_status" >&5
10481 (exit "$ac_status"); } &&
10482 { ac_try='test -s "conftest$ac_exeext"'
10483 { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484 (eval $ac_try) 2>&5
10485 ac_status=$?
10486 echo "$as_me:10486: \$? = $ac_status" >&5
10487 (exit "$ac_status"); }; }; then
10488 cf_cv_posix_wait=yes
10489 else
10490 echo "$as_me: failed program was:" >&5
10491 cat "conftest.$ac_ext" >&5
10492 cf_cv_posix_wait=no
10493 fi
10494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10495
10496 fi
10497 echo "$as_me:10497: result: $cf_cv_posix_wait" >&5
10498 echo "${ECHO_T}$cf_cv_posix_wait" >&6
10499 test "$cf_cv_posix_wait" = yes &&
10500 cat >>confdefs.h <<\EOF
10501 #define USE_POSIX_WAIT 1
10502 EOF
10503
10504 echo "$as_me:10504: checking if external sys_nerr is declared" >&5
10505 echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
10506 if test "${cf_cv_dcl_sys_nerr+set}" = set; then
10507 echo $ECHO_N "(cached) $ECHO_C" >&6
10508 else
10509
10510 cat >"conftest.$ac_ext" <<_ACEOF
10511 #line 10511 "configure"
10512 #include "confdefs.h"
10513
10514 $ac_includes_default
10515 #include <errno.h>
10516 int
10517 main (void)
10518 {
10519 int x = (int) sys_nerr; (void)x
10520 ;
10521 return 0;
10522 }
10523 _ACEOF
10524 rm -f "conftest.$ac_objext"
10525 if { (eval echo "$as_me:10525: \"$ac_compile\"") >&5
10526 (eval $ac_compile) 2>&5
10527 ac_status=$?
10528 echo "$as_me:10528: \$? = $ac_status" >&5
10529 (exit "$ac_status"); } &&
10530 { ac_try='test -s "conftest.$ac_objext"'
10531 { (eval echo "$as_me:10531: \"$ac_try\"") >&5
10532 (eval $ac_try) 2>&5
10533 ac_status=$?
10534 echo "$as_me:10534: \$? = $ac_status" >&5
10535 (exit "$ac_status"); }; }; then
10536 cf_cv_dcl_sys_nerr=yes
10537 else
10538 echo "$as_me: failed program was:" >&5
10539 cat "conftest.$ac_ext" >&5
10540 cf_cv_dcl_sys_nerr=no
10541 fi
10542 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10543
10544 fi
10545 echo "$as_me:10545: result: $cf_cv_dcl_sys_nerr" >&5
10546 echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
10547
10548 if test "$cf_cv_dcl_sys_nerr" = no ; then
10549
10550 cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10551
10552 cat >>confdefs.h <<EOF
10553 #define $cf_result 1
10554 EOF
10555
10556 fi
10557
10558 # It's possible (for near-UNIX clones) that the data doesn't exist
10559
10560 echo "$as_me:10560: checking if external sys_nerr exists" >&5
10561 echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
10562 if test "${cf_cv_have_sys_nerr+set}" = set; then
10563 echo $ECHO_N "(cached) $ECHO_C" >&6
10564 else
10565
10566 cat >"conftest.$ac_ext" <<_ACEOF
10567 #line 10567 "configure"
10568 #include "confdefs.h"
10569
10570 #undef sys_nerr
10571 extern int sys_nerr;
10572
10573 int
10574 main (void)
10575 {
10576 sys_nerr = 2
10577 ;
10578 return 0;
10579 }
10580 _ACEOF
10581 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10582 if { (eval echo "$as_me:10582: \"$ac_link\"") >&5
10583 (eval $ac_link) 2>&5
10584 ac_status=$?
10585 echo "$as_me:10585: \$? = $ac_status" >&5
10586 (exit "$ac_status"); } &&
10587 { ac_try='test -s "conftest$ac_exeext"'
10588 { (eval echo "$as_me:10588: \"$ac_try\"") >&5
10589 (eval $ac_try) 2>&5
10590 ac_status=$?
10591 echo "$as_me:10591: \$? = $ac_status" >&5
10592 (exit "$ac_status"); }; }; then
10593 cf_cv_have_sys_nerr=yes
10594 else
10595 echo "$as_me: failed program was:" >&5
10596 cat "conftest.$ac_ext" >&5
10597 cf_cv_have_sys_nerr=no
10598 fi
10599 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10600
10601 fi
10602 echo "$as_me:10602: result: $cf_cv_have_sys_nerr" >&5
10603 echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
10604
10605 if test "$cf_cv_have_sys_nerr" = yes ; then
10606
10607 cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10608
10609 cat >>confdefs.h <<EOF
10610 #define $cf_result 1
10611 EOF
10612
10613 fi
10614
10615 echo "$as_me:10615: checking if external sys_errlist is declared" >&5
10616 echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
10617 if test "${cf_cv_dcl_sys_errlist+set}" = set; then
10618 echo $ECHO_N "(cached) $ECHO_C" >&6
10619 else
10620
10621 cat >"conftest.$ac_ext" <<_ACEOF
10622 #line 10622 "configure"
10623 #include "confdefs.h"
10624
10625 $ac_includes_default
10626 #include <errno.h>
10627 int
10628 main (void)
10629 {
10630 int x = (int) sys_errlist; (void)x
10631 ;
10632 return 0;
10633 }
10634 _ACEOF
10635 rm -f "conftest.$ac_objext"
10636 if { (eval echo "$as_me:10636: \"$ac_compile\"") >&5
10637 (eval $ac_compile) 2>&5
10638 ac_status=$?
10639 echo "$as_me:10639: \$? = $ac_status" >&5
10640 (exit "$ac_status"); } &&
10641 { ac_try='test -s "conftest.$ac_objext"'
10642 { (eval echo "$as_me:10642: \"$ac_try\"") >&5
10643 (eval $ac_try) 2>&5
10644 ac_status=$?
10645 echo "$as_me:10645: \$? = $ac_status" >&5
10646 (exit "$ac_status"); }; }; then
10647 cf_cv_dcl_sys_errlist=yes
10648 else
10649 echo "$as_me: failed program was:" >&5
10650 cat "conftest.$ac_ext" >&5
10651 cf_cv_dcl_sys_errlist=no
10652 fi
10653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10654
10655 fi
10656 echo "$as_me:10656: result: $cf_cv_dcl_sys_errlist" >&5
10657 echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
10658
10659 if test "$cf_cv_dcl_sys_errlist" = no ; then
10660
10661 cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10662
10663 cat >>confdefs.h <<EOF
10664 #define $cf_result 1
10665 EOF
10666
10667 fi
10668
10669 # It's possible (for near-UNIX clones) that the data doesn't exist
10670
10671 echo "$as_me:10671: checking if external sys_errlist exists" >&5
10672 echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
10673 if test "${cf_cv_have_sys_errlist+set}" = set; then
10674 echo $ECHO_N "(cached) $ECHO_C" >&6
10675 else
10676
10677 cat >"conftest.$ac_ext" <<_ACEOF
10678 #line 10678 "configure"
10679 #include "confdefs.h"
10680
10681 #undef sys_errlist
10682 extern int sys_errlist;
10683
10684 int
10685 main (void)
10686 {
10687 sys_errlist = 2
10688 ;
10689 return 0;
10690 }
10691 _ACEOF
10692 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10693 if { (eval echo "$as_me:10693: \"$ac_link\"") >&5
10694 (eval $ac_link) 2>&5
10695 ac_status=$?
10696 echo "$as_me:10696: \$? = $ac_status" >&5
10697 (exit "$ac_status"); } &&
10698 { ac_try='test -s "conftest$ac_exeext"'
10699 { (eval echo "$as_me:10699: \"$ac_try\"") >&5
10700 (eval $ac_try) 2>&5
10701 ac_status=$?
10702 echo "$as_me:10702: \$? = $ac_status" >&5
10703 (exit "$ac_status"); }; }; then
10704 cf_cv_have_sys_errlist=yes
10705 else
10706 echo "$as_me: failed program was:" >&5
10707 cat "conftest.$ac_ext" >&5
10708 cf_cv_have_sys_errlist=no
10709 fi
10710 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10711
10712 fi
10713 echo "$as_me:10713: result: $cf_cv_have_sys_errlist" >&5
10714 echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
10715
10716 if test "$cf_cv_have_sys_errlist" = yes ; then
10717
10718 cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10719
10720 cat >>confdefs.h <<EOF
10721 #define $cf_result 1
10722 EOF
10723
10724 fi
10725
10726 cf_save_LIBS_CF_SYSV="$LIBS"
10727 cf_save_CFLAGS_CF_SYSV="$CFLAGS"
10728 cf_save_CPPFLAGS_CF_SYSV="$CPPFLAGS"
10729 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
10730 for cf_X_CFLAGS in $X_CFLAGS
10731 do
10732 case "x$cf_X_CFLAGS" in
10733 x-[IUD]*)
10734 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
10735 ;;
10736 *)
10737 CFLAGS="$CFLAGS $cf_X_CFLAGS"
10738 ;;
10739 esac
10740 done
10741
10742 for ac_header in \
10743 termios.h \
10744 stdlib.h \
10745 X11/Intrinsic.h \
10746
10747 do
10748 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10749 echo "$as_me:10749: checking for $ac_header" >&5
10750 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10751 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10752 echo $ECHO_N "(cached) $ECHO_C" >&6
10753 else
10754 cat >"conftest.$ac_ext" <<_ACEOF
10755 #line 10755 "configure"
10756 #include "confdefs.h"
10757 #include <$ac_header>
10758 _ACEOF
10759 if { (eval echo "$as_me:10759: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10760 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10761 ac_status=$?
10762 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10763 rm -f conftest.er1
10764 cat conftest.err >&5
10765 echo "$as_me:10765: \$? = $ac_status" >&5
10766 (exit "$ac_status"); } >/dev/null; then
10767 if test -s conftest.err; then
10768 ac_cpp_err=$ac_c_preproc_warn_flag
10769 else
10770 ac_cpp_err=
10771 fi
10772 else
10773 ac_cpp_err=yes
10774 fi
10775 if test -z "$ac_cpp_err"; then
10776 eval "$as_ac_Header=yes"
10777 else
10778 echo "$as_me: failed program was:" >&5
10779 cat "conftest.$ac_ext" >&5
10780 eval "$as_ac_Header=no"
10781 fi
10782 rm -f conftest.err "conftest.$ac_ext"
10783 fi
10784 echo "$as_me:10784: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10785 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10786 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10787 cat >>confdefs.h <<EOF
10788 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10789 EOF
10790
10791 fi
10792 done
10793
10794 echo "$as_me:10794: checking if we should define SYSV" >&5
10795 echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
10796 if test "${cf_cv_sysv+set}" = set; then
10797 echo $ECHO_N "(cached) $ECHO_C" >&6
10798 else
10799
10800 cat >"conftest.$ac_ext" <<_ACEOF
10801 #line 10801 "configure"
10802 #include "confdefs.h"
10803
10804 #undef SYSV
10805 #define SYSV 1 /* get Xos.h to declare sys_errlist[] */
10806 #ifdef HAVE_STDLIB_H
10807 #include <stdlib.h> /* look for wchar_t */
10808 #endif
10809 #ifdef HAVE_X11_INTRINSIC_H
10810 #include <X11/Intrinsic.h> /* Intrinsic.h has other traps... */
10811 #endif
10812 #ifdef HAVE_TERMIOS_H /* needed for HPUX 10.20 */
10813 #include <termios.h>
10814 #define STRUCT_TERMIOS struct termios
10815 #else
10816 #define STRUCT_TERMIOS struct termio
10817 #endif
10818 #include <curses.h>
10819 #include <term.h> /* eliminate most BSD hacks */
10820 #include <errno.h> /* declare sys_errlist on older systems */
10821 #include <sys/termio.h> /* eliminate most of the remaining ones */
10822
10823 int
10824 main (void)
10825 {
10826
10827 static STRUCT_TERMIOS d_tio;
10828 d_tio.c_cc[VINTR] = 0;
10829 d_tio.c_cc[VQUIT] = 0;
10830 d_tio.c_cc[VERASE] = 0;
10831 d_tio.c_cc[VKILL] = 0;
10832 d_tio.c_cc[VEOF] = 0;
10833 d_tio.c_cc[VEOL] = 0;
10834 d_tio.c_cc[VMIN] = 0;
10835 d_tio.c_cc[VTIME] = 0;
10836 #if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
10837 sys_errlist[0] = ""; /* Cygwin mis-declares this */
10838 #endif
10839
10840 ;
10841 return 0;
10842 }
10843 _ACEOF
10844 rm -f "conftest.$ac_objext"
10845 if { (eval echo "$as_me:10845: \"$ac_compile\"") >&5
10846 (eval $ac_compile) 2>&5
10847 ac_status=$?
10848 echo "$as_me:10848: \$? = $ac_status" >&5
10849 (exit "$ac_status"); } &&
10850 { ac_try='test -s "conftest.$ac_objext"'
10851 { (eval echo "$as_me:10851: \"$ac_try\"") >&5
10852 (eval $ac_try) 2>&5
10853 ac_status=$?
10854 echo "$as_me:10854: \$? = $ac_status" >&5
10855 (exit "$ac_status"); }; }; then
10856 cf_cv_sysv=yes
10857 else
10858 echo "$as_me: failed program was:" >&5
10859 cat "conftest.$ac_ext" >&5
10860 cf_cv_sysv=no
10861 fi
10862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10863
10864 fi
10865 echo "$as_me:10865: result: $cf_cv_sysv" >&5
10866 echo "${ECHO_T}$cf_cv_sysv" >&6
10867 test "$cf_cv_sysv" = yes &&
10868 cat >>confdefs.h <<\EOF
10869 #define SYSV 1
10870 EOF
10871
10872 LIBS="$cf_save_LIBS_CF_SYSV"
10873 CFLAGS="$cf_save_CFLAGS_CF_SYSV"
10874 CPPFLAGS="$cf_save_CPPFLAGS_CF_SYSV"
10875
10876 echo "$as_me:10876: checking for elf_begin in -lelf" >&5
10877 echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
10878 if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
10879 echo $ECHO_N "(cached) $ECHO_C" >&6
10880 else
10881 ac_check_lib_save_LIBS=$LIBS
10882 LIBS="-lelf $LIBS"
10883 cat >"conftest.$ac_ext" <<_ACEOF
10884 #line 10884 "configure"
10885 #include "confdefs.h"
10886
10887 /* Override any gcc2 internal prototype to avoid an error. */
10888 #ifdef __cplusplus
10889 extern "C"
10890 #endif
10891 /* We use char because int might match the return type of a gcc2
10892 builtin and then its argument prototype would still apply. */
10893 char elf_begin (void);
10894 int
10895 main (void)
10896 {
10897 elf_begin ();
10898 ;
10899 return 0;
10900 }
10901 _ACEOF
10902 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10903 if { (eval echo "$as_me:10903: \"$ac_link\"") >&5
10904 (eval $ac_link) 2>&5
10905 ac_status=$?
10906 echo "$as_me:10906: \$? = $ac_status" >&5
10907 (exit "$ac_status"); } &&
10908 { ac_try='test -s "conftest$ac_exeext"'
10909 { (eval echo "$as_me:10909: \"$ac_try\"") >&5
10910 (eval $ac_try) 2>&5
10911 ac_status=$?
10912 echo "$as_me:10912: \$? = $ac_status" >&5
10913 (exit "$ac_status"); }; }; then
10914 ac_cv_lib_elf_elf_begin=yes
10915 else
10916 echo "$as_me: failed program was:" >&5
10917 cat "conftest.$ac_ext" >&5
10918 ac_cv_lib_elf_elf_begin=no
10919 fi
10920 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10921 LIBS=$ac_check_lib_save_LIBS
10922 fi
10923 echo "$as_me:10923: result: $ac_cv_lib_elf_elf_begin" >&5
10924 echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
10925 if test "$ac_cv_lib_elf_elf_begin" = yes; then
10926
10927 echo "$as_me:10927: checking if this is an SVR4 system" >&5
10928 echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
10929 if test "${cf_cv_svr4+set}" = set; then
10930 echo $ECHO_N "(cached) $ECHO_C" >&6
10931 else
10932
10933 cat >"conftest.$ac_ext" <<_ACEOF
10934 #line 10934 "configure"
10935 #include "confdefs.h"
10936
10937 #if defined(__CYGWIN__)
10938 #error Cygwin is not SVr4
10939 #endif
10940 #include <elf.h>
10941 #include <sys/termio.h>
10942
10943 int
10944 main (void)
10945 {
10946
10947 static struct termio d_tio;
10948 d_tio.c_cc[VINTR] = 0;
10949 d_tio.c_cc[VQUIT] = 0;
10950 d_tio.c_cc[VERASE] = 0;
10951 d_tio.c_cc[VKILL] = 0;
10952 d_tio.c_cc[VEOF] = 0;
10953 d_tio.c_cc[VEOL] = 0;
10954 d_tio.c_cc[VMIN] = 0;
10955 d_tio.c_cc[VTIME] = 0;
10956 d_tio.c_cc[VLNEXT] = 0;
10957
10958 ;
10959 return 0;
10960 }
10961 _ACEOF
10962 rm -f "conftest.$ac_objext"
10963 if { (eval echo "$as_me:10963: \"$ac_compile\"") >&5
10964 (eval $ac_compile) 2>&5
10965 ac_status=$?
10966 echo "$as_me:10966: \$? = $ac_status" >&5
10967 (exit "$ac_status"); } &&
10968 { ac_try='test -s "conftest.$ac_objext"'
10969 { (eval echo "$as_me:10969: \"$ac_try\"") >&5
10970 (eval $ac_try) 2>&5
10971 ac_status=$?
10972 echo "$as_me:10972: \$? = $ac_status" >&5
10973 (exit "$ac_status"); }; }; then
10974 cf_cv_svr4=yes
10975 else
10976 echo "$as_me: failed program was:" >&5
10977 cat "conftest.$ac_ext" >&5
10978 cf_cv_svr4=no
10979 fi
10980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10981
10982 fi
10983 echo "$as_me:10983: result: $cf_cv_svr4" >&5
10984 echo "${ECHO_T}$cf_cv_svr4" >&6
10985
10986 fi
10987
10988 test "$cf_cv_svr4" = yes &&
10989 cat >>confdefs.h <<\EOF
10990 #define SVR4 1
10991 EOF
10992
10993 echo "$as_me:10993: checking if you want to use pkg-config" >&5
10994 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
10995
10996 # Check whether --with-pkg-config or --without-pkg-config was given.
10997 if test "${with_pkg_config+set}" = set; then
10998 withval="$with_pkg_config"
10999 cf_pkg_config=$withval
11000 else
11001 cf_pkg_config=yes
11002 fi;
11003 echo "$as_me:11003: result: $cf_pkg_config" >&5
11004 echo "${ECHO_T}$cf_pkg_config" >&6
11005
11006 case "$cf_pkg_config" in
11007 (no)
11008 PKG_CONFIG=none
11009 ;;
11010 (yes)
11011
11012 if test -n "$ac_tool_prefix"; then
11013 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
11014 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
11015 echo "$as_me:11015: checking for $ac_word" >&5
11016 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11017 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
11019 else
11020 case $PKG_CONFIG in
11021 [\\/]* | ?:[\\/]*)
11022 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11023 ;;
11024 *)
11025 ac_save_IFS=$IFS; IFS=$ac_path_separator
11026 ac_dummy="$PATH"
11027 for ac_dir in $ac_dummy; do
11028 IFS=$ac_save_IFS
11029 test -z "$ac_dir" && ac_dir=.
11030 if $as_executable_p "$ac_dir/$ac_word"; then
11031 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
11032 echo "$as_me:11032: found $ac_dir/$ac_word" >&5
11033 break
11034 fi
11035 done
11036
11037 ;;
11038 esac
11039 fi
11040 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11041
11042 if test -n "$PKG_CONFIG"; then
11043 echo "$as_me:11043: result: $PKG_CONFIG" >&5
11044 echo "${ECHO_T}$PKG_CONFIG" >&6
11045 else
11046 echo "$as_me:11046: result: no" >&5
11047 echo "${ECHO_T}no" >&6
11048 fi
11049
11050 fi
11051 if test -z "$ac_cv_path_PKG_CONFIG"; then
11052 ac_pt_PKG_CONFIG=$PKG_CONFIG
11053 # Extract the first word of "pkg-config", so it can be a program name with args.
11054 set dummy pkg-config; ac_word=$2
11055 echo "$as_me:11055: checking for $ac_word" >&5
11056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11057 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
11058 echo $ECHO_N "(cached) $ECHO_C" >&6
11059 else
11060 case $ac_pt_PKG_CONFIG in
11061 [\\/]* | ?:[\\/]*)
11062 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
11063 ;;
11064 *)
11065 ac_save_IFS=$IFS; IFS=$ac_path_separator
11066 ac_dummy="$PATH"
11067 for ac_dir in $ac_dummy; do
11068 IFS=$ac_save_IFS
11069 test -z "$ac_dir" && ac_dir=.
11070 if $as_executable_p "$ac_dir/$ac_word"; then
11071 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
11072 echo "$as_me:11072: found $ac_dir/$ac_word" >&5
11073 break
11074 fi
11075 done
11076
11077 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
11078 ;;
11079 esac
11080 fi
11081 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
11082
11083 if test -n "$ac_pt_PKG_CONFIG"; then
11084 echo "$as_me:11084: result: $ac_pt_PKG_CONFIG" >&5
11085 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
11086 else
11087 echo "$as_me:11087: result: no" >&5
11088 echo "${ECHO_T}no" >&6
11089 fi
11090
11091 PKG_CONFIG=$ac_pt_PKG_CONFIG
11092 else
11093 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
11094 fi
11095
11096 ;;
11097 (*)
11098 PKG_CONFIG=$withval
11099 ;;
11100 esac
11101
11102 test -z "$PKG_CONFIG" && PKG_CONFIG=none
11103 if test "$PKG_CONFIG" != none ; then
11104
11105 if test "x$prefix" != xNONE; then
11106 cf_path_syntax="$prefix"
11107 else
11108 cf_path_syntax="$ac_default_prefix"
11109 fi
11110
11111 case ".$PKG_CONFIG" in
11112 (.\$\(*\)*|.\'*\'*)
11113 ;;
11114 (..|./*|.\\*)
11115 ;;
11116 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11117 ;;
11118 (.\$\{*prefix\}*|.\$\{*dir\}*)
11119 eval PKG_CONFIG="$PKG_CONFIG"
11120 case ".$PKG_CONFIG" in
11121 (.NONE/*)
11122 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
11123 ;;
11124 esac
11125 ;;
11126 (.no|.NONE/*)
11127 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
11128 ;;
11129 (*)
11130 { { echo "$as_me:11130: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
11131 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
11132 { (exit 1); exit 1; }; }
11133 ;;
11134 esac
11135
11136 elif test "x$cf_pkg_config" != xno ; then
11137 { echo "$as_me:11137: WARNING: pkg-config is not installed" >&5
11138 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
11139 fi
11140
11141 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
11142 # in some cases has installed dummy files in the former, other cases replaced
11143 # it with a link to the new location). This complicates the configure script.
11144 # Check for that pitfall, and recover using pkg-config
11145 #
11146 # If none of these are set, the configuration is almost certainly broken.
11147 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11148 then
11149
11150 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
11151 test -n "$verbose" && echo " found package x11" 1>&6
11152
11153 echo "${as_me:-configure}:11153: testing found package x11 ..." 1>&5
11154
11155 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
11156 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
11157 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11158
11159 echo "${as_me:-configure}:11159: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11160
11161 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11162
11163 echo "${as_me:-configure}:11163: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11164
11165 cf_fix_cppflags=no
11166 cf_new_cflags=
11167 cf_new_cppflags=
11168 cf_new_extra_cppflags=
11169
11170 for cf_add_cflags in $cf_pkgconfig_incs
11171 do
11172 case "$cf_fix_cppflags" in
11173 (no)
11174 case "$cf_add_cflags" in
11175 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11176 case "$cf_add_cflags" in
11177 (-D*)
11178 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11179
11180 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11181 && test -z "${cf_tst_cflags}" \
11182 && cf_fix_cppflags=yes
11183
11184 if test "$cf_fix_cppflags" = yes ; then
11185
11186 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11187 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11188
11189 continue
11190 elif test "${cf_tst_cflags}" = "\"'" ; then
11191
11192 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11193 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11194
11195 continue
11196 fi
11197 ;;
11198 esac
11199 case "$CPPFLAGS" in
11200 (*$cf_add_cflags)
11201 ;;
11202 (*)
11203 case "$cf_add_cflags" in
11204 (-D*)
11205 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11206
11207 CPPFLAGS=`echo "$CPPFLAGS" | \
11208 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11209 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11210
11211 ;;
11212 esac
11213
11214 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11215 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11216
11217 ;;
11218 esac
11219 ;;
11220 (*)
11221
11222 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11223 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11224
11225 ;;
11226 esac
11227 ;;
11228 (yes)
11229
11230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11232
11233 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11234
11235 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11236 && test -z "${cf_tst_cflags}" \
11237 && cf_fix_cppflags=no
11238 ;;
11239 esac
11240 done
11241
11242 if test -n "$cf_new_cflags" ; then
11243
11244 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11245 CFLAGS="${CFLAGS}$cf_new_cflags"
11246
11247 fi
11248
11249 if test -n "$cf_new_cppflags" ; then
11250
11251 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11252 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11253
11254 fi
11255
11256 if test -n "$cf_new_extra_cppflags" ; then
11257
11258 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11259 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11260
11261 fi
11262
11263 cf_add_libs="$LIBS"
11264 # reverse order
11265 cf_add_0lib=
11266 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11267 # filter duplicates
11268 for cf_add_1lib in $cf_add_0lib; do
11269 for cf_add_2lib in $cf_add_libs; do
11270 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11271 cf_add_1lib=
11272 break
11273 fi
11274 done
11275 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11276 done
11277 LIBS="$cf_add_libs"
11278
11279 :
11280 else
11281 cf_pkgconfig_incs=
11282 cf_pkgconfig_libs=
11283 { echo "$as_me:11283: WARNING: unable to find X11 library" >&5
11284 echo "$as_me: WARNING: unable to find X11 library" >&2;}
11285 fi
11286
11287 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
11288 test -n "$verbose" && echo " found package ice" 1>&6
11289
11290 echo "${as_me:-configure}:11290: testing found package ice ..." 1>&5
11291
11292 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
11293 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
11294 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11295
11296 echo "${as_me:-configure}:11296: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11297
11298 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11299
11300 echo "${as_me:-configure}:11300: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11301
11302 cf_fix_cppflags=no
11303 cf_new_cflags=
11304 cf_new_cppflags=
11305 cf_new_extra_cppflags=
11306
11307 for cf_add_cflags in $cf_pkgconfig_incs
11308 do
11309 case "$cf_fix_cppflags" in
11310 (no)
11311 case "$cf_add_cflags" in
11312 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11313 case "$cf_add_cflags" in
11314 (-D*)
11315 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11316
11317 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11318 && test -z "${cf_tst_cflags}" \
11319 && cf_fix_cppflags=yes
11320
11321 if test "$cf_fix_cppflags" = yes ; then
11322
11323 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11324 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11325
11326 continue
11327 elif test "${cf_tst_cflags}" = "\"'" ; then
11328
11329 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11330 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11331
11332 continue
11333 fi
11334 ;;
11335 esac
11336 case "$CPPFLAGS" in
11337 (*$cf_add_cflags)
11338 ;;
11339 (*)
11340 case "$cf_add_cflags" in
11341 (-D*)
11342 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11343
11344 CPPFLAGS=`echo "$CPPFLAGS" | \
11345 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11346 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11347
11348 ;;
11349 esac
11350
11351 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11352 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11353
11354 ;;
11355 esac
11356 ;;
11357 (*)
11358
11359 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11360 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11361
11362 ;;
11363 esac
11364 ;;
11365 (yes)
11366
11367 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11368 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11369
11370 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11371
11372 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11373 && test -z "${cf_tst_cflags}" \
11374 && cf_fix_cppflags=no
11375 ;;
11376 esac
11377 done
11378
11379 if test -n "$cf_new_cflags" ; then
11380
11381 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11382 CFLAGS="${CFLAGS}$cf_new_cflags"
11383
11384 fi
11385
11386 if test -n "$cf_new_cppflags" ; then
11387
11388 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11389 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11390
11391 fi
11392
11393 if test -n "$cf_new_extra_cppflags" ; then
11394
11395 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11396 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11397
11398 fi
11399
11400 cf_add_libs="$LIBS"
11401 # reverse order
11402 cf_add_0lib=
11403 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11404 # filter duplicates
11405 for cf_add_1lib in $cf_add_0lib; do
11406 for cf_add_2lib in $cf_add_libs; do
11407 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11408 cf_add_1lib=
11409 break
11410 fi
11411 done
11412 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11413 done
11414 LIBS="$cf_add_libs"
11415
11416 :
11417 else
11418 cf_pkgconfig_incs=
11419 cf_pkgconfig_libs=
11420 { echo "$as_me:11420: WARNING: unable to find ICE library" >&5
11421 echo "$as_me: WARNING: unable to find ICE library" >&2;}
11422 fi
11423
11424 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
11425 test -n "$verbose" && echo " found package sm" 1>&6
11426
11427 echo "${as_me:-configure}:11427: testing found package sm ..." 1>&5
11428
11429 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
11430 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
11431 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11432
11433 echo "${as_me:-configure}:11433: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11434
11435 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11436
11437 echo "${as_me:-configure}:11437: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11438
11439 cf_fix_cppflags=no
11440 cf_new_cflags=
11441 cf_new_cppflags=
11442 cf_new_extra_cppflags=
11443
11444 for cf_add_cflags in $cf_pkgconfig_incs
11445 do
11446 case "$cf_fix_cppflags" in
11447 (no)
11448 case "$cf_add_cflags" in
11449 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11450 case "$cf_add_cflags" in
11451 (-D*)
11452 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11453
11454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11455 && test -z "${cf_tst_cflags}" \
11456 && cf_fix_cppflags=yes
11457
11458 if test "$cf_fix_cppflags" = yes ; then
11459
11460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11462
11463 continue
11464 elif test "${cf_tst_cflags}" = "\"'" ; then
11465
11466 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11467 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11468
11469 continue
11470 fi
11471 ;;
11472 esac
11473 case "$CPPFLAGS" in
11474 (*$cf_add_cflags)
11475 ;;
11476 (*)
11477 case "$cf_add_cflags" in
11478 (-D*)
11479 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11480
11481 CPPFLAGS=`echo "$CPPFLAGS" | \
11482 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11483 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11484
11485 ;;
11486 esac
11487
11488 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11489 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11490
11491 ;;
11492 esac
11493 ;;
11494 (*)
11495
11496 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11497 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11498
11499 ;;
11500 esac
11501 ;;
11502 (yes)
11503
11504 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11505 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11506
11507 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11508
11509 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11510 && test -z "${cf_tst_cflags}" \
11511 && cf_fix_cppflags=no
11512 ;;
11513 esac
11514 done
11515
11516 if test -n "$cf_new_cflags" ; then
11517
11518 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11519 CFLAGS="${CFLAGS}$cf_new_cflags"
11520
11521 fi
11522
11523 if test -n "$cf_new_cppflags" ; then
11524
11525 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11526 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11527
11528 fi
11529
11530 if test -n "$cf_new_extra_cppflags" ; then
11531
11532 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11533 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11534
11535 fi
11536
11537 cf_add_libs="$LIBS"
11538 # reverse order
11539 cf_add_0lib=
11540 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11541 # filter duplicates
11542 for cf_add_1lib in $cf_add_0lib; do
11543 for cf_add_2lib in $cf_add_libs; do
11544 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11545 cf_add_1lib=
11546 break
11547 fi
11548 done
11549 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11550 done
11551 LIBS="$cf_add_libs"
11552
11553 :
11554 else
11555 cf_pkgconfig_incs=
11556 cf_pkgconfig_libs=
11557 { echo "$as_me:11557: WARNING: unable to find SM library" >&5
11558 echo "$as_me: WARNING: unable to find SM library" >&2;}
11559 fi
11560
11561 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
11562 test -n "$verbose" && echo " found package xt" 1>&6
11563
11564 echo "${as_me:-configure}:11564: testing found package xt ..." 1>&5
11565
11566 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
11567 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
11568 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11569
11570 echo "${as_me:-configure}:11570: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11571
11572 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11573
11574 echo "${as_me:-configure}:11574: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11575
11576 cf_fix_cppflags=no
11577 cf_new_cflags=
11578 cf_new_cppflags=
11579 cf_new_extra_cppflags=
11580
11581 for cf_add_cflags in $cf_pkgconfig_incs
11582 do
11583 case "$cf_fix_cppflags" in
11584 (no)
11585 case "$cf_add_cflags" in
11586 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11587 case "$cf_add_cflags" in
11588 (-D*)
11589 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11590
11591 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11592 && test -z "${cf_tst_cflags}" \
11593 && cf_fix_cppflags=yes
11594
11595 if test "$cf_fix_cppflags" = yes ; then
11596
11597 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11598 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11599
11600 continue
11601 elif test "${cf_tst_cflags}" = "\"'" ; then
11602
11603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11605
11606 continue
11607 fi
11608 ;;
11609 esac
11610 case "$CPPFLAGS" in
11611 (*$cf_add_cflags)
11612 ;;
11613 (*)
11614 case "$cf_add_cflags" in
11615 (-D*)
11616 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11617
11618 CPPFLAGS=`echo "$CPPFLAGS" | \
11619 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11620 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11621
11622 ;;
11623 esac
11624
11625 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11626 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11627
11628 ;;
11629 esac
11630 ;;
11631 (*)
11632
11633 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11634 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11635
11636 ;;
11637 esac
11638 ;;
11639 (yes)
11640
11641 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11642 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11643
11644 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11645
11646 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11647 && test -z "${cf_tst_cflags}" \
11648 && cf_fix_cppflags=no
11649 ;;
11650 esac
11651 done
11652
11653 if test -n "$cf_new_cflags" ; then
11654
11655 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11656 CFLAGS="${CFLAGS}$cf_new_cflags"
11657
11658 fi
11659
11660 if test -n "$cf_new_cppflags" ; then
11661
11662 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11663 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11664
11665 fi
11666
11667 if test -n "$cf_new_extra_cppflags" ; then
11668
11669 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11670 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11671
11672 fi
11673
11674 cf_add_libs="$LIBS"
11675 # reverse order
11676 cf_add_0lib=
11677 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11678 # filter duplicates
11679 for cf_add_1lib in $cf_add_0lib; do
11680 for cf_add_2lib in $cf_add_libs; do
11681 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11682 cf_add_1lib=
11683 break
11684 fi
11685 done
11686 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11687 done
11688 LIBS="$cf_add_libs"
11689
11690 :
11691 else
11692 cf_pkgconfig_incs=
11693 cf_pkgconfig_libs=
11694 { echo "$as_me:11694: WARNING: unable to find Xt library" >&5
11695 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11696 fi
11697
11698 else
11699 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11700 fi
11701
11702 cf_have_X_LIBS=no
11703
11704 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
11705 test -n "$verbose" && echo " found package xt" 1>&6
11706
11707 echo "${as_me:-configure}:11707: testing found package xt ..." 1>&5
11708
11709 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
11710 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
11711 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11712
11713 echo "${as_me:-configure}:11713: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11714
11715 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11716
11717 echo "${as_me:-configure}:11717: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11718
11719 cf_fix_cppflags=no
11720 cf_new_cflags=
11721 cf_new_cppflags=
11722 cf_new_extra_cppflags=
11723
11724 for cf_add_cflags in $cf_pkgconfig_incs
11725 do
11726 case "$cf_fix_cppflags" in
11727 (no)
11728 case "$cf_add_cflags" in
11729 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11730 case "$cf_add_cflags" in
11731 (-D*)
11732 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11733
11734 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11735 && test -z "${cf_tst_cflags}" \
11736 && cf_fix_cppflags=yes
11737
11738 if test "$cf_fix_cppflags" = yes ; then
11739
11740 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11741 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11742
11743 continue
11744 elif test "${cf_tst_cflags}" = "\"'" ; then
11745
11746 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11747 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11748
11749 continue
11750 fi
11751 ;;
11752 esac
11753 case "$CPPFLAGS" in
11754 (*$cf_add_cflags)
11755 ;;
11756 (*)
11757 case "$cf_add_cflags" in
11758 (-D*)
11759 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11760
11761 CPPFLAGS=`echo "$CPPFLAGS" | \
11762 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11763 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11764
11765 ;;
11766 esac
11767
11768 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11769 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11770
11771 ;;
11772 esac
11773 ;;
11774 (*)
11775
11776 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11777 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11778
11779 ;;
11780 esac
11781 ;;
11782 (yes)
11783
11784 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11785 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11786
11787 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11788
11789 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11790 && test -z "${cf_tst_cflags}" \
11791 && cf_fix_cppflags=no
11792 ;;
11793 esac
11794 done
11795
11796 if test -n "$cf_new_cflags" ; then
11797
11798 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11799 CFLAGS="${CFLAGS}$cf_new_cflags"
11800
11801 fi
11802
11803 if test -n "$cf_new_cppflags" ; then
11804
11805 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11806 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11807
11808 fi
11809
11810 if test -n "$cf_new_extra_cppflags" ; then
11811
11812 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11813 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11814
11815 fi
11816
11817 cf_add_libs="$LIBS"
11818 # reverse order
11819 cf_add_0lib=
11820 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11821 # filter duplicates
11822 for cf_add_1lib in $cf_add_0lib; do
11823 for cf_add_2lib in $cf_add_libs; do
11824 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11825 cf_add_1lib=
11826 break
11827 fi
11828 done
11829 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11830 done
11831 LIBS="$cf_add_libs"
11832
11833 case "x$LIBS" in
11834 (*-lX11*)
11835 ;;
11836 (*)
11837 # we have an "xt" package, but it may omit Xt's dependency on X11
11838 echo "$as_me:11838: checking for usable X dependency" >&5
11839 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11840 if test "${cf_cv_xt_x11_compat+set}" = set; then
11841 echo $ECHO_N "(cached) $ECHO_C" >&6
11842 else
11843
11844 cat >"conftest.$ac_ext" <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11847
11848 $ac_includes_default
11849 #include <X11/Xlib.h>
11850
11851 int
11852 main (void)
11853 {
11854
11855 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11856 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11857 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11858 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11859
11860 ;
11861 return 0;
11862 }
11863 _ACEOF
11864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11865 if { (eval echo "$as_me:11865: \"$ac_link\"") >&5
11866 (eval $ac_link) 2>&5
11867 ac_status=$?
11868 echo "$as_me:11868: \$? = $ac_status" >&5
11869 (exit "$ac_status"); } &&
11870 { ac_try='test -s "conftest$ac_exeext"'
11871 { (eval echo "$as_me:11871: \"$ac_try\"") >&5
11872 (eval $ac_try) 2>&5
11873 ac_status=$?
11874 echo "$as_me:11874: \$? = $ac_status" >&5
11875 (exit "$ac_status"); }; }; then
11876 cf_cv_xt_x11_compat=yes
11877 else
11878 echo "$as_me: failed program was:" >&5
11879 cat "conftest.$ac_ext" >&5
11880 cf_cv_xt_x11_compat=no
11881 fi
11882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11883 fi
11884 echo "$as_me:11884: result: $cf_cv_xt_x11_compat" >&5
11885 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11886 if test "$cf_cv_xt_x11_compat" = no
11887 then
11888 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11889
11890 echo "${as_me:-configure}:11890: testing work around broken X11 dependency ..." 1>&5
11891
11892 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11893
11894 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
11895 test -n "$verbose" && echo " found package x11" 1>&6
11896
11897 echo "${as_me:-configure}:11897: testing found package x11 ..." 1>&5
11898
11899 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
11900 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
11901 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11902
11903 echo "${as_me:-configure}:11903: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11904
11905 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11906
11907 echo "${as_me:-configure}:11907: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11908
11909 cf_fix_cppflags=no
11910 cf_new_cflags=
11911 cf_new_cppflags=
11912 cf_new_extra_cppflags=
11913
11914 for cf_add_cflags in $cf_pkgconfig_incs
11915 do
11916 case "$cf_fix_cppflags" in
11917 (no)
11918 case "$cf_add_cflags" in
11919 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11920 case "$cf_add_cflags" in
11921 (-D*)
11922 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11923
11924 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11925 && test -z "${cf_tst_cflags}" \
11926 && cf_fix_cppflags=yes
11927
11928 if test "$cf_fix_cppflags" = yes ; then
11929
11930 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11931 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11932
11933 continue
11934 elif test "${cf_tst_cflags}" = "\"'" ; then
11935
11936 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11937 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11938
11939 continue
11940 fi
11941 ;;
11942 esac
11943 case "$CPPFLAGS" in
11944 (*$cf_add_cflags)
11945 ;;
11946 (*)
11947 case "$cf_add_cflags" in
11948 (-D*)
11949 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11950
11951 CPPFLAGS=`echo "$CPPFLAGS" | \
11952 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11953 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11954
11955 ;;
11956 esac
11957
11958 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11959 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11960
11961 ;;
11962 esac
11963 ;;
11964 (*)
11965
11966 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11967 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11968
11969 ;;
11970 esac
11971 ;;
11972 (yes)
11973
11974 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11975 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11976
11977 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11978
11979 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11980 && test -z "${cf_tst_cflags}" \
11981 && cf_fix_cppflags=no
11982 ;;
11983 esac
11984 done
11985
11986 if test -n "$cf_new_cflags" ; then
11987
11988 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11989 CFLAGS="${CFLAGS}$cf_new_cflags"
11990
11991 fi
11992
11993 if test -n "$cf_new_cppflags" ; then
11994
11995 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11996 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11997
11998 fi
11999
12000 if test -n "$cf_new_extra_cppflags" ; then
12001
12002 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12003 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12004
12005 fi
12006
12007 cf_add_libs="$LIBS"
12008 # reverse order
12009 cf_add_0lib=
12010 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12011 # filter duplicates
12012 for cf_add_1lib in $cf_add_0lib; do
12013 for cf_add_2lib in $cf_add_libs; do
12014 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12015 cf_add_1lib=
12016 break
12017 fi
12018 done
12019 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12020 done
12021 LIBS="$cf_add_libs"
12022
12023 :
12024 else
12025 cf_pkgconfig_incs=
12026 cf_pkgconfig_libs=
12027
12028 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12029
12030 echo "${as_me:-configure}:12030: testing ...before $LIBS ..." 1>&5
12031
12032 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
12033 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12034
12035 echo "${as_me:-configure}:12035: testing ...after $LIBS ..." 1>&5
12036
12037 fi
12038
12039 fi
12040 ;;
12041 esac
12042
12043 echo "$as_me:12043: checking for usable X Toolkit package" >&5
12044 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12045 if test "${cf_cv_xt_ice_compat+set}" = set; then
12046 echo $ECHO_N "(cached) $ECHO_C" >&6
12047 else
12048
12049 cat >"conftest.$ac_ext" <<_ACEOF
12050 #line 12050 "configure"
12051 #include "confdefs.h"
12052
12053 $ac_includes_default
12054 #include <X11/Shell.h>
12055
12056 int
12057 main (void)
12058 {
12059 int num = IceConnectionNumber(0); (void) num
12060
12061 ;
12062 return 0;
12063 }
12064 _ACEOF
12065 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12066 if { (eval echo "$as_me:12066: \"$ac_link\"") >&5
12067 (eval $ac_link) 2>&5
12068 ac_status=$?
12069 echo "$as_me:12069: \$? = $ac_status" >&5
12070 (exit "$ac_status"); } &&
12071 { ac_try='test -s "conftest$ac_exeext"'
12072 { (eval echo "$as_me:12072: \"$ac_try\"") >&5
12073 (eval $ac_try) 2>&5
12074 ac_status=$?
12075 echo "$as_me:12075: \$? = $ac_status" >&5
12076 (exit "$ac_status"); }; }; then
12077 cf_cv_xt_ice_compat=yes
12078 else
12079 echo "$as_me: failed program was:" >&5
12080 cat "conftest.$ac_ext" >&5
12081 cf_cv_xt_ice_compat=no
12082 fi
12083 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12084 fi
12085 echo "$as_me:12085: result: $cf_cv_xt_ice_compat" >&5
12086 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12087
12088 if test "$cf_cv_xt_ice_compat" = no
12089 then
12090 # workaround for broken ".pc" files used for X Toolkit.
12091 case "x$X_PRE_LIBS" in
12092 (*-lICE*)
12093 case "x$LIBS" in
12094 (*-lICE*)
12095 ;;
12096 (*)
12097 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
12098
12099 echo "${as_me:-configure}:12099: testing work around broken ICE dependency ..." 1>&5
12100
12101 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
12102 test -n "$verbose" && echo " found package ice" 1>&6
12103
12104 echo "${as_me:-configure}:12104: testing found package ice ..." 1>&5
12105
12106 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
12107 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
12108 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12109
12110 echo "${as_me:-configure}:12110: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12111
12112 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
12113
12114 echo "${as_me:-configure}:12114: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12115
12116 cf_fix_cppflags=no
12117 cf_new_cflags=
12118 cf_new_cppflags=
12119 cf_new_extra_cppflags=
12120
12121 for cf_add_cflags in $cf_pkgconfig_incs
12122 do
12123 case "$cf_fix_cppflags" in
12124 (no)
12125 case "$cf_add_cflags" in
12126 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12127 case "$cf_add_cflags" in
12128 (-D*)
12129 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12130
12131 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12132 && test -z "${cf_tst_cflags}" \
12133 && cf_fix_cppflags=yes
12134
12135 if test "$cf_fix_cppflags" = yes ; then
12136
12137 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12138 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12139
12140 continue
12141 elif test "${cf_tst_cflags}" = "\"'" ; then
12142
12143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12145
12146 continue
12147 fi
12148 ;;
12149 esac
12150 case "$CPPFLAGS" in
12151 (*$cf_add_cflags)
12152 ;;
12153 (*)
12154 case "$cf_add_cflags" in
12155 (-D*)
12156 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12157
12158 CPPFLAGS=`echo "$CPPFLAGS" | \
12159 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12160 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12161
12162 ;;
12163 esac
12164
12165 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12166 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12167
12168 ;;
12169 esac
12170 ;;
12171 (*)
12172
12173 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12174 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12175
12176 ;;
12177 esac
12178 ;;
12179 (yes)
12180
12181 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12182 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12183
12184 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12185
12186 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12187 && test -z "${cf_tst_cflags}" \
12188 && cf_fix_cppflags=no
12189 ;;
12190 esac
12191 done
12192
12193 if test -n "$cf_new_cflags" ; then
12194
12195 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12196 CFLAGS="${CFLAGS}$cf_new_cflags"
12197
12198 fi
12199
12200 if test -n "$cf_new_cppflags" ; then
12201
12202 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12203 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12204
12205 fi
12206
12207 if test -n "$cf_new_extra_cppflags" ; then
12208
12209 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12210 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12211
12212 fi
12213
12214 cf_add_libs="$LIBS"
12215 # reverse order
12216 cf_add_0lib=
12217 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12218 # filter duplicates
12219 for cf_add_1lib in $cf_add_0lib; do
12220 for cf_add_2lib in $cf_add_libs; do
12221 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12222 cf_add_1lib=
12223 break
12224 fi
12225 done
12226 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12227 done
12228 LIBS="$cf_add_libs"
12229
12230 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
12231 test -n "$verbose" && echo " found package sm" 1>&6
12232
12233 echo "${as_me:-configure}:12233: testing found package sm ..." 1>&5
12234
12235 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
12236 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
12237 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12238
12239 echo "${as_me:-configure}:12239: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12240
12241 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12242
12243 echo "${as_me:-configure}:12243: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12244
12245 cf_fix_cppflags=no
12246 cf_new_cflags=
12247 cf_new_cppflags=
12248 cf_new_extra_cppflags=
12249
12250 for cf_add_cflags in $cf_pkgconfig_incs
12251 do
12252 case "$cf_fix_cppflags" in
12253 (no)
12254 case "$cf_add_cflags" in
12255 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12256 case "$cf_add_cflags" in
12257 (-D*)
12258 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12259
12260 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12261 && test -z "${cf_tst_cflags}" \
12262 && cf_fix_cppflags=yes
12263
12264 if test "$cf_fix_cppflags" = yes ; then
12265
12266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12268
12269 continue
12270 elif test "${cf_tst_cflags}" = "\"'" ; then
12271
12272 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12273 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12274
12275 continue
12276 fi
12277 ;;
12278 esac
12279 case "$CPPFLAGS" in
12280 (*$cf_add_cflags)
12281 ;;
12282 (*)
12283 case "$cf_add_cflags" in
12284 (-D*)
12285 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12286
12287 CPPFLAGS=`echo "$CPPFLAGS" | \
12288 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12289 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12290
12291 ;;
12292 esac
12293
12294 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12295 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12296
12297 ;;
12298 esac
12299 ;;
12300 (*)
12301
12302 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12303 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12304
12305 ;;
12306 esac
12307 ;;
12308 (yes)
12309
12310 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12311 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12312
12313 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12314
12315 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12316 && test -z "${cf_tst_cflags}" \
12317 && cf_fix_cppflags=no
12318 ;;
12319 esac
12320 done
12321
12322 if test -n "$cf_new_cflags" ; then
12323
12324 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12325 CFLAGS="${CFLAGS}$cf_new_cflags"
12326
12327 fi
12328
12329 if test -n "$cf_new_cppflags" ; then
12330
12331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12332 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12333
12334 fi
12335
12336 if test -n "$cf_new_extra_cppflags" ; then
12337
12338 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12339 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12340
12341 fi
12342
12343 cf_add_libs="$LIBS"
12344 # reverse order
12345 cf_add_0lib=
12346 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12347 # filter duplicates
12348 for cf_add_1lib in $cf_add_0lib; do
12349 for cf_add_2lib in $cf_add_libs; do
12350 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12351 cf_add_1lib=
12352 break
12353 fi
12354 done
12355 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12356 done
12357 LIBS="$cf_add_libs"
12358
12359 :
12360 else
12361 cf_pkgconfig_incs=
12362 cf_pkgconfig_libs=
12363 :
12364 fi
12365
12366 else
12367 cf_pkgconfig_incs=
12368 cf_pkgconfig_libs=
12369
12370 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12371
12372 echo "${as_me:-configure}:12372: testing ...before $LIBS ..." 1>&5
12373
12374 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
12375 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12376
12377 echo "${as_me:-configure}:12377: testing ...after $LIBS ..." 1>&5
12378
12379 fi
12380
12381 ;;
12382 esac
12383 ;;
12384 esac
12385 fi
12386
12387 cf_have_X_LIBS=yes
12388
12389 else
12390 cf_pkgconfig_incs=
12391 cf_pkgconfig_libs=
12392
12393 LDFLAGS="$X_LIBS $LDFLAGS"
12394
12395 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12396
12397 echo "${as_me:-configure}:12397: testing checking additions to CFLAGS ..." 1>&5
12398
12399 cf_check_cflags="$CFLAGS"
12400 cf_check_cppflags="$CPPFLAGS"
12401
12402 cf_fix_cppflags=no
12403 cf_new_cflags=
12404 cf_new_cppflags=
12405 cf_new_extra_cppflags=
12406
12407 for cf_add_cflags in $X_CFLAGS
12408 do
12409 case "$cf_fix_cppflags" in
12410 (no)
12411 case "$cf_add_cflags" in
12412 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12413 case "$cf_add_cflags" in
12414 (-D*)
12415 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12416
12417 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12418 && test -z "${cf_tst_cflags}" \
12419 && cf_fix_cppflags=yes
12420
12421 if test "$cf_fix_cppflags" = yes ; then
12422
12423 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12424 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12425
12426 continue
12427 elif test "${cf_tst_cflags}" = "\"'" ; then
12428
12429 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12430 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12431
12432 continue
12433 fi
12434 ;;
12435 esac
12436 case "$CPPFLAGS" in
12437 (*$cf_add_cflags)
12438 ;;
12439 (*)
12440 case "$cf_add_cflags" in
12441 (-D*)
12442 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12443
12444 CPPFLAGS=`echo "$CPPFLAGS" | \
12445 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12446 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12447
12448 ;;
12449 esac
12450
12451 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12452 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12453
12454 ;;
12455 esac
12456 ;;
12457 (*)
12458
12459 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12460 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12461
12462 ;;
12463 esac
12464 ;;
12465 (yes)
12466
12467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12469
12470 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12471
12472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12473 && test -z "${cf_tst_cflags}" \
12474 && cf_fix_cppflags=no
12475 ;;
12476 esac
12477 done
12478
12479 if test -n "$cf_new_cflags" ; then
12480 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12481
12482 echo "${as_me:-configure}:12482: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12483
12484 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12485 CFLAGS="${CFLAGS}$cf_new_cflags"
12486
12487 fi
12488
12489 if test -n "$cf_new_cppflags" ; then
12490 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12491
12492 echo "${as_me:-configure}:12492: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12493
12494 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12495 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12496
12497 fi
12498
12499 if test -n "$cf_new_extra_cppflags" ; then
12500 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12501
12502 echo "${as_me:-configure}:12502: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12503
12504 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12505 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12506
12507 fi
12508
12509 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12510 cat >"conftest.$ac_ext" <<_ACEOF
12511 #line 12511 "configure"
12512 #include "confdefs.h"
12513 #include <stdio.h>
12514 int
12515 main (void)
12516 {
12517 printf("Hello world");
12518 ;
12519 return 0;
12520 }
12521 _ACEOF
12522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12523 if { (eval echo "$as_me:12523: \"$ac_link\"") >&5
12524 (eval $ac_link) 2>&5
12525 ac_status=$?
12526 echo "$as_me:12526: \$? = $ac_status" >&5
12527 (exit "$ac_status"); } &&
12528 { ac_try='test -s "conftest$ac_exeext"'
12529 { (eval echo "$as_me:12529: \"$ac_try\"") >&5
12530 (eval $ac_try) 2>&5
12531 ac_status=$?
12532 echo "$as_me:12532: \$? = $ac_status" >&5
12533 (exit "$ac_status"); }; }; then
12534 :
12535 else
12536 echo "$as_me: failed program was:" >&5
12537 cat "conftest.$ac_ext" >&5
12538 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12539
12540 echo "${as_me:-configure}:12540: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12541
12542 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12543 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12544
12545 echo "${as_me:-configure}:12545: testing but keeping change to \$CPPFLAGS ..." 1>&5
12546
12547 fi
12548 CFLAGS="$cf_check_cflags"
12549 fi
12550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12551 fi
12552
12553 echo "$as_me:12553: checking for XOpenDisplay" >&5
12554 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12555 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12556 echo $ECHO_N "(cached) $ECHO_C" >&6
12557 else
12558 cat >"conftest.$ac_ext" <<_ACEOF
12559 #line 12559 "configure"
12560 #include "confdefs.h"
12561 #define XOpenDisplay autoconf_temporary
12562 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12563 #undef XOpenDisplay
12564
12565 #ifdef __cplusplus
12566 extern "C"
12567 #endif
12568
12569 /* We use char because int might match the return type of a gcc2
12570 builtin and then its argument prototype would still apply. */
12571 char XOpenDisplay (void);
12572
12573 int
12574 main (void)
12575 {
12576
12577 /* The GNU C library defines stubs for functions which it implements
12578 to always fail with ENOSYS. Some functions are actually named
12579 something starting with __ and the normal name is an alias. */
12580 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12581 #error found stub for XOpenDisplay
12582 #endif
12583
12584 return XOpenDisplay ();
12585 ;
12586 return 0;
12587 }
12588 _ACEOF
12589 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12590 if { (eval echo "$as_me:12590: \"$ac_link\"") >&5
12591 (eval $ac_link) 2>&5
12592 ac_status=$?
12593 echo "$as_me:12593: \$? = $ac_status" >&5
12594 (exit "$ac_status"); } &&
12595 { ac_try='test -s "conftest$ac_exeext"'
12596 { (eval echo "$as_me:12596: \"$ac_try\"") >&5
12597 (eval $ac_try) 2>&5
12598 ac_status=$?
12599 echo "$as_me:12599: \$? = $ac_status" >&5
12600 (exit "$ac_status"); }; }; then
12601 ac_cv_func_XOpenDisplay=yes
12602 else
12603 echo "$as_me: failed program was:" >&5
12604 cat "conftest.$ac_ext" >&5
12605 ac_cv_func_XOpenDisplay=no
12606 fi
12607 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12608 fi
12609 echo "$as_me:12609: result: $ac_cv_func_XOpenDisplay" >&5
12610 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12611 if test "$ac_cv_func_XOpenDisplay" = yes; then
12612 :
12613 else
12614
12615 echo "$as_me:12615: checking for XOpenDisplay in -lX11" >&5
12616 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12617 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12618 echo $ECHO_N "(cached) $ECHO_C" >&6
12619 else
12620 ac_check_lib_save_LIBS=$LIBS
12621 LIBS="-lX11 $LIBS"
12622 cat >"conftest.$ac_ext" <<_ACEOF
12623 #line 12623 "configure"
12624 #include "confdefs.h"
12625
12626 /* Override any gcc2 internal prototype to avoid an error. */
12627 #ifdef __cplusplus
12628 extern "C"
12629 #endif
12630 /* We use char because int might match the return type of a gcc2
12631 builtin and then its argument prototype would still apply. */
12632 char XOpenDisplay (void);
12633 int
12634 main (void)
12635 {
12636 XOpenDisplay ();
12637 ;
12638 return 0;
12639 }
12640 _ACEOF
12641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12642 if { (eval echo "$as_me:12642: \"$ac_link\"") >&5
12643 (eval $ac_link) 2>&5
12644 ac_status=$?
12645 echo "$as_me:12645: \$? = $ac_status" >&5
12646 (exit "$ac_status"); } &&
12647 { ac_try='test -s "conftest$ac_exeext"'
12648 { (eval echo "$as_me:12648: \"$ac_try\"") >&5
12649 (eval $ac_try) 2>&5
12650 ac_status=$?
12651 echo "$as_me:12651: \$? = $ac_status" >&5
12652 (exit "$ac_status"); }; }; then
12653 ac_cv_lib_X11_XOpenDisplay=yes
12654 else
12655 echo "$as_me: failed program was:" >&5
12656 cat "conftest.$ac_ext" >&5
12657 ac_cv_lib_X11_XOpenDisplay=no
12658 fi
12659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12660 LIBS=$ac_check_lib_save_LIBS
12661 fi
12662 echo "$as_me:12662: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12663 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12664 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
12665
12666 cf_add_libs="$LIBS"
12667 # reverse order
12668 cf_add_0lib=
12669 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12670 # filter duplicates
12671 for cf_add_1lib in $cf_add_0lib; do
12672 for cf_add_2lib in $cf_add_libs; do
12673 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12674 cf_add_1lib=
12675 break
12676 fi
12677 done
12678 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12679 done
12680 LIBS="$cf_add_libs"
12681
12682 fi
12683
12684 fi
12685
12686 echo "$as_me:12686: checking for XtAppInitialize" >&5
12687 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12688 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12689 echo $ECHO_N "(cached) $ECHO_C" >&6
12690 else
12691 cat >"conftest.$ac_ext" <<_ACEOF
12692 #line 12692 "configure"
12693 #include "confdefs.h"
12694 #define XtAppInitialize autoconf_temporary
12695 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12696 #undef XtAppInitialize
12697
12698 #ifdef __cplusplus
12699 extern "C"
12700 #endif
12701
12702 /* We use char because int might match the return type of a gcc2
12703 builtin and then its argument prototype would still apply. */
12704 char XtAppInitialize (void);
12705
12706 int
12707 main (void)
12708 {
12709
12710 /* The GNU C library defines stubs for functions which it implements
12711 to always fail with ENOSYS. Some functions are actually named
12712 something starting with __ and the normal name is an alias. */
12713 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12714 #error found stub for XtAppInitialize
12715 #endif
12716
12717 return XtAppInitialize ();
12718 ;
12719 return 0;
12720 }
12721 _ACEOF
12722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12723 if { (eval echo "$as_me:12723: \"$ac_link\"") >&5
12724 (eval $ac_link) 2>&5
12725 ac_status=$?
12726 echo "$as_me:12726: \$? = $ac_status" >&5
12727 (exit "$ac_status"); } &&
12728 { ac_try='test -s "conftest$ac_exeext"'
12729 { (eval echo "$as_me:12729: \"$ac_try\"") >&5
12730 (eval $ac_try) 2>&5
12731 ac_status=$?
12732 echo "$as_me:12732: \$? = $ac_status" >&5
12733 (exit "$ac_status"); }; }; then
12734 ac_cv_func_XtAppInitialize=yes
12735 else
12736 echo "$as_me: failed program was:" >&5
12737 cat "conftest.$ac_ext" >&5
12738 ac_cv_func_XtAppInitialize=no
12739 fi
12740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12741 fi
12742 echo "$as_me:12742: result: $ac_cv_func_XtAppInitialize" >&5
12743 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12744 if test "$ac_cv_func_XtAppInitialize" = yes; then
12745 :
12746 else
12747
12748 echo "$as_me:12748: checking for XtAppInitialize in -lXt" >&5
12749 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12750 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12751 echo $ECHO_N "(cached) $ECHO_C" >&6
12752 else
12753 ac_check_lib_save_LIBS=$LIBS
12754 LIBS="-lXt $LIBS"
12755 cat >"conftest.$ac_ext" <<_ACEOF
12756 #line 12756 "configure"
12757 #include "confdefs.h"
12758
12759 /* Override any gcc2 internal prototype to avoid an error. */
12760 #ifdef __cplusplus
12761 extern "C"
12762 #endif
12763 /* We use char because int might match the return type of a gcc2
12764 builtin and then its argument prototype would still apply. */
12765 char XtAppInitialize (void);
12766 int
12767 main (void)
12768 {
12769 XtAppInitialize ();
12770 ;
12771 return 0;
12772 }
12773 _ACEOF
12774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12775 if { (eval echo "$as_me:12775: \"$ac_link\"") >&5
12776 (eval $ac_link) 2>&5
12777 ac_status=$?
12778 echo "$as_me:12778: \$? = $ac_status" >&5
12779 (exit "$ac_status"); } &&
12780 { ac_try='test -s "conftest$ac_exeext"'
12781 { (eval echo "$as_me:12781: \"$ac_try\"") >&5
12782 (eval $ac_try) 2>&5
12783 ac_status=$?
12784 echo "$as_me:12784: \$? = $ac_status" >&5
12785 (exit "$ac_status"); }; }; then
12786 ac_cv_lib_Xt_XtAppInitialize=yes
12787 else
12788 echo "$as_me: failed program was:" >&5
12789 cat "conftest.$ac_ext" >&5
12790 ac_cv_lib_Xt_XtAppInitialize=no
12791 fi
12792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12793 LIBS=$ac_check_lib_save_LIBS
12794 fi
12795 echo "$as_me:12795: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12796 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12797 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
12798
12799 cat >>confdefs.h <<\EOF
12800 #define HAVE_LIBXT 1
12801 EOF
12802
12803 cf_have_X_LIBS=Xt
12804 LIBS="-lXt $LIBS"
12805 fi
12806
12807 fi
12808
12809 fi
12810
12811 if test "$cf_have_X_LIBS" = no ; then
12812 { echo "$as_me:12812: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12813 test program. You will have to check and add the proper libraries by hand
12814 to makefile." >&5
12815 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12816 test program. You will have to check and add the proper libraries by hand
12817 to makefile." >&2;}
12818 fi
12819
12820 for ac_header in \
12821 X11/DECkeysym.h \
12822 X11/Sunkeysym.h \
12823 X11/XF86keysym.h \
12824 X11/XKBlib.h \
12825 X11/TranslateI.h \
12826 X11/Xpoll.h \
12827 X11/extensions/XKB.h \
12828
12829 do
12830 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12831 echo "$as_me:12831: checking for $ac_header" >&5
12832 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12834 echo $ECHO_N "(cached) $ECHO_C" >&6
12835 else
12836 cat >"conftest.$ac_ext" <<_ACEOF
12837 #line 12837 "configure"
12838 #include "confdefs.h"
12839 #include <$ac_header>
12840 _ACEOF
12841 if { (eval echo "$as_me:12841: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12842 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12843 ac_status=$?
12844 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12845 rm -f conftest.er1
12846 cat conftest.err >&5
12847 echo "$as_me:12847: \$? = $ac_status" >&5
12848 (exit "$ac_status"); } >/dev/null; then
12849 if test -s conftest.err; then
12850 ac_cpp_err=$ac_c_preproc_warn_flag
12851 else
12852 ac_cpp_err=
12853 fi
12854 else
12855 ac_cpp_err=yes
12856 fi
12857 if test -z "$ac_cpp_err"; then
12858 eval "$as_ac_Header=yes"
12859 else
12860 echo "$as_me: failed program was:" >&5
12861 cat "conftest.$ac_ext" >&5
12862 eval "$as_ac_Header=no"
12863 fi
12864 rm -f conftest.err "conftest.$ac_ext"
12865 fi
12866 echo "$as_me:12866: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12867 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12868 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12869 cat >>confdefs.h <<EOF
12870 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12871 EOF
12872
12873 fi
12874 done
12875
12876 ICON_SUFFIX=.xbm
12877
12878 cf_save_cppflags="${CPPFLAGS}"
12879 cf_save_ldflags="${LDFLAGS}"
12880
12881 echo "$as_me:12881: checking if you want to use the Xpm library for colored icon" >&5
12882 echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
12883
12884 # Check whether --with-xpm or --without-xpm was given.
12885 if test "${with_xpm+set}" = set; then
12886 withval="$with_xpm"
12887 cf_Xpm_library="$withval"
12888 else
12889 cf_Xpm_library=yes
12890 fi;
12891 echo "$as_me:12891: result: $cf_Xpm_library" >&5
12892 echo "${ECHO_T}$cf_Xpm_library" >&6
12893
12894 if test "$cf_Xpm_library" != no ; then
12895 if test "$cf_Xpm_library" != yes ; then
12896 CPPFLAGS="$CPPFLAGS -I$withval/include"
12897 LDFLAGS="$LDFLAGS -L$withval/lib"
12898 fi
12899 echo "$as_me:12899: checking for X11/xpm.h" >&5
12900 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
12901 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12902 echo $ECHO_N "(cached) $ECHO_C" >&6
12903 else
12904 cat >"conftest.$ac_ext" <<_ACEOF
12905 #line 12905 "configure"
12906 #include "confdefs.h"
12907 #include <X11/xpm.h>
12908 _ACEOF
12909 if { (eval echo "$as_me:12909: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12910 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12911 ac_status=$?
12912 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12913 rm -f conftest.er1
12914 cat conftest.err >&5
12915 echo "$as_me:12915: \$? = $ac_status" >&5
12916 (exit "$ac_status"); } >/dev/null; then
12917 if test -s conftest.err; then
12918 ac_cpp_err=$ac_c_preproc_warn_flag
12919 else
12920 ac_cpp_err=
12921 fi
12922 else
12923 ac_cpp_err=yes
12924 fi
12925 if test -z "$ac_cpp_err"; then
12926 ac_cv_header_X11_xpm_h=yes
12927 else
12928 echo "$as_me: failed program was:" >&5
12929 cat "conftest.$ac_ext" >&5
12930 ac_cv_header_X11_xpm_h=no
12931 fi
12932 rm -f conftest.err "conftest.$ac_ext"
12933 fi
12934 echo "$as_me:12934: result: $ac_cv_header_X11_xpm_h" >&5
12935 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
12936 if test "$ac_cv_header_X11_xpm_h" = yes; then
12937
12938 echo "$as_me:12938: checking for XpmCreatePixmapFromData in -lXpm" >&5
12939 echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
12940 if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
12941 echo $ECHO_N "(cached) $ECHO_C" >&6
12942 else
12943 ac_check_lib_save_LIBS=$LIBS
12944 LIBS="-lXpm -lX11 $X_LIBS $LIBS"
12945 cat >"conftest.$ac_ext" <<_ACEOF
12946 #line 12946 "configure"
12947 #include "confdefs.h"
12948
12949 /* Override any gcc2 internal prototype to avoid an error. */
12950 #ifdef __cplusplus
12951 extern "C"
12952 #endif
12953 /* We use char because int might match the return type of a gcc2
12954 builtin and then its argument prototype would still apply. */
12955 char XpmCreatePixmapFromData (void);
12956 int
12957 main (void)
12958 {
12959 XpmCreatePixmapFromData ();
12960 ;
12961 return 0;
12962 }
12963 _ACEOF
12964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12965 if { (eval echo "$as_me:12965: \"$ac_link\"") >&5
12966 (eval $ac_link) 2>&5
12967 ac_status=$?
12968 echo "$as_me:12968: \$? = $ac_status" >&5
12969 (exit "$ac_status"); } &&
12970 { ac_try='test -s "conftest$ac_exeext"'
12971 { (eval echo "$as_me:12971: \"$ac_try\"") >&5
12972 (eval $ac_try) 2>&5
12973 ac_status=$?
12974 echo "$as_me:12974: \$? = $ac_status" >&5
12975 (exit "$ac_status"); }; }; then
12976 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
12977 else
12978 echo "$as_me: failed program was:" >&5
12979 cat "conftest.$ac_ext" >&5
12980 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
12981 fi
12982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12983 LIBS=$ac_check_lib_save_LIBS
12984 fi
12985 echo "$as_me:12985: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
12986 echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
12987 if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then
12988
12989 cat >>confdefs.h <<\EOF
12990 #define HAVE_LIBXPM 1
12991 EOF
12992
12993 ICON_SUFFIX=.xpm
12994 LIBS="-lXpm $LIBS"
12995 else
12996 CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12997 fi
12998
12999 else
13000 CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
13001 fi
13002
13003 fi
13004
13005 echo "$as_me:13005: checking if you want to use the Xinerama extension" >&5
13006 echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6
13007
13008 # Check whether --with-xinerama or --without-xinerama was given.
13009 if test "${with_xinerama+set}" = set; then
13010 withval="$with_xinerama"
13011 cf_with_xinerama="$withval"
13012 else
13013 cf_with_xinerama=yes
13014 fi;
13015 echo "$as_me:13015: result: $cf_with_xinerama" >&5
13016 echo "${ECHO_T}$cf_with_xinerama" >&6
13017 if test "$cf_with_xinerama" = yes; then
13018
13019 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xinerama"; then
13020 test -n "$verbose" && echo " found package xinerama" 1>&6
13021
13022 echo "${as_me:-configure}:13022: testing found package xinerama ..." 1>&5
13023
13024 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xinerama" 2>/dev/null`"
13025 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xinerama" 2>/dev/null`"
13026 test -n "$verbose" && echo " package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
13027
13028 echo "${as_me:-configure}:13028: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13029
13030 test -n "$verbose" && echo " package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
13031
13032 echo "${as_me:-configure}:13032: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
13033
13034 cf_fix_cppflags=no
13035 cf_new_cflags=
13036 cf_new_cppflags=
13037 cf_new_extra_cppflags=
13038
13039 for cf_add_cflags in $cf_pkgconfig_incs
13040 do
13041 case "$cf_fix_cppflags" in
13042 (no)
13043 case "$cf_add_cflags" in
13044 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13045 case "$cf_add_cflags" in
13046 (-D*)
13047 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13048
13049 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13050 && test -z "${cf_tst_cflags}" \
13051 && cf_fix_cppflags=yes
13052
13053 if test "$cf_fix_cppflags" = yes ; then
13054
13055 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13056 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13057
13058 continue
13059 elif test "${cf_tst_cflags}" = "\"'" ; then
13060
13061 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13062 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13063
13064 continue
13065 fi
13066 ;;
13067 esac
13068 case "$CPPFLAGS" in
13069 (*$cf_add_cflags)
13070 ;;
13071 (*)
13072 case "$cf_add_cflags" in
13073 (-D*)
13074 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13075
13076 CPPFLAGS=`echo "$CPPFLAGS" | \
13077 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13078 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13079
13080 ;;
13081 esac
13082
13083 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13084 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13085
13086 ;;
13087 esac
13088 ;;
13089 (*)
13090
13091 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13092 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13093
13094 ;;
13095 esac
13096 ;;
13097 (yes)
13098
13099 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13100 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13101
13102 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13103
13104 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13105 && test -z "${cf_tst_cflags}" \
13106 && cf_fix_cppflags=no
13107 ;;
13108 esac
13109 done
13110
13111 if test -n "$cf_new_cflags" ; then
13112
13113 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13114 CFLAGS="${CFLAGS}$cf_new_cflags"
13115
13116 fi
13117
13118 if test -n "$cf_new_cppflags" ; then
13119
13120 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13121 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13122
13123 fi
13124
13125 if test -n "$cf_new_extra_cppflags" ; then
13126
13127 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13128 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13129
13130 fi
13131
13132 cf_add_libs="$LIBS"
13133 # reverse order
13134 cf_add_0lib=
13135 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13136 # filter duplicates
13137 for cf_add_1lib in $cf_add_0lib; do
13138 for cf_add_2lib in $cf_add_libs; do
13139 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13140 cf_add_1lib=
13141 break
13142 fi
13143 done
13144 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13145 done
13146 LIBS="$cf_add_libs"
13147
13148 cat >>confdefs.h <<\EOF
13149 #define HAVE_X11_EXTENSIONS_XINERAMA_H 1
13150 EOF
13151
13152 else
13153 cf_pkgconfig_incs=
13154 cf_pkgconfig_libs=
13155
13156 echo "$as_me:13156: checking for XineramaQueryScreens in -lXinerama" >&5
13157 echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
13158 if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
13159 echo $ECHO_N "(cached) $ECHO_C" >&6
13160 else
13161 ac_check_lib_save_LIBS=$LIBS
13162 LIBS="-lXinerama $LIBS"
13163 cat >"conftest.$ac_ext" <<_ACEOF
13164 #line 13164 "configure"
13165 #include "confdefs.h"
13166
13167 /* Override any gcc2 internal prototype to avoid an error. */
13168 #ifdef __cplusplus
13169 extern "C"
13170 #endif
13171 /* We use char because int might match the return type of a gcc2
13172 builtin and then its argument prototype would still apply. */
13173 char XineramaQueryScreens (void);
13174 int
13175 main (void)
13176 {
13177 XineramaQueryScreens ();
13178 ;
13179 return 0;
13180 }
13181 _ACEOF
13182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13183 if { (eval echo "$as_me:13183: \"$ac_link\"") >&5
13184 (eval $ac_link) 2>&5
13185 ac_status=$?
13186 echo "$as_me:13186: \$? = $ac_status" >&5
13187 (exit "$ac_status"); } &&
13188 { ac_try='test -s "conftest$ac_exeext"'
13189 { (eval echo "$as_me:13189: \"$ac_try\"") >&5
13190 (eval $ac_try) 2>&5
13191 ac_status=$?
13192 echo "$as_me:13192: \$? = $ac_status" >&5
13193 (exit "$ac_status"); }; }; then
13194 ac_cv_lib_Xinerama_XineramaQueryScreens=yes
13195 else
13196 echo "$as_me: failed program was:" >&5
13197 cat "conftest.$ac_ext" >&5
13198 ac_cv_lib_Xinerama_XineramaQueryScreens=no
13199 fi
13200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13201 LIBS=$ac_check_lib_save_LIBS
13202 fi
13203 echo "$as_me:13203: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
13204 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
13205 if test "$ac_cv_lib_Xinerama_XineramaQueryScreens" = yes; then
13206
13207 cf_add_libs="$LIBS"
13208 # reverse order
13209 cf_add_0lib=
13210 for cf_add_1lib in -lXinerama; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13211 # filter duplicates
13212 for cf_add_1lib in $cf_add_0lib; do
13213 for cf_add_2lib in $cf_add_libs; do
13214 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13215 cf_add_1lib=
13216 break
13217 fi
13218 done
13219 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13220 done
13221 LIBS="$cf_add_libs"
13222
13223 for ac_header in \
13224 X11/extensions/Xinerama.h \
13225
13226 do
13227 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13228 echo "$as_me:13228: checking for $ac_header" >&5
13229 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13230 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13231 echo $ECHO_N "(cached) $ECHO_C" >&6
13232 else
13233 cat >"conftest.$ac_ext" <<_ACEOF
13234 #line 13234 "configure"
13235 #include "confdefs.h"
13236 #include <$ac_header>
13237 _ACEOF
13238 if { (eval echo "$as_me:13238: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13239 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13240 ac_status=$?
13241 $EGREP -v '^ *\+' conftest.er1 >conftest.err
13242 rm -f conftest.er1
13243 cat conftest.err >&5
13244 echo "$as_me:13244: \$? = $ac_status" >&5
13245 (exit "$ac_status"); } >/dev/null; then
13246 if test -s conftest.err; then
13247 ac_cpp_err=$ac_c_preproc_warn_flag
13248 else
13249 ac_cpp_err=
13250 fi
13251 else
13252 ac_cpp_err=yes
13253 fi
13254 if test -z "$ac_cpp_err"; then
13255 eval "$as_ac_Header=yes"
13256 else
13257 echo "$as_me: failed program was:" >&5
13258 cat "conftest.$ac_ext" >&5
13259 eval "$as_ac_Header=no"
13260 fi
13261 rm -f conftest.err "conftest.$ac_ext"
13262 fi
13263 echo "$as_me:13263: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13264 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13265 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13266 cat >>confdefs.h <<EOF
13267 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13268 EOF
13269
13270 fi
13271 done
13272
13273 fi
13274
13275 fi
13276
13277 fi
13278
13279 cf_x_athena=${cf_x_athena:-Xaw}
13280
13281 echo "$as_me:13281: checking if you want to link with Xaw 3d library" >&5
13282 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13283 withval=
13284
13285 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13286 if test "${with_Xaw3d+set}" = set; then
13287 withval="$with_Xaw3d"
13288
13289 fi;
13290 if test "$withval" = yes ; then
13291 cf_x_athena=Xaw3d
13292 echo "$as_me:13292: result: yes" >&5
13293 echo "${ECHO_T}yes" >&6
13294 else
13295 echo "$as_me:13295: result: no" >&5
13296 echo "${ECHO_T}no" >&6
13297 fi
13298
13299 echo "$as_me:13299: checking if you want to link with Xaw 3d xft library" >&5
13300 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13301 withval=
13302
13303 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13304 if test "${with_Xaw3dxft+set}" = set; then
13305 withval="$with_Xaw3dxft"
13306
13307 fi;
13308 if test "$withval" = yes ; then
13309 cf_x_athena=Xaw3dxft
13310 echo "$as_me:13310: result: yes" >&5
13311 echo "${ECHO_T}yes" >&6
13312 else
13313 echo "$as_me:13313: result: no" >&5
13314 echo "${ECHO_T}no" >&6
13315 fi
13316
13317 echo "$as_me:13317: checking if you want to link with neXT Athena library" >&5
13318 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13319 withval=
13320
13321 # Check whether --with-neXtaw or --without-neXtaw was given.
13322 if test "${with_neXtaw+set}" = set; then
13323 withval="$with_neXtaw"
13324
13325 fi;
13326 if test "$withval" = yes ; then
13327 cf_x_athena=neXtaw
13328 echo "$as_me:13328: result: yes" >&5
13329 echo "${ECHO_T}yes" >&6
13330 else
13331 echo "$as_me:13331: result: no" >&5
13332 echo "${ECHO_T}no" >&6
13333 fi
13334
13335 echo "$as_me:13335: checking if you want to link with Athena-Plus library" >&5
13336 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13337 withval=
13338
13339 # Check whether --with-XawPlus or --without-XawPlus was given.
13340 if test "${with_XawPlus+set}" = set; then
13341 withval="$with_XawPlus"
13342
13343 fi;
13344 if test "$withval" = yes ; then
13345 cf_x_athena=XawPlus
13346 echo "$as_me:13346: result: yes" >&5
13347 echo "${ECHO_T}yes" >&6
13348 else
13349 echo "$as_me:13349: result: no" >&5
13350 echo "${ECHO_T}no" >&6
13351 fi
13352
13353 cf_x_athena_lib=""
13354
13355 if test "$PKG_CONFIG" != none ; then
13356 cf_athena_list=
13357 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13358 for cf_athena_pkg in \
13359 $cf_athena_list \
13360 ${cf_x_athena} \
13361 ${cf_x_athena}-devel \
13362 lib${cf_x_athena} \
13363 lib${cf_x_athena}-devel
13364 do
13365
13366 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13367 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13368
13369 echo "${as_me:-configure}:13369: testing found package $cf_athena_pkg ..." 1>&5
13370
13371 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13372 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13373 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13374
13375 echo "${as_me:-configure}:13375: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13376
13377 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13378
13379 echo "${as_me:-configure}:13379: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13380
13381 cf_fix_cppflags=no
13382 cf_new_cflags=
13383 cf_new_cppflags=
13384 cf_new_extra_cppflags=
13385
13386 for cf_add_cflags in $cf_pkgconfig_incs
13387 do
13388 case "$cf_fix_cppflags" in
13389 (no)
13390 case "$cf_add_cflags" in
13391 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13392 case "$cf_add_cflags" in
13393 (-D*)
13394 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13395
13396 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13397 && test -z "${cf_tst_cflags}" \
13398 && cf_fix_cppflags=yes
13399
13400 if test "$cf_fix_cppflags" = yes ; then
13401
13402 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13403 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13404
13405 continue
13406 elif test "${cf_tst_cflags}" = "\"'" ; then
13407
13408 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13409 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13410
13411 continue
13412 fi
13413 ;;
13414 esac
13415 case "$CPPFLAGS" in
13416 (*$cf_add_cflags)
13417 ;;
13418 (*)
13419 case "$cf_add_cflags" in
13420 (-D*)
13421 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13422
13423 CPPFLAGS=`echo "$CPPFLAGS" | \
13424 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13425 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13426
13427 ;;
13428 esac
13429
13430 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13431 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13432
13433 ;;
13434 esac
13435 ;;
13436 (*)
13437
13438 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13439 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13440
13441 ;;
13442 esac
13443 ;;
13444 (yes)
13445
13446 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13447 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13448
13449 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13450
13451 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13452 && test -z "${cf_tst_cflags}" \
13453 && cf_fix_cppflags=no
13454 ;;
13455 esac
13456 done
13457
13458 if test -n "$cf_new_cflags" ; then
13459
13460 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13461 CFLAGS="${CFLAGS}$cf_new_cflags"
13462
13463 fi
13464
13465 if test -n "$cf_new_cppflags" ; then
13466
13467 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13468 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13469
13470 fi
13471
13472 if test -n "$cf_new_extra_cppflags" ; then
13473
13474 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13475 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13476
13477 fi
13478
13479 cf_add_libs="$LIBS"
13480 # reverse order
13481 cf_add_0lib=
13482 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13483 # filter duplicates
13484 for cf_add_1lib in $cf_add_0lib; do
13485 for cf_add_2lib in $cf_add_libs; do
13486 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13487 cf_add_1lib=
13488 break
13489 fi
13490 done
13491 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13492 done
13493 LIBS="$cf_add_libs"
13494
13495 cf_x_athena_lib="$cf_pkgconfig_libs"
13496
13497 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13498
13499 cat >>confdefs.h <<EOF
13500 #define $cf_x_athena_LIBS 1
13501 EOF
13502
13503 for cf_trim_lib in Xmu Xt X11
13504 do
13505 case "$LIBS" in
13506 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13507 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13508 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13509
13510 echo "${as_me:-configure}:13510: testing ..trimmed $LIBS ..." 1>&5
13511
13512 ;;
13513 esac
13514 done
13515
13516 echo "$as_me:13516: checking for usable $cf_x_athena/Xmu package" >&5
13517 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13518 if test "${cf_cv_xaw_compat+set}" = set; then
13519 echo $ECHO_N "(cached) $ECHO_C" >&6
13520 else
13521
13522 cat >"conftest.$ac_ext" <<_ACEOF
13523 #line 13523 "configure"
13524 #include "confdefs.h"
13525
13526 $ac_includes_default
13527 #include <X11/Xmu/CharSet.h>
13528
13529 int
13530 main (void)
13531 {
13532
13533 int check = XmuCompareISOLatin1("big", "small");
13534 (void)check;
13535
13536 ;
13537 return 0;
13538 }
13539 _ACEOF
13540 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13541 if { (eval echo "$as_me:13541: \"$ac_link\"") >&5
13542 (eval $ac_link) 2>&5
13543 ac_status=$?
13544 echo "$as_me:13544: \$? = $ac_status" >&5
13545 (exit "$ac_status"); } &&
13546 { ac_try='test -s "conftest$ac_exeext"'
13547 { (eval echo "$as_me:13547: \"$ac_try\"") >&5
13548 (eval $ac_try) 2>&5
13549 ac_status=$?
13550 echo "$as_me:13550: \$? = $ac_status" >&5
13551 (exit "$ac_status"); }; }; then
13552 cf_cv_xaw_compat=yes
13553 else
13554 echo "$as_me: failed program was:" >&5
13555 cat "conftest.$ac_ext" >&5
13556 cf_cv_xaw_compat=no
13557 fi
13558 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13559 fi
13560 echo "$as_me:13560: result: $cf_cv_xaw_compat" >&5
13561 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13562
13563 if test "$cf_cv_xaw_compat" = no
13564 then
13565 # workaround for broken ".pc" files...
13566 case "$cf_x_athena_lib" in
13567 (*-lXmu*)
13568 ;;
13569 (*)
13570 test -n "$verbose" && echo " work around broken package" 1>&6
13571
13572 echo "${as_me:-configure}:13572: testing work around broken package ..." 1>&5
13573
13574 cf_save_xmu="$LIBS"
13575 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13576
13577 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13578 test -n "$verbose" && echo " found package xmu" 1>&6
13579
13580 echo "${as_me:-configure}:13580: testing found package xmu ..." 1>&5
13581
13582 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13583 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13584 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13585
13586 echo "${as_me:-configure}:13586: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13587
13588 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13589
13590 echo "${as_me:-configure}:13590: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13591
13592 cf_fix_cppflags=no
13593 cf_new_cflags=
13594 cf_new_cppflags=
13595 cf_new_extra_cppflags=
13596
13597 for cf_add_cflags in $cf_pkgconfig_incs
13598 do
13599 case "$cf_fix_cppflags" in
13600 (no)
13601 case "$cf_add_cflags" in
13602 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13603 case "$cf_add_cflags" in
13604 (-D*)
13605 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13606
13607 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13608 && test -z "${cf_tst_cflags}" \
13609 && cf_fix_cppflags=yes
13610
13611 if test "$cf_fix_cppflags" = yes ; then
13612
13613 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13614 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13615
13616 continue
13617 elif test "${cf_tst_cflags}" = "\"'" ; then
13618
13619 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13620 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13621
13622 continue
13623 fi
13624 ;;
13625 esac
13626 case "$CPPFLAGS" in
13627 (*$cf_add_cflags)
13628 ;;
13629 (*)
13630 case "$cf_add_cflags" in
13631 (-D*)
13632 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13633
13634 CPPFLAGS=`echo "$CPPFLAGS" | \
13635 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13636 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13637
13638 ;;
13639 esac
13640
13641 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13642 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13643
13644 ;;
13645 esac
13646 ;;
13647 (*)
13648
13649 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13650 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13651
13652 ;;
13653 esac
13654 ;;
13655 (yes)
13656
13657 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13658 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13659
13660 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13661
13662 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13663 && test -z "${cf_tst_cflags}" \
13664 && cf_fix_cppflags=no
13665 ;;
13666 esac
13667 done
13668
13669 if test -n "$cf_new_cflags" ; then
13670
13671 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13672 CFLAGS="${CFLAGS}$cf_new_cflags"
13673
13674 fi
13675
13676 if test -n "$cf_new_cppflags" ; then
13677
13678 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13679 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13680
13681 fi
13682
13683 if test -n "$cf_new_extra_cppflags" ; then
13684
13685 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13686 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13687
13688 fi
13689
13690 cf_add_libs="$LIBS"
13691 # reverse order
13692 cf_add_0lib=
13693 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13694 # filter duplicates
13695 for cf_add_1lib in $cf_add_0lib; do
13696 for cf_add_2lib in $cf_add_libs; do
13697 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13698 cf_add_1lib=
13699 break
13700 fi
13701 done
13702 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13703 done
13704 LIBS="$cf_add_libs"
13705
13706 LIBS="$cf_save_xmu"
13707
13708 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13709
13710 echo "${as_me:-configure}:13710: testing ...before $LIBS ..." 1>&5
13711
13712 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13713 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13714
13715 echo "${as_me:-configure}:13715: testing ...after $LIBS ..." 1>&5
13716
13717 else
13718 cf_pkgconfig_incs=
13719 cf_pkgconfig_libs=
13720
13721 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13722
13723 echo "${as_me:-configure}:13723: testing ...before $LIBS ..." 1>&5
13724
13725 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13726 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13727
13728 echo "${as_me:-configure}:13728: testing ...after $LIBS ..." 1>&5
13729
13730 fi
13731
13732 for cf_trim_lib in Xmu Xt X11
13733 do
13734 case "$LIBS" in
13735 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13736 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13737 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13738
13739 echo "${as_me:-configure}:13739: testing ..trimmed $LIBS ..." 1>&5
13740
13741 ;;
13742 esac
13743 done
13744
13745 ;;
13746 esac
13747 fi
13748
13749 break
13750 else
13751 cf_pkgconfig_incs=
13752 cf_pkgconfig_libs=
13753 :
13754 fi
13755
13756 done
13757 fi
13758
13759 if test -z "$cf_x_athena_lib" ; then
13760
13761 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13762 test -n "$verbose" && echo " found package Xext" 1>&6
13763
13764 echo "${as_me:-configure}:13764: testing found package Xext ..." 1>&5
13765
13766 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13767 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13768 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13769
13770 echo "${as_me:-configure}:13770: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13771
13772 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13773
13774 echo "${as_me:-configure}:13774: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13775
13776 cf_fix_cppflags=no
13777 cf_new_cflags=
13778 cf_new_cppflags=
13779 cf_new_extra_cppflags=
13780
13781 for cf_add_cflags in $cf_pkgconfig_incs
13782 do
13783 case "$cf_fix_cppflags" in
13784 (no)
13785 case "$cf_add_cflags" in
13786 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13787 case "$cf_add_cflags" in
13788 (-D*)
13789 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13790
13791 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13792 && test -z "${cf_tst_cflags}" \
13793 && cf_fix_cppflags=yes
13794
13795 if test "$cf_fix_cppflags" = yes ; then
13796
13797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13799
13800 continue
13801 elif test "${cf_tst_cflags}" = "\"'" ; then
13802
13803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13805
13806 continue
13807 fi
13808 ;;
13809 esac
13810 case "$CPPFLAGS" in
13811 (*$cf_add_cflags)
13812 ;;
13813 (*)
13814 case "$cf_add_cflags" in
13815 (-D*)
13816 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13817
13818 CPPFLAGS=`echo "$CPPFLAGS" | \
13819 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13820 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13821
13822 ;;
13823 esac
13824
13825 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13826 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13827
13828 ;;
13829 esac
13830 ;;
13831 (*)
13832
13833 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13834 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13835
13836 ;;
13837 esac
13838 ;;
13839 (yes)
13840
13841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13843
13844 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13845
13846 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13847 && test -z "${cf_tst_cflags}" \
13848 && cf_fix_cppflags=no
13849 ;;
13850 esac
13851 done
13852
13853 if test -n "$cf_new_cflags" ; then
13854
13855 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13856 CFLAGS="${CFLAGS}$cf_new_cflags"
13857
13858 fi
13859
13860 if test -n "$cf_new_cppflags" ; then
13861
13862 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13863 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13864
13865 fi
13866
13867 if test -n "$cf_new_extra_cppflags" ; then
13868
13869 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13870 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13871
13872 fi
13873
13874 cf_add_libs="$LIBS"
13875 # reverse order
13876 cf_add_0lib=
13877 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13878 # filter duplicates
13879 for cf_add_1lib in $cf_add_0lib; do
13880 for cf_add_2lib in $cf_add_libs; do
13881 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13882 cf_add_1lib=
13883 break
13884 fi
13885 done
13886 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13887 done
13888 LIBS="$cf_add_libs"
13889
13890 :
13891 else
13892 cf_pkgconfig_incs=
13893 cf_pkgconfig_libs=
13894
13895 echo "$as_me:13895: checking for XextCreateExtension in -lXext" >&5
13896 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13897 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13898 echo $ECHO_N "(cached) $ECHO_C" >&6
13899 else
13900 ac_check_lib_save_LIBS=$LIBS
13901 LIBS="-lXext $LIBS"
13902 cat >"conftest.$ac_ext" <<_ACEOF
13903 #line 13903 "configure"
13904 #include "confdefs.h"
13905
13906 /* Override any gcc2 internal prototype to avoid an error. */
13907 #ifdef __cplusplus
13908 extern "C"
13909 #endif
13910 /* We use char because int might match the return type of a gcc2
13911 builtin and then its argument prototype would still apply. */
13912 char XextCreateExtension (void);
13913 int
13914 main (void)
13915 {
13916 XextCreateExtension ();
13917 ;
13918 return 0;
13919 }
13920 _ACEOF
13921 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13922 if { (eval echo "$as_me:13922: \"$ac_link\"") >&5
13923 (eval $ac_link) 2>&5
13924 ac_status=$?
13925 echo "$as_me:13925: \$? = $ac_status" >&5
13926 (exit "$ac_status"); } &&
13927 { ac_try='test -s "conftest$ac_exeext"'
13928 { (eval echo "$as_me:13928: \"$ac_try\"") >&5
13929 (eval $ac_try) 2>&5
13930 ac_status=$?
13931 echo "$as_me:13931: \$? = $ac_status" >&5
13932 (exit "$ac_status"); }; }; then
13933 ac_cv_lib_Xext_XextCreateExtension=yes
13934 else
13935 echo "$as_me: failed program was:" >&5
13936 cat "conftest.$ac_ext" >&5
13937 ac_cv_lib_Xext_XextCreateExtension=no
13938 fi
13939 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13940 LIBS=$ac_check_lib_save_LIBS
13941 fi
13942 echo "$as_me:13942: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13943 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13944 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13945
13946 cf_add_libs="$LIBS"
13947 # reverse order
13948 cf_add_0lib=
13949 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13950 # filter duplicates
13951 for cf_add_1lib in $cf_add_0lib; do
13952 for cf_add_2lib in $cf_add_libs; do
13953 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13954 cf_add_1lib=
13955 break
13956 fi
13957 done
13958 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13959 done
13960 LIBS="$cf_add_libs"
13961
13962 fi
13963
13964 fi
13965
13966 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13967 # in some cases has installed dummy files in the former, other cases replaced
13968 # it with a link to the new location). This complicates the configure script.
13969 # Check for that pitfall, and recover using pkg-config
13970 #
13971 # If none of these are set, the configuration is almost certainly broken.
13972 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13973 then
13974
13975 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13976 test -n "$verbose" && echo " found package x11" 1>&6
13977
13978 echo "${as_me:-configure}:13978: testing found package x11 ..." 1>&5
13979
13980 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13981 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13982 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13983
13984 echo "${as_me:-configure}:13984: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13985
13986 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13987
13988 echo "${as_me:-configure}:13988: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13989
13990 cf_fix_cppflags=no
13991 cf_new_cflags=
13992 cf_new_cppflags=
13993 cf_new_extra_cppflags=
13994
13995 for cf_add_cflags in $cf_pkgconfig_incs
13996 do
13997 case "$cf_fix_cppflags" in
13998 (no)
13999 case "$cf_add_cflags" in
14000 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14001 case "$cf_add_cflags" in
14002 (-D*)
14003 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14004
14005 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14006 && test -z "${cf_tst_cflags}" \
14007 && cf_fix_cppflags=yes
14008
14009 if test "$cf_fix_cppflags" = yes ; then
14010
14011 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14012 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14013
14014 continue
14015 elif test "${cf_tst_cflags}" = "\"'" ; then
14016
14017 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14018 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14019
14020 continue
14021 fi
14022 ;;
14023 esac
14024 case "$CPPFLAGS" in
14025 (*$cf_add_cflags)
14026 ;;
14027 (*)
14028 case "$cf_add_cflags" in
14029 (-D*)
14030 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14031
14032 CPPFLAGS=`echo "$CPPFLAGS" | \
14033 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14034 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14035
14036 ;;
14037 esac
14038
14039 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14040 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14041
14042 ;;
14043 esac
14044 ;;
14045 (*)
14046
14047 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14048 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14049
14050 ;;
14051 esac
14052 ;;
14053 (yes)
14054
14055 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14056 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14057
14058 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14059
14060 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14061 && test -z "${cf_tst_cflags}" \
14062 && cf_fix_cppflags=no
14063 ;;
14064 esac
14065 done
14066
14067 if test -n "$cf_new_cflags" ; then
14068
14069 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14070 CFLAGS="${CFLAGS}$cf_new_cflags"
14071
14072 fi
14073
14074 if test -n "$cf_new_cppflags" ; then
14075
14076 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14077 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14078
14079 fi
14080
14081 if test -n "$cf_new_extra_cppflags" ; then
14082
14083 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14084 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14085
14086 fi
14087
14088 cf_add_libs="$LIBS"
14089 # reverse order
14090 cf_add_0lib=
14091 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14092 # filter duplicates
14093 for cf_add_1lib in $cf_add_0lib; do
14094 for cf_add_2lib in $cf_add_libs; do
14095 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14096 cf_add_1lib=
14097 break
14098 fi
14099 done
14100 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14101 done
14102 LIBS="$cf_add_libs"
14103
14104 :
14105 else
14106 cf_pkgconfig_incs=
14107 cf_pkgconfig_libs=
14108 { echo "$as_me:14108: WARNING: unable to find X11 library" >&5
14109 echo "$as_me: WARNING: unable to find X11 library" >&2;}
14110 fi
14111
14112 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14113 test -n "$verbose" && echo " found package ice" 1>&6
14114
14115 echo "${as_me:-configure}:14115: testing found package ice ..." 1>&5
14116
14117 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14118 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14119 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14120
14121 echo "${as_me:-configure}:14121: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14122
14123 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14124
14125 echo "${as_me:-configure}:14125: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14126
14127 cf_fix_cppflags=no
14128 cf_new_cflags=
14129 cf_new_cppflags=
14130 cf_new_extra_cppflags=
14131
14132 for cf_add_cflags in $cf_pkgconfig_incs
14133 do
14134 case "$cf_fix_cppflags" in
14135 (no)
14136 case "$cf_add_cflags" in
14137 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14138 case "$cf_add_cflags" in
14139 (-D*)
14140 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14141
14142 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14143 && test -z "${cf_tst_cflags}" \
14144 && cf_fix_cppflags=yes
14145
14146 if test "$cf_fix_cppflags" = yes ; then
14147
14148 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14149 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14150
14151 continue
14152 elif test "${cf_tst_cflags}" = "\"'" ; then
14153
14154 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14155 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14156
14157 continue
14158 fi
14159 ;;
14160 esac
14161 case "$CPPFLAGS" in
14162 (*$cf_add_cflags)
14163 ;;
14164 (*)
14165 case "$cf_add_cflags" in
14166 (-D*)
14167 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14168
14169 CPPFLAGS=`echo "$CPPFLAGS" | \
14170 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14171 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14172
14173 ;;
14174 esac
14175
14176 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14177 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14178
14179 ;;
14180 esac
14181 ;;
14182 (*)
14183
14184 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14185 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14186
14187 ;;
14188 esac
14189 ;;
14190 (yes)
14191
14192 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14193 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14194
14195 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14196
14197 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14198 && test -z "${cf_tst_cflags}" \
14199 && cf_fix_cppflags=no
14200 ;;
14201 esac
14202 done
14203
14204 if test -n "$cf_new_cflags" ; then
14205
14206 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14207 CFLAGS="${CFLAGS}$cf_new_cflags"
14208
14209 fi
14210
14211 if test -n "$cf_new_cppflags" ; then
14212
14213 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14214 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14215
14216 fi
14217
14218 if test -n "$cf_new_extra_cppflags" ; then
14219
14220 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14221 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14222
14223 fi
14224
14225 cf_add_libs="$LIBS"
14226 # reverse order
14227 cf_add_0lib=
14228 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14229 # filter duplicates
14230 for cf_add_1lib in $cf_add_0lib; do
14231 for cf_add_2lib in $cf_add_libs; do
14232 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14233 cf_add_1lib=
14234 break
14235 fi
14236 done
14237 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14238 done
14239 LIBS="$cf_add_libs"
14240
14241 :
14242 else
14243 cf_pkgconfig_incs=
14244 cf_pkgconfig_libs=
14245 { echo "$as_me:14245: WARNING: unable to find ICE library" >&5
14246 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14247 fi
14248
14249 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14250 test -n "$verbose" && echo " found package sm" 1>&6
14251
14252 echo "${as_me:-configure}:14252: testing found package sm ..." 1>&5
14253
14254 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14255 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14256 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14257
14258 echo "${as_me:-configure}:14258: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14259
14260 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14261
14262 echo "${as_me:-configure}:14262: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14263
14264 cf_fix_cppflags=no
14265 cf_new_cflags=
14266 cf_new_cppflags=
14267 cf_new_extra_cppflags=
14268
14269 for cf_add_cflags in $cf_pkgconfig_incs
14270 do
14271 case "$cf_fix_cppflags" in
14272 (no)
14273 case "$cf_add_cflags" in
14274 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14275 case "$cf_add_cflags" in
14276 (-D*)
14277 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14278
14279 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14280 && test -z "${cf_tst_cflags}" \
14281 && cf_fix_cppflags=yes
14282
14283 if test "$cf_fix_cppflags" = yes ; then
14284
14285 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14286 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14287
14288 continue
14289 elif test "${cf_tst_cflags}" = "\"'" ; then
14290
14291 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14292 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14293
14294 continue
14295 fi
14296 ;;
14297 esac
14298 case "$CPPFLAGS" in
14299 (*$cf_add_cflags)
14300 ;;
14301 (*)
14302 case "$cf_add_cflags" in
14303 (-D*)
14304 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14305
14306 CPPFLAGS=`echo "$CPPFLAGS" | \
14307 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14308 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14309
14310 ;;
14311 esac
14312
14313 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14314 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14315
14316 ;;
14317 esac
14318 ;;
14319 (*)
14320
14321 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14322 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14323
14324 ;;
14325 esac
14326 ;;
14327 (yes)
14328
14329 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14330 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14331
14332 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14333
14334 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14335 && test -z "${cf_tst_cflags}" \
14336 && cf_fix_cppflags=no
14337 ;;
14338 esac
14339 done
14340
14341 if test -n "$cf_new_cflags" ; then
14342
14343 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14344 CFLAGS="${CFLAGS}$cf_new_cflags"
14345
14346 fi
14347
14348 if test -n "$cf_new_cppflags" ; then
14349
14350 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14351 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14352
14353 fi
14354
14355 if test -n "$cf_new_extra_cppflags" ; then
14356
14357 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14358 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14359
14360 fi
14361
14362 cf_add_libs="$LIBS"
14363 # reverse order
14364 cf_add_0lib=
14365 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14366 # filter duplicates
14367 for cf_add_1lib in $cf_add_0lib; do
14368 for cf_add_2lib in $cf_add_libs; do
14369 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14370 cf_add_1lib=
14371 break
14372 fi
14373 done
14374 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14375 done
14376 LIBS="$cf_add_libs"
14377
14378 :
14379 else
14380 cf_pkgconfig_incs=
14381 cf_pkgconfig_libs=
14382 { echo "$as_me:14382: WARNING: unable to find SM library" >&5
14383 echo "$as_me: WARNING: unable to find SM library" >&2;}
14384 fi
14385
14386 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14387 test -n "$verbose" && echo " found package xt" 1>&6
14388
14389 echo "${as_me:-configure}:14389: testing found package xt ..." 1>&5
14390
14391 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14392 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14393 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14394
14395 echo "${as_me:-configure}:14395: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14396
14397 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14398
14399 echo "${as_me:-configure}:14399: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14400
14401 cf_fix_cppflags=no
14402 cf_new_cflags=
14403 cf_new_cppflags=
14404 cf_new_extra_cppflags=
14405
14406 for cf_add_cflags in $cf_pkgconfig_incs
14407 do
14408 case "$cf_fix_cppflags" in
14409 (no)
14410 case "$cf_add_cflags" in
14411 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14412 case "$cf_add_cflags" in
14413 (-D*)
14414 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14415
14416 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14417 && test -z "${cf_tst_cflags}" \
14418 && cf_fix_cppflags=yes
14419
14420 if test "$cf_fix_cppflags" = yes ; then
14421
14422 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14423 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14424
14425 continue
14426 elif test "${cf_tst_cflags}" = "\"'" ; then
14427
14428 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14429 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14430
14431 continue
14432 fi
14433 ;;
14434 esac
14435 case "$CPPFLAGS" in
14436 (*$cf_add_cflags)
14437 ;;
14438 (*)
14439 case "$cf_add_cflags" in
14440 (-D*)
14441 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14442
14443 CPPFLAGS=`echo "$CPPFLAGS" | \
14444 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14445 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14446
14447 ;;
14448 esac
14449
14450 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14451 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14452
14453 ;;
14454 esac
14455 ;;
14456 (*)
14457
14458 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14459 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14460
14461 ;;
14462 esac
14463 ;;
14464 (yes)
14465
14466 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14467 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14468
14469 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14470
14471 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14472 && test -z "${cf_tst_cflags}" \
14473 && cf_fix_cppflags=no
14474 ;;
14475 esac
14476 done
14477
14478 if test -n "$cf_new_cflags" ; then
14479
14480 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14481 CFLAGS="${CFLAGS}$cf_new_cflags"
14482
14483 fi
14484
14485 if test -n "$cf_new_cppflags" ; then
14486
14487 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14488 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14489
14490 fi
14491
14492 if test -n "$cf_new_extra_cppflags" ; then
14493
14494 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14495 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14496
14497 fi
14498
14499 cf_add_libs="$LIBS"
14500 # reverse order
14501 cf_add_0lib=
14502 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14503 # filter duplicates
14504 for cf_add_1lib in $cf_add_0lib; do
14505 for cf_add_2lib in $cf_add_libs; do
14506 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14507 cf_add_1lib=
14508 break
14509 fi
14510 done
14511 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14512 done
14513 LIBS="$cf_add_libs"
14514
14515 :
14516 else
14517 cf_pkgconfig_incs=
14518 cf_pkgconfig_libs=
14519 { echo "$as_me:14519: WARNING: unable to find Xt library" >&5
14520 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14521 fi
14522
14523 else
14524 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14525 fi
14526
14527 cf_have_X_LIBS=no
14528
14529 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14530 test -n "$verbose" && echo " found package xt" 1>&6
14531
14532 echo "${as_me:-configure}:14532: testing found package xt ..." 1>&5
14533
14534 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14535 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14536 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14537
14538 echo "${as_me:-configure}:14538: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14539
14540 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14541
14542 echo "${as_me:-configure}:14542: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14543
14544 cf_fix_cppflags=no
14545 cf_new_cflags=
14546 cf_new_cppflags=
14547 cf_new_extra_cppflags=
14548
14549 for cf_add_cflags in $cf_pkgconfig_incs
14550 do
14551 case "$cf_fix_cppflags" in
14552 (no)
14553 case "$cf_add_cflags" in
14554 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14555 case "$cf_add_cflags" in
14556 (-D*)
14557 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14558
14559 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14560 && test -z "${cf_tst_cflags}" \
14561 && cf_fix_cppflags=yes
14562
14563 if test "$cf_fix_cppflags" = yes ; then
14564
14565 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14566 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14567
14568 continue
14569 elif test "${cf_tst_cflags}" = "\"'" ; then
14570
14571 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14572 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14573
14574 continue
14575 fi
14576 ;;
14577 esac
14578 case "$CPPFLAGS" in
14579 (*$cf_add_cflags)
14580 ;;
14581 (*)
14582 case "$cf_add_cflags" in
14583 (-D*)
14584 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14585
14586 CPPFLAGS=`echo "$CPPFLAGS" | \
14587 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14588 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14589
14590 ;;
14591 esac
14592
14593 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14594 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14595
14596 ;;
14597 esac
14598 ;;
14599 (*)
14600
14601 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14602 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14603
14604 ;;
14605 esac
14606 ;;
14607 (yes)
14608
14609 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14610 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14611
14612 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14613
14614 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14615 && test -z "${cf_tst_cflags}" \
14616 && cf_fix_cppflags=no
14617 ;;
14618 esac
14619 done
14620
14621 if test -n "$cf_new_cflags" ; then
14622
14623 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14624 CFLAGS="${CFLAGS}$cf_new_cflags"
14625
14626 fi
14627
14628 if test -n "$cf_new_cppflags" ; then
14629
14630 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14631 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14632
14633 fi
14634
14635 if test -n "$cf_new_extra_cppflags" ; then
14636
14637 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14638 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14639
14640 fi
14641
14642 cf_add_libs="$LIBS"
14643 # reverse order
14644 cf_add_0lib=
14645 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14646 # filter duplicates
14647 for cf_add_1lib in $cf_add_0lib; do
14648 for cf_add_2lib in $cf_add_libs; do
14649 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14650 cf_add_1lib=
14651 break
14652 fi
14653 done
14654 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14655 done
14656 LIBS="$cf_add_libs"
14657
14658 case "x$LIBS" in
14659 (*-lX11*)
14660 ;;
14661 (*)
14662 # we have an "xt" package, but it may omit Xt's dependency on X11
14663 echo "$as_me:14663: checking for usable X dependency" >&5
14664 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14665 if test "${cf_cv_xt_x11_compat+set}" = set; then
14666 echo $ECHO_N "(cached) $ECHO_C" >&6
14667 else
14668
14669 cat >"conftest.$ac_ext" <<_ACEOF
14670 #line 14670 "configure"
14671 #include "confdefs.h"
14672
14673 $ac_includes_default
14674 #include <X11/Xlib.h>
14675
14676 int
14677 main (void)
14678 {
14679
14680 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14681 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14682 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14683 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14684
14685 ;
14686 return 0;
14687 }
14688 _ACEOF
14689 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14690 if { (eval echo "$as_me:14690: \"$ac_link\"") >&5
14691 (eval $ac_link) 2>&5
14692 ac_status=$?
14693 echo "$as_me:14693: \$? = $ac_status" >&5
14694 (exit "$ac_status"); } &&
14695 { ac_try='test -s "conftest$ac_exeext"'
14696 { (eval echo "$as_me:14696: \"$ac_try\"") >&5
14697 (eval $ac_try) 2>&5
14698 ac_status=$?
14699 echo "$as_me:14699: \$? = $ac_status" >&5
14700 (exit "$ac_status"); }; }; then
14701 cf_cv_xt_x11_compat=yes
14702 else
14703 echo "$as_me: failed program was:" >&5
14704 cat "conftest.$ac_ext" >&5
14705 cf_cv_xt_x11_compat=no
14706 fi
14707 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14708 fi
14709 echo "$as_me:14709: result: $cf_cv_xt_x11_compat" >&5
14710 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14711 if test "$cf_cv_xt_x11_compat" = no
14712 then
14713 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14714
14715 echo "${as_me:-configure}:14715: testing work around broken X11 dependency ..." 1>&5
14716
14717 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14718
14719 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14720 test -n "$verbose" && echo " found package x11" 1>&6
14721
14722 echo "${as_me:-configure}:14722: testing found package x11 ..." 1>&5
14723
14724 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14725 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14726 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14727
14728 echo "${as_me:-configure}:14728: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14729
14730 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14731
14732 echo "${as_me:-configure}:14732: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14733
14734 cf_fix_cppflags=no
14735 cf_new_cflags=
14736 cf_new_cppflags=
14737 cf_new_extra_cppflags=
14738
14739 for cf_add_cflags in $cf_pkgconfig_incs
14740 do
14741 case "$cf_fix_cppflags" in
14742 (no)
14743 case "$cf_add_cflags" in
14744 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14745 case "$cf_add_cflags" in
14746 (-D*)
14747 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14748
14749 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14750 && test -z "${cf_tst_cflags}" \
14751 && cf_fix_cppflags=yes
14752
14753 if test "$cf_fix_cppflags" = yes ; then
14754
14755 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14756 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14757
14758 continue
14759 elif test "${cf_tst_cflags}" = "\"'" ; then
14760
14761 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14762 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14763
14764 continue
14765 fi
14766 ;;
14767 esac
14768 case "$CPPFLAGS" in
14769 (*$cf_add_cflags)
14770 ;;
14771 (*)
14772 case "$cf_add_cflags" in
14773 (-D*)
14774 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14775
14776 CPPFLAGS=`echo "$CPPFLAGS" | \
14777 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14778 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14779
14780 ;;
14781 esac
14782
14783 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14784 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14785
14786 ;;
14787 esac
14788 ;;
14789 (*)
14790
14791 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14792 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14793
14794 ;;
14795 esac
14796 ;;
14797 (yes)
14798
14799 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14800 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14801
14802 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14803
14804 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14805 && test -z "${cf_tst_cflags}" \
14806 && cf_fix_cppflags=no
14807 ;;
14808 esac
14809 done
14810
14811 if test -n "$cf_new_cflags" ; then
14812
14813 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14814 CFLAGS="${CFLAGS}$cf_new_cflags"
14815
14816 fi
14817
14818 if test -n "$cf_new_cppflags" ; then
14819
14820 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14821 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14822
14823 fi
14824
14825 if test -n "$cf_new_extra_cppflags" ; then
14826
14827 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14828 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14829
14830 fi
14831
14832 cf_add_libs="$LIBS"
14833 # reverse order
14834 cf_add_0lib=
14835 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14836 # filter duplicates
14837 for cf_add_1lib in $cf_add_0lib; do
14838 for cf_add_2lib in $cf_add_libs; do
14839 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14840 cf_add_1lib=
14841 break
14842 fi
14843 done
14844 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14845 done
14846 LIBS="$cf_add_libs"
14847
14848 :
14849 else
14850 cf_pkgconfig_incs=
14851 cf_pkgconfig_libs=
14852
14853 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14854
14855 echo "${as_me:-configure}:14855: testing ...before $LIBS ..." 1>&5
14856
14857 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14858 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14859
14860 echo "${as_me:-configure}:14860: testing ...after $LIBS ..." 1>&5
14861
14862 fi
14863
14864 fi
14865 ;;
14866 esac
14867
14868 echo "$as_me:14868: checking for usable X Toolkit package" >&5
14869 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14870 if test "${cf_cv_xt_ice_compat+set}" = set; then
14871 echo $ECHO_N "(cached) $ECHO_C" >&6
14872 else
14873
14874 cat >"conftest.$ac_ext" <<_ACEOF
14875 #line 14875 "configure"
14876 #include "confdefs.h"
14877
14878 $ac_includes_default
14879 #include <X11/Shell.h>
14880
14881 int
14882 main (void)
14883 {
14884 int num = IceConnectionNumber(0); (void) num
14885
14886 ;
14887 return 0;
14888 }
14889 _ACEOF
14890 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14891 if { (eval echo "$as_me:14891: \"$ac_link\"") >&5
14892 (eval $ac_link) 2>&5
14893 ac_status=$?
14894 echo "$as_me:14894: \$? = $ac_status" >&5
14895 (exit "$ac_status"); } &&
14896 { ac_try='test -s "conftest$ac_exeext"'
14897 { (eval echo "$as_me:14897: \"$ac_try\"") >&5
14898 (eval $ac_try) 2>&5
14899 ac_status=$?
14900 echo "$as_me:14900: \$? = $ac_status" >&5
14901 (exit "$ac_status"); }; }; then
14902 cf_cv_xt_ice_compat=yes
14903 else
14904 echo "$as_me: failed program was:" >&5
14905 cat "conftest.$ac_ext" >&5
14906 cf_cv_xt_ice_compat=no
14907 fi
14908 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14909 fi
14910 echo "$as_me:14910: result: $cf_cv_xt_ice_compat" >&5
14911 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14912
14913 if test "$cf_cv_xt_ice_compat" = no
14914 then
14915 # workaround for broken ".pc" files used for X Toolkit.
14916 case "x$X_PRE_LIBS" in
14917 (*-lICE*)
14918 case "x$LIBS" in
14919 (*-lICE*)
14920 ;;
14921 (*)
14922 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14923
14924 echo "${as_me:-configure}:14924: testing work around broken ICE dependency ..." 1>&5
14925
14926 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14927 test -n "$verbose" && echo " found package ice" 1>&6
14928
14929 echo "${as_me:-configure}:14929: testing found package ice ..." 1>&5
14930
14931 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14932 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14933 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14934
14935 echo "${as_me:-configure}:14935: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14936
14937 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14938
14939 echo "${as_me:-configure}:14939: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14940
14941 cf_fix_cppflags=no
14942 cf_new_cflags=
14943 cf_new_cppflags=
14944 cf_new_extra_cppflags=
14945
14946 for cf_add_cflags in $cf_pkgconfig_incs
14947 do
14948 case "$cf_fix_cppflags" in
14949 (no)
14950 case "$cf_add_cflags" in
14951 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14952 case "$cf_add_cflags" in
14953 (-D*)
14954 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14955
14956 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14957 && test -z "${cf_tst_cflags}" \
14958 && cf_fix_cppflags=yes
14959
14960 if test "$cf_fix_cppflags" = yes ; then
14961
14962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14964
14965 continue
14966 elif test "${cf_tst_cflags}" = "\"'" ; then
14967
14968 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14969 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14970
14971 continue
14972 fi
14973 ;;
14974 esac
14975 case "$CPPFLAGS" in
14976 (*$cf_add_cflags)
14977 ;;
14978 (*)
14979 case "$cf_add_cflags" in
14980 (-D*)
14981 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14982
14983 CPPFLAGS=`echo "$CPPFLAGS" | \
14984 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14985 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14986
14987 ;;
14988 esac
14989
14990 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14991 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14992
14993 ;;
14994 esac
14995 ;;
14996 (*)
14997
14998 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14999 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15000
15001 ;;
15002 esac
15003 ;;
15004 (yes)
15005
15006 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15007 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15008
15009 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15010
15011 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15012 && test -z "${cf_tst_cflags}" \
15013 && cf_fix_cppflags=no
15014 ;;
15015 esac
15016 done
15017
15018 if test -n "$cf_new_cflags" ; then
15019
15020 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15021 CFLAGS="${CFLAGS}$cf_new_cflags"
15022
15023 fi
15024
15025 if test -n "$cf_new_cppflags" ; then
15026
15027 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15028 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15029
15030 fi
15031
15032 if test -n "$cf_new_extra_cppflags" ; then
15033
15034 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15035 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15036
15037 fi
15038
15039 cf_add_libs="$LIBS"
15040 # reverse order
15041 cf_add_0lib=
15042 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15043 # filter duplicates
15044 for cf_add_1lib in $cf_add_0lib; do
15045 for cf_add_2lib in $cf_add_libs; do
15046 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15047 cf_add_1lib=
15048 break
15049 fi
15050 done
15051 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15052 done
15053 LIBS="$cf_add_libs"
15054
15055 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
15056 test -n "$verbose" && echo " found package sm" 1>&6
15057
15058 echo "${as_me:-configure}:15058: testing found package sm ..." 1>&5
15059
15060 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15061 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15062 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15063
15064 echo "${as_me:-configure}:15064: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15065
15066 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15067
15068 echo "${as_me:-configure}:15068: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15069
15070 cf_fix_cppflags=no
15071 cf_new_cflags=
15072 cf_new_cppflags=
15073 cf_new_extra_cppflags=
15074
15075 for cf_add_cflags in $cf_pkgconfig_incs
15076 do
15077 case "$cf_fix_cppflags" in
15078 (no)
15079 case "$cf_add_cflags" in
15080 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15081 case "$cf_add_cflags" in
15082 (-D*)
15083 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15084
15085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15086 && test -z "${cf_tst_cflags}" \
15087 && cf_fix_cppflags=yes
15088
15089 if test "$cf_fix_cppflags" = yes ; then
15090
15091 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15092 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15093
15094 continue
15095 elif test "${cf_tst_cflags}" = "\"'" ; then
15096
15097 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15098 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15099
15100 continue
15101 fi
15102 ;;
15103 esac
15104 case "$CPPFLAGS" in
15105 (*$cf_add_cflags)
15106 ;;
15107 (*)
15108 case "$cf_add_cflags" in
15109 (-D*)
15110 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15111
15112 CPPFLAGS=`echo "$CPPFLAGS" | \
15113 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15114 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15115
15116 ;;
15117 esac
15118
15119 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15120 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15121
15122 ;;
15123 esac
15124 ;;
15125 (*)
15126
15127 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15128 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15129
15130 ;;
15131 esac
15132 ;;
15133 (yes)
15134
15135 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15136 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15137
15138 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15139
15140 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15141 && test -z "${cf_tst_cflags}" \
15142 && cf_fix_cppflags=no
15143 ;;
15144 esac
15145 done
15146
15147 if test -n "$cf_new_cflags" ; then
15148
15149 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15150 CFLAGS="${CFLAGS}$cf_new_cflags"
15151
15152 fi
15153
15154 if test -n "$cf_new_cppflags" ; then
15155
15156 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15157 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15158
15159 fi
15160
15161 if test -n "$cf_new_extra_cppflags" ; then
15162
15163 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15164 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15165
15166 fi
15167
15168 cf_add_libs="$LIBS"
15169 # reverse order
15170 cf_add_0lib=
15171 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15172 # filter duplicates
15173 for cf_add_1lib in $cf_add_0lib; do
15174 for cf_add_2lib in $cf_add_libs; do
15175 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15176 cf_add_1lib=
15177 break
15178 fi
15179 done
15180 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15181 done
15182 LIBS="$cf_add_libs"
15183
15184 :
15185 else
15186 cf_pkgconfig_incs=
15187 cf_pkgconfig_libs=
15188 :
15189 fi
15190
15191 else
15192 cf_pkgconfig_incs=
15193 cf_pkgconfig_libs=
15194
15195 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15196
15197 echo "${as_me:-configure}:15197: testing ...before $LIBS ..." 1>&5
15198
15199 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
15200 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15201
15202 echo "${as_me:-configure}:15202: testing ...after $LIBS ..." 1>&5
15203
15204 fi
15205
15206 ;;
15207 esac
15208 ;;
15209 esac
15210 fi
15211
15212 cf_have_X_LIBS=yes
15213
15214 else
15215 cf_pkgconfig_incs=
15216 cf_pkgconfig_libs=
15217
15218 LDFLAGS="$X_LIBS $LDFLAGS"
15219
15220 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15221
15222 echo "${as_me:-configure}:15222: testing checking additions to CFLAGS ..." 1>&5
15223
15224 cf_check_cflags="$CFLAGS"
15225 cf_check_cppflags="$CPPFLAGS"
15226
15227 cf_fix_cppflags=no
15228 cf_new_cflags=
15229 cf_new_cppflags=
15230 cf_new_extra_cppflags=
15231
15232 for cf_add_cflags in $X_CFLAGS
15233 do
15234 case "$cf_fix_cppflags" in
15235 (no)
15236 case "$cf_add_cflags" in
15237 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15238 case "$cf_add_cflags" in
15239 (-D*)
15240 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15241
15242 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15243 && test -z "${cf_tst_cflags}" \
15244 && cf_fix_cppflags=yes
15245
15246 if test "$cf_fix_cppflags" = yes ; then
15247
15248 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15249 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15250
15251 continue
15252 elif test "${cf_tst_cflags}" = "\"'" ; then
15253
15254 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15255 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15256
15257 continue
15258 fi
15259 ;;
15260 esac
15261 case "$CPPFLAGS" in
15262 (*$cf_add_cflags)
15263 ;;
15264 (*)
15265 case "$cf_add_cflags" in
15266 (-D*)
15267 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15268
15269 CPPFLAGS=`echo "$CPPFLAGS" | \
15270 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15271 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15272
15273 ;;
15274 esac
15275
15276 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15277 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15278
15279 ;;
15280 esac
15281 ;;
15282 (*)
15283
15284 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15285 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15286
15287 ;;
15288 esac
15289 ;;
15290 (yes)
15291
15292 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15293 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15294
15295 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15296
15297 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15298 && test -z "${cf_tst_cflags}" \
15299 && cf_fix_cppflags=no
15300 ;;
15301 esac
15302 done
15303
15304 if test -n "$cf_new_cflags" ; then
15305 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15306
15307 echo "${as_me:-configure}:15307: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15308
15309 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15310 CFLAGS="${CFLAGS}$cf_new_cflags"
15311
15312 fi
15313
15314 if test -n "$cf_new_cppflags" ; then
15315 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15316
15317 echo "${as_me:-configure}:15317: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15318
15319 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15320 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15321
15322 fi
15323
15324 if test -n "$cf_new_extra_cppflags" ; then
15325 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15326
15327 echo "${as_me:-configure}:15327: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15328
15329 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15330 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15331
15332 fi
15333
15334 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15335 cat >"conftest.$ac_ext" <<_ACEOF
15336 #line 15336 "configure"
15337 #include "confdefs.h"
15338 #include <stdio.h>
15339 int
15340 main (void)
15341 {
15342 printf("Hello world");
15343 ;
15344 return 0;
15345 }
15346 _ACEOF
15347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15348 if { (eval echo "$as_me:15348: \"$ac_link\"") >&5
15349 (eval $ac_link) 2>&5
15350 ac_status=$?
15351 echo "$as_me:15351: \$? = $ac_status" >&5
15352 (exit "$ac_status"); } &&
15353 { ac_try='test -s "conftest$ac_exeext"'
15354 { (eval echo "$as_me:15354: \"$ac_try\"") >&5
15355 (eval $ac_try) 2>&5
15356 ac_status=$?
15357 echo "$as_me:15357: \$? = $ac_status" >&5
15358 (exit "$ac_status"); }; }; then
15359 :
15360 else
15361 echo "$as_me: failed program was:" >&5
15362 cat "conftest.$ac_ext" >&5
15363 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15364
15365 echo "${as_me:-configure}:15365: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15366
15367 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15368 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15369
15370 echo "${as_me:-configure}:15370: testing but keeping change to \$CPPFLAGS ..." 1>&5
15371
15372 fi
15373 CFLAGS="$cf_check_cflags"
15374 fi
15375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15376 fi
15377
15378 echo "$as_me:15378: checking for XOpenDisplay" >&5
15379 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15380 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15381 echo $ECHO_N "(cached) $ECHO_C" >&6
15382 else
15383 cat >"conftest.$ac_ext" <<_ACEOF
15384 #line 15384 "configure"
15385 #include "confdefs.h"
15386 #define XOpenDisplay autoconf_temporary
15387 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15388 #undef XOpenDisplay
15389
15390 #ifdef __cplusplus
15391 extern "C"
15392 #endif
15393
15394 /* We use char because int might match the return type of a gcc2
15395 builtin and then its argument prototype would still apply. */
15396 char XOpenDisplay (void);
15397
15398 int
15399 main (void)
15400 {
15401
15402 /* The GNU C library defines stubs for functions which it implements
15403 to always fail with ENOSYS. Some functions are actually named
15404 something starting with __ and the normal name is an alias. */
15405 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15406 #error found stub for XOpenDisplay
15407 #endif
15408
15409 return XOpenDisplay ();
15410 ;
15411 return 0;
15412 }
15413 _ACEOF
15414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15415 if { (eval echo "$as_me:15415: \"$ac_link\"") >&5
15416 (eval $ac_link) 2>&5
15417 ac_status=$?
15418 echo "$as_me:15418: \$? = $ac_status" >&5
15419 (exit "$ac_status"); } &&
15420 { ac_try='test -s "conftest$ac_exeext"'
15421 { (eval echo "$as_me:15421: \"$ac_try\"") >&5
15422 (eval $ac_try) 2>&5
15423 ac_status=$?
15424 echo "$as_me:15424: \$? = $ac_status" >&5
15425 (exit "$ac_status"); }; }; then
15426 ac_cv_func_XOpenDisplay=yes
15427 else
15428 echo "$as_me: failed program was:" >&5
15429 cat "conftest.$ac_ext" >&5
15430 ac_cv_func_XOpenDisplay=no
15431 fi
15432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15433 fi
15434 echo "$as_me:15434: result: $ac_cv_func_XOpenDisplay" >&5
15435 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15436 if test "$ac_cv_func_XOpenDisplay" = yes; then
15437 :
15438 else
15439
15440 echo "$as_me:15440: checking for XOpenDisplay in -lX11" >&5
15441 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15442 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15443 echo $ECHO_N "(cached) $ECHO_C" >&6
15444 else
15445 ac_check_lib_save_LIBS=$LIBS
15446 LIBS="-lX11 $LIBS"
15447 cat >"conftest.$ac_ext" <<_ACEOF
15448 #line 15448 "configure"
15449 #include "confdefs.h"
15450
15451 /* Override any gcc2 internal prototype to avoid an error. */
15452 #ifdef __cplusplus
15453 extern "C"
15454 #endif
15455 /* We use char because int might match the return type of a gcc2
15456 builtin and then its argument prototype would still apply. */
15457 char XOpenDisplay (void);
15458 int
15459 main (void)
15460 {
15461 XOpenDisplay ();
15462 ;
15463 return 0;
15464 }
15465 _ACEOF
15466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15467 if { (eval echo "$as_me:15467: \"$ac_link\"") >&5
15468 (eval $ac_link) 2>&5
15469 ac_status=$?
15470 echo "$as_me:15470: \$? = $ac_status" >&5
15471 (exit "$ac_status"); } &&
15472 { ac_try='test -s "conftest$ac_exeext"'
15473 { (eval echo "$as_me:15473: \"$ac_try\"") >&5
15474 (eval $ac_try) 2>&5
15475 ac_status=$?
15476 echo "$as_me:15476: \$? = $ac_status" >&5
15477 (exit "$ac_status"); }; }; then
15478 ac_cv_lib_X11_XOpenDisplay=yes
15479 else
15480 echo "$as_me: failed program was:" >&5
15481 cat "conftest.$ac_ext" >&5
15482 ac_cv_lib_X11_XOpenDisplay=no
15483 fi
15484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15485 LIBS=$ac_check_lib_save_LIBS
15486 fi
15487 echo "$as_me:15487: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15488 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15489 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15490
15491 cf_add_libs="$LIBS"
15492 # reverse order
15493 cf_add_0lib=
15494 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15495 # filter duplicates
15496 for cf_add_1lib in $cf_add_0lib; do
15497 for cf_add_2lib in $cf_add_libs; do
15498 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15499 cf_add_1lib=
15500 break
15501 fi
15502 done
15503 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15504 done
15505 LIBS="$cf_add_libs"
15506
15507 fi
15508
15509 fi
15510
15511 echo "$as_me:15511: checking for XtAppInitialize" >&5
15512 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15513 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15514 echo $ECHO_N "(cached) $ECHO_C" >&6
15515 else
15516 cat >"conftest.$ac_ext" <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519 #define XtAppInitialize autoconf_temporary
15520 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15521 #undef XtAppInitialize
15522
15523 #ifdef __cplusplus
15524 extern "C"
15525 #endif
15526
15527 /* We use char because int might match the return type of a gcc2
15528 builtin and then its argument prototype would still apply. */
15529 char XtAppInitialize (void);
15530
15531 int
15532 main (void)
15533 {
15534
15535 /* The GNU C library defines stubs for functions which it implements
15536 to always fail with ENOSYS. Some functions are actually named
15537 something starting with __ and the normal name is an alias. */
15538 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15539 #error found stub for XtAppInitialize
15540 #endif
15541
15542 return XtAppInitialize ();
15543 ;
15544 return 0;
15545 }
15546 _ACEOF
15547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15548 if { (eval echo "$as_me:15548: \"$ac_link\"") >&5
15549 (eval $ac_link) 2>&5
15550 ac_status=$?
15551 echo "$as_me:15551: \$? = $ac_status" >&5
15552 (exit "$ac_status"); } &&
15553 { ac_try='test -s "conftest$ac_exeext"'
15554 { (eval echo "$as_me:15554: \"$ac_try\"") >&5
15555 (eval $ac_try) 2>&5
15556 ac_status=$?
15557 echo "$as_me:15557: \$? = $ac_status" >&5
15558 (exit "$ac_status"); }; }; then
15559 ac_cv_func_XtAppInitialize=yes
15560 else
15561 echo "$as_me: failed program was:" >&5
15562 cat "conftest.$ac_ext" >&5
15563 ac_cv_func_XtAppInitialize=no
15564 fi
15565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15566 fi
15567 echo "$as_me:15567: result: $ac_cv_func_XtAppInitialize" >&5
15568 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15569 if test "$ac_cv_func_XtAppInitialize" = yes; then
15570 :
15571 else
15572
15573 echo "$as_me:15573: checking for XtAppInitialize in -lXt" >&5
15574 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15575 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15576 echo $ECHO_N "(cached) $ECHO_C" >&6
15577 else
15578 ac_check_lib_save_LIBS=$LIBS
15579 LIBS="-lXt $LIBS"
15580 cat >"conftest.$ac_ext" <<_ACEOF
15581 #line 15581 "configure"
15582 #include "confdefs.h"
15583
15584 /* Override any gcc2 internal prototype to avoid an error. */
15585 #ifdef __cplusplus
15586 extern "C"
15587 #endif
15588 /* We use char because int might match the return type of a gcc2
15589 builtin and then its argument prototype would still apply. */
15590 char XtAppInitialize (void);
15591 int
15592 main (void)
15593 {
15594 XtAppInitialize ();
15595 ;
15596 return 0;
15597 }
15598 _ACEOF
15599 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15600 if { (eval echo "$as_me:15600: \"$ac_link\"") >&5
15601 (eval $ac_link) 2>&5
15602 ac_status=$?
15603 echo "$as_me:15603: \$? = $ac_status" >&5
15604 (exit "$ac_status"); } &&
15605 { ac_try='test -s "conftest$ac_exeext"'
15606 { (eval echo "$as_me:15606: \"$ac_try\"") >&5
15607 (eval $ac_try) 2>&5
15608 ac_status=$?
15609 echo "$as_me:15609: \$? = $ac_status" >&5
15610 (exit "$ac_status"); }; }; then
15611 ac_cv_lib_Xt_XtAppInitialize=yes
15612 else
15613 echo "$as_me: failed program was:" >&5
15614 cat "conftest.$ac_ext" >&5
15615 ac_cv_lib_Xt_XtAppInitialize=no
15616 fi
15617 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15618 LIBS=$ac_check_lib_save_LIBS
15619 fi
15620 echo "$as_me:15620: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15621 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15622 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15623
15624 cat >>confdefs.h <<\EOF
15625 #define HAVE_LIBXT 1
15626 EOF
15627
15628 cf_have_X_LIBS=Xt
15629 LIBS="-lXt $LIBS"
15630 fi
15631
15632 fi
15633
15634 fi
15635
15636 if test "$cf_have_X_LIBS" = no ; then
15637 { echo "$as_me:15637: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15638 test program. You will have to check and add the proper libraries by hand
15639 to makefile." >&5
15640 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15641 test program. You will have to check and add the proper libraries by hand
15642 to makefile." >&2;}
15643 fi
15644
15645 cf_x_athena_root=$cf_x_athena
15646 cf_x_athena_inc=""
15647
15648 for cf_path in default \
15649 /usr/contrib/X11R6 \
15650 /usr/contrib/X11R5 \
15651 /usr/lib/X11R5 \
15652 /usr/local
15653 do
15654 if test -z "$cf_x_athena_inc" ; then
15655
15656 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15657 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15658 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15659 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15660 for cf_X_CFLAGS in $X_CFLAGS
15661 do
15662 case "x$cf_X_CFLAGS" in
15663 x-[IUD]*)
15664 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15665 ;;
15666 *)
15667 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15668 ;;
15669 esac
15670 done
15671
15672 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15673 if test "$cf_path" != default ; then
15674
15675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15676 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15677
15678 echo "$as_me:15678: checking for $cf_test in $cf_path" >&5
15679 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15680 else
15681 echo "$as_me:15681: checking for $cf_test" >&5
15682 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15683 fi
15684 cat >"conftest.$ac_ext" <<_ACEOF
15685 #line 15685 "configure"
15686 #include "confdefs.h"
15687
15688 #include <X11/Intrinsic.h>
15689 #include <$cf_test>
15690 int
15691 main (void)
15692 {
15693
15694 ;
15695 return 0;
15696 }
15697 _ACEOF
15698 rm -f "conftest.$ac_objext"
15699 if { (eval echo "$as_me:15699: \"$ac_compile\"") >&5
15700 (eval $ac_compile) 2>&5
15701 ac_status=$?
15702 echo "$as_me:15702: \$? = $ac_status" >&5
15703 (exit "$ac_status"); } &&
15704 { ac_try='test -s "conftest.$ac_objext"'
15705 { (eval echo "$as_me:15705: \"$ac_try\"") >&5
15706 (eval $ac_try) 2>&5
15707 ac_status=$?
15708 echo "$as_me:15708: \$? = $ac_status" >&5
15709 (exit "$ac_status"); }; }; then
15710 cf_result=yes
15711 else
15712 echo "$as_me: failed program was:" >&5
15713 cat "conftest.$ac_ext" >&5
15714 cf_result=no
15715 fi
15716 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15717 echo "$as_me:15717: result: $cf_result" >&5
15718 echo "${ECHO_T}$cf_result" >&6
15719
15720 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15721 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15722 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15723
15724 if test "$cf_result" = yes ; then
15725 test "$cf_path" = default && cf_x_athena_inc=default
15726 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15727 break
15728 fi
15729 fi
15730 done
15731
15732 if test -z "$cf_x_athena_inc" ; then
15733 { echo "$as_me:15733: WARNING: Unable to find Athena header files" >&5
15734 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15735 elif test "$cf_x_athena_inc" != default ; then
15736
15737 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15738 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15739
15740 fi
15741
15742 cf_x_athena_root=$cf_x_athena
15743 cf_x_athena_lib=""
15744
15745 for cf_path in default \
15746 /usr/contrib/X11R6 \
15747 /usr/contrib/X11R5 \
15748 /usr/lib/X11R5 \
15749 /usr/local
15750 do
15751 for cf_lib in \
15752 ${cf_x_athena_root} \
15753 ${cf_x_athena_root}7 \
15754 ${cf_x_athena_root}6
15755 do
15756 for cf_libs in \
15757 "-l$cf_lib -lXmu" \
15758 "-l$cf_lib -lXpm -lXmu" \
15759 "-l${cf_lib}_s -lXmu_s"
15760 do
15761 test -n "$cf_x_athena_lib" && break
15762
15763 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15764 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15765 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15766 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15767 for cf_X_CFLAGS in $X_CFLAGS
15768 do
15769 case "x$cf_X_CFLAGS" in
15770 x-[IUD]*)
15771 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15772 ;;
15773 *)
15774 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15775 ;;
15776 esac
15777 done
15778
15779 cf_test=XawSimpleMenuAddGlobalActions
15780 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15781
15782 cf_add_libs="$LIBS"
15783 # reverse order
15784 cf_add_0lib=
15785 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15786 # filter duplicates
15787 for cf_add_1lib in $cf_add_0lib; do
15788 for cf_add_2lib in $cf_add_libs; do
15789 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15790 cf_add_1lib=
15791 break
15792 fi
15793 done
15794 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15795 done
15796 LIBS="$cf_add_libs"
15797
15798 echo "$as_me:15798: checking for $cf_test in $cf_libs" >&5
15799 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15800 cat >"conftest.$ac_ext" <<_ACEOF
15801 #line 15801 "configure"
15802 #include "confdefs.h"
15803
15804 $ac_includes_default
15805 #include <X11/Intrinsic.h>
15806 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15807
15808 int
15809 main (void)
15810 {
15811
15812 $cf_test((XtAppContext) 0)
15813 ;
15814 return 0;
15815 }
15816 _ACEOF
15817 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15818 if { (eval echo "$as_me:15818: \"$ac_link\"") >&5
15819 (eval $ac_link) 2>&5
15820 ac_status=$?
15821 echo "$as_me:15821: \$? = $ac_status" >&5
15822 (exit "$ac_status"); } &&
15823 { ac_try='test -s "conftest$ac_exeext"'
15824 { (eval echo "$as_me:15824: \"$ac_try\"") >&5
15825 (eval $ac_try) 2>&5
15826 ac_status=$?
15827 echo "$as_me:15827: \$? = $ac_status" >&5
15828 (exit "$ac_status"); }; }; then
15829 cf_result=yes
15830 else
15831 echo "$as_me: failed program was:" >&5
15832 cat "conftest.$ac_ext" >&5
15833 cf_result=no
15834 fi
15835 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15836 echo "$as_me:15836: result: $cf_result" >&5
15837 echo "${ECHO_T}$cf_result" >&6
15838
15839 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15840 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15841 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15842
15843 if test "$cf_result" = yes ; then
15844 cf_x_athena_lib="$cf_libs"
15845 break
15846 fi
15847 done # cf_libs
15848 test -n "$cf_x_athena_lib" && break
15849 done # cf_lib
15850 done
15851
15852 if test -z "$cf_x_athena_lib" ; then
15853 { { echo "$as_me:15853: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15854 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15855 { (exit 1); exit 1; }; }
15856 fi
15857
15858 cf_add_libs="$LIBS"
15859 # reverse order
15860 cf_add_0lib=
15861 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15862 # filter duplicates
15863 for cf_add_1lib in $cf_add_0lib; do
15864 for cf_add_2lib in $cf_add_libs; do
15865 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15866 cf_add_1lib=
15867 break
15868 fi
15869 done
15870 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15871 done
15872 LIBS="$cf_add_libs"
15873
15874 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15875
15876 cat >>confdefs.h <<EOF
15877 #define $cf_x_athena_LIBS 1
15878 EOF
15879
15880 fi
15881
15882 for ac_header in X11/Xpoll.h
15883 do
15884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15885 echo "$as_me:15885: checking for $ac_header" >&5
15886 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15887 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15888 echo $ECHO_N "(cached) $ECHO_C" >&6
15889 else
15890 cat >"conftest.$ac_ext" <<_ACEOF
15891 #line 15891 "configure"
15892 #include "confdefs.h"
15893 #include <$ac_header>
15894 _ACEOF
15895 if { (eval echo "$as_me:15895: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15896 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15897 ac_status=$?
15898 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15899 rm -f conftest.er1
15900 cat conftest.err >&5
15901 echo "$as_me:15901: \$? = $ac_status" >&5
15902 (exit "$ac_status"); } >/dev/null; then
15903 if test -s conftest.err; then
15904 ac_cpp_err=$ac_c_preproc_warn_flag
15905 else
15906 ac_cpp_err=
15907 fi
15908 else
15909 ac_cpp_err=yes
15910 fi
15911 if test -z "$ac_cpp_err"; then
15912 eval "$as_ac_Header=yes"
15913 else
15914 echo "$as_me: failed program was:" >&5
15915 cat "conftest.$ac_ext" >&5
15916 eval "$as_ac_Header=no"
15917 fi
15918 rm -f conftest.err "conftest.$ac_ext"
15919 fi
15920 echo "$as_me:15920: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15921 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15922 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15923 cat >>confdefs.h <<EOF
15924 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15925 EOF
15926
15927 fi
15928 done
15929
15930 echo "$as_me:15930: checking for declaration of fd_set" >&5
15931 echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
15932 if test "${cf_cv_type_fd_set+set}" = set; then
15933 echo $ECHO_N "(cached) $ECHO_C" >&6
15934 else
15935
15936 echo "${as_me:-configure}:15936: testing sys/types alone ..." 1>&5
15937
15938 cat >"conftest.$ac_ext" <<_ACEOF
15939 #line 15939 "configure"
15940 #include "confdefs.h"
15941
15942 #include <sys/types.h>
15943 int
15944 main (void)
15945 {
15946 fd_set x; (void)x
15947 ;
15948 return 0;
15949 }
15950 _ACEOF
15951 rm -f "conftest.$ac_objext"
15952 if { (eval echo "$as_me:15952: \"$ac_compile\"") >&5
15953 (eval $ac_compile) 2>&5
15954 ac_status=$?
15955 echo "$as_me:15955: \$? = $ac_status" >&5
15956 (exit "$ac_status"); } &&
15957 { ac_try='test -s "conftest.$ac_objext"'
15958 { (eval echo "$as_me:15958: \"$ac_try\"") >&5
15959 (eval $ac_try) 2>&5
15960 ac_status=$?
15961 echo "$as_me:15961: \$? = $ac_status" >&5
15962 (exit "$ac_status"); }; }; then
15963 cf_cv_type_fd_set=sys/types.h
15964 else
15965 echo "$as_me: failed program was:" >&5
15966 cat "conftest.$ac_ext" >&5
15967
15968 echo "${as_me:-configure}:15968: testing X11/Xpoll.h ..." 1>&5
15969
15970 cat >"conftest.$ac_ext" <<_ACEOF
15971 #line 15971 "configure"
15972 #include "confdefs.h"
15973
15974 #ifdef HAVE_X11_XPOLL_H
15975 #include <X11/Xpoll.h>
15976 #endif
15977 int
15978 main (void)
15979 {
15980 fd_set x; (void)x
15981 ;
15982 return 0;
15983 }
15984 _ACEOF
15985 rm -f "conftest.$ac_objext"
15986 if { (eval echo "$as_me:15986: \"$ac_compile\"") >&5
15987 (eval $ac_compile) 2>&5
15988 ac_status=$?
15989 echo "$as_me:15989: \$? = $ac_status" >&5
15990 (exit "$ac_status"); } &&
15991 { ac_try='test -s "conftest.$ac_objext"'
15992 { (eval echo "$as_me:15992: \"$ac_try\"") >&5
15993 (eval $ac_try) 2>&5
15994 ac_status=$?
15995 echo "$as_me:15995: \$? = $ac_status" >&5
15996 (exit "$ac_status"); }; }; then
15997 cf_cv_type_fd_set=X11/Xpoll.h
15998 else
15999 echo "$as_me: failed program was:" >&5
16000 cat "conftest.$ac_ext" >&5
16001
16002 echo "${as_me:-configure}:16002: testing sys/select.h ..." 1>&5
16003
16004 cat >"conftest.$ac_ext" <<_ACEOF
16005 #line 16005 "configure"
16006 #include "confdefs.h"
16007
16008 #include <sys/types.h>
16009 #include <sys/select.h>
16010 int
16011 main (void)
16012 {
16013 fd_set x; (void)x
16014 ;
16015 return 0;
16016 }
16017 _ACEOF
16018 rm -f "conftest.$ac_objext"
16019 if { (eval echo "$as_me:16019: \"$ac_compile\"") >&5
16020 (eval $ac_compile) 2>&5
16021 ac_status=$?
16022 echo "$as_me:16022: \$? = $ac_status" >&5
16023 (exit "$ac_status"); } &&
16024 { ac_try='test -s "conftest.$ac_objext"'
16025 { (eval echo "$as_me:16025: \"$ac_try\"") >&5
16026 (eval $ac_try) 2>&5
16027 ac_status=$?
16028 echo "$as_me:16028: \$? = $ac_status" >&5
16029 (exit "$ac_status"); }; }; then
16030 cf_cv_type_fd_set=sys/select.h
16031 else
16032 echo "$as_me: failed program was:" >&5
16033 cat "conftest.$ac_ext" >&5
16034 cf_cv_type_fd_set=unknown
16035 fi
16036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16037 fi
16038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16039 fi
16040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16041 fi
16042 echo "$as_me:16042: result: $cf_cv_type_fd_set" >&5
16043 echo "${ECHO_T}$cf_cv_type_fd_set" >&6
16044 if test $cf_cv_type_fd_set = sys/select.h ; then
16045
16046 cat >>confdefs.h <<\EOF
16047 #define USE_SYS_SELECT_H 1
16048 EOF
16049
16050 fi
16051
16052 echo "$as_me:16052: checking for declaration of fd_mask" >&5
16053 echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
16054 if test "${cf_cv_type_fd_mask+set}" = set; then
16055 echo $ECHO_N "(cached) $ECHO_C" >&6
16056 else
16057
16058 if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
16059 cat >"conftest.$ac_ext" <<_ACEOF
16060 #line 16060 "configure"
16061 #include "confdefs.h"
16062
16063 #include <X11/Xpoll.h>
16064 int
16065 main (void)
16066 {
16067 fd_mask x
16068 ;
16069 return 0;
16070 }
16071 _ACEOF
16072 rm -f "conftest.$ac_objext"
16073 if { (eval echo "$as_me:16073: \"$ac_compile\"") >&5
16074 (eval $ac_compile) 2>&5
16075 ac_status=$?
16076 echo "$as_me:16076: \$? = $ac_status" >&5
16077 (exit "$ac_status"); } &&
16078 { ac_try='test -s "conftest.$ac_objext"'
16079 { (eval echo "$as_me:16079: \"$ac_try\"") >&5
16080 (eval $ac_try) 2>&5
16081 ac_status=$?
16082 echo "$as_me:16082: \$? = $ac_status" >&5
16083 (exit "$ac_status"); }; }; then
16084 :
16085 else
16086 echo "$as_me: failed program was:" >&5
16087 cat "conftest.$ac_ext" >&5
16088
16089 echo "${as_me:-configure}:16089: testing if we must define CSRG_BASED ..." 1>&5
16090
16091 # Xosdefs.h on Mac OS X may not define this (but it should).
16092 cat >"conftest.$ac_ext" <<_ACEOF
16093 #line 16093 "configure"
16094 #include "confdefs.h"
16095
16096 #define CSRG_BASED
16097 #include <X11/Xpoll.h>
16098 int
16099 main (void)
16100 {
16101 fd_mask x
16102 ;
16103 return 0;
16104 }
16105 _ACEOF
16106 rm -f "conftest.$ac_objext"
16107 if { (eval echo "$as_me:16107: \"$ac_compile\"") >&5
16108 (eval $ac_compile) 2>&5
16109 ac_status=$?
16110 echo "$as_me:16110: \$? = $ac_status" >&5
16111 (exit "$ac_status"); } &&
16112 { ac_try='test -s "conftest.$ac_objext"'
16113 { (eval echo "$as_me:16113: \"$ac_try\"") >&5
16114 (eval $ac_try) 2>&5
16115 ac_status=$?
16116 echo "$as_me:16116: \$? = $ac_status" >&5
16117 (exit "$ac_status"); }; }; then
16118 cf_cv_type_fd_mask=CSRG_BASED
16119 else
16120 echo "$as_me: failed program was:" >&5
16121 cat "conftest.$ac_ext" >&5
16122 fi
16123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16124 fi
16125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16126 else
16127 cf_cv_type_fd_mask=$cf_cv_type_fd_set
16128 fi
16129
16130 fi
16131 echo "$as_me:16131: result: $cf_cv_type_fd_mask" >&5
16132 echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
16133 if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
16134
16135 cat >>confdefs.h <<\EOF
16136 #define CSRG_BASED 1
16137 EOF
16138
16139 fi
16140
16141 echo "$as_me:16141: checking for IRIX 6.5 baud-rate redefinitions" >&5
16142 echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
16143 if test "${cf_cv_termio_c_ispeed+set}" = set; then
16144 echo $ECHO_N "(cached) $ECHO_C" >&6
16145 else
16146
16147 cat >"conftest.$ac_ext" <<_ACEOF
16148 #line 16148 "configure"
16149 #include "confdefs.h"
16150
16151 #include <sys/types.h>
16152 #include <sys/termio.h>
16153 int
16154 main (void)
16155 {
16156
16157 struct termio foo;
16158 foo.c_ispeed = B38400;
16159 foo.c_ospeed = B9600;
16160 (void)foo;
16161
16162 ;
16163 return 0;
16164 }
16165 _ACEOF
16166 rm -f "conftest.$ac_objext"
16167 if { (eval echo "$as_me:16167: \"$ac_compile\"") >&5
16168 (eval $ac_compile) 2>&5
16169 ac_status=$?
16170 echo "$as_me:16170: \$? = $ac_status" >&5
16171 (exit "$ac_status"); } &&
16172 { ac_try='test -s "conftest.$ac_objext"'
16173 { (eval echo "$as_me:16173: \"$ac_try\"") >&5
16174 (eval $ac_try) 2>&5
16175 ac_status=$?
16176 echo "$as_me:16176: \$? = $ac_status" >&5
16177 (exit "$ac_status"); }; }; then
16178 cf_cv_termio_c_ispeed=yes
16179
16180 else
16181 echo "$as_me: failed program was:" >&5
16182 cat "conftest.$ac_ext" >&5
16183 cf_cv_termio_c_ispeed=no
16184 fi
16185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16186
16187 fi
16188 echo "$as_me:16188: result: $cf_cv_termio_c_ispeed" >&5
16189 echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
16190 test "$cf_cv_termio_c_ispeed" = yes &&
16191 cat >>confdefs.h <<\EOF
16192 #define HAVE_TERMIO_C_ISPEED 1
16193 EOF
16194
16195 echo "$as_me:16195: checking for termios type tcflag_t" >&5
16196 echo $ECHO_N "checking for termios type tcflag_t... $ECHO_C" >&6
16197 if test "${cf_cv_havetype_tcflag_t+set}" = set; then
16198 echo $ECHO_N "(cached) $ECHO_C" >&6
16199 else
16200
16201 cat >"conftest.$ac_ext" <<_ACEOF
16202 #line 16202 "configure"
16203 #include "confdefs.h"
16204 #include <termios.h>
16205 int
16206 main (void)
16207 {
16208
16209 tcflag_t x = 0; (void)x
16210 ;
16211 return 0;
16212 }
16213 _ACEOF
16214 rm -f "conftest.$ac_objext"
16215 if { (eval echo "$as_me:16215: \"$ac_compile\"") >&5
16216 (eval $ac_compile) 2>&5
16217 ac_status=$?
16218 echo "$as_me:16218: \$? = $ac_status" >&5
16219 (exit "$ac_status"); } &&
16220 { ac_try='test -s "conftest.$ac_objext"'
16221 { (eval echo "$as_me:16221: \"$ac_try\"") >&5
16222 (eval $ac_try) 2>&5
16223 ac_status=$?
16224 echo "$as_me:16224: \$? = $ac_status" >&5
16225 (exit "$ac_status"); }; }; then
16226 cf_cv_havetype_tcflag_t=yes
16227 else
16228 echo "$as_me: failed program was:" >&5
16229 cat "conftest.$ac_ext" >&5
16230 cf_cv_havetype_tcflag_t=no
16231 fi
16232 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16233
16234 fi
16235 echo "$as_me:16235: result: $cf_cv_havetype_tcflag_t" >&5
16236 echo "${ECHO_T}$cf_cv_havetype_tcflag_t" >&6
16237 test "$cf_cv_havetype_tcflag_t" = no &&
16238 cat >>confdefs.h <<\EOF
16239 #define tcflag_t unsigned long
16240 EOF
16241
16242 echo "$as_me:16242: checking for termios type speed_t" >&5
16243 echo $ECHO_N "checking for termios type speed_t... $ECHO_C" >&6
16244 if test "${cf_cv_havetype_speed_t+set}" = set; then
16245 echo $ECHO_N "(cached) $ECHO_C" >&6
16246 else
16247
16248 cat >"conftest.$ac_ext" <<_ACEOF
16249 #line 16249 "configure"
16250 #include "confdefs.h"
16251 #include <termios.h>
16252 int
16253 main (void)
16254 {
16255
16256 speed_t x = 0; (void)x
16257 ;
16258 return 0;
16259 }
16260 _ACEOF
16261 rm -f "conftest.$ac_objext"
16262 if { (eval echo "$as_me:16262: \"$ac_compile\"") >&5
16263 (eval $ac_compile) 2>&5
16264 ac_status=$?
16265 echo "$as_me:16265: \$? = $ac_status" >&5
16266 (exit "$ac_status"); } &&
16267 { ac_try='test -s "conftest.$ac_objext"'
16268 { (eval echo "$as_me:16268: \"$ac_try\"") >&5
16269 (eval $ac_try) 2>&5
16270 ac_status=$?
16271 echo "$as_me:16271: \$? = $ac_status" >&5
16272 (exit "$ac_status"); }; }; then
16273 cf_cv_havetype_speed_t=yes
16274 else
16275 echo "$as_me: failed program was:" >&5
16276 cat "conftest.$ac_ext" >&5
16277 cf_cv_havetype_speed_t=no
16278 fi
16279 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16280
16281 fi
16282 echo "$as_me:16282: result: $cf_cv_havetype_speed_t" >&5
16283 echo "${ECHO_T}$cf_cv_havetype_speed_t" >&6
16284 test "$cf_cv_havetype_speed_t" = no &&
16285 cat >>confdefs.h <<\EOF
16286 #define speed_t unsigned short
16287 EOF
16288
16289 echo "$as_me:16289: checking for termios type cc_t" >&5
16290 echo $ECHO_N "checking for termios type cc_t... $ECHO_C" >&6
16291 if test "${cf_cv_havetype_cc_t+set}" = set; then
16292 echo $ECHO_N "(cached) $ECHO_C" >&6
16293 else
16294
16295 cat >"conftest.$ac_ext" <<_ACEOF
16296 #line 16296 "configure"
16297 #include "confdefs.h"
16298 #include <termios.h>
16299 int
16300 main (void)
16301 {
16302
16303 cc_t x = 0; (void)x
16304 ;
16305 return 0;
16306 }
16307 _ACEOF
16308 rm -f "conftest.$ac_objext"
16309 if { (eval echo "$as_me:16309: \"$ac_compile\"") >&5
16310 (eval $ac_compile) 2>&5
16311 ac_status=$?
16312 echo "$as_me:16312: \$? = $ac_status" >&5
16313 (exit "$ac_status"); } &&
16314 { ac_try='test -s "conftest.$ac_objext"'
16315 { (eval echo "$as_me:16315: \"$ac_try\"") >&5
16316 (eval $ac_try) 2>&5
16317 ac_status=$?
16318 echo "$as_me:16318: \$? = $ac_status" >&5
16319 (exit "$ac_status"); }; }; then
16320 cf_cv_havetype_cc_t=yes
16321 else
16322 echo "$as_me: failed program was:" >&5
16323 cat "conftest.$ac_ext" >&5
16324 cf_cv_havetype_cc_t=no
16325 fi
16326 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16327
16328 fi
16329 echo "$as_me:16329: result: $cf_cv_havetype_cc_t" >&5
16330 echo "${ECHO_T}$cf_cv_havetype_cc_t" >&6
16331 test "$cf_cv_havetype_cc_t" = no &&
16332 cat >>confdefs.h <<\EOF
16333 #define cc_t unsigned char
16334 EOF
16335
16336 # The Xcursor library is normally (weakly) linked via the X11 library rather
16337 # than directly to applications. xterm can select a cursor theme; users can
16338 # also use environment variables to select cursor size. We would only notice
16339 # the library if there are development files for it. Provide a way to disable
16340 # the feature if it is unwanted.
16341 echo "$as_me:16341: checking if we expect to use the Xcursor library" >&5
16342 echo $ECHO_N "checking if we expect to use the Xcursor library... $ECHO_C" >&6
16343
16344 # Check whether --enable-xcursor or --disable-xcursor was given.
16345 if test "${enable_xcursor+set}" = set; then
16346 enableval="$enable_xcursor"
16347 test "$enableval" != no && enableval=yes
16348 if test "$enableval" != "yes" ; then
16349 enable_xcursor=no
16350 else
16351 enable_xcursor=yes
16352 fi
16353 else
16354 enableval=yes
16355 enable_xcursor=yes
16356
16357 fi;
16358 echo "$as_me:16358: result: $enable_xcursor" >&5
16359 echo "${ECHO_T}$enable_xcursor" >&6
16360 if test "$enable_xcursor" = yes; then
16361
16362 cat >>confdefs.h <<\EOF
16363 #define HAVE_LIB_XCURSOR 1
16364 EOF
16365
16366 fi
16367
16368 LIBS="$LIBS $X_EXTRA_LIBS"
16369
16370 for ac_header in \
16371 stropts.h \
16372
16373 do
16374 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16375 echo "$as_me:16375: checking for $ac_header" >&5
16376 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16377 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16378 echo $ECHO_N "(cached) $ECHO_C" >&6
16379 else
16380 cat >"conftest.$ac_ext" <<_ACEOF
16381 #line 16381 "configure"
16382 #include "confdefs.h"
16383 #include <$ac_header>
16384 _ACEOF
16385 if { (eval echo "$as_me:16385: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16386 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16387 ac_status=$?
16388 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16389 rm -f conftest.er1
16390 cat conftest.err >&5
16391 echo "$as_me:16391: \$? = $ac_status" >&5
16392 (exit "$ac_status"); } >/dev/null; then
16393 if test -s conftest.err; then
16394 ac_cpp_err=$ac_c_preproc_warn_flag
16395 else
16396 ac_cpp_err=
16397 fi
16398 else
16399 ac_cpp_err=yes
16400 fi
16401 if test -z "$ac_cpp_err"; then
16402 eval "$as_ac_Header=yes"
16403 else
16404 echo "$as_me: failed program was:" >&5
16405 cat "conftest.$ac_ext" >&5
16406 eval "$as_ac_Header=no"
16407 fi
16408 rm -f conftest.err "conftest.$ac_ext"
16409 fi
16410 echo "$as_me:16410: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16411 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16412 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16413 cat >>confdefs.h <<EOF
16414 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16415 EOF
16416
16417 fi
16418 done
16419
16420 cf_func_grantpt="grantpt ptsname"
16421 cf_prefer_openpt=no
16422 case $host_os in
16423 (darwin[0-9].*)
16424 ;;
16425 (openbsd[0-9].*)
16426 # The POSIX entrypoints exist, but have never worked.
16427 ;;
16428 (linux*)
16429 cf_func_grantpt="$cf_func_grantpt posix_openpt"
16430 cf_prefer_openpt=yes
16431 ;;
16432 (*)
16433 cf_func_grantpt="$cf_func_grantpt posix_openpt"
16434 ;;
16435 esac
16436
16437 for ac_func in $cf_func_grantpt
16438 do
16439 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16440 echo "$as_me:16440: checking for $ac_func" >&5
16441 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16442 if eval "test \"\${$as_ac_var+set}\" = set"; then
16443 echo $ECHO_N "(cached) $ECHO_C" >&6
16444 else
16445 cat >"conftest.$ac_ext" <<_ACEOF
16446 #line 16446 "configure"
16447 #include "confdefs.h"
16448 #define $ac_func autoconf_temporary
16449 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16450 #undef $ac_func
16451
16452 #ifdef __cplusplus
16453 extern "C"
16454 #endif
16455
16456 /* We use char because int might match the return type of a gcc2
16457 builtin and then its argument prototype would still apply. */
16458 char $ac_func (void);
16459
16460 int
16461 main (void)
16462 {
16463
16464 /* The GNU C library defines stubs for functions which it implements
16465 to always fail with ENOSYS. Some functions are actually named
16466 something starting with __ and the normal name is an alias. */
16467 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16468 #error found stub for $ac_func
16469 #endif
16470
16471 return $ac_func ();
16472 ;
16473 return 0;
16474 }
16475 _ACEOF
16476 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16477 if { (eval echo "$as_me:16477: \"$ac_link\"") >&5
16478 (eval $ac_link) 2>&5
16479 ac_status=$?
16480 echo "$as_me:16480: \$? = $ac_status" >&5
16481 (exit "$ac_status"); } &&
16482 { ac_try='test -s "conftest$ac_exeext"'
16483 { (eval echo "$as_me:16483: \"$ac_try\"") >&5
16484 (eval $ac_try) 2>&5
16485 ac_status=$?
16486 echo "$as_me:16486: \$? = $ac_status" >&5
16487 (exit "$ac_status"); }; }; then
16488 eval "$as_ac_var=yes"
16489 else
16490 echo "$as_me: failed program was:" >&5
16491 cat "conftest.$ac_ext" >&5
16492 eval "$as_ac_var=no"
16493 fi
16494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16495 fi
16496 echo "$as_me:16496: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16497 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16498 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16499 cat >>confdefs.h <<EOF
16500 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16501 EOF
16502
16503 fi
16504 done
16505
16506 cf_grantpt_opts=
16507 if test "x$ac_cv_func_grantpt" = "xyes" ; then
16508 echo "$as_me:16508: checking if grantpt really works" >&5
16509 echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
16510 cat >"conftest.$ac_ext" <<_ACEOF
16511 #line 16511 "configure"
16512 #include "confdefs.h"
16513
16514 #include <stdlib.h>
16515 #include <stdio.h>
16516 #include <termios.h>
16517 #include <unistd.h>
16518 #include <signal.h>
16519 #include <fcntl.h>
16520 #include <errno.h>
16521
16522 #ifndef HAVE_POSIX_OPENPT
16523 #undef posix_openpt
16524 #define posix_openpt(mode) open("/dev/ptmx", mode)
16525 #endif
16526
16527 #ifdef HAVE_STROPTS_H
16528 #include <stropts.h>
16529 #endif
16530
16531 static void failed(int code)
16532 {
16533 perror("conftest");
16534 exit(code);
16535 }
16536
16537 static void my_timeout(int sig)
16538 {
16539 (void)sig;
16540 exit(99);
16541 }
16542
16543 int
16544 main (void)
16545 {
16546
16547 int code = 0;
16548 int pty;
16549 int tty;
16550 char *slave;
16551 struct termios tio;
16552
16553 (void)tio;
16554 signal(SIGALRM, my_timeout);
16555
16556 if (alarm(2) == 9)
16557 failed(9);
16558 else if ((pty = posix_openpt(O_RDWR)) < 0)
16559 failed(1);
16560 else if (grantpt(pty) < 0)
16561 failed(2);
16562 else if (unlockpt(pty) < 0)
16563 failed(3);
16564 else if ((slave = ptsname(pty)) == 0)
16565 failed(4);
16566 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
16567 else if (!isatty(pty))
16568 failed(4);
16569 #endif
16570 #if CONFTEST >= 4
16571 else if (tcgetattr(pty, &tio) < 0)
16572 failed(20);
16573 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16574 failed(21);
16575 #endif
16576 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16577 * Linux does treat it that way.
16578 */
16579 else if ((tty = open(slave, O_RDWR)) < 0)
16580 failed(5);
16581 #ifdef CONFTEST
16582 #ifdef I_PUSH
16583 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
16584 else if (ioctl(tty, I_PUSH, "ptem") < 0)
16585 failed(10);
16586 #endif
16587 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16588 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16589 failed(11);
16590 #endif
16591 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16592 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16593 failed(12);
16594 #endif
16595 #endif /* I_PUSH */
16596 #if CONFTEST >= 5
16597 else if (tcgetattr(tty, &tio) < 0)
16598 failed(30);
16599 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16600 failed(31);
16601 #endif
16602 #endif /* CONFTEST */
16603 (void) tty;
16604 ${cf_cv_main_return:-return}(code);
16605
16606 ;
16607 return 0;
16608 }
16609 _ACEOF
16610 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16611 if { (eval echo "$as_me:16611: \"$ac_link\"") >&5
16612 (eval $ac_link) 2>&5
16613 ac_status=$?
16614 echo "$as_me:16614: \$? = $ac_status" >&5
16615 (exit "$ac_status"); } &&
16616 { ac_try='test -s "conftest$ac_exeext"'
16617 { (eval echo "$as_me:16617: \"$ac_try\"") >&5
16618 (eval $ac_try) 2>&5
16619 ac_status=$?
16620 echo "$as_me:16620: \$? = $ac_status" >&5
16621 (exit "$ac_status"); }; }; then
16622
16623 if test "$cross_compiling" = yes; then
16624 ac_cv_func_grantpt=maybe
16625 else
16626 cat >"conftest.$ac_ext" <<_ACEOF
16627 #line 16627 "configure"
16628 #include "confdefs.h"
16629
16630 #include <stdlib.h>
16631 #include <stdio.h>
16632 #include <termios.h>
16633 #include <unistd.h>
16634 #include <signal.h>
16635 #include <fcntl.h>
16636 #include <errno.h>
16637
16638 #ifndef HAVE_POSIX_OPENPT
16639 #undef posix_openpt
16640 #define posix_openpt(mode) open("/dev/ptmx", mode)
16641 #endif
16642
16643 #ifdef HAVE_STROPTS_H
16644 #include <stropts.h>
16645 #endif
16646
16647 static void failed(int code)
16648 {
16649 perror("conftest");
16650 exit(code);
16651 }
16652
16653 static void my_timeout(int sig)
16654 {
16655 (void)sig;
16656 exit(99);
16657 }
16658
16659 int main(void)
16660 {
16661
16662 int code = 0;
16663 int pty;
16664 int tty;
16665 char *slave;
16666 struct termios tio;
16667
16668 (void)tio;
16669 signal(SIGALRM, my_timeout);
16670
16671 if (alarm(2) == 9)
16672 failed(9);
16673 else if ((pty = posix_openpt(O_RDWR)) < 0)
16674 failed(1);
16675 else if (grantpt(pty) < 0)
16676 failed(2);
16677 else if (unlockpt(pty) < 0)
16678 failed(3);
16679 else if ((slave = ptsname(pty)) == 0)
16680 failed(4);
16681 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
16682 else if (!isatty(pty))
16683 failed(4);
16684 #endif
16685 #if CONFTEST >= 4
16686 else if (tcgetattr(pty, &tio) < 0)
16687 failed(20);
16688 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16689 failed(21);
16690 #endif
16691 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16692 * Linux does treat it that way.
16693 */
16694 else if ((tty = open(slave, O_RDWR)) < 0)
16695 failed(5);
16696 #ifdef CONFTEST
16697 #ifdef I_PUSH
16698 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
16699 else if (ioctl(tty, I_PUSH, "ptem") < 0)
16700 failed(10);
16701 #endif
16702 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16703 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16704 failed(11);
16705 #endif
16706 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16707 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16708 failed(12);
16709 #endif
16710 #endif /* I_PUSH */
16711 #if CONFTEST >= 5
16712 else if (tcgetattr(tty, &tio) < 0)
16713 failed(30);
16714 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16715 failed(31);
16716 #endif
16717 #endif /* CONFTEST */
16718 (void) tty;
16719 ${cf_cv_main_return:-return}(code);
16720
16721 }
16722
16723 _ACEOF
16724 rm -f "conftest$ac_exeext"
16725 if { (eval echo "$as_me:16725: \"$ac_link\"") >&5
16726 (eval $ac_link) 2>&5
16727 ac_status=$?
16728 echo "$as_me:16728: \$? = $ac_status" >&5
16729 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16730 { (eval echo "$as_me:16730: \"$ac_try\"") >&5
16731 (eval $ac_try) 2>&5
16732 ac_status=$?
16733 echo "$as_me:16733: \$? = $ac_status" >&5
16734 (exit "$ac_status"); }; }; then
16735 :
16736 else
16737 echo "$as_me: program exited with status $ac_status" >&5
16738 echo "$as_me: failed program was:" >&5
16739 cat "conftest.$ac_ext" >&5
16740 ac_cv_func_grantpt=no
16741
16742 fi
16743 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16744 fi
16745
16746 else
16747 echo "$as_me: failed program was:" >&5
16748 cat "conftest.$ac_ext" >&5
16749 ac_cv_func_grantpt=no
16750 fi
16751 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16752 echo "$as_me:16752: result: $ac_cv_func_grantpt" >&5
16753 echo "${ECHO_T}$ac_cv_func_grantpt" >&6
16754
16755 if test "x$ac_cv_func_grantpt" != "xno" ; then
16756
16757 if test "x$ac_cv_func_grantpt" = "xyes" ; then
16758 echo "$as_me:16758: checking for pty features" >&5
16759 echo $ECHO_N "checking for pty features... $ECHO_C" >&6
16760 if test "x$ac_cv_header_stropts_h" = xyes
16761 then
16762 cf_pty_this=0
16763 else
16764 cf_pty_this=3
16765 fi
16766
16767 cf_pty_defines=
16768 while test $cf_pty_this != 6
16769 do
16770
16771 cf_pty_feature=
16772 cf_pty_next="`expr $cf_pty_this + 1`"
16773
16774 echo "${as_me:-configure}:16774: testing pty feature test $cf_pty_next:5 ..." 1>&5
16775
16776 if test "$cross_compiling" = yes; then
16777 { { echo "$as_me:16777: error: cannot run test program while cross compiling" >&5
16778 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16779 { (exit 1); exit 1; }; }
16780 else
16781 cat >"conftest.$ac_ext" <<_ACEOF
16782 #line 16782 "configure"
16783 #include "confdefs.h"
16784 #define CONFTEST $cf_pty_this
16785 $cf_pty_defines
16786
16787 #include <stdlib.h>
16788 #include <stdio.h>
16789 #include <termios.h>
16790 #include <unistd.h>
16791 #include <signal.h>
16792 #include <fcntl.h>
16793 #include <errno.h>
16794
16795 #ifndef HAVE_POSIX_OPENPT
16796 #undef posix_openpt
16797 #define posix_openpt(mode) open("/dev/ptmx", mode)
16798 #endif
16799
16800 #ifdef HAVE_STROPTS_H
16801 #include <stropts.h>
16802 #endif
16803
16804 static void failed(int code)
16805 {
16806 perror("conftest");
16807 exit(code);
16808 }
16809
16810 static void my_timeout(int sig)
16811 {
16812 (void)sig;
16813 exit(99);
16814 }
16815
16816 int main(void)
16817 {
16818
16819 int code = 0;
16820 int pty;
16821 int tty;
16822 char *slave;
16823 struct termios tio;
16824
16825 (void)tio;
16826 signal(SIGALRM, my_timeout);
16827
16828 if (alarm(2) == 9)
16829 failed(9);
16830 else if ((pty = posix_openpt(O_RDWR)) < 0)
16831 failed(1);
16832 else if (grantpt(pty) < 0)
16833 failed(2);
16834 else if (unlockpt(pty) < 0)
16835 failed(3);
16836 else if ((slave = ptsname(pty)) == 0)
16837 failed(4);
16838 #if (CONFTEST == 3) || defined(CONFTEST_isatty)
16839 else if (!isatty(pty))
16840 failed(4);
16841 #endif
16842 #if CONFTEST >= 4
16843 else if (tcgetattr(pty, &tio) < 0)
16844 failed(20);
16845 else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16846 failed(21);
16847 #endif
16848 /* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16849 * Linux does treat it that way.
16850 */
16851 else if ((tty = open(slave, O_RDWR)) < 0)
16852 failed(5);
16853 #ifdef CONFTEST
16854 #ifdef I_PUSH
16855 #if (CONFTEST == 0) || defined(CONFTEST_ptem)
16856 else if (ioctl(tty, I_PUSH, "ptem") < 0)
16857 failed(10);
16858 #endif
16859 #if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16860 else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16861 failed(11);
16862 #endif
16863 #if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16864 else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16865 failed(12);
16866 #endif
16867 #endif /* I_PUSH */
16868 #if CONFTEST >= 5
16869 else if (tcgetattr(tty, &tio) < 0)
16870 failed(30);
16871 else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16872 failed(31);
16873 #endif
16874 #endif /* CONFTEST */
16875 (void) tty;
16876 ${cf_cv_main_return:-return}(code);
16877
16878 }
16879
16880 _ACEOF
16881 rm -f "conftest$ac_exeext"
16882 if { (eval echo "$as_me:16882: \"$ac_link\"") >&5
16883 (eval $ac_link) 2>&5
16884 ac_status=$?
16885 echo "$as_me:16885: \$? = $ac_status" >&5
16886 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16887 { (eval echo "$as_me:16887: \"$ac_try\"") >&5
16888 (eval $ac_try) 2>&5
16889 ac_status=$?
16890 echo "$as_me:16890: \$? = $ac_status" >&5
16891 (exit "$ac_status"); }; }; then
16892
16893 case $cf_pty_next in
16894 (1) # - streams
16895 cf_pty_feature=ptem
16896 ;;
16897 (2) # - streams
16898 cf_pty_feature=ldterm
16899 ;;
16900 (3) # - streams
16901 cf_pty_feature=ttcompat
16902 ;;
16903 (4)
16904 cf_pty_feature=pty_isatty
16905 ;;
16906 (5)
16907 cf_pty_feature=pty_tcsetattr
16908 ;;
16909 (6)
16910 cf_pty_feature=tty_tcsetattr
16911 ;;
16912 esac
16913
16914 else
16915 echo "$as_me: program exited with status $ac_status" >&5
16916 echo "$as_me: failed program was:" >&5
16917 cat "conftest.$ac_ext" >&5
16918
16919 case $cf_pty_next in
16920 (1|2|3)
16921
16922 echo "${as_me:-configure}:16922: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
16923
16924 cf_pty_next=3
16925 ;;
16926 esac
16927
16928 fi
16929 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16930 fi
16931 if test -n "$cf_pty_feature"
16932 then
16933 cf_pty_defines="$cf_pty_defines
16934 #define CONFTEST_$cf_pty_feature 1
16935 "
16936 cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
16937 fi
16938
16939 cf_pty_this=$cf_pty_next
16940 done
16941 echo "$as_me:16941: result: $cf_grantpt_opts" >&5
16942 echo "${ECHO_T}$cf_grantpt_opts" >&6
16943 cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
16944 fi
16945 fi
16946 fi
16947
16948 if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
16949 test -n "$verbose" && echo " prefer posix_openpt over openpty" 1>&6
16950
16951 echo "${as_me:-configure}:16951: testing prefer posix_openpt over openpty ..." 1>&5
16952
16953 elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
16954 echo "$as_me:16954: checking for openpty in -lutil" >&5
16955 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16956 if test "${ac_cv_lib_util_openpty+set}" = set; then
16957 echo $ECHO_N "(cached) $ECHO_C" >&6
16958 else
16959 ac_check_lib_save_LIBS=$LIBS
16960 LIBS="-lutil $LIBS"
16961 cat >"conftest.$ac_ext" <<_ACEOF
16962 #line 16962 "configure"
16963 #include "confdefs.h"
16964
16965 /* Override any gcc2 internal prototype to avoid an error. */
16966 #ifdef __cplusplus
16967 extern "C"
16968 #endif
16969 /* We use char because int might match the return type of a gcc2
16970 builtin and then its argument prototype would still apply. */
16971 char openpty (void);
16972 int
16973 main (void)
16974 {
16975 openpty ();
16976 ;
16977 return 0;
16978 }
16979 _ACEOF
16980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16981 if { (eval echo "$as_me:16981: \"$ac_link\"") >&5
16982 (eval $ac_link) 2>&5
16983 ac_status=$?
16984 echo "$as_me:16984: \$? = $ac_status" >&5
16985 (exit "$ac_status"); } &&
16986 { ac_try='test -s "conftest$ac_exeext"'
16987 { (eval echo "$as_me:16987: \"$ac_try\"") >&5
16988 (eval $ac_try) 2>&5
16989 ac_status=$?
16990 echo "$as_me:16990: \$? = $ac_status" >&5
16991 (exit "$ac_status"); }; }; then
16992 ac_cv_lib_util_openpty=yes
16993 else
16994 echo "$as_me: failed program was:" >&5
16995 cat "conftest.$ac_ext" >&5
16996 ac_cv_lib_util_openpty=no
16997 fi
16998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16999 LIBS=$ac_check_lib_save_LIBS
17000 fi
17001 echo "$as_me:17001: result: $ac_cv_lib_util_openpty" >&5
17002 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17003 if test "$ac_cv_lib_util_openpty" = yes; then
17004 cf_have_openpty=yes
17005 else
17006 cf_have_openpty=no
17007 fi
17008
17009 if test "$cf_have_openpty" = yes ; then
17010 ac_cv_func_grantpt=no
17011 LIBS="-lutil $LIBS"
17012
17013 cat >>confdefs.h <<\EOF
17014 #define HAVE_OPENPTY 1
17015 EOF
17016
17017 for ac_header in \
17018 util.h \
17019 libutil.h \
17020 pty.h \
17021
17022 do
17023 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17024 echo "$as_me:17024: checking for $ac_header" >&5
17025 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17026 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17027 echo $ECHO_N "(cached) $ECHO_C" >&6
17028 else
17029 cat >"conftest.$ac_ext" <<_ACEOF
17030 #line 17030 "configure"
17031 #include "confdefs.h"
17032 #include <$ac_header>
17033 _ACEOF
17034 if { (eval echo "$as_me:17034: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17035 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17036 ac_status=$?
17037 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17038 rm -f conftest.er1
17039 cat conftest.err >&5
17040 echo "$as_me:17040: \$? = $ac_status" >&5
17041 (exit "$ac_status"); } >/dev/null; then
17042 if test -s conftest.err; then
17043 ac_cpp_err=$ac_c_preproc_warn_flag
17044 else
17045 ac_cpp_err=
17046 fi
17047 else
17048 ac_cpp_err=yes
17049 fi
17050 if test -z "$ac_cpp_err"; then
17051 eval "$as_ac_Header=yes"
17052 else
17053 echo "$as_me: failed program was:" >&5
17054 cat "conftest.$ac_ext" >&5
17055 eval "$as_ac_Header=no"
17056 fi
17057 rm -f conftest.err "conftest.$ac_ext"
17058 fi
17059 echo "$as_me:17059: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17060 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17061 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17062 cat >>confdefs.h <<EOF
17063 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17064 EOF
17065
17066 fi
17067 done
17068
17069 fi
17070 fi
17071
17072 if test "x$ac_cv_func_grantpt" != xno
17073 then
17074 test -n "$verbose" && echo " will rely upon grantpt" 1>&6
17075
17076 echo "${as_me:-configure}:17076: testing will rely upon grantpt ..." 1>&5
17077
17078 cat >>confdefs.h <<\EOF
17079 #define HAVE_WORKING_GRANTPT 1
17080 EOF
17081
17082 for cf_feature in $cf_grantpt_opts
17083 do
17084 cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
17085
17086 cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17087
17088 cat >>confdefs.h <<EOF
17089 #define HAVE_GRANTPT_$cf_FEATURE 1
17090 EOF
17091
17092 done
17093 elif test "x$cf_have_openpty" = xno
17094 then
17095 test -n "$verbose" && echo " will rely upon BSD-pseudoterminals" 1>&6
17096
17097 echo "${as_me:-configure}:17097: testing will rely upon BSD-pseudoterminals ..." 1>&5
17098
17099 else
17100 test -n "$verbose" && echo " will rely upon openpty" 1>&6
17101
17102 echo "${as_me:-configure}:17102: testing will rely upon openpty ..." 1>&5
17103
17104 fi
17105
17106 echo "$as_me:17106: checking if we can use XkbQueryExtension" >&5
17107 echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
17108 if test "${cf_cv_xkb_query_extension+set}" = set; then
17109 echo $ECHO_N "(cached) $ECHO_C" >&6
17110 else
17111
17112 cat >"conftest.$ac_ext" <<_ACEOF
17113 #line 17113 "configure"
17114 #include "confdefs.h"
17115
17116 #include <X11/Xlib.h>
17117 #include <X11/extensions/XKB.h>
17118 #include <X11/XKBlib.h>
17119
17120 int
17121 main (void)
17122 {
17123
17124 int xkbmajor = XkbMajorVersion;
17125 int xkbminor = XkbMinorVersion;
17126 int xkbopcode, xkbevent, xkberror;
17127
17128 if (XkbLibraryVersion(&xkbmajor, &xkbminor)
17129 && XkbQueryExtension((Display *)0,
17130 &xkbopcode,
17131 &xkbevent,
17132 &xkberror,
17133 &xkbmajor,
17134 &xkbminor))
17135 return 0;
17136
17137 ;
17138 return 0;
17139 }
17140 _ACEOF
17141 rm -f "conftest.$ac_objext"
17142 if { (eval echo "$as_me:17142: \"$ac_compile\"") >&5
17143 (eval $ac_compile) 2>&5
17144 ac_status=$?
17145 echo "$as_me:17145: \$? = $ac_status" >&5
17146 (exit "$ac_status"); } &&
17147 { ac_try='test -s "conftest.$ac_objext"'
17148 { (eval echo "$as_me:17148: \"$ac_try\"") >&5
17149 (eval $ac_try) 2>&5
17150 ac_status=$?
17151 echo "$as_me:17151: \$? = $ac_status" >&5
17152 (exit "$ac_status"); }; }; then
17153
17154 cf_cv_xkb_query_extension=yes
17155
17156 else
17157 echo "$as_me: failed program was:" >&5
17158 cat "conftest.$ac_ext" >&5
17159
17160 cf_cv_xkb_query_extension=no
17161
17162 fi
17163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17164
17165 fi
17166 echo "$as_me:17166: result: $cf_cv_xkb_query_extension" >&5
17167 echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
17168
17169 if test $cf_cv_xkb_query_extension = yes
17170 then
17171
17172 for ac_func in XkbQueryExtension
17173 do
17174 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17175 echo "$as_me:17175: checking for $ac_func" >&5
17176 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17177 if eval "test \"\${$as_ac_var+set}\" = set"; then
17178 echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180 cat >"conftest.$ac_ext" <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183 #define $ac_func autoconf_temporary
17184 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17185 #undef $ac_func
17186
17187 #ifdef __cplusplus
17188 extern "C"
17189 #endif
17190
17191 /* We use char because int might match the return type of a gcc2
17192 builtin and then its argument prototype would still apply. */
17193 char $ac_func (void);
17194
17195 int
17196 main (void)
17197 {
17198
17199 /* The GNU C library defines stubs for functions which it implements
17200 to always fail with ENOSYS. Some functions are actually named
17201 something starting with __ and the normal name is an alias. */
17202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17203 #error found stub for $ac_func
17204 #endif
17205
17206 return $ac_func ();
17207 ;
17208 return 0;
17209 }
17210 _ACEOF
17211 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17212 if { (eval echo "$as_me:17212: \"$ac_link\"") >&5
17213 (eval $ac_link) 2>&5
17214 ac_status=$?
17215 echo "$as_me:17215: \$? = $ac_status" >&5
17216 (exit "$ac_status"); } &&
17217 { ac_try='test -s "conftest$ac_exeext"'
17218 { (eval echo "$as_me:17218: \"$ac_try\"") >&5
17219 (eval $ac_try) 2>&5
17220 ac_status=$?
17221 echo "$as_me:17221: \$? = $ac_status" >&5
17222 (exit "$ac_status"); }; }; then
17223 eval "$as_ac_var=yes"
17224 else
17225 echo "$as_me: failed program was:" >&5
17226 cat "conftest.$ac_ext" >&5
17227 eval "$as_ac_var=no"
17228 fi
17229 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17230 fi
17231 echo "$as_me:17231: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17232 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17233 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17234 cat >>confdefs.h <<EOF
17235 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17236 EOF
17237
17238 fi
17239 done
17240
17241 fi
17242
17243 echo "$as_me:17243: checking if we can use XkbKeycodeToKeysym" >&5
17244 echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
17245 if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
17246 echo $ECHO_N "(cached) $ECHO_C" >&6
17247 else
17248
17249 cat >"conftest.$ac_ext" <<_ACEOF
17250 #line 17250 "configure"
17251 #include "confdefs.h"
17252
17253 #include <X11/Xlib.h>
17254 #include <X11/XKBlib.h>
17255
17256 int
17257 main (void)
17258 {
17259
17260 KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
17261 (void)keysym;
17262
17263 ;
17264 return 0;
17265 }
17266 _ACEOF
17267 rm -f "conftest.$ac_objext"
17268 if { (eval echo "$as_me:17268: \"$ac_compile\"") >&5
17269 (eval $ac_compile) 2>&5
17270 ac_status=$?
17271 echo "$as_me:17271: \$? = $ac_status" >&5
17272 (exit "$ac_status"); } &&
17273 { ac_try='test -s "conftest.$ac_objext"'
17274 { (eval echo "$as_me:17274: \"$ac_try\"") >&5
17275 (eval $ac_try) 2>&5
17276 ac_status=$?
17277 echo "$as_me:17277: \$? = $ac_status" >&5
17278 (exit "$ac_status"); }; }; then
17279
17280 cf_cv_xkb_keycode_to_keysym=yes
17281
17282 else
17283 echo "$as_me: failed program was:" >&5
17284 cat "conftest.$ac_ext" >&5
17285
17286 cf_cv_xkb_keycode_to_keysym=no
17287
17288 fi
17289 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17290
17291 fi
17292 echo "$as_me:17292: result: $cf_cv_xkb_keycode_to_keysym" >&5
17293 echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
17294
17295 if test $cf_cv_xkb_keycode_to_keysym = yes
17296 then
17297
17298 for ac_func in XkbKeycodeToKeysym
17299 do
17300 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17301 echo "$as_me:17301: checking for $ac_func" >&5
17302 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17303 if eval "test \"\${$as_ac_var+set}\" = set"; then
17304 echo $ECHO_N "(cached) $ECHO_C" >&6
17305 else
17306 cat >"conftest.$ac_ext" <<_ACEOF
17307 #line 17307 "configure"
17308 #include "confdefs.h"
17309 #define $ac_func autoconf_temporary
17310 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17311 #undef $ac_func
17312
17313 #ifdef __cplusplus
17314 extern "C"
17315 #endif
17316
17317 /* We use char because int might match the return type of a gcc2
17318 builtin and then its argument prototype would still apply. */
17319 char $ac_func (void);
17320
17321 int
17322 main (void)
17323 {
17324
17325 /* The GNU C library defines stubs for functions which it implements
17326 to always fail with ENOSYS. Some functions are actually named
17327 something starting with __ and the normal name is an alias. */
17328 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17329 #error found stub for $ac_func
17330 #endif
17331
17332 return $ac_func ();
17333 ;
17334 return 0;
17335 }
17336 _ACEOF
17337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17338 if { (eval echo "$as_me:17338: \"$ac_link\"") >&5
17339 (eval $ac_link) 2>&5
17340 ac_status=$?
17341 echo "$as_me:17341: \$? = $ac_status" >&5
17342 (exit "$ac_status"); } &&
17343 { ac_try='test -s "conftest$ac_exeext"'
17344 { (eval echo "$as_me:17344: \"$ac_try\"") >&5
17345 (eval $ac_try) 2>&5
17346 ac_status=$?
17347 echo "$as_me:17347: \$? = $ac_status" >&5
17348 (exit "$ac_status"); }; }; then
17349 eval "$as_ac_var=yes"
17350 else
17351 echo "$as_me: failed program was:" >&5
17352 cat "conftest.$ac_ext" >&5
17353 eval "$as_ac_var=no"
17354 fi
17355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17356 fi
17357 echo "$as_me:17357: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17358 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17359 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17360 cat >>confdefs.h <<EOF
17361 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17362 EOF
17363
17364 fi
17365 done
17366
17367 fi
17368
17369 cf_save_LIBS_CF_XKB_BELL_EXT="$LIBS"
17370 cf_save_CFLAGS_CF_XKB_BELL_EXT="$CFLAGS"
17371 cf_save_CPPFLAGS_CF_XKB_BELL_EXT="$CPPFLAGS"
17372 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17373 for cf_X_CFLAGS in $X_CFLAGS
17374 do
17375 case "x$cf_X_CFLAGS" in
17376 x-[IUD]*)
17377 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17378 ;;
17379 *)
17380 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17381 ;;
17382 esac
17383 done
17384
17385 echo "$as_me:17385: checking for XKB Bell extension" >&5
17386 echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
17387 if test "${cf_cv_xkb_bell_ext+set}" = set; then
17388 echo $ECHO_N "(cached) $ECHO_C" >&6
17389 else
17390
17391 cat >"conftest.$ac_ext" <<_ACEOF
17392 #line 17392 "configure"
17393 #include "confdefs.h"
17394
17395 #include <X11/Intrinsic.h>
17396 #include <X11/XKBlib.h> /* has the prototype */
17397 #include <X11/extensions/XKBbells.h> /* has the XkbBI_xxx definitions */
17398
17399 int
17400 main (void)
17401 {
17402
17403 int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
17404 Atom y = 0;
17405 (void)x;
17406 XkbBell((Display *)0, (Window)0, 0, y);
17407
17408 ;
17409 return 0;
17410 }
17411 _ACEOF
17412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17413 if { (eval echo "$as_me:17413: \"$ac_link\"") >&5
17414 (eval $ac_link) 2>&5
17415 ac_status=$?
17416 echo "$as_me:17416: \$? = $ac_status" >&5
17417 (exit "$ac_status"); } &&
17418 { ac_try='test -s "conftest$ac_exeext"'
17419 { (eval echo "$as_me:17419: \"$ac_try\"") >&5
17420 (eval $ac_try) 2>&5
17421 ac_status=$?
17422 echo "$as_me:17422: \$? = $ac_status" >&5
17423 (exit "$ac_status"); }; }; then
17424 cf_cv_xkb_bell_ext=yes
17425 else
17426 echo "$as_me: failed program was:" >&5
17427 cat "conftest.$ac_ext" >&5
17428 cf_cv_xkb_bell_ext=no
17429 fi
17430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17431
17432 fi
17433 echo "$as_me:17433: result: $cf_cv_xkb_bell_ext" >&5
17434 echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
17435 test "$cf_cv_xkb_bell_ext" = yes &&
17436 cat >>confdefs.h <<\EOF
17437 #define HAVE_XKB_BELL_EXT 1
17438 EOF
17439
17440 LIBS="$cf_save_LIBS_CF_XKB_BELL_EXT"
17441 CFLAGS="$cf_save_CFLAGS_CF_XKB_BELL_EXT"
17442 CPPFLAGS="$cf_save_CPPFLAGS_CF_XKB_BELL_EXT"
17443
17444 for ac_func in Xutf8LookupString
17445 do
17446 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17447 echo "$as_me:17447: checking for $ac_func" >&5
17448 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17449 if eval "test \"\${$as_ac_var+set}\" = set"; then
17450 echo $ECHO_N "(cached) $ECHO_C" >&6
17451 else
17452 cat >"conftest.$ac_ext" <<_ACEOF
17453 #line 17453 "configure"
17454 #include "confdefs.h"
17455 #define $ac_func autoconf_temporary
17456 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17457 #undef $ac_func
17458
17459 #ifdef __cplusplus
17460 extern "C"
17461 #endif
17462
17463 /* We use char because int might match the return type of a gcc2
17464 builtin and then its argument prototype would still apply. */
17465 char $ac_func (void);
17466
17467 int
17468 main (void)
17469 {
17470
17471 /* The GNU C library defines stubs for functions which it implements
17472 to always fail with ENOSYS. Some functions are actually named
17473 something starting with __ and the normal name is an alias. */
17474 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17475 #error found stub for $ac_func
17476 #endif
17477
17478 return $ac_func ();
17479 ;
17480 return 0;
17481 }
17482 _ACEOF
17483 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17484 if { (eval echo "$as_me:17484: \"$ac_link\"") >&5
17485 (eval $ac_link) 2>&5
17486 ac_status=$?
17487 echo "$as_me:17487: \$? = $ac_status" >&5
17488 (exit "$ac_status"); } &&
17489 { ac_try='test -s "conftest$ac_exeext"'
17490 { (eval echo "$as_me:17490: \"$ac_try\"") >&5
17491 (eval $ac_try) 2>&5
17492 ac_status=$?
17493 echo "$as_me:17493: \$? = $ac_status" >&5
17494 (exit "$ac_status"); }; }; then
17495 eval "$as_ac_var=yes"
17496 else
17497 echo "$as_me: failed program was:" >&5
17498 cat "conftest.$ac_ext" >&5
17499 eval "$as_ac_var=no"
17500 fi
17501 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17502 fi
17503 echo "$as_me:17503: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17504 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17505 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17506 cat >>confdefs.h <<EOF
17507 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17508 EOF
17509
17510 else
17511
17512 EXTRAHDRS="$EXTRAHDRS xutf8.h"
17513 EXTRASRCS="$EXTRASRCS xutf8.c"
17514 EXTRAOBJS="$EXTRAOBJS xutf8.o"
17515
17516 fi
17517 done
17518
17519 echo "$as_me:17519: checking if you want narrow prototypes for X libraries" >&5
17520 echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
17521
17522 case `$ac_config_guess` in
17523 (*freebsd*|*gnu*|*irix5*|*irix6*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
17524 cf_default_narrowproto=yes
17525 ;;
17526 (*)
17527 cf_default_narrowproto=no
17528 ;;
17529 esac
17530
17531 # Check whether --enable-narrowproto or --disable-narrowproto was given.
17532 if test "${enable_narrowproto+set}" = set; then
17533 enableval="$enable_narrowproto"
17534 test "$enableval" != no && enableval=yes
17535 if test "$enableval" != "$cf_default_narrowproto" ; then
17536 enable_narrowproto=$enableval
17537 else
17538 enable_narrowproto=$cf_default_narrowproto
17539 fi
17540 else
17541 enableval=$cf_default_narrowproto
17542 enable_narrowproto=$cf_default_narrowproto
17543
17544 fi;
17545 echo "$as_me:17545: result: $enable_narrowproto" >&5
17546 echo "${ECHO_T}$enable_narrowproto" >&6
17547
17548 echo "$as_me:17548: checking if we should use imake to help" >&5
17549 echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
17550
17551 # Check whether --enable-imake or --disable-imake was given.
17552 if test "${enable_imake+set}" = set; then
17553 enableval="$enable_imake"
17554 test "$enableval" != no && enableval=yes
17555 if test "$enableval" != "yes" ; then
17556 enable_imake=no
17557 else
17558 enable_imake=yes
17559 fi
17560 else
17561 enableval=yes
17562 enable_imake=yes
17563
17564 fi;
17565 echo "$as_me:17565: result: $enable_imake" >&5
17566 echo "${ECHO_T}$enable_imake" >&6
17567
17568 if test "$enable_imake" = yes ; then
17569
17570 for ac_prog in xmkmf imake
17571 do
17572 # Extract the first word of "$ac_prog", so it can be a program name with args.
17573 set dummy $ac_prog; ac_word=$2
17574 echo "$as_me:17574: checking for $ac_word" >&5
17575 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17576 if test "${ac_cv_path_IMAKE+set}" = set; then
17577 echo $ECHO_N "(cached) $ECHO_C" >&6
17578 else
17579 case $IMAKE in
17580 [\\/]* | ?:[\\/]*)
17581 ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
17582 ;;
17583 *)
17584 ac_save_IFS=$IFS; IFS=$ac_path_separator
17585 ac_dummy="$PATH"
17586 for ac_dir in $ac_dummy; do
17587 IFS=$ac_save_IFS
17588 test -z "$ac_dir" && ac_dir=.
17589 if $as_executable_p "$ac_dir/$ac_word"; then
17590 ac_cv_path_IMAKE="$ac_dir/$ac_word"
17591 echo "$as_me:17591: found $ac_dir/$ac_word" >&5
17592 break
17593 fi
17594 done
17595
17596 ;;
17597 esac
17598 fi
17599 IMAKE=$ac_cv_path_IMAKE
17600
17601 if test -n "$IMAKE"; then
17602 echo "$as_me:17602: result: $IMAKE" >&5
17603 echo "${ECHO_T}$IMAKE" >&6
17604 else
17605 echo "$as_me:17605: result: no" >&5
17606 echo "${ECHO_T}no" >&6
17607 fi
17608
17609 test -n "$IMAKE" && break
17610 done
17611
17612 if test -n "$IMAKE" ; then
17613
17614 case $IMAKE in
17615 (*/imake)
17616 cf_imake_opts="-DUseInstalled=YES"
17617 ;;
17618 (*/util/xmkmf)
17619 # A single parameter tells xmkmf where the config-files are:
17620 cf_imake_opts="`echo "$IMAKE"|sed -e s,/config/util/xmkmf,,`"
17621 ;;
17622 (*)
17623 cf_imake_opts=
17624 ;;
17625 esac
17626
17627 # If it's installed properly, imake (or its wrapper, xmkmf) will point to the
17628 # config directory.
17629 if mkdir conftestdir; then
17630 CDPATH=; export CDPATH
17631 cf_makefile=`cd "$srcdir" || exit;pwd`/Imakefile
17632 cd conftestdir
17633
17634 cat >fix_cflags.sed <<'CF_EOF'
17635 s/\\//g
17636 s/[ ][ ]*/ /g
17637 s/"//g
17638 :pack
17639 s/\(=[^ ][^ ]*\) \([^-]\)/\1 \2/g
17640 t pack
17641 s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
17642 s/^IMAKE[ ]/IMAKE_CFLAGS="/
17643 s/ / /g
17644 s/$/"/
17645 CF_EOF
17646
17647 cat >fix_lflags.sed <<'CF_EOF'
17648 s/^IMAKE[ ]*/IMAKE_LOADFLAGS="/
17649 s/$/"/
17650 CF_EOF
17651
17652 echo >./Imakefile
17653 test -f "$cf_makefile" && cat "$cf_makefile" >>./Imakefile
17654
17655 cat >> ./Imakefile <<'CF_EOF'
17656 findstddefs:
17657 @echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS) | sed -f fix_cflags.sed
17658 @echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
17659 CF_EOF
17660
17661 if ( $IMAKE "$cf_imake_opts" 1>/dev/null 2>&5 && test -f Makefile)
17662 then
17663 test -n "$verbose" && echo " Using $IMAKE $cf_imake_opts" 1>&6
17664
17665 echo "${as_me:-configure}:17665: testing Using $IMAKE $cf_imake_opts ..." 1>&5
17666
17667 else
17668 # sometimes imake doesn't have the config path compiled in. Find it.
17669 cf_config=
17670 for cf_libpath in $X_LIBS $LIBS ; do
17671 case "$cf_libpath" in
17672 (-L*)
17673 cf_libpath=`echo ".$cf_libpath" | sed -e 's/^...//'`
17674 cf_libpath="$cf_libpath/X11/config"
17675 if test -d "$cf_libpath" ; then
17676 cf_config="$cf_libpath"
17677 break
17678 fi
17679 ;;
17680 esac
17681 done
17682 if test -z "$cf_config" ; then
17683 { echo "$as_me:17683: WARNING: Could not find imake config-directory" >&5
17684 echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
17685 else
17686 cf_imake_opts="$cf_imake_opts -I$cf_config"
17687 if ( "$IMAKE" -v "$cf_imake_opts" 2>&5)
17688 then
17689 test -n "$verbose" && echo " Using $IMAKE $cf_config" 1>&6
17690
17691 echo "${as_me:-configure}:17691: testing Using $IMAKE $cf_config ..." 1>&5
17692
17693 else
17694 { echo "$as_me:17694: WARNING: Cannot run $IMAKE" >&5
17695 echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
17696 fi
17697 fi
17698 fi
17699
17700 # GNU make sometimes prints "make[1]: Entering...", which
17701 # would confuse us.
17702 eval "`make findstddefs 2>/dev/null | grep -v make`"
17703
17704 cd ..
17705 rm -rf conftestdir
17706
17707 # We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
17708 # declares XTFUNCPROTO there. However, some vendors (e.g., SGI) have
17709 # modified it to support site.cf, adding a kludge for the /usr/include
17710 # directory. Try to filter that out, otherwise gcc won't find its
17711 # headers.
17712 if test -n "$GCC" ; then
17713 if test -n "$IMAKE_CFLAGS" ; then
17714 cf_nostdinc=""
17715 cf_std_incl=""
17716 cf_cpp_opts=""
17717 for cf_opt in $IMAKE_CFLAGS
17718 do
17719 case "$cf_opt" in
17720 (-nostdinc)
17721 cf_nostdinc="$cf_opt"
17722 ;;
17723 (-I/usr/include)
17724 cf_std_incl="$cf_opt"
17725 ;;
17726 (*)
17727 cf_cpp_opts="$cf_cpp_opts $cf_opt"
17728 ;;
17729 esac
17730 done
17731 if test -z "$cf_nostdinc" ; then
17732 IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
17733 elif test -z "$cf_std_incl" ; then
17734 IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
17735 else
17736 test -n "$verbose" && echo " suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
17737
17738 echo "${as_me:-configure}:17738: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
17739
17740 IMAKE_CFLAGS="$cf_cpp_opts"
17741 fi
17742 fi
17743 fi
17744 fi
17745
17746 # Some imake configurations define PROJECTROOT with an empty value. Remove
17747 # the empty definition.
17748 case $IMAKE_CFLAGS in
17749 (*-DPROJECTROOT=/*)
17750 ;;
17751 (*)
17752 IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ ], ,"`
17753 ;;
17754 esac
17755
17756 fi
17757
17758 test -n "$verbose" && echo " IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
17759
17760 echo "${as_me:-configure}:17760: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
17761
17762 test -n "$verbose" && echo " IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
17763
17764 echo "${as_me:-configure}:17764: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
17765
17766 fi
17767
17768 if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
17769
17770 cf_fix_cppflags=no
17771 cf_new_cflags=
17772 cf_new_cppflags=
17773 cf_new_extra_cppflags=
17774
17775 for cf_add_cflags in $IMAKE_CFLAGS
17776 do
17777 case "$cf_fix_cppflags" in
17778 (no)
17779 case "$cf_add_cflags" in
17780 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17781 case "$cf_add_cflags" in
17782 (-D*)
17783 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17784
17785 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17786 && test -z "${cf_tst_cflags}" \
17787 && cf_fix_cppflags=yes
17788
17789 if test "$cf_fix_cppflags" = yes ; then
17790
17791 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17792 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17793
17794 continue
17795 elif test "${cf_tst_cflags}" = "\"'" ; then
17796
17797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17799
17800 continue
17801 fi
17802 ;;
17803 esac
17804 case "$CPPFLAGS" in
17805 (*$cf_add_cflags)
17806 ;;
17807 (*)
17808 case "$cf_add_cflags" in
17809 (-D*)
17810 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17811
17812 CPPFLAGS=`echo "$CPPFLAGS" | \
17813 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17814 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17815
17816 ;;
17817 esac
17818
17819 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17820 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17821
17822 ;;
17823 esac
17824 ;;
17825 (*)
17826
17827 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17828 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17829
17830 ;;
17831 esac
17832 ;;
17833 (yes)
17834
17835 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17836 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17837
17838 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17839
17840 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17841 && test -z "${cf_tst_cflags}" \
17842 && cf_fix_cppflags=no
17843 ;;
17844 esac
17845 done
17846
17847 if test -n "$cf_new_cflags" ; then
17848
17849 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17850 CFLAGS="${CFLAGS}$cf_new_cflags"
17851
17852 fi
17853
17854 if test -n "$cf_new_cppflags" ; then
17855
17856 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17857 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17858
17859 fi
17860
17861 if test -n "$cf_new_extra_cppflags" ; then
17862
17863 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17864 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17865
17866 fi
17867
17868 else
17869 IMAKE_CFLAGS=
17870 IMAKE_LOADFLAGS=
17871 test -n "$verbose" && echo " make fallback definitions" 1>&6
17872
17873 echo "${as_me:-configure}:17873: testing make fallback definitions ..." 1>&5
17874
17875 # We prefer config.guess' values when we can get them, to avoid
17876 # inconsistent results with uname (AIX for instance). However,
17877 # config.guess is not always consistent either.
17878 case $host_os in
17879 (*[0-9].[0-9]*)
17880 UNAME_RELEASE="$host_os"
17881 ;;
17882 (*)
17883 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
17884 ;;
17885 esac
17886
17887 case .$UNAME_RELEASE in
17888 (*[0-9].[0-9]*)
17889 OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
17890 OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
17891 test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
17892 test -z "$OSMINORVERSION" && OSMINORVERSION=0
17893 IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
17894 ;;
17895 esac
17896
17897 # FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
17898 # fallback/fragments for NeedPrototypes, etc.
17899 IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
17900
17901 # If this is not set properly, Xaw's scrollbars will not work
17902 if test "$enable_narrowproto" = yes ; then
17903 IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
17904 fi
17905
17906 # Other special definitions:
17907 case $host_os in
17908 (aix*)
17909 # imake on AIX 5.1 defines AIXV3. really.
17910 IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
17911 ;;
17912 (irix[56].*)
17913 # these are needed to make SIGWINCH work in xterm
17914 IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
17915 ;;
17916 esac
17917
17918 # "modern" systems install X applications in /usr/bin. Other systems may
17919 # use one of the X release-based directories.
17920 case "$CFLAGS $CPPFLAGS $IMAKE_CFLAGS" in
17921 (*-DPROJECTROOT*)
17922 ;;
17923 (*)
17924 for cf_dir in /usr/X11R7 /usr/X11R6 /usr/X11R5
17925 do
17926 if test -d "$cf_dir/bin"
17927 then
17928 IMAKE_CFLAGS="$IMAKE_CFLAGS -DPROJECTROOT=\\\"$cf_dir\\\""
17929 break
17930 fi
17931 done
17932 ;;
17933 esac
17934
17935 cf_fix_cppflags=no
17936 cf_new_cflags=
17937 cf_new_cppflags=
17938 cf_new_extra_cppflags=
17939
17940 for cf_add_cflags in $IMAKE_CFLAGS
17941 do
17942 case "$cf_fix_cppflags" in
17943 (no)
17944 case "$cf_add_cflags" in
17945 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17946 case "$cf_add_cflags" in
17947 (-D*)
17948 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17949
17950 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17951 && test -z "${cf_tst_cflags}" \
17952 && cf_fix_cppflags=yes
17953
17954 if test "$cf_fix_cppflags" = yes ; then
17955
17956 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17957 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17958
17959 continue
17960 elif test "${cf_tst_cflags}" = "\"'" ; then
17961
17962 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17963 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17964
17965 continue
17966 fi
17967 ;;
17968 esac
17969 case "$CPPFLAGS" in
17970 (*$cf_add_cflags)
17971 ;;
17972 (*)
17973 case "$cf_add_cflags" in
17974 (-D*)
17975 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17976
17977 CPPFLAGS=`echo "$CPPFLAGS" | \
17978 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17979 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17980
17981 ;;
17982 esac
17983
17984 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17985 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17986
17987 ;;
17988 esac
17989 ;;
17990 (*)
17991
17992 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17993 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17994
17995 ;;
17996 esac
17997 ;;
17998 (yes)
17999
18000 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18001 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18002
18003 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18004
18005 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18006 && test -z "${cf_tst_cflags}" \
18007 && cf_fix_cppflags=no
18008 ;;
18009 esac
18010 done
18011
18012 if test -n "$cf_new_cflags" ; then
18013
18014 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18015 CFLAGS="${CFLAGS}$cf_new_cflags"
18016
18017 fi
18018
18019 if test -n "$cf_new_cppflags" ; then
18020
18021 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18022 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18023
18024 fi
18025
18026 if test -n "$cf_new_extra_cppflags" ; then
18027
18028 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18029 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18030
18031 fi
18032
18033 fi
18034
18035 # Extract the first word of "groff", so it can be a program name with args.
18036 set dummy groff; ac_word=$2
18037 echo "$as_me:18037: checking for $ac_word" >&5
18038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18039 if test "${ac_cv_path_GROFF_PATH+set}" = set; then
18040 echo $ECHO_N "(cached) $ECHO_C" >&6
18041 else
18042 case $GROFF_PATH in
18043 [\\/]* | ?:[\\/]*)
18044 ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
18045 ;;
18046 *)
18047 ac_save_IFS=$IFS; IFS=$ac_path_separator
18048 ac_dummy="$PATH"
18049 for ac_dir in $ac_dummy; do
18050 IFS=$ac_save_IFS
18051 test -z "$ac_dir" && ac_dir=.
18052 if $as_executable_p "$ac_dir/$ac_word"; then
18053 ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
18054 echo "$as_me:18054: found $ac_dir/$ac_word" >&5
18055 break
18056 fi
18057 done
18058
18059 test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
18060 ;;
18061 esac
18062 fi
18063 GROFF_PATH=$ac_cv_path_GROFF_PATH
18064
18065 if test -n "$GROFF_PATH"; then
18066 echo "$as_me:18066: result: $GROFF_PATH" >&5
18067 echo "${ECHO_T}$GROFF_PATH" >&6
18068 else
18069 echo "$as_me:18069: result: no" >&5
18070 echo "${ECHO_T}no" >&6
18071 fi
18072
18073 for ac_prog in nroff mandoc
18074 do
18075 # Extract the first word of "$ac_prog", so it can be a program name with args.
18076 set dummy $ac_prog; ac_word=$2
18077 echo "$as_me:18077: checking for $ac_word" >&5
18078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18079 if test "${ac_cv_path_NROFF_PATH+set}" = set; then
18080 echo $ECHO_N "(cached) $ECHO_C" >&6
18081 else
18082 case $NROFF_PATH in
18083 [\\/]* | ?:[\\/]*)
18084 ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
18085 ;;
18086 *)
18087 ac_save_IFS=$IFS; IFS=$ac_path_separator
18088 ac_dummy="$PATH"
18089 for ac_dir in $ac_dummy; do
18090 IFS=$ac_save_IFS
18091 test -z "$ac_dir" && ac_dir=.
18092 if $as_executable_p "$ac_dir/$ac_word"; then
18093 ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
18094 echo "$as_me:18094: found $ac_dir/$ac_word" >&5
18095 break
18096 fi
18097 done
18098
18099 ;;
18100 esac
18101 fi
18102 NROFF_PATH=$ac_cv_path_NROFF_PATH
18103
18104 if test -n "$NROFF_PATH"; then
18105 echo "$as_me:18105: result: $NROFF_PATH" >&5
18106 echo "${ECHO_T}$NROFF_PATH" >&6
18107 else
18108 echo "$as_me:18108: result: no" >&5
18109 echo "${ECHO_T}no" >&6
18110 fi
18111
18112 test -n "$NROFF_PATH" && break
18113 done
18114 test -n "$NROFF_PATH" || NROFF_PATH="no"
18115
18116 # Extract the first word of "tbl", so it can be a program name with args.
18117 set dummy tbl; ac_word=$2
18118 echo "$as_me:18118: checking for $ac_word" >&5
18119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18120 if test "${ac_cv_path_TBL_PATH+set}" = set; then
18121 echo $ECHO_N "(cached) $ECHO_C" >&6
18122 else
18123 case $TBL_PATH in
18124 [\\/]* | ?:[\\/]*)
18125 ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
18126 ;;
18127 *)
18128 ac_save_IFS=$IFS; IFS=$ac_path_separator
18129 ac_dummy="$PATH"
18130 for ac_dir in $ac_dummy; do
18131 IFS=$ac_save_IFS
18132 test -z "$ac_dir" && ac_dir=.
18133 if $as_executable_p "$ac_dir/$ac_word"; then
18134 ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
18135 echo "$as_me:18135: found $ac_dir/$ac_word" >&5
18136 break
18137 fi
18138 done
18139
18140 test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
18141 ;;
18142 esac
18143 fi
18144 TBL_PATH=$ac_cv_path_TBL_PATH
18145
18146 if test -n "$TBL_PATH"; then
18147 echo "$as_me:18147: result: $TBL_PATH" >&5
18148 echo "${ECHO_T}$TBL_PATH" >&6
18149 else
18150 echo "$as_me:18150: result: no" >&5
18151 echo "${ECHO_T}no" >&6
18152 fi
18153
18154 if test "x$GROFF_PATH" = xno
18155 then
18156 NROFF_NOTE=
18157 GROFF_NOTE="#"
18158 else
18159 NROFF_NOTE="#"
18160 GROFF_NOTE=
18161 fi
18162
18163 echo "$as_me:18163: checking for fgrep" >&5
18164 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
18165 if test "${ac_cv_path_FGREP+set}" = set; then
18166 echo $ECHO_N "(cached) $ECHO_C" >&6
18167 else
18168 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
18169 then ac_cv_path_FGREP="$GREP -F"
18170 else
18171 for ac_prog in gfgrep fgrep
18172 do
18173 # Extract the first word of "$ac_prog", so it can be a program name with args.
18174 set dummy $ac_prog; ac_word=$2
18175 echo "$as_me:18175: checking for $ac_word" >&5
18176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18177 if test "${ac_cv_path_FGREP+set}" = set; then
18178 echo $ECHO_N "(cached) $ECHO_C" >&6
18179 else
18180 case $FGREP in
18181 [\\/]* | ?:[\\/]*)
18182 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
18183 ;;
18184 *)
18185 ac_save_IFS=$IFS; IFS=$ac_path_separator
18186 ac_dummy="$PATH"
18187 for ac_dir in $ac_dummy; do
18188 IFS=$ac_save_IFS
18189 test -z "$ac_dir" && ac_dir=.
18190 if $as_executable_p "$ac_dir/$ac_word"; then
18191 ac_cv_path_FGREP="$ac_dir/$ac_word"
18192 echo "$as_me:18192: found $ac_dir/$ac_word" >&5
18193 break
18194 fi
18195 done
18196
18197 ;;
18198 esac
18199 fi
18200 FGREP=$ac_cv_path_FGREP
18201
18202 if test -n "$FGREP"; then
18203 echo "$as_me:18203: result: $FGREP" >&5
18204 echo "${ECHO_T}$FGREP" >&6
18205 else
18206 echo "$as_me:18206: result: no" >&5
18207 echo "${ECHO_T}no" >&6
18208 fi
18209
18210 test -n "$FGREP" && break
18211 done
18212 test -n "$FGREP" || FGREP=": "
18213
18214 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:18214: error: cannot find workable fgrep" >&5
18215 echo "$as_me: error: cannot find workable fgrep" >&2;}
18216 { (exit 1); exit 1; }; }
18217 fi
18218 fi
18219 echo "$as_me:18219: result: $ac_cv_path_FGREP" >&5
18220 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
18221 FGREP="$ac_cv_path_FGREP"
18222
18223 case "x${with_man2html}" in
18224 (xno)
18225 cf_man2html=no
18226 ;;
18227 (x|xyes)
18228 # Extract the first word of "man2html", so it can be a program name with args.
18229 set dummy man2html; ac_word=$2
18230 echo "$as_me:18230: checking for $ac_word" >&5
18231 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18232 if test "${ac_cv_path_cf_man2html+set}" = set; then
18233 echo $ECHO_N "(cached) $ECHO_C" >&6
18234 else
18235 case $cf_man2html in
18236 [\\/]* | ?:[\\/]*)
18237 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
18238 ;;
18239 *)
18240 ac_save_IFS=$IFS; IFS=$ac_path_separator
18241 ac_dummy="$PATH"
18242 for ac_dir in $ac_dummy; do
18243 IFS=$ac_save_IFS
18244 test -z "$ac_dir" && ac_dir=.
18245 if $as_executable_p "$ac_dir/$ac_word"; then
18246 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
18247 echo "$as_me:18247: found $ac_dir/$ac_word" >&5
18248 break
18249 fi
18250 done
18251
18252 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
18253 ;;
18254 esac
18255 fi
18256 cf_man2html=$ac_cv_path_cf_man2html
18257
18258 if test -n "$cf_man2html"; then
18259 echo "$as_me:18259: result: $cf_man2html" >&5
18260 echo "${ECHO_T}$cf_man2html" >&6
18261 else
18262 echo "$as_me:18262: result: no" >&5
18263 echo "${ECHO_T}no" >&6
18264 fi
18265
18266 case "x$cf_man2html" in
18267 (x/*)
18268 echo "$as_me:18268: checking for the modified Earl Hood script" >&5
18269 echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
18270 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
18271 then
18272 cf_man2html_ok=yes
18273 else
18274 cf_man2html=no
18275 cf_man2html_ok=no
18276 fi
18277 echo "$as_me:18277: result: $cf_man2html_ok" >&5
18278 echo "${ECHO_T}$cf_man2html_ok" >&6
18279 ;;
18280 (*)
18281 cf_man2html=no
18282 ;;
18283 esac
18284 esac
18285
18286 echo "$as_me:18286: checking for program to convert manpage to html" >&5
18287 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
18288
18289 # Check whether --with-man2html or --without-man2html was given.
18290 if test "${with_man2html+set}" = set; then
18291 withval="$with_man2html"
18292 cf_man2html=$withval
18293 else
18294 cf_man2html=$cf_man2html
18295 fi;
18296
18297 cf_with_groff=no
18298
18299 case $cf_man2html in
18300 (yes)
18301 echo "$as_me:18301: result: man2html" >&5
18302 echo "${ECHO_T}man2html" >&6
18303 # Extract the first word of "man2html", so it can be a program name with args.
18304 set dummy man2html; ac_word=$2
18305 echo "$as_me:18305: checking for $ac_word" >&5
18306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18307 if test "${ac_cv_path_cf_man2html+set}" = set; then
18308 echo $ECHO_N "(cached) $ECHO_C" >&6
18309 else
18310 case $cf_man2html in
18311 [\\/]* | ?:[\\/]*)
18312 ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
18313 ;;
18314 *)
18315 ac_save_IFS=$IFS; IFS=$ac_path_separator
18316 ac_dummy="$PATH"
18317 for ac_dir in $ac_dummy; do
18318 IFS=$ac_save_IFS
18319 test -z "$ac_dir" && ac_dir=.
18320 if $as_executable_p "$ac_dir/$ac_word"; then
18321 ac_cv_path_cf_man2html="$ac_dir/$ac_word"
18322 echo "$as_me:18322: found $ac_dir/$ac_word" >&5
18323 break
18324 fi
18325 done
18326
18327 test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
18328 ;;
18329 esac
18330 fi
18331 cf_man2html=$ac_cv_path_cf_man2html
18332
18333 if test -n "$cf_man2html"; then
18334 echo "$as_me:18334: result: $cf_man2html" >&5
18335 echo "${ECHO_T}$cf_man2html" >&6
18336 else
18337 echo "$as_me:18337: result: no" >&5
18338 echo "${ECHO_T}no" >&6
18339 fi
18340
18341 ;;
18342 (no|groff|*/groff*)
18343 cf_with_groff=yes
18344 cf_man2html=$GROFF_PATH
18345 echo "$as_me:18345: result: $cf_man2html" >&5
18346 echo "${ECHO_T}$cf_man2html" >&6
18347 ;;
18348 (*)
18349 echo "$as_me:18349: result: $cf_man2html" >&5
18350 echo "${ECHO_T}$cf_man2html" >&6
18351 ;;
18352 esac
18353
18354 MAN2HTML_TEMP="man2html.tmp"
18355 cat >$MAN2HTML_TEMP <<CF_EOF
18356 #!$SHELL
18357 # Temporary script generated by CF_WITH_MAN2HTML
18358 # Convert inputs to html, sending result to standard output.
18359 #
18360 # Parameters:
18361 # \${1} = rootname of file to convert
18362 # \${2} = suffix of file to convert, e.g., "1"
18363 # \${3} = macros to use, e.g., "man"
18364 #
18365 ROOT=\$1
18366 TYPE=\$2
18367 MACS=\$3
18368
18369 unset LANG
18370 unset LC_ALL
18371 unset LC_CTYPE
18372 unset LANGUAGE
18373 GROFF_NO_SGR=stupid
18374 export GROFF_NO_SGR
18375
18376 CF_EOF
18377
18378 NROFF_OPTS=
18379 if test "x$cf_with_groff" = xyes
18380 then
18381 MAN2HTML_NOTE="$GROFF_NOTE"
18382 MAN2HTML_PATH="$GROFF_PATH"
18383 cat >>$MAN2HTML_TEMP <<CF_EOF
18384 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
18385 CF_EOF
18386 else
18387 # disable hyphenation if this is groff
18388 if test "x$GROFF_PATH" != xno
18389 then
18390 echo "$as_me:18390: checking if nroff is really groff" >&5
18391 echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
18392 cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
18393 test -n "$cf_check_groff" && cf_check_groff=yes
18394 test -n "$cf_check_groff" || cf_check_groff=no
18395 echo "$as_me:18395: result: $cf_check_groff" >&5
18396 echo "${ECHO_T}$cf_check_groff" >&6
18397 test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
18398 fi
18399 MAN2HTML_NOTE=""
18400
18401 if test "x$prefix" != xNONE; then
18402 cf_path_syntax="$prefix"
18403 else
18404 cf_path_syntax="$ac_default_prefix"
18405 fi
18406
18407 case ".$cf_man2html" in
18408 (.\$\(*\)*|.\'*\'*)
18409 ;;
18410 (..|./*|.\\*)
18411 ;;
18412 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18413 ;;
18414 (.\$\{*prefix\}*|.\$\{*dir\}*)
18415 eval cf_man2html="$cf_man2html"
18416 case ".$cf_man2html" in
18417 (.NONE/*)
18418 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
18419 ;;
18420 esac
18421 ;;
18422 (.no|.NONE/*)
18423 cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
18424 ;;
18425 (*)
18426 { { echo "$as_me:18426: error: expected a pathname, not \"$cf_man2html\"" >&5
18427 echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
18428 { (exit 1); exit 1; }; }
18429 ;;
18430 esac
18431
18432 MAN2HTML_PATH="$cf_man2html"
18433 echo "$as_me:18433: checking for $cf_man2html top/bottom margins" >&5
18434 echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
18435
18436 # for this example, expect 3 lines of content, the remainder is head/foot
18437 cat >conftest.in <<CF_EOF
18438 .TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
18439 .SH SECTION
18440 MARKER
18441 CF_EOF
18442
18443 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
18444
18445 cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
18446 cf_man2html_top=`expr "$cf_man2html_1st" - 2`
18447 cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
18448 cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
18449 cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
18450
18451 echo "$as_me:18451: result: $cf_man2html_top_bot" >&5
18452 echo "${ECHO_T}$cf_man2html_top_bot" >&6
18453
18454 echo "$as_me:18454: checking for pagesize to use" >&5
18455 echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
18456 for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
18457 do
18458 cat >>conftest.in <<CF_EOF
18459 .nf
18460 0
18461 1
18462 2
18463 3
18464 4
18465 5
18466 6
18467 7
18468 8
18469 9
18470 CF_EOF
18471 done
18472
18473 LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
18474 cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
18475 test -z "$cf_man2html_page" && cf_man2html_page=99999
18476 test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
18477
18478 rm -rf conftest*
18479 echo "$as_me:18479: result: $cf_man2html_page" >&5
18480 echo "${ECHO_T}$cf_man2html_page" >&6
18481
18482 cat >>$MAN2HTML_TEMP <<CF_EOF
18483 : \${MAN2HTML_PATH=$MAN2HTML_PATH}
18484 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
18485 case \${TYPE} in
18486 (ms)
18487 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
18488 ;;
18489 (*)
18490 $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
18491 ;;
18492 esac
18493 CF_EOF
18494 fi
18495
18496 chmod 700 $MAN2HTML_TEMP
18497
18498 # If we have already established that there is a full termcap implementation,
18499 # suppress the definitions for terminfo that we make have imported from the
18500 # imake-file.
18501 if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
18502 case "$IMAKE_CFLAGS" in
18503 (*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
18504
18505 test -n "$verbose" && echo " removing terminfo flags from IMAKE_CFLAGS" 1>&6
18506
18507 echo "${as_me:-configure}:18507: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
18508
18509 IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ ]*-DHAVE_TIGETSTR[ ]*//'`
18510 test -n "$verbose" && echo " ...result $IMAKE_CFLAGS" 1>&6
18511
18512 echo "${as_me:-configure}:18512: testing ...result $IMAKE_CFLAGS ..." 1>&5
18513
18514 test -n "$verbose" && echo " removing terminfo flags from CPPFLAGS" 1>&6
18515
18516 echo "${as_me:-configure}:18516: testing removing terminfo flags from CPPFLAGS ..." 1>&5
18517
18518 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ ]*-DHAVE_TIGETSTR[ ]*//'`
18519 test -n "$verbose" && echo " ...result $CPPFLAGS" 1>&6
18520
18521 echo "${as_me:-configure}:18521: testing ...result $CPPFLAGS ..." 1>&5
18522
18523 ;;
18524 esac
18525 fi
18526
18527 echo "$as_me:18527: checking for default terminal-id" >&5
18528 echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
18529
18530 # Check whether --with-terminal-id or --without-terminal-id was given.
18531 if test "${with_terminal_id+set}" = set; then
18532 withval="$with_terminal_id"
18533 default_termid=$withval
18534 else
18535 default_termid=vt420
18536 fi;
18537 echo "$as_me:18537: result: $default_termid" >&5
18538 echo "${ECHO_T}$default_termid" >&6
18539 case $default_termid in
18540 (vt*) default_termid=`echo $default_termid | sed -e 's/^..//'`
18541 ;;
18542 ([1-9][0-9][0-9]|[1-9][0-9])
18543 ;;
18544 (*)
18545 { { echo "$as_me:18545: error: expected a number, not $default_termid" >&5
18546 echo "$as_me: error: expected a number, not $default_termid" >&2;}
18547 { (exit 1); exit 1; }; }
18548 ;;
18549 esac
18550
18551 cat >>confdefs.h <<EOF
18552 #define DFT_DECID "$default_termid"
18553 EOF
18554
18555 echo "$as_me:18555: checking for default terminal-type" >&5
18556 echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
18557
18558 # Check whether --with-terminal-type or --without-terminal-type was given.
18559 if test "${with_terminal_type+set}" = set; then
18560 withval="$with_terminal_type"
18561 default_TERM=$withval
18562 else
18563 default_TERM=xterm
18564 fi;
18565 echo "$as_me:18565: result: $default_TERM" >&5
18566 echo "${ECHO_T}$default_TERM" >&6
18567
18568 cat >>confdefs.h <<EOF
18569 #define DFT_TERMTYPE "$default_TERM"
18570 EOF
18571
18572 ###############################################################################
18573 echo "$as_me:18573: checking if backarrow-key should be BS" >&5
18574 echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
18575
18576 # Check whether --enable-backarrow-key or --disable-backarrow-key was given.
18577 if test "${enable_backarrow_key+set}" = set; then
18578 enableval="$enable_backarrow_key"
18579 test "$enableval" != no && enableval=yes
18580 if test "$enableval" != "yes" ; then
18581 backarrow_is_bs=$enableval
18582 else
18583 backarrow_is_bs=yes
18584 fi
18585 else
18586 enableval=yes
18587 backarrow_is_bs=yes
18588
18589 fi;
18590
18591 echo "$as_me:18591: result: $backarrow_is_bs" >&5
18592 echo "${ECHO_T}$backarrow_is_bs" >&6
18593 case $backarrow_is_bs in
18594 (yes)
18595 backarrow_is_bs=true
18596 ;;
18597 (no)
18598 backarrow_is_bs=false
18599 ;;
18600 esac
18601 cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
18602
18603 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18604
18605 cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
18606 backarrow_is_bs=${cf_xbool1}${cf_xbool2}
18607
18608 cat >>confdefs.h <<EOF
18609 #define DEF_BACKARO_BS $backarrow_is_bs
18610 EOF
18611
18612 echo "$as_me:18612: checking if backarrow-key should be treated as erase" >&5
18613 echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
18614
18615 # Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
18616 if test "${enable_backarrow_is_erase+set}" = set; then
18617 enableval="$enable_backarrow_is_erase"
18618 test "$enableval" != yes && enableval=no
18619 if test "$enableval" != "no" ; then
18620 backarrow_is_erase=$enableval
18621 else
18622 backarrow_is_erase=no
18623 fi
18624 else
18625 enableval=no
18626 backarrow_is_erase=no
18627
18628 fi;
18629
18630 echo "$as_me:18630: result: $backarrow_is_erase" >&5
18631 echo "${ECHO_T}$backarrow_is_erase" >&6
18632 case $backarrow_is_erase in
18633 (yes)
18634 backarrow_is_erase=true
18635 ;;
18636 (no)
18637 backarrow_is_erase=false
18638 ;;
18639 esac
18640 cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
18641
18642 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18643
18644 cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
18645 backarrow_is_erase=${cf_xbool1}${cf_xbool2}
18646
18647 cat >>confdefs.h <<EOF
18648 #define DEF_BACKARO_ERASE $backarrow_is_erase
18649 EOF
18650
18651 echo "$as_me:18651: checking for default backspace/DEL setting" >&5
18652 echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
18653
18654 # Check whether --enable-delete-is-del or --disable-delete-is-del was given.
18655 if test "${enable_delete_is_del+set}" = set; then
18656 enableval="$enable_delete_is_del"
18657 delete_is_del=$enableval
18658 else
18659 delete_is_del=maybe
18660 fi;
18661
18662 echo "$as_me:18662: result: $delete_is_del" >&5
18663 echo "${ECHO_T}$delete_is_del" >&6
18664 case $delete_is_del in
18665 (yes)
18666 delete_is_del=true
18667 ;;
18668 (no)
18669 delete_is_del=false
18670 ;;
18671 esac
18672 cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
18673
18674 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18675
18676 cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
18677 delete_is_del=${cf_xbool1}${cf_xbool2}
18678
18679 cat >>confdefs.h <<EOF
18680 #define DEFDELETE_DEL $delete_is_del
18681 EOF
18682
18683 echo "$as_me:18683: checking for default pty initial erase setting" >&5
18684 echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
18685
18686 # Check whether --enable-pty-erase or --disable-pty-erase was given.
18687 if test "${enable_pty_erase+set}" = set; then
18688 enableval="$enable_pty_erase"
18689 initial_erase=$enableval
18690 else
18691 initial_erase=False
18692 fi;
18693
18694 echo "$as_me:18694: result: $initial_erase" >&5
18695 echo "${ECHO_T}$initial_erase" >&6
18696 case $initial_erase in
18697 (yes)
18698 initial_erase=true
18699 ;;
18700 (no)
18701 initial_erase=false
18702 ;;
18703 esac
18704 cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
18705
18706 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18707
18708 cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
18709 initial_erase=${cf_xbool1}${cf_xbool2}
18710
18711 cat >>confdefs.h <<EOF
18712 #define DEF_INITIAL_ERASE $initial_erase
18713 EOF
18714
18715 echo "$as_me:18715: checking if alt should send ESC" >&5
18716 echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
18717
18718 # Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
18719 if test "${enable_alt_sends_esc+set}" = set; then
18720 enableval="$enable_alt_sends_esc"
18721 test "$enableval" != yes && enableval=no
18722 if test "$enableval" != "no" ; then
18723 alt_sends_esc=$enableval
18724 else
18725 alt_sends_esc=no
18726 fi
18727 else
18728 enableval=no
18729 alt_sends_esc=no
18730
18731 fi;
18732
18733 echo "$as_me:18733: result: $alt_sends_esc" >&5
18734 echo "${ECHO_T}$alt_sends_esc" >&6
18735 case $alt_sends_esc in
18736 (yes)
18737 alt_sends_esc=true
18738 ;;
18739 (no)
18740 alt_sends_esc=false
18741 ;;
18742 esac
18743 cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
18744
18745 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18746
18747 cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
18748 alt_sends_esc=${cf_xbool1}${cf_xbool2}
18749
18750 cat >>confdefs.h <<EOF
18751 #define DEF_ALT_SENDS_ESC $alt_sends_esc
18752 EOF
18753
18754 echo "$as_me:18754: checking if meta should send ESC" >&5
18755 echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
18756
18757 # Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
18758 if test "${enable_meta_sends_esc+set}" = set; then
18759 enableval="$enable_meta_sends_esc"
18760 test "$enableval" != yes && enableval=no
18761 if test "$enableval" != "no" ; then
18762 meta_sends_esc=$enableval
18763 else
18764 meta_sends_esc=no
18765 fi
18766 else
18767 enableval=no
18768 meta_sends_esc=no
18769
18770 fi;
18771
18772 echo "$as_me:18772: result: $meta_sends_esc" >&5
18773 echo "${ECHO_T}$meta_sends_esc" >&6
18774 case $meta_sends_esc in
18775 (yes)
18776 meta_sends_esc=true
18777 ;;
18778 (no)
18779 meta_sends_esc=false
18780 ;;
18781 esac
18782 cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
18783
18784 cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18785
18786 cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
18787 meta_sends_esc=${cf_xbool1}${cf_xbool2}
18788
18789 cat >>confdefs.h <<EOF
18790 #define DEF_META_SENDS_ESC $meta_sends_esc
18791 EOF
18792
18793 ###############################################################################
18794 # Extract the first word of "tic", so it can be a program name with args.
18795 set dummy tic; ac_word=$2
18796 echo "$as_me:18796: checking for $ac_word" >&5
18797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18798 if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
18799 echo $ECHO_N "(cached) $ECHO_C" >&6
18800 else
18801 if test -n "$cf_tic_prog"; then
18802 ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
18803 else
18804 ac_save_IFS=$IFS; IFS=$ac_path_separator
18805 ac_dummy="$PATH"
18806 for ac_dir in $ac_dummy; do
18807 IFS=$ac_save_IFS
18808 test -z "$ac_dir" && ac_dir=.
18809 $as_executable_p "$ac_dir/$ac_word" || continue
18810 ac_cv_prog_cf_tic_prog="yes"
18811 echo "$as_me:18811: found $ac_dir/$ac_word" >&5
18812 break
18813 done
18814
18815 test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
18816 fi
18817 fi
18818 cf_tic_prog=$ac_cv_prog_cf_tic_prog
18819 if test -n "$cf_tic_prog"; then
18820 echo "$as_me:18820: result: $cf_tic_prog" >&5
18821 echo "${ECHO_T}$cf_tic_prog" >&6
18822 else
18823 echo "$as_me:18823: result: no" >&5
18824 echo "${ECHO_T}no" >&6
18825 fi
18826
18827 if test "$cf_tic_prog" = yes ; then
18828 if test -n "$TERMINFO"
18829 then
18830 case "$TERMINFO" in
18831 (/*)
18832 test -d "$TERMINFO" || unset TERMINFO
18833 ;;
18834 (*)
18835 unset TERMINFO
18836 ;;
18837 esac
18838 fi
18839 echo "$as_me:18839: checking for private terminfo-directory" >&5
18840 echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
18841
18842 # Check whether --with-own-terminfo or --without-own-terminfo was given.
18843 if test "${with_own_terminfo+set}" = set; then
18844 withval="$with_own_terminfo"
18845 TERMINFO_DIR=$withval
18846 else
18847 TERMINFO_DIR=${TERMINFO-none}
18848 fi;
18849 echo "$as_me:18849: result: $TERMINFO_DIR" >&5
18850 echo "${ECHO_T}$TERMINFO_DIR" >&6
18851 if test "$TERMINFO_DIR" = yes ; then
18852 { echo "$as_me:18852: WARNING: no value given" >&5
18853 echo "$as_me: WARNING: no value given" >&2;}
18854 elif test "$TERMINFO_DIR" != none ; then
18855 if test -d "$TERMINFO_DIR" ; then
18856
18857 cat >>confdefs.h <<EOF
18858 #define OWN_TERMINFO_DIR "$TERMINFO_DIR"
18859 EOF
18860
18861 echo "$as_me:18861: checking if \$TERMINFO should also be set" >&5
18862 echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6
18863
18864 # Check whether --enable-env-terminfo or --disable-env-terminfo was given.
18865 if test "${enable_env_terminfo+set}" = set; then
18866 enableval="$enable_env_terminfo"
18867 cf_env_terminfo=yes
18868 else
18869 cf_env_terminfo=no
18870 fi;
18871 echo "$as_me:18871: result: $cf_env_terminfo" >&5
18872 echo "${ECHO_T}$cf_env_terminfo" >&6
18873 test $cf_env_terminfo = yes &&
18874
18875 cat >>confdefs.h <<\EOF
18876 #define OWN_TERMINFO_ENV 1
18877 EOF
18878
18879 else
18880 { echo "$as_me:18880: WARNING: not a directory" >&5
18881 echo "$as_me: WARNING: not a directory" >&2;}
18882 fi
18883 elif test "$prefix" != NONE ; then
18884 TERMINFO_DIR='${prefix}/lib/terminfo'
18885 elif test -d /usr/lib/terminfo ; then
18886 TERMINFO_DIR=/usr/lib/terminfo
18887 else
18888 TERMINFO_DIR=
18889 fi
18890 SET_TERMINFO=
18891 if test -n "$TERMINFO_DIR" ; then
18892 TERMINFO_DIR='${DESTDIR}'$TERMINFO_DIR
18893 SET_TERMINFO='TERMINFO=${TERMINFO_DIR}'
18894 fi
18895 no_ticprog=
18896 else
18897 no_ticprog="#"
18898 TERMINFO_DIR=
18899 SET_TERMINFO=
18900 fi
18901
18902 ###############################################################################
18903
18904 echo "$as_me:18904: checking if you want active-icons" >&5
18905 echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
18906
18907 # Check whether --enable-active-icon or --disable-active-icon was given.
18908 if test "${enable_active_icon+set}" = set; then
18909 enableval="$enable_active_icon"
18910 test "$enableval" != no && enableval=yes
18911 if test "$enableval" != "yes" ; then
18912 enable_active_icon=no
18913 else
18914 enable_active_icon=yes
18915 fi
18916 else
18917 enableval=yes
18918 enable_active_icon=yes
18919
18920 fi;
18921 echo "$as_me:18921: result: $enable_active_icon" >&5
18922 echo "${ECHO_T}$enable_active_icon" >&6
18923 if test "$enable_active_icon" = no ; then
18924
18925 cat >>confdefs.h <<\EOF
18926 #define NO_ACTIVE_ICON 1
18927 EOF
18928
18929 fi
18930
18931 echo "$as_me:18931: checking if you want ANSI color" >&5
18932 echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
18933
18934 # Check whether --enable-ansi-color or --disable-ansi-color was given.
18935 if test "${enable_ansi_color+set}" = set; then
18936 enableval="$enable_ansi_color"
18937 test "$enableval" != no && enableval=yes
18938 if test "$enableval" != "yes" ; then
18939 enable_ansi_color=no
18940 else
18941 enable_ansi_color=yes
18942 fi
18943 else
18944 enableval=yes
18945 enable_ansi_color=yes
18946
18947 fi;
18948 echo "$as_me:18948: result: $enable_ansi_color" >&5
18949 echo "${ECHO_T}$enable_ansi_color" >&6
18950 test "$enable_ansi_color" = no &&
18951 cat >>confdefs.h <<\EOF
18952 #define OPT_ISO_COLORS 0
18953 EOF
18954
18955 if test "$enable_ansi_color" = yes ; then
18956
18957 echo "$as_me:18957: checking if you want 16 colors like aixterm" >&5
18958 echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
18959
18960 # Check whether --enable-16-color or --disable-16-color was given.
18961 if test "${enable_16_color+set}" = set; then
18962 enableval="$enable_16_color"
18963 test "$enableval" != no && enableval=yes
18964 if test "$enableval" != "yes" ; then
18965 enable_16_color=no
18966 else
18967 enable_16_color=yes
18968 fi
18969 else
18970 enableval=yes
18971 enable_16_color=yes
18972
18973 fi;
18974 echo "$as_me:18974: result: $enable_16_color" >&5
18975 echo "${ECHO_T}$enable_16_color" >&6
18976 test "$enable_16_color" = no &&
18977 cat >>confdefs.h <<\EOF
18978 #define OPT_AIX_COLORS 0
18979 EOF
18980
18981 echo "$as_me:18981: checking if you want 256 colors" >&5
18982 echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
18983
18984 # Check whether --enable-256-color or --disable-256-color was given.
18985 if test "${enable_256_color+set}" = set; then
18986 enableval="$enable_256_color"
18987 test "$enableval" != no && enableval=yes
18988 if test "$enableval" != "yes" ; then
18989 enable_256_color=no
18990 else
18991 enable_256_color=yes
18992 fi
18993 else
18994 enableval=yes
18995 enable_256_color=yes
18996
18997 fi;
18998 echo "$as_me:18998: result: $enable_256_color" >&5
18999 echo "${ECHO_T}$enable_256_color" >&6
19000
19001 if test "$enable_256_color" = yes ; then
19002
19003 CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
19004 EXTRAHDRS="$EXTRAHDRS 256colres.h"
19005
19006 cat >>confdefs.h <<\EOF
19007 #define OPT_256_COLORS 1
19008 EOF
19009
19010 echo "$as_me:19010: checking if you want direct-color support" >&5
19011 echo $ECHO_N "checking if you want direct-color support... $ECHO_C" >&6
19012
19013 # Check whether --enable-direct-color or --disable-direct-color was given.
19014 if test "${enable_direct_color+set}" = set; then
19015 enableval="$enable_direct_color"
19016 test "$enableval" != no && enableval=yes
19017 if test "$enableval" != "yes" ; then
19018 enable_direct_color=no
19019 else
19020 enable_direct_color=yes
19021 fi
19022 else
19023 enableval=yes
19024 enable_direct_color=yes
19025
19026 fi;
19027 echo "$as_me:19027: result: $enable_direct_color" >&5
19028 echo "${ECHO_T}$enable_direct_color" >&6
19029 if test "$enable_direct_color" = yes ; then
19030
19031 cat >>confdefs.h <<\EOF
19032 #define OPT_DIRECT_COLOR 1
19033 EOF
19034
19035 fi
19036
19037 else
19038
19039 echo "$as_me:19039: checking if you want 88 colors" >&5
19040 echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
19041
19042 # Check whether --enable-88-color or --disable-88-color was given.
19043 if test "${enable_88_color+set}" = set; then
19044 enableval="$enable_88_color"
19045 test "$enableval" != no && enableval=yes
19046 if test "$enableval" != "yes" ; then
19047 enable_88_color=no
19048 else
19049 enable_88_color=yes
19050 fi
19051 else
19052 enableval=yes
19053 enable_88_color=yes
19054
19055 fi;
19056 echo "$as_me:19056: result: $enable_88_color" >&5
19057 echo "${ECHO_T}$enable_88_color" >&6
19058 if test "$enable_88_color" = yes ; then
19059 CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
19060 EXTRAHDRS="$EXTRAHDRS 88colres.h"
19061
19062 cat >>confdefs.h <<\EOF
19063 #define OPT_88_COLORS 1
19064 EOF
19065
19066 fi
19067
19068 fi
19069
19070 fi
19071
19072 echo "$as_me:19072: checking if you want blinking cursor" >&5
19073 echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
19074
19075 # Check whether --enable-blink-cursor or --disable-blink-cursor was given.
19076 if test "${enable_blink_cursor+set}" = set; then
19077 enableval="$enable_blink_cursor"
19078 test "$enableval" != no && enableval=yes
19079 if test "$enableval" != "yes" ; then
19080 enable_blink_curs=no
19081 else
19082 enable_blink_curs=yes
19083 fi
19084 else
19085 enableval=yes
19086 enable_blink_curs=yes
19087
19088 fi;
19089 echo "$as_me:19089: result: $enable_blink_curs" >&5
19090 echo "${ECHO_T}$enable_blink_curs" >&6
19091 test "$enable_blink_curs" = no &&
19092 cat >>confdefs.h <<\EOF
19093 #define OPT_BLINK_CURS 0
19094 EOF
19095
19096 echo "$as_me:19096: checking if you want to ignore Linux's broken palette-strings" >&5
19097 echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
19098
19099 case $host_os in
19100 (linux*)
19101 assume_broken_osc=yes ;;
19102 (*)
19103 assume_broken_osc=no ;;
19104 esac
19105
19106 # Check whether --enable-broken-osc or --disable-broken-osc was given.
19107 if test "${enable_broken_osc+set}" = set; then
19108 enableval="$enable_broken_osc"
19109 test "$enableval" != no && enableval=yes
19110 if test "$enableval" != "$assume_broken_osc" ; then
19111 enable_broken_osc=$enableval
19112 else
19113 enable_broken_osc=$enableval
19114 fi
19115 else
19116 enableval=$assume_broken_osc
19117 enable_broken_osc=$enableval
19118
19119 fi;
19120 echo "$as_me:19120: result: $enable_broken_osc" >&5
19121 echo "${ECHO_T}$enable_broken_osc" >&6
19122 if test "$enable_broken_osc" = yes ; then
19123
19124 cat >>confdefs.h <<\EOF
19125 #define OPT_BROKEN_OSC 1
19126 EOF
19127
19128 else
19129
19130 cat >>confdefs.h <<\EOF
19131 #define OPT_BROKEN_OSC 0
19132 EOF
19133
19134 fi
19135
19136 echo "$as_me:19136: checking if you want to allow broken string-terminators" >&5
19137 echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
19138
19139 # Check whether --enable-broken-st or --disable-broken-st was given.
19140 if test "${enable_broken_st+set}" = set; then
19141 enableval="$enable_broken_st"
19142 test "$enableval" != yes && enableval=no
19143 if test "$enableval" != "no" ; then
19144 enable_broken_st=no
19145 else
19146 enable_broken_st=yes
19147 fi
19148 else
19149 enableval=no
19150 enable_broken_st=yes
19151
19152 fi;
19153 echo "$as_me:19153: result: $enable_broken_st" >&5
19154 echo "${ECHO_T}$enable_broken_st" >&6
19155 test "$enable_broken_st" = no &&
19156 cat >>confdefs.h <<\EOF
19157 #define OPT_BROKEN_ST 0
19158 EOF
19159
19160 echo "$as_me:19160: checking if you want to compile-in icon data" >&5
19161 echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
19162
19163 # Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
19164 if test "${enable_builtin_xpms+set}" = set; then
19165 enableval="$enable_builtin_xpms"
19166 test "$enableval" != yes && enableval=no
19167 if test "$enableval" != "no" ; then
19168 enable_builtin_xpms=yes
19169 else
19170 enable_builtin_xpms=no
19171 fi
19172 else
19173 enableval=no
19174 enable_builtin_xpms=no
19175
19176 fi;
19177 echo "$as_me:19177: result: $enable_builtin_xpms" >&5
19178 echo "${ECHO_T}$enable_builtin_xpms" >&6
19179 test "$enable_builtin_xpms" = yes &&
19180 cat >>confdefs.h <<\EOF
19181 #define OPT_BUILTIN_XPMS 1
19182 EOF
19183
19184 echo "$as_me:19184: checking if you want printable 128-159" >&5
19185 echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
19186
19187 # Check whether --enable-c1-print or --disable-c1-print was given.
19188 if test "${enable_c1_print+set}" = set; then
19189 enableval="$enable_c1_print"
19190 test "$enableval" != no && enableval=yes
19191 if test "$enableval" != "yes" ; then
19192 enable_c1_print=no
19193 else
19194 enable_c1_print=yes
19195 fi
19196 else
19197 enableval=yes
19198 enable_c1_print=yes
19199
19200 fi;
19201 echo "$as_me:19201: result: $enable_c1_print" >&5
19202 echo "${ECHO_T}$enable_c1_print" >&6
19203 test "$enable_c1_print" = no &&
19204 cat >>confdefs.h <<\EOF
19205 #define OPT_C1_PRINT 0
19206 EOF
19207
19208 if test "$enable_ansi_color" = yes ; then
19209
19210 echo "$as_me:19210: checking if you want bold colors mapped like IBM PC" >&5
19211 echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
19212
19213 # Check whether --enable-bold-color or --disable-bold-color was given.
19214 if test "${enable_bold_color+set}" = set; then
19215 enableval="$enable_bold_color"
19216 test "$enableval" != no && enableval=yes
19217 if test "$enableval" != "yes" ; then
19218 enable_pc_color=no
19219 else
19220 enable_pc_color=yes
19221 fi
19222 else
19223 enableval=yes
19224 enable_pc_color=yes
19225
19226 fi;
19227 echo "$as_me:19227: result: $enable_pc_color" >&5
19228 echo "${ECHO_T}$enable_pc_color" >&6
19229 test "$enable_pc_color" = no &&
19230 cat >>confdefs.h <<\EOF
19231 #define OPT_PC_COLORS 0
19232 EOF
19233
19234 echo "$as_me:19234: checking if you want separate color-classes" >&5
19235 echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
19236
19237 # Check whether --enable-color-class or --disable-color-class was given.
19238 if test "${enable_color_class+set}" = set; then
19239 enableval="$enable_color_class"
19240 test "$enableval" != no && enableval=yes
19241 if test "$enableval" != "yes" ; then
19242 enable_color_class=no
19243 else
19244 enable_color_class=yes
19245 fi
19246 else
19247 enableval=yes
19248 enable_color_class=yes
19249
19250 fi;
19251 echo "$as_me:19251: result: $enable_color_class" >&5
19252 echo "${ECHO_T}$enable_color_class" >&6
19253 test "$enable_color_class" = no &&
19254 cat >>confdefs.h <<\EOF
19255 #define OPT_COLOR_CLASS 0
19256 EOF
19257
19258 echo "$as_me:19258: checking if you want color-mode enabled by default" >&5
19259 echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
19260
19261 # Check whether --enable-color-mode or --disable-color-mode was given.
19262 if test "${enable_color_mode+set}" = set; then
19263 enableval="$enable_color_mode"
19264 test "$enableval" != no && enableval=yes
19265 if test "$enableval" != "yes" ; then
19266 default_colormode=no
19267 else
19268 default_colormode=yes
19269 fi
19270 else
19271 enableval=yes
19272 default_colormode=yes
19273
19274 fi;
19275 echo "$as_me:19275: result: $default_colormode" >&5
19276 echo "${ECHO_T}$default_colormode" >&6
19277 test "$default_colormode" = no &&
19278 cat >>confdefs.h <<\EOF
19279 #define DFT_COLORMODE 0
19280 EOF
19281
19282 fi
19283
19284 echo "$as_me:19284: checking if you want support for color highlighting" >&5
19285 echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
19286
19287 # Check whether --enable-highlighting or --disable-highlighting was given.
19288 if test "${enable_highlighting+set}" = set; then
19289 enableval="$enable_highlighting"
19290 test "$enableval" != no && enableval=yes
19291 if test "$enableval" != "yes" ; then
19292 default_highlight=no
19293 else
19294 default_highlight=yes
19295 fi
19296 else
19297 enableval=yes
19298 default_highlight=yes
19299
19300 fi;
19301 echo "$as_me:19301: result: $default_highlight" >&5
19302 echo "${ECHO_T}$default_highlight" >&6
19303 test "$default_highlight" = no &&
19304 cat >>confdefs.h <<\EOF
19305 #define OPT_HIGHLIGHT_COLOR 0
19306 EOF
19307
19308 echo "$as_me:19308: checking if you want support for doublesize characters" >&5
19309 echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
19310
19311 # Check whether --enable-doublechars or --disable-doublechars was given.
19312 if test "${enable_doublechars+set}" = set; then
19313 enableval="$enable_doublechars"
19314 test "$enableval" != no && enableval=yes
19315 if test "$enableval" != "yes" ; then
19316 enable_doublechars=no
19317 else
19318 enable_doublechars=yes
19319 fi
19320 else
19321 enableval=yes
19322 enable_doublechars=yes
19323
19324 fi;
19325 echo "$as_me:19325: result: $enable_doublechars" >&5
19326 echo "${ECHO_T}$enable_doublechars" >&6
19327 test "$enable_doublechars" = no &&
19328 cat >>confdefs.h <<\EOF
19329 #define OPT_DEC_CHRSET 0
19330 EOF
19331
19332 echo "$as_me:19332: checking if you want fallback-support for box characters" >&5
19333 echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
19334
19335 # Check whether --enable-boxchars or --disable-boxchars was given.
19336 if test "${enable_boxchars+set}" = set; then
19337 enableval="$enable_boxchars"
19338 test "$enableval" != no && enableval=yes
19339 if test "$enableval" != "yes" ; then
19340 enable_boxchars=no
19341 else
19342 enable_boxchars=yes
19343 fi
19344 else
19345 enableval=yes
19346 enable_boxchars=yes
19347
19348 fi;
19349 echo "$as_me:19349: result: $enable_boxchars" >&5
19350 echo "${ECHO_T}$enable_boxchars" >&6
19351 test "$enable_boxchars" = no &&
19352 cat >>confdefs.h <<\EOF
19353 #define OPT_BOX_CHARS 0
19354 EOF
19355
19356 echo "$as_me:19356: checking if you want to allow spawning commands to process selections" >&5
19357 echo $ECHO_N "checking if you want to allow spawning commands to process selections... $ECHO_C" >&6
19358
19359 # Check whether --enable-exec-selection or --disable-exec-selection was given.
19360 if test "${enable_exec_selection+set}" = set; then
19361 enableval="$enable_exec_selection"
19362 test "$enableval" != no && enableval=yes
19363 if test "$enableval" != "yes" ; then
19364 enable_exec_selection=no
19365 else
19366 enable_exec_selection=yes
19367 fi
19368 else
19369 enableval=yes
19370 enable_exec_selection=yes
19371
19372 fi;
19373 echo "$as_me:19373: result: $enable_exec_selection" >&5
19374 echo "${ECHO_T}$enable_exec_selection" >&6
19375 if test "$enable_exec_selection" = no ; then
19376
19377 cat >>confdefs.h <<\EOF
19378 #define OPT_EXEC_SELECTION 0
19379 EOF
19380
19381 fi
19382
19383 echo "$as_me:19383: checking if you want to allow spawning new xterms" >&5
19384 echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
19385
19386 # Check whether --enable-exec-xterm or --disable-exec-xterm was given.
19387 if test "${enable_exec_xterm+set}" = set; then
19388 enableval="$enable_exec_xterm"
19389 test "$enableval" != yes && enableval=no
19390 if test "$enableval" != "no" ; then
19391 enable_exec_xterm=yes
19392 else
19393 enable_exec_xterm=no
19394 fi
19395 else
19396 enableval=no
19397 enable_exec_xterm=no
19398
19399 fi;
19400 echo "$as_me:19400: result: $enable_exec_xterm" >&5
19401 echo "${ECHO_T}$enable_exec_xterm" >&6
19402 if test "$enable_exec_xterm" = yes ; then
19403
19404 echo "$as_me:19404: checking for proc tree with cwd-support" >&5
19405 echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
19406 if test "${cf_cv_procfs_cwd+set}" = set; then
19407 echo $ECHO_N "(cached) $ECHO_C" >&6
19408 else
19409
19410 cf_cv_procfs_cwd=no
19411 for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
19412 do
19413 if test -d "$cf_path" && \
19414 test -d "$cf_path"/$$ && \
19415 { test -d "$cf_path"/$$/cwd || \
19416 test -L "$cf_path"/$$/cwd; }; then
19417 cf_cv_procfs_cwd="$cf_path"
19418 break
19419 fi
19420 done
19421
19422 fi
19423 echo "$as_me:19423: result: $cf_cv_procfs_cwd" >&5
19424 echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
19425
19426 if test "$cf_cv_procfs_cwd" = no ; then
19427 { echo "$as_me:19427: WARNING: no suitable proc filesystem found" >&5
19428 echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
19429 else
19430
19431 cat >>confdefs.h <<EOF
19432 #define PROCFS_ROOT "$cf_cv_procfs_cwd"
19433 EOF
19434
19435 cat >>confdefs.h <<\EOF
19436 #define OPT_EXEC_XTERM 1
19437 EOF
19438
19439 fi
19440 fi
19441
19442 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
19443 test -n "$verbose" && echo " found package Xext" 1>&6
19444
19445 echo "${as_me:-configure}:19445: testing found package Xext ..." 1>&5
19446
19447 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
19448 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
19449 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
19450
19451 echo "${as_me:-configure}:19451: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19452
19453 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
19454
19455 echo "${as_me:-configure}:19455: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
19456
19457 cf_fix_cppflags=no
19458 cf_new_cflags=
19459 cf_new_cppflags=
19460 cf_new_extra_cppflags=
19461
19462 for cf_add_cflags in $cf_pkgconfig_incs
19463 do
19464 case "$cf_fix_cppflags" in
19465 (no)
19466 case "$cf_add_cflags" in
19467 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19468 case "$cf_add_cflags" in
19469 (-D*)
19470 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19471
19472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19473 && test -z "${cf_tst_cflags}" \
19474 && cf_fix_cppflags=yes
19475
19476 if test "$cf_fix_cppflags" = yes ; then
19477
19478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19480
19481 continue
19482 elif test "${cf_tst_cflags}" = "\"'" ; then
19483
19484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19486
19487 continue
19488 fi
19489 ;;
19490 esac
19491 case "$CPPFLAGS" in
19492 (*$cf_add_cflags)
19493 ;;
19494 (*)
19495 case "$cf_add_cflags" in
19496 (-D*)
19497 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19498
19499 CPPFLAGS=`echo "$CPPFLAGS" | \
19500 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19501 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19502
19503 ;;
19504 esac
19505
19506 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19507 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19508
19509 ;;
19510 esac
19511 ;;
19512 (*)
19513
19514 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19515 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19516
19517 ;;
19518 esac
19519 ;;
19520 (yes)
19521
19522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19524
19525 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19526
19527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19528 && test -z "${cf_tst_cflags}" \
19529 && cf_fix_cppflags=no
19530 ;;
19531 esac
19532 done
19533
19534 if test -n "$cf_new_cflags" ; then
19535
19536 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19537 CFLAGS="${CFLAGS}$cf_new_cflags"
19538
19539 fi
19540
19541 if test -n "$cf_new_cppflags" ; then
19542
19543 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19544 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19545
19546 fi
19547
19548 if test -n "$cf_new_extra_cppflags" ; then
19549
19550 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19551 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19552
19553 fi
19554
19555 cf_add_libs="$LIBS"
19556 # reverse order
19557 cf_add_0lib=
19558 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19559 # filter duplicates
19560 for cf_add_1lib in $cf_add_0lib; do
19561 for cf_add_2lib in $cf_add_libs; do
19562 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19563 cf_add_1lib=
19564 break
19565 fi
19566 done
19567 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19568 done
19569 LIBS="$cf_add_libs"
19570
19571 :
19572 else
19573 cf_pkgconfig_incs=
19574 cf_pkgconfig_libs=
19575
19576 echo "$as_me:19576: checking for XextCreateExtension in -lXext" >&5
19577 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
19578 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
19579 echo $ECHO_N "(cached) $ECHO_C" >&6
19580 else
19581 ac_check_lib_save_LIBS=$LIBS
19582 LIBS="-lXext $LIBS"
19583 cat >"conftest.$ac_ext" <<_ACEOF
19584 #line 19584 "configure"
19585 #include "confdefs.h"
19586
19587 /* Override any gcc2 internal prototype to avoid an error. */
19588 #ifdef __cplusplus
19589 extern "C"
19590 #endif
19591 /* We use char because int might match the return type of a gcc2
19592 builtin and then its argument prototype would still apply. */
19593 char XextCreateExtension (void);
19594 int
19595 main (void)
19596 {
19597 XextCreateExtension ();
19598 ;
19599 return 0;
19600 }
19601 _ACEOF
19602 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19603 if { (eval echo "$as_me:19603: \"$ac_link\"") >&5
19604 (eval $ac_link) 2>&5
19605 ac_status=$?
19606 echo "$as_me:19606: \$? = $ac_status" >&5
19607 (exit "$ac_status"); } &&
19608 { ac_try='test -s "conftest$ac_exeext"'
19609 { (eval echo "$as_me:19609: \"$ac_try\"") >&5
19610 (eval $ac_try) 2>&5
19611 ac_status=$?
19612 echo "$as_me:19612: \$? = $ac_status" >&5
19613 (exit "$ac_status"); }; }; then
19614 ac_cv_lib_Xext_XextCreateExtension=yes
19615 else
19616 echo "$as_me: failed program was:" >&5
19617 cat "conftest.$ac_ext" >&5
19618 ac_cv_lib_Xext_XextCreateExtension=no
19619 fi
19620 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19621 LIBS=$ac_check_lib_save_LIBS
19622 fi
19623 echo "$as_me:19623: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
19624 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
19625 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
19626
19627 cf_add_libs="$LIBS"
19628 # reverse order
19629 cf_add_0lib=
19630 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19631 # filter duplicates
19632 for cf_add_1lib in $cf_add_0lib; do
19633 for cf_add_2lib in $cf_add_libs; do
19634 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19635 cf_add_1lib=
19636 break
19637 fi
19638 done
19639 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19640 done
19641 LIBS="$cf_add_libs"
19642
19643 fi
19644
19645 fi
19646
19647 echo "$as_me:19647: checking for X11/extensions/Xdbe.h" >&5
19648 echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
19649 if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
19650 echo $ECHO_N "(cached) $ECHO_C" >&6
19651 else
19652 cat >"conftest.$ac_ext" <<_ACEOF
19653 #line 19653 "configure"
19654 #include "confdefs.h"
19655 #include <X11/extensions/Xdbe.h>
19656 _ACEOF
19657 if { (eval echo "$as_me:19657: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19658 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19659 ac_status=$?
19660 $EGREP -v '^ *\+' conftest.er1 >conftest.err
19661 rm -f conftest.er1
19662 cat conftest.err >&5
19663 echo "$as_me:19663: \$? = $ac_status" >&5
19664 (exit "$ac_status"); } >/dev/null; then
19665 if test -s conftest.err; then
19666 ac_cpp_err=$ac_c_preproc_warn_flag
19667 else
19668 ac_cpp_err=
19669 fi
19670 else
19671 ac_cpp_err=yes
19672 fi
19673 if test -z "$ac_cpp_err"; then
19674 ac_cv_header_X11_extensions_Xdbe_h=yes
19675 else
19676 echo "$as_me: failed program was:" >&5
19677 cat "conftest.$ac_ext" >&5
19678 ac_cv_header_X11_extensions_Xdbe_h=no
19679 fi
19680 rm -f conftest.err "conftest.$ac_ext"
19681 fi
19682 echo "$as_me:19682: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
19683 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
19684 if test "$ac_cv_header_X11_extensions_Xdbe_h" = yes; then
19685
19686 cat >>confdefs.h <<\EOF
19687 #define HAVE_X11_EXTENSIONS_XDBE_H 1
19688 EOF
19689
19690 echo "$as_me:19690: checking for XdbeSwapBuffers" >&5
19691 echo $ECHO_N "checking for XdbeSwapBuffers... $ECHO_C" >&6
19692 if test "${ac_cv_func_XdbeSwapBuffers+set}" = set; then
19693 echo $ECHO_N "(cached) $ECHO_C" >&6
19694 else
19695 cat >"conftest.$ac_ext" <<_ACEOF
19696 #line 19696 "configure"
19697 #include "confdefs.h"
19698 #define XdbeSwapBuffers autoconf_temporary
19699 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19700 #undef XdbeSwapBuffers
19701
19702 #ifdef __cplusplus
19703 extern "C"
19704 #endif
19705
19706 /* We use char because int might match the return type of a gcc2
19707 builtin and then its argument prototype would still apply. */
19708 char XdbeSwapBuffers (void);
19709
19710 int
19711 main (void)
19712 {
19713
19714 /* The GNU C library defines stubs for functions which it implements
19715 to always fail with ENOSYS. Some functions are actually named
19716 something starting with __ and the normal name is an alias. */
19717 #if defined (__stub_XdbeSwapBuffers) || defined (__stub___XdbeSwapBuffers)
19718 #error found stub for XdbeSwapBuffers
19719 #endif
19720
19721 return XdbeSwapBuffers ();
19722 ;
19723 return 0;
19724 }
19725 _ACEOF
19726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19727 if { (eval echo "$as_me:19727: \"$ac_link\"") >&5
19728 (eval $ac_link) 2>&5
19729 ac_status=$?
19730 echo "$as_me:19730: \$? = $ac_status" >&5
19731 (exit "$ac_status"); } &&
19732 { ac_try='test -s "conftest$ac_exeext"'
19733 { (eval echo "$as_me:19733: \"$ac_try\"") >&5
19734 (eval $ac_try) 2>&5
19735 ac_status=$?
19736 echo "$as_me:19736: \$? = $ac_status" >&5
19737 (exit "$ac_status"); }; }; then
19738 ac_cv_func_XdbeSwapBuffers=yes
19739 else
19740 echo "$as_me: failed program was:" >&5
19741 cat "conftest.$ac_ext" >&5
19742 ac_cv_func_XdbeSwapBuffers=no
19743 fi
19744 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19745 fi
19746 echo "$as_me:19746: result: $ac_cv_func_XdbeSwapBuffers" >&5
19747 echo "${ECHO_T}$ac_cv_func_XdbeSwapBuffers" >&6
19748 if test "$ac_cv_func_XdbeSwapBuffers" = yes; then
19749
19750 cat >>confdefs.h <<\EOF
19751 #define HAVE_XDBESWAPBUFFERS 1
19752 EOF
19753
19754 cf_x_ext_double_buffer=yes
19755 fi
19756
19757 fi
19758
19759 double_buffer=False
19760 if test "$cf_x_ext_double_buffer" = yes ; then
19761 echo "$as_me:19761: checking if you want to enable double-buffering in default resources" >&5
19762 echo $ECHO_N "checking if you want to enable double-buffering in default resources... $ECHO_C" >&6
19763
19764 # Check whether --enable-double-buffer or --disable-double-buffer was given.
19765 if test "${enable_double_buffer+set}" = set; then
19766 enableval="$enable_double_buffer"
19767 test "$enableval" != yes && enableval=no
19768 if test "$enableval" != "no" ; then
19769 enable_double_bfr=yes
19770 else
19771 enable_double_bfr=no
19772 fi
19773 else
19774 enableval=no
19775 enable_double_bfr=no
19776
19777 fi;
19778 echo "$as_me:19778: result: $enable_double_bfr" >&5
19779 echo "${ECHO_T}$enable_double_bfr" >&6
19780 if test "$enable_double_bfr" = yes ; then
19781
19782 cat >>confdefs.h <<\EOF
19783 #define OPT_DOUBLE_BUFFER 1
19784 EOF
19785
19786 double_buffer=True
19787 fi
19788 fi
19789
19790 echo "$as_me:19790: checking if you want to use FreeType library" >&5
19791 echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
19792
19793 # Check whether --enable-freetype or --disable-freetype was given.
19794 if test "${enable_freetype+set}" = set; then
19795 enableval="$enable_freetype"
19796 test "$enableval" != no && enableval=yes
19797 if test "$enableval" != "yes" ; then
19798 enable_freetype=no
19799 else
19800 enable_freetype=yes
19801 fi
19802 else
19803 enableval=yes
19804 enable_freetype=yes
19805
19806 fi;
19807 echo "$as_me:19807: result: $enable_freetype" >&5
19808 echo "${ECHO_T}$enable_freetype" >&6
19809 if test "$enable_freetype" = yes ; then
19810
19811 cf_cv_x_freetype_incs=no
19812 cf_cv_x_freetype_libs=no
19813 cf_extra_freetype_libs=
19814 FREETYPE_CONFIG=none
19815 FREETYPE_PARAMS=
19816
19817 echo "$as_me:19817: checking for FreeType configuration script" >&5
19818 echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
19819
19820 # Check whether --with-freetype-config or --without-freetype-config was given.
19821 if test "${with_freetype_config+set}" = set; then
19822 withval="$with_freetype_config"
19823 cf_cv_x_freetype_cfgs="$withval"
19824 else
19825 cf_cv_x_freetype_cfgs=auto
19826 fi;
19827 test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
19828 test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
19829 echo "$as_me:19829: result: $cf_cv_x_freetype_cfgs" >&5
19830 echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
19831
19832 case $cf_cv_x_freetype_cfgs in
19833 (none)
19834 echo "$as_me:19834: checking if you specified -D/-I options for FreeType" >&5
19835 echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
19836
19837 # Check whether --with-freetype-cflags or --without-freetype-cflags was given.
19838 if test "${with_freetype_cflags+set}" = set; then
19839 withval="$with_freetype_cflags"
19840 cf_cv_x_freetype_incs="$with_freetype_cflags"
19841 else
19842 cf_cv_x_freetype_incs=no
19843 fi;
19844 echo "$as_me:19844: result: $cf_cv_x_freetype_incs" >&5
19845 echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19846
19847 echo "$as_me:19847: checking if you specified -L/-l options for FreeType" >&5
19848 echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
19849
19850 # Check whether --with-freetype-libs or --without-freetype-libs was given.
19851 if test "${with_freetype_libs+set}" = set; then
19852 withval="$with_freetype_libs"
19853 cf_cv_x_freetype_libs="$with_freetype_libs"
19854 else
19855 cf_cv_x_freetype_libs=no
19856 fi;
19857 echo "$as_me:19857: result: $cf_cv_x_freetype_libs" >&5
19858 echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19859 ;;
19860 (auto)
19861 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19862 FREETYPE_CONFIG=$PKG_CONFIG
19863 FREETYPE_PARAMS=xft
19864 else
19865 # Extract the first word of "freetype-config", so it can be a program name with args.
19866 set dummy freetype-config; ac_word=$2
19867 echo "$as_me:19867: checking for $ac_word" >&5
19868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19869 if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
19870 echo $ECHO_N "(cached) $ECHO_C" >&6
19871 else
19872 case $FREETYPE_CONFIG in
19873 [\\/]* | ?:[\\/]*)
19874 ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
19875 ;;
19876 *)
19877 ac_save_IFS=$IFS; IFS=$ac_path_separator
19878 ac_dummy="$PATH"
19879 for ac_dir in $ac_dummy; do
19880 IFS=$ac_save_IFS
19881 test -z "$ac_dir" && ac_dir=.
19882 if $as_executable_p "$ac_dir/$ac_word"; then
19883 ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
19884 echo "$as_me:19884: found $ac_dir/$ac_word" >&5
19885 break
19886 fi
19887 done
19888
19889 test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
19890 ;;
19891 esac
19892 fi
19893 FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
19894
19895 if test -n "$FREETYPE_CONFIG"; then
19896 echo "$as_me:19896: result: $FREETYPE_CONFIG" >&5
19897 echo "${ECHO_T}$FREETYPE_CONFIG" >&6
19898 else
19899 echo "$as_me:19899: result: no" >&5
19900 echo "${ECHO_T}no" >&6
19901 fi
19902
19903 if test "$FREETYPE_CONFIG" != none; then
19904 FREETYPE_CONFIG=$FREETYPE_CONFIG
19905 cf_extra_freetype_libs="-lXft"
19906 else
19907 # Extract the first word of "xft-config", so it can be a program name with args.
19908 set dummy xft-config; ac_word=$2
19909 echo "$as_me:19909: checking for $ac_word" >&5
19910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19911 if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
19912 echo $ECHO_N "(cached) $ECHO_C" >&6
19913 else
19914 case $FREETYPE_OLD_CONFIG in
19915 [\\/]* | ?:[\\/]*)
19916 ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
19917 ;;
19918 *)
19919 ac_save_IFS=$IFS; IFS=$ac_path_separator
19920 ac_dummy="$PATH"
19921 for ac_dir in $ac_dummy; do
19922 IFS=$ac_save_IFS
19923 test -z "$ac_dir" && ac_dir=.
19924 if $as_executable_p "$ac_dir/$ac_word"; then
19925 ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
19926 echo "$as_me:19926: found $ac_dir/$ac_word" >&5
19927 break
19928 fi
19929 done
19930
19931 test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
19932 ;;
19933 esac
19934 fi
19935 FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
19936
19937 if test -n "$FREETYPE_OLD_CONFIG"; then
19938 echo "$as_me:19938: result: $FREETYPE_OLD_CONFIG" >&5
19939 echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
19940 else
19941 echo "$as_me:19941: result: no" >&5
19942 echo "${ECHO_T}no" >&6
19943 fi
19944
19945 if test "$FREETYPE_OLD_CONFIG" != none; then
19946 FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
19947 fi
19948 fi
19949 fi
19950 ;;
19951 (pkg*)
19952 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19953 FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
19954 FREETYPE_PARAMS=xft
19955 else
19956 { echo "$as_me:19956: WARNING: cannot find pkg-config for Xft" >&5
19957 echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
19958 fi
19959 ;;
19960 (*)
19961 # Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
19962 set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
19963 echo "$as_me:19963: checking for $ac_word" >&5
19964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19965 if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
19966 echo $ECHO_N "(cached) $ECHO_C" >&6
19967 else
19968 case $FREETYPE_XFT_CONFIG in
19969 [\\/]* | ?:[\\/]*)
19970 ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
19971 ;;
19972 *)
19973 ac_save_IFS=$IFS; IFS=$ac_path_separator
19974 ac_dummy="$PATH"
19975 for ac_dir in $ac_dummy; do
19976 IFS=$ac_save_IFS
19977 test -z "$ac_dir" && ac_dir=.
19978 if $as_executable_p "$ac_dir/$ac_word"; then
19979 ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
19980 echo "$as_me:19980: found $ac_dir/$ac_word" >&5
19981 break
19982 fi
19983 done
19984
19985 test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
19986 ;;
19987 esac
19988 fi
19989 FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
19990
19991 if test -n "$FREETYPE_XFT_CONFIG"; then
19992 echo "$as_me:19992: result: $FREETYPE_XFT_CONFIG" >&5
19993 echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
19994 else
19995 echo "$as_me:19995: result: no" >&5
19996 echo "${ECHO_T}no" >&6
19997 fi
19998
19999 if test "$FREETYPE_XFT_CONFIG" != none; then
20000 FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
20001 else
20002 { echo "$as_me:20002: WARNING: cannot find config script for Xft" >&5
20003 echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
20004 fi
20005 ;;
20006 esac
20007
20008 if test "$FREETYPE_CONFIG" != none ; then
20009 echo "$as_me:20009: checking for FreeType config" >&5
20010 echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
20011 echo "$as_me:20011: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
20012 echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
20013
20014 if test "$cf_cv_x_freetype_incs" = no ; then
20015 echo "$as_me:20015: checking for $FREETYPE_CONFIG cflags" >&5
20016 echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
20017 cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
20018 echo "$as_me:20018: result: $cf_cv_x_freetype_incs" >&5
20019 echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
20020 fi
20021
20022 if test "$cf_cv_x_freetype_libs" = no ; then
20023 echo "$as_me:20023: checking for $FREETYPE_CONFIG libs" >&5
20024 echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
20025 cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
20026 echo "$as_me:20026: result: $cf_cv_x_freetype_libs" >&5
20027 echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
20028 fi
20029 fi
20030
20031 if test "$cf_cv_x_freetype_incs" = no ; then
20032 cf_cv_x_freetype_incs=
20033 fi
20034
20035 if test "$cf_cv_x_freetype_libs" = no ; then
20036 cf_cv_x_freetype_libs=-lXft
20037 fi
20038
20039 echo "$as_me:20039: checking if we can link with FreeType libraries" >&5
20040 echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
20041
20042 cf_save_LIBS="$LIBS"
20043 cf_save_INCS="$CPPFLAGS"
20044
20045 cf_add_libs="$LIBS"
20046 # reverse order
20047 cf_add_0lib=
20048 for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20049 # filter duplicates
20050 for cf_add_1lib in $cf_add_0lib; do
20051 for cf_add_2lib in $cf_add_libs; do
20052 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20053 cf_add_1lib=
20054 break
20055 fi
20056 done
20057 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20058 done
20059 LIBS="$cf_add_libs"
20060
20061 CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
20062
20063 cat >"conftest.$ac_ext" <<_ACEOF
20064 #line 20064 "configure"
20065 #include "confdefs.h"
20066
20067 #include <X11/Xlib.h>
20068 #include <X11/extensions/Xrender.h>
20069 #include <X11/Xft/Xft.h>
20070 int
20071 main (void)
20072 {
20073
20074 XftPattern *pat = XftNameParse ("name"); (void)pat
20075 ;
20076 return 0;
20077 }
20078 _ACEOF
20079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20080 if { (eval echo "$as_me:20080: \"$ac_link\"") >&5
20081 (eval $ac_link) 2>&5
20082 ac_status=$?
20083 echo "$as_me:20083: \$? = $ac_status" >&5
20084 (exit "$ac_status"); } &&
20085 { ac_try='test -s "conftest$ac_exeext"'
20086 { (eval echo "$as_me:20086: \"$ac_try\"") >&5
20087 (eval $ac_try) 2>&5
20088 ac_status=$?
20089 echo "$as_me:20089: \$? = $ac_status" >&5
20090 (exit "$ac_status"); }; }; then
20091 cf_cv_found_freetype=yes
20092 else
20093 echo "$as_me: failed program was:" >&5
20094 cat "conftest.$ac_ext" >&5
20095 cf_cv_found_freetype=no
20096 fi
20097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20098 echo "$as_me:20098: result: $cf_cv_found_freetype" >&5
20099 echo "${ECHO_T}$cf_cv_found_freetype" >&6
20100
20101 LIBS="$cf_save_LIBS"
20102 CPPFLAGS="$cf_save_INCS"
20103
20104 if test "$cf_cv_found_freetype" = yes ; then
20105
20106 cf_add_libs="$LIBS"
20107 # reverse order
20108 cf_add_0lib=
20109 for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20110 # filter duplicates
20111 for cf_add_1lib in $cf_add_0lib; do
20112 for cf_add_2lib in $cf_add_libs; do
20113 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20114 cf_add_1lib=
20115 break
20116 fi
20117 done
20118 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20119 done
20120 LIBS="$cf_add_libs"
20121
20122 cf_fix_cppflags=no
20123 cf_new_cflags=
20124 cf_new_cppflags=
20125 cf_new_extra_cppflags=
20126
20127 for cf_add_cflags in $cf_cv_x_freetype_incs
20128 do
20129 case "$cf_fix_cppflags" in
20130 (no)
20131 case "$cf_add_cflags" in
20132 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20133 case "$cf_add_cflags" in
20134 (-D*)
20135 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20136
20137 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20138 && test -z "${cf_tst_cflags}" \
20139 && cf_fix_cppflags=yes
20140
20141 if test "$cf_fix_cppflags" = yes ; then
20142
20143 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20144 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20145
20146 continue
20147 elif test "${cf_tst_cflags}" = "\"'" ; then
20148
20149 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20150 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20151
20152 continue
20153 fi
20154 ;;
20155 esac
20156 case "$CPPFLAGS" in
20157 (*$cf_add_cflags)
20158 ;;
20159 (*)
20160 case "$cf_add_cflags" in
20161 (-D*)
20162 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20163
20164 CPPFLAGS=`echo "$CPPFLAGS" | \
20165 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20166 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20167
20168 ;;
20169 esac
20170
20171 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20172 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20173
20174 ;;
20175 esac
20176 ;;
20177 (*)
20178
20179 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20180 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20181
20182 ;;
20183 esac
20184 ;;
20185 (yes)
20186
20187 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20188 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20189
20190 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20191
20192 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20193 && test -z "${cf_tst_cflags}" \
20194 && cf_fix_cppflags=no
20195 ;;
20196 esac
20197 done
20198
20199 if test -n "$cf_new_cflags" ; then
20200
20201 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20202 CFLAGS="${CFLAGS}$cf_new_cflags"
20203
20204 fi
20205
20206 if test -n "$cf_new_cppflags" ; then
20207
20208 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20209 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20210
20211 fi
20212
20213 if test -n "$cf_new_extra_cppflags" ; then
20214
20215 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20216 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20217
20218 fi
20219
20220 cat >>confdefs.h <<\EOF
20221 #define XRENDERFONT 1
20222 EOF
20223
20224 for ac_func in \
20225 XftDrawCharSpec \
20226 XftDrawSetClip \
20227 XftDrawSetClipRectangles \
20228
20229 do
20230 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20231 echo "$as_me:20231: checking for $ac_func" >&5
20232 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20233 if eval "test \"\${$as_ac_var+set}\" = set"; then
20234 echo $ECHO_N "(cached) $ECHO_C" >&6
20235 else
20236 cat >"conftest.$ac_ext" <<_ACEOF
20237 #line 20237 "configure"
20238 #include "confdefs.h"
20239 #define $ac_func autoconf_temporary
20240 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20241 #undef $ac_func
20242
20243 #ifdef __cplusplus
20244 extern "C"
20245 #endif
20246
20247 /* We use char because int might match the return type of a gcc2
20248 builtin and then its argument prototype would still apply. */
20249 char $ac_func (void);
20250
20251 int
20252 main (void)
20253 {
20254
20255 /* The GNU C library defines stubs for functions which it implements
20256 to always fail with ENOSYS. Some functions are actually named
20257 something starting with __ and the normal name is an alias. */
20258 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20259 #error found stub for $ac_func
20260 #endif
20261
20262 return $ac_func ();
20263 ;
20264 return 0;
20265 }
20266 _ACEOF
20267 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20268 if { (eval echo "$as_me:20268: \"$ac_link\"") >&5
20269 (eval $ac_link) 2>&5
20270 ac_status=$?
20271 echo "$as_me:20271: \$? = $ac_status" >&5
20272 (exit "$ac_status"); } &&
20273 { ac_try='test -s "conftest$ac_exeext"'
20274 { (eval echo "$as_me:20274: \"$ac_try\"") >&5
20275 (eval $ac_try) 2>&5
20276 ac_status=$?
20277 echo "$as_me:20277: \$? = $ac_status" >&5
20278 (exit "$ac_status"); }; }; then
20279 eval "$as_ac_var=yes"
20280 else
20281 echo "$as_me: failed program was:" >&5
20282 cat "conftest.$ac_ext" >&5
20283 eval "$as_ac_var=no"
20284 fi
20285 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20286 fi
20287 echo "$as_me:20287: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20288 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20289 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20290 cat >>confdefs.h <<EOF
20291 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20292 EOF
20293
20294 fi
20295 done
20296
20297 else
20298 { echo "$as_me:20298: WARNING: No libraries found for FreeType" >&5
20299 echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
20300 CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
20301 fi
20302
20303 # FIXME: revisit this if needed
20304
20305 if test "$cf_cv_found_freetype" = yes ; then
20306 echo "$as_me:20306: checking for usable Xft/fontconfig package" >&5
20307 echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
20308 if test "${cf_cv_xft_compat+set}" = set; then
20309 echo $ECHO_N "(cached) $ECHO_C" >&6
20310 else
20311
20312 cat >"conftest.$ac_ext" <<_ACEOF
20313 #line 20313 "configure"
20314 #include "confdefs.h"
20315
20316 #include <X11/Xft/Xft.h>
20317
20318 int
20319 main (void)
20320 {
20321
20322 XftPattern *pat = 0;
20323 XftPatternBuild(pat,
20324 XFT_FAMILY, XftTypeString, "mono",
20325 (void *) 0);
20326
20327 ;
20328 return 0;
20329 }
20330 _ACEOF
20331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20332 if { (eval echo "$as_me:20332: \"$ac_link\"") >&5
20333 (eval $ac_link) 2>&5
20334 ac_status=$?
20335 echo "$as_me:20335: \$? = $ac_status" >&5
20336 (exit "$ac_status"); } &&
20337 { ac_try='test -s "conftest$ac_exeext"'
20338 { (eval echo "$as_me:20338: \"$ac_try\"") >&5
20339 (eval $ac_try) 2>&5
20340 ac_status=$?
20341 echo "$as_me:20341: \$? = $ac_status" >&5
20342 (exit "$ac_status"); }; }; then
20343 cf_cv_xft_compat=yes
20344 else
20345 echo "$as_me: failed program was:" >&5
20346 cat "conftest.$ac_ext" >&5
20347 cf_cv_xft_compat=no
20348 fi
20349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20350
20351 fi
20352 echo "$as_me:20352: result: $cf_cv_xft_compat" >&5
20353 echo "${ECHO_T}$cf_cv_xft_compat" >&6
20354
20355 if test "$cf_cv_xft_compat" = no
20356 then
20357 # workaround for broken ".pc" files used for Xft.
20358 case "$cf_cv_x_freetype_libs" in
20359 (*-lfontconfig*)
20360 ;;
20361 (*)
20362 test -n "$verbose" && echo " work around broken package" 1>&6
20363
20364 echo "${as_me:-configure}:20364: testing work around broken package ..." 1>&5
20365
20366 cf_save_fontconfig="$LIBS"
20367
20368 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "fontconfig"; then
20369 test -n "$verbose" && echo " found package fontconfig" 1>&6
20370
20371 echo "${as_me:-configure}:20371: testing found package fontconfig ..." 1>&5
20372
20373 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "fontconfig" 2>/dev/null`"
20374 cf_pkgconfig_libs="`$PKG_CONFIG --libs "fontconfig" 2>/dev/null`"
20375 test -n "$verbose" && echo " package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
20376
20377 echo "${as_me:-configure}:20377: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20378
20379 test -n "$verbose" && echo " package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
20380
20381 echo "${as_me:-configure}:20381: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
20382
20383 cf_fix_cppflags=no
20384 cf_new_cflags=
20385 cf_new_cppflags=
20386 cf_new_extra_cppflags=
20387
20388 for cf_add_cflags in $cf_pkgconfig_incs
20389 do
20390 case "$cf_fix_cppflags" in
20391 (no)
20392 case "$cf_add_cflags" in
20393 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20394 case "$cf_add_cflags" in
20395 (-D*)
20396 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20397
20398 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20399 && test -z "${cf_tst_cflags}" \
20400 && cf_fix_cppflags=yes
20401
20402 if test "$cf_fix_cppflags" = yes ; then
20403
20404 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20405 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20406
20407 continue
20408 elif test "${cf_tst_cflags}" = "\"'" ; then
20409
20410 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20411 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20412
20413 continue
20414 fi
20415 ;;
20416 esac
20417 case "$CPPFLAGS" in
20418 (*$cf_add_cflags)
20419 ;;
20420 (*)
20421 case "$cf_add_cflags" in
20422 (-D*)
20423 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20424
20425 CPPFLAGS=`echo "$CPPFLAGS" | \
20426 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20427 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20428
20429 ;;
20430 esac
20431
20432 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20433 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20434
20435 ;;
20436 esac
20437 ;;
20438 (*)
20439
20440 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20441 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20442
20443 ;;
20444 esac
20445 ;;
20446 (yes)
20447
20448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20450
20451 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20452
20453 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20454 && test -z "${cf_tst_cflags}" \
20455 && cf_fix_cppflags=no
20456 ;;
20457 esac
20458 done
20459
20460 if test -n "$cf_new_cflags" ; then
20461
20462 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20463 CFLAGS="${CFLAGS}$cf_new_cflags"
20464
20465 fi
20466
20467 if test -n "$cf_new_cppflags" ; then
20468
20469 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20470 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20471
20472 fi
20473
20474 if test -n "$cf_new_extra_cppflags" ; then
20475
20476 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20477 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20478
20479 fi
20480
20481 cf_add_libs="$LIBS"
20482 # reverse order
20483 cf_add_0lib=
20484 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20485 # filter duplicates
20486 for cf_add_1lib in $cf_add_0lib; do
20487 for cf_add_2lib in $cf_add_libs; do
20488 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20489 cf_add_1lib=
20490 break
20491 fi
20492 done
20493 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20494 done
20495 LIBS="$cf_add_libs"
20496
20497 cf_fix_cppflags=no
20498 cf_new_cflags=
20499 cf_new_cppflags=
20500 cf_new_extra_cppflags=
20501
20502 for cf_add_cflags in $cf_pkgconfig_incs
20503 do
20504 case "$cf_fix_cppflags" in
20505 (no)
20506 case "$cf_add_cflags" in
20507 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20508 case "$cf_add_cflags" in
20509 (-D*)
20510 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20511
20512 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20513 && test -z "${cf_tst_cflags}" \
20514 && cf_fix_cppflags=yes
20515
20516 if test "$cf_fix_cppflags" = yes ; then
20517
20518 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20519 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20520
20521 continue
20522 elif test "${cf_tst_cflags}" = "\"'" ; then
20523
20524 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20525 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20526
20527 continue
20528 fi
20529 ;;
20530 esac
20531 case "$CPPFLAGS" in
20532 (*$cf_add_cflags)
20533 ;;
20534 (*)
20535 case "$cf_add_cflags" in
20536 (-D*)
20537 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20538
20539 CPPFLAGS=`echo "$CPPFLAGS" | \
20540 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
20541 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
20542
20543 ;;
20544 esac
20545
20546 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20547 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20548
20549 ;;
20550 esac
20551 ;;
20552 (*)
20553
20554 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20555 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20556
20557 ;;
20558 esac
20559 ;;
20560 (yes)
20561
20562 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20563 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20564
20565 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20566
20567 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20568 && test -z "${cf_tst_cflags}" \
20569 && cf_fix_cppflags=no
20570 ;;
20571 esac
20572 done
20573
20574 if test -n "$cf_new_cflags" ; then
20575
20576 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20577 CFLAGS="${CFLAGS}$cf_new_cflags"
20578
20579 fi
20580
20581 if test -n "$cf_new_cppflags" ; then
20582
20583 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20584 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20585
20586 fi
20587
20588 if test -n "$cf_new_extra_cppflags" ; then
20589
20590 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20591 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20592
20593 fi
20594
20595 LIBS="$cf_save_fontconfig"
20596
20597 test -n "$verbose" && echo " ...before $LIBS" 1>&6
20598
20599 echo "${as_me:-configure}:20599: testing ...before $LIBS ..." 1>&5
20600
20601 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's% % %g'`
20602 test -n "$verbose" && echo " ...after $LIBS" 1>&6
20603
20604 echo "${as_me:-configure}:20604: testing ...after $LIBS ..." 1>&5
20605
20606 else
20607 cf_pkgconfig_incs=
20608 cf_pkgconfig_libs=
20609
20610 test -n "$verbose" && echo " ...before $LIBS" 1>&6
20611
20612 echo "${as_me:-configure}:20612: testing ...before $LIBS ..." 1>&5
20613
20614 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's% % %g'`
20615 test -n "$verbose" && echo " ...after $LIBS" 1>&6
20616
20617 echo "${as_me:-configure}:20617: testing ...after $LIBS ..." 1>&5
20618
20619 fi
20620
20621 ;;
20622 esac
20623 fi
20624 fi
20625
20626 else
20627 CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
20628 fi
20629
20630 echo "$as_me:20630: checking if you want support for HP-style function keys" >&5
20631 echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
20632
20633 # Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
20634 if test "${enable_hp_fkeys+set}" = set; then
20635 enableval="$enable_hp_fkeys"
20636 test "$enableval" != yes && enableval=no
20637 if test "$enableval" != "no" ; then
20638 enable_hp_fkeys=yes
20639 else
20640 enable_hp_fkeys=no
20641 fi
20642 else
20643 enableval=no
20644 enable_hp_fkeys=no
20645
20646 fi;
20647 echo "$as_me:20647: result: $enable_hp_fkeys" >&5
20648 echo "${ECHO_T}$enable_hp_fkeys" >&6
20649 if test "$enable_hp_fkeys" = yes ; then
20650
20651 cat >>confdefs.h <<\EOF
20652 #define OPT_HP_FUNC_KEYS 1
20653 EOF
20654
20655 fi
20656
20657 echo "$as_me:20657: checking if you want support for SCO-style function keys" >&5
20658 echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
20659
20660 # Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
20661 if test "${enable_sco_fkeys+set}" = set; then
20662 enableval="$enable_sco_fkeys"
20663 test "$enableval" != yes && enableval=no
20664 if test "$enableval" != "no" ; then
20665 enable_sco_fkeys=yes
20666 else
20667 enable_sco_fkeys=no
20668 fi
20669 else
20670 enableval=no
20671 enable_sco_fkeys=no
20672
20673 fi;
20674 echo "$as_me:20674: result: $enable_sco_fkeys" >&5
20675 echo "${ECHO_T}$enable_sco_fkeys" >&6
20676 if test "$enable_sco_fkeys" = yes ; then
20677
20678 cat >>confdefs.h <<\EOF
20679 #define OPT_SCO_FUNC_KEYS 1
20680 EOF
20681
20682 fi
20683
20684 echo "$as_me:20684: checking if you want support for Sun-style function keys" >&5
20685 echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
20686
20687 # Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
20688 if test "${enable_sun_fkeys+set}" = set; then
20689 enableval="$enable_sun_fkeys"
20690 test "$enableval" != no && enableval=yes
20691 if test "$enableval" != "yes" ; then
20692 enable_sun_fkeys=no
20693 else
20694 enable_sun_fkeys=yes
20695 fi
20696 else
20697 enableval=yes
20698 enable_sun_fkeys=yes
20699
20700 fi;
20701 echo "$as_me:20701: result: $enable_sun_fkeys" >&5
20702 echo "${ECHO_T}$enable_sun_fkeys" >&6
20703 if test "$enable_sun_fkeys" = no ; then
20704
20705 cat >>confdefs.h <<\EOF
20706 #define OPT_SUN_FUNC_KEYS 0
20707 EOF
20708
20709 fi
20710
20711 echo "$as_me:20711: checking if you want saved-lines stored as a FIFO" >&5
20712 echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
20713
20714 # Check whether --enable-fifo-lines or --disable-fifo-lines was given.
20715 if test "${enable_fifo_lines+set}" = set; then
20716 enableval="$enable_fifo_lines"
20717 test "$enableval" != no && enableval=yes
20718 if test "$enableval" != "yes" ; then
20719 enable_fifo_lines=no
20720 else
20721 enable_fifo_lines=yes
20722 fi
20723 else
20724 enableval=yes
20725 enable_fifo_lines=yes
20726
20727 fi;
20728 echo "$as_me:20728: result: $enable_fifo_lines" >&5
20729 echo "${ECHO_T}$enable_fifo_lines" >&6
20730 if test "$enable_fifo_lines" != yes ; then
20731 { echo "$as_me:20731: WARNING: this option has been deprecated" >&5
20732 echo "$as_me: WARNING: this option has been deprecated" >&2;}
20733 fi
20734
20735 echo "$as_me:20735: checking if you want support for internationalization" >&5
20736 echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
20737
20738 # Check whether --enable-i18n or --disable-i18n was given.
20739 if test "${enable_i18n+set}" = set; then
20740 enableval="$enable_i18n"
20741 test "$enableval" != no && enableval=yes
20742 if test "$enableval" != "yes" ; then
20743 enable_i18n=no
20744 else
20745 enable_i18n=yes
20746 fi
20747 else
20748 enableval=yes
20749 enable_i18n=yes
20750
20751 fi;
20752 echo "$as_me:20752: result: $enable_i18n" >&5
20753 echo "${ECHO_T}$enable_i18n" >&6
20754 if test "$enable_i18n" = no ; then
20755
20756 cat >>confdefs.h <<\EOF
20757 #define OPT_I18N_SUPPORT 0
20758 EOF
20759
20760 fi
20761
20762 echo "$as_me:20762: checking if you want support for initial-erase setup" >&5
20763 echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
20764
20765 # Check whether --enable-initial-erase or --disable-initial-erase was given.
20766 if test "${enable_initial_erase+set}" = set; then
20767 enableval="$enable_initial_erase"
20768 test "$enableval" != no && enableval=yes
20769 if test "$enableval" != "yes" ; then
20770 enable_ie=no
20771 else
20772 enable_ie=yes
20773 fi
20774 else
20775 enableval=yes
20776 enable_ie=yes
20777
20778 fi;
20779 echo "$as_me:20779: result: $enable_ie" >&5
20780 echo "${ECHO_T}$enable_ie" >&6
20781 if test "$enable_ie" = no ; then
20782
20783 cat >>confdefs.h <<\EOF
20784 #define OPT_INITIAL_ERASE 0
20785 EOF
20786
20787 fi
20788
20789 echo "$as_me:20789: checking if you want support for input-method" >&5
20790 echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
20791
20792 # Check whether --enable-input-method or --disable-input-method was given.
20793 if test "${enable_input_method+set}" = set; then
20794 enableval="$enable_input_method"
20795 test "$enableval" != no && enableval=yes
20796 if test "$enableval" != "yes" ; then
20797 enable_ximp=no
20798 else
20799 enable_ximp=$enable_i18n
20800 fi
20801 else
20802 enableval=yes
20803 enable_ximp=$enable_i18n
20804
20805 fi;
20806 echo "$as_me:20806: result: $enable_ximp" >&5
20807 echo "${ECHO_T}$enable_ximp" >&6
20808
20809 echo "$as_me:20809: checking if X libraries support input-method" >&5
20810 echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
20811 if test "${cf_cv_input_method+set}" = set; then
20812 echo $ECHO_N "(cached) $ECHO_C" >&6
20813 else
20814
20815 cat >"conftest.$ac_ext" <<_ACEOF
20816 #line 20816 "configure"
20817 #include "confdefs.h"
20818
20819 #include <X11/IntrinsicP.h>
20820 #include <X11/Xatom.h>
20821 #include <X11/Xutil.h>
20822 #include <X11/Xmu/Atoms.h>
20823 #include <X11/Xmu/Converters.h>
20824 #include <X11/Xaw/XawImP.h>
20825
20826 int
20827 main (void)
20828 {
20829
20830 {
20831 XIM xim;
20832 XIMStyles *xim_styles = 0;
20833 XIMStyle input_style;
20834 Widget w = XtCreateWidget("none", (WidgetClass)0, None, (ArgList)0, 0);
20835
20836 XSetLocaleModifiers("@im=none");
20837 xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
20838 XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
20839 XCloseIM(xim);
20840 input_style = (XIMPreeditNothing | XIMStatusNothing);
20841 (void)xim_styles;
20842 (void)input_style;
20843 }
20844
20845 ;
20846 return 0;
20847 }
20848 _ACEOF
20849 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20850 if { (eval echo "$as_me:20850: \"$ac_link\"") >&5
20851 (eval $ac_link) 2>&5
20852 ac_status=$?
20853 echo "$as_me:20853: \$? = $ac_status" >&5
20854 (exit "$ac_status"); } &&
20855 { ac_try='test -s "conftest$ac_exeext"'
20856 { (eval echo "$as_me:20856: \"$ac_try\"") >&5
20857 (eval $ac_try) 2>&5
20858 ac_status=$?
20859 echo "$as_me:20859: \$? = $ac_status" >&5
20860 (exit "$ac_status"); }; }; then
20861 cf_cv_input_method=yes
20862 else
20863 echo "$as_me: failed program was:" >&5
20864 cat "conftest.$ac_ext" >&5
20865 cf_cv_input_method=no
20866 fi
20867 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20868 fi
20869 echo "$as_me:20869: result: $cf_cv_input_method" >&5
20870 echo "${ECHO_T}$cf_cv_input_method" >&6
20871
20872 test "$cf_cv_input_method" = no && enable_ximp=no
20873 if test "$enable_ximp" != no ; then
20874 if test "$enable_i18n" = no ; then
20875 { echo "$as_me:20875: WARNING: input-method relies upon internationalization" >&5
20876 echo "$as_me: WARNING: input-method relies upon internationalization" >&2;}
20877 enable_ximp=no
20878 fi
20879 fi
20880 if test "$enable_ximp" = no ; then
20881
20882 cat >>confdefs.h <<\EOF
20883 #define OPT_INPUT_METHOD 0
20884 EOF
20885
20886 fi
20887
20888 echo "$as_me:20888: checking if you want support for load-vt-fonts" >&5
20889 echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
20890
20891 # Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
20892 if test "${enable_load_vt_fonts+set}" = set; then
20893 enableval="$enable_load_vt_fonts"
20894 test "$enableval" != yes && enableval=no
20895 if test "$enableval" != "no" ; then
20896 enable_load_vt_fonts=yes
20897 else
20898 enable_load_vt_fonts=no
20899 fi
20900 else
20901 enableval=no
20902 enable_load_vt_fonts=no
20903
20904 fi;
20905 echo "$as_me:20905: result: $enable_load_vt_fonts" >&5
20906 echo "${ECHO_T}$enable_load_vt_fonts" >&6
20907 if test "$enable_load_vt_fonts" = yes ; then
20908
20909 cat >>confdefs.h <<\EOF
20910 #define OPT_LOAD_VTFONTS 1
20911 EOF
20912
20913 fi
20914
20915 echo "$as_me:20915: checking if you want support for logging" >&5
20916 echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
20917
20918 # Check whether --enable-logging or --disable-logging was given.
20919 if test "${enable_logging+set}" = set; then
20920 enableval="$enable_logging"
20921 test "$enableval" != yes && enableval=no
20922 if test "$enableval" != "no" ; then
20923 enable_logging=yes
20924 else
20925 enable_logging=no
20926 fi
20927 else
20928 enableval=no
20929 enable_logging=no
20930
20931 fi;
20932 echo "$as_me:20932: result: $enable_logging" >&5
20933 echo "${ECHO_T}$enable_logging" >&6
20934 if test "$enable_logging" = yes ; then
20935
20936 cat >>confdefs.h <<\EOF
20937 #define ALLOWLOGGING 1
20938 EOF
20939
20940 echo "$as_me:20940: checking if you want to allow logging via a pipe" >&5
20941 echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
20942
20943 # Check whether --enable-logfile-exec or --disable-logfile-exec was given.
20944 if test "${enable_logfile_exec+set}" = set; then
20945 enableval="$enable_logfile_exec"
20946 test "$enableval" != yes && enableval=no
20947 if test "$enableval" != "no" ; then
20948 enable_log_exec=yes
20949 else
20950 enable_log_exec=no
20951 fi
20952 else
20953 enableval=no
20954 enable_log_exec=no
20955
20956 fi;
20957 echo "$as_me:20957: result: $enable_log_exec" >&5
20958 echo "${ECHO_T}$enable_log_exec" >&6
20959 if test "$enable_log_exec" = yes ; then
20960
20961 cat >>confdefs.h <<\EOF
20962 #define ALLOWLOGFILEEXEC 1
20963 EOF
20964
20965 fi
20966 fi
20967
20968 echo "$as_me:20968: checking if you want support for iconify/maximize translations" >&5
20969 echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
20970
20971 # Check whether --enable-maximize or --disable-maximize was given.
20972 if test "${enable_maximize+set}" = set; then
20973 enableval="$enable_maximize"
20974 test "$enableval" != no && enableval=yes
20975 if test "$enableval" != "yes" ; then
20976 enable_maximize=no
20977 else
20978 enable_maximize=yes
20979 fi
20980 else
20981 enableval=yes
20982 enable_maximize=yes
20983
20984 fi;
20985 echo "$as_me:20985: result: $enable_maximize" >&5
20986 echo "${ECHO_T}$enable_maximize" >&6
20987 test "$enable_maximize" = no &&
20988 cat >>confdefs.h <<\EOF
20989 #define OPT_MAXIMIZE 0
20990 EOF
20991
20992 echo "$as_me:20992: checking if you want NumLock to override keyboard tables" >&5
20993 echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
20994
20995 # Check whether --enable-num-lock or --disable-num-lock was given.
20996 if test "${enable_num_lock+set}" = set; then
20997 enableval="$enable_num_lock"
20998 test "$enableval" != no && enableval=yes
20999 if test "$enableval" != "yes" ; then
21000 enable_numlock=no
21001 else
21002 enable_numlock=yes
21003 fi
21004 else
21005 enableval=yes
21006 enable_numlock=yes
21007
21008 fi;
21009 echo "$as_me:21009: result: $enable_numlock" >&5
21010 echo "${ECHO_T}$enable_numlock" >&6
21011 test "$enable_numlock" = no &&
21012 cat >>confdefs.h <<\EOF
21013 #define OPT_NUM_LOCK 0
21014 EOF
21015
21016 echo "$as_me:21016: checking if you want support for get/set of base64 selection data" >&5
21017 echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
21018
21019 # Check whether --enable-paste64 or --disable-paste64 was given.
21020 if test "${enable_paste64+set}" = set; then
21021 enableval="$enable_paste64"
21022 test "$enableval" != no && enableval=yes
21023 if test "$enableval" != "yes" ; then
21024 enable_paste64=no
21025 else
21026 enable_paste64=yes
21027 fi
21028 else
21029 enableval=yes
21030 enable_paste64=yes
21031
21032 fi;
21033 echo "$as_me:21033: result: $enable_paste64" >&5
21034 echo "${ECHO_T}$enable_paste64" >&6
21035 if test "$enable_paste64" = yes ; then
21036
21037 cat >>confdefs.h <<\EOF
21038 #define OPT_PASTE64 1
21039 EOF
21040
21041 else
21042
21043 cat >>confdefs.h <<\EOF
21044 #define OPT_PASTE64 0
21045 EOF
21046
21047 fi
21048
21049 echo "$as_me:21049: checking if you want support for pty-handshaking" >&5
21050 echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
21051
21052 # Check whether --enable-pty-handshake or --disable-pty-handshake was given.
21053 if test "${enable_pty_handshake+set}" = set; then
21054 enableval="$enable_pty_handshake"
21055 test "$enableval" != no && enableval=yes
21056 if test "$enableval" != "yes" ; then
21057 enable_pty_handshake=no
21058 else
21059 enable_pty_handshake=yes
21060 fi
21061 else
21062 enableval=yes
21063 enable_pty_handshake=yes
21064
21065 fi;
21066 echo "$as_me:21066: result: $enable_pty_handshake" >&5
21067 echo "${ECHO_T}$enable_pty_handshake" >&6
21068 if test "$enable_pty_handshake" = yes ; then
21069
21070 cat >>confdefs.h <<\EOF
21071 #define OPT_PTY_HANDSHAKE 1
21072 EOF
21073
21074 else
21075
21076 cat >>confdefs.h <<\EOF
21077 #define OPT_PTY_HANDSHAKE 0
21078 EOF
21079
21080 fi
21081
21082 echo "$as_me:21082: checking if you want support for mouse in readline applications" >&5
21083 echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
21084
21085 # Check whether --enable-readline-mouse or --disable-readline-mouse was given.
21086 if test "${enable_readline_mouse+set}" = set; then
21087 enableval="$enable_readline_mouse"
21088 test "$enableval" != no && enableval=yes
21089 if test "$enableval" != "yes" ; then
21090 enable_readline_mouse=no
21091 else
21092 enable_readline_mouse=yes
21093 fi
21094 else
21095 enableval=yes
21096 enable_readline_mouse=yes
21097
21098 fi;
21099 echo "$as_me:21099: result: $enable_readline_mouse" >&5
21100 echo "${ECHO_T}$enable_readline_mouse" >&6
21101 if test "$enable_readline_mouse" = yes ; then
21102
21103 cat >>confdefs.h <<\EOF
21104 #define OPT_READLINE 1
21105 EOF
21106
21107 fi
21108
21109 echo "$as_me:21109: checking if you want support for regular-expression selections" >&5
21110 echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
21111
21112 # Check whether --enable-regex or --disable-regex was given.
21113 if test "${enable_regex+set}" = set; then
21114 enableval="$enable_regex"
21115 test "$enableval" != no && enableval=yes
21116 if test "$enableval" != "yes" ; then
21117 enable_regex=no
21118 else
21119 enable_regex=yes
21120 fi
21121 else
21122 enableval=yes
21123 enable_regex=yes
21124
21125 fi;
21126 echo "$as_me:21126: result: $enable_regex" >&5
21127 echo "${ECHO_T}$enable_regex" >&6
21128 if test "$enable_regex" = yes ; then
21129
21130 echo "$as_me:21130: checking if you want to use PCRE2 for regular-expressions" >&5
21131 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
21132
21133 # Check whether --with-pcre2 or --without-pcre2 was given.
21134 if test "${with_pcre2+set}" = set; then
21135 withval="$with_pcre2"
21136
21137 fi;
21138 test -z "$with_pcre2" && with_pcre2=no
21139 echo "$as_me:21139: result: $with_pcre2" >&5
21140 echo "${ECHO_T}$with_pcre2" >&6
21141
21142 if test "x$with_pcre2" != xno ; then
21143 cf_with_pcre2_ok=no
21144 for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
21145 do
21146
21147 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
21148 test -n "$verbose" && echo " found package $cf_with_pcre2" 1>&6
21149
21150 echo "${as_me:-configure}:21150: testing found package $cf_with_pcre2 ..." 1>&5
21151
21152 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
21153 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_with_pcre2" 2>/dev/null`"
21154 test -n "$verbose" && echo " package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
21155
21156 echo "${as_me:-configure}:21156: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21157
21158 test -n "$verbose" && echo " package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
21159
21160 echo "${as_me:-configure}:21160: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
21161
21162 cf_fix_cppflags=no
21163 cf_new_cflags=
21164 cf_new_cppflags=
21165 cf_new_extra_cppflags=
21166
21167 for cf_add_cflags in $cf_pkgconfig_incs
21168 do
21169 case "$cf_fix_cppflags" in
21170 (no)
21171 case "$cf_add_cflags" in
21172 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21173 case "$cf_add_cflags" in
21174 (-D*)
21175 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21176
21177 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21178 && test -z "${cf_tst_cflags}" \
21179 && cf_fix_cppflags=yes
21180
21181 if test "$cf_fix_cppflags" = yes ; then
21182
21183 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21184 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21185
21186 continue
21187 elif test "${cf_tst_cflags}" = "\"'" ; then
21188
21189 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21190 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21191
21192 continue
21193 fi
21194 ;;
21195 esac
21196 case "$CPPFLAGS" in
21197 (*$cf_add_cflags)
21198 ;;
21199 (*)
21200 case "$cf_add_cflags" in
21201 (-D*)
21202 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21203
21204 CPPFLAGS=`echo "$CPPFLAGS" | \
21205 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21206 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21207
21208 ;;
21209 esac
21210
21211 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21212 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21213
21214 ;;
21215 esac
21216 ;;
21217 (*)
21218
21219 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21220 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21221
21222 ;;
21223 esac
21224 ;;
21225 (yes)
21226
21227 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21228 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21229
21230 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21231
21232 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21233 && test -z "${cf_tst_cflags}" \
21234 && cf_fix_cppflags=no
21235 ;;
21236 esac
21237 done
21238
21239 if test -n "$cf_new_cflags" ; then
21240
21241 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21242 CFLAGS="${CFLAGS}$cf_new_cflags"
21243
21244 fi
21245
21246 if test -n "$cf_new_cppflags" ; then
21247
21248 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21249 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21250
21251 fi
21252
21253 if test -n "$cf_new_extra_cppflags" ; then
21254
21255 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21256 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21257
21258 fi
21259
21260 cf_add_libs="$LIBS"
21261 # reverse order
21262 cf_add_0lib=
21263 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21264 # filter duplicates
21265 for cf_add_1lib in $cf_add_0lib; do
21266 for cf_add_2lib in $cf_add_libs; do
21267 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21268 cf_add_1lib=
21269 break
21270 fi
21271 done
21272 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21273 done
21274 LIBS="$cf_add_libs"
21275
21276 cf_with_pcre2_ok=yes; break
21277 else
21278 cf_pkgconfig_incs=
21279 cf_pkgconfig_libs=
21280 :
21281 fi
21282
21283 done
21284 cf_with_pcre2_ok=yes || { { echo "$as_me:21284: error: Cannot find PCRE2 library" >&5
21285 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
21286 { (exit 1); exit 1; }; }
21287
21288 cat >>confdefs.h <<\EOF
21289 #define HAVE_LIB_PCRE2 1
21290 EOF
21291
21292 # if pkgconfig gave no results, look for the libraries directly
21293 case "$LIBS" in
21294 (*pcre2-posix*|*pcreposix*)
21295 ;;
21296 (*)
21297 echo "$as_me:21297: checking for regcomp in -lpcre2-posix" >&5
21298 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
21299 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
21300 echo $ECHO_N "(cached) $ECHO_C" >&6
21301 else
21302 ac_check_lib_save_LIBS=$LIBS
21303 LIBS="-lpcre2-posix $LIBS"
21304 cat >"conftest.$ac_ext" <<_ACEOF
21305 #line 21305 "configure"
21306 #include "confdefs.h"
21307
21308 /* Override any gcc2 internal prototype to avoid an error. */
21309 #ifdef __cplusplus
21310 extern "C"
21311 #endif
21312 /* We use char because int might match the return type of a gcc2
21313 builtin and then its argument prototype would still apply. */
21314 char regcomp (void);
21315 int
21316 main (void)
21317 {
21318 regcomp ();
21319 ;
21320 return 0;
21321 }
21322 _ACEOF
21323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21324 if { (eval echo "$as_me:21324: \"$ac_link\"") >&5
21325 (eval $ac_link) 2>&5
21326 ac_status=$?
21327 echo "$as_me:21327: \$? = $ac_status" >&5
21328 (exit "$ac_status"); } &&
21329 { ac_try='test -s "conftest$ac_exeext"'
21330 { (eval echo "$as_me:21330: \"$ac_try\"") >&5
21331 (eval $ac_try) 2>&5
21332 ac_status=$?
21333 echo "$as_me:21333: \$? = $ac_status" >&5
21334 (exit "$ac_status"); }; }; then
21335 ac_cv_lib_pcre2_posix_regcomp=yes
21336 else
21337 echo "$as_me: failed program was:" >&5
21338 cat "conftest.$ac_ext" >&5
21339 ac_cv_lib_pcre2_posix_regcomp=no
21340 fi
21341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21342 LIBS=$ac_check_lib_save_LIBS
21343 fi
21344 echo "$as_me:21344: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
21345 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
21346 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
21347
21348 cf_add_libs="$LIBS"
21349 # reverse order
21350 cf_add_0lib=
21351 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21352 # filter duplicates
21353 for cf_add_1lib in $cf_add_0lib; do
21354 for cf_add_2lib in $cf_add_libs; do
21355 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21356 cf_add_1lib=
21357 break
21358 fi
21359 done
21360 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21361 done
21362 LIBS="$cf_add_libs"
21363
21364 else
21365 echo "$as_me:21365: checking for regcomp in -lpcreposix" >&5
21366 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
21367 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
21368 echo $ECHO_N "(cached) $ECHO_C" >&6
21369 else
21370 ac_check_lib_save_LIBS=$LIBS
21371 LIBS="-lpcreposix $LIBS"
21372 cat >"conftest.$ac_ext" <<_ACEOF
21373 #line 21373 "configure"
21374 #include "confdefs.h"
21375
21376 /* Override any gcc2 internal prototype to avoid an error. */
21377 #ifdef __cplusplus
21378 extern "C"
21379 #endif
21380 /* We use char because int might match the return type of a gcc2
21381 builtin and then its argument prototype would still apply. */
21382 char regcomp (void);
21383 int
21384 main (void)
21385 {
21386 regcomp ();
21387 ;
21388 return 0;
21389 }
21390 _ACEOF
21391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21392 if { (eval echo "$as_me:21392: \"$ac_link\"") >&5
21393 (eval $ac_link) 2>&5
21394 ac_status=$?
21395 echo "$as_me:21395: \$? = $ac_status" >&5
21396 (exit "$ac_status"); } &&
21397 { ac_try='test -s "conftest$ac_exeext"'
21398 { (eval echo "$as_me:21398: \"$ac_try\"") >&5
21399 (eval $ac_try) 2>&5
21400 ac_status=$?
21401 echo "$as_me:21401: \$? = $ac_status" >&5
21402 (exit "$ac_status"); }; }; then
21403 ac_cv_lib_pcreposix_regcomp=yes
21404 else
21405 echo "$as_me: failed program was:" >&5
21406 cat "conftest.$ac_ext" >&5
21407 ac_cv_lib_pcreposix_regcomp=no
21408 fi
21409 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21410 LIBS=$ac_check_lib_save_LIBS
21411 fi
21412 echo "$as_me:21412: result: $ac_cv_lib_pcreposix_regcomp" >&5
21413 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
21414 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
21415
21416 cf_add_libs="$LIBS"
21417 # reverse order
21418 cf_add_0lib=
21419 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21420 # filter duplicates
21421 for cf_add_1lib in $cf_add_0lib; do
21422 for cf_add_2lib in $cf_add_libs; do
21423 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21424 cf_add_1lib=
21425 break
21426 fi
21427 done
21428 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21429 done
21430 LIBS="$cf_add_libs"
21431
21432 else
21433 { { echo "$as_me:21433: error: Cannot find PCRE2 POSIX library" >&5
21434 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
21435 { (exit 1); exit 1; }; }
21436 fi
21437
21438 fi
21439
21440 ;;
21441 esac
21442
21443 # either way, check for the library header files
21444
21445 for ac_header in pcre2posix.h pcreposix.h
21446 do
21447 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21448 echo "$as_me:21448: checking for $ac_header" >&5
21449 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21450 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21451 echo $ECHO_N "(cached) $ECHO_C" >&6
21452 else
21453 cat >"conftest.$ac_ext" <<_ACEOF
21454 #line 21454 "configure"
21455 #include "confdefs.h"
21456 #include <$ac_header>
21457 _ACEOF
21458 if { (eval echo "$as_me:21458: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21459 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21460 ac_status=$?
21461 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21462 rm -f conftest.er1
21463 cat conftest.err >&5
21464 echo "$as_me:21464: \$? = $ac_status" >&5
21465 (exit "$ac_status"); } >/dev/null; then
21466 if test -s conftest.err; then
21467 ac_cpp_err=$ac_c_preproc_warn_flag
21468 else
21469 ac_cpp_err=
21470 fi
21471 else
21472 ac_cpp_err=yes
21473 fi
21474 if test -z "$ac_cpp_err"; then
21475 eval "$as_ac_Header=yes"
21476 else
21477 echo "$as_me: failed program was:" >&5
21478 cat "conftest.$ac_ext" >&5
21479 eval "$as_ac_Header=no"
21480 fi
21481 rm -f conftest.err "conftest.$ac_ext"
21482 fi
21483 echo "$as_me:21483: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21484 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21485 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21486 cat >>confdefs.h <<EOF
21487 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21488 EOF
21489
21490 fi
21491 done
21492
21493 for ac_func in PCRE2regcomp
21494 do
21495 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21496 echo "$as_me:21496: checking for $ac_func" >&5
21497 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21498 if eval "test \"\${$as_ac_var+set}\" = set"; then
21499 echo $ECHO_N "(cached) $ECHO_C" >&6
21500 else
21501 cat >"conftest.$ac_ext" <<_ACEOF
21502 #line 21502 "configure"
21503 #include "confdefs.h"
21504 #define $ac_func autoconf_temporary
21505 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21506 #undef $ac_func
21507
21508 #ifdef __cplusplus
21509 extern "C"
21510 #endif
21511
21512 /* We use char because int might match the return type of a gcc2
21513 builtin and then its argument prototype would still apply. */
21514 char $ac_func (void);
21515
21516 int
21517 main (void)
21518 {
21519
21520 /* The GNU C library defines stubs for functions which it implements
21521 to always fail with ENOSYS. Some functions are actually named
21522 something starting with __ and the normal name is an alias. */
21523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21524 #error found stub for $ac_func
21525 #endif
21526
21527 return $ac_func ();
21528 ;
21529 return 0;
21530 }
21531 _ACEOF
21532 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21533 if { (eval echo "$as_me:21533: \"$ac_link\"") >&5
21534 (eval $ac_link) 2>&5
21535 ac_status=$?
21536 echo "$as_me:21536: \$? = $ac_status" >&5
21537 (exit "$ac_status"); } &&
21538 { ac_try='test -s "conftest$ac_exeext"'
21539 { (eval echo "$as_me:21539: \"$ac_try\"") >&5
21540 (eval $ac_try) 2>&5
21541 ac_status=$?
21542 echo "$as_me:21542: \$? = $ac_status" >&5
21543 (exit "$ac_status"); }; }; then
21544 eval "$as_ac_var=yes"
21545 else
21546 echo "$as_me: failed program was:" >&5
21547 cat "conftest.$ac_ext" >&5
21548 eval "$as_ac_var=no"
21549 fi
21550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21551 fi
21552 echo "$as_me:21552: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21553 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21554 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21555 cat >>confdefs.h <<EOF
21556 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21557 EOF
21558
21559 fi
21560 done
21561
21562 fi
21563
21564 if test "$with_pcre2" = no ; then
21565
21566 echo "$as_me:21566: checking if you want to use PCRE for regular-expressions" >&5
21567 echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
21568
21569 # Check whether --with-pcre or --without-pcre was given.
21570 if test "${with_pcre+set}" = set; then
21571 withval="$with_pcre"
21572
21573 fi;
21574 test -z "$with_pcre" && with_pcre=no
21575 echo "$as_me:21575: result: $with_pcre" >&5
21576 echo "${ECHO_T}$with_pcre" >&6
21577
21578 if test "$with_pcre" != no ; then
21579
21580 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
21581 test -n "$verbose" && echo " found package libpcre" 1>&6
21582
21583 echo "${as_me:-configure}:21583: testing found package libpcre ..." 1>&5
21584
21585 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
21586 cf_pkgconfig_libs="`$PKG_CONFIG --libs "libpcre" 2>/dev/null`"
21587 test -n "$verbose" && echo " package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
21588
21589 echo "${as_me:-configure}:21589: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
21590
21591 test -n "$verbose" && echo " package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
21592
21593 echo "${as_me:-configure}:21593: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
21594
21595 cf_fix_cppflags=no
21596 cf_new_cflags=
21597 cf_new_cppflags=
21598 cf_new_extra_cppflags=
21599
21600 for cf_add_cflags in $cf_pkgconfig_incs
21601 do
21602 case "$cf_fix_cppflags" in
21603 (no)
21604 case "$cf_add_cflags" in
21605 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21606 case "$cf_add_cflags" in
21607 (-D*)
21608 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21609
21610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21611 && test -z "${cf_tst_cflags}" \
21612 && cf_fix_cppflags=yes
21613
21614 if test "$cf_fix_cppflags" = yes ; then
21615
21616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21618
21619 continue
21620 elif test "${cf_tst_cflags}" = "\"'" ; then
21621
21622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21624
21625 continue
21626 fi
21627 ;;
21628 esac
21629 case "$CPPFLAGS" in
21630 (*$cf_add_cflags)
21631 ;;
21632 (*)
21633 case "$cf_add_cflags" in
21634 (-D*)
21635 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21636
21637 CPPFLAGS=`echo "$CPPFLAGS" | \
21638 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21639 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21640
21641 ;;
21642 esac
21643
21644 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21645 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21646
21647 ;;
21648 esac
21649 ;;
21650 (*)
21651
21652 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21653 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21654
21655 ;;
21656 esac
21657 ;;
21658 (yes)
21659
21660 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21661 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21662
21663 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21664
21665 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21666 && test -z "${cf_tst_cflags}" \
21667 && cf_fix_cppflags=no
21668 ;;
21669 esac
21670 done
21671
21672 if test -n "$cf_new_cflags" ; then
21673
21674 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21675 CFLAGS="${CFLAGS}$cf_new_cflags"
21676
21677 fi
21678
21679 if test -n "$cf_new_cppflags" ; then
21680
21681 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21682 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21683
21684 fi
21685
21686 if test -n "$cf_new_extra_cppflags" ; then
21687
21688 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21689 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21690
21691 fi
21692
21693 cf_add_libs="$LIBS"
21694 # reverse order
21695 cf_add_0lib=
21696 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21697 # filter duplicates
21698 for cf_add_1lib in $cf_add_0lib; do
21699 for cf_add_2lib in $cf_add_libs; do
21700 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21701 cf_add_1lib=
21702 break
21703 fi
21704 done
21705 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21706 done
21707 LIBS="$cf_add_libs"
21708
21709 :
21710 else
21711 cf_pkgconfig_incs=
21712 cf_pkgconfig_libs=
21713
21714 echo "$as_me:21714: checking for pcre_compile in -lpcre" >&5
21715 echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
21716 if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
21717 echo $ECHO_N "(cached) $ECHO_C" >&6
21718 else
21719 ac_check_lib_save_LIBS=$LIBS
21720 LIBS="-lpcre $LIBS"
21721 cat >"conftest.$ac_ext" <<_ACEOF
21722 #line 21722 "configure"
21723 #include "confdefs.h"
21724
21725 /* Override any gcc2 internal prototype to avoid an error. */
21726 #ifdef __cplusplus
21727 extern "C"
21728 #endif
21729 /* We use char because int might match the return type of a gcc2
21730 builtin and then its argument prototype would still apply. */
21731 char pcre_compile (void);
21732 int
21733 main (void)
21734 {
21735 pcre_compile ();
21736 ;
21737 return 0;
21738 }
21739 _ACEOF
21740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21741 if { (eval echo "$as_me:21741: \"$ac_link\"") >&5
21742 (eval $ac_link) 2>&5
21743 ac_status=$?
21744 echo "$as_me:21744: \$? = $ac_status" >&5
21745 (exit "$ac_status"); } &&
21746 { ac_try='test -s "conftest$ac_exeext"'
21747 { (eval echo "$as_me:21747: \"$ac_try\"") >&5
21748 (eval $ac_try) 2>&5
21749 ac_status=$?
21750 echo "$as_me:21750: \$? = $ac_status" >&5
21751 (exit "$ac_status"); }; }; then
21752 ac_cv_lib_pcre_pcre_compile=yes
21753 else
21754 echo "$as_me: failed program was:" >&5
21755 cat "conftest.$ac_ext" >&5
21756 ac_cv_lib_pcre_pcre_compile=no
21757 fi
21758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21759 LIBS=$ac_check_lib_save_LIBS
21760 fi
21761 echo "$as_me:21761: result: $ac_cv_lib_pcre_pcre_compile" >&5
21762 echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
21763 if test "$ac_cv_lib_pcre_pcre_compile" = yes; then
21764 cat >>confdefs.h <<EOF
21765 #define HAVE_LIBPCRE 1
21766 EOF
21767
21768 LIBS="-lpcre $LIBS"
21769
21770 else
21771 { { echo "$as_me:21771: error: Cannot find PCRE library" >&5
21772 echo "$as_me: error: Cannot find PCRE library" >&2;}
21773 { (exit 1); exit 1; }; }
21774 fi
21775
21776 fi
21777
21778 cat >>confdefs.h <<\EOF
21779 #define HAVE_LIB_PCRE 1
21780 EOF
21781
21782 case $LIBS in
21783 (*pcreposix*)
21784 ;;
21785 (*)
21786 echo "$as_me:21786: checking for pcreposix_regcomp in -lpcreposix" >&5
21787 echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
21788 if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
21789 echo $ECHO_N "(cached) $ECHO_C" >&6
21790 else
21791 ac_check_lib_save_LIBS=$LIBS
21792 LIBS="-lpcreposix $LIBS"
21793 cat >"conftest.$ac_ext" <<_ACEOF
21794 #line 21794 "configure"
21795 #include "confdefs.h"
21796
21797 /* Override any gcc2 internal prototype to avoid an error. */
21798 #ifdef __cplusplus
21799 extern "C"
21800 #endif
21801 /* We use char because int might match the return type of a gcc2
21802 builtin and then its argument prototype would still apply. */
21803 char pcreposix_regcomp (void);
21804 int
21805 main (void)
21806 {
21807 pcreposix_regcomp ();
21808 ;
21809 return 0;
21810 }
21811 _ACEOF
21812 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21813 if { (eval echo "$as_me:21813: \"$ac_link\"") >&5
21814 (eval $ac_link) 2>&5
21815 ac_status=$?
21816 echo "$as_me:21816: \$? = $ac_status" >&5
21817 (exit "$ac_status"); } &&
21818 { ac_try='test -s "conftest$ac_exeext"'
21819 { (eval echo "$as_me:21819: \"$ac_try\"") >&5
21820 (eval $ac_try) 2>&5
21821 ac_status=$?
21822 echo "$as_me:21822: \$? = $ac_status" >&5
21823 (exit "$ac_status"); }; }; then
21824 ac_cv_lib_pcreposix_pcreposix_regcomp=yes
21825 else
21826 echo "$as_me: failed program was:" >&5
21827 cat "conftest.$ac_ext" >&5
21828 ac_cv_lib_pcreposix_pcreposix_regcomp=no
21829 fi
21830 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21831 LIBS=$ac_check_lib_save_LIBS
21832 fi
21833 echo "$as_me:21833: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
21834 echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
21835 if test "$ac_cv_lib_pcreposix_pcreposix_regcomp" = yes; then
21836
21837 cat >>confdefs.h <<\EOF
21838 #define HAVE_PCREPOSIX_H 1
21839 EOF
21840
21841 cf_add_libs="$LIBS"
21842 # reverse order
21843 cf_add_0lib=
21844 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21845 # filter duplicates
21846 for cf_add_1lib in $cf_add_0lib; do
21847 for cf_add_2lib in $cf_add_libs; do
21848 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21849 cf_add_1lib=
21850 break
21851 fi
21852 done
21853 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21854 done
21855 LIBS="$cf_add_libs"
21856
21857 else
21858 echo "$as_me:21858: checking for regcomp in -lpcreposix" >&5
21859 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
21860 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
21861 echo $ECHO_N "(cached) $ECHO_C" >&6
21862 else
21863 ac_check_lib_save_LIBS=$LIBS
21864 LIBS="-lpcreposix $LIBS"
21865 cat >"conftest.$ac_ext" <<_ACEOF
21866 #line 21866 "configure"
21867 #include "confdefs.h"
21868
21869 /* Override any gcc2 internal prototype to avoid an error. */
21870 #ifdef __cplusplus
21871 extern "C"
21872 #endif
21873 /* We use char because int might match the return type of a gcc2
21874 builtin and then its argument prototype would still apply. */
21875 char regcomp (void);
21876 int
21877 main (void)
21878 {
21879 regcomp ();
21880 ;
21881 return 0;
21882 }
21883 _ACEOF
21884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21885 if { (eval echo "$as_me:21885: \"$ac_link\"") >&5
21886 (eval $ac_link) 2>&5
21887 ac_status=$?
21888 echo "$as_me:21888: \$? = $ac_status" >&5
21889 (exit "$ac_status"); } &&
21890 { ac_try='test -s "conftest$ac_exeext"'
21891 { (eval echo "$as_me:21891: \"$ac_try\"") >&5
21892 (eval $ac_try) 2>&5
21893 ac_status=$?
21894 echo "$as_me:21894: \$? = $ac_status" >&5
21895 (exit "$ac_status"); }; }; then
21896 ac_cv_lib_pcreposix_regcomp=yes
21897 else
21898 echo "$as_me: failed program was:" >&5
21899 cat "conftest.$ac_ext" >&5
21900 ac_cv_lib_pcreposix_regcomp=no
21901 fi
21902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21903 LIBS=$ac_check_lib_save_LIBS
21904 fi
21905 echo "$as_me:21905: result: $ac_cv_lib_pcreposix_regcomp" >&5
21906 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
21907 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
21908
21909 cat >>confdefs.h <<\EOF
21910 #define HAVE_PCREPOSIX_H 1
21911 EOF
21912
21913 cf_add_libs="$LIBS"
21914 # reverse order
21915 cf_add_0lib=
21916 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21917 # filter duplicates
21918 for cf_add_1lib in $cf_add_0lib; do
21919 for cf_add_2lib in $cf_add_libs; do
21920 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21921 cf_add_1lib=
21922 break
21923 fi
21924 done
21925 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21926 done
21927 LIBS="$cf_add_libs"
21928
21929 else
21930 { { echo "$as_me:21930: error: Cannot find PCRE POSIX library" >&5
21931 echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
21932 { (exit 1); exit 1; }; }
21933 fi
21934
21935 fi
21936
21937 ;;
21938 esac
21939 fi
21940
21941 if test "$with_pcre" = no ; then
21942
21943 cf_regex_func=no
21944 cf_regex_libs=
21945 case "$host_os" in
21946 (mingw*)
21947 # -lsystre -ltre -lintl -liconv
21948 echo "$as_me:21948: checking for regcomp in -lsystre" >&5
21949 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
21950 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
21951 echo $ECHO_N "(cached) $ECHO_C" >&6
21952 else
21953 ac_check_lib_save_LIBS=$LIBS
21954 LIBS="-lsystre $LIBS"
21955 cat >"conftest.$ac_ext" <<_ACEOF
21956 #line 21956 "configure"
21957 #include "confdefs.h"
21958
21959 /* Override any gcc2 internal prototype to avoid an error. */
21960 #ifdef __cplusplus
21961 extern "C"
21962 #endif
21963 /* We use char because int might match the return type of a gcc2
21964 builtin and then its argument prototype would still apply. */
21965 char regcomp (void);
21966 int
21967 main (void)
21968 {
21969 regcomp ();
21970 ;
21971 return 0;
21972 }
21973 _ACEOF
21974 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21975 if { (eval echo "$as_me:21975: \"$ac_link\"") >&5
21976 (eval $ac_link) 2>&5
21977 ac_status=$?
21978 echo "$as_me:21978: \$? = $ac_status" >&5
21979 (exit "$ac_status"); } &&
21980 { ac_try='test -s "conftest$ac_exeext"'
21981 { (eval echo "$as_me:21981: \"$ac_try\"") >&5
21982 (eval $ac_try) 2>&5
21983 ac_status=$?
21984 echo "$as_me:21984: \$? = $ac_status" >&5
21985 (exit "$ac_status"); }; }; then
21986 ac_cv_lib_systre_regcomp=yes
21987 else
21988 echo "$as_me: failed program was:" >&5
21989 cat "conftest.$ac_ext" >&5
21990 ac_cv_lib_systre_regcomp=no
21991 fi
21992 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21993 LIBS=$ac_check_lib_save_LIBS
21994 fi
21995 echo "$as_me:21995: result: $ac_cv_lib_systre_regcomp" >&5
21996 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
21997 if test "$ac_cv_lib_systre_regcomp" = yes; then
21998
21999 echo "$as_me:21999: checking for libiconv_open in -liconv" >&5
22000 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
22001 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
22002 echo $ECHO_N "(cached) $ECHO_C" >&6
22003 else
22004 ac_check_lib_save_LIBS=$LIBS
22005 LIBS="-liconv $LIBS"
22006 cat >"conftest.$ac_ext" <<_ACEOF
22007 #line 22007 "configure"
22008 #include "confdefs.h"
22009
22010 /* Override any gcc2 internal prototype to avoid an error. */
22011 #ifdef __cplusplus
22012 extern "C"
22013 #endif
22014 /* We use char because int might match the return type of a gcc2
22015 builtin and then its argument prototype would still apply. */
22016 char libiconv_open (void);
22017 int
22018 main (void)
22019 {
22020 libiconv_open ();
22021 ;
22022 return 0;
22023 }
22024 _ACEOF
22025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22026 if { (eval echo "$as_me:22026: \"$ac_link\"") >&5
22027 (eval $ac_link) 2>&5
22028 ac_status=$?
22029 echo "$as_me:22029: \$? = $ac_status" >&5
22030 (exit "$ac_status"); } &&
22031 { ac_try='test -s "conftest$ac_exeext"'
22032 { (eval echo "$as_me:22032: \"$ac_try\"") >&5
22033 (eval $ac_try) 2>&5
22034 ac_status=$?
22035 echo "$as_me:22035: \$? = $ac_status" >&5
22036 (exit "$ac_status"); }; }; then
22037 ac_cv_lib_iconv_libiconv_open=yes
22038 else
22039 echo "$as_me: failed program was:" >&5
22040 cat "conftest.$ac_ext" >&5
22041 ac_cv_lib_iconv_libiconv_open=no
22042 fi
22043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22044 LIBS=$ac_check_lib_save_LIBS
22045 fi
22046 echo "$as_me:22046: result: $ac_cv_lib_iconv_libiconv_open" >&5
22047 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
22048 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
22049
22050 cf_add_libs="$LIBS"
22051 # reverse order
22052 cf_add_0lib=
22053 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22054 # filter duplicates
22055 for cf_add_1lib in $cf_add_0lib; do
22056 for cf_add_2lib in $cf_add_libs; do
22057 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22058 cf_add_1lib=
22059 break
22060 fi
22061 done
22062 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22063 done
22064 LIBS="$cf_add_libs"
22065
22066 fi
22067
22068 echo "$as_me:22068: checking for libintl_gettext in -lintl" >&5
22069 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
22070 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
22071 echo $ECHO_N "(cached) $ECHO_C" >&6
22072 else
22073 ac_check_lib_save_LIBS=$LIBS
22074 LIBS="-lintl $LIBS"
22075 cat >"conftest.$ac_ext" <<_ACEOF
22076 #line 22076 "configure"
22077 #include "confdefs.h"
22078
22079 /* Override any gcc2 internal prototype to avoid an error. */
22080 #ifdef __cplusplus
22081 extern "C"
22082 #endif
22083 /* We use char because int might match the return type of a gcc2
22084 builtin and then its argument prototype would still apply. */
22085 char libintl_gettext (void);
22086 int
22087 main (void)
22088 {
22089 libintl_gettext ();
22090 ;
22091 return 0;
22092 }
22093 _ACEOF
22094 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22095 if { (eval echo "$as_me:22095: \"$ac_link\"") >&5
22096 (eval $ac_link) 2>&5
22097 ac_status=$?
22098 echo "$as_me:22098: \$? = $ac_status" >&5
22099 (exit "$ac_status"); } &&
22100 { ac_try='test -s "conftest$ac_exeext"'
22101 { (eval echo "$as_me:22101: \"$ac_try\"") >&5
22102 (eval $ac_try) 2>&5
22103 ac_status=$?
22104 echo "$as_me:22104: \$? = $ac_status" >&5
22105 (exit "$ac_status"); }; }; then
22106 ac_cv_lib_intl_libintl_gettext=yes
22107 else
22108 echo "$as_me: failed program was:" >&5
22109 cat "conftest.$ac_ext" >&5
22110 ac_cv_lib_intl_libintl_gettext=no
22111 fi
22112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22113 LIBS=$ac_check_lib_save_LIBS
22114 fi
22115 echo "$as_me:22115: result: $ac_cv_lib_intl_libintl_gettext" >&5
22116 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
22117 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
22118
22119 cf_add_libs="$LIBS"
22120 # reverse order
22121 cf_add_0lib=
22122 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22123 # filter duplicates
22124 for cf_add_1lib in $cf_add_0lib; do
22125 for cf_add_2lib in $cf_add_libs; do
22126 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22127 cf_add_1lib=
22128 break
22129 fi
22130 done
22131 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22132 done
22133 LIBS="$cf_add_libs"
22134
22135 fi
22136
22137 echo "$as_me:22137: checking for tre_regcomp in -ltre" >&5
22138 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
22139 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
22140 echo $ECHO_N "(cached) $ECHO_C" >&6
22141 else
22142 ac_check_lib_save_LIBS=$LIBS
22143 LIBS="-ltre $LIBS"
22144 cat >"conftest.$ac_ext" <<_ACEOF
22145 #line 22145 "configure"
22146 #include "confdefs.h"
22147
22148 /* Override any gcc2 internal prototype to avoid an error. */
22149 #ifdef __cplusplus
22150 extern "C"
22151 #endif
22152 /* We use char because int might match the return type of a gcc2
22153 builtin and then its argument prototype would still apply. */
22154 char tre_regcomp (void);
22155 int
22156 main (void)
22157 {
22158 tre_regcomp ();
22159 ;
22160 return 0;
22161 }
22162 _ACEOF
22163 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22164 if { (eval echo "$as_me:22164: \"$ac_link\"") >&5
22165 (eval $ac_link) 2>&5
22166 ac_status=$?
22167 echo "$as_me:22167: \$? = $ac_status" >&5
22168 (exit "$ac_status"); } &&
22169 { ac_try='test -s "conftest$ac_exeext"'
22170 { (eval echo "$as_me:22170: \"$ac_try\"") >&5
22171 (eval $ac_try) 2>&5
22172 ac_status=$?
22173 echo "$as_me:22173: \$? = $ac_status" >&5
22174 (exit "$ac_status"); }; }; then
22175 ac_cv_lib_tre_tre_regcomp=yes
22176 else
22177 echo "$as_me: failed program was:" >&5
22178 cat "conftest.$ac_ext" >&5
22179 ac_cv_lib_tre_tre_regcomp=no
22180 fi
22181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22182 LIBS=$ac_check_lib_save_LIBS
22183 fi
22184 echo "$as_me:22184: result: $ac_cv_lib_tre_tre_regcomp" >&5
22185 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
22186 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
22187
22188 cf_add_libs="$LIBS"
22189 # reverse order
22190 cf_add_0lib=
22191 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22192 # filter duplicates
22193 for cf_add_1lib in $cf_add_0lib; do
22194 for cf_add_2lib in $cf_add_libs; do
22195 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22196 cf_add_1lib=
22197 break
22198 fi
22199 done
22200 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22201 done
22202 LIBS="$cf_add_libs"
22203
22204 fi
22205
22206 cf_add_libs="$LIBS"
22207 # reverse order
22208 cf_add_0lib=
22209 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22210 # filter duplicates
22211 for cf_add_1lib in $cf_add_0lib; do
22212 for cf_add_2lib in $cf_add_libs; do
22213 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22214 cf_add_1lib=
22215 break
22216 fi
22217 done
22218 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22219 done
22220 LIBS="$cf_add_libs"
22221
22222 cf_regex_func=regcomp
22223
22224 else
22225
22226 echo "$as_me:22226: checking for regcomp in -lgnurx" >&5
22227 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
22228 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
22229 echo $ECHO_N "(cached) $ECHO_C" >&6
22230 else
22231 ac_check_lib_save_LIBS=$LIBS
22232 LIBS="-lgnurx $LIBS"
22233 cat >"conftest.$ac_ext" <<_ACEOF
22234 #line 22234 "configure"
22235 #include "confdefs.h"
22236
22237 /* Override any gcc2 internal prototype to avoid an error. */
22238 #ifdef __cplusplus
22239 extern "C"
22240 #endif
22241 /* We use char because int might match the return type of a gcc2
22242 builtin and then its argument prototype would still apply. */
22243 char regcomp (void);
22244 int
22245 main (void)
22246 {
22247 regcomp ();
22248 ;
22249 return 0;
22250 }
22251 _ACEOF
22252 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22253 if { (eval echo "$as_me:22253: \"$ac_link\"") >&5
22254 (eval $ac_link) 2>&5
22255 ac_status=$?
22256 echo "$as_me:22256: \$? = $ac_status" >&5
22257 (exit "$ac_status"); } &&
22258 { ac_try='test -s "conftest$ac_exeext"'
22259 { (eval echo "$as_me:22259: \"$ac_try\"") >&5
22260 (eval $ac_try) 2>&5
22261 ac_status=$?
22262 echo "$as_me:22262: \$? = $ac_status" >&5
22263 (exit "$ac_status"); }; }; then
22264 ac_cv_lib_gnurx_regcomp=yes
22265 else
22266 echo "$as_me: failed program was:" >&5
22267 cat "conftest.$ac_ext" >&5
22268 ac_cv_lib_gnurx_regcomp=no
22269 fi
22270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22271 LIBS=$ac_check_lib_save_LIBS
22272 fi
22273 echo "$as_me:22273: result: $ac_cv_lib_gnurx_regcomp" >&5
22274 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
22275 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
22276
22277 cf_add_libs="$LIBS"
22278 # reverse order
22279 cf_add_0lib=
22280 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22281 # filter duplicates
22282 for cf_add_1lib in $cf_add_0lib; do
22283 for cf_add_2lib in $cf_add_libs; do
22284 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22285 cf_add_1lib=
22286 break
22287 fi
22288 done
22289 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22290 done
22291 LIBS="$cf_add_libs"
22292
22293 cf_regex_func=regcomp
22294 fi
22295
22296 fi
22297
22298 ;;
22299 (*)
22300 cf_regex_libs="regex re"
22301 echo "$as_me:22301: checking for regcomp" >&5
22302 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
22303 if test "${ac_cv_func_regcomp+set}" = set; then
22304 echo $ECHO_N "(cached) $ECHO_C" >&6
22305 else
22306 cat >"conftest.$ac_ext" <<_ACEOF
22307 #line 22307 "configure"
22308 #include "confdefs.h"
22309 #define regcomp autoconf_temporary
22310 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22311 #undef regcomp
22312
22313 #ifdef __cplusplus
22314 extern "C"
22315 #endif
22316
22317 /* We use char because int might match the return type of a gcc2
22318 builtin and then its argument prototype would still apply. */
22319 char regcomp (void);
22320
22321 int
22322 main (void)
22323 {
22324
22325 /* The GNU C library defines stubs for functions which it implements
22326 to always fail with ENOSYS. Some functions are actually named
22327 something starting with __ and the normal name is an alias. */
22328 #if defined (__stub_regcomp) || defined (__stub___regcomp)
22329 #error found stub for regcomp
22330 #endif
22331
22332 return regcomp ();
22333 ;
22334 return 0;
22335 }
22336 _ACEOF
22337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22338 if { (eval echo "$as_me:22338: \"$ac_link\"") >&5
22339 (eval $ac_link) 2>&5
22340 ac_status=$?
22341 echo "$as_me:22341: \$? = $ac_status" >&5
22342 (exit "$ac_status"); } &&
22343 { ac_try='test -s "conftest$ac_exeext"'
22344 { (eval echo "$as_me:22344: \"$ac_try\"") >&5
22345 (eval $ac_try) 2>&5
22346 ac_status=$?
22347 echo "$as_me:22347: \$? = $ac_status" >&5
22348 (exit "$ac_status"); }; }; then
22349 ac_cv_func_regcomp=yes
22350 else
22351 echo "$as_me: failed program was:" >&5
22352 cat "conftest.$ac_ext" >&5
22353 ac_cv_func_regcomp=no
22354 fi
22355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22356 fi
22357 echo "$as_me:22357: result: $ac_cv_func_regcomp" >&5
22358 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
22359 if test "$ac_cv_func_regcomp" = yes; then
22360 cf_regex_func=regcomp
22361 else
22362
22363 for cf_regex_lib in $cf_regex_libs
22364 do
22365 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
22366 echo "$as_me:22366: checking for regcomp in -l$cf_regex_lib" >&5
22367 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
22368 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
22369 echo $ECHO_N "(cached) $ECHO_C" >&6
22370 else
22371 ac_check_lib_save_LIBS=$LIBS
22372 LIBS="-l$cf_regex_lib $LIBS"
22373 cat >"conftest.$ac_ext" <<_ACEOF
22374 #line 22374 "configure"
22375 #include "confdefs.h"
22376
22377 /* Override any gcc2 internal prototype to avoid an error. */
22378 #ifdef __cplusplus
22379 extern "C"
22380 #endif
22381 /* We use char because int might match the return type of a gcc2
22382 builtin and then its argument prototype would still apply. */
22383 char regcomp (void);
22384 int
22385 main (void)
22386 {
22387 regcomp ();
22388 ;
22389 return 0;
22390 }
22391 _ACEOF
22392 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22393 if { (eval echo "$as_me:22393: \"$ac_link\"") >&5
22394 (eval $ac_link) 2>&5
22395 ac_status=$?
22396 echo "$as_me:22396: \$? = $ac_status" >&5
22397 (exit "$ac_status"); } &&
22398 { ac_try='test -s "conftest$ac_exeext"'
22399 { (eval echo "$as_me:22399: \"$ac_try\"") >&5
22400 (eval $ac_try) 2>&5
22401 ac_status=$?
22402 echo "$as_me:22402: \$? = $ac_status" >&5
22403 (exit "$ac_status"); }; }; then
22404 eval "$as_ac_Lib=yes"
22405 else
22406 echo "$as_me: failed program was:" >&5
22407 cat "conftest.$ac_ext" >&5
22408 eval "$as_ac_Lib=no"
22409 fi
22410 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22411 LIBS=$ac_check_lib_save_LIBS
22412 fi
22413 echo "$as_me:22413: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
22414 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
22415 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
22416
22417 cf_add_libs="$LIBS"
22418 # reverse order
22419 cf_add_0lib=
22420 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22421 # filter duplicates
22422 for cf_add_1lib in $cf_add_0lib; do
22423 for cf_add_2lib in $cf_add_libs; do
22424 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22425 cf_add_1lib=
22426 break
22427 fi
22428 done
22429 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22430 done
22431 LIBS="$cf_add_libs"
22432
22433 cf_regex_func=regcomp
22434 break
22435 fi
22436
22437 done
22438
22439 fi
22440
22441 ;;
22442 esac
22443
22444 if test "$cf_regex_func" = no ; then
22445 echo "$as_me:22445: checking for compile" >&5
22446 echo $ECHO_N "checking for compile... $ECHO_C" >&6
22447 if test "${ac_cv_func_compile+set}" = set; then
22448 echo $ECHO_N "(cached) $ECHO_C" >&6
22449 else
22450 cat >"conftest.$ac_ext" <<_ACEOF
22451 #line 22451 "configure"
22452 #include "confdefs.h"
22453 #define compile autoconf_temporary
22454 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22455 #undef compile
22456
22457 #ifdef __cplusplus
22458 extern "C"
22459 #endif
22460
22461 /* We use char because int might match the return type of a gcc2
22462 builtin and then its argument prototype would still apply. */
22463 char compile (void);
22464
22465 int
22466 main (void)
22467 {
22468
22469 /* The GNU C library defines stubs for functions which it implements
22470 to always fail with ENOSYS. Some functions are actually named
22471 something starting with __ and the normal name is an alias. */
22472 #if defined (__stub_compile) || defined (__stub___compile)
22473 #error found stub for compile
22474 #endif
22475
22476 return compile ();
22477 ;
22478 return 0;
22479 }
22480 _ACEOF
22481 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22482 if { (eval echo "$as_me:22482: \"$ac_link\"") >&5
22483 (eval $ac_link) 2>&5
22484 ac_status=$?
22485 echo "$as_me:22485: \$? = $ac_status" >&5
22486 (exit "$ac_status"); } &&
22487 { ac_try='test -s "conftest$ac_exeext"'
22488 { (eval echo "$as_me:22488: \"$ac_try\"") >&5
22489 (eval $ac_try) 2>&5
22490 ac_status=$?
22491 echo "$as_me:22491: \$? = $ac_status" >&5
22492 (exit "$ac_status"); }; }; then
22493 ac_cv_func_compile=yes
22494 else
22495 echo "$as_me: failed program was:" >&5
22496 cat "conftest.$ac_ext" >&5
22497 ac_cv_func_compile=no
22498 fi
22499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22500 fi
22501 echo "$as_me:22501: result: $ac_cv_func_compile" >&5
22502 echo "${ECHO_T}$ac_cv_func_compile" >&6
22503 if test "$ac_cv_func_compile" = yes; then
22504 cf_regex_func=compile
22505 else
22506
22507 echo "$as_me:22507: checking for compile in -lgen" >&5
22508 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
22509 if test "${ac_cv_lib_gen_compile+set}" = set; then
22510 echo $ECHO_N "(cached) $ECHO_C" >&6
22511 else
22512 ac_check_lib_save_LIBS=$LIBS
22513 LIBS="-lgen $LIBS"
22514 cat >"conftest.$ac_ext" <<_ACEOF
22515 #line 22515 "configure"
22516 #include "confdefs.h"
22517
22518 /* Override any gcc2 internal prototype to avoid an error. */
22519 #ifdef __cplusplus
22520 extern "C"
22521 #endif
22522 /* We use char because int might match the return type of a gcc2
22523 builtin and then its argument prototype would still apply. */
22524 char compile (void);
22525 int
22526 main (void)
22527 {
22528 compile ();
22529 ;
22530 return 0;
22531 }
22532 _ACEOF
22533 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22534 if { (eval echo "$as_me:22534: \"$ac_link\"") >&5
22535 (eval $ac_link) 2>&5
22536 ac_status=$?
22537 echo "$as_me:22537: \$? = $ac_status" >&5
22538 (exit "$ac_status"); } &&
22539 { ac_try='test -s "conftest$ac_exeext"'
22540 { (eval echo "$as_me:22540: \"$ac_try\"") >&5
22541 (eval $ac_try) 2>&5
22542 ac_status=$?
22543 echo "$as_me:22543: \$? = $ac_status" >&5
22544 (exit "$ac_status"); }; }; then
22545 ac_cv_lib_gen_compile=yes
22546 else
22547 echo "$as_me: failed program was:" >&5
22548 cat "conftest.$ac_ext" >&5
22549 ac_cv_lib_gen_compile=no
22550 fi
22551 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22552 LIBS=$ac_check_lib_save_LIBS
22553 fi
22554 echo "$as_me:22554: result: $ac_cv_lib_gen_compile" >&5
22555 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
22556 if test "$ac_cv_lib_gen_compile" = yes; then
22557
22558 cf_add_libs="$LIBS"
22559 # reverse order
22560 cf_add_0lib=
22561 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22562 # filter duplicates
22563 for cf_add_1lib in $cf_add_0lib; do
22564 for cf_add_2lib in $cf_add_libs; do
22565 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22566 cf_add_1lib=
22567 break
22568 fi
22569 done
22570 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22571 done
22572 LIBS="$cf_add_libs"
22573
22574 cf_regex_func=compile
22575 fi
22576
22577 fi
22578
22579 fi
22580
22581 if test "$cf_regex_func" = no ; then
22582 { echo "$as_me:22582: WARNING: cannot find regular expression library" >&5
22583 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
22584 fi
22585
22586 echo "$as_me:22586: checking for regular-expression headers" >&5
22587 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
22588 if test "${cf_cv_regex_hdrs+set}" = set; then
22589 echo $ECHO_N "(cached) $ECHO_C" >&6
22590 else
22591
22592 cf_cv_regex_hdrs=no
22593 case "$cf_regex_func" in
22594 (compile)
22595 for cf_regex_hdr in regexp.h regexpr.h
22596 do
22597 cat >"conftest.$ac_ext" <<_ACEOF
22598 #line 22598 "configure"
22599 #include "confdefs.h"
22600 #include <$cf_regex_hdr>
22601 int
22602 main (void)
22603 {
22604
22605 char *p = compile("", "", "", 0);
22606 int x = step("", "");
22607 (void)p;
22608 (void)x;
22609
22610 ;
22611 return 0;
22612 }
22613 _ACEOF
22614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22615 if { (eval echo "$as_me:22615: \"$ac_link\"") >&5
22616 (eval $ac_link) 2>&5
22617 ac_status=$?
22618 echo "$as_me:22618: \$? = $ac_status" >&5
22619 (exit "$ac_status"); } &&
22620 { ac_try='test -s "conftest$ac_exeext"'
22621 { (eval echo "$as_me:22621: \"$ac_try\"") >&5
22622 (eval $ac_try) 2>&5
22623 ac_status=$?
22624 echo "$as_me:22624: \$? = $ac_status" >&5
22625 (exit "$ac_status"); }; }; then
22626
22627 cf_cv_regex_hdrs=$cf_regex_hdr
22628 break
22629
22630 else
22631 echo "$as_me: failed program was:" >&5
22632 cat "conftest.$ac_ext" >&5
22633 fi
22634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22635 done
22636 ;;
22637 (*)
22638 for cf_regex_hdr in regex.h
22639 do
22640 cat >"conftest.$ac_ext" <<_ACEOF
22641 #line 22641 "configure"
22642 #include "confdefs.h"
22643 #include <sys/types.h>
22644 #include <$cf_regex_hdr>
22645 int
22646 main (void)
22647 {
22648
22649 regex_t *p = 0;
22650 int x = regcomp(p, "", 0);
22651 int y = regexec(p, "", 0, 0, 0);
22652 (void)x;
22653 (void)y;
22654 regfree(p);
22655
22656 ;
22657 return 0;
22658 }
22659 _ACEOF
22660 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22661 if { (eval echo "$as_me:22661: \"$ac_link\"") >&5
22662 (eval $ac_link) 2>&5
22663 ac_status=$?
22664 echo "$as_me:22664: \$? = $ac_status" >&5
22665 (exit "$ac_status"); } &&
22666 { ac_try='test -s "conftest$ac_exeext"'
22667 { (eval echo "$as_me:22667: \"$ac_try\"") >&5
22668 (eval $ac_try) 2>&5
22669 ac_status=$?
22670 echo "$as_me:22670: \$? = $ac_status" >&5
22671 (exit "$ac_status"); }; }; then
22672
22673 cf_cv_regex_hdrs=$cf_regex_hdr
22674 break
22675
22676 else
22677 echo "$as_me: failed program was:" >&5
22678 cat "conftest.$ac_ext" >&5
22679 fi
22680 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22681 done
22682 ;;
22683 esac
22684
22685 fi
22686 echo "$as_me:22686: result: $cf_cv_regex_hdrs" >&5
22687 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
22688
22689 case "$cf_cv_regex_hdrs" in
22690 (no) { echo "$as_me:22690: WARNING: no regular expression header found" >&5
22691 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
22692 (regex.h)
22693 cat >>confdefs.h <<\EOF
22694 #define HAVE_REGEX_H_FUNCS 1
22695 EOF
22696 ;;
22697 (regexp.h)
22698 cat >>confdefs.h <<\EOF
22699 #define HAVE_REGEXP_H_FUNCS 1
22700 EOF
22701 ;;
22702 (regexpr.h)
22703 cat >>confdefs.h <<\EOF
22704 #define HAVE_REGEXPR_H_FUNCS 1
22705 EOF
22706 ;;
22707 esac
22708
22709 if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
22710 { { echo "$as_me:22710: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&5
22711 echo "$as_me: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&2;}
22712 { (exit 1); exit 1; }; }
22713 fi
22714 fi
22715 fi
22716
22717 cat >>confdefs.h <<\EOF
22718 #define OPT_SELECT_REGEX 1
22719 EOF
22720
22721 fi
22722
22723 echo "$as_me:22723: checking if you want support for right-scrollbar" >&5
22724 echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
22725
22726 # Check whether --enable-rightbar or --disable-rightbar was given.
22727 if test "${enable_rightbar+set}" = set; then
22728 enableval="$enable_rightbar"
22729 test "$enableval" != no && enableval=yes
22730 if test "$enableval" != "yes" ; then
22731 enable_rightbar=no
22732 else
22733 enable_rightbar=yes
22734 fi
22735 else
22736 enableval=yes
22737 enable_rightbar=yes
22738
22739 fi;
22740 echo "$as_me:22740: result: $enable_rightbar" >&5
22741 echo "${ECHO_T}$enable_rightbar" >&6
22742 if test "$enable_rightbar" = yes ; then
22743
22744 cat >>confdefs.h <<\EOF
22745 #define SCROLLBAR_RIGHT 1
22746 EOF
22747
22748 fi
22749
22750 echo "$as_me:22750: checking if you want check for redundant name-change" >&5
22751 echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
22752
22753 # Check whether --enable-samename or --disable-samename was given.
22754 if test "${enable_samename+set}" = set; then
22755 enableval="$enable_samename"
22756 test "$enableval" != no && enableval=yes
22757 if test "$enableval" != "yes" ; then
22758 enable_samename=no
22759 else
22760 enable_samename=yes
22761 fi
22762 else
22763 enableval=yes
22764 enable_samename=yes
22765
22766 fi;
22767 echo "$as_me:22767: result: $enable_samename" >&5
22768 echo "${ECHO_T}$enable_samename" >&6
22769 test "$enable_samename" = no &&
22770 cat >>confdefs.h <<\EOF
22771 #define OPT_SAME_NAME 0
22772 EOF
22773
22774 echo "$as_me:22774: checking if you want support for selection-actions" >&5
22775 echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
22776
22777 # Check whether --enable-selection-ops or --disable-selection-ops was given.
22778 if test "${enable_selection_ops+set}" = set; then
22779 enableval="$enable_selection_ops"
22780 test "$enableval" != no && enableval=yes
22781 if test "$enableval" != "yes" ; then
22782 enable_selection_ops=no
22783 else
22784 enable_selection_ops=yes
22785 fi
22786 else
22787 enableval=yes
22788 enable_selection_ops=yes
22789
22790 fi;
22791 echo "$as_me:22791: result: $enable_selection_ops" >&5
22792 echo "${ECHO_T}$enable_selection_ops" >&6
22793 test "$enable_selection_ops" = no &&
22794 cat >>confdefs.h <<\EOF
22795 #define OPT_SELECTION_OPS 0
22796 EOF
22797
22798 echo "$as_me:22798: checking if you want support for session management" >&5
22799 echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
22800
22801 # Check whether --enable-session-mgt or --disable-session-mgt was given.
22802 if test "${enable_session_mgt+set}" = set; then
22803 enableval="$enable_session_mgt"
22804 test "$enableval" != no && enableval=yes
22805 if test "$enableval" != "yes" ; then
22806 enable_session_mgt=no
22807 else
22808 enable_session_mgt=yes
22809 fi
22810 else
22811 enableval=yes
22812 enable_session_mgt=yes
22813
22814 fi;
22815 echo "$as_me:22815: result: $enable_session_mgt" >&5
22816 echo "${ECHO_T}$enable_session_mgt" >&6
22817 test "$enable_session_mgt" = no &&
22818 cat >>confdefs.h <<\EOF
22819 #define OPT_SESSION_MGT 0
22820 EOF
22821
22822 echo "$as_me:22822: checking if you want support for status-line" >&5
22823 echo $ECHO_N "checking if you want support for status-line... $ECHO_C" >&6
22824
22825 # Check whether --enable-status-line or --disable-status-line was given.
22826 if test "${enable_status_line+set}" = set; then
22827 enableval="$enable_status_line"
22828 test "$enableval" != yes && enableval=no
22829 if test "$enableval" != "no" ; then
22830 enable_status_line=yes
22831 else
22832 enable_status_line=no
22833 fi
22834 else
22835 enableval=no
22836 enable_status_line=no
22837
22838 fi;
22839 echo "$as_me:22839: result: $enable_status_line" >&5
22840 echo "${ECHO_T}$enable_status_line" >&6
22841 test "$enable_status_line" = yes &&
22842 cat >>confdefs.h <<\EOF
22843 #define OPT_STATUS_LINE 1
22844 EOF
22845
22846 echo "$as_me:22846: checking if you want to use termcap function-keys" >&5
22847 echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
22848
22849 # Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
22850 if test "${enable_tcap_fkeys+set}" = set; then
22851 enableval="$enable_tcap_fkeys"
22852 test "$enableval" != no && enableval=yes
22853 if test "$enableval" != "yes" ; then
22854 enable_tcap_fkeys=no
22855 else
22856 enable_tcap_fkeys=yes
22857 fi
22858 else
22859 enableval=yes
22860 enable_tcap_fkeys=yes
22861
22862 fi;
22863 echo "$as_me:22863: result: $enable_tcap_fkeys" >&5
22864 echo "${ECHO_T}$enable_tcap_fkeys" >&6
22865 test "$enable_tcap_fkeys" = no &&
22866 cat >>confdefs.h <<\EOF
22867 #define OPT_TCAP_FKEYS 0
22868 EOF
22869
22870 echo "$as_me:22870: checking if you want to use termcap-query/report" >&5
22871 echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
22872
22873 # Check whether --enable-tcap-query or --disable-tcap-query was given.
22874 if test "${enable_tcap_query+set}" = set; then
22875 enableval="$enable_tcap_query"
22876 test "$enableval" != no && enableval=yes
22877 if test "$enableval" != "yes" ; then
22878 enable_tcap_query=no
22879 else
22880 enable_tcap_query=yes
22881 fi
22882 else
22883 enableval=yes
22884 enable_tcap_query=yes
22885
22886 fi;
22887 echo "$as_me:22887: result: $enable_tcap_query" >&5
22888 echo "${ECHO_T}$enable_tcap_query" >&6
22889 test "$enable_tcap_query" = no &&
22890 cat >>confdefs.h <<\EOF
22891 #define OPT_TCAP_QUERY 0
22892 EOF
22893
22894 echo "$as_me:22894: checking if you want support for tek4014" >&5
22895 echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
22896
22897 # Check whether --enable-tek4014 or --disable-tek4014 was given.
22898 if test "${enable_tek4014+set}" = set; then
22899 enableval="$enable_tek4014"
22900 test "$enableval" != no && enableval=yes
22901 if test "$enableval" != "yes" ; then
22902 enable_tek4014=no
22903 else
22904 enable_tek4014=yes
22905 fi
22906 else
22907 enableval=yes
22908 enable_tek4014=yes
22909
22910 fi;
22911 echo "$as_me:22911: result: $enable_tek4014" >&5
22912 echo "${ECHO_T}$enable_tek4014" >&6
22913 if test "$enable_tek4014" = no ; then
22914
22915 cat >>confdefs.h <<\EOF
22916 #define OPT_TEK4014 0
22917 EOF
22918
22919 else
22920 EXTRAHDRS="$EXTRAHDRS Tekparse.h"
22921 EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
22922 EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
22923 fi
22924
22925 echo "$as_me:22925: checking if you want pulldown menus with a toolbar" >&5
22926 echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
22927
22928 # Check whether --enable-toolbar or --disable-toolbar was given.
22929 if test "${enable_toolbar+set}" = set; then
22930 enableval="$enable_toolbar"
22931 test "$enableval" != yes && enableval=no
22932 if test "$enableval" != "no" ; then
22933 enable_toolbar=yes
22934 else
22935 enable_toolbar=no
22936 fi
22937 else
22938 enableval=no
22939 enable_toolbar=no
22940
22941 fi;
22942 echo "$as_me:22942: result: $enable_toolbar" >&5
22943 echo "${ECHO_T}$enable_toolbar" >&6
22944 if test "$enable_toolbar" = yes ; then
22945
22946 cat >>confdefs.h <<\EOF
22947 #define OPT_TOOLBAR 1
22948 EOF
22949
22950 fi
22951
22952 echo "$as_me:22952: checking if you want VT52 emulation" >&5
22953 echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
22954
22955 # Check whether --enable-vt52 or --disable-vt52 was given.
22956 if test "${enable_vt52+set}" = set; then
22957 enableval="$enable_vt52"
22958 test "$enableval" != no && enableval=yes
22959 if test "$enableval" != "yes" ; then
22960 enable_vt52=no
22961 else
22962 enable_vt52=yes
22963 fi
22964 else
22965 enableval=yes
22966 enable_vt52=yes
22967
22968 fi;
22969 echo "$as_me:22969: result: $enable_vt52" >&5
22970 echo "${ECHO_T}$enable_vt52" >&6
22971 test "$enable_vt52" = no &&
22972 cat >>confdefs.h <<\EOF
22973 #define OPT_VT52_MODE 0
22974 EOF
22975
22976 echo "$as_me:22976: checking if you want wide-attribute support" >&5
22977 echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
22978
22979 # Check whether --enable-wide-attrs or --disable-wide-attrs was given.
22980 if test "${enable_wide_attrs+set}" = set; then
22981 enableval="$enable_wide_attrs"
22982 test "$enableval" != no && enableval=yes
22983 if test "$enableval" != "yes" ; then
22984 enable_wattr=no
22985 else
22986 enable_wattr=yes
22987 fi
22988 else
22989 enableval=yes
22990 enable_wattr=yes
22991
22992 fi;
22993 echo "$as_me:22993: result: $enable_wattr" >&5
22994 echo "${ECHO_T}$enable_wattr" >&6
22995
22996 if test x$enable_wattr = xno && test x$enable_direct_color = xyes ; then
22997 { echo "$as_me:22997: WARNING: overriding wide-attributes to support direct color" >&5
22998 echo "$as_me: WARNING: overriding wide-attributes to support direct color" >&2;}
22999 enable_wattr=yes
23000 fi
23001
23002 echo "$as_me:23002: checking if you want wide-character support" >&5
23003 echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
23004
23005 # Check whether --enable-wide-chars or --disable-wide-chars was given.
23006 if test "${enable_wide_chars+set}" = set; then
23007 enableval="$enable_wide_chars"
23008 test "$enableval" != no && enableval=yes
23009 if test "$enableval" != "yes" ; then
23010 enable_wchar=no
23011 else
23012 enable_wchar=yes
23013 fi
23014 else
23015 enableval=yes
23016 enable_wchar=yes
23017
23018 fi;
23019 echo "$as_me:23019: result: $enable_wchar" >&5
23020 echo "${ECHO_T}$enable_wchar" >&6
23021 test "x$enable_wattr" = xno &&
23022 cat >>confdefs.h <<\EOF
23023 #define OPT_WIDE_ATTRS 0
23024 EOF
23025
23026 echo "$as_me:23026: checking if you want only 16-bit character support" >&5
23027 echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
23028
23029 # Check whether --enable-16bit-chars or --disable-16bit-chars was given.
23030 if test "${enable_16bit_chars+set}" = set; then
23031 enableval="$enable_16bit_chars"
23032 test "$enableval" != yes && enableval=no
23033 if test "$enableval" != "no" ; then
23034 enable_16bit_chars=yes
23035 else
23036 enable_16bit_chars=no
23037 fi
23038 else
23039 enableval=no
23040 enable_16bit_chars=no
23041
23042 fi;
23043 echo "$as_me:23043: result: $enable_16bit_chars" >&5
23044 echo "${ECHO_T}$enable_16bit_chars" >&6
23045
23046 if test "$enable_16bit_chars" = yes ; then
23047
23048 cat >>confdefs.h <<\EOF
23049 #define OPT_WIDER_ICHAR 0
23050 EOF
23051
23052 enable_wchar=yes
23053 fi
23054
23055 if test "$enable_wchar" = yes ; then
23056
23057 echo "$as_me:23057: checking if you want to use mini-luit/Latin9 built-in support" >&5
23058 echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
23059
23060 # Check whether --enable-mini-luit or --disable-mini-luit was given.
23061 if test "${enable_mini_luit+set}" = set; then
23062 enableval="$enable_mini_luit"
23063 test "$enableval" != yes && enableval=no
23064 if test "$enableval" != "no" ; then
23065 enable_mini_luit=yes
23066 else
23067 enable_mini_luit=no
23068 fi
23069 else
23070 enableval=no
23071 enable_mini_luit=no
23072
23073 fi;
23074 echo "$as_me:23074: result: $enable_mini_luit" >&5
23075 echo "${ECHO_T}$enable_mini_luit" >&6
23076 if test "$enable_mini_luit" = yes ; then
23077
23078 cat >>confdefs.h <<\EOF
23079 #define OPT_MINI_LUIT 1
23080 EOF
23081
23082 fi
23083
23084 echo "$as_me:23084: checking if you want to use luit" >&5
23085 echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
23086
23087 # Check whether --enable-luit or --disable-luit was given.
23088 if test "${enable_luit+set}" = set; then
23089 enableval="$enable_luit"
23090 test "$enableval" != no && enableval=yes
23091 if test "$enableval" != "yes" ; then
23092 enable_luit=no
23093 else
23094 enable_luit=yes
23095 fi
23096 else
23097 enableval=yes
23098 enable_luit=yes
23099
23100 fi;
23101 echo "$as_me:23101: result: $enable_luit" >&5
23102 echo "${ECHO_T}$enable_luit" >&6
23103 if test "$enable_luit" = yes ; then
23104
23105 cat >>confdefs.h <<\EOF
23106 #define OPT_LUIT_PROG 1
23107 EOF
23108
23109 test -z "$LUIT" && LUIT="xterm-filter"
23110 for ac_prog in $LUIT xterm-filter bluit luit
23111 do
23112 # Extract the first word of "$ac_prog", so it can be a program name with args.
23113 set dummy $ac_prog; ac_word=$2
23114 echo "$as_me:23114: checking for $ac_word" >&5
23115 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23116 if test "${ac_cv_path_LUIT+set}" = set; then
23117 echo $ECHO_N "(cached) $ECHO_C" >&6
23118 else
23119 case $LUIT in
23120 [\\/]* | ?:[\\/]*)
23121 ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
23122 ;;
23123 *)
23124 ac_save_IFS=$IFS; IFS=$ac_path_separator
23125 ac_dummy="$PATH"
23126 for ac_dir in $ac_dummy; do
23127 IFS=$ac_save_IFS
23128 test -z "$ac_dir" && ac_dir=.
23129 if $as_executable_p "$ac_dir/$ac_word"; then
23130 ac_cv_path_LUIT="$ac_dir/$ac_word"
23131 echo "$as_me:23131: found $ac_dir/$ac_word" >&5
23132 break
23133 fi
23134 done
23135
23136 ;;
23137 esac
23138 fi
23139 LUIT=$ac_cv_path_LUIT
23140
23141 if test -n "$LUIT"; then
23142 echo "$as_me:23142: result: $LUIT" >&5
23143 echo "${ECHO_T}$LUIT" >&6
23144 else
23145 echo "$as_me:23145: result: no" >&5
23146 echo "${ECHO_T}no" >&6
23147 fi
23148
23149 test -n "$LUIT" && break
23150 done
23151 test -n "$LUIT" || LUIT="$LUIT"
23152
23153 cf_path_prog=""
23154 cf_path_args=""
23155 IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
23156 for cf_temp in $ac_cv_path_LUIT
23157 do
23158 if test -z "$cf_path_prog" ; then
23159 if test "$with_full_paths" = yes ; then
23160
23161 if test "x$prefix" != xNONE; then
23162 cf_path_syntax="$prefix"
23163 else
23164 cf_path_syntax="$ac_default_prefix"
23165 fi
23166
23167 case ".$cf_temp" in
23168 (.\$\(*\)*|.\'*\'*)
23169 ;;
23170 (..|./*|.\\*)
23171 ;;
23172 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23173 ;;
23174 (.\$\{*prefix\}*|.\$\{*dir\}*)
23175 eval cf_temp="$cf_temp"
23176 case ".$cf_temp" in
23177 (.NONE/*)
23178 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
23179 ;;
23180 esac
23181 ;;
23182 (.no|.NONE/*)
23183 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
23184 ;;
23185 (*)
23186 break
23187 ;;
23188 esac
23189
23190 cf_path_prog="$cf_temp"
23191 else
23192 cf_path_prog="`basename "$cf_temp"`"
23193 fi
23194 elif test -z "$cf_path_args" ; then
23195 cf_path_args="$cf_temp"
23196 else
23197 cf_path_args="$cf_path_args $cf_temp"
23198 fi
23199 done
23200 IFS="$cf_save_ifs"
23201
23202 if test -n "$cf_path_prog" ; then
23203
23204 echo "${as_me:-configure}:23204: testing defining path for ${cf_path_prog} ..." 1>&5
23205
23206 cat >>confdefs.h <<EOF
23207 #define LUIT_PATH "$cf_path_prog"
23208 EOF
23209
23210 test -n "$cf_path_args" &&
23211 cat >>confdefs.h <<EOF
23212 #define LUIT_ARGS "$cf_path_args"
23213 EOF
23214
23215 fi
23216
23217 fi
23218
23219 cat >>confdefs.h <<\EOF
23220 #define OPT_WIDE_CHARS 1
23221 EOF
23222
23223 EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
23224 EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
23225 EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
23226 fi
23227
23228 echo "$as_me:23228: checking if you want dynamic-abbreviation support" >&5
23229 echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
23230
23231 # Check whether --enable-dabbrev or --disable-dabbrev was given.
23232 if test "${enable_dabbrev+set}" = set; then
23233 enableval="$enable_dabbrev"
23234 test "$enableval" != yes && enableval=no
23235 if test "$enableval" != "no" ; then
23236 enable_dabbrev=yes
23237 else
23238 enable_dabbrev=no
23239 fi
23240 else
23241 enableval=no
23242 enable_dabbrev=no
23243
23244 fi;
23245 echo "$as_me:23245: result: $enable_dabbrev" >&5
23246 echo "${ECHO_T}$enable_dabbrev" >&6
23247 if test "$enable_dabbrev" = yes ; then
23248
23249 cat >>confdefs.h <<\EOF
23250 #define OPT_DABBREV 1
23251 EOF
23252
23253 fi
23254
23255 echo "$as_me:23255: checking if you want DECterm Locator support" >&5
23256 echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
23257
23258 # Check whether --enable-dec-locator or --disable-dec-locator was given.
23259 if test "${enable_dec_locator+set}" = set; then
23260 enableval="$enable_dec_locator"
23261 test "$enableval" != yes && enableval=no
23262 if test "$enableval" != "no" ; then
23263 enable_dec_locator=yes
23264 else
23265 enable_dec_locator=no
23266 fi
23267 else
23268 enableval=no
23269 enable_dec_locator=no
23270
23271 fi;
23272 echo "$as_me:23272: result: $enable_dec_locator" >&5
23273 echo "${ECHO_T}$enable_dec_locator" >&6
23274 if test "$enable_dec_locator" = yes ; then
23275
23276 cat >>confdefs.h <<\EOF
23277 #define OPT_DEC_LOCATOR 1
23278 EOF
23279
23280 fi
23281
23282 echo "$as_me:23282: checking if you want XHTML and SVG screen dump support" >&5
23283 echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6
23284
23285 # Check whether --enable-screen-dumps or --disable-screen-dumps was given.
23286 if test "${enable_screen_dumps+set}" = set; then
23287 enableval="$enable_screen_dumps"
23288 test "$enableval" != no && enableval=yes
23289 if test "$enableval" != "yes" ; then
23290 enable_screen_dumps=no
23291 else
23292 enable_screen_dumps=yes
23293 fi
23294 else
23295 enableval=yes
23296 enable_screen_dumps=yes
23297
23298 fi;
23299 echo "$as_me:23299: result: $enable_screen_dumps" >&5
23300 echo "${ECHO_T}$enable_screen_dumps" >&6
23301 if test "$enable_screen_dumps" = yes ; then
23302 EXTRASRCS="$EXTRASRCS html.c svg.c"
23303 EXTRAOBJS="$EXTRAOBJS html.o svg.o"
23304 else
23305
23306 cat >>confdefs.h <<\EOF
23307 #define OPT_SCREEN_DUMPS 0
23308 EOF
23309
23310 fi
23311
23312 echo "$as_me:23312: checking if you want ReGIS graphics support" >&5
23313 echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
23314
23315 # Check whether --enable-regis-graphics or --disable-regis-graphics was given.
23316 if test "${enable_regis_graphics+set}" = set; then
23317 enableval="$enable_regis_graphics"
23318 test "$enableval" != yes && enableval=no
23319 if test "$enableval" != "no" ; then
23320 enable_regis_graphics=yes
23321 else
23322 enable_regis_graphics=no
23323 fi
23324 else
23325 enableval=no
23326 enable_regis_graphics=no
23327
23328 fi;
23329 echo "$as_me:23329: result: $enable_regis_graphics" >&5
23330 echo "${ECHO_T}$enable_regis_graphics" >&6
23331 if test "$enable_regis_graphics" = yes ; then
23332
23333 cat >>confdefs.h <<\EOF
23334 #define OPT_REGIS_GRAPHICS 1
23335 EOF
23336
23337 EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
23338 EXTRASRCS="$EXTRASRCS graphics_regis.c"
23339 EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
23340
23341 echo "$as_me:23341: checking if -lm needed for math functions" >&5
23342 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
23343 if test "${cf_cv_need_libm+set}" = set; then
23344 echo $ECHO_N "(cached) $ECHO_C" >&6
23345 else
23346
23347 cat >"conftest.$ac_ext" <<_ACEOF
23348 #line 23348 "configure"
23349 #include "confdefs.h"
23350
23351 #include <stdio.h>
23352 #include <stdlib.h>
23353 #include <math.h>
23354
23355 int
23356 main (void)
23357 {
23358 double x = rand(); printf("result = %g\\n", sin(x))
23359 ;
23360 return 0;
23361 }
23362 _ACEOF
23363 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23364 if { (eval echo "$as_me:23364: \"$ac_link\"") >&5
23365 (eval $ac_link) 2>&5
23366 ac_status=$?
23367 echo "$as_me:23367: \$? = $ac_status" >&5
23368 (exit "$ac_status"); } &&
23369 { ac_try='test -s "conftest$ac_exeext"'
23370 { (eval echo "$as_me:23370: \"$ac_try\"") >&5
23371 (eval $ac_try) 2>&5
23372 ac_status=$?
23373 echo "$as_me:23373: \$? = $ac_status" >&5
23374 (exit "$ac_status"); }; }; then
23375 cf_cv_need_libm=no
23376 else
23377 echo "$as_me: failed program was:" >&5
23378 cat "conftest.$ac_ext" >&5
23379 cf_cv_need_libm=yes
23380 fi
23381 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23382 fi
23383 echo "$as_me:23383: result: $cf_cv_need_libm" >&5
23384 echo "${ECHO_T}$cf_cv_need_libm" >&6
23385
23386 if test "$cf_cv_need_libm" = yes
23387 then
23388
23389 cf_save_LIBS="$LIBS"
23390 LIBS="$LIBS -lm"
23391 echo "$as_me:23391: checking if -lm is available for math functions" >&5
23392 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
23393 if test "${cf_cv_have_libm+set}" = set; then
23394 echo $ECHO_N "(cached) $ECHO_C" >&6
23395 else
23396
23397 cat >"conftest.$ac_ext" <<_ACEOF
23398 #line 23398 "configure"
23399 #include "confdefs.h"
23400
23401 #include <stdio.h>
23402 #include <stdlib.h>
23403 #include <math.h>
23404
23405 int
23406 main (void)
23407 {
23408 double x = rand(); printf("result = %g\\n", sin(x))
23409 ;
23410 return 0;
23411 }
23412 _ACEOF
23413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23414 if { (eval echo "$as_me:23414: \"$ac_link\"") >&5
23415 (eval $ac_link) 2>&5
23416 ac_status=$?
23417 echo "$as_me:23417: \$? = $ac_status" >&5
23418 (exit "$ac_status"); } &&
23419 { ac_try='test -s "conftest$ac_exeext"'
23420 { (eval echo "$as_me:23420: \"$ac_try\"") >&5
23421 (eval $ac_try) 2>&5
23422 ac_status=$?
23423 echo "$as_me:23423: \$? = $ac_status" >&5
23424 (exit "$ac_status"); }; }; then
23425 cf_cv_have_libm=yes
23426 else
23427 echo "$as_me: failed program was:" >&5
23428 cat "conftest.$ac_ext" >&5
23429 cf_cv_have_libm=no
23430 fi
23431 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23432 fi
23433 echo "$as_me:23433: result: $cf_cv_have_libm" >&5
23434 echo "${ECHO_T}$cf_cv_have_libm" >&6
23435 LIBS="$cf_save_LIBS"
23436
23437 if test "$cf_cv_have_libm" = yes
23438 then
23439
23440 cf_add_libs="$LIBS"
23441 # reverse order
23442 cf_add_0lib=
23443 for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23444 # filter duplicates
23445 for cf_add_1lib in $cf_add_0lib; do
23446 for cf_add_2lib in $cf_add_libs; do
23447 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23448 cf_add_1lib=
23449 break
23450 fi
23451 done
23452 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23453 done
23454 LIBS="$cf_add_libs"
23455
23456 fi
23457 else
23458 cf_cv_have_libm=yes
23459 fi
23460
23461 if test "$cf_cv_have_libm" = yes
23462 then
23463
23464 cat >>confdefs.h <<\EOF
23465 #define HAVE_MATH_FUNCS 1
23466 EOF
23467
23468 fi
23469
23470 fi
23471
23472 echo "$as_me:23472: checking if you want sixel graphics support" >&5
23473 echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
23474
23475 # Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
23476 if test "${enable_sixel_graphics+set}" = set; then
23477 enableval="$enable_sixel_graphics"
23478 test "$enableval" != no && enableval=yes
23479 if test "$enableval" != "yes" ; then
23480 enable_sixel_graphics=no
23481 else
23482 enable_sixel_graphics=yes
23483 fi
23484 else
23485 enableval=yes
23486 enable_sixel_graphics=yes
23487
23488 fi;
23489 echo "$as_me:23489: result: $enable_sixel_graphics" >&5
23490 echo "${ECHO_T}$enable_sixel_graphics" >&6
23491 if test "$enable_sixel_graphics" = yes ; then
23492
23493 cat >>confdefs.h <<\EOF
23494 #define OPT_SIXEL_GRAPHICS 1
23495 EOF
23496
23497 EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
23498 EXTRASRCS="$EXTRASRCS graphics_sixel.c"
23499 EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
23500 fi
23501
23502 if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
23503
23504 cat >>confdefs.h <<\EOF
23505 #define OPT_GRAPHICS 1
23506 EOF
23507
23508 EXTRAHDRS="$EXTRAHDRS graphics.h"
23509 EXTRASRCS="$EXTRASRCS graphics.c"
23510 EXTRAOBJS="$EXTRAOBJS graphics.o"
23511 STRINGS_MAX=600000
23512 else
23513 STRINGS_MAX=20000
23514 fi
23515
23516 echo "$as_me:23516: checking if you want sixel screen dump support" >&5
23517 echo $ECHO_N "checking if you want sixel screen dump support... $ECHO_C" >&6
23518
23519 # Check whether --enable-print-graphics or --disable-print-graphics was given.
23520 if test "${enable_print_graphics+set}" = set; then
23521 enableval="$enable_print_graphics"
23522 test "$enableval" != no && enableval=yes
23523 if test "$enableval" != "yes" ; then
23524 enable_print_graphics=no
23525 else
23526 enable_print_graphics=$enable_regis_graphics
23527 fi
23528 else
23529 enableval=yes
23530 enable_print_graphics=$enable_regis_graphics
23531
23532 fi;
23533 echo "$as_me:23533: result: $enable_print_graphics" >&5
23534 echo "${ECHO_T}$enable_print_graphics" >&6
23535 if test "$enable_print_graphics" = yes ; then
23536
23537 cat >>confdefs.h <<\EOF
23538 #define OPT_PRINT_GRAPHICS 1
23539 EOF
23540
23541 fi
23542
23543 echo "$as_me:23543: checking if you want VT420 rectangle support" >&5
23544 echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
23545
23546 # Check whether --enable-rectangles or --disable-rectangles was given.
23547 if test "${enable_rectangles+set}" = set; then
23548 enableval="$enable_rectangles"
23549 test "$enableval" != no && enableval=yes
23550 if test "$enableval" != "yes" ; then
23551 enable_rectangles=no
23552 else
23553 enable_rectangles=yes
23554 fi
23555 else
23556 enableval=yes
23557 enable_rectangles=yes
23558
23559 fi;
23560 echo "$as_me:23560: result: $enable_rectangles" >&5
23561 echo "${ECHO_T}$enable_rectangles" >&6
23562 if test "$enable_rectangles" = no ; then
23563
23564 cat >>confdefs.h <<\EOF
23565 #define OPT_DEC_RECTOPS 0
23566 EOF
23567
23568 fi
23569
23570 echo "$as_me:23570: checking if you want -ziconbeep option" >&5
23571 echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
23572
23573 # Check whether --enable-ziconbeep or --disable-ziconbeep was given.
23574 if test "${enable_ziconbeep+set}" = set; then
23575 enableval="$enable_ziconbeep"
23576 test "$enableval" != no && enableval=yes
23577 if test "$enableval" != "yes" ; then
23578 enable_ziconbeep=no
23579 else
23580 enable_ziconbeep=yes
23581 fi
23582 else
23583 enableval=yes
23584 enable_ziconbeep=yes
23585
23586 fi;
23587 echo "$as_me:23587: result: $enable_ziconbeep" >&5
23588 echo "${ECHO_T}$enable_ziconbeep" >&6
23589 test "$enable_ziconbeep" = no &&
23590 cat >>confdefs.h <<\EOF
23591 #define OPT_ZICONBEEP 0
23592 EOF
23593
23594 ###############################################################################
23595
23596 echo "$as_me:23596: checking if you want debugging traces" >&5
23597 echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
23598
23599 # Check whether --enable-trace or --disable-trace was given.
23600 if test "${enable_trace+set}" = set; then
23601 enableval="$enable_trace"
23602 test "$enableval" != yes && enableval=no
23603 if test "$enableval" != "no" ; then
23604 enable_trace=yes
23605 else
23606 enable_trace=no
23607 fi
23608 else
23609 enableval=no
23610 enable_trace=no
23611
23612 fi;
23613 echo "$as_me:23613: result: $enable_trace" >&5
23614 echo "${ECHO_T}$enable_trace" >&6
23615 if test "$enable_trace" = yes ; then
23616
23617 cat >>confdefs.h <<\EOF
23618 #define OPT_TRACE 1
23619 EOF
23620
23621 EXTRASRCS="$EXTRASRCS trace.c"
23622 EXTRAOBJS="$EXTRAOBJS trace.o"
23623 fi
23624
23625 echo "$as_me:23625: checking if you want to use dmalloc for testing" >&5
23626 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
23627
23628 # Check whether --with-dmalloc or --without-dmalloc was given.
23629 if test "${with_dmalloc+set}" = set; then
23630 withval="$with_dmalloc"
23631 case "x$withval" in
23632 (x|xno) ;;
23633 (*)
23634 : "${with_cflags:=-g}"
23635 : "${enable_leaks:=no}"
23636 with_dmalloc=yes
23637
23638 cat >>confdefs.h <<EOF
23639 #define USE_DMALLOC 1
23640 EOF
23641
23642 ;;
23643 esac
23644 else
23645 with_dmalloc=
23646 fi;
23647 echo "$as_me:23647: result: ${with_dmalloc:-no}" >&5
23648 echo "${ECHO_T}${with_dmalloc:-no}" >&6
23649
23650 case ".$with_cflags" in
23651 (.*-g*)
23652 case .$CFLAGS in
23653 (.*-g*)
23654 ;;
23655 (*)
23656
23657 cf_fix_cppflags=no
23658 cf_new_cflags=
23659 cf_new_cppflags=
23660 cf_new_extra_cppflags=
23661
23662 for cf_add_cflags in -g
23663 do
23664 case "$cf_fix_cppflags" in
23665 (no)
23666 case "$cf_add_cflags" in
23667 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23668 case "$cf_add_cflags" in
23669 (-D*)
23670 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23671
23672 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23673 && test -z "${cf_tst_cflags}" \
23674 && cf_fix_cppflags=yes
23675
23676 if test "$cf_fix_cppflags" = yes ; then
23677
23678 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23679 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23680
23681 continue
23682 elif test "${cf_tst_cflags}" = "\"'" ; then
23683
23684 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23685 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23686
23687 continue
23688 fi
23689 ;;
23690 esac
23691 case "$CPPFLAGS" in
23692 (*$cf_add_cflags)
23693 ;;
23694 (*)
23695 case "$cf_add_cflags" in
23696 (-D*)
23697 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23698
23699 CPPFLAGS=`echo "$CPPFLAGS" | \
23700 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23701 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23702
23703 ;;
23704 esac
23705
23706 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23707 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23708
23709 ;;
23710 esac
23711 ;;
23712 (*)
23713
23714 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23715 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23716
23717 ;;
23718 esac
23719 ;;
23720 (yes)
23721
23722 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23723 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23724
23725 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23726
23727 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23728 && test -z "${cf_tst_cflags}" \
23729 && cf_fix_cppflags=no
23730 ;;
23731 esac
23732 done
23733
23734 if test -n "$cf_new_cflags" ; then
23735
23736 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23737 CFLAGS="${CFLAGS}$cf_new_cflags"
23738
23739 fi
23740
23741 if test -n "$cf_new_cppflags" ; then
23742
23743 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23744 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23745
23746 fi
23747
23748 if test -n "$cf_new_extra_cppflags" ; then
23749
23750 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23751 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23752
23753 fi
23754
23755 ;;
23756 esac
23757 ;;
23758 esac
23759
23760 if test "$with_dmalloc" = yes ; then
23761 echo "$as_me:23761: checking for dmalloc.h" >&5
23762 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
23763 if test "${ac_cv_header_dmalloc_h+set}" = set; then
23764 echo $ECHO_N "(cached) $ECHO_C" >&6
23765 else
23766 cat >"conftest.$ac_ext" <<_ACEOF
23767 #line 23767 "configure"
23768 #include "confdefs.h"
23769 #include <dmalloc.h>
23770 _ACEOF
23771 if { (eval echo "$as_me:23771: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23772 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23773 ac_status=$?
23774 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23775 rm -f conftest.er1
23776 cat conftest.err >&5
23777 echo "$as_me:23777: \$? = $ac_status" >&5
23778 (exit "$ac_status"); } >/dev/null; then
23779 if test -s conftest.err; then
23780 ac_cpp_err=$ac_c_preproc_warn_flag
23781 else
23782 ac_cpp_err=
23783 fi
23784 else
23785 ac_cpp_err=yes
23786 fi
23787 if test -z "$ac_cpp_err"; then
23788 ac_cv_header_dmalloc_h=yes
23789 else
23790 echo "$as_me: failed program was:" >&5
23791 cat "conftest.$ac_ext" >&5
23792 ac_cv_header_dmalloc_h=no
23793 fi
23794 rm -f conftest.err "conftest.$ac_ext"
23795 fi
23796 echo "$as_me:23796: result: $ac_cv_header_dmalloc_h" >&5
23797 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
23798 if test "$ac_cv_header_dmalloc_h" = yes; then
23799
23800 echo "$as_me:23800: checking for dmalloc_debug in -ldmalloc" >&5
23801 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
23802 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
23803 echo $ECHO_N "(cached) $ECHO_C" >&6
23804 else
23805 ac_check_lib_save_LIBS=$LIBS
23806 LIBS="-ldmalloc $LIBS"
23807 cat >"conftest.$ac_ext" <<_ACEOF
23808 #line 23808 "configure"
23809 #include "confdefs.h"
23810
23811 /* Override any gcc2 internal prototype to avoid an error. */
23812 #ifdef __cplusplus
23813 extern "C"
23814 #endif
23815 /* We use char because int might match the return type of a gcc2
23816 builtin and then its argument prototype would still apply. */
23817 char dmalloc_debug (void);
23818 int
23819 main (void)
23820 {
23821 dmalloc_debug ();
23822 ;
23823 return 0;
23824 }
23825 _ACEOF
23826 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23827 if { (eval echo "$as_me:23827: \"$ac_link\"") >&5
23828 (eval $ac_link) 2>&5
23829 ac_status=$?
23830 echo "$as_me:23830: \$? = $ac_status" >&5
23831 (exit "$ac_status"); } &&
23832 { ac_try='test -s "conftest$ac_exeext"'
23833 { (eval echo "$as_me:23833: \"$ac_try\"") >&5
23834 (eval $ac_try) 2>&5
23835 ac_status=$?
23836 echo "$as_me:23836: \$? = $ac_status" >&5
23837 (exit "$ac_status"); }; }; then
23838 ac_cv_lib_dmalloc_dmalloc_debug=yes
23839 else
23840 echo "$as_me: failed program was:" >&5
23841 cat "conftest.$ac_ext" >&5
23842 ac_cv_lib_dmalloc_dmalloc_debug=no
23843 fi
23844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23845 LIBS=$ac_check_lib_save_LIBS
23846 fi
23847 echo "$as_me:23847: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
23848 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
23849 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
23850 cat >>confdefs.h <<EOF
23851 #define HAVE_LIBDMALLOC 1
23852 EOF
23853
23854 LIBS="-ldmalloc $LIBS"
23855
23856 fi
23857
23858 fi
23859
23860 fi
23861
23862 echo "$as_me:23862: checking if you want to use dbmalloc for testing" >&5
23863 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
23864
23865 # Check whether --with-dbmalloc or --without-dbmalloc was given.
23866 if test "${with_dbmalloc+set}" = set; then
23867 withval="$with_dbmalloc"
23868 case "x$withval" in
23869 (x|xno) ;;
23870 (*)
23871 : "${with_cflags:=-g}"
23872 : "${enable_leaks:=no}"
23873 with_dbmalloc=yes
23874
23875 cat >>confdefs.h <<EOF
23876 #define USE_DBMALLOC 1
23877 EOF
23878
23879 ;;
23880 esac
23881 else
23882 with_dbmalloc=
23883 fi;
23884 echo "$as_me:23884: result: ${with_dbmalloc:-no}" >&5
23885 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
23886
23887 case ".$with_cflags" in
23888 (.*-g*)
23889 case .$CFLAGS in
23890 (.*-g*)
23891 ;;
23892 (*)
23893
23894 cf_fix_cppflags=no
23895 cf_new_cflags=
23896 cf_new_cppflags=
23897 cf_new_extra_cppflags=
23898
23899 for cf_add_cflags in -g
23900 do
23901 case "$cf_fix_cppflags" in
23902 (no)
23903 case "$cf_add_cflags" in
23904 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23905 case "$cf_add_cflags" in
23906 (-D*)
23907 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23908
23909 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23910 && test -z "${cf_tst_cflags}" \
23911 && cf_fix_cppflags=yes
23912
23913 if test "$cf_fix_cppflags" = yes ; then
23914
23915 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23916 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23917
23918 continue
23919 elif test "${cf_tst_cflags}" = "\"'" ; then
23920
23921 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23922 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23923
23924 continue
23925 fi
23926 ;;
23927 esac
23928 case "$CPPFLAGS" in
23929 (*$cf_add_cflags)
23930 ;;
23931 (*)
23932 case "$cf_add_cflags" in
23933 (-D*)
23934 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23935
23936 CPPFLAGS=`echo "$CPPFLAGS" | \
23937 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23938 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23939
23940 ;;
23941 esac
23942
23943 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23944 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23945
23946 ;;
23947 esac
23948 ;;
23949 (*)
23950
23951 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23952 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23953
23954 ;;
23955 esac
23956 ;;
23957 (yes)
23958
23959 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23960 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23961
23962 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23963
23964 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23965 && test -z "${cf_tst_cflags}" \
23966 && cf_fix_cppflags=no
23967 ;;
23968 esac
23969 done
23970
23971 if test -n "$cf_new_cflags" ; then
23972
23973 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23974 CFLAGS="${CFLAGS}$cf_new_cflags"
23975
23976 fi
23977
23978 if test -n "$cf_new_cppflags" ; then
23979
23980 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23981 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23982
23983 fi
23984
23985 if test -n "$cf_new_extra_cppflags" ; then
23986
23987 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23988 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23989
23990 fi
23991
23992 ;;
23993 esac
23994 ;;
23995 esac
23996
23997 if test "$with_dbmalloc" = yes ; then
23998 echo "$as_me:23998: checking for dbmalloc.h" >&5
23999 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
24000 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
24001 echo $ECHO_N "(cached) $ECHO_C" >&6
24002 else
24003 cat >"conftest.$ac_ext" <<_ACEOF
24004 #line 24004 "configure"
24005 #include "confdefs.h"
24006 #include <dbmalloc.h>
24007 _ACEOF
24008 if { (eval echo "$as_me:24008: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24009 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24010 ac_status=$?
24011 $EGREP -v '^ *\+' conftest.er1 >conftest.err
24012 rm -f conftest.er1
24013 cat conftest.err >&5
24014 echo "$as_me:24014: \$? = $ac_status" >&5
24015 (exit "$ac_status"); } >/dev/null; then
24016 if test -s conftest.err; then
24017 ac_cpp_err=$ac_c_preproc_warn_flag
24018 else
24019 ac_cpp_err=
24020 fi
24021 else
24022 ac_cpp_err=yes
24023 fi
24024 if test -z "$ac_cpp_err"; then
24025 ac_cv_header_dbmalloc_h=yes
24026 else
24027 echo "$as_me: failed program was:" >&5
24028 cat "conftest.$ac_ext" >&5
24029 ac_cv_header_dbmalloc_h=no
24030 fi
24031 rm -f conftest.err "conftest.$ac_ext"
24032 fi
24033 echo "$as_me:24033: result: $ac_cv_header_dbmalloc_h" >&5
24034 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
24035 if test "$ac_cv_header_dbmalloc_h" = yes; then
24036
24037 echo "$as_me:24037: checking for debug_malloc in -ldbmalloc" >&5
24038 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
24039 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
24040 echo $ECHO_N "(cached) $ECHO_C" >&6
24041 else
24042 ac_check_lib_save_LIBS=$LIBS
24043 LIBS="-ldbmalloc $LIBS"
24044 cat >"conftest.$ac_ext" <<_ACEOF
24045 #line 24045 "configure"
24046 #include "confdefs.h"
24047
24048 /* Override any gcc2 internal prototype to avoid an error. */
24049 #ifdef __cplusplus
24050 extern "C"
24051 #endif
24052 /* We use char because int might match the return type of a gcc2
24053 builtin and then its argument prototype would still apply. */
24054 char debug_malloc (void);
24055 int
24056 main (void)
24057 {
24058 debug_malloc ();
24059 ;
24060 return 0;
24061 }
24062 _ACEOF
24063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24064 if { (eval echo "$as_me:24064: \"$ac_link\"") >&5
24065 (eval $ac_link) 2>&5
24066 ac_status=$?
24067 echo "$as_me:24067: \$? = $ac_status" >&5
24068 (exit "$ac_status"); } &&
24069 { ac_try='test -s "conftest$ac_exeext"'
24070 { (eval echo "$as_me:24070: \"$ac_try\"") >&5
24071 (eval $ac_try) 2>&5
24072 ac_status=$?
24073 echo "$as_me:24073: \$? = $ac_status" >&5
24074 (exit "$ac_status"); }; }; then
24075 ac_cv_lib_dbmalloc_debug_malloc=yes
24076 else
24077 echo "$as_me: failed program was:" >&5
24078 cat "conftest.$ac_ext" >&5
24079 ac_cv_lib_dbmalloc_debug_malloc=no
24080 fi
24081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24082 LIBS=$ac_check_lib_save_LIBS
24083 fi
24084 echo "$as_me:24084: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
24085 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
24086 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
24087 cat >>confdefs.h <<EOF
24088 #define HAVE_LIBDBMALLOC 1
24089 EOF
24090
24091 LIBS="-ldbmalloc $LIBS"
24092
24093 fi
24094
24095 fi
24096
24097 fi
24098
24099 echo "$as_me:24099: checking if you want to use valgrind for testing" >&5
24100 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
24101
24102 # Check whether --with-valgrind or --without-valgrind was given.
24103 if test "${with_valgrind+set}" = set; then
24104 withval="$with_valgrind"
24105 case "x$withval" in
24106 (x|xno) ;;
24107 (*)
24108 : "${with_cflags:=-g}"
24109 : "${enable_leaks:=no}"
24110 with_valgrind=yes
24111
24112 cat >>confdefs.h <<EOF
24113 #define USE_VALGRIND 1
24114 EOF
24115
24116 ;;
24117 esac
24118 else
24119 with_valgrind=
24120 fi;
24121 echo "$as_me:24121: result: ${with_valgrind:-no}" >&5
24122 echo "${ECHO_T}${with_valgrind:-no}" >&6
24123
24124 case ".$with_cflags" in
24125 (.*-g*)
24126 case .$CFLAGS in
24127 (.*-g*)
24128 ;;
24129 (*)
24130
24131 cf_fix_cppflags=no
24132 cf_new_cflags=
24133 cf_new_cppflags=
24134 cf_new_extra_cppflags=
24135
24136 for cf_add_cflags in -g
24137 do
24138 case "$cf_fix_cppflags" in
24139 (no)
24140 case "$cf_add_cflags" in
24141 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24142 case "$cf_add_cflags" in
24143 (-D*)
24144 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24145
24146 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24147 && test -z "${cf_tst_cflags}" \
24148 && cf_fix_cppflags=yes
24149
24150 if test "$cf_fix_cppflags" = yes ; then
24151
24152 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24153 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24154
24155 continue
24156 elif test "${cf_tst_cflags}" = "\"'" ; then
24157
24158 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24159 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24160
24161 continue
24162 fi
24163 ;;
24164 esac
24165 case "$CPPFLAGS" in
24166 (*$cf_add_cflags)
24167 ;;
24168 (*)
24169 case "$cf_add_cflags" in
24170 (-D*)
24171 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24172
24173 CPPFLAGS=`echo "$CPPFLAGS" | \
24174 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
24175 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
24176
24177 ;;
24178 esac
24179
24180 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24181 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24182
24183 ;;
24184 esac
24185 ;;
24186 (*)
24187
24188 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24189 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24190
24191 ;;
24192 esac
24193 ;;
24194 (yes)
24195
24196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24198
24199 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
24200
24201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24202 && test -z "${cf_tst_cflags}" \
24203 && cf_fix_cppflags=no
24204 ;;
24205 esac
24206 done
24207
24208 if test -n "$cf_new_cflags" ; then
24209
24210 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24211 CFLAGS="${CFLAGS}$cf_new_cflags"
24212
24213 fi
24214
24215 if test -n "$cf_new_cppflags" ; then
24216
24217 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24218 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24219
24220 fi
24221
24222 if test -n "$cf_new_extra_cppflags" ; then
24223
24224 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24225 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24226
24227 fi
24228
24229 ;;
24230 esac
24231 ;;
24232 esac
24233
24234 echo "$as_me:24234: checking if you want to perform memory-leak testing" >&5
24235 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
24236
24237 # Check whether --enable-leaks or --disable-leaks was given.
24238 if test "${enable_leaks+set}" = set; then
24239 enableval="$enable_leaks"
24240 enable_leaks=$enableval
24241 else
24242 enable_leaks=yes
24243 fi;
24244 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
24245 echo "$as_me:24245: result: $with_no_leaks" >&5
24246 echo "${ECHO_T}$with_no_leaks" >&6
24247
24248 if test "$enable_leaks" = no ; then
24249
24250 cat >>confdefs.h <<\EOF
24251 #define NO_LEAKS 1
24252 EOF
24253
24254 cat >>confdefs.h <<\EOF
24255 #define YY_NO_LEAKS 1
24256 EOF
24257
24258 fi
24259
24260 echo "$as_me:24260: checking if you want to see long compiling messages" >&5
24261 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
24262
24263 # Check whether --enable-echo or --disable-echo was given.
24264 if test "${enable_echo+set}" = set; then
24265 enableval="$enable_echo"
24266 test "$enableval" != no && enableval=yes
24267 if test "$enableval" != "yes" ; then
24268
24269 ECHO_LT='--silent'
24270 ECHO_LD='@echo linking $@;'
24271 RULE_CC='@echo compiling $<'
24272 SHOW_CC='@echo compiling $@'
24273 ECHO_CC='@'
24274
24275 else
24276
24277 ECHO_LT=''
24278 ECHO_LD=''
24279 RULE_CC=''
24280 SHOW_CC=''
24281 ECHO_CC=''
24282
24283 fi
24284 else
24285 enableval=yes
24286
24287 ECHO_LT=''
24288 ECHO_LD=''
24289 RULE_CC=''
24290 SHOW_CC=''
24291 ECHO_CC=''
24292
24293 fi;
24294 echo "$as_me:24294: result: $enableval" >&5
24295 echo "${ECHO_T}$enableval" >&6
24296
24297 echo "$as_me:24297: checking if you want magic cookie emulation" >&5
24298 echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
24299
24300 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
24301 if test "${enable_xmc_glitch+set}" = set; then
24302 enableval="$enable_xmc_glitch"
24303 test "$enableval" != yes && enableval=no
24304 if test "$enableval" != "no" ; then
24305 enable_xmc=yes
24306 else
24307 enable_xmc=no
24308 fi
24309 else
24310 enableval=no
24311 enable_xmc=no
24312
24313 fi;
24314 echo "$as_me:24314: result: $enable_xmc" >&5
24315 echo "${ECHO_T}$enable_xmc" >&6
24316 if test "$enable_xmc" = yes ; then
24317
24318 cat >>confdefs.h <<\EOF
24319 #define OPT_XMC_GLITCH 1
24320 EOF
24321
24322 EXTRASRCS="$EXTRASRCS testxmc.c"
24323 EXTRAOBJS="$EXTRAOBJS testxmc.o"
24324 fi
24325
24326 for ac_func in tigetstr
24327 do
24328 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24329 echo "$as_me:24329: checking for $ac_func" >&5
24330 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24331 if eval "test \"\${$as_ac_var+set}\" = set"; then
24332 echo $ECHO_N "(cached) $ECHO_C" >&6
24333 else
24334 cat >"conftest.$ac_ext" <<_ACEOF
24335 #line 24335 "configure"
24336 #include "confdefs.h"
24337 #define $ac_func autoconf_temporary
24338 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
24339 #undef $ac_func
24340
24341 #ifdef __cplusplus
24342 extern "C"
24343 #endif
24344
24345 /* We use char because int might match the return type of a gcc2
24346 builtin and then its argument prototype would still apply. */
24347 char $ac_func (void);
24348
24349 int
24350 main (void)
24351 {
24352
24353 /* The GNU C library defines stubs for functions which it implements
24354 to always fail with ENOSYS. Some functions are actually named
24355 something starting with __ and the normal name is an alias. */
24356 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24357 #error found stub for $ac_func
24358 #endif
24359
24360 return $ac_func ();
24361 ;
24362 return 0;
24363 }
24364 _ACEOF
24365 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24366 if { (eval echo "$as_me:24366: \"$ac_link\"") >&5
24367 (eval $ac_link) 2>&5
24368 ac_status=$?
24369 echo "$as_me:24369: \$? = $ac_status" >&5
24370 (exit "$ac_status"); } &&
24371 { ac_try='test -s "conftest$ac_exeext"'
24372 { (eval echo "$as_me:24372: \"$ac_try\"") >&5
24373 (eval $ac_try) 2>&5
24374 ac_status=$?
24375 echo "$as_me:24375: \$? = $ac_status" >&5
24376 (exit "$ac_status"); }; }; then
24377 eval "$as_ac_var=yes"
24378 else
24379 echo "$as_me: failed program was:" >&5
24380 cat "conftest.$ac_ext" >&5
24381 eval "$as_ac_var=no"
24382 fi
24383 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24384 fi
24385 echo "$as_me:24385: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24386 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24387 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24388 cat >>confdefs.h <<EOF
24389 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24390 EOF
24391
24392 fi
24393 done
24394
24395 if test -n "$cf_cv_lib_part_tgetent"; then
24396
24397 for ac_func in use_extended_names
24398 do
24399 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24400 echo "$as_me:24400: checking for $ac_func" >&5
24401 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24402 if eval "test \"\${$as_ac_var+set}\" = set"; then
24403 echo $ECHO_N "(cached) $ECHO_C" >&6
24404 else
24405 cat >"conftest.$ac_ext" <<_ACEOF
24406 #line 24406 "configure"
24407 #include "confdefs.h"
24408 #define $ac_func autoconf_temporary
24409 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
24410 #undef $ac_func
24411
24412 #ifdef __cplusplus
24413 extern "C"
24414 #endif
24415
24416 /* We use char because int might match the return type of a gcc2
24417 builtin and then its argument prototype would still apply. */
24418 char $ac_func (void);
24419
24420 int
24421 main (void)
24422 {
24423
24424 /* The GNU C library defines stubs for functions which it implements
24425 to always fail with ENOSYS. Some functions are actually named
24426 something starting with __ and the normal name is an alias. */
24427 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24428 #error found stub for $ac_func
24429 #endif
24430
24431 return $ac_func ();
24432 ;
24433 return 0;
24434 }
24435 _ACEOF
24436 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24437 if { (eval echo "$as_me:24437: \"$ac_link\"") >&5
24438 (eval $ac_link) 2>&5
24439 ac_status=$?
24440 echo "$as_me:24440: \$? = $ac_status" >&5
24441 (exit "$ac_status"); } &&
24442 { ac_try='test -s "conftest$ac_exeext"'
24443 { (eval echo "$as_me:24443: \"$ac_try\"") >&5
24444 (eval $ac_try) 2>&5
24445 ac_status=$?
24446 echo "$as_me:24446: \$? = $ac_status" >&5
24447 (exit "$ac_status"); }; }; then
24448 eval "$as_ac_var=yes"
24449 else
24450 echo "$as_me: failed program was:" >&5
24451 cat "conftest.$ac_ext" >&5
24452 eval "$as_ac_var=no"
24453 fi
24454 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24455 fi
24456 echo "$as_me:24456: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24457 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24458 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24459 cat >>confdefs.h <<EOF
24460 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24461 EOF
24462
24463 fi
24464 done
24465
24466 fi
24467
24468 echo "$as_me:24468: checking if you want to use C11 _Noreturn feature" >&5
24469 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
24470
24471 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
24472 if test "${enable_stdnoreturn+set}" = set; then
24473 enableval="$enable_stdnoreturn"
24474 test "$enableval" != yes && enableval=no
24475 if test "$enableval" != "no" ; then
24476 enable_stdnoreturn=yes
24477 else
24478 enable_stdnoreturn=no
24479 fi
24480 else
24481 enableval=no
24482 enable_stdnoreturn=no
24483
24484 fi;
24485 echo "$as_me:24485: result: $enable_stdnoreturn" >&5
24486 echo "${ECHO_T}$enable_stdnoreturn" >&6
24487
24488 if test $enable_stdnoreturn = yes; then
24489 echo "$as_me:24489: checking for C11 _Noreturn feature" >&5
24490 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
24491 if test "${cf_cv_c11_noreturn+set}" = set; then
24492 echo $ECHO_N "(cached) $ECHO_C" >&6
24493 else
24494 cat >"conftest.$ac_ext" <<_ACEOF
24495 #line 24495 "configure"
24496 #include "confdefs.h"
24497
24498 $ac_includes_default
24499 #include <stdnoreturn.h>
24500 static _Noreturn void giveup(void) { exit(0); }
24501
24502 int
24503 main (void)
24504 {
24505 if (feof(stdin)) giveup()
24506 ;
24507 return 0;
24508 }
24509 _ACEOF
24510 rm -f "conftest.$ac_objext"
24511 if { (eval echo "$as_me:24511: \"$ac_compile\"") >&5
24512 (eval $ac_compile) 2>&5
24513 ac_status=$?
24514 echo "$as_me:24514: \$? = $ac_status" >&5
24515 (exit "$ac_status"); } &&
24516 { ac_try='test -s "conftest.$ac_objext"'
24517 { (eval echo "$as_me:24517: \"$ac_try\"") >&5
24518 (eval $ac_try) 2>&5
24519 ac_status=$?
24520 echo "$as_me:24520: \$? = $ac_status" >&5
24521 (exit "$ac_status"); }; }; then
24522 cf_cv_c11_noreturn=yes
24523 else
24524 echo "$as_me: failed program was:" >&5
24525 cat "conftest.$ac_ext" >&5
24526 cf_cv_c11_noreturn=no
24527 fi
24528 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24529
24530 fi
24531 echo "$as_me:24531: result: $cf_cv_c11_noreturn" >&5
24532 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
24533 else
24534 cf_cv_c11_noreturn=no,
24535 fi
24536
24537 if test "$cf_cv_c11_noreturn" = yes; then
24538
24539 cat >>confdefs.h <<\EOF
24540 #define HAVE_STDNORETURN_H 1
24541 EOF
24542
24543 cat >>confdefs.h <<EOF
24544 #define STDC_NORETURN _Noreturn
24545 EOF
24546
24547 HAVE_STDNORETURN_H=1
24548 else
24549 HAVE_STDNORETURN_H=0
24550 fi
24551
24552 if test "$GCC" = yes || test "$GXX" = yes
24553 then
24554
24555 if test "$GCC" = yes || test "$GXX" = yes
24556 then
24557 case $CFLAGS in
24558 (*-Werror=*)
24559 cf_temp_flags=
24560 for cf_temp_scan in $CFLAGS
24561 do
24562 case "x$cf_temp_scan" in
24563 (x-Werror=format*)
24564
24565 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24566 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24567
24568 ;;
24569 (x-Werror=*)
24570
24571 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
24572 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
24573
24574 ;;
24575 (*)
24576
24577 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24578 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24579
24580 ;;
24581 esac
24582 done
24583 if test "x$CFLAGS" != "x$cf_temp_flags"
24584 then
24585 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
24586
24587 echo "${as_me:-configure}:24587: testing repairing CFLAGS: $CFLAGS ..." 1>&5
24588
24589 CFLAGS="$cf_temp_flags"
24590 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
24591
24592 echo "${as_me:-configure}:24592: testing ... fixed $CFLAGS ..." 1>&5
24593
24594 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
24595
24596 echo "${as_me:-configure}:24596: testing ... extra $EXTRA_CFLAGS ..." 1>&5
24597
24598 fi
24599 ;;
24600 esac
24601 fi
24602
24603 if test "$GCC" = yes || test "$GXX" = yes
24604 then
24605 case $CPPFLAGS in
24606 (*-Werror=*)
24607 cf_temp_flags=
24608 for cf_temp_scan in $CPPFLAGS
24609 do
24610 case "x$cf_temp_scan" in
24611 (x-Werror=format*)
24612
24613 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24614 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24615
24616 ;;
24617 (x-Werror=*)
24618
24619 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
24620 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
24621
24622 ;;
24623 (*)
24624
24625 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24626 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24627
24628 ;;
24629 esac
24630 done
24631 if test "x$CPPFLAGS" != "x$cf_temp_flags"
24632 then
24633 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
24634
24635 echo "${as_me:-configure}:24635: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
24636
24637 CPPFLAGS="$cf_temp_flags"
24638 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
24639
24640 echo "${as_me:-configure}:24640: testing ... fixed $CPPFLAGS ..." 1>&5
24641
24642 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
24643
24644 echo "${as_me:-configure}:24644: testing ... extra $EXTRA_CFLAGS ..." 1>&5
24645
24646 fi
24647 ;;
24648 esac
24649 fi
24650
24651 if test "$GCC" = yes || test "$GXX" = yes
24652 then
24653 case $LDFLAGS in
24654 (*-Werror=*)
24655 cf_temp_flags=
24656 for cf_temp_scan in $LDFLAGS
24657 do
24658 case "x$cf_temp_scan" in
24659 (x-Werror=format*)
24660
24661 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24662 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24663
24664 ;;
24665 (x-Werror=*)
24666
24667 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
24668 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
24669
24670 ;;
24671 (*)
24672
24673 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
24674 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
24675
24676 ;;
24677 esac
24678 done
24679 if test "x$LDFLAGS" != "x$cf_temp_flags"
24680 then
24681 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
24682
24683 echo "${as_me:-configure}:24683: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
24684
24685 LDFLAGS="$cf_temp_flags"
24686 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
24687
24688 echo "${as_me:-configure}:24688: testing ... fixed $LDFLAGS ..." 1>&5
24689
24690 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
24691
24692 echo "${as_me:-configure}:24692: testing ... extra $EXTRA_CFLAGS ..." 1>&5
24693
24694 fi
24695 ;;
24696 esac
24697 fi
24698
24699 echo "$as_me:24699: checking if you want to turn on gcc warnings" >&5
24700 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
24701
24702 # Check whether --enable-warnings or --disable-warnings was given.
24703 if test "${enable_warnings+set}" = set; then
24704 enableval="$enable_warnings"
24705 test "$enableval" != yes && enableval=no
24706 if test "$enableval" != "no" ; then
24707 enable_warnings=yes
24708 else
24709 enable_warnings=no
24710 fi
24711 else
24712 enableval=no
24713 enable_warnings=no
24714
24715 fi;
24716 echo "$as_me:24716: result: $enable_warnings" >&5
24717 echo "${ECHO_T}$enable_warnings" >&6
24718 if test "$enable_warnings" = "yes"
24719 then
24720
24721 if test "x$have_x" = xyes; then
24722
24723 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
24724 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
24725 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
24726 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
24727 for cf_X_CFLAGS in $X_CFLAGS
24728 do
24729 case "x$cf_X_CFLAGS" in
24730 x-[IUD]*)
24731 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
24732 ;;
24733 *)
24734 CFLAGS="$CFLAGS $cf_X_CFLAGS"
24735 ;;
24736 esac
24737 done
24738
24739 cat >"conftest.$ac_ext" <<_ACEOF
24740 #line 24740 "configure"
24741 #include "confdefs.h"
24742
24743 #include <stdlib.h>
24744 #include <X11/Intrinsic.h>
24745
24746 int
24747 main (void)
24748 {
24749 String foo = malloc(1); free((void*)foo)
24750 ;
24751 return 0;
24752 }
24753 _ACEOF
24754 rm -f "conftest.$ac_objext"
24755 if { (eval echo "$as_me:24755: \"$ac_compile\"") >&5
24756 (eval $ac_compile) 2>&5
24757 ac_status=$?
24758 echo "$as_me:24758: \$? = $ac_status" >&5
24759 (exit "$ac_status"); } &&
24760 { ac_try='test -s "conftest.$ac_objext"'
24761 { (eval echo "$as_me:24761: \"$ac_try\"") >&5
24762 (eval $ac_try) 2>&5
24763 ac_status=$?
24764 echo "$as_me:24764: \$? = $ac_status" >&5
24765 (exit "$ac_status"); }; }; then
24766
24767 echo "$as_me:24767: checking for X11/Xt const-feature" >&5
24768 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
24769 if test "${cf_cv_const_x_string+set}" = set; then
24770 echo $ECHO_N "(cached) $ECHO_C" >&6
24771 else
24772
24773 cat >"conftest.$ac_ext" <<_ACEOF
24774 #line 24774 "configure"
24775 #include "confdefs.h"
24776
24777 #undef _CONST_X_STRING
24778 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
24779 #undef XTSTRINGDEFINES /* X11R5 and later */
24780 #include <stdlib.h>
24781 #include <X11/Intrinsic.h>
24782
24783 int
24784 main (void)
24785 {
24786 String foo = malloc(1); *foo = 0
24787 ;
24788 return 0;
24789 }
24790 _ACEOF
24791 rm -f "conftest.$ac_objext"
24792 if { (eval echo "$as_me:24792: \"$ac_compile\"") >&5
24793 (eval $ac_compile) 2>&5
24794 ac_status=$?
24795 echo "$as_me:24795: \$? = $ac_status" >&5
24796 (exit "$ac_status"); } &&
24797 { ac_try='test -s "conftest.$ac_objext"'
24798 { (eval echo "$as_me:24798: \"$ac_try\"") >&5
24799 (eval $ac_try) 2>&5
24800 ac_status=$?
24801 echo "$as_me:24801: \$? = $ac_status" >&5
24802 (exit "$ac_status"); }; }; then
24803
24804 cf_cv_const_x_string=no
24805
24806 else
24807 echo "$as_me: failed program was:" >&5
24808 cat "conftest.$ac_ext" >&5
24809
24810 cf_cv_const_x_string=yes
24811
24812 fi
24813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24814
24815 fi
24816 echo "$as_me:24816: result: $cf_cv_const_x_string" >&5
24817 echo "${ECHO_T}$cf_cv_const_x_string" >&6
24818
24819 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
24820 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
24821 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
24822
24823 case "$cf_cv_const_x_string" in
24824 (no)
24825
24826 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24827 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
24828
24829 ;;
24830 (*)
24831
24832 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24833 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
24834
24835 ;;
24836 esac
24837
24838 else
24839 echo "$as_me: failed program was:" >&5
24840 cat "conftest.$ac_ext" >&5
24841 fi
24842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24843 fi
24844 cat > "conftest.$ac_ext" <<EOF
24845 #line 24845 "${as_me:-configure}"
24846 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
24847 EOF
24848 if test "$INTEL_COMPILER" = yes
24849 then
24850 # The "-wdXXX" options suppress warnings:
24851 # remark #1419: external declaration in primary source file
24852 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
24853 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
24854 # remark #193: zero used for undefined preprocessing identifier
24855 # remark #593: variable "curs_sb_left_arrow" was set but never used
24856 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
24857 # remark #869: parameter "tw" was never referenced
24858 # remark #981: operands are evaluated in unspecified order
24859 # warning #279: controlling expression is constant
24860
24861 { echo "$as_me:24861: checking for $CC warning options..." >&5
24862 echo "$as_me: checking for $CC warning options..." >&6;}
24863 cf_save_CFLAGS="$CFLAGS"
24864 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
24865 for cf_opt in \
24866 wd1419 \
24867 wd1683 \
24868 wd1684 \
24869 wd193 \
24870 wd593 \
24871 wd279 \
24872 wd810 \
24873 wd869 \
24874 wd981
24875 do
24876 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24877 if { (eval echo "$as_me:24877: \"$ac_compile\"") >&5
24878 (eval $ac_compile) 2>&5
24879 ac_status=$?
24880 echo "$as_me:24880: \$? = $ac_status" >&5
24881 (exit "$ac_status"); }; then
24882 test -n "$verbose" && echo "$as_me:24882: result: ... -$cf_opt" >&5
24883 echo "${ECHO_T}... -$cf_opt" >&6
24884 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24885 fi
24886 done
24887 CFLAGS="$cf_save_CFLAGS"
24888 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
24889 then
24890 { echo "$as_me:24890: checking for $CC warning options..." >&5
24891 echo "$as_me: checking for $CC warning options..." >&6;}
24892 cf_save_CFLAGS="$CFLAGS"
24893 cf_warn_CONST=""
24894 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
24895 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
24896 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
24897 for cf_opt in W Wall \
24898 Wbad-function-cast \
24899 Wcast-align \
24900 Wcast-qual \
24901 Wdeclaration-after-statement \
24902 Wextra \
24903 Winline \
24904 Wmissing-declarations \
24905 Wmissing-prototypes \
24906 Wnested-externs \
24907 Wpointer-arith \
24908 Wshadow \
24909 Wstrict-prototypes \
24910 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual
24911 do
24912 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24913 if { (eval echo "$as_me:24913: \"$ac_compile\"") >&5
24914 (eval $ac_compile) 2>&5
24915 ac_status=$?
24916 echo "$as_me:24916: \$? = $ac_status" >&5
24917 (exit "$ac_status"); }; then
24918 test -n "$verbose" && echo "$as_me:24918: result: ... -$cf_opt" >&5
24919 echo "${ECHO_T}... -$cf_opt" >&6
24920 case "$cf_opt" in
24921 (Winline)
24922 case "$GCC_VERSION" in
24923 ([34].*)
24924 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
24925
24926 echo "${as_me:-configure}:24926: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24927
24928 continue;;
24929 esac
24930 ;;
24931 (Wpointer-arith)
24932 case "$GCC_VERSION" in
24933 ([12].*)
24934 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
24935
24936 echo "${as_me:-configure}:24936: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24937
24938 continue;;
24939 esac
24940 ;;
24941 esac
24942 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24943 fi
24944 done
24945 CFLAGS="$cf_save_CFLAGS"
24946 fi
24947 rm -rf ./conftest*
24948
24949 fi
24950
24951 if test "$GCC" = yes || test "$GXX" = yes
24952 then
24953 cat > conftest.i <<EOF
24954 #ifndef GCC_PRINTF
24955 #define GCC_PRINTF 0
24956 #endif
24957 #ifndef GCC_SCANF
24958 #define GCC_SCANF 0
24959 #endif
24960 #ifndef GCC_NORETURN
24961 #define GCC_NORETURN /* nothing */
24962 #endif
24963 #ifndef GCC_UNUSED
24964 #define GCC_UNUSED /* nothing */
24965 #endif
24966 EOF
24967 if test "$GCC" = yes
24968 then
24969 { echo "$as_me:24969: checking for $CC __attribute__ directives..." >&5
24970 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
24971 cat > "conftest.$ac_ext" <<EOF
24972 #line 24972 "${as_me:-configure}"
24973 #include <stdio.h>
24974 #include "confdefs.h"
24975 #include "conftest.h"
24976 #include "conftest.i"
24977 #if GCC_PRINTF
24978 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
24979 #else
24980 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
24981 #endif
24982 #if GCC_SCANF
24983 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
24984 #else
24985 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
24986 #endif
24987 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
24988 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
24989 extern GCC_NORETURN void foo(void);
24990 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
24991 EOF
24992 cf_printf_attribute=no
24993 cf_scanf_attribute=no
24994 for cf_attribute in scanf printf unused noreturn
24995 do
24996
24997 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24998
24999 cf_directive="__attribute__(($cf_attribute))"
25000 echo "checking for $CC $cf_directive" 1>&5
25001
25002 case "$cf_attribute" in
25003 (printf)
25004 cf_printf_attribute=yes
25005 cat >conftest.h <<EOF
25006 #define GCC_$cf_ATTRIBUTE 1
25007 EOF
25008 ;;
25009 (scanf)
25010 cf_scanf_attribute=yes
25011 cat >conftest.h <<EOF
25012 #define GCC_$cf_ATTRIBUTE 1
25013 EOF
25014 ;;
25015 (*)
25016 cat >conftest.h <<EOF
25017 #define GCC_$cf_ATTRIBUTE $cf_directive
25018 EOF
25019 ;;
25020 esac
25021
25022 if { (eval echo "$as_me:25022: \"$ac_compile\"") >&5
25023 (eval $ac_compile) 2>&5
25024 ac_status=$?
25025 echo "$as_me:25025: \$? = $ac_status" >&5
25026 (exit "$ac_status"); }; then
25027 test -n "$verbose" && echo "$as_me:25027: result: ... $cf_attribute" >&5
25028 echo "${ECHO_T}... $cf_attribute" >&6
25029 cat conftest.h >>confdefs.h
25030 case "$cf_attribute" in
25031 (noreturn)
25032
25033 cat >>confdefs.h <<EOF
25034 #define GCC_NORETURN $cf_directive
25035 EOF
25036
25037 ;;
25038 (printf)
25039 cf_value='/* nothing */'
25040 if test "$cf_printf_attribute" != no ; then
25041 cf_value='__attribute__((format(printf,fmt,var)))'
25042
25043 cat >>confdefs.h <<\EOF
25044 #define GCC_PRINTF 1
25045 EOF
25046
25047 fi
25048
25049 cat >>confdefs.h <<EOF
25050 #define GCC_PRINTFLIKE(fmt,var) $cf_value
25051 EOF
25052
25053 ;;
25054 (scanf)
25055 cf_value='/* nothing */'
25056 if test "$cf_scanf_attribute" != no ; then
25057 cf_value='__attribute__((format(scanf,fmt,var)))'
25058
25059 cat >>confdefs.h <<\EOF
25060 #define GCC_SCANF 1
25061 EOF
25062
25063 fi
25064
25065 cat >>confdefs.h <<EOF
25066 #define GCC_SCANFLIKE(fmt,var) $cf_value
25067 EOF
25068
25069 ;;
25070 (unused)
25071
25072 cat >>confdefs.h <<EOF
25073 #define GCC_UNUSED $cf_directive
25074 EOF
25075
25076 ;;
25077 esac
25078 fi
25079 done
25080 else
25081 ${FGREP-fgrep} define conftest.i >>confdefs.h
25082 fi
25083 rm -rf ./conftest*
25084 fi
25085
25086 fi
25087
25088 test "$disable_setuid" = yes &&
25089 cat >>confdefs.h <<\EOF
25090 #define DISABLE_SETUID 1
25091 EOF
25092
25093 test "$disable_setgid" = yes &&
25094 cat >>confdefs.h <<\EOF
25095 #define DISABLE_SETGID 1
25096 EOF
25097
25098 if test $disable_setuid = yes ; then
25099 MAY_SETUID="#"
25100 NOT_SETUID=
25101 elif test $disable_setgid = yes ; then
25102 MAY_SETUID="#"
25103 NOT_SETUID=
25104 else
25105 MAY_SETUID=
25106 NOT_SETUID="#"
25107 fi
25108
25109 ### remove from CPPFLAGS the optional features we define in xtermcfg.h
25110 ### or other conflicting symbols that may be defined via imake:
25111 for cf_def in \
25112 __STDC__ \
25113 ALLOWLOGGING \
25114 ALLOWLOGFILEEXEC \
25115 OPT_LUIT_PROG \
25116 OPT_WIDE_CHARS \
25117 SCROLLBAR_RIGHT \
25118 USE_TTY_GROUP \
25119 USE_UTEMPTER \
25120 XRENDERFONT
25121 do
25122 CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
25123 done
25124
25125 echo "$as_me:25125: checking if filesystem supports mixed-case filenames" >&5
25126 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
25127 if test "${cf_cv_mixedcase+set}" = set; then
25128 echo $ECHO_N "(cached) $ECHO_C" >&6
25129 else
25130
25131 if test "$cross_compiling" = yes ; then
25132 case "$target_alias" in
25133 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
25134 cf_cv_mixedcase=no
25135 ;;
25136 (*)
25137 cf_cv_mixedcase=yes
25138 ;;
25139 esac
25140 else
25141 rm -f conftest CONFTEST
25142 echo test >conftest
25143 if test -f CONFTEST ; then
25144 cf_cv_mixedcase=no
25145 else
25146 cf_cv_mixedcase=yes
25147 fi
25148 rm -f conftest CONFTEST
25149 fi
25150
25151 fi
25152 echo "$as_me:25152: result: $cf_cv_mixedcase" >&5
25153 echo "${ECHO_T}$cf_cv_mixedcase" >&6
25154 test "$cf_cv_mixedcase" = yes &&
25155 cat >>confdefs.h <<\EOF
25156 #define MIXEDCASE_FILENAMES 1
25157 EOF
25158
25159 for ac_prog in exctags ctags
25160 do
25161 # Extract the first word of "$ac_prog", so it can be a program name with args.
25162 set dummy $ac_prog; ac_word=$2
25163 echo "$as_me:25163: checking for $ac_word" >&5
25164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25165 if test "${ac_cv_prog_CTAGS+set}" = set; then
25166 echo $ECHO_N "(cached) $ECHO_C" >&6
25167 else
25168 if test -n "$CTAGS"; then
25169 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
25170 else
25171 ac_save_IFS=$IFS; IFS=$ac_path_separator
25172 ac_dummy="$PATH"
25173 for ac_dir in $ac_dummy; do
25174 IFS=$ac_save_IFS
25175 test -z "$ac_dir" && ac_dir=.
25176 $as_executable_p "$ac_dir/$ac_word" || continue
25177 ac_cv_prog_CTAGS="$ac_prog"
25178 echo "$as_me:25178: found $ac_dir/$ac_word" >&5
25179 break
25180 done
25181
25182 fi
25183 fi
25184 CTAGS=$ac_cv_prog_CTAGS
25185 if test -n "$CTAGS"; then
25186 echo "$as_me:25186: result: $CTAGS" >&5
25187 echo "${ECHO_T}$CTAGS" >&6
25188 else
25189 echo "$as_me:25189: result: no" >&5
25190 echo "${ECHO_T}no" >&6
25191 fi
25192
25193 test -n "$CTAGS" && break
25194 done
25195
25196 for ac_prog in exetags etags
25197 do
25198 # Extract the first word of "$ac_prog", so it can be a program name with args.
25199 set dummy $ac_prog; ac_word=$2
25200 echo "$as_me:25200: checking for $ac_word" >&5
25201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25202 if test "${ac_cv_prog_ETAGS+set}" = set; then
25203 echo $ECHO_N "(cached) $ECHO_C" >&6
25204 else
25205 if test -n "$ETAGS"; then
25206 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
25207 else
25208 ac_save_IFS=$IFS; IFS=$ac_path_separator
25209 ac_dummy="$PATH"
25210 for ac_dir in $ac_dummy; do
25211 IFS=$ac_save_IFS
25212 test -z "$ac_dir" && ac_dir=.
25213 $as_executable_p "$ac_dir/$ac_word" || continue
25214 ac_cv_prog_ETAGS="$ac_prog"
25215 echo "$as_me:25215: found $ac_dir/$ac_word" >&5
25216 break
25217 done
25218
25219 fi
25220 fi
25221 ETAGS=$ac_cv_prog_ETAGS
25222 if test -n "$ETAGS"; then
25223 echo "$as_me:25223: result: $ETAGS" >&5
25224 echo "${ECHO_T}$ETAGS" >&6
25225 else
25226 echo "$as_me:25226: result: no" >&5
25227 echo "${ECHO_T}no" >&6
25228 fi
25229
25230 test -n "$ETAGS" && break
25231 done
25232
25233 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
25234 set dummy ${CTAGS:-ctags}; ac_word=$2
25235 echo "$as_me:25235: checking for $ac_word" >&5
25236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25237 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
25238 echo $ECHO_N "(cached) $ECHO_C" >&6
25239 else
25240 if test -n "$MAKE_LOWER_TAGS"; then
25241 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
25242 else
25243 ac_save_IFS=$IFS; IFS=$ac_path_separator
25244 ac_dummy="$PATH"
25245 for ac_dir in $ac_dummy; do
25246 IFS=$ac_save_IFS
25247 test -z "$ac_dir" && ac_dir=.
25248 $as_executable_p "$ac_dir/$ac_word" || continue
25249 ac_cv_prog_MAKE_LOWER_TAGS="yes"
25250 echo "$as_me:25250: found $ac_dir/$ac_word" >&5
25251 break
25252 done
25253
25254 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
25255 fi
25256 fi
25257 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
25258 if test -n "$MAKE_LOWER_TAGS"; then
25259 echo "$as_me:25259: result: $MAKE_LOWER_TAGS" >&5
25260 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
25261 else
25262 echo "$as_me:25262: result: no" >&5
25263 echo "${ECHO_T}no" >&6
25264 fi
25265
25266 if test "$cf_cv_mixedcase" = yes ; then
25267 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
25268 set dummy ${ETAGS:-etags}; ac_word=$2
25269 echo "$as_me:25269: checking for $ac_word" >&5
25270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25271 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
25272 echo $ECHO_N "(cached) $ECHO_C" >&6
25273 else
25274 if test -n "$MAKE_UPPER_TAGS"; then
25275 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
25276 else
25277 ac_save_IFS=$IFS; IFS=$ac_path_separator
25278 ac_dummy="$PATH"
25279 for ac_dir in $ac_dummy; do
25280 IFS=$ac_save_IFS
25281 test -z "$ac_dir" && ac_dir=.
25282 $as_executable_p "$ac_dir/$ac_word" || continue
25283 ac_cv_prog_MAKE_UPPER_TAGS="yes"
25284 echo "$as_me:25284: found $ac_dir/$ac_word" >&5
25285 break
25286 done
25287
25288 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
25289 fi
25290 fi
25291 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
25292 if test -n "$MAKE_UPPER_TAGS"; then
25293 echo "$as_me:25293: result: $MAKE_UPPER_TAGS" >&5
25294 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
25295 else
25296 echo "$as_me:25296: result: no" >&5
25297 echo "${ECHO_T}no" >&6
25298 fi
25299
25300 else
25301 MAKE_UPPER_TAGS=no
25302 fi
25303
25304 if test "$MAKE_UPPER_TAGS" = yes ; then
25305 MAKE_UPPER_TAGS=
25306 else
25307 MAKE_UPPER_TAGS="#"
25308 fi
25309
25310 if test "$MAKE_LOWER_TAGS" = yes ; then
25311 MAKE_LOWER_TAGS=
25312 else
25313 MAKE_LOWER_TAGS="#"
25314 fi
25315
25316 LD_RPATH_OPT=
25317 if test "x$cf_cv_enable_rpath" != xno
25318 then
25319 echo "$as_me:25319: checking for an rpath option" >&5
25320 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
25321 case "$cf_cv_system_name" in
25322 (irix*)
25323 if test "$GCC" = yes; then
25324 LD_RPATH_OPT="-Wl,-rpath,"
25325 else
25326 LD_RPATH_OPT="-rpath "
25327 fi
25328 ;;
25329 (linux*|gnu*|k*bsd*-gnu|freebsd*)
25330 LD_RPATH_OPT="-Wl,-rpath,"
25331 ;;
25332 (openbsd[2-9].*|mirbsd*)
25333 LD_RPATH_OPT="-Wl,-rpath,"
25334 ;;
25335 (dragonfly*)
25336 LD_RPATH_OPT="-rpath "
25337 ;;
25338 (netbsd*)
25339 LD_RPATH_OPT="-Wl,-rpath,"
25340 ;;
25341 (osf*|mls+*)
25342 LD_RPATH_OPT="-rpath "
25343 ;;
25344 (solaris2*)
25345 LD_RPATH_OPT="-R"
25346 ;;
25347 (*)
25348 ;;
25349 esac
25350 echo "$as_me:25350: result: $LD_RPATH_OPT" >&5
25351 echo "${ECHO_T}$LD_RPATH_OPT" >&6
25352
25353 case "x$LD_RPATH_OPT" in
25354 (x-R*)
25355 echo "$as_me:25355: checking if we need a space after rpath option" >&5
25356 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
25357 cf_save_LIBS="$LIBS"
25358
25359 cf_add_libs="$LIBS"
25360 # reverse order
25361 cf_add_0lib=
25362 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25363 # filter duplicates
25364 for cf_add_1lib in $cf_add_0lib; do
25365 for cf_add_2lib in $cf_add_libs; do
25366 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25367 cf_add_1lib=
25368 break
25369 fi
25370 done
25371 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25372 done
25373 LIBS="$cf_add_libs"
25374
25375 cat >"conftest.$ac_ext" <<_ACEOF
25376 #line 25376 "configure"
25377 #include "confdefs.h"
25378
25379 int
25380 main (void)
25381 {
25382
25383 ;
25384 return 0;
25385 }
25386 _ACEOF
25387 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25388 if { (eval echo "$as_me:25388: \"$ac_link\"") >&5
25389 (eval $ac_link) 2>&5
25390 ac_status=$?
25391 echo "$as_me:25391: \$? = $ac_status" >&5
25392 (exit "$ac_status"); } &&
25393 { ac_try='test -s "conftest$ac_exeext"'
25394 { (eval echo "$as_me:25394: \"$ac_try\"") >&5
25395 (eval $ac_try) 2>&5
25396 ac_status=$?
25397 echo "$as_me:25397: \$? = $ac_status" >&5
25398 (exit "$ac_status"); }; }; then
25399 cf_rpath_space=no
25400 else
25401 echo "$as_me: failed program was:" >&5
25402 cat "conftest.$ac_ext" >&5
25403 cf_rpath_space=yes
25404 fi
25405 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25406 LIBS="$cf_save_LIBS"
25407 echo "$as_me:25407: result: $cf_rpath_space" >&5
25408 echo "${ECHO_T}$cf_rpath_space" >&6
25409 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
25410 ;;
25411 esac
25412 fi
25413
25414 echo "$as_me:25414: checking if rpath-hack should be disabled" >&5
25415 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
25416
25417 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
25418 if test "${enable_rpath_hack+set}" = set; then
25419 enableval="$enable_rpath_hack"
25420 test "$enableval" != no && enableval=yes
25421 if test "$enableval" != "yes" ; then
25422 enable_rpath_hack=no
25423 else
25424 enable_rpath_hack=yes
25425 fi
25426 else
25427 enableval=yes
25428 enable_rpath_hack=yes
25429
25430 fi;
25431 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
25432 echo "$as_me:25432: result: $cf_disable_rpath_hack" >&5
25433 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
25434
25435 if test "$enable_rpath_hack" = yes ; then
25436
25437 echo "$as_me:25437: checking for updated LDFLAGS" >&5
25438 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
25439 if test -n "$LD_RPATH_OPT" ; then
25440 echo "$as_me:25440: result: maybe" >&5
25441 echo "${ECHO_T}maybe" >&6
25442
25443 for ac_prog in ldd
25444 do
25445 # Extract the first word of "$ac_prog", so it can be a program name with args.
25446 set dummy $ac_prog; ac_word=$2
25447 echo "$as_me:25447: checking for $ac_word" >&5
25448 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25449 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
25450 echo $ECHO_N "(cached) $ECHO_C" >&6
25451 else
25452 if test -n "$cf_ldd_prog"; then
25453 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
25454 else
25455 ac_save_IFS=$IFS; IFS=$ac_path_separator
25456 ac_dummy="$PATH"
25457 for ac_dir in $ac_dummy; do
25458 IFS=$ac_save_IFS
25459 test -z "$ac_dir" && ac_dir=.
25460 $as_executable_p "$ac_dir/$ac_word" || continue
25461 ac_cv_prog_cf_ldd_prog="$ac_prog"
25462 echo "$as_me:25462: found $ac_dir/$ac_word" >&5
25463 break
25464 done
25465
25466 fi
25467 fi
25468 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
25469 if test -n "$cf_ldd_prog"; then
25470 echo "$as_me:25470: result: $cf_ldd_prog" >&5
25471 echo "${ECHO_T}$cf_ldd_prog" >&6
25472 else
25473 echo "$as_me:25473: result: no" >&5
25474 echo "${ECHO_T}no" >&6
25475 fi
25476
25477 test -n "$cf_ldd_prog" && break
25478 done
25479 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
25480
25481 cf_rpath_list="/usr/lib /lib"
25482 if test "$cf_ldd_prog" != no
25483 then
25484 cf_rpath_oops=
25485
25486 cat >"conftest.$ac_ext" <<_ACEOF
25487 #line 25487 "configure"
25488 #include "confdefs.h"
25489 #include <stdio.h>
25490 int
25491 main (void)
25492 {
25493 printf("Hello");
25494 ;
25495 return 0;
25496 }
25497 _ACEOF
25498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25499 if { (eval echo "$as_me:25499: \"$ac_link\"") >&5
25500 (eval $ac_link) 2>&5
25501 ac_status=$?
25502 echo "$as_me:25502: \$? = $ac_status" >&5
25503 (exit "$ac_status"); } &&
25504 { ac_try='test -s "conftest$ac_exeext"'
25505 { (eval echo "$as_me:25505: \"$ac_try\"") >&5
25506 (eval $ac_try) 2>&5
25507 ac_status=$?
25508 echo "$as_me:25508: \$? = $ac_status" >&5
25509 (exit "$ac_status"); }; }; then
25510 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
25511 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
25512 else
25513 echo "$as_me: failed program was:" >&5
25514 cat "conftest.$ac_ext" >&5
25515 fi
25516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25517
25518 # If we passed the link-test, but get a "not found" on a given library,
25519 # this could be due to inept reconfiguration of gcc to make it only
25520 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
25521 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
25522 # /usr/local libraries.
25523 if test -n "$cf_rpath_oops"
25524 then
25525 for cf_rpath_src in $cf_rpath_oops
25526 do
25527 for cf_rpath_dir in \
25528 /usr/local \
25529 /usr/pkg \
25530 /opt/sfw
25531 do
25532 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
25533 then
25534 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
25535
25536 echo "${as_me:-configure}:25536: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
25537
25538 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
25539 break
25540 fi
25541 done
25542 done
25543 fi
25544 fi
25545
25546 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
25547
25548 echo "${as_me:-configure}:25548: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
25549
25550 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
25551
25552 echo "${as_me:-configure}:25552: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
25553
25554 cf_rpath_dst=
25555 for cf_rpath_src in $LDFLAGS
25556 do
25557 case "$cf_rpath_src" in
25558 (-L*)
25559
25560 # check if this refers to a directory which we will ignore
25561 cf_rpath_skip=no
25562 if test -n "$cf_rpath_list"
25563 then
25564 for cf_rpath_item in $cf_rpath_list
25565 do
25566 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25567 then
25568 cf_rpath_skip=yes
25569 break
25570 fi
25571 done
25572 fi
25573
25574 if test "$cf_rpath_skip" = no
25575 then
25576 # transform the option
25577 if test "$LD_RPATH_OPT" = "-R " ; then
25578 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25579 else
25580 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25581 fi
25582
25583 # if we have not already added this, add it now
25584 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25585 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25586 then
25587 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25588
25589 echo "${as_me:-configure}:25589: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25590
25591 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25592 fi
25593 fi
25594 ;;
25595 esac
25596 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25597 done
25598 LDFLAGS=$cf_rpath_dst
25599
25600 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
25601
25602 echo "${as_me:-configure}:25602: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
25603
25604 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
25605
25606 echo "${as_me:-configure}:25606: testing ...checking LIBS $LIBS ..." 1>&5
25607
25608 cf_rpath_dst=
25609 for cf_rpath_src in $LIBS
25610 do
25611 case "$cf_rpath_src" in
25612 (-L*)
25613
25614 # check if this refers to a directory which we will ignore
25615 cf_rpath_skip=no
25616 if test -n "$cf_rpath_list"
25617 then
25618 for cf_rpath_item in $cf_rpath_list
25619 do
25620 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
25621 then
25622 cf_rpath_skip=yes
25623 break
25624 fi
25625 done
25626 fi
25627
25628 if test "$cf_rpath_skip" = no
25629 then
25630 # transform the option
25631 if test "$LD_RPATH_OPT" = "-R " ; then
25632 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
25633 else
25634 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
25635 fi
25636
25637 # if we have not already added this, add it now
25638 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
25639 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
25640 then
25641 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
25642
25643 echo "${as_me:-configure}:25643: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
25644
25645 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
25646 fi
25647 fi
25648 ;;
25649 esac
25650 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
25651 done
25652 LIBS=$cf_rpath_dst
25653
25654 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
25655
25656 echo "${as_me:-configure}:25656: testing ...checked LIBS $LIBS ..." 1>&5
25657
25658 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
25659
25660 echo "${as_me:-configure}:25660: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
25661
25662 else
25663 echo "$as_me:25663: result: no" >&5
25664 echo "${ECHO_T}no" >&6
25665 fi
25666
25667 fi
25668
25669 # Force plink.sh to not trim pcre's libraries, which have the same symbol
25670 # names as the system regexp.
25671 if test "$with_pcre" != no
25672 then
25673 LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
25674 fi
25675
25676 ### output xtermcfg.h, etc
25677 ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in run-tic.sh:run-tic.in"
25678
25679 cat >confcache <<\_ACEOF
25680 # This file is a shell script that caches the results of configure
25681 # tests run on this system so they can be shared between configure
25682 # scripts and configure runs, see configure's option --config-cache.
25683 # It is not useful on other systems. If it contains results you don't
25684 # want to keep, you may remove or edit it.
25685 #
25686 # config.status only pays attention to the cache file if you give it
25687 # the --recheck option to rerun configure.
25688 #
25689 # `ac_cv_env_foo' variables (set or unset) will be overridden when
25690 # loading this file, other *unset* `ac_cv_foo' will be assigned the
25691 # following values.
25692
25693 _ACEOF
25694
25695 # The following way of writing the cache mishandles newlines in values,
25696 # but we know of no workaround that is simple, portable, and efficient.
25697 # So, don't put newlines in cache variables' values.
25698 # Ultrix sh set writes to stderr and can't be redirected directly,
25699 # and sets the high bit in the cache file unless we assign to the vars.
25700 {
25701 (set) 2>&1 |
25702 case `(ac_space=' '; set | grep ac_space) 2>&1` in
25703 *ac_space=\ *)
25704 # `set' does not quote correctly, so add quotes (double-quote
25705 # substitution turns \\\\ into \\, and sed turns \\ into \).
25706 sed -n \
25707 "s/'/'\\\\''/g;
25708 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25709 ;;
25710 *)
25711 # `set' quotes correctly as required by POSIX, so do not add quotes.
25712 sed -n \
25713 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
25714 ;;
25715 esac;
25716 } |
25717 sed '
25718 t clear
25719 : clear
25720 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25721 t end
25722 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25723 : end' >>confcache
25724 if cmp -s $cache_file confcache; then :; else
25725 if test -w $cache_file; then
25726 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
25727 cat confcache >$cache_file
25728 else
25729 echo "not updating unwritable cache $cache_file"
25730 fi
25731 fi
25732 rm -f confcache
25733
25734 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25735 # Let make expand exec_prefix.
25736 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25737
25738 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25739 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25740 # trailing colons and then remove the whole line if VPATH becomes empty
25741 # (actually we leave an empty line to preserve line numbers).
25742 if test "x$srcdir" = x.; then
25743 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25744 s/:*\$(srcdir):*/:/;
25745 s/:*\${srcdir}:*/:/;
25746 s/:*@srcdir@:*/:/;
25747 s/^\([^=]*=[ ]*\):*/\1/;
25748 s/:*$//;
25749 s/^[^=]*=[ ]*$//;
25750 }'
25751 fi
25752
25753 DEFS=-DHAVE_CONFIG_H
25754
25755 : "${CONFIG_STATUS=./config.status}"
25756 ac_clean_files_save=$ac_clean_files
25757 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25758 { echo "$as_me:25758: creating $CONFIG_STATUS" >&5
25759 echo "$as_me: creating $CONFIG_STATUS" >&6;}
25760 cat >"$CONFIG_STATUS" <<_ACEOF
25761 #! $SHELL
25762 # Generated automatically by configure.
25763 # Run this file to recreate the current configuration.
25764 # Compiler output produced by configure, useful for debugging
25765 # configure, is in config.log if it exists.
25766
25767 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
25768
25769 debug=false
25770 SHELL=\${CONFIG_SHELL-$SHELL}
25771 ac_cs_invocation="\$0 \$@"
25772
25773 CLICOLOR_FORCE= GREP_OPTIONS=
25774 unset CLICOLOR_FORCE GREP_OPTIONS
25775 _ACEOF
25776
25777 cat >>"$CONFIG_STATUS" <<\_ACEOF
25778 # Be Bourne compatible
25779 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25780 emulate sh
25781 NULLCMD=:
25782 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
25783 set -o posix
25784 fi
25785
25786 # Name of the executable.
25787 as_me=`echo "$0" |sed 's,.*[\\/],,'`
25788
25789 if expr a : '\(a\)' >/dev/null 2>&1; then
25790 as_expr="expr"
25791 else
25792 as_expr="false"
25793 fi
25794
25795 rm -f conf$$ conf$$.exe conf$$.file
25796 echo >conf$$.file
25797 if ln -s conf$$.file conf$$ 2>/dev/null; then
25798 # We could just check for DJGPP; but this test a) works b) is more generic
25799 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
25800 if test -f conf$$.exe; then
25801 # Don't use ln at all; we don't have any links
25802 as_ln_s='cp -p'
25803 else
25804 as_ln_s='ln -s'
25805 fi
25806 elif ln conf$$.file conf$$ 2>/dev/null; then
25807 as_ln_s='ln'
25808 else
25809 as_ln_s='cp -p'
25810 fi
25811 rm -f conf$$ conf$$.exe conf$$.file
25812
25813 as_executable_p="test -f"
25814
25815 # Support unset when possible.
25816 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
25817 as_unset="unset"
25818 else
25819 as_unset="false"
25820 fi
25821
25822 # NLS nuisances.
25823 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
25824 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
25825 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
25826 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
25827 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25828 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25829 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25830 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25831
25832 # IFS
25833 # We need space, tab and new line, in precisely that order.
25834 as_nl='
25835 '
25836 IFS=" $as_nl"
25837
25838 # CDPATH.
25839 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25840
25841 exec 6>&1
25842
25843 _ACEOF
25844
25845 # Files that config.status was made for.
25846 if test -n "$ac_config_files"; then
25847 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
25848 fi
25849
25850 if test -n "$ac_config_headers"; then
25851 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
25852 fi
25853
25854 if test -n "$ac_config_links"; then
25855 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
25856 fi
25857
25858 if test -n "$ac_config_commands"; then
25859 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
25860 fi
25861
25862 cat >>"$CONFIG_STATUS" <<\EOF
25863
25864 ac_cs_usage="\
25865 \`$as_me' instantiates files from templates according to the
25866 current configuration.
25867
25868 Usage: $0 [OPTIONS] [FILE]...
25869
25870 -h, --help print this help, then exit
25871 -V, --version print version number, then exit
25872 -d, --debug don't remove temporary files
25873 --recheck update $as_me by reconfiguring in the same conditions
25874 --file=FILE[:TEMPLATE]
25875 instantiate the configuration file FILE
25876 --header=FILE[:TEMPLATE]
25877 instantiate the configuration header FILE
25878
25879 Configuration files:
25880 $config_files
25881
25882 Configuration headers:
25883 $config_headers
25884
25885 Report bugs to <dickey@invisible-island.net>."
25886 EOF
25887
25888 cat >>"$CONFIG_STATUS" <<EOF
25889 ac_cs_version="\\
25890 config.status
25891 configured by $0, generated by GNU Autoconf 2.52.20231210,
25892 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25893
25894 Copyright 2003-2022,2023 Thomas E. Dickey
25895 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25896 Free Software Foundation, Inc.
25897 This config.status script is free software; the Free Software Foundation
25898 gives unlimited permission to copy, distribute and modify it."
25899 srcdir="$srcdir"
25900 INSTALL="$INSTALL"
25901 EOF
25902
25903 cat >>"$CONFIG_STATUS" <<\EOF
25904 # If no file are specified by the user, then we need to provide default
25905 # value. By we need to know if files were specified by the user.
25906 ac_need_defaults=:
25907 while test $# != 0
25908 do
25909 case $1 in
25910 --*=*)
25911 ac_option=`expr "x$1" : 'x\([^=]*\)='`
25912 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25913 shift
25914 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25915 shift
25916 ;;
25917 -*);;
25918 *) # This is not an option, so the user has probably given explicit
25919 # arguments.
25920 ac_need_defaults=false;;
25921 esac
25922
25923 case $1 in
25924 # Handling of the options.
25925 EOF
25926 cat >>"$CONFIG_STATUS" <<EOF
25927 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25928 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25929 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25930 EOF
25931 cat >>"$CONFIG_STATUS" <<\EOF
25932 --version | --vers* | -V )
25933 echo "$ac_cs_version"; exit 0 ;;
25934 --he | --h)
25935 # Conflict between --help and --header
25936 { { echo "$as_me:25936: error: ambiguous option: $1
25937 Try \`$0 --help' for more information." >&5
25938 echo "$as_me: error: ambiguous option: $1
25939 Try \`$0 --help' for more information." >&2;}
25940 { (exit 1); exit 1; }; };;
25941 --help | --hel | -h )
25942 echo "$ac_cs_usage"; exit 0 ;;
25943 --debug | --d* | -d )
25944 debug=: ;;
25945 --file | --fil | --fi | --f )
25946 shift
25947 CONFIG_FILES="$CONFIG_FILES $1"
25948 ac_need_defaults=false;;
25949 --header | --heade | --head | --hea )
25950 shift
25951 CONFIG_HEADERS="$CONFIG_HEADERS $1"
25952 ac_need_defaults=false;;
25953
25954 # This is an error.
25955 -*) { { echo "$as_me:25955: error: unrecognized option: $1
25956 Try \`$0 --help' for more information." >&5
25957 echo "$as_me: error: unrecognized option: $1
25958 Try \`$0 --help' for more information." >&2;}
25959 { (exit 1); exit 1; }; } ;;
25960
25961 *) ac_config_targets="$ac_config_targets $1" ;;
25962
25963 esac
25964 shift
25965 done
25966
25967 exec 5>>config.log
25968 cat >&5 << _ACEOF
25969
25970 ## ----------------------- ##
25971 ## Running config.status. ##
25972 ## ----------------------- ##
25973
25974 This file was extended by $as_me 2.52.20231210, executed with
25975 CONFIG_FILES = $CONFIG_FILES
25976 CONFIG_HEADERS = $CONFIG_HEADERS
25977 CONFIG_LINKS = $CONFIG_LINKS
25978 CONFIG_COMMANDS = $CONFIG_COMMANDS
25979 > "$ac_cs_invocation"
25980 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25981
25982 _ACEOF
25983 EOF
25984
25985 cat >>"$CONFIG_STATUS" <<\EOF
25986 for ac_config_target in $ac_config_targets
25987 do
25988 case "$ac_config_target" in
25989 # Handling of arguments.
25990 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25991 "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
25992 "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
25993 "run-tic.sh" ) CONFIG_FILES="$CONFIG_FILES run-tic.sh:run-tic.in" ;;
25994 "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
25995 *) { { echo "$as_me:25995: error: invalid argument: $ac_config_target" >&5
25996 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25997 { (exit 1); exit 1; }; };;
25998 esac
25999 done
26000
26001 # If the user did not use the arguments to specify the items to instantiate,
26002 # then the envvar interface is used. Set only those that are not.
26003 # We use the long form for the default assignment because of an extremely
26004 # bizarre bug on SunOS 4.1.3.
26005 if "$ac_need_defaults"; then
26006 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26007 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26008 fi
26009
26010 # Create a temporary directory, and hook for its removal unless debugging.
26011 $debug ||
26012 {
26013 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
26014 trap '{ (exit 1); exit 1; }' 1 2 13 15
26015 }
26016
26017 # Create a (secure) tmp directory for tmp files.
26018 : "${TMPDIR=/tmp}"
26019 {
26020 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
26021 test -n "$tmp" && test -d "$tmp"
26022 } ||
26023 {
26024 tmp=$TMPDIR/cs$$-$RANDOM
26025 (umask 077 && mkdir "$tmp")
26026 } ||
26027 {
26028 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
26029 { (exit 1); exit 1; }
26030 }
26031
26032 EOF
26033
26034 cat >>"$CONFIG_STATUS" <<EOF
26035
26036 #
26037 # CONFIG_FILES section.
26038 #
26039
26040 # No need to generate the scripts if there are no CONFIG_FILES.
26041 # This happens for instance when ./config.status config.h
26042 if test -n "\$CONFIG_FILES"; then
26043 # Protect against being on the right side of a sed subst in config.status.
26044 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
26045 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
26046 s,@SHELL@,$SHELL,;t t
26047 s,@exec_prefix@,$exec_prefix,;t t
26048 s,@prefix@,$prefix,;t t
26049 s,@program_transform_name@,$program_transform_name,;t t
26050 s,@bindir@,$bindir,;t t
26051 s,@sbindir@,$sbindir,;t t
26052 s,@libexecdir@,$libexecdir,;t t
26053 s,@datarootdir@,$datarootdir,;t t
26054 s,@datadir@,$datadir,;t t
26055 s,@sysconfdir@,$sysconfdir,;t t
26056 s,@sharedstatedir@,$sharedstatedir,;t t
26057 s,@localstatedir@,$localstatedir,;t t
26058 s,@runstatedir@,$runstatedir,;t t
26059 s,@libdir@,$libdir,;t t
26060 s,@includedir@,$includedir,;t t
26061 s,@oldincludedir@,$oldincludedir,;t t
26062 s,@infodir@,$infodir,;t t
26063 s,@mandir@,$mandir,;t t
26064 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
26065 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
26066 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
26067 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
26068 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
26069 s,@build_alias@,$build_alias,;t t
26070 s,@host_alias@,$host_alias,;t t
26071 s,@target_alias@,$target_alias,;t t
26072 s,@ECHO_C@,$ECHO_C,;t t
26073 s,@ECHO_N@,$ECHO_N,;t t
26074 s,@ECHO_T@,$ECHO_T,;t t
26075 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
26076 s,@DEFS@,$DEFS,;t t
26077 s,@LIBS@,$LIBS,;t t
26078 s,@build@,$build,;t t
26079 s,@build_cpu@,$build_cpu,;t t
26080 s,@build_vendor@,$build_vendor,;t t
26081 s,@build_os@,$build_os,;t t
26082 s,@host@,$host,;t t
26083 s,@host_cpu@,$host_cpu,;t t
26084 s,@host_vendor@,$host_vendor,;t t
26085 s,@host_os@,$host_os,;t t
26086 s,@CC@,$CC,;t t
26087 s,@CFLAGS@,$CFLAGS,;t t
26088 s,@LDFLAGS@,$LDFLAGS,;t t
26089 s,@CPPFLAGS@,$CPPFLAGS,;t t
26090 s,@ac_ct_CC@,$ac_ct_CC,;t t
26091 s,@EXEEXT@,$EXEEXT,;t t
26092 s,@OBJEXT@,$OBJEXT,;t t
26093 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
26094 s,@CPP@,$CPP,;t t
26095 s,@GREP@,$GREP,;t t
26096 s,@EGREP@,$EGREP,;t t
26097 s,@AWK@,$AWK,;t t
26098 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
26099 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
26100 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
26101 s,@LN_S@,$LN_S,;t t
26102 s,@LINT@,$LINT,;t t
26103 s,@LINT_OPTS@,$LINT_OPTS,;t t
26104 s,@LINT_LIBS@,$LINT_LIBS,;t t
26105 s,@APP_CLASS@,$APP_CLASS,;t t
26106 s,@APPSDIR@,$APPSDIR,;t t
26107 s,@no_appsdir@,$no_appsdir,;t t
26108 s,@ICON_NAME@,$ICON_NAME,;t t
26109 s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
26110 s,@PIXMAPDIR@,$PIXMAPDIR,;t t
26111 s,@no_pixmapdir@,$no_pixmapdir,;t t
26112 s,@ICONDIR@,$ICONDIR,;t t
26113 s,@no_icondir@,$no_icondir,;t t
26114 s,@ICON_FORMAT@,$ICON_FORMAT,;t t
26115 s,@ICON_THEME@,$ICON_THEME,;t t
26116 s,@ICON_LIST@,$ICON_LIST,;t t
26117 s,@desktop_utils@,$desktop_utils,;t t
26118 s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
26119 s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
26120 s,@XTERM_PATH@,$XTERM_PATH,;t t
26121 s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
26122 s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
26123 s,@UTMP_NAME@,$UTMP_NAME,;t t
26124 s,@UTMP_PATH@,$UTMP_PATH,;t t
26125 s,@WTMP_NAME@,$WTMP_NAME,;t t
26126 s,@WTMP_PATH@,$WTMP_PATH,;t t
26127 s,@X_CFLAGS@,$X_CFLAGS,;t t
26128 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
26129 s,@X_LIBS@,$X_LIBS,;t t
26130 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
26131 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
26132 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
26133 s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
26134 s,@IMAKE@,$IMAKE,;t t
26135 s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
26136 s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
26137 s,@GROFF_PATH@,$GROFF_PATH,;t t
26138 s,@NROFF_PATH@,$NROFF_PATH,;t t
26139 s,@TBL_PATH@,$TBL_PATH,;t t
26140 s,@GROFF_NOTE@,$GROFF_NOTE,;t t
26141 s,@NROFF_NOTE@,$NROFF_NOTE,;t t
26142 s,@FGREP@,$FGREP,;t t
26143 s,@cf_man2html@,$cf_man2html,;t t
26144 s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
26145 s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
26146 s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
26147 s,@default_termid@,$default_termid,;t t
26148 s,@default_TERM@,$default_TERM,;t t
26149 s,@backarrow_is_bs@,$backarrow_is_bs,;t t
26150 s,@backarrow_is_erase@,$backarrow_is_erase,;t t
26151 s,@delete_is_del@,$delete_is_del,;t t
26152 s,@initial_erase@,$initial_erase,;t t
26153 s,@alt_sends_esc@,$alt_sends_esc,;t t
26154 s,@meta_sends_esc@,$meta_sends_esc,;t t
26155 s,@cf_tic_prog@,$cf_tic_prog,;t t
26156 s,@no_ticprog@,$no_ticprog,;t t
26157 s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
26158 s,@SET_TERMINFO@,$SET_TERMINFO,;t t
26159 s,@double_buffer@,$double_buffer,;t t
26160 s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
26161 s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
26162 s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
26163 s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
26164 s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
26165 s,@LUIT@,$LUIT,;t t
26166 s,@STRINGS_MAX@,$STRINGS_MAX,;t t
26167 s,@ECHO_LT@,$ECHO_LT,;t t
26168 s,@ECHO_LD@,$ECHO_LD,;t t
26169 s,@RULE_CC@,$RULE_CC,;t t
26170 s,@SHOW_CC@,$SHOW_CC,;t t
26171 s,@ECHO_CC@,$ECHO_CC,;t t
26172 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
26173 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
26174 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
26175 s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
26176 s,@EXTRAHDRS@,$EXTRAHDRS,;t t
26177 s,@EXTRASRCS@,$EXTRASRCS,;t t
26178 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
26179 s,@MAY_SETUID@,$MAY_SETUID,;t t
26180 s,@NOT_SETUID@,$NOT_SETUID,;t t
26181 s,@CTAGS@,$CTAGS,;t t
26182 s,@ETAGS@,$ETAGS,;t t
26183 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
26184 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
26185 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
26186 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
26187 CEOF
26188
26189 EOF
26190
26191 cat >>"$CONFIG_STATUS" <<\EOF
26192 # Split the substitutions into bite-sized pieces for seds with
26193 # small command number limits, like on Digital OSF/1 and HP-UX.
26194 ac_max_sed_lines=48
26195 ac_sed_frag=1 # Number of current file.
26196 ac_beg=1 # First line for current file.
26197 ac_end=$ac_max_sed_lines # Line after last line for current file.
26198 ac_more_lines=:
26199 ac_sed_cmds=
26200 while "$ac_more_lines"; do
26201 if test "$ac_beg" -gt 1; then
26202 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
26203 else
26204 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
26205 fi
26206 if test ! -s "$tmp"/subs.frag; then
26207 ac_more_lines=false
26208 else
26209 # The purpose of the label and of the branching condition is to
26210 # speed up the sed processing (if there are no `@' at all, there
26211 # is no need to browse any of the substitutions).
26212 # These are the two extra sed commands mentioned above.
26213 (echo ':t
26214 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
26215 # It is possible to make a multiline substitution using escaped newlines.
26216 # Ensure that we do not split the substitution between script fragments.
26217 ac_BEG=$ac_end
26218 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
26219 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
26220 if test -s "$tmp"/subs.next; then
26221 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
26222 if test ! -s "$tmp"/subs.edit; then
26223 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
26224 if test ! -s "$tmp"/subs.edit; then
26225 if test "$ac_beg" -gt 1; then
26226 ac_end=`expr "$ac_end" - 1`
26227 continue
26228 fi
26229 fi
26230 fi
26231 fi
26232
26233 if test -z "$ac_sed_cmds"; then
26234 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
26235 else
26236 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
26237 fi
26238 ac_sed_frag=`expr "$ac_sed_frag" + 1`
26239 ac_beg=$ac_end
26240 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
26241 fi
26242 done
26243 if test -z "$ac_sed_cmds"; then
26244 ac_sed_cmds="cat"
26245 fi
26246 fi # test -n "$CONFIG_FILES"
26247
26248 EOF
26249 cat >>"$CONFIG_STATUS" <<\EOF
26250 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
26251 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26252 case "$ac_file" in
26253 - | *:- | *:-:* ) # input from stdin
26254 cat >"$tmp"/stdin
26255 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26256 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26257 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26258 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26259 * ) ac_file_in=$ac_file.in ;;
26260 esac
26261
26262 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
26263 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26264 X"$ac_file" : 'X\(//\)[^/]' \| \
26265 X"$ac_file" : 'X\(//\)$' \| \
26266 X"$ac_file" : 'X\(/\)' \| \
26267 . : '\(.\)' 2>/dev/null ||
26268 echo X"$ac_file" |
26269 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26270 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26271 /^X\(\/\/\)$/{ s//\1/; q; }
26272 /^X\(\/\).*/{ s//\1/; q; }
26273 s/.*/./; q'`
26274 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26275 { case "$ac_dir" in
26276 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26277 *) as_incr_dir=.;;
26278 esac
26279 as_dummy="$ac_dir"
26280 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26281 case $as_mkdir_dir in
26282 # Skip DOS drivespec
26283 ?:) as_incr_dir=$as_mkdir_dir ;;
26284 *)
26285 as_incr_dir=$as_incr_dir/$as_mkdir_dir
26286 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26287 ;;
26288 esac
26289 done; }
26290
26291 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
26292 # A "../" for each directory in $ac_dir_suffix.
26293 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
26294 else
26295 ac_dir_suffix= ac_dots=
26296 fi
26297
26298 case "$srcdir" in
26299 .) ac_srcdir=.
26300 if test -z "$ac_dots"; then
26301 ac_top_srcdir=.
26302 else
26303 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
26304 fi ;;
26305 [\\/]* | ?:[\\/]* )
26306 ac_srcdir="$srcdir$ac_dir_suffix";
26307 ac_top_srcdir="$srcdir" ;;
26308 *) # Relative path.
26309 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
26310 ac_top_srcdir="$ac_dots$srcdir" ;;
26311 esac
26312
26313 case $INSTALL in
26314 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26315 *) ac_INSTALL=$ac_dots$INSTALL ;;
26316 esac
26317
26318 if test x"$ac_file" != x-; then
26319 { echo "$as_me:26319: creating $ac_file" >&5
26320 echo "$as_me: creating $ac_file" >&6;}
26321 rm -f "$ac_file"
26322 fi
26323 # Let's still pretend it is `configure' which instantiates (i.e., don't
26324 # use $as_me), people would be surprised to read:
26325 # /* config.h. Generated automatically by config.status. */
26326 configure_input="Generated automatically from `echo $ac_file_in |
26327 sed 's,.*/,,'` by configure."
26328
26329 # First look for the input files in the build tree, otherwise in the
26330 # src tree.
26331 ac_file_inputs=`IFS=:
26332 for f in $ac_file_in; do
26333 case $f in
26334 -) echo "$tmp"/stdin ;;
26335 [\\/$]*)
26336 # Absolute (can't be DOS-style, as IFS=:)
26337 test -f "$f" || { { echo "$as_me:26337: error: cannot find input file: $f" >&5
26338 echo "$as_me: error: cannot find input file: $f" >&2;}
26339 { (exit 1); exit 1; }; }
26340 echo "$f";;
26341 *) # Relative
26342 if test -f "$f"; then
26343 # Build tree
26344 echo "$f"
26345 elif test -f "$srcdir/$f"; then
26346 # Source tree
26347 echo "$srcdir/$f"
26348 else
26349 # /dev/null tree
26350 { { echo "$as_me:26350: error: cannot find input file: $f" >&5
26351 echo "$as_me: error: cannot find input file: $f" >&2;}
26352 { (exit 1); exit 1; }; }
26353 fi;;
26354 esac
26355 done` || { (exit 1); exit 1; }
26356 EOF
26357 cat >>"$CONFIG_STATUS" <<\EOF
26358 ac_warn_datarootdir=no
26359 if test x"$ac_file" != x-; then
26360 for ac_item in $ac_file_inputs
26361 do
26362 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
26363 if test -n "$ac_seen"; then
26364 ac_used=`grep '@datarootdir@' "$ac_item"`
26365 if test -z "$ac_used"; then
26366 { echo "$as_me:26366: WARNING: datarootdir was used implicitly but not set:
26367 $ac_seen" >&5
26368 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
26369 $ac_seen" >&2;}
26370 ac_warn_datarootdir=yes
26371 fi
26372 fi
26373 ac_seen=`grep '${datarootdir}' "$ac_item"`
26374 if test -n "$ac_seen"; then
26375 { echo "$as_me:26375: WARNING: datarootdir was used explicitly but not set:
26376 $ac_seen" >&5
26377 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
26378 $ac_seen" >&2;}
26379 ac_warn_datarootdir=yes
26380 fi
26381 done
26382 fi
26383
26384 if test "x$ac_warn_datarootdir" = xyes; then
26385 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
26386 fi
26387
26388 EOF
26389 cat >>"$CONFIG_STATUS" <<EOF
26390 sed "$ac_vpsub
26391 $extrasub
26392 EOF
26393 cat >>"$CONFIG_STATUS" <<\EOF
26394 :t
26395 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26396 s,@configure_input@,$configure_input,;t t
26397 s,@srcdir@,$ac_srcdir,;t t
26398 s,@top_srcdir@,$ac_top_srcdir,;t t
26399 s,@INSTALL@,$ac_INSTALL,;t t
26400 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
26401 rm -f "$tmp"/stdin
26402 EOF
26403 test -n "${FGREP}" || FGREP="grep -F"
26404 test -n "${EGREP}" || EGREP="grep -E"
26405 cat >>"$CONFIG_STATUS" <<EOF
26406 test -n "\${FGREP}" || FGREP="$FGREP"
26407 test -n "\${EGREP}" || EGREP="$EGREP"
26408 EOF
26409 cat >>"$CONFIG_STATUS" <<\EOF
26410 if test x"$ac_file" != x-; then
26411 cp "$tmp/out" "$ac_file"
26412
26413 for ac_name in prefix exec_prefix datarootdir
26414 do
26415 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
26416 if test -n "$ac_seen"; then
26417 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
26418 if test -z "$ac_init"; then
26419 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
26420 { echo "$as_me:26420: WARNING: Variable $ac_name is used but was not set:
26421 $ac_seen" >&5
26422 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
26423 $ac_seen" >&2;}
26424 fi
26425 fi
26426 done
26427 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
26428 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
26429 if test -s "$tmp"/out; then
26430 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
26431 { echo "$as_me:26431: WARNING: Some variables may not be substituted:
26432 $ac_seen" >&5
26433 echo "$as_me: WARNING: Some variables may not be substituted:
26434 $ac_seen" >&2;}
26435 fi
26436 else
26437 cat "$tmp"/out
26438 fi
26439 rm -f "$tmp"/out
26440
26441 done
26442 EOF
26443 cat >>"$CONFIG_STATUS" <<\EOF
26444
26445 #
26446 # CONFIG_HEADER section.
26447 #
26448
26449 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
26450 # NAME is the cpp macro being defined and VALUE is the value it is being given.
26451 #
26452 # ac_d sets the value in "#define NAME VALUE" lines.
26453 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
26454 ac_dB='[ ].*$,\1#\2'
26455 ac_dC=' '
26456 ac_dD=',;t'
26457 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
26458 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
26459 ac_iB='\([ ]\),\1#\2define\3'
26460 ac_iC=' '
26461 ac_iD='\4,;t'
26462 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
26463 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
26464 ac_uB='$,\1#\2define\3'
26465 ac_uC=' '
26466 ac_uD=',;t'
26467
26468 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
26469 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26470 case "$ac_file" in
26471 - | *:- | *:-:* ) # input from stdin
26472 cat >"$tmp"/stdin
26473 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26474 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26475 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26476 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26477 * ) ac_file_in=$ac_file.in ;;
26478 esac
26479
26480 test x"$ac_file" != x- && { echo "$as_me:26480: creating $ac_file" >&5
26481 echo "$as_me: creating $ac_file" >&6;}
26482
26483 # First look for the input files in the build tree, otherwise in the
26484 # src tree.
26485 ac_file_inputs=`IFS=:
26486 for f in $ac_file_in; do
26487 case $f in
26488 -) echo "$tmp"/stdin ;;
26489 [\\/$]*)
26490 # Absolute (can't be DOS-style, as IFS=:)
26491 test -f "$f" || { { echo "$as_me:26491: error: cannot find input file: $f" >&5
26492 echo "$as_me: error: cannot find input file: $f" >&2;}
26493 { (exit 1); exit 1; }; }
26494 echo $f;;
26495 *) # Relative
26496 if test -f "$f"; then
26497 # Build tree
26498 echo $f
26499 elif test -f "$srcdir/$f"; then
26500 # Source tree
26501 echo "$srcdir/$f"
26502 else
26503 # /dev/null tree
26504 { { echo "$as_me:26504: error: cannot find input file: $f" >&5
26505 echo "$as_me: error: cannot find input file: $f" >&2;}
26506 { (exit 1); exit 1; }; }
26507 fi;;
26508 esac
26509 done` || { (exit 1); exit 1; }
26510 # Remove the trailing spaces.
26511 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
26512
26513 EOF
26514
26515 # Transform confdefs.h into two sed scripts, `conftest.defines' and
26516 # `conftest.undefs', that substitutes the proper values into
26517 # config.h.in to produce config.h. The first handles `#define'
26518 # templates, and the second `#undef' templates.
26519 # And first: Protect against being on the right side of a sed subst in
26520 # config.status. Protect against being in an unquoted here document
26521 # in config.status.
26522 rm -f conftest.defines conftest.undefs
26523 # Using a here document instead of a string reduces the quoting nightmare.
26524 # Putting comments in sed scripts is not portable.
26525 #
26526 # `end' is used to avoid that the second main sed command (meant for
26527 # 0-ary CPP macros) applies to n-ary macro definitions.
26528 # See the Autoconf documentation for `clear'.
26529 cat >confdef2sed.sed <<\EOF
26530 s/[\\&,]/\\&/g
26531 s,[\\$`],\\&,g
26532 t clear
26533 : clear
26534 s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
26535 t end
26536 s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
26537 : end
26538 EOF
26539 # If some macros were called several times there might be several times
26540 # the same #defines, which is useless. Nevertheless, we may not want to
26541 # sort them, since we want the *last* AC-DEFINE to be honored.
26542 uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
26543 sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
26544 sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
26545 rm -f confdef2sed.sed
26546
26547 # This sed command replaces #undef with comments. This is necessary, for
26548 # example, in the case of _POSIX_SOURCE, which is predefined and required
26549 # on some systems where configure will not decide to define it.
26550 cat >>conftest.undefs <<\EOF
26551 s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
26552 EOF
26553
26554 # Break up conftest.defines because some shells have a limit on the size
26555 # of here documents, and old seds have small limits too (100 cmds).
26556 echo ' # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
26557 echo ' test -n "${EGREP}" || EGREP="grep -E"' >>"$CONFIG_STATUS"
26558 echo ' if ${EGREP} "^[ ]*#[ ]*define" "$tmp"/in >/dev/null; then' >>"$CONFIG_STATUS"
26559 echo ' # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
26560 echo ' :' >>"$CONFIG_STATUS"
26561 rm -f conftest.tail
26562 while grep . conftest.defines >/dev/null
26563 do
26564 # Write a limited-size here document to "$tmp"/defines.sed.
26565 echo ' cat >"$tmp"/defines.sed <<CEOF' >>"$CONFIG_STATUS"
26566 # Speed up: don't consider the non `#define' lines.
26567 echo '/^[ ]*#[ ]*define/!b' >>"$CONFIG_STATUS"
26568 # Work around the forget-to-reset-the-flag bug.
26569 echo 't clr' >>"$CONFIG_STATUS"
26570 echo ': clr' >>"$CONFIG_STATUS"
26571 sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
26572 echo 'CEOF
26573 sed -f "$tmp"/defines.sed "$tmp"/in >"$tmp"/out
26574 rm -f "$tmp"/in
26575 mv "$tmp"/out "$tmp"/in
26576 ' >>"$CONFIG_STATUS"
26577 sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
26578 rm -f conftest.defines
26579 mv conftest.tail conftest.defines
26580 done
26581 rm -f conftest.defines
26582 echo ' fi # grep' >>"$CONFIG_STATUS"
26583 echo >>"$CONFIG_STATUS"
26584
26585 # Break up conftest.undefs because some shells have a limit on the size
26586 # of here documents, and old seds have small limits too (100 cmds).
26587 echo ' # Handle all the #undef templates' >>"$CONFIG_STATUS"
26588 rm -f conftest.tail
26589 while grep . conftest.undefs >/dev/null
26590 do
26591 # Write a limited-size here document to "$tmp"/undefs.sed.
26592 echo ' cat >"$tmp"/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
26593 # Speed up: don't consider the non `#undef'
26594 echo '/^[ ]*#[ ]*undef/!b' >>"$CONFIG_STATUS"
26595 # Work around the forget-to-reset-the-flag bug.
26596 echo 't clr' >>"$CONFIG_STATUS"
26597 echo ': clr' >>"$CONFIG_STATUS"
26598 sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
26599 echo 'CEOF
26600 sed -f "$tmp"/undefs.sed "$tmp"/in >"$tmp"/out
26601 rm -f "$tmp"/in
26602 mv "$tmp"/out "$tmp"/in
26603 ' >>"$CONFIG_STATUS"
26604 sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
26605 rm -f conftest.undefs
26606 mv conftest.tail conftest.undefs
26607 done
26608 rm -f conftest.undefs
26609
26610 cat >>"$CONFIG_STATUS" <<\EOF
26611 # Let's still pretend it is `configure' which instantiates (i.e., don't
26612 # use $as_me), people would be surprised to read:
26613 # /* config.h. Generated automatically by config.status. */
26614 if test x"$ac_file" = x-; then
26615 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
26616 else
26617 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
26618 fi
26619 cat "$tmp"/in >>"$tmp"/config.h
26620 rm -f "$tmp"/in
26621 if test x"$ac_file" != x-; then
26622 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
26623 { echo "$as_me:26623: $ac_file is unchanged" >&5
26624 echo "$as_me: $ac_file is unchanged" >&6;}
26625 else
26626 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26627 X"$ac_file" : 'X\(//\)[^/]' \| \
26628 X"$ac_file" : 'X\(//\)$' \| \
26629 X"$ac_file" : 'X\(/\)' \| \
26630 . : '\(.\)' 2>/dev/null ||
26631 echo X"$ac_file" |
26632 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26633 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26634 /^X\(\/\/\)$/{ s//\1/; q; }
26635 /^X\(\/\).*/{ s//\1/; q; }
26636 s/.*/./; q'`
26637 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26638 { case "$ac_dir" in
26639 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26640 *) as_incr_dir=.;;
26641 esac
26642 as_dummy="$ac_dir"
26643 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26644 case $as_mkdir_dir in
26645 # Skip DOS drivespec
26646 ?:) as_incr_dir=$as_mkdir_dir ;;
26647 *)
26648 as_incr_dir=$as_incr_dir/$as_mkdir_dir
26649 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26650 ;;
26651 esac
26652 done; }
26653
26654 fi
26655 rm -f "$ac_file"
26656 mv "$tmp/config.h" "$ac_file"
26657 fi
26658 else
26659 cat "$tmp"/config.h
26660 rm -f "$tmp"/config.h
26661 fi
26662 done
26663 EOF
26664
26665 cat >>"$CONFIG_STATUS" <<\EOF
26666
26667 { (exit 0); exit 0; }
26668 EOF
26669 chmod +x "$CONFIG_STATUS"
26670 ac_clean_files=$ac_clean_files_save
26671
26672 # configure is writing to config.log, and then calls config.status.
26673 # config.status does its own redirection, appending to config.log.
26674 # Unfortunately, on DOS this fails, as config.log is still kept open
26675 # by configure, so config.status won't be able to write to it; its
26676 # output is simply discarded. So we exec the FD to /dev/null,
26677 # effectively closing config.log, so it can be properly (re)opened and
26678 # appended to by config.status. When coming back to configure, we
26679 # need to make the FD available again.
26680 if test "$no_create" != yes; then
26681 ac_cs_success=:
26682 exec 5>/dev/null
26683 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
26684 exec 5>>config.log
26685 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26686 # would make configure fail if this is the last instruction.
26687 "$ac_cs_success" || { (exit 1); exit 1; }
26688 fi
26689
26690